[00:00] bnoordhuis: oh, in that case make sure the Pointer object points to a memory arena of at least sizeof(Persistent) [00:00] navaru1 has joined the channel [00:00] qbert65536: does node have any general case forums ? [00:00] TooTallNate: bnoordhuis: good point. do you think unsigned char* is too small? [00:00] locksfree has joined the channel [00:00] bnoordhuis: then *reinterpret_cast*)(p->GetPointer()) = new Persistent(value) [00:00] bnoordhuis: TooTallNate: quite likely [00:01] TooTallNate: that's probably it then, cause the code I posted earlier couldn't be too off [00:02] bnoordhuis: qbert65536: the nodejs mailing list [00:02] abjorn has joined the channel [00:02] qbert65536: bnoordhuis, ok I'm going to make a forum then, do you think people would use it if it was not built in node ? [00:03] bnoordhuis: TooTallNate: sorry, typo: *reinterpret_cast*)(p->GetPointer()) = Persistent(value); // no need to new [00:03] JerrySpringer: Just a question, What is a legacy release? [00:03] bnoordhuis: TooTallNate: but really, you should turn it into a struct [00:04] bnoordhuis: qbert65536: why a forum? [00:04] TooTallNate: bnoordhuis: that's just not possible [00:04] mynyml has joined the channel [00:04] smathy has joined the channel [00:05] qbert65536: bnoordhuis, easieer to search / navigate in my opinion [00:05] visnup: TooTallNate: oooh, k [00:05] bnoordhuis: TooTallNate: sorry, typo'd again: *reinterpret_cast)(p->GetPointer()) = Persistent(value); or *reinterpret_cast*)(p->GetPointer()) = new Persistent(value); [00:05] visnup: TooTallNate: any hope of a fix in 0.4? [00:06] chapel: qbert65536: that is debatable [00:06] chapel: did you even know about the mailing list? [00:06] bnoordhuis: but constructs like that are a pain to manage and debug, don't say i didn't warn you [00:06] TooTallNate: visnup: idk you'd have to ask bnoordhuis or one of the other comitters [00:06] qbert65536: chapel, im on the mailing list yeah [00:06] chapel: okay [00:06] chapel: google searches it fine [00:06] chapel: and there is search built into the group [00:07] jamescarr has joined the channel [00:09] TooTallNate: bnoordhuis: is Persistent a typedef to a pointer though? [00:09] TooTallNate: sounds like no [00:10] bnoordhuis: TooTallNate: no, it's an object [00:10] bnoordhuis: c++ object that is [00:10] TooTallNate: so then it seems like i'd rather store the &Persistent(value) [00:11] TooTallNate: no? [00:11] maushu__ has joined the channel [00:11] TooTallNate: and then in getObject() deref that address back to the Persistent object? [00:11] bnoordhuis: that construct wouldn't work and besides, you'd be taking the address of a stack based object [00:12] cody-- has joined the channel [00:12] bnoordhuis: as soon as you leave the function in which you do that, that object ceases to exist [00:12] TooTallNate: right [00:12] bnoordhuis: in a nutshell: you need to allocate storage space somewhere and maintain a pointer to it [00:12] TooTallNate: ok I was doing it wrong cause I thought that Persistent was the same size as a pointer [00:12] cody--: does anyone here use heroku to host their node apps [00:12] TooTallNate: bnoordhuis: that's what the Pointer object DOES [00:15] bnoordhuis: TooTallNate: yes, but you never did tell if the area m_ptr points to was large enough [00:15] TooTallNate: indeed, but that's up to the user: new Pointer(1024) alloces 1024 bytes [00:15] TooTallNate: and that's what m_ptr points to [00:16] cody--: anyone know if I have to use the redis-url module to connect to the redistogo heroku offers, or can I use node_redis? [00:17] cadorn_001 has joined the channel [00:18] TooTallNate: bnoordhuis: the other functions on the object (putDouble(), putInt32()) use memcpy [00:18] bnoordhuis: TooTallNate: and? [00:19] TooTallNate: well just what's the proper way to assign the Persistent to the space that m_ptr points to? [00:20] scooby has joined the channel [00:21] [[zz]] has joined the channel [00:21] scooby: hi, quick question. I have installed node and npm. where should i install my npm modules? [00:23] bnoordhuis: TooTallNate: *reinterpret_cast*>(self->GetPointer()) = Persistent::New(value) [00:23] bnoordhuis: that will create a persistent handle and copy it into the space m_ptr points to [00:23] TooTallNate: bnoordhuis: perfect that worked :) [00:25] TooTallNate: bnoordhuis: you rule dude, thanks again! [00:25] bnoordhuis: TooTallNate: my pleasure :) [00:27] cadorn has joined the channel [00:28] cadorn has joined the channel [00:29] maushu_ has joined the channel [00:29] cadorn has joined the channel [00:31] TooTallNate: bnoordhuis: and all works as expected: https://gist.github.com/1224524 :) [00:31] JerrySpringer has joined the channel [00:31] talltyler has joined the channel [00:31] Druid has joined the channel [00:32] dmkbot: joyent/node: 03seebees: Tests for Sockets - https://github.com/joyent/node/issues/1699 [00:35] talltyler has joined the channel [00:37] metellus has joined the channel [00:40] EvRide has joined the channel [00:41] talltyler has joined the channel [00:43] jrbasso has left the channel [00:44] qbert65536: scooby, npm will install them for you [00:44] qbert65536: I would run npm from your project root [00:46] noolness has joined the channel [00:48] shipit_ has joined the channel [00:50] jonrohan has joined the channel [00:51] mynyml has joined the channel [00:53] brianseeders has joined the channel [00:55] amigojapan has joined the channel [00:55] cody-- has left the channel [00:56] qbert65536: anyone watching aclfest ? [00:56] neilk_ has joined the channel [00:56] JaKWaC has joined the channel [00:56] qbert65536: http://www.youtube.com/aclfestival/ [00:57] _jhs has left the channel [01:01] artnez has joined the channel [01:02] dominictarr has joined the channel [01:04] maushu__ has joined the channel [01:04] rbuck has joined the channel [01:05] matjaz has joined the channel [01:06] joshkehn has joined the channel [01:06] joshkehn has left the channel [01:07] wojohowitz has joined the channel [01:09] scooby: qbert65536: reason i asked is, i tried npm install socket.io it got installed correctly. when i try some if the examples it just throws an error [01:10] AD7six has joined the channel [01:10] mike5w3c has joined the channel [01:10] jetienne has joined the channel [01:12] deadman87 has joined the channel [01:13] meso has joined the channel [01:13] binaryjohn has joined the channel [01:13] qbert65536: scooby, ahh, honestly I don't run the examples, personally I dont think they should be installed with npm, what error does it throw ? [01:14] scooby: i tried a few, and wrote one myself [01:14] scooby: the same thing [01:14] scooby: 2sec [01:15] scooby: Error: EPERM, operation not permitted [01:16] scooby: at Server._doListen [01:18] plusbryan has joined the channel [01:18] mikeycgto has joined the channel [01:18] mikeycgto has joined the channel [01:19] scooby: when socket.io is installed correctly shouldnt i be able to do this: var io = require('socket.io').listen(80); [01:21] skm has joined the channel [01:21] scooby: am i missing something? [01:26] skyl has joined the channel [01:27] blaenk has joined the channel [01:27] blaenk has joined the channel [01:30] _jhs has joined the channel [01:30] CIA-54: node: 03isaacs 07master * r5b8e1da 10/ (49 files in 7 dirs): Initial pass at zlib bindings - http://git.io/w7ZwsA [01:30] bolden has joined the channel [01:31] devongovett has joined the channel [01:35] jonaslund has joined the channel [01:35] cjm has joined the channel [01:39] jamescarr has joined the channel [01:45] djbell has joined the channel [01:48] abjorn has joined the channel [01:49] qbert65536: scooby, are you running as root ? Listening on port 80 requires evelateed permissions [01:49] qbert65536: does the error happen on ports > 1024 [01:49] qbert65536: > [01:49] qbert65536: stupid font [01:50] deadman87 has joined the channel [01:50] shipit has joined the channel [01:51] broofa_ has joined the channel [01:51] tilgovi has joined the channel [01:51] tilgovi has joined the channel [01:52] binarychef has joined the channel [01:59] iFire has joined the channel [02:01] normanrichards has joined the channel [02:02] JSManiacs has joined the channel [02:03] yhahn has joined the channel [02:04] couchqui1 has joined the channel [02:05] deadman87 has joined the channel [02:12] dmkbot: joyent/node: 03ry: output of url.parse should align with http.request options - https://github.com/joyent/node/issues/1390 [02:14] scooby: qbert65536: yes and no, i am running it on a cygwin on win7 [02:15] scooby: there is no root [02:21] dmkbot has joined the channel [02:22] boehm has joined the channel [02:22] qbert65536: scooby, what happens when you run on port 3000, same error ? [02:23] coreb1 has left the channel [02:25] dmkbot has joined the channel [02:26] randylien has joined the channel [02:26] mynyml has joined the channel [02:28] scooby: qbert65536: [02:28] scooby: it worked! [02:28] scooby: thank you :) [02:29] dmkbot has joined the channel [02:29] isaacs has joined the channel [02:30] dexter_e has joined the channel [02:30] shipit has joined the channel [02:31] Vennril2 has joined the channel [02:32] tilgovi has joined the channel [02:32] qbert65536: scooby, yw! [02:32] dmkbot has joined the channel [02:33] andrewfff has joined the channel [02:34] metellus has joined the channel [02:34] sam350 has joined the channel [02:34] _jhs has left the channel [02:36] dmkbot has joined the channel [02:37] scooby has left the channel [02:40] brianseeders has joined the channel [02:41] JaKWaC has joined the channel [02:44] broofa has joined the channel [02:46] jakehow has joined the channel [02:46] adelgado has joined the channel [02:49] pquerna has joined the channel [02:50] jamescarr: hmmm [02:50] jamescarr: anyone know if you can chain validators in mongoose? [02:51] dmkbot: joyent/libuv: 03ry: upgrade c-ares to 1.7.5 - https://github.com/joyent/libuv/issues/190 [02:51] dmkbot: joyent/libuv: 03ry: upgrade c-ares to 1.7.5 - https://github.com/joyent/libuv/issues/190 [02:51] dmkbot: joyent/libuv: 03ry: upgrade c-ares to 1.7.5 - https://github.com/joyent/libuv/issues/190 [02:51] ryah has joined the channel [02:52] tim_smart has joined the channel [02:53] CIA-54: node: 03Ryan Dahl 07domains * rcf8f246 10/ (8 files in 4 dirs): [02:53] CIA-54: node: domains [02:53] CIA-54: node: Node must be invoked with --domains to use. - http://git.io/DbUjiw [02:53] CIA-54: node: 03Ryan Dahl 07domains * r99b7d7b 10/ (4 files in 3 dirs): add a second domain test - http://git.io/0jXtcA [02:53] CIA-54: node: 03Ryan Dahl 07domains * r47d78d3 10/ (4 files in 3 dirs): wip - http://git.io/rakxMg [02:54] kriszyp has joined the channel [02:56] nerdfiles has joined the channel [02:57] broofa has joined the channel [02:58] nerdfiles has left the channel [02:59] zemanel has joined the channel [02:59] willwh has joined the channel [02:59] willwh has joined the channel [03:00] neilk_ has joined the channel [03:00] dexter_e has joined the channel [03:00] pquerna has joined the channel [03:04] cole_gillespie has joined the channel [03:06] pNstK has joined the channel [03:10] broofa has joined the channel [03:10] shipit has joined the channel [03:12] dshaw_ has joined the channel [03:14] jamescarr: dshaw [03:14] jamescarr: hows things been going these days? [03:15] brainproxy: jamescarr: you're running the workshop tomorrow, right? [03:15] jamescarr: yep [03:15] jamescarr: are you an attendee? [03:15] brainproxy: awesome, see you there [03:15] jamescarr: cool [03:16] jamescarr: Hopefully it's not too introductory for you :) [03:16] brainproxy: someone who couldn't make it gave me their ticket [03:16] jamescarr: ah [03:16] brainproxy: so I'm now in the Loop! [03:16] brainproxy: ;) [03:16] jamescarr: hehehehe [03:17] brainproxy: well i may have seen a lot of it before, but I'm obviously into node, so it will be fun to participate [03:17] brainproxy: i could try to help those around me who get stuck too, and I'm interested to see what you show us wrt mongo integration [03:17] jamescarr: yeah, I hope it's not too lame :) [03:17] jamescarr: I basically put together a simple express app [03:17] jamescarr: using an in memory collection [03:17] chjj: LAME [03:17] chjj: jk ;p [03:18] jamescarr: and have the students migrate it to mongoose, then add validation too [03:18] brainproxy: sounds cool .. i run the STLJS meetup and folks were asking for an intro to express presentation [03:18] brainproxy: so maybe this will give me some ideas :D [03:18] jamescarr: yeah, I ran the node.js group in St.Louis last year, but we only had two meetings [03:18] jamescarr: unfortunately, I had to move back to Columbia after forming it [03:18] jamescarr: a shame too... we had a good turn out [03:19] brainproxy: STLJS is getting good numbers [03:19] brainproxy: enthusiastic group; 75 signed up iirc, and about 30 show up at a time for the meetups [03:20] jamescarr: nice [03:20] jamescarr: I have a group in Columbia that gets about 30 members on average [03:20] jamescarr: we cover everything ;) [03:20] jamescarr: comorichweb.posterous.com [03:20] brainproxy: sweet [03:22] adam_ has joined the channel [03:22] brainproxy: you know The Able Few guys, Michael Bishop, any of those dudes? [03:23] neilk_ has joined the channel [03:24] jamescarr: no [03:25] brainproxy: oh, nvm then :) well, anyway, see you tomorrow a.m. [03:25] jamescarr: yeah [03:25] jamescarr: hopefully it all lives up to your expectations [03:25] DrMcKay has joined the channel [03:26] jamescarr: I'm running through all of my examples right now to make sure it all goes smoothly [03:26] dmkbot: joyent/libuv: 03liuhaif: windows 7, run-tests fail. `tcp_ping_pong` failed: timeout - https://github.com/joyent/libuv/issues/191 [03:28] brainproxy: jamescarr: well i'll just be happy to be there and look forward to über concentrated techy-nerdness-knowhow that's about to descend upon St. Louis [03:28] jamescarr: oh yeah... I've attended every SL thus far, hoping to create a similar conference in columbia [03:29] kbni2 has joined the channel [03:29] codemastercode has joined the channel [03:29] codemastercode: Hello, #node.js [03:29] simenbrekken has joined the channel [03:31] jamescarr: brainproxy, actually, I want to get your advice... would you prefer to see more problems, less lecturing? :) [03:32] brainproxy: hmm, me personally i like to see code and stuff moving around in the terminal, REPL, etc. [03:33] jamescarr: cool [03:33] jamescarr: that's how it starts [03:33] jamescarr: mostly in the REPL in the beginning [03:33] brainproxy: back in August I attempted an "intro to node" presentation for stljs and flubbed it up because I spent too much time lecturing and trying to build a foundation for understanding event loop and whatnot [03:33] brainproxy: the attendees told me later I should have just jumped more into to the examples [03:34] sneakyness has joined the channel [03:34] chjj: bah, people get bored too easily [03:35] brainproxy: yeah, for my next presentation I'm going to bring a cattle prod, so I can lecture, lecture ... but still keep people on their toes [03:35] binaryjohn has joined the channel [03:35] jamescarr: bradwright, yeah, try not to get caught on the event loop... I find it confuses people [03:35] jamescarr: I'm hoping to smash the confusion with some examples :) [03:36] brainproxy: good luck :D [03:36] hacksparrow has joined the channel [03:37] jamescarr: thanks [03:41] JakeyChan has joined the channel [03:47] brimster_ has joined the channel [03:50] bartt has joined the channel [03:53] brianseeders has joined the channel [03:56] Spion has joined the channel [03:56] andrewfff has joined the channel [03:59] ericmuyser has joined the channel [04:00] skm has joined the channel [04:00] ericmuyser: is anybody able to direct me to instructions to fix OS X + node? node(72541,0x7fff753cb960) malloc: *** error for object 0x13367d800: pointer being freed was not allocated [04:02] jamescarr: sorry, never seen it [04:02] max_dev has joined the channel [04:03] bronson: ericmuyser, what version of node? [04:03] stepheneb has joined the channel [04:03] ericmuyser: bronson: 0.5.0 (mac osx lion) [04:04] shipit_ has joined the channel [04:04] bronson: ericmuyser, yeah, that's an old one. Try 0.4.latest if you can. [04:04] bronson: If you need 0.5 features, go for 0.5.latest. [04:04] chjj: ericmuyser: if youre going to use an unstable version, why not use the latest [04:04] chjj: yes ^ [04:05] ericmuyser: didnt realize, just went by some module requirements [04:05] ericmuyser: ill try that thx [04:05] ericmuyser: chjj: i think some stuff i needed was removed in latest 0.5 :) [04:05] chjj: either 0.5.7 or 0.4.12 would be good [04:05] ericmuyser: and at the same time some stuff was missing in 4.2 [04:05] chjj: well, its better to not rely on it then [04:08] brimster_ has joined the channel [04:08] tojochacko has joined the channel [04:09] devaholic: does anyone have a node.js blog app [04:09] okuryu has joined the channel [04:10] ericmuyser: chjj: true in most cases. not sure i want to bother reimplement google protobuf though. id be more inclined to switch to linux than deal with this mac crap [04:10] ericmuyser: building 0.4.12/0.5.7 though to see how it goes [04:10] chjj: devaholic: i do [04:11] chjj: ericmuyser: i see [04:12] devaholic: is the framework open source [04:12] Nuck|mobile has joined the channel [04:12] chjj: devaholic: everything i write is open source [04:12] dexter_e has joined the channel [04:12] max_develop has joined the channel [04:12] devaholic: what is the url [04:14] chjj: well, ill warn you, its really tailored to my own needs, i mostly wrote it for myself, so dont expect to be able to use it right out of the box [04:14] chjj: https://github.com/chjj/dilated [04:14] jacobolus has joined the channel [04:14] stepheneb has joined the channel [04:15] schwab has joined the channel [04:15] devaholic: have you seen blogmate [04:15] devaholic: i guess it was just made [04:16] Remoun has joined the channel [04:17] skiz has joined the channel [04:18] khmer: all right, what's the very best general purpose node host [04:19] minerale: Does anyone know where I can find the live hummingbird demo running? [04:19] bronson: khmer, ask different people, get different answers. [04:19] devaholic: whats vanilla, chjj [04:20] jamescarr: khmer, you from Cambodia? [04:21] jamescarr: nevermind, that's a dumb question [04:21] khmer: bronson: a measured and mature response! what on earth internet have you been on? [04:21] bronson: heh [04:21] bronson: and useless [04:22] mrchess has joined the channel [04:22] bronson: I've tried dotcloud and no.de, both seemed fine. Probably prefer no.de. [04:22] Twelve-60: how do they even work, is it just a VPS? lol [04:23] chjj: devaholic: just a framework i wrote [04:23] khmer: jamescarr: when you say "are you cambodian" do you mean "are you not a jewish guy" [04:23] chjj: devaholic: my own personal framework [04:23] jamescarr: Twelve-60, no.de, heroku and nodjitsu just push as a remote git origin [04:23] binaryjohn has joined the channel [04:23] jamescarr: heroku is the worst of the node.js hosts though, imho [04:23] bronson: Twelve-60 is a new one on me [04:23] devaholic: what does it do [04:24] Twelve-60: jamescarr: do they actually run the code though? :o (or are these just repository hosts..) [04:24] rurufufuss has joined the channel [04:24] jamescarr: Twelve-60, of course they run it. There's no reason to compete with github or bitbucker [04:24] jamescarr: bitbucket [04:24] khmer: bronson: yeah i'm not going to be hosting anything that needs to scale a lot, just a simple key/value store [04:25] chjj: devaholic: its a web framework, like express [04:25] khmer: i also want to figure out whether to use redis, couchdb, or some other dumb nosql thing [04:25] Twelve-60: jamescarr: lol im just trying to figure out how they work, do you get a chunk of file system? [04:25] devaholic: k [04:26] bronson: couch or redis? that's like asking if you want to buy a sports car or a truck. [04:27] bronson: er, redis or couch. [04:27] skiz: more like do you want a hot dog or a table [04:27] jamescarr: more like do you want a greek salad or cobb salad [04:28] jamescarr: don't diss either. I've used both and there are situations where either are better than the other [04:28] bronson: that's exactly my point [04:28] bronson: buy a truck if you need a truck. [04:28] chjj: more like a couch or a greek salad [04:28] chjj: or a couch with a greek salad on it [04:28] jamescarr: hell, I use MongoDB and Redis together in the same app [04:29] sridatta_ has joined the channel [04:29] rurufufuss: I guess its more couchdb vs mongodb then? [04:29] jamescarr: rurufufuss, what about Riak? [04:29] chjj: if you like terribly ugly query syntax, mongo is for you [04:29] jamescarr: neo4j? Tokyo Cabinet? [04:29] rurufufuss: risk reminds me of kopi luwak from the name [04:30] levi: It's all about mysql. :P [04:30] rurufufuss: riak* [04:30] chjj: levi: its all about webscale [04:30] chjj: levi: /dev/null is webscale [04:31] levi: Well, I'll use that in my next project then! It's sure to win. [04:31] bronson: chjj, what nosql has pretty syntax? [04:32] torsd has joined the channel [04:32] chjj: bronson: did i say any did? [04:32] skiz: what sql is pretty syntax? heh [04:32] rurufufuss: I wonder why there's a video of two bears on youtube talking about mongodb vs mysql [04:32] brainproxy: khmer: regarding hosting options, for *most* general purpose you could just get a linode or some other linux vps [04:32] chjj: go with couchdb if you want to use a database developed by a person who hates node.js [04:32] khmer: haha [04:32] bronson: chjj, no, but I'd hoped there was a point to what you were saying! [04:32] khmer: i'm not sure what that says about that person [04:33] chjj: go read damien katz's blog [04:33] chjj: he criticizes node all the time =/ [04:33] levi: I'm guessing there's not a lot of overlap between erlang fans and node.js fans? [04:33] mikeal has joined the channel [04:33] khmer: chjj: right but i'm saying i'm not sure what that says about the software [04:33] chjj: bronson: i dont make points about databases [04:33] khmer: i'm doing plain key-value CRUD, really nothing relational at all [04:34] chjj: khmer: ok [04:34] chjj: khmer: ... [04:34] khmer: but this is my first experience using a non-sql db in production, it just seemed like the right fit [04:34] brainproxy: khmer: does it need to be persistent, i.e. saved to disk ? [04:34] khmer: yeah definitely [04:34] chjj: im not saying it says anything about the software, never did [04:34] chjj: why do people keep putting words in my mouth tonight? [04:35] bronson: khmer, if all you want is key-value, go Redis. [04:35] Aphelion: chjj: it's all they can put in there from over the internet. [04:35] Aphelion: thankfully. [04:35] chjj: ACTION is scared. [04:35] khmer: chjj: if i wanted to put words in your mouth, i'd say them in a high, mocking voice, while opening and closing my hand in the manner of a chatty duck [04:36] khmer: chjj: i was asking about the software, not the creators [04:36] bronson: if you want more advanced queries, indexing, map/reduce, etc, mongo or couch should work. [04:36] skiz: (and full text search to boot) [04:36] bronson: and I been meaning to play with riak one of these days... [04:36] chjj: khmer: i didnt even see you ask anything, i wasnt necessarily speaking to you when i said that [04:36] pandark_ has joined the channel [04:36] levi: Redis is a memory-based store, though, so don't go with it if you have a lot of data and not much RAM in your VPS. [04:37] chjj: khmer: do whatever you want, i just felt like talking trash about damien katz [04:37] brainproxy: yeah, if persistence is a high-priority and your available RAM isn't so large, redis probably isn't the answer [04:37] brainproxy: persistence meaning persistence on disk [04:38] khmer: ah, so redis isn't persistent. i am clearly unschooled here [04:38] bronson: yes it is [04:38] khmer: i just thought it was another competing key-value store [04:38] brainproxy: well yes, it can save to disk [04:38] WRAz has joined the channel [04:38] brainproxy: i mean it does, but you should think of the db as primarily being an in-memory thing [04:38] khmer: for scale, i am basically modeling toggle switches [04:38] brainproxy: err db = kv store [04:38] khmer: string key, boolean value [04:38] skiz: use a cookie? [04:39] khmer: but they need to persist globally [04:39] levi: Redis keeps a backup of your data on disk, so it's fully persistent, but the whole thing is also kept in RAM. [04:39] skiz: always worth a thought :) [04:41] khmer: no, thanks [04:42] khmer: oh all right. yeah i don't know what redis is doing under the hood, but if it's storing efficiently in RAM at all, and not doing some BISON thing, then it seems like an okay fit [04:43] skiz: just be aware that a complete request doesn't mean committed to disk. [04:43] binaryjohn has joined the channel [04:43] levi: Redis has multiple ways of doing persistence, actually. [04:44] levi: They offer some speed/safety tradeoff. [04:44] skiz: right, I guess I should have said it needs to be configured to match your needs [04:48] devaholic: chjj: i can swap out vanilla for express? [04:49] levi: It actually sounds like a pretty good fit if you're just storing a bunch of boolean values. You could model it as a set of 'switches that are on' and maybe a set of all switches if you need to check if a switch that is not in the on set is in the set of all switches. [04:50] sivy has joined the channel [04:51] chjj: devaholic: well, it has similar functionality, its my personal framework though, i dont guarantee everything will stay the same or be stable 100% of the time [04:51] levi: Does anyone here have much experience with socket.io? [04:52] khmer: levi: hmm! yeah, i think i'll try redis. as long as i can run it on whatever node host i pick [04:52] khmer: i'm not anxious to try doing node on a dreamhost vps [04:52] chjj: devaholic: oh, you mean in my blog? [04:53] brainproxy: khmer: what's your concern about using a vps? [04:53] chjj: devaholic: uh yeah, the api is very similar, it should be possible, thats why it designed it the way i did [04:53] devaholic: oh okay, im just more familiarwith express [04:53] ericmuyser: neither 0.5.7 or 0.4.12 wants to build (mac osx). libz link errors. maybe my LD_LIBRARY_PATH is screwed up? http://paste.ubuntu.com/692075/ [04:53] levi: I think a lot of hosts with explicit node support will have redis available as well. [04:53] brainproxy: ericmuyser: maybe try building/installing on mac w/ nvm .. works for me [04:54] iFire has joined the channel [04:54] ericmuyser: brainproxy: npm? [04:54] brainproxy: no nvm [04:54] ericmuyser: what is that [04:54] brainproxy: https://github.com/creationix/nvm [04:54] wolftankk has joined the channel [04:54] brainproxy: node version manager [04:54] chjj: devaholic: well it should work, there are small differences in how routing is done, you might have to add an express middleware that parsed the path and gave you an array containing the path structure on the request object [04:54] ericmuyser: wtf'ing awesome, thanks [04:55] brainproxy: nvm install v0.4.12 ... downloads, compiles, installs node, d/l & install npm w/ it [04:55] Aphelion has joined the channel [04:55] brainproxy: very handy [04:55] chjj: devaholic: small differences in how http errors are delivered [04:56] khmer: brainproxy: the scuttlebutt seems to be that dreamhost is not great at node [04:56] dmkbot: joyent/node: 03seebees: Tests for Sockets - https://github.com/joyent/node/issues/1699 [04:56] brainproxy: khmer: i've had some good experience w/ running node, etc. on linode vps [04:59] khmer: brainproxy: a linode would be great, but it seems a little pricey [04:59] toreym has joined the channel [04:59] brainproxy: khmer: true, could be especially if you're not making good use of the bundled bandwidth allowance [04:59] brainproxy: rackspace cloud servers (not cloud sites), which are basically the same thing as linode vps, charge for bandwidth a la carte [05:00] brainproxy: so if you're not using much bandwidth, your monthly cost could be around $10 [05:00] khmer: that's more like it [05:00] khmer: for a stupid art site i'm making [05:01] brainproxy: khmer: http://www.rackspace.com/cloud/cloud_hosting_products/servers/ [05:01] brainproxy: cheapest option is $10.95/month .. just remember that the b/w charges will be tacked on at the month's end [05:03] khmer: that IS a good price, but it's clearly aimed at businesses trying to scale [05:03] khmer: this is more of a hobbyist thing. [05:03] khmer: or am i being too nitpicky and this is what hobbyists do? [05:03] brainproxy: i don't see why a hobbyist couldn't use a vps from rackspace [05:03] brainproxy: but maybe I misunderstood your point [05:05] jamescarr: khmer, Amazon EC2 has a free option if you're looking to experiment [05:06] jamescarr: http://aws.amazon.com/free/ [05:06] brainproxy: yeah, that could be a cheaper way to start [05:07] jamescarr: back in the heyday joyent and heroku had free closed betas [05:07] jamescarr: I think nodjitsu still has free betas to hand out [05:07] jamescarr: bleh I'm out [05:07] dexter_e has joined the channel [05:09] khmer: hmm, thanks for the bevy of options guys [05:09] sleek has joined the channel [05:09] khmer: you're all total sweeties [05:09] tojochacko has joined the channel [05:12] bolden has joined the channel [05:13] freeformz has joined the channel [05:15] levi: Well, back to slogging through socket.io code... [05:15] redphive: There is another provider handing out free betas right now [05:15] redphive: http://www.uniservecloud.com [05:16] dmkbot: joyent/node: 03seebees: Tests for Sockets - https://github.com/joyent/node/issues/1699 [05:18] stagas has joined the channel [05:21] meso has joined the channel [05:23] jslatts has joined the channel [05:27] rchavik has joined the channel [05:27] rchavik has joined the channel [05:34] WRAz: do we know when joyent will start charging for their node.js PaaS? [05:35] cliffano has joined the channel [05:37] zemanel has joined the channel [05:38] WRAz: ah, nevermind I see how they swing it [05:39] anoop has joined the channel [05:43] digitaltoad has joined the channel [05:43] ericmuyser: trying to figure out where i could change the compiler flag from -O3 to -Os.. waf-admin somewhere maybe [05:45] jtsnow has joined the channel [05:47] Skola has joined the channel [05:47] jonrohan has joined the channel [05:48] davidbanham has joined the channel [05:48] ericmuyser: nvm its in cmake/configure, which doesnt exist in nvm woot :[ [05:54] boltR has joined the channel [05:59] mendel_ has joined the channel [06:01] Cromulent has joined the channel [06:01] freeformz has joined the channel [06:02] mwhooker has joined the channel [06:02] xules has joined the channel [06:05] xules_ has joined the channel [06:06] dmkbot: joyent/node: 03isaacs: Zlib regression - https://github.com/joyent/node/issues/1730 [06:06] Frippe has joined the channel [06:07] uptownben has joined the channel [06:07] uptownben: Hi all. [06:08] garrensmith has joined the channel [06:10] uptownben: Havning some issues updating via npm [06:10] towski has joined the channel [06:10] xules_ has joined the channel [06:11] uptownben: keep getting this:npm ERR! error installing jade@0.15.4 Error: Unsupported [06:11] uptownben: any ideas? [06:11] isaacs: uptownben: gist the rest of the error message. [06:11] stagas has joined the channel [06:14] uptownben: https://gist.github.com/1224797 [06:14] githogori has joined the channel [06:14] tojochacko has joined the channel [06:15] devaholic: uptownbean: it says it right there [06:15] uptownben: Apparently my local IDE performed a "sync" and sent the local node_modules folder up to the server [06:16] SamWhited has joined the channel [06:16] uptownben: directory not empty? [06:16] devongovett has joined the channel [06:16] uptownben: so if I just clear that out, should resolve? [06:17] dshaw_ has joined the channel [06:17] simenbrekken: Anyone used node.js in deployment with upstart? I can't seem to get the service running, I'm using the following in the script block: exec sudo -u ec2-user /usr/local/bin/node /home/ec2-user/myapp/application/api/app.js 2>&1 >> /home/ec2-user/myapp/log/api.log [06:17] anoop has joined the channel [06:17] stagas_ has joined the channel [06:17] sridatta has joined the channel [06:19] AphelionZ has joined the channel [06:21] stagas has joined the channel [06:21] freeformz has joined the channel [06:26] k1ttty has joined the channel [06:26] JSManiacs has joined the channel [06:29] uptownben: need to rebuild node, can I just do a git checkout v.0.4.12 in my local node source directory to do that? then configure, make, install? [06:30] uptownben: *v0.4.12 [06:30] binaryjohn has joined the channel [06:31] simenbrekken: uptownben: yeah, worked for me [06:31] uptownben: cool, trying now [06:35] saikat has joined the channel [06:36] dmkbot: joyent/node: 03isaacs: Zlib regression - https://github.com/joyent/node/issues/1730 [06:38] uptownben: why do I get a : Note: moving to "v0.4.12" which isn't a local branch , after "git checkout v0.4.12" when installing? [06:38] trevorgreen_ has joined the channel [06:38] kbni has joined the channel [06:42] isaacs: uptownben: maybe you haven't fetched the tags [06:42] isaacs: oh, no, nvm, it's origin/v0.4.12 [06:43] uptownben: ah.. so I should do git checkout origin/v0.4.12 ? [06:45] dominictarr has joined the channel [06:46] CIA-54: node: 03isaacs 07master * rd104bfd 10/ (lib/zlib.js src/node_zlib.cc test/simple/test-zlib.js): [06:46] CIA-54: node: zlib: Fix test so that it's not trivially passing, then pass it. [06:46] CIA-54: node: Regression from the refactor to move more things into JS. - http://git.io/QBEWIA [06:46] CIA-54: node: 03isaacs 07master * rf90264d 10/ lib/zlib.js : zlib: lint - http://git.io/FfKv-A [06:47] whitman has joined the channel [06:59] madsleejensen has joined the channel [06:59] Twelve-60: There was an internal error in Node's debugger. Please report this bug. [06:59] Twelve-60: :o [07:00] robotmay has joined the channel [07:01] knifed has joined the channel [07:01] guidocalvano_ has joined the channel [07:03] Peniar has joined the channel [07:03] tojochacko has left the channel [07:09] tojochacko has joined the channel [07:09] tojochacko has left the channel [07:09] andrewfff has joined the channel [07:10] nerdfiles has joined the channel [07:10] superjudge has joined the channel [07:11] mike5w3c has joined the channel [07:15] sneakyness has joined the channel [07:18] devongovett has joined the channel [07:22] dexter_e: Anyone know if there is a way to limit STATIC requests to only one directory ? [07:22] dexter_e: for example /static/ and nothing else [07:24] liveink has joined the channel [07:25] tmzt: it should be the parameter [07:25] tmzt: if you mean /static in the url [07:26] tmzt: no, you'll have to code that as your own middlewear to my knowledge [07:26] sridatta has joined the channel [07:29] azeroth_ has joined the channel [07:31] meandi has joined the channel [07:32] stisti has joined the channel [07:32] kr0mmy has joined the channel [07:34] mynameisbender has joined the channel [07:36] dgathright has joined the channel [07:36] admc has joined the channel [07:39] anoop has joined the channel [07:41] jetienne has joined the channel [07:41] srijan4 has joined the channel [07:42] dexter_e: tmzt: thanks [07:43] dexter_e: I was using a * route but static assets are triggering that route as wel [07:43] zastaph has joined the channel [07:43] `3rdEden has joined the channel [07:43] dexter_e: Was wondering if there is a way to only run the static on one route [07:43] tmzt: yeah [07:44] tmzt: use it as the callback [07:44] dexter_e: use what as the calback? [07:44] tmzt: the problem is static returns function [07:44] Druid has joined the channel [07:44] tmzt: middleware is just a function (req, res, next) [07:45] tmzt: so jus tuse app.get('static/:path', static('fspath/')) [07:45] dexter_e: so staticis calling next() if file is not found [07:45] tmzt: but, static won't know what to do with req params [07:45] matjaz has joined the channel [07:45] tmzt: easier to write a middleware then call [07:45] tmzt: the send portion of static [07:45] tmzt: which does the real work [07:46] ericmuyser: is there still a synchronous node.debug('test') function? console.log is async iirc and not getting complete messages before hitting an exception [07:47] overclk has joined the channel [07:48] dexter_e: I see [07:49] dexter_e: Perhaps putting static Last would solve the problem [07:49] dexter_e: I guess that would trigger the * route anyway [07:49] dexter_e: hmm [07:49] dexter_e: Really My issue is * conflicting with static [07:50] dexter_e: * Vs. Static [07:51] __doc__ has joined the channel [07:55] dominictarr has joined the channel [07:57] c4urself has joined the channel [07:59] DrMcKay has joined the channel [08:00] RushPL has joined the channel [08:01] dmkbot: joyent/node: 03seebees: Tests for Sockets - https://github.com/joyent/node/issues/1699 [08:05] iFire has joined the channel [08:06] joshthecoder has joined the channel [08:07] shanebo has joined the channel [08:09] shanebo: hey guys what's the best/cleanest/simplest css/js minimizer module? [08:09] joshthecoder has joined the channel [08:10] jbpros has joined the channel [08:11] secoif has joined the channel [08:11] JSManiacs has joined the channel [08:11] konobi: shanebo: `rm` ? [08:12] JSManiacs has left the channel [08:12] matjaz has joined the channel [08:13] shanebo: hahah [08:13] DrMcKay: lol [08:14] shanebo: konobi I think this will do: https://github.com/mape/connect-assetmanager [08:17] adambeynon has joined the channel [08:18] piscisaureus__ has joined the channel [08:19] thalll has joined the channel [08:19] muspelheim has joined the channel [08:24] Bonuspunkt has joined the channel [08:25] Ginlock has joined the channel [08:31] pgherveou has joined the channel [08:32] Nss has joined the channel [08:33] diamonddog has joined the channel [08:33] boltR has joined the channel [08:38] jbpros has joined the channel [08:41] k1ttty has joined the channel [08:41] kuebk^ has joined the channel [08:45] FireFly has joined the channel [08:46] Lemon|mbp has joined the channel [08:49] TheJH has joined the channel [08:52] xules has joined the channel [08:52] Morkel has joined the channel [08:57] lovesh has joined the channel [08:57] lovesh: hi [08:57] shanebo: hey guys in looking at https://github.com/mape/connect-assetmanager#readme I'm unclear how I link to the combined/minified result file? [08:57] mape: shanebo: just enter the path you set [08:58] lovesh: i have installed npm but when i try to install express or socket.io from their tarballs they give error [08:58] mape: shanebo: sorry, route, 'route': /\/static\/js\/[0-9]+\/.*\.js/ [08:58] amigojapan has joined the channel [08:58] thalll has joined the channel [08:58] shanebo: mape, does that route result in one file though? [08:58] mape: yes [08:59] lovesh: like if i do npm install visionmedia/express.tar.gz i get this error [08:59] lovesh: npm ERR! error installing express@3.0.0alpha1 Error: getHostByName ECONNREFUSED npm ERR! error installing express@3.0.0alpha1 at errnoException (dns_uv.js:31:11) npm ERR! error installing express@3.0.0alpha1 at Object.onanswer (dns_uv.js:141:16) npm ERR! error installing express@3.0.0alpha1 at Object. (dns_uv.js:157:15) npm ERR! error installing express@3.0.0alpha1 at Object.lookup (dns_uv.js:153:18) npm ER [08:59] shanebo: mape, so I could make the route, '/javascripts/min.js' ? [09:00] mape: shanebo: yeah, you can enter any regex [09:00] shanebo: mape I guess I'm confused why you would use a regex if the result is one file :) [09:00] mape: shanebo: because then you can add a hash in the url and bust caches [09:01] shanebo: mape also does your module respect import within a stylesheet? [09:01] mape: or a timestamp or whatever [09:01] mape: shanebo: no it does not, guess you could write a hook for it though [09:01] shanebo: mape no worries on that. just didn't see any documentation on it [09:02] pfried has joined the channel [09:03] shanebo: mape if i use a static route will it cache? [09:03] lovesh: @pfried hi [09:03] pfried: hi [09:04] mape: shanebo: it has an expire so yeah [09:04] lovesh: can u help me some problem with npm? [09:04] lmorchard has joined the channel [09:04] pfried: i think i'm not that into it, i used it myself for only 2 or 3 times [09:05] lovesh: ok no problem [09:05] lovesh: can anyone help me with an issue with npm? [09:07] admc has joined the channel [09:08] lovesh: @admc hi have a minute? [09:10] japj has joined the channel [09:11] lovesh: help needed with npm? [09:12] DrMcKay: lovesh: sup? [09:12] DrMcKay: ah, I see [09:12] DrMcKay: !up? registry.npmjs.org [09:12] dmkbot: DrMcKay, host up (status code: 200) [09:13] DrMcKay: lovesh: where did you get that tarball from? [09:13] lovesh: git [09:13] DrMcKay: like, git tag? or github downloads? [09:14] lovesh: github download [09:14] lovesh: i dont have internet connection on my linux box [09:15] DrMcKay: but wait, I can't see that tarball [09:15] DrMcKay: would you mind linkink me to it? [09:15] lovesh: i tried installing socket.io and connect but they failed too [09:15] DrMcKay: hey, but wait [09:16] DrMcKay: you're installing from a tarball on a host with no connection? [09:16] DrMcKay: that sure will fail [09:16] lovesh: yes [09:16] lovesh: and i shortened the name of the tarball here the actual name is [09:16] lovesh: visionmedia-express-2.4.3-146-gd3937b9.tar [09:17] lovesh: but why does that fail? [09:17] shanebo: this is slick mape :) thanks man [09:17] lovesh: i have the complete source of express [09:17] DrMcKay: yeah, the problem is that npm needs internet connectivity to fetch dependencies [09:17] mape: shanebo: :) [09:18] lovesh: ok [09:18] lovesh: so is there some way i can install it offline [09:19] japj: as long as there are no binary modules, you could install everything on an online machine and then copy all the files it installed [09:19] DrMcKay: what japj says [09:19] japj: depending on the amount of dependencies, doing things by hand is going to be a pain [09:19] DrMcKay: npm install express on online machine [09:20] DrMcKay: and copy the node_modules directory [09:20] piscisaureus__ has joined the channel [09:21] DrMcKay: meh, npm *should* support it [09:21] vguerra has joined the channel [09:21] DrMcKay: like npm pack --deps [09:22] lovesh: i am on windows right now but have curl,wget and git installed can i download the complete source of express here and install on linux? [09:23] japj: you can also use ryppi to install if npm doesn't work for you on windows [09:23] Slashbunny has joined the channel [09:23] japj: although it works slightly different (and is written in python) [09:23] japj: https://github.com/japj/ryppi [09:23] lovesh: @japj i dont have node or npm installed on windows [09:24] lovesh: is there some way i can fetch all dependencies from github? [09:24] japj: lovesh: ryppi is implemented in python [09:24] lovesh: ok [09:24] japj: lovesh: and it will fetch all dependencies [09:25] tyrion-mx has joined the channel [09:26] DrMcKay: btw, does `npm pack --deps ` packing package together with dependencies sound sane? [09:26] DrMcKay: ACTION wants to contribute to npm [09:27] tyrion-mx: is "process.binding" documented somewhere? [09:27] tmzt: nodejs.org ? [09:27] tyrion-mx: I can't find anything [09:27] shanebo: mape since connect doesn't have gzip baked in anymore, what do you use? Ever used this module? https://github.com/nateps/connect-gzip [09:28] tyrion-mx: I'd like to understand what "var SlowBuffer = process.binding('buffer').SlowBuffer;" does [09:28] stagas has joined the channel [09:28] japj: DrMcKay: that looks sane to me ;) [09:29] DrMcKay: japj: great, thanks :) [09:29] navaru has joined the channel [09:29] japj: tyrion-mx: I think process.binding is an internal part of nodejs [09:29] hnan has joined the channel [09:29] tyrion-mx: ok, I found this now: https://groups.google.com/forum/#!topic/nodejs/R5fDzBr0eEk [09:29] mape: shanebo: I haven't actually used it, gziping was a pita before [09:29] tyrion-mx: it says it's something private and should not be used [09:30] mape: but they landed some nice stuff lately, that isn't in stable though [09:30] arnee has joined the channel [09:30] japj: tyrion-mx: I think it is the 'bridge' between the internal stuff that is implemented in C++ and the javascript api for those [09:31] tyrion-mx: I asked that, because I wanted to understand the buffers.js module, but I couldn't find those this.*Slice methods [09:32] japj: tyrion-mx: the C++ part for buffers is at https://github.com/joyent/node/blob/master/src/node_buffer.cc [09:32] lovesh: @japj if i have a linux box with internet connection can i use ryppi to fetch all dependencies of express or other modules? [09:32] tyrion-mx: japj, thank you, but I am too noob to read C++ :) [09:33] HektoR has joined the channel [09:33] matjaz has joined the channel [09:33] japj: lovesh: yes, ryppi uses the internet to fetch all dependencies, so as long as you have python you can run ryppi. [09:34] sylvinus has joined the channel [09:34] tyrion-mx: anyway I have an ircbot and I need to handle multiple encodings (latin1 and utf-8), I am trying to use iconv [09:34] tyrion-mx: is that the right way to go with node? [09:34] lovesh: and then i can copy the souce from that machine and run it on my machine to install it offline [09:34] lovesh: right? [09:34] justinTNT has joined the channel [09:35] jTNT has joined the channel [09:35] TheJH: tyrion-mx, iconv should be right for that, I guess [09:36] japj: lovesh: exactly [09:36] lovesh: @japj thanks a lot [09:36] tyrion-mx: TheJH, thank you [09:36] TomY has joined the channel [09:38] DrMcKay: so, time to publish my first package ^^ [09:38] niclone has joined the channel [09:38] superjudge has joined the channel [09:38] broofa has joined the channel [09:39] WRAz has joined the channel [09:40] japj: DrMcKay: what is it? [09:41] knifed has joined the channel [09:42] DrMcKay: japj: https://github.com/mmalecki/ngrep [09:42] DrMcKay: and it's here as well: http://search.npmjs.org/#/ngrep [09:43] DrMcKay: it's not perfect yet, directory read doesn't go through mutex, so it may crap out in some situations [09:45] wee has joined the channel [09:45] wee: hello [09:46] wee: anyone out here? [09:47] wee has joined the channel [09:48] tyrion-mx: is there a way to have a Buffer/StringDecoder throw and exception if it can't decode a string using utf-8 [09:48] tyrion-mx: so I would now that I have to try with an other encoding [09:49] wee: can anyone tell me if there is a way to install modules with npm locally, that is without -g option, that are not going to be owned by root? [09:49] rendar has joined the channel [09:50] DrMcKay: wee: npm install module [09:50] azeroth_: has anyone came accross the issue where the client function were not register on the server side onconnect? [09:51] wee: I have to sudo to install so modules are installed as root in user's directory [09:51] blup has joined the channel [09:52] japj: wee: why do you have to sudo npm? [09:53] AvianFlu: chown -R? [09:53] wee: because if I dont I get npm ERR! Error: EACCES, Permission denied, Please use 'sudo' or log in as root to run this command. [09:54] japj: wee: is that because the node_modules directory is owned by root? [09:54] wee: let me check [09:55] wee: nope, my local node_modules dir is owned by user [09:55] kersny has joined the channel [09:56] japj: wee: hmm, you might want to ask isaacs when he is online then (or ask on the npm mailinglist) [09:56] Skomski has joined the channel [09:57] wee: thanks [09:57] hakaselab has joined the channel [09:57] wee: how do you address particular user in this thing? [09:58] random123: Type a few characters, and hit TAB [09:58] random123: Tab is auto complete universally [09:58] japj: wee: I don't know how the webchat works, I just use a regular irc client ;) [09:59] wee: @japj test [09:59] wee: nope [09:59] japj: yes I got that test [09:59] wee: :-) [09:59] random123: oh, sorry wee, i mis understood you being i got ass burgers [09:59] mraleph has joined the channel [10:00] DrMcKay: japj: actually, this thing is still slower than grep :/ [10:00] DrMcKay: japj: grepping linux/drivers for 'panic' takes 14 s and 7 s with grep [10:01] DrMcKay: japj: but it's just fine-tuning [10:01] japj: DrMcKay: which one did you run first? (i.e. you didnt happen to load everything in filesystem cache with ngrep first did you?) [10:01] TomY has joined the channel [10:01] DrMcKay: japj: no, I ran grep first, then ngrep, then grep [10:02] japj: DrMcKay: hmm, well atleast it's async ;) [10:02] DrMcKay: japj: but now it can read only 64 files at once :). let's see what happens with ulimit -n [10:02] jer0me1 has joined the channel [10:03] azeroth__ has joined the channel [10:05] DrMcKay: still the same... doesn't seem like concurrency is the bottleneck here [10:05] jeromebasa has left the channel [10:05] eldios has joined the channel [10:06] DrMcKay: I'll look into it later [10:06] japj: DrMcKay: could be the node thread pool for async io is limited to a certain size? [10:07] HektoR has joined the channel [10:07] cjheath has joined the channel [10:07] DrMcKay: japj: possibly. and it might be defined not in node but in libuv [10:07] adambeynon has joined the channel [10:07] japj: DrMcKay: ah, how does 0.4.x compare to 0.5.x performance? [10:08] c4urself has joined the channel [10:09] TheJH: OT: anyone here in New York City? what are the #occupywallstreet protests like? [10:09] DrMcKay: japj: they've almost the same timings [10:09] hakaselab has joined the channel [10:10] DrMcKay: japj: 0.2 s of difference [10:11] HektoR: hello guys. is required javascript file in node.js has independent variable scope ? look at this http://pastebin.com/XYmKjkAc 'test' variable is undefined in this case. how can 'reach' to this test variable from module.js ? [10:12] TheJH: HektoR, that's not really how you should do it [10:12] HektoR: TheJH, so how to do it ? [10:13] TheJH: HektoR, you COULD use a global for that, but it's kinda ugly [10:13] japj: or make a function in the module and pass it the variable [10:13] HektoR: TheJH, yeah, i don't want to use global, that why i'm asking for alternative ways [10:14] TheJH: HektoR, japj, or use my cool library: https://github.com/thejh/node-context [10:14] TheJH: HektoR, have a look at test.js [10:14] TheJH: HektoR, I am pretty sure it'll work cross-file, too [10:14] japj: TheJH: I think it needs a README :) [10:14] mcantelon has joined the channel [10:14] TheJH: japj, there's an example js file. who needs a readme? :D [10:15] japj: TheJH: apparently github prominently recommends it [10:15] TheJH: true [10:15] HektoR: japj, you right. but when you have many files which must communicate to each other it's kinda confusive ... [10:15] TheJH: I should write it [10:15] HektoR: TheJH, okay ... let me see [10:16] DrMcKay: is there a possibility for npm -g to install things in user directory? [10:16] DrMcKay: ACTION is writing an README for ngrep [10:17] jldbasa has joined the channel [10:17] TheJH: DrMcKay, only when your npm install is local to the user, too - well, actually, there's a neat trick with which you can do it [10:17] TheJH: DrMcKay, you can install it "locally" into a folder and then put the bin subfolder in your path [10:18] DrMcKay: k, thanks [10:19] pfried: does "nc 192.168.178.90" the same as if i write to the socket with socket.write("something")? [10:20] HektoR: TheJH, hmmm ... interesting ... let me try for my case ... [10:21] SamuraiJack has joined the channel [10:21] pfried: nc=netcat, works with telnet as well, i get a response if i send "ip" to my microcontroller it responds with its ip, but by doing this in node i dont get anything on socket.on('data' [10:22] pgherveou has joined the channel [10:23] TheJH: pfried, could you gist your code? [10:24] pfried: mom [10:25] pfried: git clone git://gist.github.com/1224954.git gist-1224954 [10:26] pfried: the connect event works well [10:26] TheJH: pfried, I'll just go to https://gist.github.com/1224954 :D [10:26] pfried: yeah... [10:27] pfried: forget that [10:27] TheJH: pfried, you have to press enter in netcat, right? [10:27] pfried: well i open a connection by "nc 192.168.178.90 2701" and then i type "ip" an press enter [10:28] locksfree has joined the channel [10:29] netlemur has joined the channel [10:29] pfried: and i get the ip of the controller as a response [10:30] TheJH: pfried, you'll have to send that "enter", too: netio.write("ip\n"); [10:30] pfried: ok i'll try [10:31] pfried: works! thank you! tryed it now for 2hours... [10:31] dmkbot: joyent/node: 03exi: std::bad_alloc exception if a too big buffer is allocated - https://github.com/joyent/node/issues/1710 [10:35] knifed has joined the channel [10:36] boehm has joined the channel [10:36] kbni has joined the channel [10:38] HektoR: TheJH, it does not work. i have to require your module in each file. but you inspired me one idea to create one global object where i include necessary scripts which will but available to rest of applications with this global variable ... what you think ? [10:39] TheJH: HektoR, why do you think having to require it everywhere makes it "not work"? [10:39] onethirtyfive has joined the channel [10:40] TheJH: HektoR, every require for the same module name returns the same instance of the module [10:41] amigojapan has joined the channel [10:42] Peniar has joined the channel [10:43] HektoR: TheJH, i meant this is not work for my case. i know that it's returns same instance but if i have big application with 40 or more files its terrible to require one file to rest of files. there's nothing wrong with your module and sorry if my post was unpleasant for you. [10:43] Wizek has joined the channel [10:44] TheJH: HektoR, "unpleasant" isn't bad, it's good to have honest feedback :) [10:44] dmkbot1 has joined the channel [10:45] TomY has joined the channel [10:45] knifed has joined the channel [10:47] onethirtyfive: This is more of a synchroneity (is that a word?) question than an express.js question, but if anyone can help: [10:47] onethirtyfive: I'm writing a little express.js app. In one of my route definitions, I'm trying to have jsdom load some markup. I want to include some scripts, so I'm using jsdom.env. However, since it jsdom.env uses an async callback function, the 'connect' middleware sends response headers before the jsdom callback gets called. Has anyone dealt with this kind of problem before? [10:47] onethirtyfive: wall of text, sorry. :) [10:47] JadChronicles has joined the channel [10:48] HektoR: TheJH, common man .. :) don't be angry .. can you tell me your thought about creating one global variable which i said above ? [10:48] DrMcKay has joined the channel [10:48] TheJH: HektoR, if you're writing an application and not a reusable module, it should be fine [10:49] TheJH: onethirtyfive, could you gist your code? [10:49] onethirtyfive: TheJH: Sure thing. Just a minute. [10:49] TheJH: onethirtyfive, I'm pretty sure there's a callback you're calling too early [10:50] Tiller has joined the channel [10:50] Tiller: Hi! [10:50] HektoR: TheJH, yeah ... it will be application not module ... [10:51] TheJH: HektoR, should be fine then. Just make sure that you use a name for the global that nobody else will use [10:51] DrMcKay: did someone say 'global'? [10:52] DrMcKay: I'm pretty sure that someone said global. [10:52] DrMcKay: I mean, people, there's a way! [10:52] DrMcKay: !npm search global [10:52] jhbot: packages (short format): noop, node-api, tap-global-harness, store, ninjs, globalize, timeTraveller, process, global, secret, node-secure, buster-script-loader, jsonify, gleak [10:52] DrMcKay: global module is what you're looking for [10:53] TheJH: DrMcKay, you can just write "global.foo = 1"... [10:53] DrMcKay: TheJH: it's bad. I mean, it hurts. [10:54] DrMcKay: TheJH: and global module is kinda lulzy [10:54] DrMcKay: it uses module cache and things [10:54] DrMcKay: well, generally, it looks like that: https://github.com/JerrySievert/global/blob/master/lib/global.js [10:54] adrianmg has joined the channel [10:54] TheJH: DrMcKay, TheJH, i meant this is not work for my case. i know that it's returns same instance but if i have big application with 40 or more files its terrible to require one file to rest of files. [10:54] DrMcKay: ah, sorry, I've missed that [10:55] TheJH: I don't share that opinion, but... [10:56] DrMcKay: btw, yesterday my client got to know I'm 17 [10:56] shanebo: I think the confusion with people (including myself when first learning node) is that required files happen before the server is started… Once you get your head around that, it doesn't feel dirty requiring everything up front... [10:56] DrMcKay: well, kinda lol [10:57] onethirtyfive: TheJH: I may well have this all wrong, but I appreciate your taking a look: https://gist.github.com/a9e92b29c9664a329e7b [10:57] DrMcKay: shanebo++ [10:57] v8bot_: DrMcKay has given a beer to shanebo. shanebo now has 1 beers. [10:57] DrMcKay: shanebo: pretty much like goto ;) [10:58] shanebo: cheers ;) [10:59] DrMcKay: btw, where's catb0t? I liked his markov. [10:59] TheJH: onethirtyfive, looks fine... could you gist the output, too? [11:00] TheJH: onethirtyfive, does it throw some kind of error? [11:00] onethirtyfive: TheJH: It does. gisting. sec. [11:01] onethirtyfive: TheJH: OK, refresh the gist and it should be there. [11:02] ChroniclesJad has joined the channel [11:05] onethirtyfive: TheJH: My gut's telling me that the function returns and the response goes back out the middleware stack, which sets (maybe?) content-length headers or something. And then the callback goes off and... boom. It's modifying a 'sent' response. [11:05] TheJH: onethirtyfive, that's weird... [11:06] Brandon_R has joined the channel [11:06] Brandon_R: Good morning NodeJS Users [11:06] TheJH: onethirtyfive, I'm pretty sure this shouldn't happen, but you could wait for tjholowaychuk to come online [11:07] knifed has joined the channel [11:07] onethirtyfive: TheJH: OK, I'll float it his way then tomorrow. I know how much of a fan of coffeescript he is. :) Maybe he'll look past that. Thanks a ton! [11:07] Brandon_R: what's new in the nodejs world [11:08] jetienne: hi everybody [11:08] TheJH: onethirtyfive, btw, my bot can compile coffee gitsts for you :) - !coffee compilegist [11:08] DrMcKay: Brandon_R: everything is going according to the plan. [11:09] TheJH: *gists [11:09] Brandon_R: cool [11:09] onethirtyfive: TheJH: Noted. I'll give that a shot! [11:10] TheJH: onethirtyfive, btw, do you know about #coffeescript ? [11:11] onethirtyfive: TheJH: Well, its existence doesn't surprise me. haha. I haven't hung out there or anything. I might, though! [11:12] BentBanana has joined the channel [11:12] uptownben: So what do you all think about that V8 memory limit issue? Bad for node? [11:12] BentBanana has left the channel [11:13] Brandon_R: should i write in coffeescript or pure js [11:14] jetienne: uptownben: yes [11:14] jetienne: Brandon_R: javascript. it is standard [11:15] Brandon_R: k [11:15] Brandon_R: so, anyone working on some cool projects? [11:16] DrMcKay: Brandon_R: actually, yes :). disaster relief and preparation with node.js and CouchDB, how awesome is that? [11:16] jetienne: Brandon_R: yes new webgl game http://marblesoccer.com [11:16] Brandon_R: super special awesome :) [11:16] DrMcKay: Brandon_R: https://github.com/Relief-1/Relief1 [11:16] Brandon_R: and practical too [11:16] DrMcKay: Brandon_R: and we need programmers :) [11:16] talltyler has joined the channel [11:17] ericmuyser: SubStack: are you around? [11:17] Brandon_R: Lemme check it out :) [11:17] madsleejensen has joined the channel [11:19] DrMcKay: Brandon_R: join #relief1, it's our IRC channel, we can explain more there [11:20] dgathright has joined the channel [11:20] ericmuyser: getting pretty much the exact same error with a different library (libprotobuf.so) https://gist.github.com/617548 --> http://paste.ubuntu.com/692223/ [11:25] temp02 has joined the channel [11:30] JakeyChan has joined the channel [11:31] N0va` has joined the channel [11:31] netlemur: is there something like new relic for node? or how would you monitor performance of your app? [11:32] guidocalvano has joined the channel [11:33] alnewkirk has joined the channel [11:34] onethirtyfive has joined the channel [11:34] bergie has joined the channel [11:37] matjaz has joined the channel [11:38] TomY has joined the channel [11:38] hnan has joined the channel [11:42] jorenl_ has joined the channel [11:42] thalll has joined the channel [11:43] hakaselab has joined the channel [11:43] olegp has joined the channel [11:43] jorenl_: when does socket.IO 'reconnect'? that is, when does it call io.sockets.on('connection',...) again? [11:43] jorenl_: I assumed it only did when a user enters the page with socket.IO functionality but that does not seem to be the case :S [11:45] piscisaureus__ has joined the channel [11:51] level09 has joined the channel [11:54] ajsie: i need to send basic auth (I think it was called like that) in a http request [11:54] ajsie: how do I do that? [11:54] Country has joined the channel [11:55] theCole has joined the channel [11:55] guidocalvano has joined the channel [11:57] alexh has joined the channel [11:58] shanebo: hey guys in a loop how can I do something to every nth item? [11:58] simenbrekken: modulo! [11:58] shanebo: isn't it like index % 3 or something? [11:59] simenbrekken: sure is [12:00] _64k: ls [12:00] TheJH: ajsie, I'd use a library that can do that kind of stuff for you [12:00] _64k has left the channel [12:00] DrMcKay: v8: a = [1, 2, 3, 4, 5]; b=[]; for (var i; i < a.length; i++) { if (i % 2 == 0) b.unshift(a[i]) }; b [12:00] v8bot_: DrMcKay: [] [12:00] DrMcKay: v8: a = [1, 2, 3, 4, 5]; b=[]; for (var i = 0; i < a.length; i++) { if (i % 2 == 0) b.unshift(a[i]) }; b [12:00] v8bot_: DrMcKay: [5, 3, 1] [12:00] simenbrekken: shanebo: http://jsfiddle.net/a8uvf/ [12:01] shanebo: nice thanks guys [12:02] jomoho has joined the channel [12:02] simenbrekken: shanebo: use the evil doctors example if you want to destroy! [12:03] simenbrekken: shanebo: I was joking. [12:03] pgherveou has joined the channel [12:08] onethirtyfive has joined the channel [12:12] Brandon_R has joined the channel [12:12] Brandon_R: Hello [12:12] Brandon_R: I'm back [12:13] onethirtyfive has left the channel [12:15] muspelheim has joined the channel [12:18] topaxi has joined the channel [12:20] tmedema has joined the channel [12:20] NeedHelp_ has joined the channel [12:20] TheFuzzball has joined the channel [12:21] NeedHelp_: how can i check if a file exists using note.js? [12:21] felixhummel has joined the channel [12:22] meso has joined the channel [12:23] tmedema: NeedHelp_: http://nodejs.org/docs/v0.4.12/api/fs.html#fs.stat [12:23] tmedema: such basics are all in the docs [12:23] meso_ has joined the channel [12:23] NeedHelp_: tmedema: i only have to check weather stat isn't undefined? [12:24] adnam: use path.exists instead [12:24] NeedHelp_: or is an err called if the file dont exitst? [12:24] NeedHelp_: okey [12:24] NeedHelp_: i'll try [12:25] tmedema: oh right that's much better, http://nodejs.org/docs/v0.4.12/api/path.html#path.exists [12:25] theCole has joined the channel [12:25] level09 has joined the channel [12:26] muspelheim has joined the channel [12:26] mikeal has joined the channel [12:27] theCole_ has joined the channel [12:29] junkee[] has joined the channel [12:29] matjaz has joined the channel [12:30] NeedHelp_: other question... iam using http://localhost/exit to stop my server... i think this isn't a good way to exit it... [12:30] NeedHelp_: some ideas how i could manage it? [12:31] rfay has joined the channel [12:31] Tiller: Guys, a performance question : I'm making a "MMO"RPG using socket.io. What's the best : When a player moves or speak, or etc., I broadcast it to everyone on the map, or I cache it, and every x ms, for each player, I send new things that happent ? [12:32] Tiller: I think that the cache is better for the server, but will add a tiny lag. But I think that the best. [12:32] NeedHelp_: tiller i think if you're using socket.io and you try to broadcast every moving [12:32] NeedHelp_: it wouldn't work [12:32] NeedHelp_: because of performance [12:32] adnam: Tiller: benchmark and optimize if it's a bottleneck [12:32] NeedHelp_: if u use the mouse for playing the game [12:32] Tiller: NeedHelp_: Yes, too much bandwidth used [12:33] NeedHelp_: i would say [12:33] NeedHelp_: you broadcast it to every nearby player [12:33] NeedHelp_: not to all =) [12:33] NeedHelp_: and every 33ms [12:33] Tiller: yes yes, it was to players on the map :] [12:33] Brandon_R: Hello guys i have a noob question [12:33] NeedHelp_: hi Brandon_R [12:34] Brandon_R: Can i use multicast to make a chat just for fun? [12:34] NeedHelp_: multicast? [12:34] Brandon_R: multicast udp [12:34] NeedHelp_: no idea ^^ ask somebody else :D [12:35] TheJH: Brandon_R, as long as you're ok with corrupt packets just getting thrown away => dropped messages, I guess so [12:35] Brandon_R: instead of iterating over all connected sockets, i just send one packet to the multicast ip and it gets delivered to all other clients [12:35] TheJH: Brandon_R, should work [12:35] Brandon_R: k [12:35] TheJH: Brandon_R, but don't do it on a WLAN :D [12:36] meandi2 has joined the channel [12:36] Brandon_R: i won't lol why not though? [12:36] TheJH: Brandon_R, because WLANs often drop packets (at least if your connection is bad) [12:37] mehlah has joined the channel [12:38] Brandon_R: oh [12:38] Brandon_R: i don't really care about dropped packets etc i just want to do it for fun to see if i can be done [12:38] meso has joined the channel [12:39] NeedHelp_: can somebody help me? i want to cheack weather a FILE exists.... path.exists isn't the right function for this problem :/ [12:39] Tobbe_: what's wrong with path.exists? [12:40] NeedHelp_: a directory is also a path :( [12:40] Brandon_R: so [12:40] TomY has joined the channel [12:40] NeedHelp_: and readFile crashes if its a dir [12:40] Brandon_R: what tcp/udp projects you guys working on? [12:41] tmedema: NeedHelp_: require('fs').stat(path, function(err, stats) { if (!err && stats.isFile()) { console.log('we have a file'); } else { console.log('we do not have a file'); }); [12:41] netlemur: TheJH: you can avoid that if you send the whole conversation once in a while. then the client can check if everything is fine. I think that's roughly how a lot of egoshooters deal with lags [12:41] NeedHelp_: thanks =) [12:43] Tobbe_: NeedHelp_: It's all in the docs. I've never worked with the filesystem using node, and I found what tmedema said in like 3 minutes ;) [12:44] Tobbe_: http://nodejs.org/docs/v0.4.12/api/fs.html#fs.Stats [12:46] NeedHelp_: i know it's all there but iam to stupid for fast working with it [12:46] NeedHelp_: ~afk [12:46] febits has joined the channel [12:47] Tobbe_: NeedHelp_: I don't think you're stupid. It just takes some practice/experience to know where to look! [12:48] boltR has joined the channel [12:49] anaio has joined the channel [12:52] thalll has joined the channel [12:53] TheJH: is Tim-Smart here? [12:53] ajsie: how do I use the crypto module to create a base64 string? [12:53] ajsie: so that i can use it in Authorization header in a http request [12:54] TheJH: ajsie, that's not crypto [12:54] robi42 has joined the channel [12:54] TheJH: ajsie, new Buffer("user:pass", "utf8").toString("base64") [12:55] nuba has joined the channel [12:55] ajsie: worked great thanks TheJH [12:58] tmedema: One can always undo credit card transactions right? I've just been fooled into buying a domain. It was supposed to have a W (w), but was faked to have one with two Vs (vv). [12:58] tmedema: Guess this is what happens when one doesn't pay attention on a sleepy sunday afternoon.. [12:59] Brandon_R has joined the channel [12:59] Brandon_R: Hello guys [13:00] jorenl_: I've waited for a few hours so I hope I can ask me question again :S [13:00] DennisRasmussen has joined the channel [13:01] jorenl_: "when does socket.IO 'reconnect'? ( io.sockets.on('connection',...) ) [13:01] jorenl_: I assumed it only did when a user enters the page with socket.IO functionality but that does not seem to be the case " [13:02] knifed has joined the channel [13:02] NeedHelp_: ~wd [13:03] mikeal1 has joined the channel [13:05] NeedHelp_: can somebody tell me why my websocket + http server cant accept websocket connections over the internet? [13:05] NeedHelp_: all ports are configured right [13:05] NeedHelp_: and the ws server works great on my local pc [13:05] r04r: are you using the correct connection address (Not localhost, maybe?) in your javascript code that runs on the client? [13:06] NeedHelp_: correct adress [13:06] NeedHelp_: it says the client disconnected [13:06] NeedHelp_: after 1ms [13:06] NeedHelp_: ... [13:06] r04r: Then I have no idea, sorry [13:06] kriszyp has joined the channel [13:06] NeedHelp_: should i post the ip of the http server? [13:06] NeedHelp_: then you can look into the js code [13:07] NeedHelp_: and i can post server code on the html page [13:07] jbpros has joined the channel [13:08] Brandon_R: do you have the proper port forwarding enabled [13:08] Brandon_R: make sure you bind to 0.0.0.0 and not 127.0.0.1 [13:08] stagas has joined the channel [13:08] NeedHelp_: Brandon i dont understand... [13:09] NeedHelp_: i bind it to my local lan ip [13:09] NeedHelp_: and with the right lan port [13:10] mike5w3c has joined the channel [13:11] Brandon_R: what is the ip to the http server [13:12] NeedHelp_: mom i have to fix a little bit of new code [13:12] NeedHelp_: just 5 minutes i hop =) [13:12] NeedHelp_: *hope [13:12] ajsie: jorenl_: they have a channel for socket.io [13:12] ajsie: #socket.io [13:12] jorenl_: I know, but it's dead. I was always told (by people in here) to ask here :) [13:13] Brandon_R: what is your question [13:14] vns has joined the channel [13:14] jorenl_: Brandon_R: if you're asking me: I'm wondering when Socket.IO 'reconnects'/when the connect event is called. I thought it was only when the client did io.connect [13:14] Brandon_R: one should be able to ask about a square in the Quadrillateral channel :P [13:15] NeedHelp_: http://188.103.3.64/ [13:15] djcoin has joined the channel [13:15] dmkbot has joined the channel [13:15] Brandon_R: it prints the javascript on the screen [13:16] NeedHelp_: i know [13:16] NeedHelp_: its for you [13:16] NeedHelp_: =) [13:16] Brandon_R: oh nvm [13:16] Brandon_R: lol [13:16] NeedHelp_: i wrote the server.js in the index.html because then you could read it :D [13:16] DrMcKay has joined the channel [13:18] dnjaramba has joined the channel [13:18] Brandon_R: you have the ports [13:18] Brandon_R: mixed up. 8080 and 8090 [13:18] Brandon_R: if i'm reading it right [13:19] NeedHelp_: yes [13:19] Brandon_R: wait [13:19] NeedHelp_: but router has some nat and port rules [13:19] Brandon_R: shouldn't the ip be the same [13:19] NeedHelp_: i fixed it [13:19] NeedHelp_: its because file is from yesterday [13:19] nuba has joined the channel [13:19] Brandon_R: oh [13:19] Brandon_R: does it work now? [13:19] NeedHelp_: the ports are right [13:19] weezle has joined the channel [13:19] NeedHelp_: i think no [13:20] Brandon_R: what is this -> 94.223.230.179 [13:20] NeedHelp_: my old ip [13:20] NeedHelp_: press f5 [13:20] Brandon_R: shouldn't it be 188.103.3.64 [13:20] NeedHelp_: on local pc it works now [13:21] NeedHelp_: yes it should, beause of this i fixed it now [13:21] goshakkk has joined the channel [13:22] Brandon_R: does it work now? i get disconnected [13:22] NeedHelp_: on my local pc it alerts: WebSocket works [13:22] NeedHelp_: connected [13:22] petrjanda has joined the channel [13:22] NeedHelp_: you sent test [13:22] NeedHelp_: ... [13:22] NeedHelp_: but from internet it sends only disconnected [13:22] NeedHelp_: why ever :( [13:22] Brandon_R: oh [13:22] NeedHelp_: now its like yesterday :> [13:22] NeedHelp_: all works perfectly on my local pc but not from internet [13:24] NeedHelp_: and one other problem... i got disconnected after 60 seconds [13:24] NeedHelp_: but server works well and idk why there is a timeout [13:24] Brandon_R: lemme check [13:25] NeedHelp_: server tells me "connected""disconnected" when another person try to join the ws server [13:25] Wizek has joined the channel [13:26] Brandon_R: let me see if i have websocket installed. what is the npm command to list all installed modules? [13:26] jorenl_: Is some info available on best-practices for node programs and stability/robustness? :S [13:27] NeedHelp_: idk [13:27] NeedHelp_: but you dont have to install ws [13:27] NeedHelp_: only your browser has to support it [13:27] NeedHelp_: (chrome, safari) [13:27] abjorn has joined the channel [13:28] NeedHelp_: If it tells you WebSocket works then you have a browser with activated ws support [13:29] RushPL has joined the channel [13:30] Brandon_R: i mean the nodejs websocket server [13:30] meso has joined the channel [13:31] chintu has joined the channel [13:31] xerox: is there a nodejs web socket server? [13:31] chintu: hi all [13:31] jorenl_: xerox: Socket.IO [13:31] yorick: xerox: there are a lot [13:31] level09 has joined the channel [13:31] chintu: i'm having trouble getting mysql to work with node [13:31] NeedHelp_: do you want to try it on your own node? [13:31] NeedHelp_: npm install websocket-server [13:31] Wizek has joined the channel [13:31] chintu: did npm install mysql but still getting exception cant find mysql [13:31] NeedHelp_: this is the packet i used [13:31] jorenl_: chintu: what's happening? [13:31] yorick: SockJS for example [13:32] xerox: oh yes I know about Socket.IO [13:32] chintu: Error: Cannot find module 'mysql' [13:32] yorick: http://www.rabbitmq.com/blog/2011/09/13/sockjs-websocket-emulation/ [13:32] NeedHelp_: xerox try websocket-server [13:32] DrMcKay: !npm search mysql [13:32] jhbot: packages (short format): noblerecord, mysql-libmysqlclient, mysql-client, mysql-oil, mysql-helper, mysql-native-prerelease, autodafe, mysql-native, moose, oursql, db-mysql, mysql-simple, tcp-proxy, node-dbi, mysql, sequelize, mysql-activerecord, mysql-pool, connect-mysql-session, orm [13:32] chintu: var client = require('mysql').createClient(); [13:32] jorenl_: chintu: I had to go to the directory my node script was in, then do npm install [13:32] NeedHelp_: its a minimalistic packet for the ws protocol [13:32] xerox: I was just asking because Brandon_R mentioned a web socket server [13:32] xerox: *websocket [13:32] chintu: jorenl_ go to node install dir? [13:33] jorenl_: chintu: idk, I went to the dir with my .js in it [13:33] jorenl_: chintu: that worked but you should probably be installing globally or something. anyone? [13:33] chintu: so libraries have to be in same dir as .js file? [13:34] NeedHelp_: chintu no [13:35] chintu: hmm after doing that, now it seems to work [13:35] NeedHelp_: i think if you use npm you only have to require("package"); [13:35] chintu: testing more [13:35] jorenl_: chintu: http://howtonode.org/introduction-to-npm: "If you run npm install without any arguments, it tries to install the current folder" [13:35] chintu: ah i see [13:35] Brandon_R: hello guys, what is the best practice for install npm modules [13:35] chintu: i thought it works like yum or php pear :) [13:35] Brandon_R: globally or make a package.json and file run npm install -d [13:35] jorenl_: chintu: then do 'var mysql = require('mysql');' [13:36] NeedHelp_: npm install websocket-server [13:36] NeedHelp_: @Brandon_R [13:36] NeedHelp_: i installed it like this and it works =) [13:36] NeedHelp_: (ubuntu) [13:36] jorenl_: then var db = mysql.createClient({ user: 'username', password: 'password',}); [13:36] NeedHelp_: is mysql asynchron? [13:36] Brandon_R: i like how nodejs is making the io name big [13:36] jorenl_: and after that you can do db.query('stuff') :) [13:36] Brandon_R: io domain tld [13:37] chintu: cool i see the mysql records now :) [13:37] chintu: thx for the hints [13:37] Brandon_R: how much does one cost? [13:37] pr2012 has joined the channel [13:37] randylien has joined the channel [13:38] NeedHelp_: Brandon_R no idea how i can fix my problem? [13:38] Brandon_R: ahh [13:38] Brandon_R: lemme think [13:39] metellus has joined the channel [13:39] matjaz has joined the channel [13:39] Brandon_R: no idea [13:39] Aikar: how come when i throw exceptions with throw "foo" it doesnt print stack traceS? [13:40] NeedHelp_: :( [13:40] NeedHelp_: somebody else an idea why my websocket server cant accept connections from the internet? [13:40] NeedHelp_: http://188.103.3.64/ <-- complete js [13:41] xerox: I get three positive alerts [13:41] NeedHelp_: which? [13:41] NeedHelp_: WebSocket works? [13:41] NeedHelp_: connected? [13:41] NeedHelp_: you sent test? [13:41] xerox: yes [13:41] NeedHelp_: which browser? [13:41] xerox: safairy 5.1 [13:42] markwubben has joined the channel [13:42] yorick: what do I test with? [13:42] NeedHelp_: why other users gets "disconnected"? [13:42] yorick: ie how? [13:42] NeedHelp_: but if its ie [13:42] xerox: because I am the best user [13:42] NeedHelp_: then it couldnt declare a ws [13:42] NeedHelp_: and then it couldt throw an error [13:43] NeedHelp_: :/ [13:43] NeedHelp_: now you get disconnected? [13:44] yorick: strange. firefox is claiming websockets are not supported [13:44] yorick: but I enabled them [13:44] NeedHelp_: my firefox too [13:44] NeedHelp_: because of this i use chromium [13:45] NeedHelp_: arg i crashed my server xD [13:46] Brandon_R_ has joined the channel [13:46] Brandon_R_: jo [13:46] Brandon_R_: hi [13:46] pr2012: Anyone know a way in express to call into partial() without a response object? [13:46] NeedHelp_: how can i get the actual time in node? [13:47] xerox: new Date() [13:47] NeedHelp_: ahh like the js in the browser :D [13:48] NeedHelp_: thanks =) [13:49] N0va has joined the channel [13:50] Brandon_R: woah [13:50] Brandon_R: did not know i could do that [13:50] ttpva has joined the channel [13:50] xerox: do what [13:50] Brandon_R: like the terminal, press up to get the last command typed in [13:51] piscisaureus__ has joined the channel [13:52] Brandon_R: is nodejs crypto safe? [13:52] Brandon_R: i mean node hasn't really been security tested by the "big guys" am i right? [13:53] synkro has joined the channel [13:53] TheJH: Brandon_R, what do you mean with "crypto safe"? all the crypto stuff is just a wrapper around openssl, I think [13:53] Brandon_R: oh [13:53] DrMcKay: Brandon_R: algorithms are algorithms [13:54] stonebranch has joined the channel [13:54] DrMcKay: and what TheJH said, this is mostly just a wrapper [13:54] NeedHelp_: uff... i want to make a time.js file which i want to require... [13:55] NeedHelp_: if i want to organise the code like this: [13:55] xerox: TheJH: thanks again for request, it's really the module I use most :D [13:55] TheJH: DrMcKay, about "algorithms are algorithms": not necessarily - you could make mistakes, e.g. in the random number generation stuff [13:55] NeedHelp_: time = require("time.js"); [13:55] astropirate has joined the channel [13:55] TheJH: xerox, huh? I am not its author [13:55] xerox: oh [13:55] NeedHelp_: and time.h should echo the hours [13:55] TheJH: !@xerox npm owner request [13:55] jhbot: xerox, owners: mikeal [13:55] xerox: NeedHelp_: http://nodejs.org/docs/v0.4.11/api/modules.html [13:55] NeedHelp_: how could i manage it that i can use time.h? [13:55] NeedHelp_: ty :D [13:56] Brandon_R: anyone here ever made a c++ module for nodejs? [13:56] NeedHelp_: wow really simple api =) [13:56] mikeal1: yup, that's mine :) [13:56] xerox: it's pretty great [13:56] davidbanham: How lazy is nowJS? If I have a bunch of objects defined in everyone.now do they all get synced to all clients all the time or do they only travel over the network when the client tries to access them? [13:57] khmer: okay, dangit, i must be doing something stupid with no.de [13:57] DrMcKay: TheJH: I mean, those algorithms node uses have been proven to be good, and since node uses OpenSSL, virtually no changes in implementation have been made [13:57] khmer: anyone use no.de smartmachines? [13:57] xerox: davidbanham: #nowjs ? [13:57] astropirate: khmer, yo [13:57] khmer: oye, como va [13:57] TheJH: DrMcKay, right [13:57] khmer: all right, i have uploaded an ssh key and i have a new machine [13:57] davidbanham: xerox: True, forgot about that. [13:57] khmer: astropirate: ^ [13:57] khmer: astropirate: but ssh connections are still being refused! [13:57] astropirate: ok [13:58] r04r: khmer: Have you added to your $HOME/.ssh/config file? [13:58] astropirate: what OS are you connecting from? [13:58] khmer: i have! [13:58] khmer: osx [13:58] khmer: r04r: i have done so [13:58] khmer: astropirate: osx [13:58] TheJH: davidbanham, I think nowJS syncs all the time, even if you don't access the stuff on the other side. but the in-browser stuff only syncs every second, it polls the object tree for changes [13:58] TheJH: davidbanham, I think now.js is ugly [13:58] khmer: one other thing: in the no.de config panel, the machines list shows my machine as 19 minutes old and "provisioning", but in the machine info screen itself, it says the machine is "RUNNING" [13:58] astropirate: khmer, wiered.. it let me connect after adding the config to the config file [13:58] khmer: is this normal? [13:59] astropirate: yah [13:59] khmer: if the machine is still provisioning, could that be the reason why [13:59] astropirate: got mine a few days ago and its still saing provisioning [13:59] khmer: oh hmm :/ [13:59] NeedHelp_: exports.h = function () { var date = new Date().getHours(); return date; } [14:00] NeedHelp_: error date is not defined? [14:00] khmer: is the ssh keys section especially sensitive to some trailing newline or something? [14:00] davidbanham: TheJH: Cool, I guess that's what their groups API is aimed at. It's not a perfect framework, but this is just something I want to hack up in a few hours and then never touch again. [14:00] astropirate: khmer, no wait it now says running. but that shouldn't be the issue [14:00] Cromulent has joined the channel [14:00] Brandon_R: is it true that there is a hard coded limit in nodejs? 1000 [14:00] netlemur: is it possible to manually create a new session object with connect? [14:00] khmer: astropirate: dang. i suppose i have to email support, don't i [14:00] Brandon_R: 10000 [14:00] astropirate: khmer, how are you connecting to it? [14:00] astropirate: via ssh [14:01] xerox: TheJH: why is nowjs ugly [14:01] netlemur: in my logout function I destroy my session, but I want to send a flash message afterwards [14:01] NeedHelp_: is it true that there is a hard coded limit in nodejs? 10000 - i dont think so [14:01] khmer: astropirate: ssh .no.de [14:01] NeedHelp_: why should there be an code limit? [14:01] khmer: astropirate: ssh: connect to host .no.de port 36822: Connection refused [14:01] NeedHelp_: it would be terrible^^ [14:02] Brandon_R: i think it's built into unix because nowjs only supports 10000 socket connections then you need multiply machines [14:02] TheJH: xerox, because the in-browser thing polls an object tree every second and because there's (as far as I know) no way to know when data has been transferred successfully [14:02] astropirate: khmer, sorry man don't know what the issue is [14:02] khmer: astropirate: thanks anyway! [14:02] khmer: man, everyone here's so nice [14:03] khmer: except....you [14:03] khmer: ACTION gestures vaguely [14:03] astropirate: :( [14:03] Brandon_R: http://en.wikipedia.org/wiki/C10k_problem [14:03] Brandon_R: node addresses it nicely [14:03] _jhs has joined the channel [14:04] MUILTFN has joined the channel [14:05] JakeyChan has joined the channel [14:06] netlemur: anyone anye ideas how to send a flash message after the session was destroyed? [14:07] NeedHelp_: whith date().getMinutes(); i will get 7 for the actual time... but i want to get 07 [14:07] NeedHelp_: which function was it? [14:07] NeedHelp_: i cant find it in selfhtml :( [14:08] NeedHelp_: netlemur: if the session is destroyed i think you cant send a message ... [14:08] TheJH: NeedHelp_, write a costum pad function: `function pad(str, n){while(str.length