[00:02] tyfighter has joined the channel [00:03] realazthat_ has joined the channel [00:03] elefant has joined the channel [00:04] A_Nub has joined the channel [00:05] tedsuo has joined the channel [00:05] perezd: +1 couchdb [00:06] arlolra has joined the channel [00:07] trotter has joined the channel [00:07] konobi: pquerna: hoping to use isaacs tap stuff? [00:07] isaacs: konobi: i'm trying to sell him on it :) [00:07] A_Nub: so whats better couch or mongo? I cant decide [00:07] konobi: score [00:08] konobi: pquerna: g'wan... you know you want to [00:09] A_Nub: mongos site says they are both good but mongo is better for speed [00:10] perezd: +1 on mute [00:10] blueadept: A_Nub: they're both good systems, it depends on the use case and how comfortable you are with the interface and options [00:11] blueadept: personally i went with mongo because of the backing by 10gen [00:11] blueadept: but that may not be the reason why you would choose either one [00:11] A_Nub: I havent learned either yet [00:12] blueadept: if you have a lot of xp with sql, then mongo has some similarities that make it easy to learn [00:12] A_Nub: I tested mongo for a few minutes with a local install [00:12] Kami_: hm, whats the conference number [00:12] A_Nub: Kami_: idk the provided one didn't work for me. [00:12] hornairs has joined the channel [00:12] Kami_: same here [00:12] pquerna: the 415 number? [00:13] eee_c has joined the channel [00:13] Kami_: nope, the conference number / passcode / whatever [00:13] perezd: couchdb fits our application model very well, thats why we chose it. [00:13] A_Nub: blueadept: I wouldnt say i have alot of xp with sql, but I do know it [00:14] blueadept: A_Nub: http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis [00:14] blueadept: i always like this comparison chart [00:15] perezd: worked for me [00:15] perezd: okay [00:15] perezd: 415-400-0604 x0615 [00:15] perezd: thats the number I dialed [00:15] isaacs: thanks :) [00:15] isaacs: you heard me! [00:15] perezd: :) [00:16] perezd: in room with people [00:16] perezd: on mute [00:16] Kami_: perezd: are you using skype? [00:16] perezd: Kami_: nope, iphone [00:16] Kami_: ah [00:18] creationix has joined the channel [00:18] A_Nub: blueadept: Redis sounds more like what im doing [00:18] A_Nub: Minus the fact I have the potential for the database to get rather large. [00:18] A_Nub: but I could just partition nightly or weekly. [00:19] tyler-iphone: i sue redis in just about very single project [00:19] tyler-iphone: use* [00:19] A_Nub: why do you sue them [00:19] A_Nub: ;) [00:19] tjholowaychuk: ahahaha [00:19] tjholowaychuk: I sue redis all the time too [00:20] A_Nub: tyler-iphone: yea but how many entries do you expect? [00:20] A_Nub: I epect alot perday [00:20] A_Nub: with constant logging [00:20] A_Nub: every 5 seconds [00:20] A_Nub: from 10+ machines [00:20] A_Nub: in hundreds tot housands of locations [00:21] A_Nub: A DBA i talked to said mySQL [00:21] tyler-iphone: good for you [00:21] A_Nub: and one table [00:21] A_Nub: which is stupid. [00:21] A_Nub: Im not going to listen [00:22] perezd: couchdb == awesome [00:22] A_Nub: But people say its not good for lots of activity. [00:22] A_Nub: is that a lie? [00:22] perezd: A_Nub: couchdb? [00:22] A_Nub: yes [00:23] Kami_: yay, finally got it [00:23] A_Nub: "Best used: For accumulating, occasionally changing data, on which pre-defined queries are to be run. Places where versioning is important." [00:23] chrisdickinson: for fun, a C-macro function for JS: https://gist.github.com/920890 [00:27] qbert_: hmm, I inherited this project, does anyone know what this is about XMLHttpRequest cannot load http://localhost/socket.io/xhr-polling//1302827218260. Origin http://localhost:3000 is not allowed by Access-Control-Allow-Origin. [00:27] piscisaureus: qbert_: the port is different. that's a showstopper [00:28] qbert_: ahh, [00:28] perezd: A_Nub: I dunno where all these weird opinions about couchdb came from [00:28] perezd: its 100% non-blocking [00:29] perezd: it has no write/read locks [00:29] A_Nub: perezd: they are not mine im just reading. [00:29] A_Nub: I am trying to pick the best one for my project. [00:29] perezd: A_Nub: yeah, not directed at you, just wondering where you read that [00:30] perezd: A_Nub: couchdb is really great if you can work with its grain [00:30] A_Nub: here [00:30] A_Nub: http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis [00:30] perezd: A_Nub: are you sure you need docs? [00:30] A_Nub: ? [00:30] perezd: A_Nub: dumb question: why not use Postgres? [00:30] perezd: or something like that [00:31] denny has joined the channel [00:31] A_Nub: Because its nicer to store things as object. [00:31] A_Nub: objects* [00:31] perezd: A_Nub: is it worth the overhead? [00:31] A_Nub: since im doing a social network type thing [00:31] jonpacker has joined the channel [00:31] A_Nub: Is there that much overhead? [00:31] perezd: document storage isn't just about ease, its about architecture design [00:32] A_Nub: Well im not the DB expert which is why im asking ;) [00:32] c4milo1 has joined the channel [00:32] perezd: A_Nub: If I were you, I'd start with mysql/postgres [00:32] A_Nub: but the DBA I talked to made a moronic suggestion to store all user sessions in 1 table. [00:32] perezd: have you ever used map/reduce? [00:32] A_Nub: when that list has a potential to be huge [00:32] perezd: whats a session [00:32] shiawuen has joined the channel [00:33] charlenopires has joined the channel [00:33] A_Nub: data [00:33] A_Nub: that comes it. [00:33] A_Nub: in* [00:33] Guest30954: hey all. trying to proxy with request object and it appears to be hanging. [00:33] perezd: A_Nub: how big is that table, est. [00:33] perezd: btw, sessions should never hit the disk, if they are transient. you should use a memcache/redis style thing for transient storage [00:33] A_Nub: Well its for logging gym work outs, so average user 2-3 entries a week [00:33] A_Nub: with thousands of users. [00:33] A_Nub: quite large. [00:34] perezd: oh [00:34] perezd: so you don't mean like login session [00:34] A_Nub: nope [00:34] perezd: you mean like sessions as a unit of data [00:34] A_Nub: workout session [00:34] A_Nub: yes [00:34] A_Nub: sorry [00:34] perezd: are they normalized in schema? [00:34] perezd: ie: you have the same dataset roughly/ [00:34] A_Nub: yes [00:34] A_Nub: which is why I was looking towards mongo [00:34] perezd: so, SQL is really good at storing millions of records [00:34] perezd: and looking them up super fucking fast [00:35] perezd: they've spent like 30 years making that fast [00:35] A_Nub: Right but I have arrays too [00:35] A_Nub: I mean [00:35] Guest30954: trying request.get( {uri: 'http://realone', proxy: 'http://user:pass@proxy' }, function() { console.log(1); }) but see nothing... no timeout option either :/ [00:35] perezd: the place where docs get good is when you need joins [00:35] A_Nub: I could do a comma separation [00:35] perezd: across lots of disparate data sets [00:35] perezd: OR you need something like couchdb replication [00:35] perezd: OR you need map/reduce [00:36] perezd: but for just "because my data should be objects", thats usually a bad reason to make that decision [00:36] A_Nub: As I said [00:36] perezd: not to sound like an ass, its just a really simplistic criteria for making that decision, I'd make sure you really neeed it [00:36] A_Nub: im new to DB design [00:36] perezd: surely, I am just providing advice [00:36] A_Nub: Yes [00:36] perezd: if you are new, I'd probably start with Postgres [00:36] A_Nub: Well I have worked with mySQL [00:36] A_Nub: before [00:36] perezd: thats good too [00:36] A_Nub: and its what im currently using. [00:36] perezd: start with that, and expand over time [00:37] A_Nub: I just hate its organization [00:37] A_Nub: im too used too OOP [00:37] perezd: A_Nub: ORM's really have taken care of this problem for you in a lot of ways [00:38] A_Nub: ORM? [00:38] perezd: Object Relational Mapper [00:38] A_Nub: Hmm i am not sure I am aware of these [00:38] perezd: have you written database apps before? [00:38] Guest30954: ORM: doctrine for PHP, hibernate for Java, etc. [00:38] A_Nub: I know that I didn't like the way SQL queries worked so i wrote my own query wrappers. [00:38] perezd: A_Nub: this is basically what ORMs do [00:39] perezd: they just wrap objects around data [00:39] perezd: and provide apis [00:39] Determinist has joined the channel [00:39] A_Nub: Ok [00:39] perezd: translates data to objects and back [00:39] A_Nub: well my api is text based which may be slower [00:39] A_Nub: but its nice. [00:39] eee_c has joined the channel [00:39] A_Nub: its actually meant to parse html files [00:39] A_Nub: for database refrences [00:39] lorhko has joined the channel [00:39] jakehow has joined the channel [00:39] A_Nub: I should port it from php to node. [00:40] A_Nub: perezd: thanks for the help! [00:40] perezd: A_Nub: np! [00:41] A_Nub: Im sure I will bug you again soon ;) [00:41] derferman has joined the channel [00:41] dguttman_ has joined the channel [00:42] xiackok has joined the channel [00:45] skm has joined the channel [00:46] throughnothing has joined the channel [00:48] brolin has joined the channel [00:50] bassui has joined the channel [00:51] soulofpeace has joined the channel [00:51] pengwynn has joined the channel [00:51] copongcopong has joined the channel [00:54] no-gooder: heyy , i couldn't make this tutorial work : https://gist.github.com/5151ec2f5d79ce74a68a [00:54] no-gooder: has any of you tried this ?? [00:55] dmojoryder has joined the channel [00:57] eventi has joined the channel [00:58] Charuru has joined the channel [01:00] A_Nub: no-gooder: I had a similar problem [01:00] A_Nub: storing a client apparently doesn't work. [01:00] sako has joined the channel [01:00] A_Nub: instead you need to do client.broadcast() [01:00] A_Nub: instead of your forEach [01:01] fairwinds has joined the channel [01:02] Levi has joined the channel [01:03] rook2pawn has joined the channel [01:03] secoif: anyone in here using a state machine? [01:04] abraxas has joined the channel [01:04] bnoguchi: secoif: in what sense? everything is a state machine in theory [01:05] heavysixer has joined the channel [01:05] bnoguchi: secoif: a state machine library? [01:05] pyrotechnick has joined the channel [01:05] tjholowaychuk: secoif: ragel [01:05] secoif: bnoguchi: want simple lib to handle my models moving between states [01:05] tjholowaychuk: oh [01:05] tjholowaychuk: nvm [01:06] secoif: tjholowaychuk: ? [01:06] tjholowaychuk: secoif: http://www.complang.org/ragel/ [01:06] bnoguchi: secoif: I wrote something small that we use with mongoose [01:06] bnoguchi: secoif: lemme send you the link to the code [01:07] bnoguchi: secoif: https://github.com/LearnBoost/mongoose/blob/master/lib/mongoose/utils.js#L233 [01:07] Bonuspunkt has joined the channel [01:08] secoif: tjholowaychuk: ahh yeah I'm talking about something a little less, formal. are you using ragel for something? [01:08] tjholowaychuk: I've used it quite a bit [01:08] tjholowaychuk: not lately though [01:08] jacter has joined the channel [01:09] jonpacker has joined the channel [01:10] secoif: tjholowaychuk: for what kind of stuff? [01:10] tjholowaychuk: secoif: scanning strings [01:11] cjfont: Hey when do you guys normally hold office hours? [01:12] pquerna: http://ci.apache.org/projects/libcloud/coverage/ [01:13] dnyy has joined the channel [01:13] tk has joined the channel [01:15] bnoguchi: Anyone here know of a node wrapper for Amazon Simple Email Service [01:15] bnoguchi: The only one that pops up on google only has a readme [01:15] catshirt has joined the channel [01:16] tedsuo has joined the channel [01:16] bnoguchi: nm, found one [01:16] aphelion has joined the channel [01:18] jdalton has joined the channel [01:18] vipaca has joined the channel [01:18] vipaca has joined the channel [01:18] isaacs: npm help json [01:18] skm has joined the channel [01:18] pyrotechnick: SubStack: ping [01:18] micheil: ryah: with net.Stream/net.Socket's write(), if the data is a Buffer, will it still default to utf8 encoding? [01:19] pyrotechnick has left the channel [01:19] pyrotechnick has joined the channel [01:20] micheil: oh, wait, now I see it in the code; [01:20] pengwynn has joined the channel [01:20] jacter has joined the channel [01:21] jdalton has left the channel [01:21] perezd: working on new couchdb driver named grave [01:23] pyrotechnick: heard of the zombie programming language? [01:24] isaacs: this is lawnchair: http://westcoastlogic.com/lawnchair/ [01:24] isaacs: tedsuo: ^ [01:25] tmzt has joined the channel [01:25] tedsuo: schweet [01:26] secoif: bnoguchi: thanks for that [01:26] jjmalina has joined the channel [01:26] bnoguchi: secoif: Yeah, we wrote it quickly to take care of dirty tracking, etc [01:26] secoif: bnoguchi: I don't quite get it [01:26] galaxywatcher has joined the channel [01:26] secoif: oh [01:26] secoif: I see [01:26] secoif: uitls [01:26] dnyy1 has joined the channel [01:27] secoif: I was wondering why pluralize was in the statemachine [01:27] bnoguchi: secoif: Check document.js [01:27] pyrotechnick: isaacs: do you know how to fix traverse/dnode? [01:27] secoif: it's not. [01:27] isaacs: pyrotechnick: not sure [01:27] isaacs: what's up with it? [01:27] secoif: bnoguchi: did you look at any of the other sm libs out there? [01:27] pyrotechnick: traverse/web is screwing up again like it did when there was no main [01:27] bnoguchi: secoif: No, because it was pretty straightforward [01:28] secoif: fair enough [01:28] pyrotechnick: what's the best way to try and clean out _everything_ from npm [01:28] ohtogo has joined the channel [01:28] pyrotechnick: including npm [01:28] secoif: i was kind of hoping there would be some kind ong pseudo 'standard' lib that people were using for state transitions [01:28] secoif: you know [01:29] secoif: convention over configuration [01:29] pyrotechnick: sacoif, we have about 20 state machines in our project here [01:29] pyrotechnick: we're on the verge of having it clean enough to turn into a library [01:29] pyrotechnick: have you found any others? id be interested in seeing them [01:30] pyrotechnick: ours are probably a bit overkill / intellectual for your needs [01:30] pyrotechnick: they're for AI [01:32] cognominal: What is the format used for the dates in the time fields of a package.json? [01:32] bassui has left the channel [01:32] pyrotechnick: i think just toString() [01:32] cognominal: is it specified somewhere? [01:32] bnoguchi: secoif: Let me know if you have any questions. But I'm assuming you're using it in the same way - e.g., dirty tracking, etc [01:32] pyrotechnick: its probably anything that can be parsed by new Date(string) [01:32] secoif: pyrotechnick: I've used https://github.com/phred/stately and https://github.com/noblesamurai/noblemachine before [01:32] pyrotechnick: thankyou [01:33] cognominal: I tried .toString() and .toDateString(). It is neither [01:33] secoif: pyrotechnick: actually need it on both client and server [01:33] path[l] has joined the channel [01:33] secoif: had trouble getting that to happen [01:33] pyrotechnick: yeah [01:33] pyrotechnick: is there anything that needs like native stuff? [01:33] SubStack: pyrotechnick: what uses traverse/web? [01:33] pyrotechnick: what was the difficult part [01:33] SubStack: I got rid of that months ago [01:34] wafer has joined the channel [01:34] SubStack: or at least 1 month ago [01:34] pyrotechnick: what's going on then [01:34] SubStack: uses browserify now [01:34] pyrotechnick: hmm [01:34] SubStack: sounds like you've got old code [01:34] pyrotechnick: i know man but this is a brand new machine [01:34] pyrotechnick: i wonder if npm is screwing up atm or something, maybe there is a proxy between me and it [01:34] pyrotechnick: watch this [01:34] pyrotechnick: isabel:~ pyrotechnick$ npm ls [01:34] pyrotechnick: /Users/pyrotechnick [01:34] pyrotechnick: (empty) [01:34] isaacs: pyrotechnick: that's because you're on 1.0 [01:34] wafer: hey, possibly dumb question, but is it possible to compile node.js for iPad/iPhone? [01:34] cognominal: that's .toISOString() ! [01:34] isaacs: pyrotechnick: to search the registry, use `npm search` [01:35] secoif: pyrotechnick: I don't know, It just didn't want to work [01:35] pyrotechnick: isaacs where is the npm "cache" [01:35] pyrotechnick: how do i nuke it [01:35] isaacs: pyrotechnick: ~/.npm [01:35] pyrotechnick: brand new machine, ^^ no packaged [01:35] secoif: I used browserify to do it [01:35] isaacs: npm cache clean [01:35] pyrotechnick: yet [01:35] secoif: but it gave me [01:35] pyrotechnick: sudo npm install coffee-script [01:35] secoif: some strange thing [01:35] isaacs: pyrotechnick: npm cache clean [01:36] pyrotechnick: is instant and installs 1.1.0-pre [01:36] dnolen has joined the channel [01:36] pyrotechnick: is it possible it's finding it in ~/coffee-script? [01:36] jdalton has joined the channel [01:36] isaacs: pyrotechnick: http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/ [01:36] isaacs: pyrotechnick: what are you trying to do: [01:36] isaacs: 0 [01:36] isaacs: ? [01:36] pyrotechnick: i have no fucking idea where it fot 1.1.0 from [01:36] isaacs: ACTION too much caffiene [01:36] jdalton has left the channel [01:36] aaronblohowiak has joined the channel [01:36] pyrotechnick: im trying to install coffee off npm [01:36] pyrotechnick: and its installing from somewhere local [01:36] isaacs: pyrotechnick: please read that blog post^ [01:36] seivan has joined the channel [01:36] pyrotechnick: the only place i can think of is ~/coffee-script [01:36] aaronblohowiak: what is up with http://nodejs.com/ ? [01:37] pyrotechnick: im going to format this new machine [01:37] pyrotechnick: i dont trust it [01:37] isaacs: aaronblohowiak: it's nodejs.org [01:37] aaronblohowiak: isaacs: right, but why? [01:37] isaacs: aaronblohowiak: the .com is some random squatter [01:38] aaronblohowiak: who lives in beijing and has a baseball bat [01:38] aaronblohowiak: ACTION had a marak moment [01:38] flippyhead has joined the channel [01:39] isaacs: pyrotechnick: 1.0.1 is the current coffee-script version [01:39] isaacs: $ npm view coffee-script version [01:39] isaacs: 1.0.1 [01:39] timmywil has joined the channel [01:39] bnoguchi: aaronblohowiak: lols [01:40] gazumps856 has joined the channel [01:40] pyrotechnick: ~/.npm, ~/node_modules, /usr/local/lib/node_modules [01:40] pyrotechnick: what else to nuke [01:40] pyrotechnick: ive also cloned the source and sudo make uninstalled it [01:41] isaacs: pyrotechnick: sounds like you nuked it. [01:41] sub_pop has joined the channel [01:41] pyrotechnick: ok [01:41] pyrotechnick: here goes nothing [01:41] isaacs: pyrotechnick: might wanna also rm -rf / [01:41] isaacs: just to be sure [01:41] isaacs: ;P [01:41] pyrotechnick: ok [01:41] Billbad has joined the channel [01:41] pyrotechnick: its taking a while [01:41] secoif: jesus [01:41] pyrotechnick: is / big? [01:41] tbranyen: bitch be huge [01:41] pyrotechnick: fuck dude [01:41] isaacs: pyrotechnick: http://nukefromorbit.ytmnd.com/ [01:41] pyrotechnick: wheres my porn gone? [01:41] secoif: don't even say those words [01:42] isaacs: pyrotechnick: got any c4? [01:42] isaacs: thermite? [01:42] ryah: http://readthedocs.org/projects/virtualenv/ <-- tedsuo [01:42] pquerna: hmm, does anyone have like, a Directory Walker that is reasonable? [01:42] pyrotechnick: glob [01:42] pyrotechnick: node-glob [01:42] fljitovak has joined the channel [01:42] mattly_ has joined the channel [01:42] aaronblohowiak: isaacs: did you ever get node-glob to do **/** right ? [01:43] pyrotechnick: SubStack: should i be using npm 1 >? [01:43] aaronblohowiak: s/"right"/the way zsh does it [01:43] pquerna: https://github.com/nshah/nodejs-walker [01:43] pyrotechnick: with latest dnode/browserify? [01:44] SubStack: not sure! [01:44] SubStack: pyrotechnick: this could be some dependency in a package.json someplace that is wrong [01:44] wafer: hey anyone know if an o'reilly book is on the horizon? [01:45] isaacs: aaronblohowiak: yeah, but node-glob is a bit iffy [01:45] pyrotechnick: aaronblohowiak: yeah i never got ** to work properly either i ended up doing it in two steps [01:45] pyrotechnick: then i wrote a state machine to do unions and intersections [01:45] pyrotechnick: its badass [01:45] pyrotechnick: then i found browserify [01:46] pyrotechnick: and cried about how much time i wasted [01:46] SubStack: wafer: sh1mmer is working on one I'm pretty sure [01:46] wafer: cool [01:47] SubStack: browserify was just a stub of a project for the longest time [01:47] SubStack: and then I actually got it usable [01:48] pyrotechnick: SubStack: ill show u what i use it for [01:48] pyrotechnick: in a second [01:48] tjholowaychuk: wtf... I'm getting oob for slice(0,68) if a buffer with .length of 128 [01:48] sh1mmer: what now? [01:48] zentoooo has joined the channel [01:48] pyrotechnick: tjholowaychuk: wouldnt happen in CoffeeScript [01:48] tjholowaychuk: haha [01:49] SubStack: sh1mmer: a book [01:49] aaronblohowiak: SubStack: is es5-shim legitsies? [01:49] sh1mmer: oh yeah [01:49] sh1mmer: I am doing that [01:49] SubStack: http://oreilly.com/catalog/0636920017080 why is it a rhino? [01:49] sh1mmer: dunno [01:49] SubStack: rhino is the other spidermonkey thing, not node! [01:49] sh1mmer: that's weird [01:50] sh1mmer: the book has a common tree shrew [01:50] pyrotechnick: isaacs: it looks like it was finding ~/coffee-script [01:50] pyrotechnick: is that intended behaviour? [01:50] sh1mmer: ACTION goes back to writing [01:50] SubStack: a shrew seems much more apropos [01:50] pyrotechnick: or a side-effect of the whole local/global thing [01:51] wafer: lol that's the rhino from the js definitive [01:51] isaacs: pyrotechnick: are you sitting in ~/coffee-scrit? [01:51] pyrotechnick: no im in ~ [01:51] pyrotechnick: and cloned coffee into ~/coffee-script [01:51] aguynamedben has joined the channel [01:51] pyrotechnick: and when from ~ i run install coffee-script [01:51] pyrotechnick: it installs 1.1.0-pre [01:51] willwhite has joined the channel [01:51] pyrotechnick: so i assume its finding ~/coffee-script [01:51] pyrotechnick: i swear it is [01:51] jacobolus has joined the channel [01:52] pyrotechnick: isabel:~ pyrotechnick$ sudo npm install coffee-script -g --force [01:52] pyrotechnick: /usr/local/bin/coffee -> /usr/local/lib/node_modules/coffee-script/bin/coffee [01:52] pyrotechnick: /usr/local/bin/cake -> /usr/local/lib/node_modules/coffee-script/bin/cake [01:52] pyrotechnick: coffee-script@1.0.1 /usr/local/lib/node_modules/coffee-script [01:52] pyrotechnick: isabel:~ pyrotechnick$ coffee [01:52] pyrotechnick: -bash: /Users/pyrotechnick/node_modules/.bin/coffee: No such file or directory [01:52] pyrotechnick: WHAT [01:52] yhahn has joined the channel [01:52] pyrotechnick: why is today so hard :( [01:52] isaacs: pyrotechnick: hash -r [01:52] pyrotechnick: what [01:52] isaacs: pyrotechnick: hash -r ; which coffee [01:52] pyrotechnick: wats hash do [01:53] pyrotechnick: sorry if thats a noob question [01:53] pyrotechnick: never seen it before [01:53] pyrotechnick: that fixed it [01:53] pyrotechnick: does it reload ur path? [01:53] isaacs: pyrotechnick: bash caches that things resolve to on the PATH so that it doesn't have to look up commands each time [01:53] isaacs: yeah [01:53] pyrotechnick: wow [01:53] isaacs: hash -r resets the cached PATH lookups [01:53] pyrotechnick: okay [01:53] pyrotechnick: thats cool [01:53] pyrotechnick: thanks [01:53] isaacs: :D [01:53] pyrotechnick: i usually restart my terminal, or forget to as in this case [01:53] isaacs: hehe [01:53] isaacs: i like my terminals to live for a long time [01:54] pyrotechnick: i can only imagine the horrors of your bash_history [01:54] pquerna: tedsuo: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#pixel-manipulation [01:54] pyrotechnick: i think you dumped one on gist one day [01:54] pyrotechnick: it made my eyes bleed [01:54] Billbad has left the channel [01:54] pyrotechnick: might have been TJ actually [01:55] pyrotechnick: either way it was cryptic [01:55] tjholowaychuk: what? [01:55] jeffmoss has joined the channel [01:55] pyrotechnick: did u dump ur bash_history a couple of weeks ago [01:55] pyrotechnick: on a gist? [01:55] tjholowaychuk: nope [01:55] pquerna: tedsuo: http://stackoverflow.com/questions/1590965/uploading-canvas-image-data-to-the-server [01:56] tjholowaychuk: this out of bounds exception is kinda lame 'oob' haha come on :p [01:56] kriszyp has joined the channel [01:56] tjholowaychuk: weird though that it doesnt seem at all out of bounds [01:56] tjholowaychuk: something funky going on [01:57] dyer has joined the channel [01:57] dyer has joined the channel [01:57] tjholowaychuk: len > this.buf.length === false however, this.buf.slice(0, len) == oob [01:57] tjholowaychuk: :s [01:59] pyrotechnick: SubStack: is the browserify dnode version on npm? [01:59] secoif has joined the channel [01:59] SubStack: version? [01:59] pyrotechnick: https://gist.github.com/920991 [01:59] pyrotechnick: it still depends on traverse somehow [02:00] pyrotechnick: also coffee-script wtf? [02:00] SubStack: browserify depends on coffee-script [02:00] pyrotechnick: not that i care but why [02:00] pyrotechnick: ohh does it work with coffee now? [02:00] SubStack: so you can bundle up .coffee files [02:00] pyrotechnick: yay [02:00] SubStack: it's been able to do that for a month probably [02:00] SubStack: somebody sent a tiny patch to make it work [02:01] sako has joined the channel [02:01] SubStack: also dnode-protocol needs traverse [02:01] pyrotechnick: isaacs: why did that install to .../ [02:02] rfay_afk has joined the channel [02:02] isaacs: pyrotechnick: what? why did what install to where? [02:02] pyrotechnick: https://gist.github.com/920991 [02:02] pyrotechnick: i was in ~/webclient [02:02] jtsnow has joined the channel [02:03] vipaca has joined the channel [02:04] pyrotechnick: isaacs: ? [02:04] pyrotechnick: WHY :( [02:04] Croms_: When you write your own function containing asynchronous functions it doesn't work. I guess you need to add some sort of callback? [02:04] gtramont1na has joined the channel [02:05] isaacs: pyrotechnick: i saw your gist. [02:05] pyrotechnick: Croms_: http://gist.github.com [02:05] pyrotechnick: isaacs: NFI? [02:05] SubStack: pyrotechnick: did you fix it? I can't find any lingering references to traverse/web in any of my local builds [02:05] isaacs: pyrotechnick: there's a node_modules folder at .. [02:05] isaacs: pyrotechnick: npm ls [02:05] pyrotechnick: but why isnt it installing to ./ i.e. ~/webclient [02:05] isaacs: you're already inside a node package [02:05] pyrotechnick: the folder i was in when i ran it [02:05] isaacs: pyrotechnick: ^ [02:05] isaacs: member:pyrotechnick: there's a node_modules folder at .. [02:06] pyrotechnick: there wasnt before i ran that command [02:06] pyrotechnick: there is a package.json, just a test file [02:06] pyrotechnick: is it seriously finding that [02:06] isaacs: yes [02:06] pyrotechnick: and then doing some voodoo [02:06] pyrotechnick: FUCK MY LIFE [02:06] isaacs: it says "Hi, I'm inside a package." [02:06] pyrotechnick: omfg [02:06] pyrotechnick: thats probably the problem [02:06] pyrotechnick: thanks man [02:06] pyrotechnick: i better format now [02:06] isaacs: just like if you do git init, and then cd into "lib" and then do git checkout somethingorother [02:06] pyrotechnick: ok ok [02:06] pyrotechnick: FML [02:06] pyrotechnick: thanks guys [02:06] isaacs: :) :) [02:06] Croms_: pyrotechnick: One sec. [02:06] isaacs: have a beer, man. [02:06] isaacs: it's not so bad :) [02:06] pyrotechnick: or 10 [02:07] isaacs: sure, or 10 :) [02:07] pyrotechnick: beer oclock in [02:07] pyrotechnick: 3 hours [02:07] pyrotechnick: actually we have wisky on the rocks here [02:07] pyrotechnick: but you know [02:07] pyrotechnick: same effect [02:07] pyrotechnick: next thing you know its saturday morning and your butts sore [02:08] isaacs: sounds like a nice friday [02:08] Tsesame has joined the channel [02:08] pyrotechnick: wouldnt remember [02:09] pyrotechnick: isaacs: worked a charm, thankyou [02:09] pyrotechnick: such a noob [02:09] pyrotechnick: you know [02:09] pyrotechnick: when i started this i saw that file there and was like i should probs remove that but not because i thought it would fuck with it just because it didnt belong there [02:09] pyrotechnick: teach me to ignore myself [02:11] hornairs has left the channel [02:13] Croms has joined the channel [02:13] Croms: Any help would be appreciated, this has been doing my head in for days: https://gist.github.com/99716818397731921b51 [02:14] beawesomeinstead has joined the channel [02:14] beawesomeinstead has joined the channel [02:14] chrislorenz has joined the channel [02:14] jed__ has joined the channel [02:15] jed__: hello all. i was wondering whether anyone could tell me why `npm install keygrip` is failing. [02:15] isaacs: jed__: gist the output [02:15] jed__: i'm getting this message: "Cannot find module '/Users/jed/node_modules/keygrip/scripts/install.js'" [02:15] isaacs: works for me [02:16] isaacs: jed__: gist the output [02:16] jed__: oh, really? gah. [02:16] jed__: comin' right up. [02:16] jed__: https://gist.github.com/921003 [02:16] jed__: i'm kinda outta my depth here. [02:17] isaacs: jed__: gist the npm-debug.log file [02:17] stonecobra has joined the channel [02:18] jdalton has joined the channel [02:18] jed__: https://gist.github.com/921003#file_npm_debug.log [02:18] matschaffer has joined the channel [02:19] themarmot: anyone know why I would be getting this when moving a file: Error: EXDEV, Invalid cross-device link [02:20] isaacs: jed__: npm cache clean; curl http://npmjs.org/install.sh | npm_install=rc sh [02:20] themarmot: fs.rename(files.image.path, image_upload_dir+files.image.filename, function (err) { [02:20] isaacs: jed__: oh, hey, i see a bit of an issue.. [02:20] Emmanuel__ has joined the channel [02:20] isaacs: oh, nvm [02:21] jed__: ah, thanks isaacs. [02:21] jed__: it works now. [02:21] isaacs: swete [02:22] jed__: i guess that one-liner is my goto "execute before bugging isaacs". many thanks. [02:22] isaacs: :)f [02:22] isaacs: no problm [02:22] Bonuspunkt has joined the channel [02:22] eventi: isaacs: you need a helpdesk :) [02:23] dmojoryder has joined the channel [02:23] jed__: npm is so smoove. though i miss the warm embrace of its former chattiness. [02:23] isaacs: jed__: npm config set loglevel info [02:23] isaacs: (or verbose :) [02:23] mike5w3c_ has joined the channel [02:24] jed__: heh, i think i'll just run npm list installed over and over again instead. [02:24] jed__: love that. [02:24] pengwynn has joined the channel [02:26] isaacs: :D [02:26] wilmoore has joined the channel [02:26] a|i: in socketio based libs like nowjs, when the nodejs server is restarted, the currently connected clients never reconnect, they have to refresh they page manually to reconnect. [02:26] a|i: any work around for this? [02:26] A_Nub_Ipad has joined the channel [02:27] pedrobelo has joined the channel [02:27] jacter1 has joined the channel [02:27] HelenWaite has joined the channel [02:28] tjholowaychuk: a|i: I'm sure you/they could implement some kind of ping to restablish the connection [02:29] tjholowaychuk: if that is not already implemented in socket.io i dunno [02:29] a|i: well that 'ping' would be long polling? [02:30] tjholowaychuk: the client could just be lioke "yo bitch, reconnect me" [02:30] a|i: wouldn't it be using too much resource to put long poling on top of a push channel? [02:30] tjholowaychuk: tada [02:30] tjholowaychuk: haha [02:31] a|i: ok, maybe a timer of 2-3 seonds interval is not that bad. [02:31] tjholowaychuk: well you should be able to detect a failed write or something [02:31] tjholowaychuk: or a disconnect event [02:32] a|i: i think disconnect event is not reliable, the server might not get gracefully stopped sometimes. [02:35] patrickarlt has joined the channel [02:36] HelenWaite: QUIT done [02:40] langworthy has joined the channel [02:42] bartt has joined the channel [02:42] azeroth_ has joined the channel [02:46] dnunes has joined the channel [02:47] dnunes: Is anyone else having trouble installing npm? [02:47] dnunes: Tried as root with the .3 and it worked. [02:50] tbranyen: dnunes: in arch i always have to go full root to install using the suggested command [02:51] dnunes: tbranyen: The command have the "$" indicator. I shouldn't need to go root, but only this way it worked. It's messing on /user/local/bin--I think only root can change files in there. [02:52] tbranyen: dnunes: if you install to any folder regardless what its called and you don't have permissions to write to it, its going to be a problem [02:52] tbranyen: i don't know your system or how you have permissions set up [02:52] dnunes: tbranyen: It's a default ubuntu 10.10. [02:53] chrislorenz has joined the channel [02:53] tbranyen: its also not like you can't change that installation directory either [02:53] dnunes: tbranyen: And the install script is choosing the folder--it should check for permissions or ask for "sudo", I think. [02:53] tbranyen: if you want to install locally without having to go root thats def possible [02:53] tbranyen: wrong [02:53] tbranyen: no apps install that way [02:54] harth has joined the channel [02:54] dnunes: tbranyen: I mean... We clearly have an instruction saying: "simply run this command as a normal user". [02:54] tbranyen: take it up with isaacs [02:54] arpegius has joined the channel [02:54] dnunes: tbranyen: I'll suggest they to simply change the line on README to "# ". [02:55] tbranyen: ah in the readme, i was going to say: http://sharefilewith.me/u/28a9b3.png [02:55] tbranyen: indicates no such process [02:55] tbranyen: dnunes: yeah i'd agree with that [02:55] iFire has joined the channel [02:56] tbranyen: although i'm not seeing where you see that [02:56] tbranyen: http://sharefilewith.me/u/02d271.png [02:56] tbranyen: in the readme [02:56] tbranyen: in fact searching for $ in the entire github page doesn't yield any results [02:56] tbranyen: "As of version 0.3, it is recommended to run some npm commands as root. This allows npm to change the user identifier to the nobody user prior to running any package build or test commands. [02:57] tbranyen: Its not like this is made unclear [02:57] dnunes: tbranyen: My mistake. I got the command from the node.js github page (https://github.com/joyent/node/wiki/Installation). [02:57] themiddleman has joined the channel [02:57] dnunes: tbranyen: NPM website doesn't come when I search google, so I always get the node.js page as reference whenever I install a new VM. [02:58] tbranyen: yeah i mean thats not really npm's fault [02:58] tbranyen: usually i do my research before installing anything beyond hitting up the node page [02:58] bingomanatee has joined the channel [02:59] k1ttty has joined the channel [03:00] skm has joined the channel [03:02] ngs has joined the channel [03:03] jtsnow has joined the channel [03:04] skm has joined the channel [03:04] Schmallon has joined the channel [03:04] lukstr: no love for LDAP in node? :( [03:05] arlolra has joined the channel [03:07] AAA_awright: lukstr: I see two modules in https://github.com/joyent/node/wiki/modules [03:08] lukstr: AAA_awright: the node-ldapauth is not working for me, it crashes when I try to search [03:09] tonymilne has joined the channel [03:09] lukstr: the other one says "Tested with Node v0.2.3" I was under the impression it probably wouldn't work -- I'm guessing I was wrong? [03:09] vipaca_ has joined the channel [03:15] themarmot has left the channel [03:15] sivy has joined the channel [03:16] indutny has joined the channel [03:16] Aikar: anyone willing to contribute to OSS and fix a bug in the C msgpack library, ill pay 20$! cant wait for author to fix hes not responding for days now and him being japanese is a timezone issue :( [03:21] Aikar: https://github.com/msgpack/msgpack/issues/42 [03:24] esundahl has joined the channel [03:29] mikeal has joined the channel [03:30] gtramont1na: Hey all, is there a way of running VowsJs from a node script? What I'm trying to do is to run the tests from a Jakefile without having to spawn child processes. [03:30] daniellindsley has joined the channel [03:30] jaekwon has joined the channel [03:31] prettyrobots has joined the channel [03:31] jaekwon: hey ryah, this is jae [03:32] jaekwon: do you know what the v8 security model is like? for example, would it be easy to prevent long running procedures by aborting them, or [03:32] jaekwon: preventing file system access, etc. [03:34] vipaca has joined the channel [03:35] Croms: Does anyone know why example 3 doesn't work? https://gist.github.com/99716818397731921b51 [03:35] deepthawtz has joined the channel [03:36] Twelve-60: changelog for 0.4.6? [03:36] jaekwon: you're not returning it from the outer function [03:37] jaekwon: in fact, what you're trying to do is impossible. [03:37] jaekwon: you can't make an asynchronous function synchronous that way. [03:38] jaekwon: in other words, the inner callback function(error, data){} doesn't even get run when the JS runtime is trying to run "xyz.json.extension" [03:39] ckknight has joined the channel [03:39] ckknight: hey beautiful people [03:40] ckknight has joined the channel [03:40] jaekwon: and you, hello. [03:41] jaekwon: i just frankensteined two headphones into one on a pinch. reminded me of being a kid [03:41] Aria has joined the channel [03:41] ckknight: jaekwon: you monster [03:41] Croms: thanks jae, trying to make it async, any pointers on how to achieve this? [03:42] jaekwon: you want to pass in *another* callback into readJSONFileAsync, that gets called inside the inner callback. [03:42] jaekwon: function readJSONFileAsync(file, callback) { … } [03:42] jaekwon: and instead of return JSON.parse(data);, you need callback(error, JSON.parse(data)) [03:43] jaekwon: following the node.js convention [03:44] jaekwon: now your 'readJSONFileAsync' function works like all the other node.js functions. [03:45] Croms: never had to write my own async functions. i figured out i had to incorporate a callback in some way. any reference for conventions on nodejs.org? [03:45] esundahl has joined the channel [03:47] pyrotechnick: SubStack: i give up :( [03:47] pyrotechnick: https://gist.github.com/921106 [03:47] AntelopeSalad: is anyone using mustache with express? [03:48] realz has joined the channel [03:49] jaekwon: pyrotechnick: .. hmm.. that might be coffeescript doing some weird 'require' overriding. [03:49] ryanfitz has joined the channel [03:49] indutny: ryah: how it's going w/ NPN? [03:49] jaekwon: make sure the versions are compatible. what coffee/node.js versions are you using? [03:49] pyrotechnick: isabel:webclient pyrotechnick$ node -v [03:49] pyrotechnick: v0.4.5 [03:49] pyrotechnick: isabel:webclient pyrotechnick$ coffee -v [03:49] pyrotechnick: CoffeeScript version 1.0.1 [03:49] jaekwon: Croms: not sure where it is on the nodejs.org site, weird. [03:49] pyrotechnick: isabel:webclient pyrotechnick$ npm -v [03:49] pyrotechnick: 1.0.1rc8 [03:50] Croms: found this earlier today: http://caolanmcmahon.com/posts/asynchronous_code_in_node_js [03:50] soulofpeace_ has joined the channel [03:51] pyrotechnick: do you have to do something special to get npm to look for node_modules locally? [03:51] jaekwon: pryotechnick: hmm weird, sorry. i wonder if any npm packages are working for you… and i guess check out the module.js file @ line 302 around there and debug around [03:51] chrislorenz has joined the channel [03:51] jaekwon: i don't think so. [03:52] copongcopong has joined the channel [03:52] pyrotechnick: i think you're right jaekwon [03:52] pyrotechnick: it's FUBAR [03:52] pyrotechnick: BACK TO GLOBAL MODULES [03:52] CrypticSwarm has joined the channel [03:53] jaekwon: http://howtonode.org/control-flow-part-iii [03:53] unomi has joined the channel [03:53] jaekwon: hmmmmm global modules :( [03:53] jaekwon: i've been using local. i dunno man, sorry. [03:54] pyrotechnick: 5 hours just pfft because i ran `npm update` [03:54] pyrotechnick: never again [03:54] jaekwon: lol [03:54] matschaffer has joined the channel [03:54] jaekwon: don't do that. [03:54] jaekwon: j/k [03:54] Billbad has joined the channel [03:54] jaekwon: seriously pyro [03:55] dnunes has joined the channel [03:55] jaekwon: look around the module.js file. with some printfs here and there you'll probably figure it out [03:55] jaekwon: then you can patch npm or something :) [03:57] jaekwon: Croms: but yeah, this convention is strangely not documented on the nodejs site, or at least i can't find it. [03:58] tmzt has joined the channel [03:58] b0t has joined the channel [03:59] esundahl has left the channel [03:59] mike5w3c has joined the channel [04:00] kriszyp has joined the channel [04:02] Croms: thanks dude, i'll try to figure it out through our friends in mountain view. ;—) [04:02] Aikar: gtramont1na: require('vows/bin/vows') [04:02] Aikar: gtramont1na: http://github.com/aikar/wormhole look at runTest.js [04:03] gtramont1na: AikarL: Cool, thanks for the tip. I'll take a look at it. [04:04] gtramont1na: Aikar: Cool, thanks for the tip. I'll take a look at it. [04:04] gtramont1na: *sorry [04:04] kriszyp2 has joined the channel [04:06] CrypticSwarm has joined the channel [04:07] indutny: ryah: i'm trying to implement shared context version of node.js [04:07] indutny: ryah: but when context is beign reused - it just crashes [04:08] tmzt has joined the channel [04:08] jaekwon: git clone ryah [04:08] pyrotechnick: !! [04:11] kriszyp has joined the channel [04:11] xiackok has joined the channel [04:11] harth has joined the channel [04:12] boaz has joined the channel [04:13] losing has joined the channel [04:18] binaryjohn has joined the channel [04:19] tonymilne has joined the channel [04:20] soulofpeace has joined the channel [04:20] sub_pop has joined the channel [04:22] sth has joined the channel [04:22] Yuffster has joined the channel [04:24] tmzt has joined the channel [04:24] Me1000 has joined the channel [04:26] matjas has joined the channel [04:27] seivan has joined the channel [04:28] liar has joined the channel [04:31] Billbad has joined the channel [04:38] cellvia has joined the channel [04:38] siculars has joined the channel [04:38] briznad has joined the channel [04:39] cellvia: greetings! i have a quick question. whats the best way to duplicate an object MINUS its methods? [04:40] deepthawtz has joined the channel [04:40] aaronblohowiak: cellvia: what kind of prototype chain does the object have? [04:40] catshirt has joined the channel [04:40] micheil: probably use a for(i < object.keys) && typeof object[key] !== 'function' && hasOwnProperty(key) [04:40] aaronblohowiak: JSON.parse(JSON.stringify(obj)) is a hack [04:41] aaronblohowiak: but it works [04:41] aaronblohowiak: =) [04:41] jonpacker has joined the channel [04:41] cellvia: not sure, standard i guess, i dont define a prototype for it [04:41] wilmoor__ has joined the channel [04:41] aaronblohowiak: micheil has the best suggestion, but mine has more hack [04:41] cellvia: which do you think performs the fastest, micheils? [04:41] micheil: aaronblohowiak: hmm.. were you working on things relating to websockets by any chance? [04:42] micheil: ACTION recalls you working on something interesting, but can't recall what it was [04:42] aaronblohowiak: Push-It and Transitive.io [04:42] aaronblohowiak: also, i have the best JavaScript ORM of all time. [04:42] cellvia: what orm is that? [04:42] aaronblohowiak: cellvia: https://gist.github.com/b70b91d4cf89ce13e2e6 [04:43] cellvia: haha nice very concise [04:43] aaronblohowiak: it works cross-platform and has no dependencies except for JSON2 if you are in an older browser [04:43] aaronblohowiak: cellvia: thanks. i am trying to sell the rights to SCO [04:44] cellvia: heheh [04:45] ckknight: var cloneWithoutMethods = function(obj) { var result = {}; Object.keys(obj).filter(function(key) { return typeof obj[key] !== "function"; }).forEach(function(key) { result[key] = obj[key]; }); return result; } [04:45] aaronblohowiak: cellvia: does your object have nested objects? [04:46] cellvia: yes it does [04:46] throughnothing has joined the channel [04:46] sechrist has joined the channel [04:46] aaronblohowiak: then my suggestion is the only one that will work so far =) [04:46] Billbad: ckknight: saving that guy for later [04:46] ckknight: oh, recursiveness, hang on. [04:46] rfay_afk has joined the channel [04:46] cellvia: :) [04:46] aaronblohowiak: ckk: use https://github.com/substack/js-traverse [04:46] micheil: aaronblohowiak: wow, push-it must have some hell of a lot of overhead [04:47] aaronblohowiak: micheil: how do you mean? [04:47] micheil: you have three protocols in action [04:47] ckknight: yeah, that'd work well for this, aaronblohowiak [04:47] cellvia: ive been messsing with js-traverse for this but im a bit of a noob [04:47] micheil: websockets, socket-io, and bayuex [04:47] cellvia: i will try the stringify [04:47] aaronblohowiak: micheil: it is bayeux-like, not actual bayeux. but yes. it is not for raw speed. [04:47] nickabusey has joined the channel [04:48] micheil: fair enough :) [04:48] kmiyashiro: nib is looking neat [04:48] aaronblohowiak: micheil: Push-It :: Stomp as WebSockets::TCP Socket [04:48] aaronblohowiak: although stomp doesnt have msg success ACK'ing [04:48] aaronblohowiak: so what do i know [04:48] aaronblohowiak: ;) [04:49] nickabusey: Is there a room for express? [04:49] ckknight: so has anyone done anything cool node-wise in the past few days? I've been away at the MIX conference. [04:50] aaronblohowiak: ckknight: you seen https://github.com/visionmedia/nedis ? [04:50] ckknight: ooh, shiny [04:52] cellvia: thanks for the stringify hack, works perfect! tho would be cool to know good way to use traverse also, as long as i got it workin :) [04:52] aaronblohowiak: cellvia: SubStack is around [04:53] throughnothing has joined the channel [04:53] sendark has joined the channel [04:53] aaronblohowiak: cellvia: the easiest way is probably to .clone() the object and then traverse it and strip out the functions, though that might also be the lazy way =) [04:54] cellvia: i was able to traverse the object and update the methods to = false [04:54] cellvia: but not sure how to actually strip out the current object in traverse [04:54] brianmario has joined the channel [04:55] cellvia: destroy/remove it [04:55] cellvia: theres a method for this.update, but not anything obvious like this.destroy or this.remove [04:55] ckknight: cellvia: delete thing.method [04:55] cellvia: oh [04:55] osserver has joined the channel [04:55] cellvia: derp [04:55] cellvia: thanks [04:55] ckknight: it's a javascript keyword [04:55] cellvia: ACTION tard [04:55] cellvia: thakns [04:56] osserver: hey anybody here had any experience running node-inspector from an external machine? [04:56] jimt: Is there a Javascript library for manipulating .zip archives? (I come from the Python world, and would like something equivalent to its zip module). [04:56] aaronblohowiak: something like if(blah is a fn) delete parent[key] [04:57] [[zzz]] has joined the channel [04:57] tedsuo has joined the channel [04:58] SamuraiJack has joined the channel [04:58] Noviets has joined the channel [04:59] Noviets: G'day guys, im trying to convert a FileHandle (File object) into an XML object. This will help to explain what im trying to do: http://pastebin.com/pMxgrzqT [05:01] meso_ has joined the channel [05:01] mscdex: Noviets: what is FileOpen? [05:01] Noviets: SpiderMonkey syntax. [05:02] mscdex: :S [05:02] Noviets: I know, i hate it [05:02] Noviets: Have no choice unfort [05:02] sleeplessinc has joined the channel [05:03] mscdex: Noviets: well, there is no built-in XML support in node, so you'll have to choose an XML module that fits your needs [05:03] Noviets: I have a script that works but i have no clue how [05:03] mscdex: ? [05:04] Noviets: Ill paste the functions, it uses 3, maybe you could look at them and see what im doing wrong [05:04] ckknight: Noviets: you could paste your code to pastebin. [05:06] Noviets: K here [05:06] Noviets: http://pastebin.com/eg5snH5q [05:06] skm has joined the channel [05:06] Noviets: Its all over the place.. [05:06] Noviets: Like 5 functions [05:08] ckknight: okay, so what's your question? [05:10] bingomanatee has joined the channel [05:10] harth has joined the channel [05:13] jjmalina has joined the channel [05:14] Noviets: Why doesnt this one work? http://pastebin.com/pMxgrzqT [05:14] Noviets: How to I convert the File Object into an XML object so itemlog.item will work? [05:14] Noviets: It says undefined atm as its a fileobject, so it doesnt have nodes [05:14] Noviets: Im trying to get all of the nodes from gamexml and add them to masterxml [05:15] Noviets: gamexml is a temp file, which is added to masterxml, and then tempfile (gamexml) is cleared [05:15] fangel has joined the channel [05:16] nuba has joined the channel [05:16] techwraith: Noviets npm install xml2js might help [05:16] ckknight: Noviets: start adding console.log statements around [05:17] techwraith: Or I should read before I type :) [05:17] Noviets: Im limited to spidermoneky lol [05:17] xiackok has left the channel [05:17] techwraith: Why? [05:18] rchavik has joined the channel [05:19] jacter has joined the channel [05:21] Noviets: Because this is an addon script for another program. [05:21] Noviets: and the program uses Spidermonkey to parse the script files. [05:22] Noviets: As I said before: this one works http://pastebin.com/eg5snH5q [05:22] stisti has joined the channel [05:22] Noviets: But its sooo scattered around I cant make heads and tails of why its working. [05:23] skeletonjelly has joined the channel [05:23] skeletonjelly: hey guys, anyone knows how to do conditionals in jade? [05:24] skeletonjelly: like: if (var) { div input(type="text") } [05:24] skeletonjelly: cant figure out the syntax for this [05:24] ckknight: skeletonjelly: - at the front of a line to enter javascript, so: - if (var) { \n div input(type="text") \n - } [05:24] skeletonjelly: hey thanks! [05:24] ckknight: np [05:25] jacter has joined the channel [05:26] daleharvey: anyone happen to have a handy script for testing simultaneous connections to a node server? [05:27] cloudhea3 has joined the channel [05:29] techwraith: Some really really cool functions in here: https://github.com/caolan/async [05:30] skeletonjelly has left the channel [05:30] kjeldahl has joined the channel [05:37] breccan has joined the channel [05:37] akavlie has joined the channel [05:39] brolin has joined the channel [05:42] brolin has joined the channel [05:42] ryah: techwraith: yeah, async is awesome [05:43] techwraith: ryah: Yeah, I almost feel like I just discovered the jQuery of node [05:43] techwraith: It's awesome that I don't have to implement these things anymore [05:45] path[l] has joined the channel [05:45] RusAlex has joined the channel [05:46] Noviets: Damnit ive been trying to write this now for 4 days. [05:47] DennisRas has joined the channel [05:47] ryah: god. i love working with c [05:48] ryah: well, i also hate it [05:48] ryah: but - i love debugging it [05:48] pquerna: techwraith: +1 to async [05:48] ryah: i love non-mangled symbols [05:49] Aria: YES THAT. [05:49] pquerna: well yeah. thats like. one of the.. dumber things in c++. [05:50] akavlie: techwraith, what's this about async? [05:50] techwraith: It's awesome :) [05:50] stisti has joined the channel [05:50] jaekwon: ryan, is it possible to abort a long-running callback in v8? [05:51] SamuraiJack_ has joined the channel [05:51] ryah: jaekwon: no [05:51] jaekwon: :) thanks [05:51] ryah: jaekwon: like preemptive multitasking? [05:51] ryah: if there is something long running like that do it out of process [05:52] ryah: the OS already has those features [05:52] cellvia: heres another noob question... how can i build a object reference path from an array like so ["node", "parent", "child"] to then build obj["node"]["parent"]["child"] ? [05:52] jaekwon: no i mean some native runtime calls maybe that allow me to find and abort say infinite loops, (not in node.js userland). i'm just curious if this is possible. [05:53] akavlie: techwraith, this? https://github.com/fjakobs/async.js [05:53] ryah: var o = {}; for (var i = 0; i < a.length; i++) { o = o[a[i]] = {}; } [05:54] tylerstalder has joined the channel [05:54] techwraith: akavlie: This -> https://github.com/caolan/async [05:54] pyrotechnick: v8: var o = {}; for (var i = 0; i < a.length; i++) { o = o[a[i]] = {}; } [05:54] v8bot: pyrotechnick: ReferenceError: a is not defined [05:54] techwraith: close to the same thing though [05:54] techwraith: Just more generic [05:55] ryah: pquerna: i bet a modern compiler could guess many memory leaks [05:55] SamuraiJack__ has joined the channel [05:55] pyrotechnick: anyone used clang/llvm? [05:55] pyrotechnick: it's amazing [05:55] ryah: pquerna: and valgrind can catch the rest [05:56] pyrotechnick: WHAT'S THAT? YOU MISSED A SEMICOLON? DW BRO I PUT IT IN FOR YOU! [05:56] cellvia: v8: var a = ["node", "bilbo", baggins"]; var o = {}; for (var i = 0; i < a.length; i++) { o = o[a[i]] = {}; } [05:56] v8bot: cellvia: SyntaxError: Unexpected token ILLEGAL [05:57] akavlie: techwraith, ah, next one on the list! Haha. [05:57] cellvia: v8: var a = ["node", "bilbo", baggins"]; var o = {}; for (var i = 0; i < a.length; i++;) { o = o[a[i]] = {}; } [05:57] v8bot: cellvia: SyntaxError: Unexpected token ILLEGAL [05:57] cellvia: sorry guys [05:57] ryah: i++; [05:57] cellvia: v8: var a = ["node", "bilbo", "baggins"]; var o = {}; for (var i = 0; i < a.length; i++;) { o = o[a[i]] = {}; } [05:57] v8bot: cellvia: SyntaxError: Unexpected token ; [05:57] cellvia: v8: var a = ["node", "bilbo", "baggins"]; var o = {}; for (var i = 0; i < a.length; i++) { o = o[a[i]] = {}; } [05:57] v8bot: cellvia: {} [05:58] cellvia: thakns [05:58] pyrotechnick: lol https://github.com/rails/rails/commit/9f09aeb8273177fc2d09ebdafcc76ee8eb56fe33#commitcomment-343853 [05:58] ckknight: hehe [05:59] techwraith: pyrotechnick++ [05:59] v8bot: techwraith has given a beer to pyrotechnick. pyrotechnick now has 2 beers. [06:00] mscdex: node.js rules! [06:00] pquerna: ryah: true [06:00] techwraith: yes. yes it does. [06:00] pquerna: ugh, uglify has no way.. to keep the original line numbers [06:00] pquerna: :-/ [06:00] ryah: pquerna: write mralelph [06:00] ryah: ask his aopinion [06:01] alcuadrado has joined the channel [06:01] ryah: ACTION msgs erik [06:01] pquerna: but my sprint says I'm supposed to have code coverage done tomorrow [06:02] SamuraiJack__ has joined the channel [06:02] ryah: pquerna: aren't you the boss? [06:02] pquerna: details [06:02] konobi: heh [06:03] ryah: pquerna: preprocess the code - regex a "___cov[__filename][__LINE__] = true" in there [06:03] ryah: pquerna: you could even hack node's module.js to do it [06:03] pquerna: yes, that thought had crossed my mind [06:03] pquerna: i was hoping to avoid [06:03] pquerna: well [06:03] pquerna: using regex [06:04] pquerna: i might just have to insert blank lines [06:04] pquerna: with uglify i think [06:04] pquerna: this will be freaking ugly [06:04] ckknight: code coverage _and_ obfuscation? [06:04] Noviets: Does anyone here know Spidermonkey js? [06:04] ckknight: but why? [06:04] Aria: A little, Noviets [06:05] ryah: me: hey - have you thought about how to do code coverage in v8? [06:05] ryah: there's probably like some super optimal way inside the VM - or? Erik: No [06:05] ryah: src->src transforms [06:05] ryah: Add logging to every fn [06:05] ryah: No ez way 2 do line based coverage [06:05] captain_morgan has joined the channel [06:05] jaekwon: pyrotechnick: what are you using clang for? [06:05] ryah: kind of tempted to add cov to node now [06:05] Noviets: Aria; How do I open a filehandle using FileOpen, for an XML file, identify the file object as an xml object, then get the child nodes out of it? [06:05] ryah: node --cov program.js [06:06] konobi: node-jscoverage? [06:06] Noviets: Ill show u what I have so far. [06:06] ryah: ^-- dumps node-cov.txt [06:06] copongcopong has joined the channel [06:06] Noviets: http://pastebin.com/pMxgrzqT [06:06] Aria: Oh goodness. [06:06] unomi has joined the channel [06:06] ryah: ACTION does it [06:07] pquerna: konobi: node-jscoverage embeds spidermonkey, parsers all your js in, writes out new files with hacked-lines like ry was mentioning [06:07] pquerna: konobi: then you read out of the global jscoverage variable after running a test to see what line numbers were run [06:07] konobi: urgh [06:07] Aria: You're going to need to parse the XML, Noviets -- I'm not sure if there's an XML equivalent of innerHTML, but ... that's likely it. [06:07] coreb has joined the channel [06:07] secoif has joined the channel [06:08] pquerna: konobi: the idea of using uglify, was we coudl avoid the dependency on compiling spidermonkey at least, a pure-js method of doing it [06:08] konobi: marcissus? [06:08] konobi: *nar [06:09] timcosgrove has joined the channel [06:09] timcosgrove has left the channel [06:10] joshthecoder has joined the channel [06:10] ryah: ACTION tries to think of all the statements that span lines... [06:10] ryah: hm -- hard [06:11] ryah: replace(';', covCounter) [06:11] ckknight: just go with newlines, imo. [06:12] ryah: { a: 2\nb: 3} [06:12] ckknight: if you obfuscate your code and put multiple things on one line, it's your own fault if your coverage is poor [06:12] ckknight: oh [06:12] ckknight: lousy... [06:12] ckknight: steal codez from https://github.com/visionmedia/node-jscoverage ? [06:13] coreb: is the statement about 2100 req/s true? http://developer.yahoo.com/blogs/ydn/posts/2010/07/multicore_http_server_with_nodejs/ [06:13] ckknight: coreb: depends on your server setup, but yeah, I've seen that amount. [06:13] ckknight: it depends on what you're doing, really. [06:13] ckknight: and where your bottlenecks are. [06:14] ryah: coreb: i can do 8000 on my computer [06:14] ckknight: I get about 6000 doing a simple hello world [06:15] coreb: a proxy would be something else than a hello world, though ;) [06:16] techwraith: A proxy is pretty simple in node though [06:17] coreb: yeah, I was a little surprised about the 2100 statement [06:17] pquerna: well, new lines don't work [06:17] pquerna: i tried that first [06:17] pquerna: things like dangling else { [06:18] ryah: .replace(/;$/, cov) [06:18] pquerna: https://github.com/pquerna/node-blanket/blob/master/lib/blanket.js#L37-55 [06:18] pquerna: ryah: hmm [06:18] ryah: not perfect, but okay :) [06:20] ckknight: so I was at MIX this week and was kinda surprised at how many people were excited about node.js [06:20] ckknight: I also saw it running on Windows Azure, which was cool [06:20] pquerna: 'on' azure? [06:21] ckknight: yep, inside an Azure instance, it was running 8 node instances and directing traffic round-robin through ARR. [06:21] pquerna: http://blog.smarx.com/posts/node-js-ruby-and-python-in-windows-azure-my-mix-talk [06:21] pquerna: hmm [06:21] ckknight: yep, that's it [06:21] ckknight: smarx is a pretty cool guy, talked with him a bit about it. [06:22] coreb: ckknight: did you manage to get yourself famous there? [06:22] ckknight: I'm already famous [06:22] ckknight: I do programming purely to get the women. [06:23] coreb: hence the escorting service [06:24] ckknight: ba-dum-tisch! [06:24] pquerna: ryah: you know what else has a javascript parser. jslint. [06:24] ckknight: ACTION coughs in the direction of JSHint [06:24] pquerna: nevermind, that was a terrible idea. [06:25] ckknight: I'm pretty sure it actually makes an AST and does analysis on that [06:25] catshirt has joined the channel [06:25] pquerna: https://github.com/jshint/jshint/blob/master/jshint.js#L1638 [06:25] pquerna: yes [06:25] pquerna: but we just want to know what lines are 'safe' to insert crap on [06:25] ryah: a statement parser probably isnt too bad... [06:25] ryah: hm [06:25] sechrist_ has joined the channel [06:26] coreb: I'm downloading smarx' leetspeek, let's hope it's worth watching [06:27] ckknight: coreb: in his other talk, he also showed how to run CouchDB on Azure [06:27] sechris__ has joined the channel [06:27] ckknight: ryah: there were a lot of people pining for the use of I/O completion ports on Windows [06:27] danheberden has joined the channel [06:27] coreb: cool, I like couchdb 1.0.0 a lot ;) [06:28] coreb: anyone remember their little mishap? [06:28] konobi: pquerna: https://github.com/jashkenas/coffee-script/wiki/List-of-languages-that-compile-to-JS [06:28] sub_pop has joined the channel [06:28] konobi: never mind the title... good long list of stuff in there [06:28] opaque has joined the channel [06:29] Billbad has left the channel [06:29] ivanfi has joined the channel [06:30] opaque: Anyone know how to query an ObjectId field other than "_id" using Mongoose? [06:31] siculars has joined the channel [06:31] sechrist has joined the channel [06:31] seivan has joined the channel [06:32] coreb: don't know about js, but in python it would be "field": ObjectId(the_string) [06:32] derferman has joined the channel [06:32] sechrist_ has joined the channel [06:32] flippyhead has joined the channel [06:32] seivan has joined the channel [06:34] ryah: pquerna: https://gist.github.com/921256 [06:34] pquerna: hot [06:35] pquerna: so, really just need the adding coverage part [06:35] pquerna: hrm [06:35] sechris__ has joined the channel [06:36] Billbad has joined the channel [06:36] ckknight: opaque: yeah, just Model.find({ field: ObjectId(blargh) }, function(err, data) { }), pretty sure. [06:36] ryah: there was a little error: https://gist.github.com/921260 [06:37] marcosvm has joined the channel [06:37] Billbad: any active mogodb irc channels anyone knows of? [06:37] coreb: #mongodb [06:38] Billbad: Why couldn't I find that? [06:38] opaque: ckknight: Where did you get ObjectId() from? [06:38] coreb: because you think it's called mogodb? ;) [06:38] ckknight: opaque: require('mongoose').Schema.ObjectId [06:40] opaque: ckknight: Mongoose tells me its an "abstract function". Are you sure it works? [06:40] ckknight: I'm not. [06:40] konobi: ryah: console.log("one;two;three;"); ? [06:40] jacobolus has joined the channel [06:40] ckknight: see what happens when you just provide a string, opaque [06:42] mytrile has joined the channel [06:42] opaque: ckknight: Yeah. I think that's only available when defining a schema. [06:42] niftylettuce has joined the channel [06:42] niftylettuce: alright I'm in need of some serious logical assistance [06:42] konobi: ryah: ah... i see... /;\s*?$/ perhaps [06:42] ckknight: well then. I'd still see if just a string works, opaque [06:43] ajpiaNOU has joined the channel [06:43] CIA-72: node: 03Ryan Dahl 07master * rb4ff36a 10/ (lib/module.js src/node.cc src/node.js test/common.js): Add --cov code coverage option - http://bit.ly/gXoT23 [06:43] niftylettuce: anyone here work with connect and file streaming / folder listing with node.js? [06:43] ryah: konobi: we should push people who have EOL whitespace [06:43] adulteratedjedi has joined the channel [06:43] ryah: s/push/punish/ [06:43] pquerna: lol [06:43] Aria: Yes, yes we should. [06:43] konobi: heh [06:44] Aria: Fail their commits at least. [06:44] ryah: i think --cov is a cool feature [06:44] ckknight: ryah: seems like something better for JSHint. [06:44] ryah: easy enough [06:44] pquerna: ryah: while around it, --cov=foo.json [06:44] ryah: pquerna: that seems too hard [06:44] pquerna: ryah: mostly so we can run multiple node processes in the same cwd [06:45] pquerna: for parallel test cases [06:45] justinTNT has joined the channel [06:45] justinTNT: hey, [06:46] justinTNT: can I wrap and with node-jquery, or do I have to use jsdom? [06:46] Shinuza has joined the channel [06:47] RusAlex has joined the channel [06:47] doubletap1 has joined the channel [06:48] opaque: ckknight: I did that and it returned the same error. I just tried using require('mongoose').Types.ObjectId. I'm not getting an error but it still doesn't find anything. [06:48] konobi: ryah: yar... cov_$$.json [06:48] konobi: ++ [06:48] ckknight: opaque: what error? [06:49] opaque: The error about ObjectId being an abstract instruct. [06:50] robhawkes has joined the channel [06:50] ckknight: use find with a string [06:50] V1 has joined the channel [06:50] V1: Oh why is there a old channel topic? [06:51] opaque: ckknight: I did try it with a literal string. Its still returning an error. [06:52] ckknight: which error? [06:52] ajnasz has joined the channel [06:52] opaque: ckknight: Error This is an abstract interface. Its only purpose is to mark fields as ObjectId in the schema creation. [06:52] ckknight: okay, show me your code [06:53] shaunau has joined the channel [06:53] ph^ has joined the channel [06:54] opaque: ckknight: http://pastie.org/1796517 [06:55] newy has joined the channel [06:55] ckknight: I told you to use a literal sting [06:55] ckknight: don't use ObjectId [06:56] fangel has joined the channel [06:57] opaque: ckknight: doing that brings up no error, but I'm not getting any results found. I'm sure there's an object because I'm doing the same query inside mongo [06:57] ckknight: hmm [06:58] jaket_ has joined the channel [06:58] shaunau: sorry to interrupt but isnt it meant to be _id: ObjectId [06:58] ryah: can someone add the --cov to node's test runner please? :) [06:58] ryah: would also like some html generated with the source - would be nice [06:59] shaunau: oh. ignore me. i see. [06:59] shaunau: :/ [07:00] shaunau: thats a ref to user frmo place. ill stfu now. [07:00] justinTNT: anyone got node-jquery working? [07:00] ckknight: opaque: from examples, it seems like .find({field: '4d83f53dd0416b3837000001'} should work [07:00] emattias has joined the channel [07:03] SubStack: pyrotechnick: npm install -g dnode [07:03] SubStack: pyrotechnick: if you're using npm >= 1 [07:03] SubStack: blame isaacs for that one [07:05] brainproxy has joined the channel [07:05] V1: And heres a global patch: https://gist.github.com/916451 to do global installations by default :) [07:05] SubStack: haha [07:05] zentoooo has joined the channel [07:05] techwraith: Why would you want to do globals by default? [07:06] opaque: ckknight: Yea I don't really know what's wrong. whether its on my end or mongoose is doing some weird. [07:06] tfe_ has joined the channel [07:06] V1: techwraith: Why would want to have 20 copies of the same module? [07:06] SubStack: techwraith: if you want to use modules from the repl [07:06] SubStack: which is pretty much always [07:06] techwraith: It's better than depending on a package manager in a multi-dev production environment :) [07:07] techwraith: I actually do both usually [07:07] SubStack: it's a bad default [07:07] deebo: does node load modules from cwd somehow? [07:07] deebo: like ./node_modules/ like npm seems to do [07:08] mraleph has joined the channel [07:08] techwraith: Yep, that's what node does now [07:09] SubStack: if you're setting up a sandboxed staging environment you would expect to have to use a different command anyhow [07:09] deebo: cool, so i can have local libs easily [07:09] SubStack: it violates expectations with little upside [07:10] felixge has joined the channel [07:10] zylo has joined the channel [07:10] jesusabdullah: What does? [07:10] groom has joined the channel [07:12] Noviets: js> var This = "mygamename-02"; This.substring(This.lastIndexOf("-") + 1); return This; [07:12] gbot2: Noviets: Error: SyntaxError: return not in function: var This = "mygamename-02"; This.substring(This.lastIndexOf("-") + 1); return This; .......................................................................^ [07:12] Noviets: js> var This = "mygamename-02"; This.lastIndexOf("-") + 1); return This; [07:12] gbot2: Noviets: Error: SyntaxError: missing ; before statement: var This = "mygamename-02"; This.lastIndexOf("-") + 1); return This; .....................................................^ [07:12] Noviets: js> var This = "mygamename-02"; (This.lastIndexOf("-") + 1); return This; [07:12] gbot2: Noviets: Error: SyntaxError: return not in function: var This = "mygamename-02"; (This.lastIndexOf("-") + 1); return This; .........................................................^ [07:12] CIA-72: node: 03Ryan Dahl 07master * rda9b334 10/ tools/covhtml.js : Add covhtml.js tool - http://bit.ly/fpi2yS [07:14] Druide_ has joined the channel [07:16] AntelopeSalad: what's the syntax for the meta tag using jade with express? the documention doesn't show it and none of tj's git projects use it [07:17] TomY_ has joined the channel [07:17] mAritz has joined the channel [07:17] Aria: meta(charset="utf-8") ? [07:18] raphdg has joined the channel [07:18] Bogh has joined the channel [07:19] seivan has joined the channel [07:20] sechrist has joined the channel [07:21] iseenoevil has joined the channel [07:21] AntelopeSalad: aria: i must be on drugs, i tried that style of syntax earlier but it's working now [07:21] Aria: ACTION laughs. [07:22] coreb: opaque, ckknight; using a string doesn't work with either the python or the c# driver, because of a type mismatch [07:22] coreb: it would look for a string field to compare with, and ignore the ObjectId field [07:23] ckknight: coreb: how do you do it, then? [07:25] coreb: I've never used mongoose [07:25] ckknight: I am disappoint [07:25] seivan has joined the channel [07:25] coreb: but wouldn't new ObjectId make sense in stead of ObjectId('string')= [07:25] ckknight: not necessarily [07:26] SamuraiJack__ has joined the channel [07:27] coreb: opaque: try; var ObjectId = require('mongoose').Types.ObjectId; [07:27] coreb: then new ObjectId("string") [07:28] opaque: coreb: I tried that. no error, but still not getting any results. [07:29] coreb: well, are you _sure_ that you have the right value and that it _is_ an ObjectId field? [07:29] sh1mmer has joined the channel [07:29] __tosh has joined the channel [07:29] coreb: do the same query in the mongo shell [07:30] opaque: coreb: It definitely is an objectid field. Using ObjectId() in the mongo shell finds it. [07:30] robhawkes has joined the channel [07:30] coreb: ok, so show the code where you did "new ObjectId("string")" [07:31] SamuraiJack__ has joined the channel [07:31] jonathantaylor has joined the channel [07:32] JimBastard has joined the channel [07:32] troessner has joined the channel [07:33] opaque: Place.findOne({ user: new ObjectId("4da571e3704a153f36000003") }, function(err, place) { [07:34] coreb: hm, set profiling on the collection, and see what it tells you [07:34] eschnou has joined the channel [07:34] [AD]Turbo has joined the channel [07:35] techwraith: opaque: do you have access to the user object? [07:35] coreb: it's a field, obviously [07:36] techwraith: 'cause you could do: Place.findOne({ user: user, function(err, place) { [07:36] coreb: in the place collection [07:36] techwraith: Also, you're missing a } in there [07:36] techwraith: nevermind, I deleted it [07:36] techwraith: must be late :P [07:37] techwraith: if that doesn't work, do {user: user._id} [07:37] kioopi has joined the channel [07:37] shaunau: be nice if you could do {user._id:...} [07:38] msucan has joined the channel [07:38] jesusabdullah: why ._id ? [07:38] SamuraiJack__ has joined the channel [07:39] garuda has joined the channel [07:39] techwraith: 'cause that's where the object id is stored [07:39] hellp has joined the channel [07:39] jesusabdullah: Not user = { id: "thing" } ? [07:39] techwraith: user._id == ObjectId("4da571e3704a153f36000003") [07:39] heavysixer has joined the channel [07:39] lorhko has joined the channel [07:40] techwraith: it's an internal mongo thing I think [07:41] ehedenst has joined the channel [07:41] mtsl has joined the channel [07:42] [AD]Turbo: hi there [07:44] littke has joined the channel [07:45] SamuraiJack__ has joined the channel [07:46] jacobolus has joined the channel [07:46] justinTNT: fs.readFile(name, function(err, data){ // why do I need to typecast data before wrapping it in jquery? [07:46] Billbad: Is there an IRC channel for mongodb? [07:47] niftylettuce: how do I reference a variable passed to an app.get? [07:47] niftylettuce: i know in app.post you can do req.form.complete(function (err, fields, files) [07:47] niftylettuce: would it just be app.post('/api/myCall', function(req, res, next) { [07:47] niftylettuce: and I'd reference like req.firstname? [07:47] techwraith: Billbad, yes [07:47] techwraith: it's either #mongodb or #mongo [07:48] adulteratedjedi: it is mongodb [07:48] Emmanuel__ has joined the channel [07:48] techwraith: req.param('param-name') [07:49] sh1mmer has joined the channel [07:49] techwraith: so var firstName = req.param('firstname'); [07:49] techwraith: Should do it [07:49] niftylettuce: techwraith: e.g. $.get('/api/getFiles', {user_id: folder.id} function (res) { [07:49] niftylettuce: and my app.get is ... [07:49] niftylettuce: app.get('/api/getFiles', function (req, res, next) { [07:50] niftylettuce: so it'd be req.param('user_id') ? [07:50] techwraith: Should be [07:50] techwraith: http://expressjs.com/guide.html#req.param() [07:50] techwraith: or you can use req.query [07:51] sh1mmer has joined the channel [07:51] niftylettuce: techwraith: TypeError: Object # has no method 'param' [07:52] Ori_P has joined the channel [07:52] techwraith: Odd, what version of express are you using? [07:52] Shinuza has joined the channel [07:53] niftylettuce: techwraith: how do I figure out? [07:53] jaket has joined the channel [07:53] techwraith: type express -v into your command line [07:54] niftylettuce: techwraith: 0.3.18 [07:54] techwraith: hmmm [07:54] techwraith: k [07:54] niftylettuce: want to see full code? [07:54] techwraith: please [07:54] niftylettuce: here is from api.js: http://pastie.org/private/51yyjvbfjfxatgh2vhe1kg [07:55] niftylettuce: here is dynamic script.js where I'm trying to pull out files based off user id passed to the api.js [07:55] niftylettuce: http://pastie.org/private/nhuatgrypnfochk5lwv5w [07:55] techwraith: on line 3, add in: console.log(req.query); [07:55] shaun_ has joined the channel [07:56] niftylettuce: is syntax of my $.get statements wrong? [07:56] ralphholzmann has joined the channel [07:56] niftylettuce: e.g. line 39 of last link I esnt? [07:56] techwraith: looks ok to me [07:57] techwraith: let me know what that console.log outputs [07:57] niftylettuce: undefined [07:57] niftylettuce: TypeError: Object # has no method 'param' [07:57] tbassetto has joined the channel [07:57] niftylettuce: undefined is the console.log output [07:57] niftylettuce: and the no method param is from var user_id...~ [07:57] techwraith: yeah, weird [07:58] SamuraiJack has joined the channel [07:58] techwraith: can you just console.dir(req) in there and put it up on pastie? [07:59] roidrage has joined the channel [07:59] qFox has joined the channel [07:59] niftylettuce: techwraith: the problem is the param isnt getting passed to the get API request [07:59] niftylettuce: params[] is empty [08:00] techwraith: Then yeah, something's wrong on jQuery's end [08:00] techwraith: one sec [08:00] kuebk has joined the channel [08:00] techwraith: Try: [08:00] kuebk: hey [08:00] kuebk: how do you guys profile nodejs? [08:00] techwraith: $.get('/api/getFiles?user_id='+folder.id, function (res) { [08:01] shaun_: profile? ab? [08:01] niftylettuce: i think i got it [08:01] techwraith: kuebk: https://github.com/mape/node-profile [08:01] niftylettuce: I forgot to enclose var name in quotes [08:01] niftylettuce: let me try [08:01] niftylettuce: $.get('/api/getFiles', {"user_id": folder.id}, function (res) { [08:01] mape: techwraith: Don't think that is working any longer though [08:01] techwraith: Ah [08:01] techwraith: my bad [08:02] mape: And most of the time the output isn't all that helpful anyway [08:02] techwraith: mape: Any ideas then? [08:02] niftylettuce: fuck [08:02] niftylettuce: not it [08:02] techwraith: Other than the Metrics lib I'm working on? ;) [08:02] niftylettuce: sorry language !!! [08:02] kuebk: techwraith its sampling [08:02] kuebk: not profiling [08:02] niftylettuce: ACTION apologizes [08:02] mape: use the inspector module? [08:02] fayce has joined the channel [08:02] kuebk: it doesn't show calls which are under 1ms [08:02] mape: then you can do console.profile I believe [08:02] techwraith: niftylettuce: did you tryi it the way I had it? [08:03] techwraith: niftylettuce: $.get('/api/getFiles', {"user_id": folder.id}, function (res) { [08:03] techwraith: sorry, not that [08:03] techwraith: $.get('/api/getFiles?user_id='+folder.id, function (res) { [08:03] techwraith: that [08:03] fayce_ has joined the channel [08:03] SamuraiJack has joined the channel [08:04] niftylettuce: techwraith: TypeError: Object # has no method 'param' [08:04] techwraith: damn [08:04] techwraith: what is the console.log outputting? [08:05] littke_ has joined the channel [08:05] niftylettuce: params array is empty [08:05] [AD]Turbo has joined the channel [08:06] techwraith: I think the params array is just the/:stuff/in/:the/path [08:06] techwraith: (the one's with ":") [08:06] techwraith: I think req.query is the one you want to look at [08:06] techwraith: What browser are you using? [08:07] niftylettuce: chrome [08:07] techwraith: Open up developer tools and see what the request looks like [08:07] ajnasz has left the channel [08:07] niftylettuce: TypeError: Object # has no method 'query' [08:08] niftylettuce: Failed to load resource: the server responded with a status of 500 (Internal Server Error) [08:08] niftylettuce: XHR finished loading: "http://127.0.0.1:8000/api/getFiles?user_id=42". [08:08] tlrobinson has joined the channel [08:08] techwraith: so, the param is getting sent, it's not on jQuery's end [08:08] techwraith: on to node [08:09] niftylettuce: here is current script on api.js http://pastie.org/private/bumcgajae0hz8oh4jecspa [08:09] techwraith: sorry, query isn't a method [08:10] techwraith: change console.log(req) to console.dir(req.query); [08:10] davidcoallier has joined the channel [08:10] mraleph has joined the channel [08:10] niftylettuce: undefined [08:10] niftylettuce: TypeError: Object # has no method 'query' [08:10] thall has joined the channel [08:11] techwraith: change req.query("user_id") back to req.param("user_id"); [08:12] cloudhead has joined the channel [08:12] techwraith: can you give me a pastie of what req looks like? [08:12] techwraith: (just a console.dir(req) ) [08:12] niftylettuce: http://nodejs.org/docs/v0.4.1/api/http.html [08:12] niftylettuce: i think I have to parse the url of req.url into parts [08:13] techwraith: Oh, you aren't using bodyDecoder? [08:13] niftylettuce: whats that [08:14] techwraith: in your express.createServer() what middleware are you passing in? [08:14] pt_tr has joined the channel [08:14] techwraith: when you're defining app [08:14] cloudhead has joined the channel [08:14] JimBastard: can anyone remind me where i can find some tty detection code? [08:14] JimBastard: i.e. determine if you are in the tty....opening docs now [08:14] techwraith: JimBastard: :( nope, sorry [08:14] niftylettuce: im not using express [08:15] JimBastard: tty.isatty(fd) Returns true or false depending on if the fd is associated with a terminal. [08:15] techwraith: where are you defing app then? [08:15] techwraith: sorry, app.get must have confused the hell out of me [08:15] techwraith: lol [08:16] cloudhead: JimBastard: keep in mind process.stderr.fd is undefined [08:16] niftylettuce: sfaergehtkhj;'; [08:16] JimBastard: cloudhead: Sorry? [08:16] SamuraiJack has joined the channel [08:16] cloudhead: tty.isatty won't work on process.stderr.fd [08:16] niftylettuce: techwraith, I'm tempted to do a post request... [08:16] techwraith: niftylettuce: http://www.shinstudio.com/blog/programming/pulling-query-string-in-node-js/ [08:17] cloudhead: only on stdout, you'll have to use `2` [08:17] JimBastard: cloudhead: The real problem is, if we use colors on a string and write it to a file, it contains the escape codes. Do we attempt to detect first and return an unmodified string, or do we scan for the codes and remove them later? [08:17] techwraith: might be old info :/ [08:17] cloudhead: JimBastard: you detect first [08:18] JimBastard: so really, it should be fixed in winston then [08:18] techwraith: http://nodejs.org/docs/v0.4.6/api/url.html#url.parse [08:18] cloudhead: well [08:18] cloudhead: depends [08:18] techwraith: niftylettuce: ^ [08:18] cloudhead: you might want to use something else instead of color [08:18] JimBastard: cloudhead: how do you mean? [08:18] cloudhead: like if 'foo' is not bold, you might want it to be [foo] [08:19] JimBastard: ahh i see, more like styling [08:19] cloudhead: yea [08:19] techwraith: niftylettuce: also depends on what version of node you're running [08:19] niftylettuce: techwraith: should I do var url = require('url') ? [08:19] techwraith: yep [08:19] techwraith: up where you require http [08:19] kjeldahl_ has joined the channel [08:19] skm_ has joined the channel [08:20] JimBastard: cloudhead: The problem I see is that people can do this right now: winston.info('127.0.0.1'.yellow + ' - there's no place like home'); [08:20] niftylettuce: techwraith: I tried npm install url [08:20] techwraith: Then you should just do urlObj = url.parse(req.url, true); [08:20] niftylettuce: techwraith: didn't work [08:20] techwraith: url is part of node [08:20] JimBastard: cloudhead: So the color gets applied before we know what the transport is going to be [08:20] niftylettuce: url is not defined [08:21] littke has joined the channel [08:21] niftylettuce: AAHHH!! [08:21] techwraith: ??? [08:21] niftylettuce: :( [08:21] niftylettuce: npm install url doesnt work [08:21] techwraith: url is part of node's core modules [08:21] niftylettuce: oh [08:21] niftylettuce: uhm [08:21] eirikurn has joined the channel [08:22] ElDios has joined the channel [08:22] techwraith: no need to npm install it [08:22] ElDios: yo [08:22] ElDios: morning everyone [08:23] cloudhead_: JimBastard: well, one thing you could do is not directly apply the escape codes [08:23] cloudhead_: JimBastard: instead you convert the string into an object [08:23] niftylettuce: Failed to load resource: the server responded with a status of 500 (Internal Server Error) [08:23] niftylettuce: XHR finished loading: "http://127.0.0.1:8000/api/getFiles?user_id=42". [08:23] cloudhead_: which has the info as properties [08:23] cloudhead_: then you can write it however you want to either a file or stdout [08:23] niftylettuce: http://pastie.org/private/z50i2bxherwjee176uya [08:23] niftylettuce: and for my config in server.js [08:24] FireFly|n900 has joined the channel [08:24] niftylettuce: http://pastie.org/private/ctz92xcs4tonogodc2rg9a [08:24] SamuraiJack has joined the channel [08:24] cloudhead_: JimBastard: so 'foo'.yellow returns { string: 'foo', styling: ['yellow'] } [08:24] techwraith: niftylettuce: try console.log(urlObj) [08:24] techwraith: see what's in there [08:25] JimBastard: cloudhead_: but then that breaks: console.log('foo'.yellow) right? [08:25] JimBastard: so it would be a new api [08:25] cloudhead_: yea [08:25] cloudhead_: yea, if you need it for both, maybe have a diff api [08:25] Stan____ has joined the channel [08:25] JimBastard: i think im starting to get the idea [08:25] JimBastard: styles and shit [08:25] cloudhead_: or you're just gonna have to do regexps on the strings [08:25] cloudhead_: which is kind of ugly [08:25] niftylettuce: ReferenceError: url is not defined [08:25] JimBastard: naah, im gonna make colors.js have multiple modes [08:26] JimBastard: i.e. [08:26] cloudhead_: cool [08:26] niftylettuce: techwraith: its the url.parse, whereas url is undefined, even though I defined in server.js [08:26] JimBastard: directly apply or return meta-data [08:26] JimBastard: that sounds good, right? [08:26] cloudhead_: yea exactly [08:26] JimBastard: aight, im gonna get on that now. anything else i should now? [08:26] techwraith: yeah, you have to require it in the file you're working with [08:26] techwraith: require != php include [08:26] jesusabdullah: I'm trying to remember what winston does [08:26] cloudhead_: well, as I said, watch out for stderr ;p [08:27] JimBastard: jesusabdullah: multitransport logger [08:27] JimBastard: jesusabdullah: its really nice actually [08:27] JimBastard: you can just do winston.info('foo'), winston.warn('foo'), winston.error('foo'), winston.data('foo'), etc [08:27] JimBastard: and its multi-tranport [08:27] jesusabdullah: Ah, that's what I was thinking but I wasn't sure. [08:27] JimBastard: so you point winston to the terminal or redis, or loggly, or whatever [08:27] JimBastard: or all of them [08:28] techwraith: JimBastard: link? I would love to use that [08:28] jesusabdullah: I'd been kinda meaning to give it a shot but I never needed anything that needed fancy logging in node.js yet [08:28] JimBastard: techwraith: https://github.com/indexzero/winston [08:28] jesusabdullah: That multi-transport action sounds sweet though [08:28] micheil: techwraith: you could also use node-logger by votizen [08:28] niftylettuce: techwraith: huh? [08:29] techwraith: niftylettuce: you have to require it in the same file that you're using the variable in [08:29] techwraith: micheil: I'm currently using tj's log.js [08:29] jdalton has joined the channel [08:30] jdalton has left the channel [08:30] cellvia: anyone know any notable caveats to coding in coffeescript? [08:30] niftylettuce: techwraith: :) :) :) <3 <3 <3 <3 [08:30] techwraith: :) [08:30] ckknight: cellvia: makes debugging harder [08:30] micheil: cellvia: debugging is slightly impaired [08:30] techwraith: Victory! [08:30] micheil: you get reference line numbers of javascript, not coffeescript [08:30] techwraith: And with that, I'm going to bed, goodnight all :) [08:30] cellvia: gotcha, any ways around it? [08:31] cloudhead_: cellvia: it's harder to make it not return a value [08:31] cellvia: for functions? [08:31] cloudhead_: yeh [08:31] cellvia: gotcha [08:31] jesusabdullah: cellvia: As a corollary to what cloudhead said, some javascript libraries may get confused if you try to use them from coffeescript due to behavior like, "always returns last line" and such [08:32] cloudhead_: yea that ^ [08:32] cellvia: doesnt coffeescript leave normally coded JS alone though? [08:33] jesusabdullah: Yeah, but if your library expects to not have something return, for example, or has special behavior for returns or whatever the case [08:33] jesusabdullah: then things can get confusing [08:33] jesusabdullah: Sometimes you will see patches to javascript projects so that using them from within coffee works better [08:34] jesusabdullah: for example, for a while node-seq was tough to use with cofee-script, either because of returns or treatment of "this" or something. I don't really remember much about the issue OR coffeescript's SNAFUs, truth be told. [08:34] tanepiper: ryah: +1 for code coverage tools :D [08:34] jesusabdullah: But the point is, some of the more clever js libraries can get tripped up [08:35] jesusabdullah: Actually, tanepiper would be the one to talk to about that [08:35] jesusabdullah: He knows CS well, AND has worked with node-seq [08:35] cellvia: thanks tho, that sounds like potentially big/annoying issue [08:36] cellvia: considering how many libraries im using [08:36] jesusabdullah: All that said, coffeescript is a very nice project. If you think it looks compelling I'd say to give it a shot and see what happens! [08:36] jesusabdullah: Well, most libraries don't end up being problematic [08:36] cellvia: yeah, its hard to resist some of their examples [08:36] JimBastard: which logger micheil ? [08:36] jesusabdullah: It's maybe 5% [08:36] V1: cloudhead_ / cloudhead / cloudhead Did you manage to solve your socket.io client.request issues? [08:36] jesusabdullah: if that [08:36] micheil: the one on the votizen github [08:36] JimBastard: which one? [08:36] micheil: may be called votizen-logger [08:36] cellvia: i will give it a shot :) [08:36] jesusabdullah: Seriously: If you think it looks compelling, try it and see what you think [08:36] JimBastard: https://github.com/votizen/logger ? [08:36] cloudhead_: V1: no I haven't really tried anything [08:36] micheil: think so. [08:36] niftylettuce: okay so I have
and some
, how do I target only the divs with class="row" versus both row and first [08:36] JimBastard: Dude, come on... [08:36] niftylettuce: o wrong chan i guess..? [08:36] cloudhead_: V1: I don't want to go too deep in non-api land [08:37] JimBastard: It has no docs and no features :-( [08:37] V1: cloudhead_: oki [08:37] JimBastard: At least write docs! [08:37] jesusabdullah: What has no docs? [08:37] JimBastard: https://github.com/votizen/logger [08:37] micheil: JimBastard: it was one of the last things I wrote before leaving the company. [08:37] V1: who needs docs when you can read the code ;D [08:37] micheil: also, there's jsdoc in the code. [08:37] techwraith: niftylettuce: $(".row").not(".first") [08:38] cellvia: niftylettuce: jQuery('.row:not("first")') something like that [08:38] jesusabdullah: ooh, no readme :( [08:38] cellvia: niftylettuce: jQuery('.row:not(".first")') something like that [08:38] jesusabdullah: BAD SIGN ;_; [08:38] V1: just run dox over it, as it has JSDoc comments ._." [08:38] cellvia: or what techwraith said :) [08:38] sholmes has joined the channel [08:39] jesusabdullah: Sometimes I wonder with the node.js community, when I see parallel efforts [08:39] niftylettuce: :) <3 [08:39] niftylettuce: im def chillin here more [08:39] niftylettuce: and will help u homies [08:39] cloudhead_: micheil: what are your plans with websocket-server? [08:39] jesusabdullah: Like, 3 libraries that do very similar things [08:39] sholmes: was 0.4.6 just released today? [08:40] V1: sholmes: yesterday i think [08:40] sholmes: the 14th, which was, technically, and two hours ago for me. [08:40] sholmes: But that's rad. [08:41] V1: yay for timezones :) [08:42] sholmes: Woot! [08:42] sholmes: Anyway. How can I be apart of the Node community more? [08:42] micheil: cloudhead_: version 2.0.0 will be coming out in the next few months. [08:43] micheil: cloudhead_: see: https://github.com/miksago/node-websocket-server/issues/milestones [08:43] cloudhead_: micheil: cool, so you intend to make it the standard for ws on node, right? [08:44] cloudhead_: micheil: I take it node-websocket-protocol isn't released yet? [08:45] micheil: cloudhead_: bbl, really busy with some other stuff right now [08:45] cloudhead_: ok [08:46] A_Nub: I want to purchase a ipod nano and hack it to run node. [08:46] A_Nub: and then continue to hack its tiny touch screen [08:46] beawesomeinstead has joined the channel [08:46] sholmes: My Node app works on and off, but when it doesn't work, I get this error:... [08:46] Ori_P has joined the channel [08:46] sholmes: node.js:116 [08:46] sholmes: throw e; // process.nextTick error, or 'error' event on first tick [08:46] kuebk: you guys know anything faster than jsdom? [08:47] indutny: kuebk: regexp [08:48] sholmes: Wait nevermind, it's because I need to have my localhost running because I need to use the mysql server. [08:48] indutny: kuebk: depends on what are you going to do [08:48] A_Nub: sholmes: give us the backtrace. [08:48] A_Nub: its more usable. [08:49] sholmes: A_Nub: Well, I figured out that it only happens when I don't run Wamp. I'm assuming this is because my Node app needs to access the data from the Wamp's MySQL database. [08:49] A_Nub: ok [08:50] sholmes: A_Nub: however, if I wanted a stack such as Linux/Node/Mysql only (no apache) then how would I get mysql to run on it's own? [08:50] sh1mmer has joined the channel [08:50] A_Nub: mySql can run alone [08:51] sholmes: You see. I'm not even aware of how Wamp does it's thing. I think it just runs apache, and apache has a way of allowing modules on top of it. [08:51] sholmes: Mysql and PHP are both apache modules that run when apache runs. [08:52] sholmes: But with Node, I wouldn't know how to get MySQL to run either alone, or start up when I run my Node app. [08:52] A_Nub: i have mySQL that runs alone [08:52] micheil: cloudhead_: no, it's not released yet, but there have been early gists of it. [08:52] A_Nub: node doesnt start the mySQL server [08:52] A_Nub: you would do that in a shell [08:52] deebo: mysql is not a apache module [08:52] pdelgallego_ has joined the channel [08:52] pdelgallego has joined the channel [08:52] A_Nub: what deebo said. [08:52] sholmes: How do you have it run alone? [08:52] A_Nub: mySQL is a server. [08:53] deebo: its a database server, standalone [08:53] sholmes: I see. [08:53] micheil: cloudhead_: as for node-websocket-protocol, it'll be a generic encoder/decoder for the protocol, as well as implementing the relevant handshaking algorithms. [08:53] sholmes: However, how does Wamp start up MySQL it seems at the same time as it starts Apache? [08:53] kuebk: indutny want to have full DOM server side [08:53] stephank has joined the channel [08:53] micheil: sholmes: for running mysql, you should look for the relevant information in the mysql documentation [08:53] A_Nub: usually something like [08:53] sholmes: Is there some kind of middleman program that starts them up and handles their processes? [08:53] A_Nub: [08:53] A_Nub: /etc/init.d/mysqld start [08:54] deebo: sholmes: some trickery via a middleware [08:54] micheil: a WAMP stack simply runs the scripts that start up the various parts of a WAMP stack. [08:54] A_Nub: indeed [08:54] stephank has joined the channel [08:54] Noviets: Whats the best way to get my own js> bot for a different server? [08:54] A_Nub: sholmes: what system are you on? [08:54] micheil: A_Nub: probably windows, considering they are refering to a WAMP stack [08:54] sholmes: Makes sense. Theoretically, could I have my app check if the mysql server is running, and if not, start it up? [08:55] micheil: sholmes: it's not a wise idea to do that. [08:55] A_Nub: micheil: oh yeah forgot that the OS X version is called MAMP [08:55] deebo: sholmes: you should assume it is running [08:55] A_Nub: yea [08:55] A_Nub: assume [08:55] sholmes: A_Nub: I'm on a Windows system, however, I'd like to build my application for debian/ubuntu (hopefully keeping this sort of dev workflow working) [08:55] A_Nub: also [08:56] micheil: sholmes: if you're having troubles with databases, there are a number of hosted database solutions, such as AWS RDS, Redistogo, MongoHQ and others [08:56] A_Nub: well on ubuntu add it to your startup scripts [08:56] sholmes: micheil: my next question was whether it was a good idea. Thanks for being on the forefront on that. ;) [08:56] A_Nub: and add a maitain to it [08:56] A_Nub: so it makes sure its running. [08:56] micheil: if you want to build your application on debian/ubuntu, then you should be able to use an ubuntu server image in a virtual machine [08:56] deebo: on ubuntu/debian if you just `apt-get install mysql-server` by default it will always be on [08:56] d0k has joined the channel [08:57] micheil: as you go through the install process, it'll actually ask you if you want to configure the system with mysql. [08:57] A_Nub: ya [08:57] sholmes: I suppose the database will eventually make it's way onto it's own box, seperate from the server. [08:58] micheil: sholmes: perhaps, if you need to do that. [08:58] liquidproof has joined the channel [08:58] micheil: very small applications may not require this, but as any application grows, it's resource usage increases, so it may be the right thing to do. [08:58] sholmes: deebo, micheil: good to know. I think on my VPS, that is what it does; I did apt-get it and it's running independently from apache2. [08:59] deebo: as it should [08:59] deebo: theres absolutely no relation between the two [08:59] micheil: yes, databases always run independent of apache2 [08:59] sholmes: I understand now. :) [08:59] A_Nub: its almost like it was designed that way, huh [08:59] A_Nub: :P [08:59] micheil: minds you, if you front node.js with apache2, you loose some of the benefits of node.js [09:00] deebo: how so? if you just load balance? [09:00] A_Nub: why run apache and node? [09:00] A_Nub: thats silly. [09:00] micheil: because, apache is a thread based server, node is a event loop based. [09:00] micheil: apache = 1 thread per connection [09:00] sholmes: I should start to think of mysql as it's own thing, rather than a stacked solution like WAMP or LAMP; I should just think that my stack is LNM, but each part is independent. I should get to know mysql's as it's own program, etc. [09:01] micheil: node = 1 process / 1 thread [09:01] deebo: micheil: yeah yeah, but how do you "correctly" load balance then [09:01] A_Nub: micheil: you could write a node server to duplicate itself and handle the new connection on an new port :) [09:01] sholmes: I plan on a complete Node stack; no apache. [09:01] A_Nub: viola [09:01] micheil: deebo: well, a) your node.js application can handle quite a lot of direct traffic [09:02] micheil: and b) you can load balance with things like AWS's ELB or front it with a NGINX or HAProxy configuration [09:02] A_Nub: I think and event based loop is better [09:02] A_Nub: first come first server [09:02] micheil: or, any other industry standard load balancer [09:02] A_Nub: also [09:02] micheil: apache is not a load balancer [09:02] A_Nub: it avoids a possible problem [09:02] deebo: micheil: true, but on a 4 core system itll employ one core barring some modules that use the threadpool [09:02] A_Nub: of two threads editing data [09:02] A_Nub: while ones reading [09:02] A_Nub: or what not [09:02] micheil: deebo: there are solutions like Cluster from Learnboost that will let you use all 4 cores. [09:03] micheil: but you'll essentially only listen on one port. [09:03] ebaxt has joined the channel [09:03] A_Nub: I think node is better than apache in many ways [09:03] path[l] has joined the channel [09:03] A_Nub: mostly in the way that its programmable ;) [09:03] sholmes: How should errors be handled in Node? When my application has an error, is it default that the entire application process falls, and my site goes down? [09:04] sholmes: by falls, I mean that the process dies. [09:04] A_Nub: Best error handling = don't make errors ;) [09:04] micheil: sholmes: you should be building your application in a way such that your watching for applicable error codes [09:04] teemow has joined the channel [09:04] micheil: as for other random errors, on an ubuntu system you can use Upstart to manage the process and ensure that it is always running. [09:05] A_Nub: Sholmes also you should try to test rigirously before public deployment. [09:05] sholmes: micheil: how so, wrap everything in try catch statement? [09:05] micheil: sholmes: try catch doesn't work in node. [09:05] A_Nub: install an exception handler? [09:05] micheil: or doesn't work as effectively. [09:05] sholmes: A_Nub: true too, but things aren't always that smooth. [09:05] Shinuza has left the channel [09:05] micheil: sholmes: for instance, a http request has an "error" event, you should be listening for this. [09:06] A_Nub: exactly. [09:06] Noviets has joined the channel [09:06] A_Nub: its similar to an exception handler. [09:07] micheil: sholmes: you can also use products like getexceptional to be able to have emails sent to you when your node.js application throws an uncaught error [09:07] sholmes: Hmm, so if I listen to this event, this will allow me to catch HTTP errors. But, HTTP errors from the HTTP module are handled for me. What am I to do about errors that kill the process? [09:08] A_Nub: fatal errors? [09:08] A_Nub: those would be your fault [09:08] A_Nub: just fix the code [09:08] sholmes: A_Nub: I suppose that's the correct term. [09:08] A_Nub: you should be value and data checking. [09:08] A_Nub: to avoid such problems. [09:08] sholmes: I see. So as long as I'm coding correctly, then I shouldn't worry about something like that unexpectedly occuring. [09:09] A_Nub: thats the idea [09:09] sholmes: A_Nub: so then, what are some common slip ups that I could trip over? :P [09:09] A_Nub: its part of the development cycle. [09:09] A_Nub: finding where potential errors may occur [09:09] A_Nub: and making safgaurds. [09:09] A_Nub: safe* [09:10] micheil: sholmes: you should consider it that your application will always be error prone, and in the case of that eventuality you should be prepared to handle that. [09:10] A_Nub: most common = null or out of scope or expired data. [09:10] micheil: this is the same with any programming language or server environment [09:10] A_Nub: yes [09:10] A_Nub: Simple programming theory right there. [09:11] sholmes: What are considered fatel errors; how can I make the distiction within my code. In other words, just by looking at the code, how can I be able to see where a potential fatel error may occur? [09:11] A_Nub: var bob = lol; [09:11] micheil: fatal errors will happen any where that an error may occur. [09:11] A_Nub: bob.hehe = function(){} [09:11] A_Nub: delete bob [09:11] micheil: any uncaught errors will be fatal errors. [09:11] A_Nub: bob.hehe(); [09:11] micheil: node.js follows a bit of a fail fast mentality. [09:12] A_Nub: yea [09:12] sholmes: Ah, so JavaScript errors, such as foo.length where foo is null. [09:12] A_Nub: yes [09:12] A_Nub: those are the most common [09:12] A_Nub: other errors are most likely logic errors [09:12] A_Nub: where you dont get the expected result [09:12] A_Nub: which is nonfatal. [09:12] micheil: other errors are things like trying to read a file that does not exist, process being out of memory, etc. [09:12] micheil: too many file descriptors open [09:13] A_Nub: exactly. [09:13] micheil: ECONNRESET [09:13] micheil: etc. [09:13] sholmes: These errors can occur quite often in client-side code. However, the consiquences of this kind of error in client-side code, is not as radical as a server shut down. [09:13] A_Nub: it is in some browsers. [09:13] micheil: actually, they are pretty much the same. [09:13] A_Nub: Safari follows a fail fast. [09:13] A_Nub: IE tries to push past errors [09:13] A_Nub: not sure about FF and CHROME [09:14] A_Nub: Either way you should never get errors. [09:14] A_Nub: Errors means you coded poorly [09:14] A_Nub: Bugs are ok [09:14] sholmes: True, if my client-side script does have an error like this, the rest of the script doesn't execute. However, other pages that work fine, will continue to do so. [09:14] A_Nub: but errors are unacceptable. [09:14] A_Nub: Because each page is a new instance. [09:15] sholmes: A_Nub: duly noted [09:15] bzinger has joined the channel [09:15] A_Nub: Its like coding a c function that takes a pointer [09:15] A_Nub: but never checking if that pointer is valid. [09:15] micheil: man. fco.gov.uk is one slow site. [09:16] sholmes: So a, what sort of JavaScript errors will not kill the process, but will echo out in the console? [09:16] micheil: all errors that are uncaught will kill the process. [09:16] A_Nub: yes. [09:16] A_Nub: Errors = fatal [09:16] A_Nub: Bugs = Non fatal. [09:17] A_Nub: Bugs are usually flawed logic [09:17] micheil: Bugs tend to be errors in most cases though [09:17] micheil: or can lead to errors. [09:17] A_Nub: yes. [09:17] A_Nub: I classify those as errors. [09:17] A_Nub: When I say bug [09:17] A_Nub: I usually mean something non fatal [09:17] sholmes: Hard distiction for me to make. [09:18] A_Nub: well imagine you try to replace characters in a string [09:18] A_Nub: but you replace on of them wrong [09:18] A_Nub: and it doesn't work right [09:18] micheil: sholmes: as you begin to program with node.js, you will soon begin to realise what a fatal error is and what a non-fatal problem is. [09:18] A_Nub: so instead of changing mom to bob it does mom to dod [09:18] A_Nub: and makes no sense. [09:19] sholmes: I see, it's where I made an error in the logic, not the syntax. [09:19] A_Nub: Syntax = instant fatal. [09:19] sholmes: In other words, the program is functioning correctly as it's told, but I didn't tell it to do it as I intended. [09:19] A_Nub: fatal usually means you are trying to access something that is invalid. [09:19] A_Nub: yes [09:20] A_Nub: that would be a non fatal [09:20] micheil: for instance, if you try to connect to a database, but that database is down, and you don't watch for a net.Socket error event, then you'll crash your application. [09:20] Shrink has joined the channel [09:20] Shrink has joined the channel [09:20] A_Nub: undesirable output = nonfatal [09:20] micheil: that is expected. [09:20] xla has joined the channel [09:20] A_Nub: but if you do check for the error [09:20] A_Nub: and the db is down [09:20] sholmes: A_Nub: from your example, there wouldn't be any log on this kind of error, rather, it would just be an obvious problem. [09:20] A_Nub: its a bug, mainly being missing content. [09:20] chyoku has joined the channel [09:20] A_Nub: sholmes: some times its obvious [09:21] A_Nub: other times its not [09:21] A_Nub: imagine coding functions where one output is anothers input [09:21] sholmes: A_Nub: true too. [09:21] A_Nub: it could be hard to trace where the fault is [09:21] chyoku has left the channel [09:21] garrensmith has joined the channel [09:21] A_Nub: (fault as in bug, not a segfault ) [09:21] A_Nub: anyways [09:21] A_Nub: 2:21am [09:21] A_Nub: bedtime [09:21] sholmes: A_Nub: but a fault would be noticed sooner or later, the bug will be brought to the surface. [09:22] sholmes: A_Nub: same time here. [09:22] A_Nub: But finding its origin can be tough. [09:22] sholmes: That's why I am in bed. lol [09:22] A_Nub: I need a new laptop [09:22] sholmes: A_Nub: understandably. [09:22] A_Nub: mine is dead [09:22] sholmes: A_Nub: are you on it right now? [09:22] A_Nub: Donate to the buy a nub a laptop foundation? [09:22] A_Nub: no [09:23] A_Nub: im on my iMac [09:23] A_Nub: my powerbook is old [09:23] A_Nub: has eaten 3 batteries [09:23] A_Nub: it has some motherboard problem [09:23] A_Nub: only one memory slot works [09:23] sholmes: Mac's are a beautiful thing. I have a savings and am so tempted to blow it on a macbook. Ugh, but I should be smart with my money. >.< [09:23] A_Nub: and it wont charge a battery [09:23] coreb has joined the channel [09:23] sholmes: A_Nub: Sounds like a piece of shit. [09:23] A_Nub: I find them to be worth it. [09:24] A_Nub: its from 2005 ;) [09:24] sholmes: Mac or PC? [09:24] A_Nub: Powerbook, mac. [09:24] cloudhead_: micheil: well I'm glad someone is taking care of this, it's really needed : ) [09:24] A_Nub: the batteries were free [09:24] A_Nub: and I got the recall for it [09:24] sholmes: Wow, didn't know it was only 6 yrs ago that they were called that. [09:24] jacter has joined the channel [09:24] A_Nub: but only last year. [09:24] A_Nub: so I said screw it. [09:25] A_Nub: Yeah I have the last powerbook model [09:25] A_Nub: I have it setup as a server [09:25] A_Nub: :P [09:25] sholmes: The only downside to buying a mac, is that it get's outdated fast. [09:25] micheil: cloudhead_: the aim of node-websocket-protocol is to provide generic encoding/decoding of drafts 75, 76, and 06. This library will easily be able to be used by both websocket servers, (including socket.io), and websocket clients. [09:25] A_Nub: sholmes: what? [09:25] A_Nub: my iMac is 2008 and only the gfx card is outdated [09:26] sholmes: well, I suppose that's inevitable with ever computer. [09:26] A_Nub: and maybe since its ddr2. [09:26] sholmes: what I mean, is there's always something better. [09:26] A_Nub: other than that its CPU is still considered quite good. [09:26] A_Nub: and its screen is above exceptional [09:26] A_Nub: sholmes: same with pc's [09:26] sholmes: yeah [09:26] A_Nub: its the tech world [09:26] A_Nub: There is always something new. [09:26] sholmes: Your right. [09:27] cloudhead_: micheil: the decoupling is a great idea [09:27] A_Nub: I just prefer products that are designed from the ground up. [09:27] sholmes: However, I wish that we only had to buy a terminal sort of system, and paid a subscription fee for a cloud based hardware. Then just have that update as time goes. [09:28] A_Nub: thats only logical for files and databases I think. [09:28] A_Nub: cloud gaming [09:28] A_Nub: seems like a bad idea [09:28] A_Nub: then again [09:28] A_Nub: it could fix the lag factor. [09:28] secoif: i'd love to have a cloud gfx card [09:28] A_Nub: iits been done [09:28] A_Nub: there is a cloud gaming service [09:28] A_Nub: No to mention [09:28] A_Nub: CGI [09:29] A_Nub: for movies [09:29] A_Nub: is cloud rendered [09:29] A_Nub: secoif: http://www.onlive.com/#1 [09:29] sholmes: A_Nub: onlive looked promising. [09:30] A_Nub: they have demos [09:30] realz has joined the channel [09:30] A_Nub: I havent tried them yet [09:30] A_Nub: I only have heard [09:30] A_Nub: that the gfx quality [09:30] A_Nub: is terrible [09:31] robhawkes has joined the channel [09:31] sholmes: I should try them out. Didn't know that they went public. [09:32] A_Nub: says sign up for free [09:32] A_Nub: right there. [09:32] A_Nub: ok [09:32] A_Nub: stop keeping me up [09:32] philhawksworth has left the channel [09:32] secoif: ha, should we try multiplayer right now [09:32] A_Nub: GOOD NIGHT [09:32] secoif: bah [09:32] A_Nub: I would [09:32] A_Nub: but im on OS X 10.7 [09:33] secoif: 10.7? [09:33] A_Nub: and its unstable atm [09:33] A_Nub: Lion Developer Preview [09:33] secoif: ohh [09:33] sholmes: night man [09:33] secoif: seeya later [09:33] A_Nub: bye [09:33] sholmes: btw, I should get a mac when lion comes out [09:36] unomi has joined the channel [09:36] dcelix has joined the channel [09:40] sholmes: Onlive is actually pretty sick [09:40] tbassetto has joined the channel [09:42] TomsB has joined the channel [09:42] thall has joined the channel [09:45] ralphholzmann has joined the channel [09:45] fermion has joined the channel [09:45] Shrink has joined the channel [09:45] Shrink has joined the channel [09:46] TomsB: I have latest Node and I'm getting this error: [09:46] TomsB: v [09:46] TomsB: Error: Socket.end() called already; cannot write. [09:46] TomsB: Yes, I am checking if stream is writable! [09:46] ph^ has joined the channel [09:46] TomsB: Any ideas what to do, workarounds or anything? [09:47] TomY_ has joined the channel [09:53] aho has joined the channel [09:54] [AD]Turbo has joined the channel [09:55] TomsB: I can see that I have stream.destroyed = true [09:55] TomsB: bunch of these [09:55] TomsB: why? [09:56] TomsB: why they are not removed? [09:57] ph^ has joined the channel [09:58] _derferman has joined the channel [09:58] sendark: in node.js, is there a way to access a particular object in an array based on the value of one of the objects property without doing a for loop? [09:58] ph^ has joined the channel [09:59] mike5w3c_ has joined the channel [10:00] secoif: sendark: use underscore [10:00] secoif: http://stackoverflow.com/questions/237104/javascript-array-containsobj [10:00] sendark: cheers secoif ! [10:01] secoif: sendark: you can do it in straight js, but underscore is great for a whole range of other stuff as well [10:01] ph^ has joined the channel [10:01] sendark: it's a module for node right? [10:01] sendark: npm install underscore [10:01] secoif: npm install underscore [10:01] secoif: yes [10:01] secoif: then: var _ = require() [10:01] secoif: require('underscore') [10:02] ph^ has joined the channel [10:03] sendark: alright so what i want is detect right? [10:03] clockwize has joined the channel [10:03] secoif: detect? [10:04] clockwize: hi, i'm trying to use formidable. I've installed with sudo npm install formidable and it says ok but when I run node it says can't find module? what could I have done wrong? [10:04] secoif: contains/include [10:04] secoif: detect good if you want to use a custom truth test [10:04] secoif: eg [10:05] sendark: _.detect(array, function(object) { return object.property == thevaluei'mlookingfor; } ); [10:05] jacter has joined the channel [10:05] secoif: sendark: sure [10:05] sendark: wouldn't that do ze trick? [10:05] sendark: :) [10:05] secoif: oh [10:05] secoif: actually [10:05] secoif: yes [10:05] secoif: you are right [10:06] sendark: var _ = require('underscore'); <- is that the way? [10:07] path[l]: I have a question. If I issue 5 write commands on a writestream in succession. Is 'drain' only emitted when ALL of them have been written? Can I depend on that behaviour? [10:07] dubbe has joined the channel [10:07] path[l]: sendark: that's correct [10:08] ebaxt has joined the channel [10:08] ph^ has joined the channel [10:08] sendark: cheers path[l] [10:10] Spion__ has joined the channel [10:10] mtsl: hello, I'm trying to make use of socket.io and the session-web-sockets module at https://github.com/bmeck/session-web-sockets [10:10] mtsl: http://pastebin.com/chLCUhhq [10:10] mtsl: http://pastebin.com/eN5MCmKX [10:11] mtsl: my problem is that the 'Oh noes!' message seems to be 'insecure', so I wonder how I may use sessions [10:12] mtsl: I want to use the sessions from the static HTML/JavaScript part of my application with sockets, too. [10:13] Swizec has joined the channel [10:14] suckerpunch has joined the channel [10:15] Gruni has joined the channel [10:15] __tosh has joined the channel [10:16] sholmes: be back later maybe. Going to play around with onlive. :P [10:16] TomsB: Anyone smart enought to get me in the right direction with this error? [10:16] TomsB: Error: Socket.end() called already; cannot write. [10:20] TomsB: maybe there's a way to catch this error? So it does not kill my server? [10:20] TomsB: Yes, I'm catching like this: process.addListener('uncaughtException', function(err){ ...} [10:20] TomsB: But this error is not cathed in there. [10:20] TomsB: *catched [10:20] TomsB: Ideas? [10:22] pashky` has left the channel [10:24] bengl has joined the channel [10:24] whoops has joined the channel [10:24] matthijs has joined the channel [10:25] gf3 has joined the channel [10:26] Remoun has joined the channel [10:28] stonebranch has joined the channel [10:28] johnnywengluu has joined the channel [10:29] highermath_away has joined the channel [10:29] pdrummond has joined the channel [10:32] SamuraiJack has joined the channel [10:32] Rodtusker has joined the channel [10:32] broofa has joined the channel [10:34] Swizec has joined the channel [10:34] TomsB: Error: Socket.end() called already; cannot write. [10:34] TomsB: at Socket.write (net.js:334:13) [10:35] Shrink has joined the channel [10:36] V1: check if the socket is writable before you write against it [10:37] zendfan has joined the channel [10:38] RushPL has joined the channel [10:38] TomsB: VI: I am checking! [10:39] TomsB: if (stream.writable === true) [10:39] TomsB: { [10:39] TomsB: stream.write(data); [10:39] TomsB: errro happening on line where stream.write(data); [10:40] M3l7D0wN has joined the channel [10:43] realz has joined the channel [10:43] skohorn has joined the channel [10:44] Emmanuel__ has joined the channel [10:44] Rodtusker has joined the channel [10:46] realazthat_ has joined the channel [10:46] FireFly has joined the channel [10:46] ziro` has joined the channel [10:47] shoebat_ has joined the channel [10:47] clockwize has joined the channel [10:48] Neil_ has joined the channel [10:48] FireFly|n900 has joined the channel [10:55] hassox has joined the channel [10:55] jdalton has joined the channel [10:56] V1: TomsB: are you also checking the readyState? [10:56] TomsB: No, waht;s that? [10:57] TomsB: Will look into docs, sec [10:57] V1: https://github.com/joyent/node/blob/master/lib/net.js#L271-289 [11:01] TomsB: I have v0.4.6 [11:01] TomsB: Can't find readyState there... [11:02] TomsB: In docs, I mean [11:03] TomsB: I'll update code and wait for this error to happen again. [11:03] Tsesame has joined the channel [11:03] V1: Undocumented features ftw :p [11:04] realazthat__ has joined the channel [11:04] kennon has joined the channel [11:04] kennon: helooo [11:04] TomsB: hehe [11:05] kennon: recommendation for a twitter client for node that i don't have to register an app+oauth for? [11:06] kennon: i want to poll a different API and then occasionally tweet the results [11:09] MuzzleFork has joined the channel [11:10] robhawkes has joined the channel [11:10] bits58 has joined the channel [11:11] jetienne has joined the channel [11:13] clockwize has joined the channel [11:13] jacobolus has joined the channel [11:14] realazthat_ has joined the channel [11:14] ngs has joined the channel [11:15] TomsB: V1: which readyState I need to write safely..? [11:15] TomsB: open and writeOnly..? [11:17] alcuadrado has joined the channel [11:18] Rodtusker has joined the channel [11:19] emattias has joined the channel [11:21] dmojoryder has joined the channel [11:21] neshaug has joined the channel [11:27] kennon_ has joined the channel [11:28] Swizec has joined the channel [11:30] sfoster has joined the channel [11:31] unomi has joined the channel [11:32] Shrink has joined the channel [11:32] Shrink has joined the channel [11:32] V1: TomsB: So, did it fix the issue :) [11:32] TomsB: V1: I can't reproduce the bug. [11:32] TomsB: I have a game ~150 users online [11:33] TomsB: And I'm waiting for this bug to show up [11:33] TomsB: Then I'll inform you. [11:33] V1: TomsB: okidoki [11:33] fairwinds has joined the channel [11:34] realazthat_ has joined the channel [11:35] barodeur has joined the channel [11:36] justinTNT has joined the channel [11:36] realazthat__ has joined the channel [11:37] skm_ has joined the channel [11:38] mc_greeny has joined the channel [11:40] realazthat_ has joined the channel [11:44] fly-away has joined the channel [11:44] realazthat__ has joined the channel [11:46] k0Nn3c739 has joined the channel [11:46] Rob- has joined the channel [11:47] justinTNT: ACTION can't get jsdom / jquery working ... [11:47] jetienne has left the channel [11:48] skm_ has joined the channel [11:50] xandrews has joined the channel [11:51] hackband has joined the channel [11:51] ph^ has joined the channel [11:55] Casperin has joined the channel [11:57] danheberden has joined the channel [11:57] Neil__ has joined the channel [11:58] rchavik has joined the channel [11:58] markc has joined the channel [11:58] justinTNT: *snap* [12:02] kbni: has anyone here experience running something like multi-node and using socket.io? [12:02] V1: ACTION raises his hand [12:03] kbni: what modules did you settle on using, if any? [12:03] V1: can work, but requires a signficant amount of hacks [12:03] V1: as Socket.IO was originally build as a single process instance [12:04] kbni: i'm interested in using nodejs&socket.io for some kind of chat service, but pondering having the chat service operate off a different server (and nodejs process) or having some kind of IPC between multiple nodejs instances [12:04] V1: I'm using cluster + socket.io [12:04] V1: IPC is the a way to go, this is the way I'm using it atm [12:05] Swizec has joined the channel [12:05] V1: But me and rauchg are having ideas of having Socket.IO scaling across multiple processes [12:05] shaunau_ has joined the channel [12:05] V1: But that would be something that will be released in socket.io 0.7 [12:06] pdelgallego has joined the channel [12:06] V1: I know that tmpvar created `cluster-socket.io` which is a plugin for cluster [12:06] V1: https://github.com/tmpvar/cluster-socket.io [12:06] kbni: yeah I am just looking at that now [12:06] V1: So that might help you out [12:09] markc has joined the channel [12:13] skm_ has joined the channel [12:14] eb4890 has joined the channel [12:14] kal-EL_ has joined the channel [12:14] Lef has joined the channel [12:15] jdalton has joined the channel [12:15] Lef: Hi! [12:16] cellvia: hello [12:16] Lef: Has anybody used nginx together with formidable for file upload? [12:16] Lef: I am having problem with nginx holding the whole file until it is fully uploaded before sending it to my node.js (express) server. [12:17] tiemonster has joined the channel [12:17] cellvia: i dunno the answer but... out of curoiusity what kind of app/site are you making? [12:17] k1ttty has joined the channel [12:19] onr has joined the channel [12:20] Sami_ZzZ___ has joined the channel [12:23] vipaca has joined the channel [12:23] vipaca has joined the channel [12:23] pdelgallego_ has joined the channel [12:24] dsirijus has joined the channel [12:25] cellvia: anyone else having problems with npm? [12:26] cellvia: nm [12:26] gmci has joined the channel [12:26] ivanfi has left the channel [12:26] no-gooder has joined the channel [12:27] __tosh has joined the channel [12:28] tiemonster has joined the channel [12:30] jscheel has joined the channel [12:30] jscheel has joined the channel [12:32] sirkitree has joined the channel [12:33] slaskis has joined the channel [12:34] stonebra_ has joined the channel [12:37] hellp has joined the channel [12:38] heavysixer has joined the channel [12:39] tmzt has joined the channel [12:39] dnunes has joined the channel [12:40] dnunes: Hi there. I'm trying to run a script I've coded some time ago and it's giving me a "cannot find module 'socket.io'" error, altough the socket.io is installed. [12:40] roidrage has joined the channel [12:40] V1: than it's not installed correctly :p [12:41] dnunes: Maybe I screwed up in the installation of node or npm? It's a new machine and I just installed everything. Any tips to debug? [12:41] V1: npm install -g socket.io for global installation [12:41] V1: npm install socket.io will install it in your current directory, in a node_modules folder [12:41] V1: that's probably the part that got messed up [12:42] c4milo1 has joined the channel [12:42] dnunes: The "-g" is giving me a "couldn't read package.json in ." [12:43] dnunes: V1: I'll reinstall everything. [12:43] eee_c has joined the channel [12:43] MuzzleFork has joined the channel [12:43] V1: than do a npm install socket.io -g :p [12:43] realazthat__ has joined the channel [12:43] V1: maybe I put the flag at the wrong position :9 [12:44] dnunes: V1: hahhaa. worked, I think. [12:44] dnunes: V1: Still got the "cannot find" error. [12:44] arpegius has joined the channel [12:45] dnunes: V1: Do you know where the "node_modules" folder is, by default? [12:45] V1: hmz odd [12:45] dnunes: V1: I used the one liner install, default options, as root. [12:45] V1: type pwd in your terminal :p [12:45] V1: aka your current working directory [12:45] dnunes: V1: It's not here, for sure. I'll try a "find". [12:47] dnunes: V1: /home/dnunes/.npm/npm/1.0.1rc8/package/node_modules [12:47] dnunes: V1: Make sense? [12:48] dnunes: V1: I tried installing the 1.0RC before, but changed to 0.3. This folder is not being used, actually. [12:48] Lef: cellvia: Video upload service [12:49] Casperin: I installed nodejs by cloning the git repo. That of course left me with the latest development version that constantly takes the server down (1 hit from a browser to be exact). I then tried to reinstall version 0.4 from the tarball, but that didn't help much (though "node -v" returned "0.4"), neither did installing it as sudo (and running the server as sudo) - or reinstalling and pulling the master branch down. What on earth do I do now? I'm so l [12:49] V1: dnunes: thats odd. [12:50] dnunes: V1: I'm reinstalling node and npm to check. [12:50] dyer has joined the channel [12:50] V1: dnunes: probably emptying your caches would help [12:50] dnunes: V1: node.js caches? [12:51] V1: it's somewhere in /usr/local/ bla bla, [12:51] V1: npm cache [12:51] MuzzleFork1 has joined the channel [12:51] dnunes: V1: I'll try that. [12:51] V1: mine is here: /usr/local/lib/node/.npm/ [12:51] pengwynn has joined the channel [12:53] sirkitree has joined the channel [12:54] graysky has left the channel [12:55] fumanchu182 has joined the channel [12:55] Rodtusker has joined the channel [12:56] MuzzleFork has joined the channel [12:56] V1: Casperin: did you add a uncaughtException handler to your app? [12:56] Casperin: no? What's that? my "app" is just your basic Express installation [12:57] Bogh has joined the channel [12:57] Bonuspunkt has joined the channel [12:57] Wizek has joined the channel [12:58] akashiraffee has joined the channel [12:58] hosh_work has joined the channel [12:58] baudehlo has joined the channel [12:59] copongcopong has joined the channel [12:59] V1: Casperin: You can use that to see if you app is throwing errors, [12:59] V1: Casperin: http://nodejs.org/docs/v0.4.6/api/process.html#event_uncaughtException_ [12:59] GriffenJBS has joined the channel [13:00] Casperin: I do get an error… in fact I get 10 in a row or so.. I'll paste them somewhere for you to look at while I figure out how to use that thing [13:01] V1: k [13:01] Casperin: V1: http://pastebin.com/yNvpYk3T [13:02] V1: Casperin: memory leak, probably from a module that you are using? [13:02] dnolen has joined the channel [13:03] Casperin: what I am using? Nodejs (v.0.4), express + sass and jade [13:03] justinTNT: I've got an express question : can I call app.use(express.static) multiple times, to serve static files from more than one subdirectory of my project? [13:03] Casperin: and of course ngm [13:03] no-gooder has joined the channel [13:03] AAA_awright has joined the channel [13:03] piscisaureus has joined the channel [13:04] shaunau_ has joined the channel [13:04] eirikurn has joined the channel [13:04] akashiraffee: justinTNT: have you tried? [13:04] jlecker has joined the channel [13:05] Tsesame has joined the channel [13:06] Casperin: V1: but as I said, I first installed v.0.5-pre from the git repo, and that just seems to stick on the machine HARD. I have *no* problem making nodejs run on my linux box at home (I learned from my mistake and didn't follow the installation guide); so I'm pretty sure it's that installation messing with it [13:06] jonpacker has joined the channel [13:07] xandrews has joined the channel [13:07] ryanfitz has joined the channel [13:07] justinTNT: akashiraffe : not werking for me [13:08] akashiraffee: justinTNT: but it works with a single directory? [13:10] justinTNT: ah, um, no, its not .. [13:10] opaque has joined the channel [13:11] akashiraffee: well, it should -- BUT the docs I have are wrong about how to do this... [13:12] Casperin: V1: I must be too stupid to use that script. Either it's not working for me, or I don't know what to do with it :-/ [13:12] akashiraffee: lemme guess, you are trying app.use(express.static(__dirname+'/static')), which by the documentation is correct... [13:12] akashiraffee: but it does not work. [13:14] arpegius has joined the channel [13:14] zendfan has joined the channel [13:15] kriszyp has joined the channel [13:16] baudehlo has joined the channel [13:16] intel_ix has joined the channel [13:16] intel_ix has left the channel [13:18] ph^ has joined the channel [13:19] baudehlo: anyone here know how you escape regexp chars in a string? The equivalent of doing "\Q" in perl's regexp engine? [13:21] akashiraffee: baudehlo: I think you have to escape them individually, perl it ain't [13:21] baudehlo: yuck [13:22] justinTNT: akash : that's right ... [13:23] baudehlo: so basically string.replace(/[ list_of_re_chars ]/g, '\\$&') [13:24] postwait has joined the channel [13:24] akashiraffee: baudehlo: guess so. Look here: http://www.regular-expressions.info/javascript.html [13:25] unomi has joined the channel [13:25] baudehlo: this is a better reference: http://www.webreference.com/javascript/reference/core_ref/regexp.html fwiw [13:26] tmedema has joined the channel [13:26] tmedema: Is there anyone here who I can ask about audio streaming from node.js? [13:26] baudehlo: I think I should be able to get away with: [\\^$*+?.({\[] [13:27] baudehlo: (may have to escape some of those, but you get the idea) [13:27] baudehlo: oh and pipe [13:27] kriszyp has joined the channel [13:28] akashiraffee: justinTNT: okay, try this: use('/static',express.static(__dirname+'/static') where "static is the name of the directory. Notice it's submitted in a string as the first arg to .use, so mentioned twice in that line. Try that. [13:29] akashiraffee: The docs fail to mention this two arg format, so that people can come to the IRC channel, lol. [13:30] justinTNT: bingo [13:31] hebz0rl has joined the channel [13:32] akashiraffee: cool. that was my first question a few days ago ;) [13:32] dnolen has joined the channel [13:33] timmywil has joined the channel [13:33] ElDios has joined the channel [13:34] jtrudeau has joined the channel [13:35] baudehlo1 has joined the channel [13:35] justinTNT: ok, great: so that's one... lemme try multiples... [13:36] tmedema: Does the example video/audio player at http://mediaelementjs.com/ fail to play for anyone else on Chrome 10.0.6x (Ubuntu/linux preferably) ? [13:37] dmojoryder has joined the channel [13:37] shaunau_ has joined the channel [13:38] drSproinky has joined the channel [13:38] aphelion has joined the channel [13:38] baudehlo has joined the channel [13:38] BillyBreen has joined the channel [13:39] jlecker has joined the channel [13:40] miccolis has joined the channel [13:41] lessthanzero has joined the channel [13:44] galaxywatcher has joined the channel [13:44] arpegius_ has joined the channel [13:44] Poetro has joined the channel [13:45] andi5 has joined the channel [13:45] devdazed has joined the channel [13:48] fermion has joined the channel [13:48] kriszyp has joined the channel [13:49] Casperin has left the channel [13:50] CrisO has joined the channel [13:50] azeroth_ has joined the channel [13:50] Swimming_bird has joined the channel [13:51] no-gooder has joined the channel [13:51] jakehow has joined the channel [13:54] eee_c has joined the channel [13:55] pyrotechnick1 has joined the channel [13:55] groom has left the channel [13:55] groom has joined the channel [13:55] pyrotechnick1: why hello there [13:57] heino__: tmedema, it's not 10.0.6x, but 11.0.696.0 (77272) Built on Ubuntu 9.10, running on Ubuntu 10.10 failed [13:57] jmar777 has joined the channel [13:57] hebz0rl has joined the channel [13:58] timmywil has joined the channel [13:58] arpegius_ has joined the channel [13:58] hij1nx has joined the channel [13:58] justinTNT: I need help with jsdom. It's stripping off my script elements [13:58] timmywil has joined the channel [13:59] pyrotechnick1: im pretty good at stripping justinTNT [13:59] pyrotechnick1: maybe i can help [13:59] justinTNT: *sigh* [13:59] mscdex: good morning noders [13:59] adulteratedjedi: morning mscdex [13:59] pyrotechnick1: morning mscdex [14:00] pyrotechnick1: how are you this fine day? [14:00] adulteratedjedi: well, afternoon here [14:00] justinTNT: let me go over jquery dox. I think I remember something there ... [14:00] mytrile has joined the channel [14:00] pyrotechnick1: justinTNT: there offer's there [14:00] shaunau_: mscdex: mornin [14:00] justinTNT: thanks I'll keep it in mind [14:01] mscdex: i won't know until i've downed this coffee ;-) [14:01] pyrotechnick1: mscdex: let us know okay? [14:01] pyrotechnick1: we're pretty keen [14:01] opaque has joined the channel [14:01] pyrotechnick1: it's important that our fellow noders enjoy their days [14:02] mscdex: fo reals [14:02] pyrotechnick1: anything we can do to facilitate this [14:02] pyrotechnick1: it's all on us [14:02] pyrotechnick1: if you know what i mean [14:02] dekz: OpenSSL SUCKS [14:02] troyan has joined the channel [14:02] mscdex: dekz: why? [14:03] dekz: mscdex: Have you been through the source? [14:03] mscdex: no, no need to [14:03] mscdex: :) [14:03] narf_ has joined the channel [14:03] highermath_away has joined the channel [14:03] jtsnow has joined the channel [14:03] pyrotechnick1: everyone needs to read the OpenSSL source just once [14:03] pyrotechnick1: it's like visiting mecca [14:03] dekz: To learn how to not implement APIs [14:04] rfay has joined the channel [14:04] boaz has joined the channel [14:04] pyrotechnick1: big black cube and shit … you know [14:04] sako has joined the channel [14:04] davidsklar has joined the channel [14:05] davidsklar has joined the channel [14:05] sendark: on socket.io, are clients stored anywhere? i.e. io.getClients() ? [14:06] vipaca has joined the channel [14:06] vipaca has joined the channel [14:06] kioopi has joined the channel [14:07] tedsuo has joined the channel [14:08] amacleod has joined the channel [14:08] NuckingFuts has joined the channel [14:08] Tsesame has joined the channel [14:08] pyrotechnick1: hi dekz [14:08] pyrotechnick1: dekz: hi [14:08] Dese has joined the channel [14:09] davidwalsh has joined the channel [14:09] Dese: Hi guys, i am trying to install expressjs on windows with cygwin, with npm, but the npm-node socket hangs 99% of the time, ideas? [14:09] [AD]Turbo has joined the channel [14:10] mscdex: sendark: they stored internally in a single object iirc [14:10] mscdex: s/they/they are/ [14:10] sendark: yep listener.clients actually [14:10] sendark: :D [14:10] fyskij has joined the channel [14:10] fyskij: hi [14:10] dekz: Dese: http://download.virtualbox.org/virtualbox/4.0.4/VirtualBox-4.0.4-70112-Win.exe [14:10] sendark: cheers mscdex [14:10] pyrotechnick1: Dese: http://www.ubuntu.com/business/get-ubuntu/download [14:11] pyrotechnick1: Dese: save yourself the trouble [14:11] pyrotechnick1: and do as we say [14:11] pyrotechnick1: trust us, we're professional node.js developers [14:11] xastey has joined the channel [14:11] dekz: Dese: You'll learn the love of snapshots [14:11] realazthat_ has joined the channel [14:12] Dese: kk. thanks. [14:12] pyrotechnick1: Dese: you owe us [14:12] jtrudeau has joined the channel [14:13] adulteratedjedi: LOL [14:13] cellvia: theyre right i wasted a lot of tie trying to get node going on windows... running it in virtualbox linux, after initial setting up has been awesome [14:13] dekz: ^ [14:13] pyrotechnick1: ^ [14:13] stepheneb has joined the channel [14:14] dekz: qft [14:14] xastey: anyone using cluster.js [14:14] pyrotechnick1: qft [14:14] adulteratedjedi: I often wonder why people choose windows as a development platform [14:14] pyrotechnick1: xastey: yes [14:14] adulteratedjedi: xastey: yes [14:14] pyrotechnick1: xastey: we are [14:14] shaunau_: adulteratedjedi: same [14:14] dekz: xastey: yes [14:15] xastey: which node version are you using [14:15] shaunau_: makes no sense to me at all. [14:15] xastey: I recently updated to .4.5 and it seems its functioning a bit different [14:15] oskude has joined the channel [14:16] xastey: here is my server.js script http://pastebin.com/agdBFsUg [14:16] Viper-7 has joined the channel [14:16] realazthat__ has joined the channel [14:16] xastey: before it would only spawn 1 worker.. but seems like its spawing 2 from viewing ps aux | grep node [14:16] steph021 has joined the channel [14:16] dylang has joined the channel [14:18] adulteratedjedi: telnet to 8888 (your repl) and see what status() says [14:19] tmzt has joined the channel [14:19] angerman has joined the channel [14:20] Tsesame has joined the channel [14:21] ceej has joined the channel [14:21] stonebranch has joined the channel [14:21] bzinger has joined the channel [14:21] xastey: it says 1 [14:22] pyrotechnick1: oh fuck [14:22] pyrotechnick1: that's not good [14:22] sako has joined the channel [14:22] cellvia: ive hung on to windows this long because in the past i made a lot of music, video, design, and the most/best software i could get easily was for windows. now that im mostly doing programming im wondering why im hanging on [14:23] drudge: xastey: you sure the 2 isn't 1 master + 1 worker? [14:23] pyrotechnick1: cellvia: time to let go mate [14:23] cellvia: :) [14:23] xastey: i think it is [14:23] cellvia: im running debian in a virtualbox and enjoying that, but havent really dived in [14:23] xastey: o well i'll just remove cluster for now.. no time to fix it [14:23] cellvia: what do you all develop on? [14:24] pyrotechnick1: xastey: good idea [14:24] drudge: xastey: what problem are you having? [14:24] pyrotechnick1: cellvia: computers [14:24] xastey: was working fine in a previous node version [14:24] pyrotechnick1: cellvia: mainly computers [14:24] drudge: what isn't working? [14:24] pyrotechnick1: cellvia: ive tried developing not on computers but it's really hard [14:24] cellvia: computers? are you one of those computer nerds? [14:24] pyrotechnick1: cellvia: you could say that [14:24] colinclark has joined the channel [14:24] pyrotechnick1: cellvia: i just find it's easier if you use a computer [14:24] cellvia: computers are passe, time to develop on ipad [14:24] pyrotechnick1: cellvia: node doesn't like compiling on things that aren't computers [14:25] pyrotechnick1: the computer is an ipad [14:25] drudge: xastey: ? [14:25] cellvia: well i'll be [14:25] lessthanzero has joined the channel [14:25] justinTNT: sorted : had to use $[0].innerHTML=data instead of $(data) to avoid stripping script links [14:25] adulteratedjedi: xastey: define whats not "working" [14:25] justinTNT: so pyro you're safe. [14:25] drudge: hey adulteratedjedi [14:25] devdazed: any of the Joyent team in here? [14:26] adulteratedjedi: het drudge, how are you mate? [14:26] Yuffster has joined the channel [14:26] drudge: doing well, yourself? [14:26] adulteratedjedi: devdazed: should be, if not, try the joyent channel [14:26] adulteratedjedi: drudge: aye not too bad :-) [14:27] pyrotechnick1: devdazed: what is joyent? [14:27] pyrotechnick1: devdazed: that like timezone? [14:27] pyrotechnick1: sounds fun! [14:27] xastey: well it may be a simple problem of me not setting up cluster correctly [14:27] pyrotechnick1: xastey: sounds like it [14:27] devdazed: pyrotechnick1: it's no.de [14:27] softdrink has joined the channel [14:27] xastey: http://pastebin.com/agdBFsUg [14:27] devdazed: node.js hosting [14:27] xastey: thats my server.js [14:27] pyrotechnick1: devdazed: what is no.de? [14:27] drudge: xastey: describe your problem :P' [14:27] devdazed: http://no.de [14:27] drudge: what is not working? [14:28] pyrotechnick1: xastey: cool site! [14:28] pyrotechnick1: xastey: i can run node.js software on heres? [14:28] arpegius has joined the channel [14:28] pyrotechnick1: devdazed: link isn't working [14:28] Know1edge has joined the channel [14:28] drudge: xastey: did you forget a .listen btw? [14:28] justinTNT has left the channel [14:28] devdazed: https://no.de [14:28] pyrotechnick1: drudge: no [14:28] pyrotechnick1: devdazed: still not working [14:28] pyrotechnick1: devdazed: might be blocked in australia [14:28] devdazed: works on my machine [14:29] baudehlo: xastey: when you run cluster with 1 worker you get two processes. [14:29] pyrotechnick1: devdazed: do you have ipv6? [14:29] baudehlo: a master and a worker. [14:29] pyrotechnick1: devdazed: maybe you need ipv6 [14:30] devdazed: im in the US, no i dont have ipv6 [14:30] pyrotechnick1: devdazed: hmm [14:30] xastey: whats od baudehlo was that before I didn't have any problems with my code [14:30] pyrotechnick1: devdazed: what is there? [14:30] devdazed: its cloud hosting for node.js [14:30] xastey: its a chat server, and faye doesn't work well with multiple workers ( having had time to figure out why either) [14:30] lessthanzero_ has joined the channel [14:30] baudehlo: but you haven't stated what problem you're having, aside from having two processes. [14:30] brolin has joined the channel [14:31] bojicas has joined the channel [14:31] drudge: xastey: if you don't want multiple processes then why use cluster? [14:31] xastey: it seems my bayeux.attach(app); is getting called once for master and once for worker if I follow what your saying? [14:31] pyrotechnick1: xastey: seems like a silly idea [14:31] xastey: yeah I know [14:32] xastey: was using it mostly for its stats,restart crap [14:32] xastey: but not going to use it anymore for this.. pointless [14:32] drudge: for restarts you can use node-dev, works pretty well [14:32] xastey: just odd that it wasn't function like this before in .4.0 node [14:33] xastey: i just had our hosting just set some services for me [14:33] xastey: so i can restart and start at will [14:34] wilmoore has joined the channel [14:35] Know1edge has joined the channel [14:38] realazthat__ has joined the channel [14:38] pyrotechnick1: dekz: you like stuff? [14:38] Venom_X has joined the channel [14:39] jacobolus has joined the channel [14:40] jdalton has left the channel [14:40] akahn has joined the channel [14:41] akahn has left the channel [14:41] pdelgallego has joined the channel [14:42] Lef1 has joined the channel [14:42] EyePulp has joined the channel [14:42] pdelgallego_ has joined the channel [14:42] EyePulp has left the channel [14:43] FutureHasNoBound has joined the channel [14:43] EyePulp has joined the channel [14:43] jasong_at_apache has joined the channel [14:43] baudehlo: xastey: yeah so basically you need to move your 3 lines at #12 to after starting up cluster, and then wrap them in: if (c.isWorker) { .. } (where c is what's returned from cluster(app) ) [14:43] sledge has joined the channel [14:43] tmzt has joined the channel [14:44] sledge: sup all [14:44] xastey: aww thanks [14:44] xastey: if I ever figure out how to get this faye lib to work with multiple clusters I will remember that [14:45] baudehlo: that might be the key :) [14:45] kmiyashiro has joined the channel [14:45] FutureHasNoBound has left the channel [14:45] baudehlo: although no if it's a chat server it probably stores all state in process, so will never work with multiple workers. [14:45] http402 has joined the channel [14:45] matschaffer has joined the channel [14:45] Viper-7 has joined the channel [14:46] arpegius_ has joined the channel [14:46] EyePulp: are we talking about faye via cluster? [14:46] EyePulp: ACTION is in this boat [14:46] baudehlo: yup [14:47] xastey: ever get it to work EyePulp [14:47] llkazu has joined the channel [14:47] pyrotechnick1: EyePulp: you're on a boat? [14:47] EyePulp: nope - figured I'd focus on the app itself. I'M ON A BOAT! [14:47] pyrotechnick1: EyePulp: are you doing flips and shit? [14:47] EyePulp: I got with a mermaid [14:47] pyrotechnick1: EyePulp: is this shit seaworld? are you getting wet and shit? [14:48] tpain: im on a motherfucking boat [14:48] tpain: it's a big blue watery road [14:48] EyePulp: xastey: did you ever get any response from the faye mailing list as to why it doesn't work? [14:49] EyePulp: or whether it was something they were interested in solving? [14:49] xastey: never asked [14:49] xastey: he says hes doing some custom cluster support [14:49] EyePulp: for those who missed the boat: http://www.youtube.com/watch?v=avaSdC0QOUM [14:50] EyePulp: or need a reminder [14:51] trotter has joined the channel [14:51] herbySk has joined the channel [14:51] jano has joined the channel [14:52] pietern has joined the channel [14:52] matjas has joined the channel [14:52] jjmalina has joined the channel [14:53] dguttman has joined the channel [14:54] [[zz]] has joined the channel [14:54] jacobolus has joined the channel [14:54] arpegius has joined the channel [14:59] jacobolus has joined the channel [15:00] necromancer has joined the channel [15:02] mbrevoort has joined the channel [15:04] kriszyp2 has joined the channel [15:05] realazthat_ has joined the channel [15:06] jacobolus has joined the channel [15:07] binaryjohn has joined the channel [15:08] thall has joined the channel [15:08] stonecobra has joined the channel [15:08] realazthat__ has joined the channel [15:09] davidvanleeuwen has joined the channel [15:09] jacobolus has joined the channel [15:09] Venom_X has joined the channel [15:10] demastrie has joined the channel [15:10] ryanfitz has joined the channel [15:10] flippyhead has joined the channel [15:12] lessthanzero has joined the channel [15:12] jarek has joined the channel [15:13] jarek: Hi [15:13] adulteratedjedi: jarek: hi [15:13] jarek: how can I use Teleport from Connect? [15:13] jarek: Teleport seems to be creating it's own server, at least when following the official tutorial: http://jeditoolkit.com/teleport/#guide [15:13] jarek: s/it's/its [15:15] jakehow has joined the channel [15:16] sub_pop has joined the channel [15:21] jelveh has joined the channel [15:21] zakabird has joined the channel [15:22] jacobolus has joined the channel [15:23] jtsnow has joined the channel [15:23] pyrotechnick1 has joined the channel [15:23] pyrotechnick1 has left the channel [15:24] realazthat__ has joined the channel [15:24] sendark: how can I check if a listener in socket has no clients? [15:25] llkazu: so, anyone know how to persist an object or in a file? even if that object contains javascript functions, etc? [15:25] briznad has joined the channel [15:25] ohtogo has joined the channel [15:26] llkazu: (I'm looking at ways to hack in scalability to socket.io) [15:26] tmzt has joined the channel [15:27] devdazed: llkazu: what do you mean persist an object? [15:27] ElDios: I *must* object that boat is fairly small *and* they made the video too close to the coast [15:27] jtrudeau has joined the channel [15:27] perela has joined the channel [15:27] ElDios: besides this, nice.. =) [15:27] perela: hi, anybody here to answer stupid questions? [15:27] perela: :-) [15:27] llkazu: "save this big-ass object to a file, and when reloading it, have all functions inside the object recompile properly and be executable" [15:27] ElDios: go for it perela [15:28] perela: doing my first steps with node. i'm writing an upload based on felix' formidable [15:28] devdazed: llkazu: you would have to check each item in the object to see if it is a function, then call tostring on it [15:28] ElDios: XtraLOL.. it's on grooveshark too! XD [15:28] ElDios: (speaking of "I'm on a boat") [15:28] llkazu: ugh, fantastic. i was afraid of that. [15:28] devdazed: then when recompiling it, you can do Function(string)() [15:28] perela: i want to implement a progress bar.... i think i know how to make a basic implementation. however i wonder, when polling the upload status from the server, how to identify the client's upload among the possibly many concurrent ones [15:29] jacobolus has joined the channel [15:29] perela: what's the most reliable method i wonder [15:29] ElDios: I pass over this.. since I'm quite interested in hearing the answer :) n00b here [15:30] llkazu: perela, poll for a specific download ID? [15:30] andi5 has joined the channel [15:30] perela: so i submit the id from the client to the server in the beginning and bind the progress to that id [15:31] llkazu: that could work, ya. though personally i'd actually use socket.io to do the progress bar magic. get an upload ID from the server via socket.io (or nowjs or dnode, which are RPC mechanisms built on socket.io) [15:31] llkazu: add that ID to the upload form [15:31] llkazu: then either poll the server for a progress update via socket.io/whatever, OR even better (if you can) have the server PUSH updates to the client via the same mechanism [15:32] perela: i've encountered this suggestion on stackoverflow, however i don't really know what socket.io really is. [15:32] realazthat_ has joined the channel [15:32] perela: can you give me a quick idea what it is? [15:32] jacobolus has joined the channel [15:32] Rodtusker has joined the channel [15:33] llkazu: perela, http://nowjs.com/ check this out [15:33] perela: thx [15:33] llkazu: basically you define functions on the server side, and on the client side. [15:33] devdazed: llkazu: check this out http://stackoverflow.com/questions/3685703/javascript-stringify-object-including-members-of-type-function [15:33] llkazu: the client can then call server-side functions, and vice versa [15:33] llkazu: ACTION looks [15:34] eresair has joined the channel [15:34] arpegius has joined the channel [15:34] llkazu: hmmm overriding the .toString on the object would be pretty intereseting. [15:34] zendfan has joined the channel [15:34] harth has joined the channel [15:35] llkazu: that'd make life a little… cleaner? simpler? interesting? i'll try it out. I'm a little sad that JSON doesn't have an option to simply stringily functions as well [15:35] llkazu: *stringify [15:35] devdazed: llkazu: it wouldnt be able to [15:35] devdazed: llkazu: how could you stringify, say cyclic functions or getters/setters [15:35] jeffmoss has joined the channel [15:35] llkazu: ACTION nods [15:36] devdazed: things that require scope can't be serialized [15:36] llkazu: right [15:36] llkazu: i suppose what makes me the most sad is now socket.io's client sessions are built :-p silting guillermo. [15:37] jacobolus has joined the channel [15:38] danheberden has joined the channel [15:39] Rodtusker has joined the channel [15:41] Bonuspunkt has joined the channel [15:41] devdazed: is anyone here using no.de? [15:41] Rodtusker has joined the channel [15:41] elux has joined the channel [15:44] fayce has joined the channel [15:44] tylerstalder has joined the channel [15:44] jacobolus has joined the channel [15:45] tmzt has joined the channel [15:46] ElDios: pew pew [15:48] necromancer: devdazed: i might soon :) [15:48] necromancer: looks pretty cool [15:49] bingomanatee has joined the channel [15:49] necromancer: devdazed: is it free? [15:49] devdazed: yeah, for now [15:50] dahankzter has joined the channel [15:50] zendfan has joined the channel [15:52] pHcF has joined the channel [15:52] Yuffster_work has joined the channel [15:52] DennisRasmussen has joined the channel [15:53] timcosgrove has joined the channel [15:53] norviller has joined the channel [15:54] piscisaureus has joined the channel [15:54] colinclark has joined the channel [15:55] captain_morgan has joined the channel [15:57] tjholowaychuk has joined the channel [15:58] nebu has joined the channel [15:58] bits58 has joined the channel [15:58] demastrie has left the channel [15:58] nebu: I'm having trouble installing geddy via npm [15:58] ElDios: I'm using dotcloud and nodester [15:58] ElDios: both nice [15:59] mavin|gone has joined the channel [15:59] ElDios: still no heavy usage [15:59] timcosgrove has left the channel [15:59] ElDios: so don't count on me for *real* examples .) [15:59] reid has joined the channel [15:59] ckknight|2 has joined the channel [15:59] ckknight_ has joined the channel [15:59] nebu: When I run "npm install geddy", I get an error "{"stack":"Error: Command failed: chown: invalid user: `undefined:undefined'" [15:59] jacobolus has joined the channel [15:59] ckknight_: hey beautiful people [16:00] nebu: I've posted the full error message at https://github.com/mde/geddy/issues/46 [16:01] jaekwon: guys, what would be typical contract job hourly rates for a node.js job? [16:01] jaekwon: just spit something [16:01] blueadept has joined the channel [16:02] softdrink: $75/hr [16:02] mattmcmanus has joined the channel [16:03] eee_c has joined the channel [16:03] devdazed: i charge $100 per hour, but i have 12 years development experience behind me [16:03] ckknight_: jaekwon: a million [16:03] softdrink: eleventy beelion dollahs [16:03] ckknight_: I'm gonna leave off the units, though [16:03] jaekwon: :) [16:04] jaekwon: then i shall charge $82 [16:04] DennisRasmussen: ckknight, ckknight_ wowui developer? [16:04] ckknight_: among other things, DennisRasmussen [16:04] DennisRasmussen: Cool to see you here :) [16:04] ckknight_: *thumbs up* [16:04] arpegius_ has joined the channel [16:05] DennisRasmussen: You prolly don't remember me but my wow nick is Liquidor even though I quit lua development years ago [16:05] ckknight_: oh yeah, I remember [16:05] DennisRasmussen: You still playing? [16:05] ckknight_: I kinda stopped a few weeks ago [16:05] pietern has joined the channel [16:05] DennisRasmussen: Good for you :) [16:05] ckknight_: coincidentally, also when I got into node.js [16:06] ckknight_: DennisRasmussen: make anything cool yet with node.js? [16:06] DennisRasmussen: I'm now studying and hopefully getting a teaching job when done [16:06] shiawuen has joined the channel [16:07] shiawuen_ has joined the channel [16:07] DennisRasmussen: Uhm no I just installed it, but it's just JS. You know.. piece of cake :) (much love to nodejs team) [16:07] cwang has joined the channel [16:07] ckknight_: DennisRasmussen: make something cool. :P [16:07] broofa has joined the channel [16:07] DennisRasmussen: Although I've been working on the client part which is a game engine [16:07] wilmoore has joined the channel [16:08] DennisRasmussen: I will :) Beginning tonight and 10 days onward (holiday starting today) [16:08] DennisRasmussen: Gonna start off with a game server [16:08] boaz has joined the channel [16:09] creationix has joined the channel [16:09] DennisRasmussen: When done I DO have a WoW related project as well :) but that's a shush as I don't want the idea stolen ;) [16:09] box2: ACTION stole the idea already [16:09] box2: ACTION sells it on ebay [16:09] doubletap has left the channel [16:10] heavysixer has joined the channel [16:10] DennisRasmussen: I fear that Hubert will take the idea and make it his own haha [16:10] losing has joined the channel [16:11] broofa has joined the channel [16:11] chrislorenz has joined the channel [16:12] puffpio has joined the channel [16:12] ckknight_: DennisRasmussen: nah, he'd just buy you out [16:12] DennisRasmussen: ckknight, have you created anything cool yet? [16:13] DennisRasmussen: (with nodejs) [16:13] ckknight_: DennisRasmussen: thus far, a half-done blog and a url routing library. [16:13] tmedema has joined the channel [16:14] DennisRasmussen: So far I've only meet people who builds http projects. Kinda weird [16:14] jjmalina has joined the channel [16:15] ckknight_: DennisRasmussen: well, it's easy :P I don't have any non-HTTP stuff to do, also. [16:15] DennisRasmussen: :) [16:15] springmeyer has joined the channel [16:15] hlindset has joined the channel [16:15] boaz has joined the channel [16:15] ckknight_: DennisRasmussen: part of me wants to recreate the minecraft server using node.js [16:16] ckknight_: since the current servercode is ... lacking [16:16] tmedema: Hi folks. I'm trying to stream audio from browser A to browser B, by proxying the stream through a node.js server. Flash audio players can only stream an audio file by streaming a given URL.Thus, I first need to establish such stream connection from browser B to the server. Then, client A has to stream to server. Then, the server has to use the already opened stream to browser B to pipe client A's data to it. [16:16] tmedema: Did that message get cut off by a char limit? [16:16] DennisRasmussen: ckknight, awesome. I've already built a canvas engine for 2D :) [16:16] ckknight_: tmedema: didn't appear to be [16:16] ckknight_: DennisRasmussen: I probably won't do it, tbh. [16:16] DennisRasmussen: 3D in 2D actually (2.5D) [16:16] ajpiaNOU has joined the channel [16:17] tmedema: Alright, well anyway, my question is, how do I respond to a Flash player's audio stream request with node.js ? [16:17] prettyrobots has joined the channel [16:18] DennisRasmussen: ckknight_, you around in this channel much or? I'll poke you once in a while. Good to see someone you know with the same interest :) [16:18] ckknight_: tmedema: well, client A makes a request on a particular URL, then you should be able to just read the input stream in. Buffer that stream and when client B connects, send out the bits. [16:18] ckknight_: DennisRasmussen: I am [16:19] tmedema: ckknight_: I know. The question is what kind of data does flash expect, should it be binary stuff as a string or something? [16:19] ckknight_: that I don't know, but I both hope and assume it's binary. [16:19] tmedema: ckknight_: well javascript cannot contain binary within variables right? [16:19] voodootikigod has joined the channel [16:20] voodootikigod has left the channel [16:20] ckknight_: tmedema: sure it can, with node.js' Buffer [16:20] liquidproof: tmedema: Buffer [16:20] voodootikigod has joined the channel [16:20] tmedema: ckknight_: I can send a Buffer to a flash client and it will understand it as a binary stream? [16:21] joshthecoder has joined the channel [16:21] ckknight_: yeah, you'd basically just start doing a bunch of response.write's [16:21] tmedema: ckknight_: you make it sound like it's an easy task [16:21] ckknight_: ...yes? [16:21] tmedema: what about the content type etc that the flash app is expecting? [16:21] ckknight_: I don't know that, look at flash's docs [16:22] marcosvm has joined the channel [16:23] tmedema: ckknight_: so how does such streaming player request a pause etc.? [16:24] jacobolus has joined the channel [16:24] ckknight_: I have never done such a thing, you'll have to look at flash's docs [16:24] ckknight_: I don't even know whether it assumes half or full duplex. [16:25] tmedema: I figured there have to be standards because I also have to support html5 players etc. [16:25] ckknight_: html5