[00:00] tetsu has joined the channel [00:00] benw_: Everything that should happen after the user existence check should happen *inside* the callback. [00:00] techwraith: just move line 21 to line 57 [00:00] techwraith: and tab everything in :) [00:00] techwraith: yep, that's the standard [00:00] benw_: yup [00:00] AntelopeSalad: that does make sense, my brain is struggling (but sort of managing) to understand the concept of what's actually going on [00:00] AntelopeSalad: thanks [00:00] benw_: No worries, welcome to async callbacks. :) [00:01] etaty: async c [00:01] techwraith: node forces you to think both horizontally and vertically as far as code execution goes [00:01] techwraith: you get used to it [00:01] SubStack: blocking seems much more bizarre to me [00:01] SubStack: but then I started with javascript when I was 11 [00:01] SubStack: and dropped a lot of haskell back in college [00:02] SubStack: warps your brain, I tell you [00:02] techwraith: SubStack: people like us are not the norm :P [00:02] boaz has joined the channel [00:02] etaty: async callback ... everybody the first time say why all my vars are empty? [00:02] tetsu: Starting out on node.js today, would you guys have any good tutorials/starter materials and suggestions for me [00:03] sirkitre_ has joined the channel [00:03] AntelopeSalad: sweet, it now works as intended [00:03] techwraith: :) [00:03] SubStack: tetsu: have you done much javascript or functional programming before? [00:03] benw_: AntelopeSalad: I recommend writing small functions that take a callback as a final parameter, to break this up into smaller pieces. Makes for better code. [00:04] benw_: AntelopeSalad: Most of your functions will pass result arguments to the callback, rather than returning anything. [00:04] tetsu: SubStack: I have done a lot of javascript programming, so i'm aware of asynchronous callbacks and prototypes and all, but I can't say I have adopted any good conventions [00:05] SubStack: or if the problem doesn't lend itself to naming the intermediate steps flow control libs can help [00:05] SubStack: flow control libs are also handy for tricky parallel aggregation operations [00:05] benw_: asyncForEach is a handy function to have around sometimes. [00:05] AntelopeSalad: i'll try ben [00:06] vikstrous: hey guys, any help figuring out how variable scope works for jade templates in express? [00:06] SubStack: tetsu: well there is http://howtonode.org/ but perhaps just looking at existing projects and having http://nodejs.org/docs/v0.4.6/api/all.html handy will work for you [00:06] SubStack: tetsu: do you have anything you're trying to build in particular? [00:06] tetsu: SubStack: are there any noteable projects to look at? should i invest in a framework? [00:07] techwraith: http://nodebeginner.org/ [00:07] SubStack: there isn't much "investment" with node libs [00:07] tetsu: SubStack: well, im not usually a game programmer by nature, but i loved the real-time communications, so i thought id make a stupid game [00:07] SubStack: thank goodnes [00:07] SubStack: s [00:07] tetsu: I think I'm going to start with a small socket.io application [00:08] SubStack: that's a good place to start [00:08] SubStack: also you might like this: http://github.com/substack/dnode [00:08] tetsu: the example code looks like a good block of my work is done for me :) [00:08] tetsu: SubStack: I love it. [00:11] mattly has joined the channel [00:11] eml_ has joined the channel [00:12] benw_: I'm new to npm. When/why would I use npm link? [00:12] isaacs: benw_: if you want to create a symlink from a global installation to the local install space. [00:12] isaacs: benw_: npm help link <-- lots of info there. [00:12] Nexxy: /join #ubuntu [00:12] mjr_ has joined the channel [00:12] Nexxy: err [00:13] Nexxy: (that wasn't a suggestion) [00:13] benw_: Thanks, I read that, still not getting it. [00:13] Nexxy: I typo'd ;< [00:13] isaacs: benw_: http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/ and http://blog.nodejs.org/2011/04/06/npm-1-0-link/ [00:13] benw_: If I'm installing all my deps locally, I don't need npm link? [00:13] isaacs: benw_: nope. [00:13] isaacs: you can safely ignore it :) [00:13] benw_: Ok thanks [00:13] isaacs: np [00:14] zomgbie_ has joined the channel [00:14] Tobsn has joined the channel [00:14] benw_: I have a package that I installed locally, and I want to hack on it. [00:14] benw_: I think I want to git clone the upstream source into node_packages? [00:14] maga has joined the channel [00:15] suckerpunch has joined the channel [00:15] Hamms has joined the channel [00:17] maga has left the channel [00:17] FireFly|n900 has joined the channel [00:17] rchavik has joined the channel [00:17] zandaq has joined the channel [00:18] vish- has joined the channel [00:18] isaacs: benw_: sure, you can do that [00:19] isaacs: benw_: you may want to add it to the "bundledDependencies":["name"] array if you want to publish your package and bundle your changed version of the dep [00:19] benw_: isaacs: How do I track that version dep in package.json? [00:19] benw_: I'm more concerned with repeatability than publishing so far, but thanks [00:19] isaacs: benw_: just like a normal dep, then do "bundledDependencies":["dep"] to make sure that it doens't ever try to install hte "real" version [00:20] isaacs: ie, so it gets included in your tarball. [00:20] isaacs: also, you should send your patch to the upstream author :) [00:20] beejeebus has joined the channel [00:20] benw_: I guess I'm used to git submodules, where it refs to a  commit id [00:20] isaacs: suresure [00:20] Aria has joined the channel [00:21] benw_: Thanks, I'll go read some more [00:21] cloudhea2 has joined the channel [00:21] mbrevoort has joined the channel [00:22] beejeebus1 has joined the channel [00:22] shiawuen has joined the channel [00:23] _numbers has joined the channel [00:23] _numbers has left the channel [00:24] eml_ has joined the channel [00:24] bretts_ has joined the channel [00:25] benw_: isaacs: Thanks, blog posts very helpful, maybe link them from npmjs.org? I searched before asking here but did not find. [00:25] isaacs: ACTION needs a good information architect [00:26] onar has joined the channel [00:26] emerleite has left the channel [00:26] Me1000 has joined the channel [00:27] sunnyohno has joined the channel [00:27] chrislorenz has joined the channel [00:28] zkirill has joined the channel [00:29] etaty: In jade how can I do : a(href=#{slugify(myUrl)}) click here [00:30] broofa has joined the channel [00:31] ji0n has joined the channel [00:31] tjholowaychuk: etaty: came from ruby i take it ? :p [00:31] ExsysTech has joined the channel [00:32] tjholowaychuk: etaty: just drop the interpolation [00:33] puffpio has joined the channel [00:35] benw_: Ok, npm is funner than git submodules now. [00:35] isaacs: :D [00:35] isaacs: ACTION feels like winning [00:36] etaty: tjholowaychuk: thanks! I come from PHP ... [00:36] tjholowaychuk: a [00:36] galaxywatcher has joined the channel [00:36] tjholowaychuk: ah* [00:36] SubStack: ACTION liked npm before it was cool [00:37] Nexxy: ACTION has npm's original mix tape [00:37] etaty: there is a "bug" in the jade.vim with the colors for this line : a(href=slugify(myUrl)) click here [00:37] SubStack: I remember it well [00:38] SubStack: somebody send me a pull request [00:38] a|i: I have node-asset installed, but require('node-asset') gives: Error: Cannot find module 'node-asset' [00:38] SubStack: try this package.json, it's good shit, they said [00:38] saikat has joined the channel [00:39] tjholowaychuk: etaty: yeah it's tons of fun to parse js expressions within the attrs [00:40] a|i: anyone else having problem with require('node-asset')? [00:40] bwinton has joined the channel [00:40] a|i: maybe because it's written in coffee? [00:41] jacobolus has joined the channel [00:41] neoesque has joined the channel [00:41] Bwen: coffee keeps me awake at night... [00:41] SubStack: likewise! [00:41] Bwen: not in a good way... I need my sleep -_- [00:42] SubStack: nah there are chemicals for that now [00:42] SubStack: giraffes manage on 20 minutes to 2 hours a night [00:42] dmcquay has joined the channel [00:42] tetsu: looks like a lot of things have changed in socket.io since these howtos and examples were written [00:42] tbranyen: giraffes also have black tongues [00:42] tbranyen: so... there are tradeoffs [00:42] SubStack: :o [00:43] Nexxy: actually [00:43] Nexxy: they're kinda purple [00:43] SubStack: tbranyen: maybe the black tongues are from coffee drinking [00:43] Nexxy: ACTION was licked by one as a child. [00:43] SubStack: also I wouldn't mind a more colorful tongue [00:43] Nexxy: ACTION offers SubStack an otter pop [00:43] SubStack: ACTION away! & [00:43] briznad has joined the channel [00:43] Wa: use fruit rollup tongue tattoos [00:44] cbiscardi has joined the channel [00:44] Nexxy: Wa, go get some now. [00:44] Wa: >_> [00:45] Me1000 has joined the channel [00:45] dgathright has joined the channel [00:46] arpegius has joined the channel [00:48] ExsysTech has joined the channel [00:50] GasbaKid has joined the channel [00:52] callumacrae has joined the channel [00:55] mscdex: youknow server up! to play: http://mscdex.net:8000/index.htm for games list: http://mscdex.net:8001/ [00:55] mscdex: :-D [00:56] Nexxy: -_- [00:56] Nexxy: wat is [00:56] mscdex: i think i'll add computer player ai next [00:56] mscdex: heh [00:57] Nexxy: http://mscdex.net:8001/info/#node.js Oops! This link appears to be broken. [00:57] mscdex: heh yeah [00:57] [[zz]] has joined the channel [00:57] quackquack has joined the channel [00:57] mscdex: i just saw that [00:57] quackquack: Are there any javascript unit testing frameworks that can run tests both in Node.js and in the browser? [00:57] Nexxy: ACTION gets nervous [00:58] mike5w3c has joined the channel [00:58] mscdex: Nexxy: http://mscdex.net:8001/info/%23node.js instead [00:58] mscdex: heh [00:58] Nexxy: better! [00:58] Nexxy: but I still have no clue what this is ;o [00:58] mscdex: Nexxy: have you ever played uno? :) [00:59] Nexxy: yes [00:59] Nexxy: in 4th grade [00:59] mscdex: ha [00:59] forzan has joined the channel [00:59] Nexxy: OH [00:59] Nexxy: "youknow" [00:59] mscdex: well, this is pretty much identical :P [00:59] olegp: are the slides from andrewduponts talk up anywhere yet? [00:59] Nexxy: I see what you did there !_! [01:00] mscdex: oops, see another bug [01:00] mscdex: hooray for field testing! [01:00] ircretary has joined the channel [01:00] mscdex: i think [01:01] a|i: does node have a problem with - in module name? [01:01] mscdex: a|i: shouldn't [01:02] quirkey has joined the channel [01:02] moop has joined the channel [01:03] a|i: mscdex: node-asset closure-compiler yui-compressor .. modules with - cannot be loaded [01:03] Nexxy: dumb question, are you using quotes? ;3 [01:04] a|i: Nexxy: yes. [01:04] brianloveswords has joined the channel [01:05] darkos: tjholowaychuk: i've been playing a lot with jade/stylus lately and was wondering if you knew of any syntax highlighting for notepad++ [01:06] tjholowaychuk: nope sorry [01:06] Corren has joined the channel [01:06] bartt has joined the channel [01:07] darkos: i might put one together then, would you want me to send it over so you can add that option? [01:07] tjholowaychuk: yeah sure [01:07] etaty has left the channel [01:08] brolin has joined the channel [01:08] sstreza has joined the channel [01:08] dgathright has joined the channel [01:08] nail_ has joined the channel [01:09] jfalvarez has joined the channel [01:10] Wa: if you're wanting syntax highlighters tjholowaychuk, I made one of ejs for gEdit: https://gist.github.com/949556 [01:10] Wa: +the other day [01:10] tjholowaychuk: cool man [01:11] chjj has joined the channel [01:11] ExsysHost has joined the channel [01:12] Wa: quickly adjustable if you accept that pull request on filters for it, too :p [01:12] Nexxy: I mentioned that to him already and he was like [01:12] Nexxy: pshhh [01:13] Wa: yeah I know [01:13] Wa: lol [01:13] Draggor: Anyone here knowledgable with oauth/google accounts and willing to listen to some possible insane questions? [01:13] ericnakagawa has joined the channel [01:15] Corren_ has joined the channel [01:15] superstructor has joined the channel [01:17] copongcopong1 has joined the channel [01:18] Marak has joined the channel [01:21] ericnakagawa has joined the channel [01:22] mscdex: kersny: ok, gotta shut the server down and fix some bugs :) [01:22] hasenj has joined the channel [01:22] dnolen has joined the channel [01:22] kersny: mscdex: ok, cool. pretty fun to play! [01:23] mscdex: yep, still a work in progress though [01:23] mattly has joined the channel [01:25] jaket has joined the channel [01:26] highermath_away has joined the channel [01:29] aaronblohowiak has joined the channel [01:29] brolin has joined the channel [01:29] tonymilne: In Mongoose, can i call a findById model function from within a static method defined on the schema? [01:29] bshumate has joined the channel [01:29] shiawuen has left the channel [01:29] shiawuen has joined the channel [01:29] k1ttty has joined the channel [01:31] dyer has joined the channel [01:31] dyer has joined the channel [01:32] ditesh|cassini has joined the channel [01:33] okuryu has joined the channel [01:33] trotter has joined the channel [01:34] tonymilne: Maybe this gives an idea of what i am trying to do: http://pastie.org/1858862 [01:35] tonymilne: Problem is around line 27 - I need to grab a reference to the mongoose model with said functions that I want to use. [01:35] rohit_nsit08 has joined the channel [01:37] mdaisuke has joined the channel [01:38] Wa: tonymilne; when I was looking at it before I couldn't find any capability of extracting the model from a schema so I just saved the model separately [01:38] Wa: but I also only read the docs and the docs aren't that great [01:38] jtsnow has joined the channel [01:39] tonymilne: At the end of the file, i specify module.exports = mongoose.model('example') - would this mean i could get access to the model that way? Also, presumably i could just get access to the model through Mongoose.model('example') but was wondering if there was a better way? [01:43] vikstrous: variable scope for views in express is so weird [01:43] vikstrous: the local variables in template files are in the global object D: [01:44] tjholowaychuk: ? [01:44] tjholowaychuk: no they are not.. [01:44] mscdex: interesting, websockets version 07 is in last call now [01:44] ako has joined the channel [01:44] vikstrous: when you assign a local variable inside a template it ends up in the global object [01:44] mscdex: looks like their confident they have the protocol correct now [01:44] mscdex: s/their/they're/ [01:44] tjholowaychuk: vikstrous: if you dont use var yeah.. [01:45] tjholowaychuk: that's how js works [01:45] tjholowaychuk: :p [01:45] vikstrous: ohh you're supposed to use var? [01:45] stagas: haxball clone in maga! (kind of) http://stagas.com:8777/ [01:45] vikstrous: i never really understood when to use it and when not to use it [01:45] tjholowaychuk: vikstrous: depends on the template engine [01:45] vikstrous: hmm [01:45] Wa: var puts it in local [01:45] vikstrous: well i'm using jade [01:45] tjholowaychuk: use var when you dont want a global [01:45] vikstrous: ahh i see [01:45] gtramont1na has joined the channel [01:45] Opaque has joined the channel [01:46] Wa: it's like saying "create this variable here", cause when you set, the engine looks for the name to set, and it does so by bubbling up from the current scope until it finds it [01:46] mscdex: stagas: i'm lost... am i supposed to be doing something there? [01:46] Wa: so if it was never declared with var, it ends up in the global [01:46] mscdex: stagas: i'm moving my mouse but nothing is happening? [01:46] stagas: mscdex: arrow keys + space [01:47] mscdex: :S [01:47] mscdex: what does space do? [01:47] stagas: mscdex: shoots if you have the ball [01:48] tonymilne: Hmm, so turns out what I was trying to do with Mongoose model static functions is quite easily achievable... just that I was not traversing a previous model.doc.attribute properly. :S [01:48] Tidwell has joined the channel [01:49] bradleymeck1 has joined the channel [01:49] mscdex: silly mongoose [01:49] vikstrous: Wa: okay thanks, that makes sense. [01:50] cbiscardi has joined the channel [01:50] tempo has joined the channel [01:51] tonymilne: Neat ball game! :D I was just bashing into someone. [01:51] stagas: tonymilne: probably me :P [01:51] jakehow has joined the channel [01:51] benw_: Are fn.call(this), fn.apply(this) and fn.apply(this, []) equivalent in speed? [01:52] tonymilne: There are so many games I want to write using Node... A port of TetriNET for one. [01:53] zentoooo has joined the channel [01:54] EvilPacket has joined the channel [01:55] Wa: benw_; call all three with console.log(Date.now()) in between? :p [01:55] benw_: Yeah yeah ok :) [01:57] quackquack has joined the channel [01:58] seivan has joined the channel [01:58] demastrie has joined the channel [01:58] demastrie has left the channel [01:59] bradleymeck2 has joined the channel [01:59] temp01 has joined the channel [02:00] quackquack: Can expresso testing be used in the browser in addition to the server? [02:04] briznad has joined the channel [02:07] admc has joined the channel [02:08] Viriix has joined the channel [02:10] willwhite has joined the channel [02:10] brianloveswords has joined the channel [02:10] mbrevoort has joined the channel [02:12] fakewaffle_ has joined the channel [02:12] fakewaffle_: hi [02:12] whozman has joined the channel [02:13] Wa: hi [02:13] fakewaffle: what module do people like for MongoDB? [02:13] whozman has left the channel [02:13] Wa: I like mongoose except for its docs [02:13] stagas: fakewaffle: https://github.com/marcello3d/node-mongolian [02:13] jaket_ has joined the channel [02:13] Wa: but I also only looked at two :S [02:14] Corren has joined the channel [02:14] rook2pawn has joined the channel [02:17] dspree has joined the channel [02:21] dguttman has joined the channel [02:21] dgathright has joined the channel [02:22] xeodox: In Node.JS, how do I turn an object ID into a string? [02:22] xeodox: mongo objectid [02:23] Emmanuel__ has joined the channel [02:26] __tosh has joined the channel [02:28] Wa: did you try String()? [02:28] xeodox: how? [02:29] Wa: String(myobjectid) [02:29] xeodox: String(object_id)? [02:29] Wa: yeah [02:29] Wa: if objectid has a toString method that'll work [02:29] Wa: I dunno if it does or not offhand [02:30] xeodox: grea,t thanks! [02:32] mengxy has joined the channel [02:34] mw has joined the channel [02:34] mw has joined the channel [02:35] cloudhead has joined the channel [02:35] blueadept: mongolian has a good GridFS interface [02:36] gleicon has joined the channel [02:37] jpld has joined the channel [02:38] Corren has joined the channel [02:40] pcardune has joined the channel [02:42] ryanfitz has joined the channel [02:42] davidcoallier has joined the channel [02:42] dyer has joined the channel [02:43] mengxy has joined the channel [02:45] baudehlo has joined the channel [02:48] ako has joined the channel [02:50] tempo: Using mikeal/request how do you stream the response body to a writeStream? The example in the readme isn't very clear. [02:51] zakabird has joined the channel [02:52] Nexxy has joined the channel [02:52] Nexxy: ugh natty narwhal is full of fail [02:53] mscdex: why? [02:53] Nexxy: the release upgrade from 10.10 went fine... or so I thought until I rebooted [02:54] Nexxy: now it won't launch X and just hangs there trying to start various services [02:54] Nexxy: lol [02:54] mscdex: never had that problem [02:54] Nexxy: qq [02:54] mscdex: and i've upgraded 3 different 10.10 installations so far [02:54] Nexxy: oh well! I still have byobu and irssi! [02:55] mscdex: actually, i upgraded all 3 from 10.04 [02:55] mscdex: :p [02:55] jgv has joined the channel [02:55] Nexxy: well aren't we something [02:55] mscdex: we are [02:55] Nexxy: I was using the royal we [02:55] mscdex: WE ARE #Node.js! [02:55] Nexxy: we are not amused! [02:55] ngs has joined the channel [02:55] Nexxy: oh wait, that's the python channel [02:56] Nexxy: maybe it had something to do with me messing with xrandr [02:56] Nexxy: ;/ [02:56] rauchg has joined the channel [02:56] Nexxy: but no one in #ubuntu seems to know anything about X [02:56] Corren has joined the channel [02:56] Wa: is there a channel for x? [02:56] Nexxy: idunnolol! [02:56] Nexxy: I'm just backing up my home dir and reinstalling, rather than screwing around with it [02:57] Nexxy: Wa: fix muffin for me plx so I can scp to it [02:57] Nexxy: nm I'll query you [02:59] mscdex: woo 450mb to install wine1.3 [03:02] Nexxy: ^lol [03:02] sivy has joined the channel [03:02] Nexxy: now my turn [03:04] mscdex: but that's only because i'm running the amd64 edition and wine is 32 bit [03:04] mscdex: so it has to pull in a boat load of 32bit libs [03:04] mscdex: :s [03:04] Nexxy: just how big is a boat load? [03:04] mscdex: a sizable load [03:05] Nexxy: lol [03:05] mscdex: sheesh and it's not even the latest version of wine [03:06] Nexxy: wow [03:06] mscdex: 4 versions behind :( [03:06] Nexxy: why don't you whine about it a little... [03:06] Nexxy: ;o [03:06] mscdex: I WILL [03:06] unomi has joined the channel [03:06] Nexxy: ... GET IT?! [03:06] mscdex: they're supposed to be on top of things [03:06] Nexxy: WHINE... about WINE?! [03:06] mscdex: ! [03:06] Nexxy: nevermind ._. [03:06] mscdex: !! [03:07] mscdex: Nexxy: that might ordinarily work, but it's a monday [03:07] Wa has joined the channel [03:07] Nexxy: monday funday [03:07] Nexxy: welcome back dear [03:07] Nexxy: I didn't realize checking an IP address was that involved! [03:08] zivester has joined the channel [03:08] mscdex: go go gadget debugger! [03:08] Wa: why does my sendq skyrocket when I join freenode? (I'm on xchat) [03:08] Nexxy: -> #xchat [03:08] Wa: :T [03:08] Nexxy: :F [03:08] mscdex: :S [03:08] Wa: will try to disable plugins sometime and check I guess [03:08] Nexxy: :U [03:08] Nexxy: now arrange the faces! [03:08] Nexxy: :S :T :F :U [03:09] Wa: >_>; [03:10] esmaxwill has joined the channel [03:10] Nexxy: Wa: I know how to fix it [03:10] fakewaffle: why does "nodemon pie/app.js" look in "/piejs/pie/pie/app.js" and not "/piejs/pie/app.js" [03:10] kevliu has joined the channel [03:10] fakewaffle: i'm in /piejs/ [03:10] mscdex: must be some crazy nonsense going on in nodemon [03:11] Nexxy: hot sour soup fixes everything [03:11] mscdex: what if you try nodemon ./pie/app.js ? [03:11] fakewaffle: same [03:11] fakewaffle: it likes pie i guess [03:11] mscdex: i blame nodemon [03:11] vially has joined the channel [03:11] mscdex: nodemon is attempting to sabotage your pie recipe [03:11] fakewaffle: lal [03:11] fakewaffle: lol* [03:12] Nexxy: perhaps it would prefer a cobbler of some sort [03:12] jgv has joined the channel [03:13] fakewaffle: Nexxy++ [03:13] v8bot: fakewaffle has given a beer to Nexxy. Nexxy now has 2 beers. [03:13] Nexxy: zomg! ty <3 [03:13] mscdex: fakewaffle: a long time ago i had started on a cakephp for js project called donutjs [03:13] Nexxy: ACTION shotguns [03:14] fakewaffle: lol really? [03:14] mscdex: yeah [03:14] fakewaffle: awesome name [03:14] mscdex: but nobody really seemed interested, so i stopped working on it :P [03:14] Nexxy: >php [03:14] Nexxy: found your problem [03:15] fakewaffle: ive abandoned mysql, in favor of mongoDB [03:15] Nexxy: fakewaffle++ [03:15] v8bot: Nexxy has given a beer to fakewaffle. fakewaffle now has 1 beers. [03:15] fakewaffle: *is drunk [03:15] mscdex: you should have a pluggable model data source system like cakephp! [03:15] Nexxy: wow, cheap date. [03:15] F1LT3R_ has joined the channel [03:15] fakewaffle: lol i know [03:15] Nexxy: how *you* doin' [03:15] fakewaffle: im trying to do that, but i'm only one man [03:16] mscdex: heh [03:16] mscdex: i know how it goes, but that would be ideal [03:16] fakewaffle: yeah it would [03:16] Nexxy: ACTION would contribute to something like that [03:17] fakewaffle: i started off that way, and i had a test datasource called turd working with reads, and some read functionally working with mysql [03:17] fakewaffle: but i dont know what direction i want to go, lol [03:17] fakewaffle: actually, it was called stool haha [03:17] Nexxy: ok you'd have to rename it though [03:17] Nexxy: I don't play with poo. [03:17] Nexxy: one of my very few rules. [03:18] fakewaffle: if i get my shit together with it a bit more, would you guys be willing to help out? [03:18] Nexxy: only if you use less fecal references [03:19] Nexxy: ;3 [03:19] fakewaffle: lol [03:19] Nexxy: are you talking something like PDO? [03:19] fakewaffle: pdo? [03:19] Nexxy: php data object [03:19] Nexxy: the SQL wrapper for php [03:19] Nexxy: that everyone just *loves* [03:19] fakewaffle: i dont think so [03:20] fakewaffle: have you used cakephp before? [03:20] Nexxy: I tried [03:20] Nexxy: but I was liek [03:20] sub_pop has joined the channel [03:20] Nexxy: "wow! it's going to take me just as long to figure this stuff out as it would to just do it myself" [03:20] fakewaffle: *waits for rage face* [03:20] Nexxy: and I had already fallen out of love with PHP by the time I got around to it [03:21] Billbad has joined the channel [03:21] fakewaffle: yeah im not in love with it, either, but ive developed a pretty huge app with it [03:21] Nexxy: the only substantial thing I ever built with php was a crm/billing app [03:22] Nexxy: other than dynamic websites [03:22] fakewaffle: yeah [03:23] Nexxy: oh! I maed a personal finance app too [03:23] Nexxy: complete w/ power payment calculator! [03:23] Nexxy: that used temporary mysql tables, lol [03:23] fakewaffle: lol [03:23] superjudge has joined the channel [03:24] fakewaffle: i just dont know how i could abstract the model methods to be generic enough to work with something ilke mysql, oracle, and mongodb [03:24] mscdex: just use cakephp as a guide i'd say [03:24] mscdex: see how they do it [03:24] mscdex: that should give you some idea at least [03:25] fakewaffle: at least they are all working with sql though? [03:25] mscdex: eh not necessarily [03:25] mscdex: i think they have non-sql data sources [03:25] bartt has joined the channel [03:25] Nexxy: I would put postgres support over oracle myself [03:25] mscdex: yeah [03:25] Nexxy: who uses oracle anymore? [03:25] Nexxy: no one important. [03:25] mscdex: corporate does! [03:25] fakewaffle: government [03:25] mscdex: java huggers [03:25] Nexxy: >important [03:26] Nexxy: I said important not impotent ;P [03:26] fakewaffle: i work for a county, and they wanted me to use oracle for my app [03:26] Nexxy: l2english! [03:26] Nexxy: Wa: hot sour soup! stop flirting in #python and get ready [03:26] fakewaffle: i was like http://i498.photobucket.com/albums/rr347/jakerd7/Yao-Ming-meme.jpg [03:27] Wa: ..? [03:27] Wa: I'm not flirting anywhere :| [03:27] Nexxy: mmhmm. [03:27] path[l] has joined the channel [03:27] fakewaffle: thats kinda how i had/have it setup: dispatcher -> PostsCntroller -> PieController -> Model -> DataSource (could be anything) [03:28] Nexxy: flat files? [03:29] vially has joined the channel [03:29] piscisaureus has joined the channel [03:29] fakewaffle: that's what stool was, as a test [03:30] fakewaffle: what i liked about cakephp, as long as you knew their conventions, was that you just basically plugin and start coding your controllers and views [03:30] fakewaffle: of course, setup your relations and everything... [03:30] dmcquay has joined the channel [03:32] beriberikix has joined the channel [03:32] click_click has joined the channel [03:33] Nexxy: oh wow, scp -v is way more verbose than I was expecting [03:33] fakewaffle: no crap huh??! [03:33] Nexxy: seems liek half of that should be more -vv than -v [03:33] fakewaffle: it should just write out binary [03:33] davidcoallier has joined the channel [03:33] Nexxy: lol [03:33] Nexxy: uh huh [03:34] beriberikix: Anyone run into issues with readFile? [03:34] Nexxy: beriberikix: thta's a rather vague question [03:35] beriberikix: okay, well, I'm specifically having issues with the returned value in the callback [03:35] beriberikix: it gets returned and I can do a console.log [03:36] beriberikix: but when I try to throw the code in a constructor, it returns an empty obj [03:36] fakewaffle: paste it in pastebin or something? [03:36] mscdex: readFile shouldn't return anything? [03:36] mscdex: readFileSync on the other hand will.... [03:36] fakewaffle: mscdex: he did mention in the callback [03:37] mscdex: oh, missed that [03:37] beriberikix: mscdex: that's a good point, I actually tried both [03:37] mscdex: i need to bust out some of that coffee ice cream [03:37] mscdex: :D [03:37] Nexxy: share. [03:38] mscdex: beriberikix: yeah i'd gist your code [03:38] fakewaffle: *vomits in mouth a little* [03:38] charlesjolley- has joined the channel [03:38] Nexxy: tmi [03:39] beriberikix: http://pastebin.com/HSnEdmCg [03:39] beriberikix: hmm, now looking at it, it may be jacked [03:40] beriberikix: I copied the sample from xml2js, which added a listner [03:40] fakewaffle: god...? [03:40] Nexxy: yes my child? [03:40] fakewaffle: i repent [03:40] Nexxy: all is forgiven [03:40] Nexxy: ... just drink this jello shot. [03:40] Nexxy: and lie down ;3 [03:40] fakewaffle: Nexxy++ [03:40] v8bot: fakewaffle has given a beer to Nexxy. Nexxy now has 3 beers. [03:41] Nexxy: ACTION only has 2 hands [03:41] Nexxy: or *do* I? [03:41] fakewaffle: haha [03:41] Nexxy: apparently I downloaded VB6 [03:42] mscdex: beriberikix: side note: you can use 'on' instead of 'addListener' [03:42] fakewaffle: michael jackson is dead?!?! [03:42] Nexxy: slowpoke.jpg [03:42] Nexxy: yeah ;< basketball will never be the same [03:42] towski has joined the channel [03:43] fakewaffle: lol [03:43] beriberikix: mscdex: ah, that's a good point. Do I even need the listener in this case? [03:43] Nexxy: mscdex: thank you for reminding me that I had ice cream in the freezer [03:43] mscdex: beriberikix: no idea, never used that xml2js module, i usually use my own homegrown async converter [03:43] Nexxy: mscdex++ [03:43] v8bot: Nexxy has given a beer to mscdex. mscdex now has 12 beers. [03:44] mscdex: yes! finally, a number of beers divisible by 12! [03:44] Nexxy: I wish the bot could give me wine coolers instead of beer [03:44] mscdex: beriberikix: your readFile call looks fine to me [03:45] fakewaffle: i like buttery nipples the most [03:45] Nexxy: ACTION blinks [03:45] Nexxy: ACTION makes sure to keep the dairy products away from fakewaffle  [03:46] fakewaffle: Nexxy-- [03:46] v8bot: fakewaffle has taken a beer from Nexxy. Nexxy now has 2 beers. [03:46] Nexxy: awwww [03:46] fakewaffle: don't touch my dairy! [03:46] Nexxy: ._. yes sir [03:46] fakewaffle: poker face? [03:46] Nexxy: no that's :| [03:47] Nexxy: ._. is the "okay." face [03:48] mscdex: looks like an upside down car to me [03:48] Nexxy: ACTION tilts head [03:48] Nexxy: if you say so [03:48] fakewaffle: mscdex++ [03:48] v8bot: fakewaffle has given a beer to mscdex. mscdex now has 13 beers. [03:48] mscdex: i believe i did [03:48] fakewaffle: lol [03:48] Nexxy: oh is that how we're going to be? [03:48] mscdex: node.js rules! [03:49] Nexxy: ACTION fist pump [03:49] Nexxy: yusss [03:49] loungin has joined the channel [03:51] unomi has joined the channel [03:51] mscdex: mmmmm starbucks coffee concentrate [03:51] mscdex: mmmmm locust bean gum [03:51] Nexxy: intravenously? [03:51] halfhalo: mmmmm pure coke [03:52] mscdex: no, those are a couple of the ingredients in this ice cream [03:52] halfhalo: wait, what? [03:52] mscdex: it's not half bad actually [03:52] Nexxy: halfhalo: the 80's called... [03:52] Nexxy: they want their drugs back [03:52] halfhalo: who said it was that coke? [03:52] Nexxy: >pure [03:52] mscdex: pure as in not-RC-cola [03:53] Nexxy: besides, contextually it made the most sense [03:53] Nexxy: omg RC is way better than coke [03:53] halfhalo: you are dead to me [03:53] Nexxy: baby come back [03:53] fakewaffle: what movie should i watch? [03:53] Nexxy: I didn't mean it [03:53] mscdex: bring out the "dead to me" board! [03:53] mscdex: oh that reminds me [03:54] Nexxy: fakewaffle: shortbus [03:54] beriberikix: mscdex: does the parser even need a listener? [03:54] Nexxy: I feel as though it would be right up your alley [03:54] mscdex: i need to bring this image back from the dead [03:54] Nexxy: if you catch my drift [03:54] mscdex: beriberikix: no idea, never used that xml2js module [03:54] mscdex: beriberikix: i dunno where it's even from [03:54] Nexxy: mscdex: peru [03:54] Nexxy: oh wait [03:54] halfhalo: omg [03:55] halfhalo: hangover part 2 [03:55] beriberikix: mscdex: its a crappy module that's high on google :p [03:55] halfhalo: ACTION needs to watch the first for once [03:55] Nexxy: at least it's not high on pcp [03:55] mscdex: beriberikix: heh... well i can dig up my little converter if you want [03:56] beriberikix: mscdex: yup, that would save me some time [03:56] beriberikix: :) [03:56] loungin: Anyone know how to get a hex string from a ObjectId in Mongoose ORM? [03:57] wasabi_ has joined the channel [03:58] Wa: String(myobjectid) ? [03:58] mscdex: http://i52.tinypic.com/2ibjns0.jpg :-D [03:58] mscdex: loungin: if the object is a Buffer, then just do .toString('hex') on it [03:58] halfhalo: lol [03:58] halfhalo: win [03:59] loungin: mscdex: it's a ObjectId object from mongoose :\ [03:59] mscdex: loungin: i don't know mongoose, sorry :S [03:59] loungin: thank you though [03:59] Nexxy: does anyone happen to use finch? [04:00] gavin_huang has joined the channel [04:00] loungin: Wa: didn't work :\ [04:00] md80 has joined the channel [04:00] wao: mscdex: what?! [04:00] wao: :D [04:00] mscdex: Nexxy: no, but i wrote an oscar module for node! [04:00] loungin: toString returns basically '[global object]' [04:00] Wa: weird [04:00] Nexxy: aren't you looking for [04:01] Nexxy: ._id ? [04:01] bradleymeck1 has joined the channel [04:01] Wa: can you browse the object? I'm sure it's in there somewhere [04:01] Wa: unless it's that ^ [04:01] loungin: Nexxy: yeah, i'm trying to get a string representation of the hexstring in it [04:01] Nexxy: and toString no workey? [04:01] saikat has joined the channel [04:01] tetsu: how do i send images to the browser with nodejs? [04:01] loungin: the ._id bit is the object [04:01] loungin: toString isn't doing it [04:01] Nexxy: tetsu: use express! it does it automagically! [04:02] rpflo has joined the channel [04:02] tetsu: Nexxy: hmm. [04:02] Nexxy: tetsu: as long as you define the root directory for static files [04:02] Nexxy: anything requested that is a static file and is publicly accessible will be served [04:03] Nexxy: plus I'd imagine if you're developing a web app, there are a lot of other useful things express can do for you [04:03] mscdex: beriberikix: here's a version that uses libxmljs: https://gist.github.com/416021 and here's one that uses a pure js xml parser (sax from npm): https://github.com/mscdex/node-nntp/blob/master/examples/nzb/nzb.js#L155 [04:04] mscdex: you'll have to tailor the latter to your own needs since it's not a generic function, but it's pretty similar to the libxmljs one [04:04] beriberikix: mscdex: *bows* [04:04] beriberikix: mscdex: thanks! [04:05] tetsu: Nexxy: well this will be a lot more complicated to learn than i had hoped, i thought i was almost done with my little project :p, but it looks worth the try [04:05] tetsu: thanks for the suggestion [04:05] tetsu: Nexxy: do you know if i can attach Socket.IO to an Express server? [04:05] mscdex: tetsu: just make sure you guard against malicious requests though [04:06] tetsu: ah, never mind, obvious answer [04:06] rworth has joined the channel [04:06] Nexxy: tetsu: definitely [04:06] Nexxy: ;3 [04:07] Nexxy: it's not as daunting as it looks at first [04:07] Nexxy: if you can get past the lack of complete documentation [04:07] tetsu: well [04:07] tetsu: that im usually not good at :( [04:07] heino_ has joined the channel [04:08] Nexxy: not good at frowning? [04:08] Nexxy: that's a good thing ;> [04:08] Nexxy: fakewaffle: may I also recommend "The Birdcage"? [04:08] fakewaffle: Nexxy++ [04:08] v8bot: fakewaffle has given a beer to Nexxy. Nexxy now has 3 beers. [04:08] Nexxy: fabulouth! [04:08] mscdex: may i recommend the Naked Gun series? [04:09] mscdex: :P [04:09] fakewaffle: mscdex++ [04:09] v8bot: fakewaffle has given a beer to mscdex. mscdex now has 14 beers. [04:09] XYXing has joined the channel [04:09] halfhalo: ACTION shall load up the bourne series on his zune for tomorrow [04:09] XYXing: Hello, everyone~~ [04:09] mscdex: hola [04:09] Nexxy: como estas! [04:10] XYXing: I wrote a simple tool to embed NODEjs code into html file, just like eRuby~ [04:10] mscdex: you reinvented ejs? [04:10] mscdex: :S [04:10] Nexxy: lol [04:10] XYXing: not ejs [04:10] Nexxy: I was just about to type that ;< [04:10] fakewaffle has left the channel [04:10] XYXing: ejs is just embeded javascript [04:10] fakewaffle has joined the channel [04:11] mscdex: you can use node stuff in there too [04:11] fakewaffle: command + w closes stuff, fyi [04:11] XYXing: ejs can not interact iwth , for example, mongoose [04:11] halfhalo: lol [04:11] mscdex: why would you want to use mongoose within your view? [04:11] halfhalo: that's just... wrong [04:11] XYXing: yup, I agree with it [04:12] XYXing: that's entirely wrong [04:12] mscdex: eh? [04:12] halfhalo: wait.... can you pass in mongoose to ejs? [04:12] Nexxy: lol [04:12] mscdex: if you can catch one [04:12] Nexxy: why would you do that? [04:12] XYXing: just for example (for fun ?), we can write NODE in html, it's fun [04:12] halfhalo: ACTION is now curious [04:13] stalled has joined the channel [04:13] mscdex: XYXing: but why? [04:13] mscdex: you should strive to keep only layout and data display stuff in there [04:13] Nexxy: doesn't that kinda break MVC? [04:13] mscdex: no business logic or anything [04:13] XYXing: ejs can't include node modules such as mongoose I guess [04:14] Nexxy: that's not its job [04:14] XYXing: yup, directly envoke data in view shoild break MVC architecture [04:14] halfhalo: I will admit, I do have some logc in my views such as (if blah do foo else bar), but that's it [04:14] Nexxy: shame [04:15] mscdex: halfhalo: well that's not that bad [04:15] halfhalo: its generally for hiding a link or so, that's it [04:15] Nexxy: I can understand using logic liek for alternating row colors and stuff like that [04:15] mscdex: but doing database calls and filesystem calls is just bleh [04:15] halfhalo: yah, fck that [04:15] mscdex: i have to maintain a big php project that currently does crap like that [04:16] mscdex: it's very stressful [04:16] XYXing: I do that just firfun, because I played eRuby before, and wanna write some stuffs like that [04:16] samsonjs has joined the channel [04:17] Nexxy: Wa: let's go! [04:17] halfhalo: I also make it so that the page works with no variables being assigned as well [04:18] tetsu: Nexxy: with like 3 lines of code you have significantly simplified my program [04:18] tetsu: that was amazing [04:18] Nexxy: tetsu: thank tj! he's the one that made it! ;3 [04:19] tetsu: i deleted half of it [04:19] Nexxy: isn't it though? [04:19] XYXing: obviously, to emded NODE codes into html can not spur and guy's interest XD~ha~ [04:19] halfhalo: try/catch? [04:19] Nexxy: XYXing: try drawing some boobs on it [04:19] Nexxy: they'll be all over it [04:19] halfhalo: yup [04:22] XYXing: good idea [04:22] mscdex: i think this would make a cool mascot for the mongoose module: http://darksaber.me/Blog/wp-content/uploads/2011/01/Mongoose_20660552_std.jpg [04:22] superjudge has joined the channel [04:22] pifantastic has joined the channel [04:23] yozgrahame has joined the channel [04:23] nadirvardar has joined the channel [04:24] Wa: oh god o.o [04:29] yozgrahame has joined the channel [04:29] jtsnow has joined the channel [04:30] fakewaffle: so mscdex ready to help? [04:30] fakewaffle: or provide advise lol [04:31] pcardune has joined the channel [04:35] fakewaffle: i dont know what to do! do i provide a common "language" to query, and each datasource should implement it? [04:35] fakewaffle: by language, i mean method, [04:38] mscdex: fakewaffle: like i said earlier, just start out by following what cakephp does [04:38] mscdex: they probably have some subclassing going on [04:38] fakewaffle: yeah, inception style [04:39] mscdex: like some basic data source thing, then probably they have an sql subclass [04:39] mscdex: then mysql and postgres et al are subclasses of that [04:39] mscdex: you'd have to look though, but i think it's something like that [04:40] fakewaffle: yeah [04:41] pquerna has joined the channel [04:41] pquerna has joined the channel [04:47] rauchg has joined the channel [04:49] tk has joined the channel [04:49] BHSPitMonkey has joined the channel [04:50] BHSPitMonkey: Is there a good technique for creating a node module file that can also be included in a web page normally? [04:51] BHSPitMonkey: I tried some hackery with the 'exports' object, but still haven't fully gotten there [04:51] kriszyp has joined the channel [04:52] marcab: Best I've seen is putting exports in a conditional statement. [04:53] marcab: I hope someone here has a better recipe [04:54] Shrink has joined the channel [04:57] cwang has joined the channel [04:59] leoju has joined the channel [05:00] bene has joined the channel [05:02] tetsu: if I want to share state information of several actors client-side, but I don't want to do a socket.send() on every keypress, is a setInterval a terrible idea? [05:02] benw_: BHSPitMonkey: marcab: The pegjs lib does a good job of that. [05:02] pyrotechnick1 has joined the channel [05:03] pyrotechnick1: hey lads [05:03] tetsu: I could have socket.io accept a message from each player, and broadcast their new location out, but that would be a lot of duplicated data if several people were moving at once [05:03] pyrotechnick1: anyone know of an inflection library actually published on npm? [05:03] pyrotechnick1: i just want camelCase -> camel_case [05:03] BHSPitMonkey: benw_: I'll check it out, thanks! [05:03] benw_: np [05:05] BHSPitMonkey: tetsu: I'm facing the same decisions right now, too. I think as long as ordering is preserved, batching input events and sending them on an interval would be okay. [05:05] balaa has joined the channel [05:05] tetsu: BHSPitMonkey: are you using socket.io? [05:06] BHSPitMonkey: yes [05:06] BHSPitMonkey: not that it's really important, when we're talking about design at an abstract level [05:06] tetsu: I thought Socket.IO might have already had an 'interval updater' built in [05:07] tetsu: does it send data over like once a second [05:07] tetsu: for something [05:07] BHSPitMonkey: tetsu: I believe it does have some sort of heartbeat, not sure of its regularity though [05:07] Bonuspunkt: whats the best way to do node to node communication? stdout? [05:08] gkatsev: sockets? [05:08] gkatsev: file dumps? [05:08] pyrotechnick1: Bonuspunkt: IPC [05:09] nulled_ has joined the channel [05:09] gkatsev: pyrotechnick1: I guess I was naming IPC stuff. :) [05:10] benw_: member:BHSPitMonkey: member:marcab: My mistake - qunit, not pegjs (which uses qunit). [05:10] benw_: grr [05:10] BHSPitMonkey: benw_: oh, okay. I was reading up on pegjs and it really seemed like overkill. [05:10] nulled_: What node js tools and what have you do I need to replace the following (PHP/PHP_GD/PHP_MySQL/sha1/md5/Apache2/PHP_Sessions/Cookies ) Thanks in advance :P [05:10] BHSPitMonkey: or underkill, as it may be [05:10] benw_: I only meant to point at the conditional snippet it uses to do it. [05:11] konobi: nulled_: google [05:11] konobi: =0) [05:11] nulled_: whats google? [05:11] nulled_: kidding [05:11] benw_: / Expose the API as global variables, unless an 'exports' [05:11] benw_: / object exists, in that case we assume we're in CommonJS [05:11] benw_: if ( typeof exports === "undefined" || typeof require === "undefined" ) { [05:11] benw_: extend(window, QUnit); [05:11] benw_: window.QUnit = QUnit; [05:11] benw_: } else { [05:11] benw_: extend(exports, QUnit); [05:11] benw_: exports.QUnit = QUnit; [05:11] benw_: } [05:11] pyrotechnick1: l2pastebin bro [05:11] benw_: Sorry, irc noob [05:11] pyrotechnick1: nulled_: do u need to stick with mysql or r u just playing and wouldnt mind trying something different? [05:12] indutny has joined the channel [05:12] quackslike: quack [05:12] nulled_: dont need mysql nesssarily.. as long as there is a good replacement [05:12] pyrotechnick1: nulled_: express will replace the majority of what you have listed — http://expressjs.com/ [05:13] nulled_: SWEEET [05:13] pyrotechnick1: node doesn't need to be hosted on something like apache [05:13] nulled_: Oh aand Virtual Hosts [05:13] nulled_: directory restricts ..htaccess etc [05:13] pyrotechnick1: well express sits on connect [05:13] pyrotechnick1: have u ever used rack? [05:13] pyrotechnick1: or cgi? [05:13] tetsu: BHSPitMonkey: if we're just transferring state information periodically, is there a way to make a socket.send() return data to the client? do an update_and_get [05:13] pyrotechnick1: connect is like node's rack/cgi/middleware [05:13] pyrotechnick1: and express sits on that [05:13] pyrotechnick1: connect gives you vhosts i think [05:14] pyrotechnick1: sha1 i think is built into node now if i'm not mistaken [05:14] pyrotechnick1: the crypto module [05:14] Me1000 has joined the channel [05:14] pyrotechnick1: PHP_GD [05:14] pyrotechnick1: is that for images? [05:14] nulled_: Im excited about node.js I wanna develope somethimg All in the browser using Could6IDE and never leave the browser [05:14] nulled_: Yeah for Imagines Graphics [05:15] pyrotechnick1: there's a few options for that [05:15] nulled_: like create gifs jpgs etc [05:15] BHSPitMonkey: tetsu: not sure what you mean [05:15] pyrotechnick1: the best place to start is http://github.com/joyent/node/wiki/modules [05:15] nulled_: ok thanks [05:15] pyrotechnick1: but its pretty hard, especially as a noob, to know which is better [05:15] nulled_: does node support multi CPUs? [05:15] pyrotechnick1: because there's so many options, options is a good thing in the end, but very difficult to get started with [05:15] pyrotechnick1: kind of [05:15] BHSPitMonkey: tetsu: but I should advise you that I'm in the same boat you are; I'm working on my first real multiplayer node game and I've only just begun making these decisions [05:16] nulled_: yeah node.js will condense in time [05:16] pyrotechnick1: to really milk the most out of a machine you need to spawn many instances but there's libraries to help with that, the best IMHO is cluster [05:16] pyrotechnick1: the os module reports on cpu/other system information and cluster uses that to try and launch an optimal amount of "workers" [05:17] nulled_: anyone use Cloude9ide? [05:17] pyrotechnick1: you might want to read through the higher level docs on nodejs.org it sort of explains what node is about [05:17] tetsu: BHSPitMonkey: same boat then :). what i'm saying is, if we are sending the data every 1/20th of a second, and we want to send the client back data every 1/20th of a second, we would still need a poller to get that data back into the client, wouldnt we? [05:17] pyrotechnick1: ive tried a few times but it always bugs out for us [05:17] tetsu: i guess i havent done any server->client socket stuff yet [05:17] pyrotechnick1: i think my account is a bit dodgy [05:17] pyrotechnick1: nulled_: PHP/PHP_GD/PHP_MySQL/sha1/md5/Apache2/PHP_Sessions/Cookies [05:17] pyrotechnick1: as for mysql there's an adapter for node [05:18] pyrotechnick1: otherwise you might want to look into redis / mongo / couchdb [05:18] pyrotechnick1: they're all noSQL [05:18] BHSPitMonkey: tetsu: hmm, I'm not sure if I'd want to try sending messages that rapidly, but then again I've never seen firsthand how it holds up under that pressure. [05:18] BHSPitMonkey: tetsu: it's highly unlikely that your user will be generating input that quickly... [05:18] tetsu: BHSPitMonkey: i've seen it do very well at 50ms :) [05:18] pyrotechnick1: redis is pretty cool, especially when you're just getting started out, it aligns well with the simplicity of js's objects/hashes [05:18] ExsysTech has joined the channel [05:19] pyrotechnick1: but if u want query try mongo or couch or just use mysql/postgres [05:19] pyrotechnick1: that should be enough to replace your stack [05:19] BHSPitMonkey: tetsu: my initial plan is to send keyboard/click events to the server as they happen, which shouldn't be nearly that often [05:19] pyrotechnick1: remember that the modules wiki article is your friend and so is http://search.npmjs.org/ [05:20] tetsu: BHSPitMonkey: oh, that may be a better idea than position [05:20] AntelopeSalad: couch is pretty easy to pickup as a newbie too [05:20] AntelopeSalad: interacting with it is only slightly more complicated than the node hello world app [05:20] BHSPitMonkey: tetsu: in any multiplayer game that matters, you want to simulate the world on the server side, and only receive user input from the clients [05:20] max_dev has joined the channel [05:21] BHSPitMonkey: tetsu: if you trust your clients to be giving you legitimate data, well, then the cheat engines will come along :P [05:21] blackwhite_ has joined the channel [05:21] tetsu: that sounds fun! [05:21] shiawuen_ has joined the channel [05:22] BHSPitMonkey: I think the best plan is to simulate the same world on both the client and server, and periodically let the server send updates to the clients (which take precedence over whatever state they previously had) [05:22] hdon- has joined the channel [05:22] tetsu: BHSPitMonkey: ive made links and setIntervals to socket.send(data) from client to server, but i dont know how the server sends data to the client [05:23] tetsu: BHSPitMonkey: any hints for an idiot? [05:23] BHSPitMonkey: so if you do something weird/malicious on your client (like changing a velocity variable to 10x), only the user will see that change, and only for a brief moment [05:23] coreb has joined the channel [05:24] broofa has joined the channel [05:24] vikstrous1 has joined the channel [05:24] BHSPitMonkey: tetsu: client.send("a string") or client.send(anObject) ? [05:25] BHSPitMonkey: read http://socket.io if you haven't already [05:25] tetsu: BHSPitMonkey: i see people using socket.broadcast. im gonna try that [05:25] tetsu: BHSPitMonkey: the example applications are more helpful, https://github.com/gerad/lazeroids-node/ [05:25] EvilPacket has joined the channel [05:25] tetsu: these things could use documentation! [05:26] Ond has joined the channel [05:26] XYXing: BHSPitMonkey: do u use enode ? [05:27] BHSPitMonkey: nope [05:28] XYXing: u wanna include node moudle directly in ur html file ? [05:29] XYXing: BHSPitMonkey: is that what u want ? embed node module into html ? [05:29] BHSPitMonkey: more or less, yes [05:30] XYXing: ok, I got something u need [05:30] BHSPitMonkey: I want to define a class (let's say, Widget) that I can use in node (Widget = require('./widget.js')), but also in HTML (