[00:00] gf3 has joined the channel [00:01] boaz has joined the channel [00:05] Yuffster has joined the channel [00:06] rauchg_ has joined the channel [00:08] Locke23rus has joined the channel [00:17] ooooPssss has joined the channel [00:18] masahiroh has joined the channel [00:19] jameshome: anyone using jqtpl and express? [00:21] deepthawtz has joined the channel [00:23] derren13 has joined the channel [00:25] jpld: jameshome: sorry, i use ejs [00:28] shaver: never back down, never apologize! [00:28] aubergine_ has joined the channel [00:29] jpld: ha - i'm not sorry to use ejs, just sorry i can't be more helpful [00:29] aubergine__ has joined the channel [00:30] ehaas has joined the channel [00:35] [[zz]] has joined the channel [00:35] Meradrin has joined the channel [00:36] aubergine_ has joined the channel [00:37] quirkey has joined the channel [00:39] belbo has joined the channel [00:39] kawaz_home has joined the channel [00:40] bradleymeck has joined the channel [00:41] randy has joined the channel [00:41] ehaas1 has joined the channel [00:41] ollie_ has joined the channel [00:42] huehnts_ has joined the channel [00:43] konobi_ has joined the channel [00:43] Atmoz has joined the channel [00:43] jesusabd1llah has joined the channel [00:43] almaisan` has joined the channel [00:43] AAA_awright_ has joined the channel [00:43] Ls_Away has joined the channel [00:43] zentoooo_ has joined the channel [00:43] davidascher has joined the channel [00:44] tanepipe1 has joined the channel [00:44] slpsys_ has joined the channel [00:44] frode__ has joined the channel [00:44] wang has joined the channel [00:44] Heldroe has joined the channel [00:44] jrmiller has joined the channel [00:44] wink_ has joined the channel [00:44] ebi has joined the channel [00:44] Tidwell has joined the channel [00:44] bnoordhuis_ has joined the channel [00:44] ivanfi1 has joined the channel [00:44] markh has joined the channel [00:44] markh has joined the channel [00:44] marshall_law_ has joined the channel [00:44] lmorchard has joined the channel [00:45] m3nt0r^aw has joined the channel [00:45] BHSPitMonkay has joined the channel [00:45] programble has joined the channel [00:45] programble has joined the channel [00:45] sp_ has joined the channel [00:45] maqr has joined the channel [00:45] maqr has joined the channel [00:45] aurynn has joined the channel [00:46] janne has joined the channel [00:46] JimBastard_: SubStack: https://github.com/cloudhead/resourcer [00:47] SubStack: click [00:47] masahiroh has joined the channel [00:48] keeran has joined the channel [00:48] JimBastard_: nodejitsu is sponsoring the project, paying the developer to finish it [00:48] JimBastard_: lol [00:48] JimBastard_: i think [00:48] JimBastard_: i dunno, contract went out last week [00:48] JimBastard_: and there are updates now [00:48] SubStack: oh and JimBastard_ I put music on my launch video from your suggestion [00:49] SubStack: to requisition a beat, as it were [00:49] JimBastard_: SubStack: i watched it [00:49] JimBastard_: i liked the jam [00:49] JimBastard_: +5 [00:49] SubStack: ^_^ [00:49] SubStack: I need a better mic though [00:49] JimBastard_: yeah, and a hat [00:49] sergeb has joined the channel [00:49] SubStack: cheap $10 mic is cheap-sounding [00:49] JimBastard_: next step for me is getting at least two model chicks in the next video [00:49] SubStack: I have a hat. It is very warm. [00:49] masahiro_ has joined the channel [00:49] SubStack: wool and covers the ears [00:50] SubStack: used it in fairbanks winters to great effect [00:50] JimBastard_: did you leave alaska? [00:50] SubStack: yep [00:50] JimBastard_: where you at now/ [00:50] SubStack: oak city [00:50] JimBastard_: ohh what, i was just in SF [00:51] JimBastard_: wait, where is oak city [00:51] SubStack: (oakland) [00:51] JimBastard_: yeah, damn [00:51] JimBastard_: i was just out there [00:51] JimBastard_: we should have javascript partied [00:51] SubStack: next time! [00:52] JimBastard_: im thinking of moving to SF [00:52] SubStack: can get all the oak city javascript crew [00:52] JimBastard_: but i might have to stick around here for techstars [00:52] SubStack: and some SFers [00:52] SubStack: https://github.com/search?type=Users&q=location:oakland [00:53] SubStack: hah I have 9 more repos since that result got cached [00:53] chrischris has joined the channel [00:53] JimBastard_: pk moved too? [00:53] SubStack: well he's staying at my apartment [00:54] JimBastard_: travel visa? [00:54] SubStack: yep [00:54] JimBastard_: got ya [00:54] JimBastard_: let me know if he wants a wife [00:54] SubStack: hah [00:54] JimBastard_: :p [00:54] rauchg_: is that nodejitsu's real business ? [00:54] rauchg_: i knew it [00:54] SubStack: could be! [00:54] rauchg_: node.js is just a tax cover-up thing [00:54] JimBastard_: pimpin is more of a recreational hobby [00:55] JimBastard_: nodejitsu is totally legit [00:56] erlnoob has joined the channel [00:57] sveimac_ has joined the channel [01:00] jameshome: using ejs with express, do conditionals testing for an undefined local not work as documented? I'm trying <% if (title) { %><%=title%><% } %> and getting 'title is not defined' errors [01:01] jashkenas: usually, EJS is implemented with a "with (obj) {" ... and undefined variables are indeed undefined. [01:03] masahiroh has joined the channel [01:03] meck has joined the channel [01:04] AAA_awright_ has joined the channel [01:04] jameshome: so in the first example here: https://github.com/visionmedia/ejs user is never undefined? [01:05] marshall_law has joined the channel [01:05] saschagehlich has joined the channel [01:06] slpsys has joined the channel [01:06] dantalizing has joined the channel [01:06] dantalizing has joined the channel [01:06] rcy has joined the channel [01:08] jashkenas: I believe so. [01:12] linac has joined the channel [01:13] heap has joined the channel [01:13] eml has joined the channel [01:18] ajsie has joined the channel [01:18] ajsie: how do i get current script location? [01:18] ajsie: __filename [01:26] vdrab has joined the channel [01:26] brianmario has joined the channel [01:27] marshall_law has joined the channel [01:28] MrTopf has joined the channel [01:29] lin_ has joined the channel [01:31] ysynopsis has joined the channel [01:33] matjas has joined the channel [01:41] vdrab has joined the channel [01:41] themiddleman_ has joined the channel [01:41] googol has joined the channel [01:48] vdrab has joined the channel [01:48] c4milo has joined the channel [01:50] ysynopsis has joined the channel [01:51] tankatep has joined the channel [01:52] hoffa_ has joined the channel [01:53] jchris1 has joined the channel [01:57] c4milo has joined the channel [01:57] vdrab has joined the channel [01:57] AutomaticPixel has joined the channel [02:02] dnolen has joined the channel [02:10] tyfighter has joined the channel [02:14] sixtus42 has joined the channel [02:18] sveimac has joined the channel [02:18] googol has joined the channel [02:18] cheney has joined the channel [02:19] shripadk has joined the channel [02:19] shripadk has left the channel [02:20] eee_c has joined the channel [02:23] SubStack: it'd be sweet if github could parse source files for require statements and build graphs of which modules use which libs [02:23] SubStack: then when you land at a module page you could browse over the "required by" list for instant real-world examples [02:25] sixtus42: SubStack: twitter that and I repost [02:31] SubStack: sixtus42: on it! [02:32] sixtus42: SubStack: uri or it didn't happen ;-) [02:32] SubStack: one sec [02:32] SubStack: stupid x clipboard [02:33] shaver: http://twitter.com/#!/substack/status/8709821016580096 [02:33] SubStack: hah fast one [02:34] hoffa_ has joined the channel [02:34] sixtus42: how do you deeplink on new twitter? [02:34] sixtus42: failed to do that, used echofon instead [02:34] c4milo1 has joined the channel [02:35] sixtus42: retweet+follow [02:37] shaver: ( http://twitter.com/#!/substack/status/8710022213148672 ) [02:39] ossareh_ has joined the channel [02:39] shripadk has joined the channel [02:40] agnat has joined the channel [02:41] Wyverald has joined the channel [02:42] SubStack: oh and shaver: working on n-way parallelism right now for seq [02:42] shaver: <3 [02:42] SubStack: it's crazy, I pushed 17 commits earlier [02:42] marshall_law has joined the channel [02:42] shaver: you're out of control! [02:43] SubStack: PLUS [02:43] shaver: I can't take it! [02:43] SubStack: I have 6 blog posts lined up starting monday [02:44] sixtus42: SubStack: OutOfContextException … what kind of parallelism are we talking about here? [02:44] SubStack: sixtus42: async parallelism where you have a pool of workers [02:44] evanmeagher has joined the channel [02:44] shaver: it's only out of my deep and abiding respect for the sanctity of this channel that I am not pelvically thrusting at you in celebration [02:45] SubStack: sixtus42: it's from this: http://twitter.com/#!/shaver/status/8024541552967680 [02:49] SubStack: yay somebody fixed optimist for me to work with coffee script [02:49] c4milo has joined the channel [02:52] yozlet has joined the channel [02:52] omni5cience has joined the channel [02:53] sixtus42: substack: for the academic, you still have to say if that's cpu, data, or application parallism [02:53] SubStack: hmmm not even sure actually! [02:54] shaver: application in this case, I would say [02:54] SubStack: it's more a flow control manager on top of what node already has [02:54] shaver: writing with node.js and redis has me drunk on speed and responsiveness. I should go get some food. [02:54] sixtus42: I don't want to sound like a broken record, but http://workflowpatterns.com/patterns/control/ is required reading [02:56] SubStack: ick, patterns [02:56] shaver: that is a great page [02:56] SubStack: I'm sure it is, I just don't like that word [02:57] c4milo1 has joined the channel [02:57] SubStack: sixtus42: anyways it's just a more chainable version of step right now, including chained error handlers [02:58] SubStack: with sequential and parallel steps [02:58] SubStack: https://github.com/substack/node-seq [02:58] sixtus42: looks faf style, i like [02:58] SubStack: faf? [02:59] sixtus42: fab [02:59] sixtus42: https://github.com/jed/fab [02:59] jakehow has joined the channel [03:00] SubStack: maybe [03:00] SubStack: although I like to chain with . [03:00] SubStack: I even wrote a chainsaw! [03:00] vdrab has joined the channel [03:00] SubStack: https://github.com/substack/node-chainsaw [03:00] SubStack: this is what seq is using [03:01] SubStack: right then hacking up {par,seq}{Map,Each} [03:03] sixtus42: wow [03:03] c4milo has joined the channel [03:07] jimt has joined the channel [03:09] jmar777 has joined the channel [03:12] jimt_ has joined the channel [03:12] sixtus42: SubStack: have you thought about data parallelism yet? eventual consistency? [03:13] SubStack: sixtus42: you mean like async mappers and such? [03:13] sixtus42: no [03:14] sixtus42: the one true challenge is to keep the whole chain serializable at all times [03:14] SubStack: this is all living up in happy javascript land without touching the c++ side of things [03:14] mikeal has joined the channel [03:14] sixtus42: Chain.fromJSON(JSON.stringify(chain)) should be a deep clone [03:15] sixtus42: at any time [03:15] SubStack: anyways this is more of a flow control lib [03:15] sixtus42: i.e. when the event loop gives you a chance to check [03:15] Yuffster has joined the channel [03:15] sixtus42: i know, but your flows do have side effects, right? [03:15] sixtus42: change the address book [03:15] SubStack: the context gets updated [03:16] sixtus42: now run the code on two devices both in offline mode [03:16] SubStack: and in seq there is a results stack and a vars hash [03:16] sixtus42: what happens to your entry? [03:16] SubStack: wait what [03:16] sixtus42: assuming the entry is shared [03:17] sixtus42: you have a flow to change an address book entry (no talking about data api, just content) [03:17] SubStack: this is just a dinky little flow control lib :p [03:17] SubStack: there is no data store [03:17] sixtus42: but some will eventually code flows in it [03:18] sixtus42: and these flows might change the address book (sticky with my example) right? [03:18] c4milo has joined the channel [03:18] sixtus42: that's data parallism [03:18] SubStack: this lib does not do that [03:18] sixtus42: the other kind of parallism [03:19] sixtus42: yes, but the code using your lib will [03:19] SubStack: well I don't have that code, I'm just using this to clean up some of my own code [03:20] sixtus42: and doing a good job at it… looks really impressive on first glance at 4a ;-) [03:22] yozlet: hey substack - any chance of dnode doing the object-oriented thing? [03:22] yozlet: (as in, remote functions able to return constructors of objects which have remote methods) [03:22] yozlet: s/return/be/ [03:22] sixtus42: yozlet: there is evil done that style of network architecture [03:23] SubStack: yozlet: well except for the returning part, dnode already does that [03:23] yozlet: O RLY? [03:23] yozlet: I confess I haven't tried it [03:23] c4milo has joined the channel [03:23] SubStack: you can have callbacks that call callbacks with other callbacks [03:23] yozlet: sixtus42: OK, it's a teeny bit SOAPy [03:23] SubStack: and hashes embedded in callbacks [03:23] SubStack: er [03:24] SubStack: callbacks embedded in hashes embedded in array embedded in hashes [03:24] SubStack: arbitrarily deeply [03:24] SubStack: SOAPy? not at all! [03:24] yozlet: there isn't a WSDL file in sight, admittedly [03:24] SubStack: actually I don't know what soap is except that it uses xml so it sucks [03:24] yozlet: :) [03:25] yozlet: if you have it wrapped up in a good enough library it's not *too* bad [03:25] yozlet: it's a total pain to debug, though [03:25] sixtus42: SOAP is evil Corba's little hooker sister on port 80 [03:25] yozlet: but it's basically a way of doing the dnode kind of thing in an early-bound way, riddled with XML and strong typing [03:26] yozlet: oh, and with none of your async cleverness [03:26] SubStack: all dnode does it enforce continuation-passing-style by design (I have good reasons) and wrap callbacks nested arbitrarily in data structures [03:26] yozlet: so it's totally blocking [03:27] sixtus42: http://queue.acm.org/detail.cfm?id=1142044 [03:27] SubStack: blocking rpc is the suck [03:27] sixtus42: the two of you should take a look at http://martinfowler.com/articles/richardsonMaturityModel.html [03:28] SubStack: dnode is pretty heavily based on drb's design, except it doesn't suck nearly as hard and is async [03:28] yozlet: sixtus42: read that the other day :) And yes, it's all totally non-rest [03:28] SubStack: oh and it doesn't serialize objects, it just wraps callbacks and sends json strings around [03:28] sixtus42: but the json *is* the serialization [03:29] elijah-mbp has joined the channel [03:29] sixtus42: and data parallelism is about tracking revisions of these json msgs over time [03:29] SubStack: oh what I mean is that it doesn't reconstruct objects to be local copies of the remote [03:29] SubStack: wrapping > reconstruction [03:29] sixtus42: of course not [03:30] sixtus42: but data wise is should be a deep clone [03:30] SubStack: it is, only it's not a clone, it's a transform [03:31] sixtus42: side effects! [03:31] sixtus42: it's all about making the side effect of a message explicit [03:32] sixtus42: that would be level 2 in the fowler link [03:32] c4milo has left the channel [03:33] sixtus42: and the final step to REST glory is level 3: that would require a convention of how to store links in json [03:33] SubStack: nah [03:33] SubStack: all that stuff isn't important [03:34] SubStack: REST is overrated too [03:34] sixtus42: no, is misunderstood [03:34] sixtus42: it's [03:34] cjmFloating has joined the channel [03:34] sixtus42: took me 2 years to unlearn enough of my master to understand it [03:35] sixtus42: this might be the last brainfood for tonight http://www.infoq.com/articles/webber-rest-workflow [03:35] sixtus42: i need to go to bed [03:36] sixtus42: likely to be the best introduction to rest (still flawed) [03:39] c4milo1 has joined the channel [03:39] Spion__ has joined the channel [03:41] yozlet has joined the channel [03:42] jimt has joined the channel [03:44] derferman has joined the channel [03:46] jmar777: is there going to be a v0.2.6, or are efforts being focused on 0.3.x releases at this point? [03:47] jmar777: if there are more 0.2.x releases, and I want to submit a patch, what's the process to submit it to both tags? (sorry for the noob question) [03:53] mscdex: jmar777: afaik there will probably be a v0.2.6. go ahead and submit a patch for each branch and post them to the nodejs-dev mailing list [03:54] markh1 has joined the channel [03:54] markh has joined the channel [03:54] evanmeagher has joined the channel [03:56] hoffa_ has joined the channel [03:57] jmar777: mscdex: will do - thanks [03:58] scoates: if I were to issue a few hundred HTTP Client requests at once, would "Error: ECONNREFUSED, Could not contact DNS servers" be expected? Am I overflowing a buffer of some sort? [03:59] jimt has joined the channel [04:07] mscdex: scoates: is it the same address? [04:07] mjr_ has joined the channel [04:07] naturalethic: scoates: i've gotten that too trying to make 500 parallel connections to the same address [04:07] scoates: mscdex: yep [04:07] naturalethic: tabled it for later resolution [04:08] scoates: naturalethic: yeah, all to prod.gimmebar.vpn (in my hosts file) [04:08] bulu has joined the channel [04:09] scoates: FWIW, if I do the same queries in slices of 100 it works just fine. [04:09] jimt_ has joined the channel [04:09] bulu: hello anybody has a good idea for replacement of httpClient when using https ? [04:11] scoates: also, FWIW, naturalethic, mscdex: if happens on the 251st request. If I slice 0,250, I don't get the error.. slice 0,251, I get it [04:11] mscdex: scoates: why not cache the results of the address lookup? [04:11] mjr_: bulu: you can often use the "request" library for easy client connections of both http and https. [04:12] scoates: mscdex: we *could*. I think this is a false error, based on the above, though. [04:12] mscdex: bulu: what do you mean? using https is just a matter of calling setSecure() [04:12] mscdex: bulu: and listening for the extra 'secure' event [04:17] bulu: mscdex: i found httpClient very buggy and unreliable, its just not working [04:18] bulu: when working with https [04:18] mscdex: bulu: what problems specifically? [04:18] nooder has joined the channel [04:18] bulu_ has joined the channel [04:20] meck: scoates: you may be running out of file descriptors [04:20] meck: $ ulimit -a [04:20] bulu_: mscdex: this getPeerCertificate is not working [04:20] scoates: yep, seems like it [04:20] scoates: open files (-n) 256 [04:20] jimt has joined the channel [04:20] scoates: is that per process? [04:20] scoates: entirely possible I have 16 files open [04:21] bulu_: mscdex: Object # has no method 'getPeerCertificate' [04:22] scoates: er.. 6 files [04:22] mscdex: bulu_: the master branch doesn't have that method anymore, you need 0.2.x [04:22] mscdex: or maybe an older 0.3.x [04:22] bulu: but its written in 0.3.1 documentation [04:23] mscdex: ok 0.3.1 does have it [04:23] bulu: and i also get this: 400 The plain HTTP request was sent to HTTPS port [04:23] mscdex: but it's a property of the stream [04:23] sixtus421 has joined the channel [04:23] bulu: i pulled from git yesterday. [04:23] bulu: so its 0.3.2 what i have now [04:23] scoates: thanks meck [04:24] bulu: getPeerCertificate is a method of the httpClient [04:24] meck: no problemo [04:24] scoates: FWIW, ulimit -n 512 stopped the errors [04:25] mscdex: bulu: well i'd give 0.3.1 a try, since it seems like getPeerCertificate still existed at that point [04:25] scoates: mscdex: naturalethic: ^^ [04:25] bulu: mscdex ok [04:25] mscdex: bulu: lots of changes regarding tls/ssl are going on right now in master [04:25] meck: excellent [04:26] mscdex: scoates: you can also do: ulimit -n unlimited [04:26] mscdex: scoates: iirc [04:26] scoates: cool. didn't know that. [04:26] scoates: would be kind of nice if the resolver could say "out of file handles" instead of "couldn't resolve" [04:27] scoates: even though the latter is technically true [04:27] sixthgear has left the channel [04:31] jimt_ has joined the channel [04:31] bulu: mscdex ok [04:31] bulu: mscdex compiling 0.3.1 now [04:33] bulu_ has joined the channel [04:40] indexzero has joined the channel [04:42] bulu_ has joined the channel [04:43] jimt has joined the channel [04:48] jimt has joined the channel [04:53] jimt has joined the channel [04:58] jimt has joined the channel [05:02] noahcampbell has joined the channel [05:04] AutomaticPixel has joined the channel [05:05] bradleymeck has joined the channel [05:07] tylerstalder has joined the channel [05:17] tyfighter has joined the channel [05:17] mjr_: It'd sure be handy to have a way to drain stdout before exiting. [05:17] mjr_: This isn't such a big deal for server programs, but is really annoying for small utilities. [05:25] evanmeagher has joined the channel [05:26] SubStack: shaver: parEach can now take a limit as an optional first arg [05:27] mikeal has joined the channel [05:29] tim_smart has joined the channel [05:38] AcidicChip has joined the channel [05:42] jimt_ has joined the channel [05:50] disappearedng has joined the channel [05:51] jimt has joined the channel [05:51] disappearedng: Hey quick question: I am currently using orbited and I want to switch to node.js. I have a server which is running on tcp socket in python I was wondering how can node.js communicate with my engine? [05:51] zentoooo has joined the channel [05:51] mjr_: disappearedng: node can talk TCP to your existing thing [05:53] disappearedng: mjr_: frankly speaking how difficult do you think node.js is? can I learn it in one night? [05:54] mjr_: Do you know JavaScript? [05:54] SubStack: parMap and seqMap too wheee [05:54] disappearedng: mjr_ yeah quite extensively [05:54] AcidicChip: When a require('module') is done... Where are the modules put to be used? [05:54] mjr_: Well shit, it'll be easy then. [05:54] AAA_awright: If you've done AJAX in Javascript you can be fairly good in a month [05:55] AAA_awright: Knowing the details of require() and the various libs and such [05:55] AcidicChip: I'm trying to interact with mysql, i downloaded node-mysql, not sure where to place it [05:56] disappearedng: AAA_awright: in a month? [05:56] AcidicChip: Am I really asking a difficult question? [05:56] mjr_: AcidicChip: you probably want npm to install things. [05:57] AAA_awright: AcidicChip: It's in the documentation, ~/.node_libraries [05:57] AcidicChip: and what if I just git it? [05:57] AcidicChip: okay thanks [05:57] AAA_awright: Or you can use NODE_PATH=... [05:57] meck: if you know js and the basics of networking, you can absolutely have a hello world http server up tonight [05:57] AcidicChip: yea, it was easy to get that [05:57] mjr_: From the root dir, you can do "npm install" as well. [05:57] AcidicChip: cloud9ide is a nice tool [05:57] AAA_awright: Or you can specify a location using require.paths.push('dir'); [05:57] AAA_awright: In the code though that isn't sugguested as much [05:58] AcidicChip: okay awesome, thanks for all the answers. [05:58] disappearedng: ok best tutorial for me? [05:58] meck: disappearedng: just click through the v0.2.5 docs http://nodejs.org/docs/v0.2.5/api.html [05:58] meck: easy as pie... start with, say, the http.Client example [05:59] mjr_: disappearedng: If you already know JS, you can make node do something interesting in an evening, depending on what you are trying to do. [05:59] disappearedng: well just comet [05:59] [[zz]] has joined the channel [05:59] jimt has joined the channel [06:00] disappearedng: I think my biggest mistake is to use orbited in the first place [06:04] jchris has joined the channel [06:09] SubStack: socket.io! [06:12] zentoooo has joined the channel [06:16] yozlet: SubStack: have you seen http://caolanmcmahon.com/async.html ? I really like the auto() function in that [06:16] jmar777: ugh... so I prepared a patch in a "detached HEAD" state after doing a "git checkout v0.2.5" [06:17] jmar777: and then tried committing it to my fork on github... and now I have no clue how to submit a patch or anything. the commit doesn't even show up on github [06:18] SubStack: checking i out [06:18] SubStack: *it [06:21] meck: why not merge it to master and re-push? [06:24] jmar777: meck: massive git noob... i'll give that a try [06:24] meck: cool... yeah just apply the patch in master and git push [06:25] mjr_: git can be really intimidating at first. [06:25] mjr_: Or the first time you encounter some of its awesome power. [06:25] rubydiamond_ has joined the channel [06:25] meck: or, as it were... switch to 0.2 and do that [06:26] meck: yep, it's definitely a lot to take in at first [06:26] meck: just know that as long as you're committing you can nearly always get back to some previous state after you royally destroy something [06:26] jmar777: so I found the SHA1 for the "lost" commit, and branched it to another local branch [06:26] meck: git reflog is your friend [06:26] jmar777: meck: right... managed to find the commit in there [06:27] meck: if you want to commit to 0.2, switch to the branch and run 'git cherry-pick ' [06:27] meck: that'll pluck just the one commit and put it on top of 0.2 [06:28] jmar777: meck: ahh... how do I do that w/out going back into "detached HEAD" mode? [06:28] meck: git checkout v0.2 [06:28] meck: that'll set HEAD to v0.2 [06:28] jmar777: what I want to do is prepare some patches for the latest v0.2.x and v0.3.x tags [06:29] yumike has joined the channel [06:29] meck: if it applies cleanly, you can just do the cherry-pick in v0.2 and master [06:29] SubStack: yozlet: ah dependency analysis. I thought about adding that. Not tonight though [06:29] hzin has joined the channel [06:30] meck: jmar777: when you want to push the v0.2, switch to that branch and run 'git push origin v0.2' [06:30] meck: same thing applies to master [06:30] jmar777: meck: that seemed to mostly work. i was trying to view the changes in gitx, but it doesn't seem to register now [06:31] jmar777: meck: i think I might have confused it with my mishaps earlier though [06:31] meck: i'm not very familiar with the graphical tools [06:31] meck: does git diff HEAD^ look right? [06:32] jmar777: meck: ye [06:32] jmar777: *s [06:32] meck: i say go for it then... what's the worst that could happen? :) [06:33] jmar777: meck: heh... more questions? [06:33] meck: :D [06:35] meck: Fix number of args emitted by EventEmitter during "fast case" (lte 3 args) <---- ? [06:36] meck: jmar777: you can switch branches in github, if you weren't aware https://github.com/jmar777/node/tree/v0.2 [06:37] jmar777: meck: that seemed to do it - thanks a bunch :) [06:37] meck: no problem... should work the same for master for the most part [06:37] jmar777: meck: who knows if it's a good commit or not, but made sense to me anyway lol [06:37] meck: :) [06:39] jmar777: meck: so before I cause more problems... 'git push origin HEAD'? [06:39] jmar777: already cherry-picked the update I want into HEAD [06:39] meck: s/HEAD/master/ [06:40] jmar777: k [06:40] meck: do git branch and make sure you're on master [06:40] meck: HEAD actually just always points to where you're at if you're anywhere but a detached head [06:41] jmar777: gotcha... guess that makes sense then [06:41] meck: (in case you're interested, 'cat .git/HEAD' <---- that' all there is to HEAD) [06:41] meck: HEAD is literally just the contents of that file [06:41] meck: it's a bit like a symlink [06:42] jmar777: thanks a ton - that helped a lot. got it pushed to master now as well: https://github.com/jmar777/node/commits/master [06:43] meck: great, always like to point people toward git's awesomeness :P [06:44] jmar777: i'm just at the point where I can see the light, but don't really know what to do with it yet... I do appreciate the help though [06:44] meck: i know the feeling! no problem [06:46] meck: jmar777: btw, github has some fantastic git resources if you just start clicking through their help pages [06:46] jmar777: meck: will do [06:50] braddunbar has joined the channel [06:51] bulu has joined the channel [06:52] bulu: querystring.stringify({foo: 'bar'}) [06:53] bulu: ReferenceError: querystring is not defined [06:53] bulu: v0.3.1 [06:53] meck: querystring = require("querystring") ? [06:54] bulu: oh let me check [06:57] jmar777: Alright - i'm out for the night. Thanks again meck for all the help! [06:57] meck: yep, nighty night! [06:57] bulu: thx meck [06:57] bulu: =) [06:57] meck: :D [07:06] mikeal has joined the channel [07:06] micheil has joined the channel [07:06] micheil: hmm.. no isaacs.. [07:08] bentruyman has joined the channel [07:09] AcidicChip: how would I access a variable declared outside of the require? [07:10] micheil: v8: typeof "" [07:10] v8bot: micheil: "string" [07:10] micheil: you'd need to export it. [07:10] AcidicChip: okay, ill read into export [07:10] AcidicChip: thanks [07:10] AcidicChip: ah perfect [07:11] AcidicChip: i need the revers of export [07:12] AcidicChip: var $hello = 'world'; require('./hello'); [07:12] AcidicChip: inside of hello.js I want to console.log($hello) [07:13] meck: you should just export a method from hello.js that accepts your var as a parameter [07:13] micheil: AcidicChip: not possible. [07:13] AcidicChip: ACTION nods [07:13] AcidicChip: that makes sense [07:14] masahiroh has joined the channel [07:15] AcidicChip: hummm [07:16] AcidicChip: Here's what I'm trying to do... When an apache request for a .sjs file is made, I'm having htaccess proxy localhost:81/?%{REQUEST_URI} then having node.js require what is passed in the http request [07:17] ossareh has joined the channel [07:17] AcidicChip: "require('http').createServer(function(req, res) {" I'm trying to pass the req and res into the require [07:17] AcidicChip: so that I can have the required js utilize the already active http and perform the .end [07:18] AcidicChip: Essentialy I should make a function in every js file that is included to pass teh req and ers to? [07:19] meck: sounds a little crazy honestly... you may be able to say require('hello').foo = bar though, and inside hello.js, access module.foo [07:19] amerine has joined the channel [07:19] meck: never tried anything of the sort though [07:19] meck: and you may regret going down that path [07:19] meck: bedtime, g'night! [07:21] AcidicChip: nope that didnt work [07:21] luke`_ has joined the channel [07:22] amerine has joined the channel [07:23] amerine has joined the channel [07:24] yumike has joined the channel [07:24] daglees has joined the channel [07:24] daglees has joined the channel [07:25] JimBastard has joined the channel [07:25] bulu_ has joined the channel [07:26] yumike has joined the channel [07:28] mikeal has joined the channel [07:29] googol: anyone know of a good javascript xss filter [07:31] micheil: mikeal: thoughts? https://gist.github.com/718692 [07:32] chapel: question, the node podcast, is there an rss feed yet? [07:32] micheil: there's no rss feed yet [07:32] chapel: :( [07:32] micheil: I'm not sure if there's another episode yet. [07:32] mikeal: we have the code mostly togetehr [07:32] chapel: did you get the 2nd one out? [07:32] mikeal: micheil: are you still doing the mixdown from a few weeks ago? [07:32] micheil: mikeal: needed to speak with you about that. [07:33] chapel: its been a while since I asked [07:33] mikeal: you should really just move here :) [07:33] mikeal: doing them in person will cut down a lot on the post production time :) [07:34] chapel: well there are things you can do that make it easy [07:34] micheil: yeah [07:34] disappearedng: Hey any comet tutorials with node.js out there? [07:34] chapel: do you guys not count down, or have a way to make sure the audio is synced? [07:34] micheil: chapel: it's still a long process [07:35] AcidicChip: Alright, I got it werkin.... if anyone cares, hehe [07:35] micheil: like, the episode we recorded the week after the first one managed to have network latency enough that some how even after the 1,2,3,go sync, we were out of sync, so I scrapped it. [07:36] chapel: ah [07:36] chapel: well Im not saying its easy, but I have done multiple shows with 3-4 people all remote [07:36] micheil: then the last one we recorded there was a massive fan whir/noise in the background, which I couldn't manage to drop out, and didn't make for much pleasant listening [07:36] jimt has joined the channel [07:37] micheil: chapel: yeah, if you have an awesome person to do the mixdowns it's fairly simple, but myself, I've only done about 3 mixdowns [07:38] chapel: oh, Im not awesome, just stubborn [07:38] bulu_ has joined the channel [07:39] bulu__ has joined the channel [07:39] micheil: We've decided to postpone future episodes until early 2011, due to technical reasons [07:39] chapel: ah [07:43] disappearedng: so which is the most stable module (aka working across most platforms) to implement comet in node.js [07:43] bulu_ has joined the channel [07:44] micheil: I think most people went with websockets over comet [07:44] micheil: but there are libraries like faye, socket.io and a few others: http://github.com/ry/node/wiki/Modules [07:45] disappearedng: but is that websocket only available on chrome now ? ( the WebSocket from html5) [07:46] disappearedng: like you are talking about ws:// right? does that mean that I have to have another port opened? [07:46] AAA_awright_ has joined the channel [07:49] bulu_ has joined the channel [07:49] micheil: no [07:49] AcidicChip: It's funny how I was recently wishing I could replace php with javascript. [07:49] disappearedng: micheil: then what are you talking about [07:49] micheil: ws:// uses the HTTP Upgrade (maybe CONNECT) methods [07:49] micheil: so, it'll actually use your HTTP.Server instance [07:50] micheil: websockets was designed to be able to hijack standard http connections based on an Upgrade: WebSocket header (or something to that extent) [07:51] micheil: so you'll server both http and websockets via say, port 80 [07:51] micheil: or, you can use a different port if you like for each server. [07:53] disappearedng: micheil: and here you are referring to the websocket module in node.js/ [07:53] micheil: node.js doesn't include websockets in core [07:54] micheil: I'm actually referring to the protocol. It uses a http-like handshake [07:54] micheil: (admittedly draft-75 was more http-like then draft-76) [07:55] disappearedng: would you mind directing me to some literature on this? I am fairly new to node.js [07:57] micheil: websockets have almost nothing to do with node.js [07:57] micheil: websockets were being developed by WHATWG, but are now being developed by the IETF [07:58] micheil: this is the latest draft for them (to my knowledge few have implemented this version) http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-03 [07:59] micheil: this is the current mainstream version: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-00 [07:59] mikeal has joined the channel [08:00] micheil: the only thing node.js has to do with websockets is that the implementations that people have written for them make using them pretty damn easy. [08:00] micheil: for instance: http://github.com/miksago/node-websocket-server and http://github.com/learnboost/socket.io-node [08:02] disappearedng: micheil: thx for the info [08:02] micheil: no worries [08:02] disappearedng: ok so let me get this straight, node.js merely is a socket server implemented in js [08:02] micheil: uuhh.. not quite [08:03] disappearedng: and if I want to do comet techniques aka long poiling etc, I pretty much am on my own [08:03] chapel: think he misses the point [08:03] micheil: node.js takes the v8 javascript interpreter, and gives you JavaScript apis that talk to a thin C++/C layer [08:03] chapel: node.js has nothing to do with websockets or comet, other than you can do them using node.js [08:04] micheil: just like you can do websockets in ruby, python, go, etc. [08:04] disappearedng: ah I see [08:04] disappearedng: cause I just came from a comet server called orbited and they do that for you [08:05] micheil: orbited's written in java. [08:05] micheil: right? [08:05] disappearedng: no in python [08:05] micheil: okay [08:05] micheil: so, yeah, what you get in orbited is like what you'd get from socket.io or node-websocket-server [08:05] disappearedng: and from my app's point of view, I just need to implement something that listens to a socket and if I want to send something to the client, I just send message to the handler given to that socket [08:06] disappearedng: ok I got it [08:06] micheil: what node gives you is event based filesystem, network, http and dns access [08:06] disappearedng: what are the most popular frameworks that uses node.js which allows long polling? [08:06] micheil: disappearedng: have a look at those two links that I gave you before: [08:06] micheil: http://github.com/miksago/node-websocket-server and http://github.com/learnboost/socket.io-node [08:07] disappearedng: ok cool no problem thx a lot [08:07] micheil: most people have started to use websockets over long-polling (more reliable) [08:07] micheil: but socket.io-node does fallback to using long-polling for older browsers [08:07] micheil: also see: http://socket.io [08:10] Druid_ has joined the channel [08:11] AAA_awright_ has joined the channel [08:13] slaskis has joined the channel [08:18] jashkenas has joined the channel [08:18] jashkenas has left the channel [08:19] jetienne has joined the channel [08:26] faust45 has joined the channel [08:42] peutetre has joined the channel [08:46] karboh has joined the channel [08:51] KOBA789 has joined the channel [08:51] disappearedng: you guys familiar with how I can use io.socket on port 80? Possibly using reverse proxy? but how can I specify the url in io.Socket(null, {port: 8080, rememberTransport: false [08:58] adambeynon has joined the channel [08:58] yumike has joined the channel [08:59] micheil_mbp has joined the channel [09:00] derren13 has joined the channel [09:04] Utkarsh has joined the channel [09:08] mohiam has joined the channel [09:09] AcidicChip: disappearedng are you trying to make apache use node.js ? [09:10] femtoo has joined the channel [09:11] fly-away has joined the channel [09:12] AcidicChip: disappearedng I just setup my htaccess to proxy an http request to my node.js . Are you trying to do the same? [09:13] disappearedng: AcidicChip: no I am not trying to make apache to use node.js [09:14] disappearedng: I just want to do long polling on port 80 [09:14] AcidicChip: ok [09:15] disappearedng: but I don't know how to do long poiling on port 80 [09:15] disappearedng: while sharing the http port with that [09:17] heap has joined the channel [09:17] ewdafa has joined the channel [09:19] disappearedng: btw how can I use node.js talk to an engine which I have written? [09:19] disappearedng: in another process of course [09:21] micheil: disappearedng: you could probably setup a vhost proxy [09:22] micheil: disappearedng: as for talking to another engine, either something like IPC, Queue, or similar [09:22] disappearedng: micheil: are you talking about the first one or the second question [09:22] disappearedng: or even rpc? [09:22] micheil: rpc yes, that too. [09:22] micheil: see dnode for rpc [09:22] micheil: resque or 0mq for something like a queue [09:23] micheil: and then there's my variant which is not written yet called XEE, which is IPC for node's EventEmitters [09:23] disappearedng: my old set up has been: I used a proxy (sitting on port 80) capable with reverse proxying to forward /comet/* to port 12345 (my comet server) and everything else to port 12346 which sits my django server. [09:24] disappearedng: so how much should that change when I am using node.js [09:24] masahiroh has joined the channel [09:24] hzin has joined the channel [09:24] vineyard has joined the channel [09:24] micheil: although, at the same time, by fronting node with apache, you will likely loose performance [09:24] sriley has joined the channel [09:24] micheil: so, that same setup would work for node. [09:24] disappearedng: ok cool, iirc, apache does not handle long polling well [09:28] AcidicChip: Does node.js create a cache? [09:31] jed__ has joined the channel [09:31] d0k has joined the channel [09:32] AcidicChip: I have node.js listen on http, then require a file based on the req.url . The required file will respond with 'abc'. All works fine, but if I change the required file to '123', and pull the web request, it's still 'abc' unless I stop and restart it, then it'll show the '123' [09:32] AcidicChip: if I copy the required file and change it to '123', then change the path in the http request, it'll show '123' [09:32] AcidicChip: it's like it's being cached, but it's not through the browser because I can see the console.log output going [09:36] dohtem has joined the channel [09:36] dohtem has joined the channel [09:40] jimt_ has joined the channel [09:42] AcidicChip: hummm [09:42] AcidicChip: maybe it's more of a "compile" than a "cache" [09:44] micheil: AcidicChip: require() caches based on file names [09:44] micheil: although, you shouldn't be require() on a page load, as require() is blocking. [09:45] AcidicChip: what would be an alternative to require? [09:45] micheil: fs.readFile or something [09:45] stagas has joined the channel [09:45] sveisvei has joined the channel [09:45] micheil: or just require all the files you need at startup [09:45] AcidicChip: but that won't execute the code will it? [09:45] AcidicChip: i won't know until it's requested [09:45] micheil: not if you put it in a function it won't [09:45] AcidicChip: I want it to execute the code... [09:46] micheil: so what, you don't know what all the code that's ever going to be used by the server is going to be called? [09:46] micheil: in which case, I think you have a bigger problem. [09:46] AcidicChip: I'm making apache do a mod_proxy to node.js, which is http listening on port 81 [09:46] pdelgallego has joined the channel [09:46] AcidicChip: apahce will direct the REQUEST_URI to the listening node.js [09:46] micheil: and also, in which case, you'll crash if you do a require() to a file that doesn't exist. aka, you must know what the file is called. [09:46] AcidicChip: then the node.js will parse the req.url and require the file that matches the request uri [09:47] AcidicChip: I do a try catch [09:47] AcidicChip: but regardless [09:47] micheil: then.. yeah, you'd be asking for trouble. [09:47] AcidicChip: it all works, except it's caching the file that is being required [09:47] micheil: fs and network io takes incredibly long times [09:48] AcidicChip: so http://host/bleh.js proxies http://bleh:81/bleh.js which is node.js that does a require bleh.js and bleh.js performs the res.end('response') [09:49] micheil: see: http://s3.amazonaws.com/four.livejournal/20091117/jsconf.pdf [09:49] micheil: AcidicChip: I'd call that bad architecture, but anyway. [09:49] micheil: ACTION must be off. [09:49] hellp has joined the channel [09:50] AcidicChip: micheil you're calling a piece of a structure bad architecture without seeing the rest, or knowing it's purpose? [09:50] AcidicChip: LoL [09:54] AcidicChip: Either way, it doesn't seem to be caching, because the require file's res.url output is changing along with the request, but any static console.log('abc') doesn't change unless I restart node. So it's a compilation, which is good. [09:55] rodasc has joined the channel [09:55] kawaz_home has joined the channel [09:55] ph^ has joined the channel [09:56] masahiro_ has joined the channel [09:57] yatiohi has joined the channel [09:57] zmack has joined the channel [09:57] kkaefer_ has joined the channel [09:57] jb55_ has joined the channel [09:57] Epeli has joined the channel [09:58] Heldroe_ has joined the channel [09:58] slpsys_ has joined the channel [09:58] keeran_ has joined the channel [09:58] FMJaggy has joined the channel [09:59] Spion_ has joined the channel [09:59] stagas_ has joined the channel [09:59] SvenDowideit_ has joined the channel [09:59] mcarter__ has joined the channel [09:59] EvanDotP2o has joined the channel [10:00] ysynopsis1 has joined the channel [10:00] _janne has joined the channel [10:00] frode has joined the channel [10:01] Wyverald has joined the channel [10:01] disappearedng: micheil you still around? I have a question concerning https://github.com/LearnBoost/Socket.IO-node/blob/0.6.1/example/server.js how does the var io = io.listen(server) gets connected? [10:01] BHSPitMo1kay has joined the channel [10:01] kgf has joined the channel [10:01] MrNibblesFreenod has joined the channel [10:02] irclogbot_ has joined the channel [10:03] kkaefer has joined the channel [10:03] omni5cience has joined the channel [10:04] femtooo has joined the channel [10:04] ErikCorry has joined the channel [10:05] _Utkarsh has joined the channel [10:06] s0enke has joined the channel [10:06] cognominal__ has joined the channel [10:07] slpsys has joined the channel [10:07] ysynopsis has joined the channel [10:07] micheil: AcidicChip: well, what you're describing sounds wrong, hence the reason I can say it's bad architecture [10:07] jetienne_ has joined the channel [10:07] micheil: disappearedng: .listen() calls back to node's network apis, which set up all the server and stuff. [10:08] jb55 has joined the channel [10:08] m3nt0r^aw has joined the channel [10:08] micheil: see: http://nodejs.org/docs/v0.3.1/api/net.html#net.Server [10:08] disappearedng: does that apply to 0.2.5 [10:08] micheil: it does a bunch of javascript stuff, then calls down to libev/libeio and makes a few system calls. [10:08] micheil: pretty much [10:08] maqr has joined the channel [10:10] MikhX has joined the channel [10:10] qFox has joined the channel [10:19] MikhX has joined the channel [10:23] brainproxy has joined the channel [10:28] Nohryb has joined the channel [10:29] Gruni has joined the channel [10:33] steffkes has joined the channel [10:33] disappearedng: I wrote this as a tutorial for myself, http://paste.pocoo.org/show/297114/ [+] http://paste.pocoo.org/show/297113/ [+] When I open up my browser, I am not getting any console.log from the client side (no idea why), and then when I open up chrome, I see so many connected disconnected happening on the server, why? [10:35] MrTopf has joined the channel [10:41] sriley has left the channel [10:43] CIA-54: node: 03isaacs 07master * ra52f59b 10/ (3 files in 3 dirs): Use a proper tty test. (+2564 more commits...) - http://bit.ly/eYSb0h [10:45] stonebranch has joined the channel [10:47] lmorchard has joined the channel [10:47] PyroPeter has joined the channel [10:47] alloc has joined the channel [10:50] micheil: disappearedng: because you're not connecting to a valid websocket url. [10:51] disappearedng: what do you mean? [10:51] micheil: socket.io uses it's file path to work out how to connect to the server, otherwise you need to give it a url [10:52] disappearedng: I am sorry I don't understand that statement [10:55] stagas_: is there a way to pass a function in jade's scope? [10:56] rchavik has joined the channel [10:57] saschagehlich has joined the channel [11:00] unomi has joined the channel [11:00] unomi has joined the channel [11:02] stagas_: yay there is. it's with scope: { myfunc: myfunc} and then use this.myfunc() in the view :) [11:06] matjas has joined the channel [11:07] disappearedng: micheil: but then in the example they simply called this though: [11:08] altamic has joined the channel [11:11] micheil: disappearedng: I can't really explain it, I don't know the client side of socket.io anywhere near as well as I know the node.js side of it. [11:13] disappearedng: it's ok I am heading to bed, thx for the explanation anyway you were really helpful [11:13] disappearedng: hopefully I can set up my production server tomorrow to be used in my site [11:15] zorzar has joined the channel [11:17] Nohryb_ has joined the channel [11:21] weng has joined the channel [11:21] weng: why was promises removed from node.js? [11:21] Locke23rus has joined the channel [11:21] weng: are callbacks better? [11:22] AcidicChip: node.js doesn't support binary operators? [11:22] AAA_awright: What are promises again? [11:22] AAA_awright: AcidicChip: Like what? You mean Javascript? [11:22] AAA_awright: v8: 1<<2 [11:22] v8bot: AAA_awright: 4 [11:22] AcidicChip: yea... $var1 = 0; $var2 = 1; $var3 = ($var1 || $var2); [11:23] AcidicChip: it gives me an error, lol [11:23] AcidicChip: that sux [11:23] AAA_awright: What's the error? [11:23] AcidicChip: i have to use trinarys [11:23] AAA_awright: v8: (0||1) [11:23] v8bot: AAA_awright: 1 [11:23] AcidicChip: well wait [11:23] AcidicChip: it doesn't work properly [11:23] AcidicChip: better example.... [11:24] AAA_awright: v8: var a=0, b=5; (a || b); [11:24] v8bot: AAA_awright: 5 [11:24] AAA_awright: Javascript returns the value of the one that evaluated to true [11:25] AAA_awright: Insanely useful for doing things like [11:25] AcidicChip: opts = {a: 'aye', b: 'bee'}; d = (opts.d || opts.a); [11:25] AAA_awright: v8: null || false || 0 || "This one is defined" [11:25] v8bot: AAA_awright: "This one is defined" [11:25] AcidicChip: it errors saying it can't read opts.d [11:25] AcidicChip: which no duh it cant [11:25] AcidicChip: so use opts.a [11:25] AAA_awright: Yeah you only bave b defined [11:25] AcidicChip: yea [11:25] AAA_awright: v8: opts = {a: 'aye', b: 'bee'}; d = (opts.b || opts.a); [11:25] v8bot: AAA_awright: "bee" [11:25] AcidicChip: it should just use a [11:26] AcidicChip: node.js errors [11:26] AcidicChip: let me try that exact code 1 sec [11:27] AcidicChip: ok, I narrowed it down, let me give another example [11:27] weng: anyone: http://stackoverflow.com/questions/4296505/understanding-promises-in-node-js [11:27] Nohryb_ has joined the channel [11:29] AAA_awright: weng: :-/ I would use something like Step [11:29] weng: AAA_awright: yeah .. im using asynch library .. but i would want to understand what promises are all about [11:30] AAA_awright: Step( function(){fs.readFile("file", this);}, function(fileContents){...} ); [11:30] AAA_awright: That's a pretty simple library you can find somewhere [11:30] AAA_awright: But even that is slightly more complex than just callbacks [11:30] weng: but the question is what is promise? =) [11:31] tanepipe1: oh nice: http://richardmetzler.posterous.com/using-kinnect-to-navigate-the-web-the-minorit [11:31] tanepipe1: done with Kinect + JavaScript [11:31] AAA_awright: I have no clue but https://github.com/kriszyp/node-promise claims to re-implement it [11:31] tanepipe1: Javascript talking to the Kinect [11:31] tanepipe1: that's just sexy [11:31] micheil: ACTION prefers his passchain [11:32] AcidicChip: ok, I am requiring a file, which has this... this.test = function(opts) { this.d = (opts.a || opts.b); console.log(this.d); } ..... then the main file: require('test').test({b: 'bee'}); [11:32] micheil: https://gist.github.com/718845 [11:32] micheil: AcidicChip: s/this/export/ [11:33] AcidicChip: ? [11:33] AAA_awright: v8: undefined||notAVariable||false||0||2 [11:33] v8bot: AAA_awright: ReferenceError: notAVariable is not defined [11:33] AcidicChip: there you go [11:33] AAA_awright: var a={}; undefined||a.notAVariable||false||0||2; [11:33] AAA_awright: v8: var a={}; undefined||a.notAVariable||false||0||2; [11:33] v8bot: AAA_awright: 2 [11:34] AAA_awright: BUT [11:34] AAA_awright: v8: var a=undefined; undefined||a.notAVariable||false||0||2; [11:34] micheil: AcidicChip: rather then doing: this.test it should be export.test [11:34] v8bot: AAA_awright: TypeError: Cannot read property 'notAVariable' of undefined [11:34] AcidicChip: well it says Cannot read property 'a' of undefined [11:34] AcidicChip: yea that's the one [11:34] AAA_awright: AcidicChip: You have to make sure a!==undefined before you try and access it [11:34] micheil: it should be a&&a.notAVar [11:34] AcidicChip: but it's this [11:34] AcidicChip: this is te function [11:34] AcidicChip: i mean [11:34] AAA_awright: Or that, if you don't care about the test return value [11:35] AAA_awright: well [11:35] micheil: if you want to get access to a method in one file, from another you must export it. [11:35] AAA_awright: Huh that works [11:35] AAA_awright: v8: var a=undefined; undefined||(a&&a.notAVariable)||false||0||2; [11:35] v8bot: AAA_awright: 2 [11:35] AAA_awright: OR [11:35] AAA_awright: v8: var a={}; undefined||(a&&a.notAVariable)||false||0||2; [11:35] v8bot: AAA_awright: 2 [11:35] AAA_awright: v8: var a={notAVariable:"defined"}; undefined||(a&&a.notAVariable)||false||0||2; [11:35] v8bot: AAA_awright: "defined" [11:35] AAA_awright: Ta-da [11:36] AAA_awright: I didn't know that worked with && too [11:36] AcidicChip: opts is being passed into the function [11:36] micheil: v8: var a={notAVariable:"defined"}; undefined||a&&a.notAVariable||false||0||2; [11:36] v8bot: micheil: "defined" [11:36] stagas_: tanepipe1: wow nice :) I wonder how the api's going to be [11:36] micheil: v8: var a; undefined||a&&a.notAVariable||false||0||2; [11:36] v8bot: micheil: 2 [11:36] micheil: operator precedence ftw. [11:36] AcidicChip: ready to listen closer? [11:36] AAA_awright: It gives it a little bit of whitespace, I prefer () micheil [11:37] micheil: AAA_awright: just sayin' [11:37] AAA_awright: Touche [11:37] AAA_awright: AcidicChip: Yeah? [11:37] AcidicChip: file index.js - require('./test.js').test({b: 'bee'}); [11:37] AcidicChip: file test.js - this.test = function(opts) { this.d = (opts.a || opts.b); console.log(this.d); } [11:37] AcidicChip: try that [11:38] AAA_awright: Don't you need exports.test ? [11:38] AAA_awright: Also, this implies a "new" [11:38] AAA_awright: Also, "this" implies a "new" [11:39] AcidicChip: The module circle.js has exported the functions area() and circumference(). To export an object, add to the special exports object. (Alternatively, one can use this instead of exports.) [11:39] micheil: AAA_awright: it's adviced, I believe this in this case is actually getting set by something like .apply() [11:39] AAA_awright: True [11:40] AcidicChip: this == exports [11:40] okuryu has joined the channel [11:40] AcidicChip: no? [11:40] AAA_awright: Oh really, you can use "this"? [11:40] AcidicChip: http://nodejs.org/docs/v0.3.1/api/modules.html#standard_Modules [11:40] micheil: this doesn't always equal exports [11:40] AAA_awright: I don't remember seeing that looking in the source code, probably some Javascript voodoo [11:40] AcidicChip: im just following what the doc says [11:41] AAA_awright: v8: (function(opts) { this.d = (opts.a || opts.b); console.log(this.d); })({b: 'bee'}); [11:41] v8bot: AAA_awright: CONSOLE: ["bee"], OUTPUT: undefined [11:41] micheil: read through https://github.com/ry/node/blob/master/src/node.js#L297 [11:41] AcidicChip: so nodejs.org is not updated? [11:41] AAA_awright: The contents of the function looks good [11:41] micheil: it's safer to use exports over this [11:41] AAA_awright: Maybe it's your usage of 'this' versus 'exports' [11:41] micheil: plus people then know wtf you're talking about. [11:41] AAA_awright: ^ [11:42] micheil: while you can do it, doesn't mean you should do it. [11:42] AcidicChip: if you shouldn't do it, than you shouldn't be able to [11:42] AAA_awright: Well, later folks [11:42] AcidicChip: if you're able to do something, you're able to for a reason [11:42] AcidicChip: :P [11:43] AcidicChip: ok, I'll tinker with exports [11:43] AcidicChip: lol [11:43] AcidicChip: wait [11:43] AcidicChip: exports wont do any good [11:44] AcidicChip: the issue is with opts.b [11:44] Gruni has joined the channel [11:44] AcidicChip: not with this [11:44] AcidicChip: I'm going to have to pastebin this to get it clear [11:46] AcidicChip: actually, better yet, I shall just sleep it off and try again in the morning [11:46] AcidicChip: g'night [11:48] Nohryb has joined the channel [11:49] AcidicChip: lol, I'mma tard [11:49] AcidicChip: and now I'm officially off to bed, lol [11:53] nsolsen has joined the channel [11:54] bnoordhuis_ has joined the channel [12:04] ph^ has joined the channel [12:08] Utkarsh has joined the channel [12:08] Nohryb_ has joined the channel [12:12] Nohryb_ has joined the channel [12:15] _mythz has joined the channel [12:16] Nohryb_ has joined the channel [12:18] markwubben has joined the channel [12:22] Nohryb_ has joined the channel [12:25] Ond has joined the channel [12:28] rcy has joined the channel [12:30] Nohryb_ has joined the channel [12:32] Ond: Anyone played with Zappa? It's unclear to me how to pass an array of excepted session ID's to the broadcast method, when using their socket.io implementation. [12:34] Nohryb has joined the channel [12:38] cheney has joined the channel [12:40] Nohryb_ has joined the channel [12:42] markwubben has joined the channel [12:43] unomi has joined the channel [12:44] Nohryb_ has joined the channel [12:44] cheney: how can post data be passed to a static javascript file for execution? [12:45] cheney: i am attempting to take a client-side application written in JavaScript an move it to the server, which means the file will need access to post data in place of DOM access [12:49] micheil: no holowaychuk? :( [12:50] herbySk has joined the channel [12:51] siculars has joined the channel [12:52] maru_cc has joined the channel [12:58] Nohryb_ has joined the channel [13:00] Nohryb__ has joined the channel [13:02] stonebranch has joined the channel [13:03] stonebranch has joined the channel [13:03] charlenopires has joined the channel [13:04] faust45 has joined the channel [13:04] Nohryb has joined the channel [13:09] spetrea_ has joined the channel [13:11] markwubben has joined the channel [13:15] MrTopf has joined the channel [13:15] oal has joined the channel [13:16] cheney has left the channel [13:16] ewdafa has joined the channel [13:17] linnk has joined the channel [13:22] slaskis has joined the channel [13:23] tisba has joined the channel [13:25] delapouite has joined the channel [13:27] and has joined the channel [13:31] vdrab has joined the channel [13:32] rchavik has joined the channel [13:32] ErikCorry: I downloaded and built node. [13:33] ErikCorry: Now I want to make an addon in C++ [13:33] ErikCorry: So I thought I'd install the postgres one first to see how these things work. [13:33] ErikCorry: But that fails because node-waf can't find js2c [13:33] skampler has joined the channel [13:34] ErikCorry: Which sort of makes sense because js2c.py hasn't been installed anywhere in /usr/local where the other stuff has been installed. [13:35] ErikCorry: Anyone have any ideas. [13:35] micheil: nup, sorry [13:35] micheil: try the mailing list [13:35] ErikCorry: Should the install process be putting js2c.py somewhere? [13:36] and: Hi there, anyboody has some experience with Mongoose (https://github.com/LearnBoost/) [13:36] and: ? [13:37] ErikCorry: I wish I understood how Python is supposed to find its libraries. [13:37] micheil: ErikCorry: possibly, I'm not sure [13:38] shripadk has joined the channel [13:38] shripadk: process.memoryUsage() reports RSS, VSIZE in bytes? [13:39] micheil: yes [13:39] shripadk: micheil: thanks :) [13:40] mikedeboer has joined the channel [13:40] skampler: ErikCorry: you can modify the wscript file if you want to include locally installed things [13:40] _mql has joined the channel [13:49] mbrochh has joined the channel [13:50] hoffa has joined the channel [13:51] matjas has joined the channel [13:54] ErikCorry: skampler: I'll try that. Seems like make install should do what is necessary so that npm install postgres can work, [13:59] matjas_ has joined the channel [14:00] matjas has joined the channel [14:03] Wyverald has joined the channel [14:06] stagas has joined the channel [14:07] stephank has joined the channel [14:08] matjas_ has joined the channel [14:09] MattJ has joined the channel [14:12] matjas has joined the channel [14:12] jvolkman has joined the channel [14:13] MrTopf has joined the channel [14:13] HerrTopf has joined the channel [14:17] ooooPssss has joined the channel [14:19] disqk has joined the channel [14:19] qFxo has joined the channel [14:20] vineyard has joined the channel [14:20] MaSch has joined the channel [14:21] WaterCoo1ed has joined the channel [14:23] bradleymeck has joined the channel [14:27] [[zz]] has joined the channel [14:29] ph^ has joined the channel [14:33] micheil_mbp has joined the channel [14:35] disqk has joined the channel [14:40] [[zz]] has joined the channel [14:41] hoffa has joined the channel [14:43] Gruni has joined the channel [14:44] cloudhead has joined the channel [14:44] mraleph has joined the channel [14:49] stagas: can anyone test this because here it's leaking memory like crazy: https://gist.github.com/718990 [14:50] stagas: 'npm install github' first [14:57] xla has joined the channel [15:06] mattcodes has joined the channel [15:10] shripadk: stagas: Object [object Object] has no method 'getRepoLanguages' ? [15:12] stagas: shripadk: did you get the latest version from npm? try getRepoTags [15:12] shripadk: github@0.0.3 ? [15:12] stagas: any request will do it. it has a memory leak for sure. I'm using request for now [15:12] shripadk: ok will try getRepoTags [15:13] MrTopf has joined the channel [15:14] stagas: it's like the entire module object is being cloned into memory on every request, but never cleaned by the gc [15:14] unomi: can you make it oom? [15:15] unomi: can you make it crash with out of memory? [15:15] stagas: unomi: yeah it crashes after 500mb [15:16] stagas: but you have to wait because you don't want to attack the github api, it has a 60req/m limit [15:16] shripadk: how long will it take to reach 500mb? [15:17] stagas: a few minutes [15:17] stagas: but the point is it shouldn't leak at all :) [15:18] stagas: the code is weird I tried spotting the leak but I couldn't figure it out [15:18] stagas: it doesn't have to do with the response at all [15:20] shripadk: yeah the vsize is constant [15:20] shripadk: vsize: 639795200 [15:20] shripadk: doesn't change for quite a few requests [15:20] shripadk: its not getting gc [15:22] ErikCorry2 has joined the channel [15:23] MrTopf has joined the channel [15:25] jamescarr has joined the channel [15:25] hoffa has joined the channel [15:26] Naked has joined the channel [15:26] boaz has joined the channel [15:29] stagas: yay my app is now 14mb constant after switching to mikeal's request :) [15:31] tomtaylor has joined the channel [15:31] tomtaylor: hi all - does anyone have experience of building node.js on Windows (Cygwin)? [15:32] Naked has joined the channel [15:37] masahiroh has joined the channel [15:37] zemanel has joined the channel [15:40] Spion__ has joined the channel [15:40] stagas: tomtaylor: yea [15:40] confoocious has joined the channel [15:41] Naked has joined the channel [15:41] tomtaylor: stagas: just managed to fix it actually - it was throwing all sorts of dll errors until i did a rebaseall [15:42] tomtaylor: and then i had to patch rebaseall because of a problem with tmpdir... *sigh* [15:42] tomtaylor: seems to be building now (thanks anyway!) [15:43] gnrfan has joined the channel [15:44] liar has joined the channel [15:45] MattDiPasquale has joined the channel [15:45] hoffa has joined the channel [15:48] Anti-X has joined the channel [15:49] Draggor has joined the channel [15:53] jchris has joined the channel [15:55] sepehr has joined the channel [15:56] matjas has joined the channel [15:56] dnolen has joined the channel [15:57] boaz has joined the channel [16:05] mbrochh has joined the channel [16:09] ysynopsis1 has joined the channel [16:12] confoocious has joined the channel [16:12] confoocious has joined the channel [16:19] ysynopsis has joined the channel [16:22] hornairs has joined the channel [16:24] chrischris has joined the channel [16:24] aliem has joined the channel [16:24] programble has joined the channel [16:25] jchris has joined the channel [16:27] rchavik has joined the channel [16:28] mattcodes has joined the channel [16:28] boaz has joined the channel [16:33] jchris has joined the channel [16:34] huh has joined the channel [16:36] and has joined the channel [16:39] masahiroh has joined the channel [16:40] tisba has joined the channel [16:44] tisba has joined the channel [16:45] losing has joined the channel [16:48] cjmFloating has joined the channel [16:49] shripadk: do idling clients disconnect after a while in socket.io? [16:51] altamic has joined the channel [16:54] Anti-X: no [16:55] Anti-X: at least they shouldn't [16:56] shripadk: it does after leaving it inactive for at least 25-30 mins [16:56] bentruyman has joined the channel [16:56] tomtaylor: which browser, over which transport? [16:56] shripadk: websocket... chrome [16:57] tomtaylor: might be worth sending a keep-alive packet, every now and again [16:57] Anti-X: socket.io sends heartbeats [16:57] Anti-X: so it's never actually idle [16:57] shripadk: then it is a bug probably [16:58] shripadk: anyone ran a benchmark on socket.io to see how it performs? [16:59] swistak has joined the channel [16:59] Anti-X: the bugs usually happen in very specific circumstances [16:59] Chepra has joined the channel [16:59] Anti-X: and any benchmark wouldn't pick those up [17:00] Anti-X: and it could possibly introduce new ones [17:00] Chepra: Hello, anyone using a pg driver for Node.js? Is there support for LISTEN/NOTIFY? [17:01] shripadk: yeah. forked wsbench and created connections continually. i could reach 7k active connections depending on how fast the connections took place.. [17:02] ErikCorry: Hi [17:02] ErikCorry: I want to do ioctls from node. [17:02] Anti-X: well in the case of random disconnect bugs, it's not about number of connections [17:02] ErikCorry: They don't block, honest! [17:02] ErikCorry: Do I have to make a C++ addon to do that? [17:02] tisba has joined the channel [17:02] ErikCorry: I suspect I do. [17:02] Anti-X: yes [17:02] Anti-X: if ioctls means what i think it does [17:03] Anti-X: HID? [17:03] shripadk: if i added an interval of say few seconds between connections it starts dropping very early... at around 30-40 connections or so... [17:03] ErikCorry: It's a syscall on a device. [17:03] Anti-X: yeah i/o-controls [17:03] Anti-X: ioctls [17:03] ErikCorry: HID [17:03] ErikCorry: Human-interface? [17:04] Anti-X: +device [17:04] ErikCorry: I don't want any nasty humans using my nice node server! [17:04] ErikCorry: I'd like to talk to a DVB-t adapter. [17:04] ErikCorry: I'd like my node server to talk to one, rather :-= [17:04] ErikCorry: :-) [17:04] shripadk: are there memory leaks in socket.io? [17:04] Anti-X: no [17:04] Anti-X: socket.io doesn't do c++ [17:05] mjr_: ErikCorry: you'll need to do C++ for that [17:05] mjr_: ErikCorry: although, if you can come up with a generic JS->ioctl binding, it might be a useful thing to have in node. [17:05] shripadk: ok! so its just random disconnections then? [17:05] Anti-X: it's probably browser bugs [17:05] shripadk: gotcha :) [17:06] Anti-X: also some browsers don't like too many connections to the same server [17:06] Anti-X: so it could be a test environment bug [17:06] shripadk: true! [17:07] Anti-X: especially when it comes to other transports than websocket [17:08] shripadk: Just keep getting "Couldnf find client with session id " [17:08] Anti-X: yeah that's because the client keeps trying to reconnect with the session id it got earlier [17:09] Anti-X: did you restart the node server? [17:09] noahcampbell has joined the channel [17:09] shripadk: i will now... [17:09] shripadk: probably because it tries first with xhr-polling? [17:09] Anti-X: it does? [17:09] shripadk: on older browsers [17:09] shripadk: safari for instance [17:10] shripadk: before it tries to connect with flashsocket it tries xhr-polling [17:10] shripadk: weird... [17:10] shripadk: cleared my cookies too [17:10] Anti-X: it doesn't use cookies atm i think [17:11] shripadk: yeah? i thought it did... store the transport in cookie. read somewhere! how does it remember the transport then? [17:11] Anti-X: well it's on the same page [17:11] Anti-X: if you reload the page it gets a new one [17:11] masahiroh has joined the channel [17:12] Anti-X: if you want multiple windows/tabs to be uniquely identified, you need to add another layer to it [17:12] Anti-X: i did that once [17:12] Anti-X: uniquely identified as one person i mean [17:12] shripadk: is it not uniquely identified with the sessionId? [17:12] shripadk: oh... i use connect sessions to uniquely identify [17:13] Anti-X: it creates a new ID for each tab [17:13] shripadk: redis session storage [17:13] Anti-X: ok [17:13] shripadk: i use a weird hack [17:13] shripadk: expose the session as a dynamicHelper in express [17:13] shripadk: and fetch it using client.listener.server.viewHelpers [17:13] shripadk: :P [17:14] shripadk: it says so here: https://github.com/LearnBoost/Socket.IO [17:15] shripadk: that it uses cookie to remember the transport [17:15] marshall_law has joined the channel [17:20] Tidwell has joined the channel [17:28] nooder: v8 +Date [17:28] v8bot: nooder: v8 is no longer supported (except in PM). Try v8: or v8> [17:28] nooder: v8: +Date [17:28] v8bot: nooder: NaN [17:28] nooder: hm [17:28] nooder: v8: +Date() [17:28] v8bot: nooder: NaN [17:29] nooder: where is magic :( [17:29] matjas has joined the channel [17:30] Anti-X: shripadk, i know it says that.. but it definately doesn't [17:30] hornairs has joined the channel [17:30] stride: nooder: +(new Date()) (drop the () if you please) [17:31] shripadk: Anti-X: ok :) [17:31] Anti-X: oh transport [17:31] Anti-X: i was thinking id [17:31] Anti-X: i'll find out [17:31] Anti-X: sec [17:32] Anti-X: oh it does [17:32] chapel: hmm, what would be the best way to handle picking a random item out of an array? [17:32] chapel: just needs to be quick, doesn't need to be super random [17:33] shripadk: Anti-X: yeah! and the worst part. it registers more than one transport [17:33] chapel: should I just use rand or whatever [17:33] shripadk: so i have xhr-polling, xhr-multipart and flashsocket! [17:33] shripadk: weird... [17:33] Anti-X: chapel: arr[Math.round(Math.random()*(arr.length-1))] [17:34] chapel: ah [17:34] chapel: :) [17:34] chapel: thanks [17:34] Anti-X: it uses random, so it's not exactly random [17:34] shripadk: its connecting via flashsocket and then disconnects and reconnects via xhr-polling [17:34] chapel: well [17:35] chapel: its for a simple thing [17:35] nooder: stride thx! [17:35] chapel: just picks a random url to show out of a small list of urls [17:36] bartt has joined the channel [17:36] shaver: SubStack: you are a god among men [17:36] MattJ: array[4] [17:36] MattJ: ^ random [17:36] shaver: mjr_: node_redis pipelines, right? [17:36] Anti-X: i saw a dailywtf where someone IN A COMPANY actually made a random name function that returned 'Hans' or something [17:37] Anti-X: in all sincerity [17:37] cagdas has joined the channel [17:37] matjas has joined the channel [17:39] nooder: which brackets is better to use for strings? ' or "? [17:40] Anti-X: for html, use ', because then you have " available for tags [17:40] Anti-X: for text, use ", because then you don't have to escape ' in can't [17:40] Anti-X: however i use ' always, and just escape the random ' in text [17:41] nooder: ok [17:41] Anti-X: it's better to be consistent at least [17:42] Anti-X: omg someone in an ad just said 'http://' [17:42] jchris has joined the channel [17:42] Anti-X: as if the last decade never happened [17:45] mif86 has joined the channel [17:46] jperras has joined the channel [17:49] gf3 has joined the channel [17:56] zorzar: is there something like python's struct.pack and struct.unpack in js/node? [17:58] Anti-X has joined the channel [17:59] quirkey has joined the channel [18:00] MattDiPasquale has joined the channel [18:00] indutny has joined the channel [18:01] SamuraiJack has joined the channel [18:01] shripadk has left the channel [18:01] indutny: hey everyone! [18:01] indutny: ryah: are you here? [18:02] yozlet has joined the channel [18:03] ossareh has joined the channel [18:05] bradleymeck has joined the channel [18:05] jakehow has joined the channel [18:07] boaz has joined the channel [18:09] mjr_ has joined the channel [18:11] boaz has joined the channel [18:12] ryah: i am [18:12] yozlet has joined the channel [18:12] ryah: indutny: [18:13] nooder: zorzar json? :) [18:18] Me1000 has joined the channel [18:19] pietern has joined the channel [18:19] johngbrooks has joined the channel [18:20] naturalethic has joined the channel [18:22] roberthahn has joined the channel [18:22] indutny: ryah: sorry, I was afk [18:23] indutny: I've created pull request [18:23] indutny: about event propagation [18:24] indutny: https://github.com/ry/node/pull/460 [18:24] indutny: that's it [18:26] indutny: just wanted to mention about it :) [18:26] indutny: have you seen it? [18:28] ryah: indutny: nope - looking [18:28] eml has joined the channel [18:30] indutny: ok [18:31] mjr_: shaver: node_redis pipelines like crazy [18:33] o_o has joined the channel [18:36] ryah: indutny: i'll get back to you tomorrow [18:37] indutny: ok [18:37] indutny: np [18:38] saschagehlich has joined the channel [18:39] ysynopsis has joined the channel [18:49] roberthahn: hi everybody! [18:49] roberthahn: anyone with npm experience here? [18:50] rchavik has joined the channel [18:51] SubStack: roberthahn: faster to just suppose that there is [18:51] roberthahn: I'm about to publish some code to npm that's under version control (git) and it's not clear to me whether npm publish would publish the .git and .gitignore files as part of the package - if so, then i should probably do a git archive, right (I'm new to both git & npm) [18:52] roberthahn: heh, thx SubStack [18:52] SubStack: npm ignores .git by default [18:53] roberthahn: alright, cool. Unrelated to that - is there a way to set up an internal npm server? say, within a corporate network - that way a dev team can run npm install on our private libraries, but they're not available to the outside world? [18:56] jgautier has joined the channel [18:56] jgautier: anyone here used the connect compiler in express? [18:56] _mql: Just released Data.js 0.1.0, – a library for dealing with data in javascript… http://github.com/michael/data … i'm using it on the client-side yet, but it may be useful within Node.js too. [18:58] killfill has joined the channel [19:00] boaz has joined the channel [19:02] stonebranch has joined the channel [19:03] killfill has joined the channel [19:03] _mql: ryah: Would you see Data.js fit for the node modules page? — not sure... [19:07] aconbere has joined the channel [19:07] samfalkner has joined the channel [19:10] Aria has joined the channel [19:12] saschagehlich_ has joined the channel [19:13] roberthahn: argh. feeling stuck here. I thought i reviewed the steps carefully on how to publish code to npm, but when trying to actually publish, i get a "Error: forbidden user: null not authorized to modify" [19:13] zorzar: nooder: json isn't a binary format [19:13] coobr has joined the channel [19:13] roberthahn: this is happening after I called node adduser… [19:14] jgautier: anyone have an idea why my less files wouldnt be compiling? im using this line for express [19:14] jgautier: app.use(express.compiler({ src: __dirname + '/less', dest: __dirname+'/public/style', enable: ['less'] })); [19:15] killfill has joined the channel [19:15] nooder: zorzar, why you need binary? js is not for binary. there is smaller realizations then json [19:19] phidelta has joined the channel [19:20] zorzar: nooder: if i fant to implement a binary protocol i need binary [19:20] nooder: good luck :)) [19:21] zorzar: nooder: what do you think are the big problems? [19:23] nooder: zorzar, biggest problem is that buffer api is very pure and complicated. you can look for binary tools. that might help [19:24] bpadalin_ has joined the channel [19:24] heap has joined the channel [19:27] killfill has joined the channel [19:29] ph^ has joined the channel [19:30] bradleymeck has joined the channel [19:30] Nevtus has joined the channel [19:30] Nevtus has joined the channel [19:30] noahcampbell has joined the channel [19:31] zorzar: nooder: ok i'll try it [19:32] chapel: hmm [19:32] matjas has joined the channel [19:32] chapel: any of the nodejitsu guys here? [19:34] masahiro_ has joined the channel [19:37] Marcosc has joined the channel [19:41] InsDel has joined the channel [19:42] ehaas has joined the channel [19:42] Marcosc: hi, I'm wondering if anyone can help me with getting the HTML5 parser to work? I installed it using npm, but when I run the example from the git page and try "console.log(window)" I get undefined? [19:43] Marcosc: s/console.log(window)/console.log(window.document)/ [19:44] Marcosc: seems like something is wrong with jsdom, because when I try jsdom(""), it throws TypeError: object is not a function at Object.CALL_NON_FUNCTION (native) [19:46] Ezku\ has joined the channel [19:48] isaacs has joined the channel [19:48] MrTopf has joined the channel [19:48] vineyard has joined the channel [19:49] roberthahn: isaacs: have you got a minute to help me debug a problem i'm having with npm publish? [19:50] isaacs: sure [19:50] isaacs: what's up? [19:50] roberthahn: i'm getting an error sending version data; the next line says "error: forbidden user: null not authorized to modify NormAndVal: NormAndVal/0.0.2" [19:51] roberthahn: i did read your howto and did all the steps [19:51] roberthahn: ie: node install . and node adduser [19:51] roberthahn: i see that I'm in the registry at npmjs.org [19:52] roberthahn: and in my package.json, the value of "version" is "0.0.2" [19:54] samfalkner has joined the channel [19:55] MattDiPasquale has joined the channel [19:57] dylang has joined the channel [19:57] vineyard has joined the channel [19:59] naturalethic: Why is Math.pow(2, 63) giving 9223372036854776000 when it should be 9223372036854775808 [19:59] bpadalino: because a float can't accurately represent that number ? [20:00] ehaas: javascript only has 53 bit integers [20:00] isaacs: roberthahn: did npm adduser work? [20:01] roberthahn: i thought it did; it was something i did 2-3 days ago before turning in for the night, so i don't have any logs for that. Still, when i ran npm config ls i see all the settings for me in place [20:02] isaacs: what's your username? [20:02] roberthahn: roberthahn [20:02] isaacs: and `npm config get username` shows that? [20:02] roberthahn: yes it does [20:03] roberthahn: i'm good with removing and re-adding the user if you think that'll help… [20:03] roberthahn: but it looks like a removeuser command isn't present :) [20:04] isaacs: just running adduser again would do that [20:04] isaacs: it won't remove and re-add but it'd re-check the auth [20:05] sirevanhaas has joined the channel [20:06] mraleph: v8: Math.pow(2, 63) [20:06] isaacs: roberthahn: i just created a new test user account, and published a test package. [20:06] v8bot: mraleph: 9223372036854776000 [20:06] isaacs: roberthahn: can you try publishing again? [20:06] isaacs: roberthahn: it almost looks from that error message like your user data didn't get passed to couchdb [20:07] everyone has joined the channel [20:07] isaacs: micheil: you around? [20:07] naturalethic: 63 bit integers great [20:07] roberthahn: isaacs: i re-ran npm publish, same error. i ran npm adduser and got an error: Error: forbidden You may only update your own user document [20:07] isaacs: hm [20:08] isaacs: ok... so it thinks you're not you [20:08] weng: isaacs: ive got a problem [20:08] isaacs: roberthahn: move the .npmrc file away, and run adduser again, supplying the same username, password, and email address [20:08] isaacs: weng: what's up? [20:08] stagas has joined the channel [20:09] mraleph: naturalethic: weird... looks like a bug to me. I would expect powers of 2 to be represented precisely upto 2^1023 [20:09] weng: so inside a npm i can fetch modules with require("app/module1"), require("app/module2"), but also require("app") right... the problem is that i want to be able to fetch module1 and module2 but also run a common code before that exists in app [20:10] naturalethic: mraleph: i think i recall that all numbers in js are floats internally, as bpadalino said [20:10] weng: isaacs: cause if i fetch require("app/module1") and require("app/module2") directly i cannot run any code before right? [20:10] isaacs: weng: you can run other code before. [20:10] weng: how? [20:10] isaacs: doSomething() ; r = require("foo") <-- that's fine [20:10] roberthahn: isaacs: got a 403 error - could not create user :( [20:10] weng: aha [20:10] weng: hmm [20:10] isaacs: roberthahn: hmm.... [20:11] mraleph: naturalethic: that is true, all numbers are doubles internally. double has a 11 bit exponent, so as I said I would expect precise representation of powers of 2 upto 2^1023 [20:11] weng: i guess i can have some code at the beginning in module1 and module2 running a code in app [20:12] weng: so when i require them the common code will be run initally [20:12] isaacs: roberthahn: ok, lemme delete the user account, and then you can try again. most likely you're not entering the same password [20:12] isaacs: roberthahn: also, what version of npm? [20:12] roberthahn: thanks, isaacs; the version i'm running is 0.1.27-12 [20:12] breccan has joined the channel [20:12] naturalethic: mraleph: not in 64 bits [20:12] isaacs: roberthahn: aha! npm update npm [20:12] isaacs: roberthahn: that should solve it, actually. [20:13] roberthahn: oh, ok [20:13] isaacs: i'm gonna not trash your user acct [20:13] isaacs: let's see if updating npm makes it work [20:14] zomgbie has joined the channel [20:14] roberthahn: i updated, restored my previous .npmrc file, ran npm publish and got the forbidden user error, isaacs [20:15] mraleph: naturalethic: double is a floating point type, number is represented as a sign * mantisa * 2 ^ exp, 1 bit for sign, 11 for exponent and rest of 52 bit for mantissa, 2^63 = +1 * 2^63. there is more than enough bits in double to represent this. [20:15] isaacs: ok [20:15] isaacs: roberthahn: what's the package name again? try moving away the .npmrc file and doing adduser again. [20:16] roberthahn: isaacs: hang on. i scrolled back and realized npm update did NOT work. let me look into that. sorry… [20:16] isaacs: oh, NormAndVal [20:16] roberthahn: isaacs: ok, got the update working. will try to republish again [20:17] isaacs: kewl [20:17] isaacs: if publish fails: move away the .npmrc and do adduser again. it should work [20:17] weng: isaacs: cant npm install github repos directly? [20:17] roberthahn: *rolls eyes* ok, now i lost the npm command [20:17] isaacs: weng: it can [20:17] isaacs: roberthahn: npm adduser [20:17] weng: isaacs: npm link? [20:18] weng: oh .. npm install ? [20:18] roberthahn: isaacs: no, npm itself seems to not exist :P bizarre [20:21] Mikushi2 has joined the channel [20:21] ysynopsis1 has joined the channel [20:22] EvanDotPro has joined the channel [20:22] maru_cc_ has joined the channel [20:22] rodasc has joined the channel [20:22] eee_c has joined the channel [20:22] o_o has joined the channel [20:22] isaacs: weng: sure, that, or: npm install https://github.com/marak/say.js/tarball/master/ [20:22] isaacs: weng: npm install can take a folder, a tarball containing a folder, a url to a tarball, or a name/version that resolves to a url, or a name/tag that resolves to a version, or just a name with a default tag of "latest" [20:22] maru_cc_ has joined the channel [20:22] cainus__ has joined the channel [20:22] bpadalino: mraleph: are you sure it's a double and not a float? i was under the impression they were 32-bit floats [20:22] weng: isaacs: damn [20:22] bpadalino: not 64-bit doubles [20:22] weng: great job [20:23] deoxxa has joined the channel [20:23] programble has joined the channel [20:23] isaacs: weng: not github per se, but any tarball [20:23] hdon has joined the channel [20:23] isaacs: it's just that github gives you a handy url for repo tarballs [20:23] mraleph: bpadalino: I am sure. [20:23] weng: isaacs: not zipball? [20:23] isaacs: weng [20:23] isaacs: weng: no [20:23] weng: https://github.com/marak/say.js/zipball/master/ [20:23] weng: okay [20:23] isaacs: gzipped tarball [20:23] weng: ok [20:24] confoocious has joined the channel [20:24] confoocious has joined the channel [20:24] naturalethic: bpadalino 64 bit [20:25] roberthahn: isaacs: I had installed node as root (and then used sudo to install npm) the first time. i'm taking a few minutes to clean up and set up node in $HOME (your option 2) [20:25] isaacs: roberthahn: does "npm@0.1.27-12" exist? [20:25] isaacs: ah, kewl; [20:25] weng: isaacs: so you set the dependencies in package.json .. is there a way to install them automatically when i run the package without having to install them manually? [20:26] isaacs: weng: if your package.json has a dependency hash, then they'll be installed automatically when you install (or link) the package [20:26] isaacs: weng: you can also use `npm bundle` to put the dependencies in the package itself [20:26] weng: isaacs: i wanna hug you=) [20:27] isaacs: hahah [20:28] yozlet has joined the channel [20:30] nolkyan has joined the channel [20:30] Draggor has joined the channel [20:31] Nohryb has joined the channel [20:32] petercooper has joined the channel [20:32] mraleph: v8: Math.pow(2, 63).toFixed(0) [20:32] v8bot: mraleph: "9223372036854775808" [20:32] matjas has joined the channel [20:32] mraleph: it's magic [20:33] naturalethic: wtf [20:33] fangel has joined the channel [20:33] isaacs: v8: Math.pow(2, 65).toFixed(0) [20:33] v8bot: isaacs: "36893488147419103232" [20:33] isaacs: v8: Math.pow(2, 165).toFixed(0) [20:33] v8bot: isaacs: "4.6768052394588893e+49" [20:33] isaacs: v8: Math.pow(2, 127).toFixed(0) [20:33] v8bot: isaacs: "1.7014118346046923e+38" [20:33] mraleph: double -> string conversion is defined in a very special way [20:33] isaacs: v8: Math.pow(2, 80).toFixed(0) [20:33] v8bot: isaacs: "1.2089258196146292e+24" [20:33] isaacs: v8: Math.pow(2, 70).toFixed(0) [20:33] v8bot: isaacs: "1.1805916207174113e+21" [20:33] mraleph: isaacs: 2^80 is too much [20:33] isaacs: v8: Math.pow(2, 67).toFixed(0) [20:33] v8bot: isaacs: "147573952589676412928" [20:34] isaacs: v8: Math.pow(2, 69).toFixed(0) [20:34] v8bot: isaacs: "590295810358705651712" [20:34] mraleph: toFixed works upto 2^69 [20:34] lakin has joined the channel [20:34] isaacs: neat [20:34] isaacs: v8: Math.pow(2, 69).toFixed(1) [20:34] v8bot: isaacs: "590295810358705651712.0" [20:34] mraleph: or strictly speaking up to 10^21 [20:35] bpadalino: weird [20:35] mraleph: it's doubles for you =) [20:36] bpadalino: i stay fixed point .. i don't need that much dynamic range usually [20:36] naturalethic: how exactly can it represent larger than 2^64 in 8 bytes? [20:37] mraleph: naturalethic: I told you how. http://en.wikipedia.org/wiki/Double_precision_floating-point_format <- read this [20:37] naturalethic: anyway, that's returning a string -- useless! [20:37] naturalethic: mraleph: there is no way to put more than 2^64 bits of information in 64 bits, i know that much [20:38] naturalethic: s/bits of information/values/ [20:39] bpadalino: eh, what's a couple digits between friends .. [20:39] bpadalino: in the grand scheme of things - it's close enough for government work [20:39] ehaas: naturalethic: you're assuming it can represent every integer in that range [20:39] mraleph: naturalethic: you are right of course. that why it prints some strange value when you do standard double to string conversion. [20:40] Yuffster has joined the channel [20:40] mraleph: but format is design in such a way that it is capable of representing powers of 2 up to certain boundary precisely. [20:40] naturalethic: right, well this is interesting anyway, i'm working on a library to represent numbers as node buffers (among other things), and no i know there is no true 64 bit int, and I should be doing float math [20:41] naturalethic: mraleph: oh i get what you're saying [20:41] ehaas: naturalethic: instead of that, why don't you make libgmp bindings [20:41] samfalkner has joined the channel [20:42] heavysixer has joined the channel [20:42] mraleph: naturalethic: ah. for this purpose I am afraid you can't use numbers. unless you split 64bit integer into two parts (each less then 53 bits). [20:42] roberthahn: isaacs: still here? I've got node 0.2.4 & npm 0.2.10 installed, and got my npm command back. [20:42] naturalethic: ehass: 1) i don't want to have a build dependency (yet), 2) don't need to do math on these, just pack them [20:43] isaacs: roberthahn: i'm heading out for a few minutes. be back in a bit. leave a message here or in pm. [20:43] ehaas: i see [20:43] roberthahn: isaacs: i tried moving my original .npmrc away and running npm adduser, it failed with the 403. then i moved it back and tried npm publish. also no luck [20:43] roberthahn: so perhaps, isaacs we can delete the roberthahn acct on the server and i'll try again from scratch? [20:43] isaacs: sure [20:43] isaacs: just a second [20:44] roberthahn: isaacs: you're awesome. thanks so much for taking the time to help [20:44] isaacs: roberthahn: ok, try now [20:44] isaacs: adduser should work [20:44] femtoo has joined the channel [20:45] sh1mmer has joined the channel [20:46] roberthahn: adduser does work, isaacs [20:46] roberthahn: npm publish, not so much :( [20:46] vineyard: is there a benchmarking library for node? [20:47] roberthahn: error sending version data with "Error: forbidden user: null not authorized to modify NormAndVal : NormAndVal/0.0.2" [20:47] mohiam has joined the channel [20:48] rauchg_ has joined the channel [20:52] kylixz has joined the channel [20:53] isaacs: bak [20:55] matjas has joined the channel [20:57] mr_daniel has joined the channel [21:01] jakehow has joined the channel [21:01] slaskis has joined the channel [21:03] SamuraiJack has joined the channel [21:06] rcy has joined the channel [21:07] _mql1 has joined the channel [21:08] tanepipe1: does anyone know if node-formiable support XHR2 uploads? [21:08] astrolin has joined the channel [21:09] jgautier: whats the best way to share a commonJS module betwen client and server? [21:09] SubStack: jgautier: dnode :p [21:09] dylang has joined the channel [21:09] SubStack: and soon, browserify [21:09] jgautier: well that lets you do RMI [21:09] SubStack: working on that one [21:10] jgautier: basically im doiugn some canvas tutorials [21:10] jgautier: and iw ant to write it in a way that will allow me to run it in the browser [21:10] jgautier: bugt also in node with node canvas [21:10] disappearedng: Hi I wrote this sample demo http://paste.pocoo.org/show/297113/ [+] http://paste.pocoo.org/show/297114/ [+] I am not seeing anything in the client end and the server end keep looping between connected and disconnected any ideas? [21:10] _mql1 has left the channel [21:10] _mql1 has joined the channel [21:11] astrolin has joined the channel [21:12] astrolin has left the channel [21:13] mde has joined the channel [21:13] SubStack: DNode(require('yourmodule')).listen(webserver) :p [21:13] SubStack: latency is high though which is why I'm writing browserify too [21:14] jgautier: hahah yeah but that would still be running the actual method calls on the server [21:15] matjas has joined the channel [21:15] jgautier: requireJS would work i guess but id have to recode my main app.js file to be in requireJS format [21:16] pt_tr has joined the channel [21:17] SubStack: indeed [21:17] jgautier: anyone used this? [21:17] jgautier: https://github.com/jbrantly/yabble [21:18] jgautier: looks like you can load up commonJS modules without having to wrap them or anything [21:18] SubStack: commonjs bah [21:18] SubStack: I want to load npm modules in the browser [21:19] jgautier: doesnt npm use commonJS behind the scenes? [21:20] isaacs: jgautier: npm uses node. [21:20] isaacs: jgautier: node is a commonjs module implementation [21:20] isaacs: (the one that matters, imo) [21:21] chrischris has joined the channel [21:22] jgautier: yeah but all npm modules are written as commonJS modules? [21:22] isaacs: jgautier: not necessarily [21:23] isaacs: jgautier: npm is very flexible. you can use it to install anything [21:23] isaacs: all it cares about is the package.json file [21:23] jgautier: oh ok [21:24] jashkenas has joined the channel [21:24] _mql has joined the channel [21:25] jgautier: isaacs what would be the easiest way to define a module to use between client and server [21:25] isaacs: jgautier: dunno [21:30] Gruni has joined the channel [21:31] saikat has joined the channel [21:32] arlolra has joined the channel [21:34] bnoordhuis_: awesome: http://www.linux.fm/ [21:37] slaskis: anyone here used expresso? [21:37] slaskis: can i only define one export['test bla'] ? it doesn't seem to run the others i have in the same file [21:39] SubStack: slaskis: you can have multiple exports, yes [21:39] SubStack: something else must be wrong [21:40] slaskis: hmm [21:40] slaskis: ok [21:41] sivy has joined the channel [21:41] slaskis: i have this test-case: https://gist.github.com/76a0b93d3b703d5909f2 and it stops right after the first one [21:41] slaskis: even though that assert.ok is true [21:41] slaskis: it's just silent [21:42] SubStack: top-level exports stop when a test fails... sort of [21:42] SubStack: it's complicated because it's async [21:43] slaskis: yeah, but should it start all those top level exports parallel then? [21:43] MikhX has joined the channel [21:44] bradleymeck has joined the channel [21:44] SubStack: it does [21:44] roberthahn: I just published my first Node library: NormAndVal. it's a data normalizer and validator that you can use both client and server-side. Project homepage is here: https://github.com/roberthahn/NormAndVal Not a big project but it sounds like it would be useful to people. [21:44] MikhX has joined the channel [21:45] slaskis: it used to fail perfectly, but now that i've fixed that first failure it's just silent instead [21:45] SubStack: well, not /actually/ parallel [21:45] roberthahn: Aria & jashkenas: you guys wanted to know when I got my project published :) [21:45] Aria: Woot! [21:45] SubStack: more like Object.keys(module).forEach(function (key) { module[key](assert) }) [21:45] Aria: I'll check it out! [21:45] jameshome has joined the channel [21:45] roberthahn: thanks, Aria! feedback is welcome! [21:46] SubStack: which will have parallel async operations waiting in the queue [21:46] SubStack: note: speculating [21:46] slaskis: :) [21:46] slaskis: looking through the source now for some hints [21:50] slaskis: added --serial and i saw that it timed out on another test [21:52] chrischris has joined the channel [21:55] samfalkner has joined the channel [21:55] disappearedng: Hi I wrote this sample demo http://paste.pocoo.org/show/297113/ [+] http://paste.pocoo.org/show/297114/ [+] I am not seeing anything in the client end and the server end keep looping between connected and disconnected any ideas? [21:57] davvilla has joined the channel [21:58] davvilla: I have a quick question, if I am running nodejs, is there anything else I have to run/do to have people connect to it outside of localhost? I can't seem to get it working [21:59] isaacs: davvilla: are you setting "localhost" as the servername that you're listening on? [22:00] roberthahn has left the channel [22:00] isaacs: davvilla: you said you have a server, and you want people outside of localhost to be able to see it, right? [22:01] faust45 has joined the channel [22:02] weng: how do i return the current script path? [22:02] isaacs: weng: __filename [22:02] isaacs: weng: there's also __dirname [22:03] weng: isaacs: that didnt work .. cause it returned /usr/local/lib/node/.npm/hellp/0.0.1-1-LINK-2e628151/package/index.js [22:03] weng: oh now i get it .. its installed there .. hmm [22:03] isaacs: weng: do you want the real path? [22:03] weng: i had it in another folder .. but i guess that is correct then [22:04] isaacs: weng: require("fs").realpath(__filename, function (er, realFilenamePath) { ... }) [22:04] weng: yeah .. how do i get the reail path? [22:04] isaacs: weng: or fs.realpathSync [22:04] samfalkner has joined the channel [22:04] weng: isaacs: thanks! [22:04] isaacs: np [22:04] maushu has joined the channel [22:05] weng: isaacs: how did you remember all that [22:05] weng: you had it saved somewhere? [22:05] stonebranch has joined the channel [22:05] isaacs: weng: i was the last one to rewrite the current realpath implementation. [22:05] weng: oh =) [22:10] alup_ has joined the channel [22:11] c4milo has joined the channel [22:14] cagdas has joined the channel [22:17] davvilla: Hey guys, I am trying to get people to join my hosted ndoejs server but I can only get it to work as localhost. Is there anything specific I have to do in order to have people join it with my ip? [22:20] sstephenson: davvilla: listen on 0.0.0.0 instead of 127.0.0.1 [22:20] tim_smart has joined the channel [22:20] tg has joined the channel [22:21] isaacs: davvilla: what does your ".listen(....)" line look like? [22:21] disappearedng: Hey i need some advise about node.js intergrating with my existing applications: I have a game engine written in python, and I have an http server running on top of twisted on python. My old set up was to use a proxy to do reverse proxying on port 80 to forward comet connections to my old comet server. I was wondering whether a similar set up is required in node.js [22:21] isaacs: sstephenson: you don't need to specify a hostname at all in .listen(). you can just .listen(port) [22:21] davvilla: server.listen(3000); [22:21] sepehr has joined the channel [22:21] isaacs: davvilla: and is there a firewall or something that might be blocking that port? [22:22] isaacs: davvilla: what exactly are you doing to a) get your ip, and b) hit it from the other machine? [22:22] davvilla: no, i turned everything off [22:22] sstephenson: isaacs: cool. didn't know that [22:23] davvilla: to get my ip, i use whatsmyip website and then i try to load myip:3000 on the other machine [22:23] davvilla: if i do it on mine it loads, on others it wont [22:26] davvilla: i forgot to mention im using express [22:26] faust45 has joined the channel [22:27] arlolra has joined the channel [22:34] disappearedng: Hi there I am very new to node.js and I want to know what's the easiest method for node.js to allow another process to communicate with it (I know node.js can simply call rpc, but I was wondering whether it would be a good idea to let other processes to do rpc calls to node.js? ) [22:34] googol has joined the channel [22:34] samfalkner has joined the channel [22:35] pquerna: disappearedng: what do you mean RPC; I mean, some people call HTTP an 'rpc' [22:35] pquerna: (http is actually a nice one, easy to debug) [22:36] disappearedng: I meant jsonrpc [22:36] disappearedng: the case right now is that 1) I have an engine which was written in python, 2) the engine needs to be able to push messages to the browser [22:37] pquerna: i love node; but consider just using orbited. [22:37] disappearedng: pquerna: I migrated from orbited [22:37] disappearedng: I am really fed up with orbited [22:38] disappearedng: in fact I used orbited2 too [22:38] bnoordhuis_: disappearedng: 'push messages to the browser' - are you looking for something like socket.io? [22:38] pquerna: right, socket.io for node then. https://github.com/LearnBoost/Socket.IO-node [22:38] disappearedng: bnoordhuis: I am using socket.io sorry to mention [22:38] pquerna: disappearedng: oh? still using orbited 0.x or whatev myself :) [22:38] disappearedng: yeah I did that already, now I am interested to deal with inter process communication [22:39] pquerna: okay [22:39] disappearedng: pquerna: you should really up to orbited [22:39] disappearedng: 2 [22:39] pquerna: nah [22:39] bnoordhuis: disappearedng: json? it's what node and the browser speak natively [22:39] disappearedng: anyway, back to the question, how can node and my twisted server communicate [22:40] pquerna: disappearedng: we use the stomp stuff extensively (for the worse really, but its harder to change) [22:40] breccan_ has joined the channel [22:40] pquerna: disappearedng: i use http to communicate between my node and twsited stuff [22:40] pquerna: http + resty json [22:40] disappearedng: you use http? [22:40] disappearedng: well then something like rpc might work on top of that [22:40] pquerna: yeah; but thats just because both are 'easy' in each framework. [22:40] disappearedng: but it seems kind of foolish [22:41] bnoordhuis: foolish? [22:41] disappearedng: interprocess to use rpc [22:41] bnoordhuis: http + json = easy to debug [22:41] bnoordhuis: that's a great win in my book [22:41] pquerna: its also nicer to write test cases for too :) [22:41] disappearedng: ok cool that makes a lot of sense [22:41] yumike has joined the channel [22:43] bnoordhuis: hey pquerna, how is your ssl branch coming along? [22:43] disappearedng: pquerna: since you know twisted, too, so I guess I can just open up my engine as an rpc server but how can i tell twisted to send a message to the client in node to the browswer? [22:43] [[zz]] has joined the channel [22:44] bradleymeck has joined the channel [22:44] EGreg has joined the channel [22:44] rcy has left the channel [22:45] programble has joined the channel [22:45] programble has joined the channel [22:47] pquerna: disappearedng: just post to the node.js app [22:48] pquerna: disappearedng: POST /user/23434/someaction [22:48] pquerna: then in your socket-io stuff, map that url to some socketio client [22:48] disappearedng: Oh i see [22:49] disappearedng: what are you using for the http on twisted? [22:49] pquerna: just twisted.web [22:50] disappearedng: ah I see [22:59] disappearedng: wait pquerna: how do you actually make that secure? Since your node.js is simply listening on http, that means ANYONE can simply do a post to your APIs and fake [22:59] pquerna: disappearedng: split network interfaces [22:59] disappearedng: wow are you serious that doesn't sound easy at all [23:00] pquerna: huh? [23:00] AAA_awright: Bind it to 127.0.0.1 [23:00] pquerna: just bind node to two ports [23:00] pquerna: one thats public like i dunno 80 [23:00] AAA_awright: Problem solved [23:00] pquerna: another like say, 8000 [23:00] pquerna: bind 8000 to only 127, or firewall it [23:00] disappearedng: oh ok I thought you were talking about modifying ethX or something [23:00] disappearedng: ok cool thx man [23:00] pquerna: in our enviroment all machines have separate eth0 / eth1 for public side /private side networks [23:01] pquerna: i don't think its that unique of a setup really :) [23:01] disappearedng: that is nice, but then it might be complciated to set up like that for me (by myself) [23:03] Shaka has joined the channel [23:04] wasabist has joined the channel [23:06] disappearedng: Quick question about https://github.com/LearnBoost/Socket.IO-node/blob/master/example/server.js in the IO server, how does each message sent to the server trigger the messages to be sent to everyone? [23:07] hober has joined the channel [23:07] MrTopf has joined the channel [23:10] tim_smart has joined the channel [23:13] mape has joined the channel [23:14] tanepipe1: anyone any ideas why with cradle when i try do a saveAttachment it would be dying with an EPIPE exception on files > 1mb [23:16] tanepipe1: hmm and now it's weirdly working :/ [23:20] benneil has joined the channel [23:23] benneil: im using jade as the tempate engine for express and was curious how i can parse in other jade files, ive tried res.partial but it hasnt worked [23:23] benneil: example here: http://pastie.org/1331011 [23:23] digitaltoad has joined the channel [23:28] mraleph has joined the channel [23:28] justin has joined the channel [23:33] galaxywatcher has joined the channel [23:34] SubStack: hooray, wrote lots of docs FOR A CHANGE [23:35] SubStack: getting better about that [23:37] bneil has joined the channel [23:38] bneil: http://pastie.org/1331011 - trying to parse another jade file into my index.jade, can anyone point me in the right direction or correct irc channel? [23:42] yozlet has joined the channel [23:45] aconbere has joined the channel [23:45] digitalsanctum has joined the channel [23:46] bneil: nevermind, jade imports files using !=('filename') [23:49] mikeal has joined the channel [23:55] bingomanatee__: This probably sounds horribly naive - keep in mind I'm converting from PHP - but is a node module a class - or does it only become a class when it is assigned a function? [23:56] zemanel_ has joined the channel [23:57] jashkenas: in JS, a "function" and a "class" is the same thing ... sort of. [23:57] Tidwell: whatcha mean bingo? Javascript really doesn't have a concept of classes... it uses objects and prototypes them [23:57] jashkenas: functions don't have any inherited properties, unless you add some to the function's prototype. [23:57] jashkenas: So node modules are just objects. If you assign it to a function that's used as a class, then it becomes a class.