[00:00] mandric has joined the channel
[00:02] blaenk: mape: sorry?
[00:02] mape: blaenk: don't worry, coffeescript isn't that bad
[00:02] blaenk: mape: I'm wondering how I can run the coffeescript interpreter
[00:03] blaenk: with node.js in the environment, that is, run the coffeescript interpreter and use node.js in it
[00:03] varioust has joined the channel
[00:03] jble has joined the channel
[00:03] slickplaid: blaenk, what I do is install it globally using `npm install -g coffeescript`
[00:03] Corren has joined the channel
[00:03] slickplaid: then just run any .coffee file like `coffee server.coffee`
[00:03] slickplaid: and it works(tm)
[00:04] blaenk: ohhhh sorry guys, the coffee script interpreter already has access to node, the problem I was having is requiring a file in the directory
[00:04] blaenk: so like I run the coffee repl in a directory with the source files and I want to require them
[00:04] blaenk: yeah that's the problem
[00:04] blaenk: I think if I go back one directory it'll work
[00:04] blaenk: nope doesn't
[00:05] blaenk: so, when I run coffee thefile.coffee it works just fine
[00:05] blaenk: but what I'm trying to do is run coffee REPL and do require calls etc. myself
[00:05] blaenk: like one would test things really quickly in irb
[00:05] AvianFlu: slickplaid: I like the works(tm)
[00:05] bitwise_: maybe try putting them in ./node_modules?
[00:05] blaenk: it works with require 'http', but not with my own files
[00:05] slickplaid: :)
[00:05] jble has joined the channel
[00:06] blaenk: well I didn't have to put them in node_modules when I ran with coffee
[00:06] bitwise_: ah. just in the cs repl?
[00:06] blaenk: require just automatically seemed to find the files in the same directory
[00:06] blaenk: yeah exactly
[00:06] blaenk: so I have a /coffee dir with my coffee files, and I want to test files
[00:06] blaenk: in the repl just on the fly you know
[00:06] jmoyers: ACTION wishes he was at txjs
[00:06] dibber has joined the channel
[00:06] davidcoallier has joined the channel
[00:07] bitwise_: you tried require('./coffee/foo')?
[00:08] blaenk: yep, it keeps saying cannot load module
[00:08] blaenk: cannot find module rather
[00:08] blaenk: and I'm in /, I even tried it within /coffee by doing require './foo' and same
[00:08] bitwise_: this was happening to me before when i was using the node repl using sudo
[00:08] blaenk: is it because somehow my current directory is changed when I run the coffee repl?
[00:08] leed0 has left the channel
[00:08] cl0udy has joined the channel
[00:08] blaenk: yeah something like that? except I'm not running it with sudo, though I did install it globally
[00:09] blaenk: I wonder if there's a flag to change the starting directory
[00:09] dshaw_1 has joined the channel
[00:09] bitwise_: console.log(process)
[00:09] bitwise_: inside the coffee repl
[00:09] blaenk: gist it?
[00:09] blaenk: or what should I look for
[00:09] stonebranch has joined the channel
[00:09] ParadoxQuine has joined the channel
[00:09] blaenk: installPrefix: '/usr/local'
[00:10] [[zz]] has joined the channel
[00:10] blaenk: execPath: '/usr/local/bin/node'
[00:11] blaenk: ohh maybe because paths isnt set to my directory
[00:11] bitwise_: im not exactly how it works but it might provide more info/context
[00:11] blaenk: https://gist.github.com/1020065
[00:11] blaenk: that's most likely the reason
[00:12] blaenk: you know if there's a way to display the current directory? if not I'll look for the file system docs
[00:13] paul_k has joined the channel
[00:13] bitwise_: __dirname
[00:14] blaenk: thanks. NODE_PATH env var might help I think, time to search
[00:17] mwhooker has joined the channel
[00:17] blaenk: yeah it's a problem with coffeescript because when I run node directly it works
[00:17] blaenk: in the node repl
[00:19] bitwise_: you can try to play with npm explore coffeescript to troubleshoot a bit more
[00:20] ebryn has joined the channel
[00:22] GOP-USA_dotcom has joined the channel
[00:23] Destos has joined the channel
[00:25] coreb has left the channel
[00:26] [[zz]] has joined the channel
[00:28] xandrews has joined the channel
[00:28] ryanmcgrath has joined the channel
[00:29] malev has joined the channel
[00:30] igl has joined the channel
[00:31] mt3ck_ has joined the channel
[00:34] xerox: isaacs: it *is* quite simple
[00:34] davro has joined the channel
[00:34] xerox: thanks for the article
[00:34] isaacs: xerox: np
[00:34] blaenk: bitwise_: npm explore coffee-script: "Error: It doesn't look like coffee-script is installed." is there a way to tell npm to list the packages installed?
[00:34] isaacs: blaenk: npm ls
[00:34] isaacs: blaenk: did you install coffee-script locally or globally?
[00:35] isaacs: npm ls -g
[00:35] isaacs: shows global ones
[00:35] blaenk: right -g
[00:35] isaacs: npm explore coffee-script -g would explore the global one
[00:35] blaenk: yeah I see coffee-script there
[00:35] blaenk: what's the deal haha
[00:35] joeytwiddle has joined the channel
[00:36] blaenk: oh I had to do npm explore -g coffee-script
[00:36] blaenk: I found an issue on github for coffeescript which outlines what I'm experiencing but its supposedly been fixed since then: https://github.com/jashkenas/coffee-script/issues/1035
[00:36] blaenk: guess I'll post there and ask
[00:36] hachque has joined the channel
[00:38] SubStack: isaacs: https://gist.github.com/1020106
[00:38] SubStack: :D
[00:39] Cleer has joined the channel
[00:42] mpoz2 has joined the channel
[00:43] foxkid has joined the channel
[00:45] _Beau: so... who wants to replace my camshaft position sensor?
[00:45] _Beau: :D
[00:45] SubStack: sounds like something with grey codes in it
[00:48] eee_c has joined the channel
[00:48] dshaw_ has joined the channel
[00:49] sorens3n has joined the channel
[00:51] flippyhead has joined the channel
[00:53] mambonumber4 has joined the channel
[00:54] namelessnotion__ has joined the channel
[00:54] dominictarr: hey does anyone here user Design by Contract?
[00:55] dominictarr: and does anyone do TDD but hasn't heard of Design by Contract?
[00:56] kmiyashiro: wtf is design by contract
[00:56] _Beau: i think its something like, if i dont like your design i wont pay you?
[00:56] _Beau: :D
[00:56] Aria: Say what it does. Then do that. Checks at the entrance and exit of every method.
[00:57] Aria: "this method's contract says that if you give it two integers, it'll give you one back, and won't throw any exceptions"
[00:57] stepheneb has joined the channel
[00:57] kmiyashiro: isn't that just a test?
[00:58] dominictarr: it is like a test.
[00:58] dominictarr: but it runs everytime you call a function.
[00:58] dominictarr: so it's like user defined static types.
[00:59] dominictarr: It's suddenly seeming like a really good idea,
[01:00] Anusko has left the channel
[01:00] m00p has joined the channel
[01:00] mambonumber4 has left the channel
[01:00] dominictarr: especially when you need to write tests for old code
[01:00] jmoyers: confused
[01:00] jmoyers: statically typed?
[01:00] brownies has joined the channel
[01:01] jmoyers: not that i don't know what static typing is
[01:01] jmoyers: but im confused why i would ever do that in js
[01:01] kmiyashiro: so it tests your entire codebase with the tests you write for each function?
[01:02] kmiyashiro: not sure I understand completely
[01:02] asobrasil has joined the channel
[01:03] dominictarr: well, I mean that it checking all your objects are corect, at run time, like static typing would.
[01:03] dominictarr: normally it means defining pre and post conditions for each method call.
[01:04] Aria: Yeah. Or more, documenting the conditions everything expects and what it will or won't do in response.
[01:04] dominictarr: yeah.
[01:04] Aria: It can be as code or as documentation, but the contract is essentially a more detailed API spec.
[01:04] jmoyers: documentation = fine
[01:04] jmoyers: code = go get a statically typed language
[01:04] jmoyers: imo
[01:05] dominictarr: it's too late, already doing js.
[01:05] Poetro has joined the channel
[01:05] mattly has joined the channel
[01:05] isaacs: SubStack: neat!
[01:06] dominictarr: ++ you could just turn the design by contracts off, when your not debugging.
[01:06] blaenk has joined the channel
[01:06] kriszyp has joined the channel
[01:06] jmoyers: thats fine -- im just not doing it. i don't prescribe what others need to do :-) seems like a lot of overhead
[01:06] tauren: i'm curious, what types of modules do people install globally vs locally? When does it make sense to do one over the other?
[01:06] jmoyers: tauren only modules with cli utilities in global generally
[01:06] jmoyers: coffeescript, express if you use that, etc
[01:07] _Beau: and also if you are providing hosting environments or something
[01:07] azend has joined the channel
[01:07] steffan has joined the channel
[01:07] tauren: so in general, install most of your modules locally?
[01:07] _Beau: yes, jmoyers has it
[01:07] _Beau: i do.
[01:07] themiddleman has joined the channel
[01:07] jmoyers: tauren yes
[01:07] jmoyers: always
[01:07] _Beau: since theres no reason not to, and im the only one on my server
[01:07] jmoyers: if you're doing development
[01:07] _Beau: esp. since you can now
[01:07] jmoyers: actively on another library (ie one of your dependencies)
[01:07] _Beau: didnt used to be able to if i'm not mistaken, even 3 months ago
[01:07] jmoyers: it can be nice to use npm link
[01:07] tauren: ok. but things like express would be global then?
[01:07] jmoyers: which is pseudo global
[01:08] tauren: npm install express
[01:08] jmoyers: tauren only if you're using the cli part of express
[01:08] _Beau: tauren: i would install all things to a local place
[01:08] xerox: SubStack: where is .map(..) from ?
[01:08] _Beau: as to prevent conflicts with other projects/users
[01:08] tauren: does that automatically install globally, as that's how they recommend installing it? I thought I had to add a -g to install globally.
[01:08] _Beau: and not necessarly in your project folder
[01:08] _Beau: but like your /home/tauren/ dir
[01:08] _Beau: is what i do
[01:09] SubStack: xerox: traverse has a .amp()
[01:09] tauren: ok, thanks
[01:09] SubStack: *map
[01:09] _Beau: it can help you keep track of what the packages are easier, as well as preserve dependancies
[01:09] erictj has joined the channel
[01:09] tauren: so you just install them once for all your projects and use npm link to reference them?
[01:09] _Beau: well, whatever location your at when you npm install package
[01:09] _Beau: is where it goes
[01:09] _Beau: you dont need to link/reference
[01:09] davidbanham: I think global installation definitely has a place for things like nodemon
[01:09] _Beau: its auto
[01:10] SubStack: design by contract is silly
[01:10] _Beau: david: why?
[01:10] SubStack: just avoid side effects except where appropriate
[01:10] SubStack: problem solved
[01:10] Aria: Agreed.
[01:10] xerox: SubStack: ah I see
[01:10] davidbanham: _Beau: Because it's something I want access to in pretty much every project during development, but I may not want to use it in production.
[01:11] xerox: I think I saw a functional programming inspired package sometime
[01:11] SubStack: xerox: it's because uglify's ast walker is crap
[01:11] xerox: but I can't find it anymore
[01:11] SubStack: so I'm using my awesome one that is for any kind of data structure
[01:11] xerox: hehe
[01:11] tauren: _Beau: jmoyers: thanks for the help. I've been installing locally, but just wondered if I should be installing anything globally. now i know.
[01:11] jmoyers: and knowing is half the battle
[01:12] dominictarr has joined the channel
[01:12] xerox: it does look nice, your traverse-js
[01:12] SubStack: dominictarr: https://gist.github.com/1020106 :D
[01:12] isaacs: SubStack: i'm surprised you don't like uglify's walker api. i thought it was one of the more cute parts of it
[01:13] SubStack: isaacs: well I can do in 5 lines with traverse what it takes dozens of lines with uglify's walker
[01:13] isaacs: yeah
[01:13] isaacs: traverse is pretty nice, too
[01:13] trotter has joined the channel
[01:13] _Beau: :)
[01:14] SubStack: when modules roll their own anything it tends to suck compared to something that specializes on just doing that one thing well
[01:14] tjholowaychuk: what's the uglify one look like?
[01:14] tjholowaychuk: oh i see
[01:14] dominictarr: nice.
[01:15] SubStack: tjholowaychuk: this does a similar thing https://github.com/isaacs/UglifyJS/blob/master/tmp/instrument.js
[01:15] tjholowaychuk: i dont see why it's not just like this https://github.com/LearnBoost/stylus/blob/master/lib/visitor/compiler.js
[01:15] tjholowaychuk: you can maintain state in the instance
[01:15] tjholowaychuk: no prob
[01:16] tjholowaychuk: seems like an awkward way of doing things
[01:16] SubStack: node-burrito will make ast manipulations pleasant to write
[01:17] Twelve-60 has joined the channel
[01:19] MikeMakesIt has joined the channel
[01:19] postwait has joined the channel
[01:20] davidcoallier has joined the channel
[01:20] JoshC1 has joined the channel
[01:23] erictj has joined the channel
[01:23] niftylettuce has joined the channel
[01:25] catshirt has joined the channel
[01:25] namelessnotion has joined the channel
[01:26] jmoyers: mmmm burrito
[01:27] jamescarr_ has joined the channel
[01:27] jmoyers: ACTION contemplates going to favorite taco place in the mission
[01:27] dmojoryder has joined the channel
[01:27] zeade has joined the channel
[01:30] MikeMakesIt has joined the channel
[01:31] Sorella has joined the channel
[01:31] _Beau: sup sista
[01:32] Poetro has joined the channel
[01:32] Sorella: if you want to export a shitload of functions, how do you usually do it?
[01:33] _Beau: i think you can either specifically export each function to a module.exports.something = something
[01:33] SubStack: assign into exports, how else?
[01:33] _Beau: or wrap them all in an single object
[01:33] chjj: module.exports = shitloadoffunctions
[01:33] SubStack: you can nest them however you like too
[01:34] edude03 has left the channel
[01:35] rpj8 has joined the channel
[01:36] rpj8: topic's awful morbid isn't it
[01:36] rpj8: ?
[01:36] Sorella: ah, okay, module.exports will do.
[01:37] Sorella: thanks guys.
[01:42] Danish has joined the channel
[01:43] Danish: hi guys
[01:43] Danish: I'm very new to web programming
[01:44] Danish: could I use node js to write the server side of a smart phone app?
[01:44] Danish: so the server side of for example an android app
[01:44] Matt111 has joined the channel
[01:44] chjj: yes
[01:44] davidbanham: Danish: Yes. Depending on what you want it to do, it may or may not be the best choice, but yes.
[01:44] chjj: i like my answer better
[01:44] Danish: well I wanted to make a multiplayer game
[01:45] davidbanham: chjj: I've been hanging out with too many lawyers.
[01:45] Danish: a small mmo
[01:45] Danish: so you have a map and you walk around and see other players
[01:46] edude03 has joined the channel
[01:46] davidbanham: Danish: Pretty real-time, so yeah nodejs would probably be a good choice in my reasonably uneducated opinion.
[01:46] Matt111: Danish - make it interesting.. everyone is a server, P2P based.. The only way in is to connect to another player.
[01:46] Matt111: no central repo, it would make for an epic RPG :)
[01:46] Danish: hmmm
[01:47] Danish: how would I go about doing that?
[01:47] Matt111: Thats my nerdy idea though, not the best if you have non-techies playing
[01:47] jmoyers: not viable
[01:47] jmoyers: unless cheating is okay
[01:47] Matt111: good point
[01:47] Danish: well not many players would be cheating since its a smart phone game
[01:47] davidbanham: jmoyers: Make cheating an integral part of the game. Whomever can hack their local server in the most interesting ways is the winner.
[01:48] Danish: plus i just want to do this to learn some client-server programming
[01:48] Matt111: lol
[01:48] blaenk: I've been reading up on something related to Danish' question, but mine isn't as complicated, it's just a turn-based multiplayer game (10 players or less per game), the thing I'm looking into is what protocol, like, just straight up tcp and make up my own or something like socket.io
[01:48] jmoyers: uh
[01:48] blaenk: I'm also new to that stuff
[01:48] jmoyers: is it browser based?
[01:48] blaenk: it'll be an iOS app
[01:48] jmoyers: if so, socket.io
[01:48] Danish: well
[01:48] ebryn has joined the channel
[01:48] Danish: the idea is to make the game available to different platforms
[01:49] Danish: so write 1 server
[01:49] Matt111: Danish - everyone launches a server, and the server speaks to the node it joined from. From there it asks that server for nodes its connected to.. slowly polling all the servers to ensure the web of connections is always growing.
[01:49] Danish: and 2 different clients
[01:49] Danish: one for the web
[01:49] jmoyers: then you abstract the transport
[01:49] Danish: and 1 for the app
[01:49] davidbanham: Danish: Considered doing it in Javascript nose to tail and then deploying with PhoneGap?
[01:49] jmoyers: use the same data types (json, whatever), and abstract the to-network/from-network
[01:49] blaenk: I found this for iOS https://github.com/fpotter/socketio-cocoa
[01:49] blaenk: it's an interface between cocoa and socket.io
[01:50] jmoyers: our product uses udp, tcp/http/bayeaux depending on the circumstances
[01:52] asobrasil has joined the channel
[01:52] jmoyers: careful about dependencies
[01:52] jmoyers: especially non-so-well-known libraries dealing with network voodoo
[01:52] jmoyers: unless you're prepared to debug, in which case its fine
[01:53] jmoyers: i just question the need to use socket.io in that context
[01:53] Danish: i just looked at phoneGap
[01:53] Danish: looks pretty cool
[01:54] blaenk: yeah I'm currently looking at plain old tcp
[01:54] Danish: well if I use phonegap and a p2p network i wouldnt need to even touch node js, right?
[01:55] blaenk: I'm new to network programming I just thought socket.io might ease things, but it seems like plain tcp is more direct
[01:55] SubStack: those do different things
[01:55] blaenk: hahaha I know, not what I meant :/
[01:55] blaenk: I meant building on top of a tcp stream or just using socket.io
[01:56] blaenk: and this is not related to a web app
[01:56] SubStack: you only use socket.io for browser<->server code
[01:56] chjj: youre making very confusing statements
[01:56] blaenk: I know that's why I dropped it
[01:56] blaenk: though I did find that cocoa/ios bridge to socket.io
[01:57] jmoyers: SubStack well
[01:57] davidbanham: Danish: True, a P2P system will not require nodejs. I'd say the technical challenge of a P2P system will be greater than that of a server-client system though.
[01:57] jmoyers: i guess some would argue that
[01:57] blaenk: but like I'm saying, socket.io didn't seem to fit
[01:57] jmoyers: its just a protocol
[01:57] jmoyers: ~j~ etc
[01:58] jmoyers: blaenk i'd look directly at http://code.google.com/p/cocoaasyncsocket/
[01:58] jmoyers: if i were you
[01:58] blaenk: yeah I had that up too
[01:58] blaenk: that + a tcp server? (again I'm noob)
[01:59] blaenk: so I mean that on the ios app, and a tcp server on node.js
[02:00] jmoyers: yes
[02:00] EyePulp has joined the channel
[02:00] jmoyers: http://nodejs.org/docs/v0.4.8/api/net.html#net.Server
[02:00] blaenk: yep that's what I've been poking at :)
[02:00] jmoyers: Net trivializes a lot of this
[02:00] blaenk: yeah I've noticed :D
[02:00] eyesUnclouded has joined the channel
[02:00] blaenk: what's mainly been confusing me though is in what format to sent my data, like can I choose json if I'm comfortable with that?
[02:00] leed0 has joined the channel
[02:00] blaenk: I mean I imagine I can, but I'm wondering if that's not a bad practice
[02:00] leed0 has left the channel
[02:01] jmoyers: socket.io adds heartbeat, json deserialize/serialize, and later on (0.7) channels and such
[02:01] cafesofie has joined the channel
[02:01] jmoyers: yes, you can choose json
[02:01] jmoyers: on the iOS device though
[02:01] renatoi has joined the channel
[02:01] jmoyers: you need a library to deserialize
[02:01] jmoyers: with node
[02:01] blaenk: a json library, yeah
[02:01] jmoyers: you just use JSON.stringify() and JSON.parse()
[02:01] blaenk: sweet
[02:02] renatoi: hey, can anyone help me with http headers in node.js?
[02:02] jmoyers: shoot
[02:02] blaenk: yeah I am thinking I will need channels (to represent separate games, each which have different players). so i'd have to implement that myself if I use a net server, I found this which might help: http://stackoverflow.com/questions/4445883/node-websocket-server-possible-to-have-multiple-separate-broadcasts-for-a-sin
[02:03] blaenk: to give me an idea
[02:03] jmoyers: erm
[02:03] catshirt has joined the channel
[02:03] jmoyers: not to cap on PushIt
[02:04] jmoyers: but you don't necessarily need this
[02:04] _Beau: no
[02:04] blaenk: oh that answer suggests pushit but I was refering mainly to the sample code
[02:04] blaenk: on how one might implement channels
[02:04] jmoyers: if you need channels, you might check out modules that do 'namespaced events'
[02:04] jmoyers: for pub sub
[02:04] _Beau: i use DNode for pub/sub
[02:04] jmoyers: for instance https://github.com/hij1nx/EventEmitter2
[02:04] _Beau: https://github.com/sorensen/aebleskiver
[02:04] _Beau: is pub/sub channel chat app
[02:05] _Beau: the source code might help you figure things out
[02:05] blaenk: thanks, opened both of those up
[02:05] _Beau: it wont be multi-threaded until the subscriptions/channels are moved to a persistant DB though
[02:05] _Beau: as an FYI
[02:05] jmoyers: not true
[02:05] jmoyers: you don't need persistence to make a multi server message queue
[02:06] _Beau: its really just an FYI that something needs to change
[02:06] _Beau: in order to communicate between node processes
[02:06] renatoi: http.request: I have more than one "Link" header in my http response header and nodejs is returning me just the first "LINK" header in response.headers. Is this a known bug? Any idea?
[02:06] _Beau: the method on how it is done is somewhat subjective
[02:07] jmoyers: but anyway -- dnode isn't ported to ios natively yet
[02:07] jmoyers: its got an open protocol
[02:07] ap3mantus has joined the channel
[02:07] _Beau: while we are on the subject
[02:07] _Beau: my solution was just going to be using visionmedia/Keys to share subs/channels
[02:08] _Beau: is using a MQ a better solution?
[02:08] _Beau: as i want to use cluster in the near future
[02:08] jmoyers: there are a bunch of domain specific mq technologies
[02:08] jmoyers: rabbit, redis pub/sub, etc
[02:08] _Beau: Keys can use redis/mongodb/riak
[02:08] cole has joined the channel
[02:09] _Beau: and as i want to make it incorporated into a backbone-dnode package, i feel Keys might be a more versitile solution to the end user of the package
[02:09] jmoyers: does Keys support redis pub sub out of the box?
[02:09] _Beau: not the native pub/sub of redis
[02:09] jmoyers: im not really sure i understand going to riak or mongo or some such for a message queue
[02:09] jmoyers: so write events into the database and poll?
[02:10] _Beau: im currently storing Clients/Channels/Subscriptions in thread-memory
[02:10] jmoyers: the benefit of redis pub/sub or rabbit etc is that they're push, and optionally have persistence
[02:10] _Beau: i just figured moving to Keys would solve that regardless of what i use, so long as its not Memory
[02:10] _Beau: i dont have any experience using MQ's
[02:11] fljitovak has joined the channel
[02:11] jmoyers: well
[02:11] cl0udy has joined the channel
[02:11] jmoyers: unless you use somethin akin to mysql triggers
[02:11] _Beau: not at all
[02:11] jmoyers: im not sure how you can make a generic datastore into a pub sub without polling
[02:12] _Beau: why poll?
[02:12] dshaw_ has joined the channel
[02:12] blaenk: hey quick noob question. I'm wondering how something like redis pub/sub fits into a net server (nodejs), like, I would have thought redis would help to add persistence for example, but what does the pub/sub element of redis help with? I'm just wondering if it'll help with what I'm trying to do
[02:13] blaenk: oh you guys are saying, message queue, right
[02:13] _Beau: redis has a native publish/subscribe method that will do the job
[02:13] _Beau: in which, you arent sending EVERY message to EVERYONE
[02:13] jmoyers: you dont need a dedicated message queue unless you have multiple servers that are interested in events
[02:14] blaenk: ohhh, so instead of implementing it myself in a net server, a client would just connect to the redis server? or would a nodejs app mediate the connection?
[02:14] jmoyers: no no
[02:14] jmoyers: like
[02:14] _Beau: jmoyers: i will butcher this explanation
[02:14] dshaw_1 has joined the channel
[02:15] jmoyers: in short
[02:15] jmoyers: you probably don't need a message queue
[02:15] blaenk: I'll give a quick run down of what I want to do and maybe you can tell me
[02:15] SubStack: quit thinking, start hacking
[02:15] blaenk: haha I'd rather not get deep into something only to find out I'm doing it wrong
[02:16] SubStack: if you find out you're doing it wrong then you throw it away
[02:16] SubStack: and you learned something!
[02:16] blaenk: lol, yeah I don't mind that but I might as well ask people who know
[02:16] SubStack: much faster I find to just start building something
[02:17] blaenk: I already have started writing a lot but this pub/sub thing caught my attention
[02:17] rpj8 has joined the channel
[02:17] blaenk: its a turn based multiplayer game. chatting is part of the game mechanic (the players have to be able to chat with each other to discuss the events, cooperate etc.)
[02:17] SubStack: that sounds hard. use dnode
[02:17] blaenk: hahaha
[02:18] mqsack_ has joined the channel
[02:18] _Beau: :D
[02:18] _Beau: and backbone!
[02:18] _Beau: and while your at it, backbone-dnode!
[02:18] SubStack: sure
[02:18] _Beau: somewhat joking about the last part, but DNode for sure
[02:19] blaenk: to give a very quick rundown. the server will manage the game state. players each have different roles, and the server announces new 'phases' in which players can choose to use their abilities. so during a certain phase, players might choose to use their abilities. the actions will be gathered by the server, and then at the start of the next phase they will be run, and their effects will alter the game state
[02:19] rpj8: Is the solution posted by shripad generally the best way to go about this: http://stackoverflow.com/questions/4753957/socket-io-authentication/4782933
[02:19] rpj8: ?
[02:19] mqsack_: anyone have time for a noob failed install error question?
[02:19] rpj8: AUGH I HAVE NO TIME
[02:19] rpj8: ACTION sits in irc chatroom
[02:20] sechrist has joined the channel
[02:20] blaenk: so for example during the day people may chat, then during the night, bad people might choose to kill someone, etc., the server will gather those actions (kill someone), and then evaluate them at the end of the night
[02:20] blaenk: I'm guessing I don't need an mq then haha
[02:20] _Beau: rpj8: yes
[02:20] rpj8: blaenk: lol are you remaking epic mafia?
[02:20] _Beau: its what i am currently doing with connect-mongodb
[02:20] rpj8: _Beau: alright, cool.
[02:20] blaenk: rpj8: sure something like mafia
[02:21] rpj8: _Beau: I am going to look into dnode next to see if it offers another solution
[02:21] _Beau: it doesnt
[02:21] _Beau: to my knowledge
[02:21] rpj8: ah
[02:21] rpj8: I see
[02:21] _Beau: you will need to send the client the session ID sent by express, since it is hashed+salted
[02:21] SubStack: auth is hard
[02:21] SubStack: (not really)
[02:21] unlink has joined the channel
[02:21] _Beau: and after that, you can use socket.io to query the SessionStore with that SID
[02:22] _Beau: there is more to it than that, but that will get you started in a big way towards your goal
[02:22] SubStack: rpj8: you can write a unique token in some javascript
[02:22] rpj8: _Beau: I see. I've never worked directly with the sessionstore yet
[02:22] rpj8: _Beau: I've always just done req.session.name = 'body.name'
[02:22] rpj8: set it and forget it.
[02:22] _Beau: its not too hard, yes same here
[02:22] SubStack:
[02:22] SubStack: then send that to the server over socket.io
[02:23] _Beau: exactly
[02:23] _Beau: did i say it wrong substack?
[02:23] SubStack: much easier than connect-redis
[02:23] _Beau: well, if your working with express isnt it all the same idea?
[02:23] _Beau: connect-redis/connect-mongodb/native express sessions
[02:23] rpj8: SubStack: what significance is the ! in that line
[02:23] _Beau: express sets the hashed SID
[02:23] SubStack: you don't necessarily need the session id
[02:24] SubStack: rpj8: interpolation
[02:24] rpj8: oh with jade
[02:24] _Beau: which will allow you to keep the same token for later use in express routes
[02:24] SubStack: yes except the