[00:01] Sembiance has joined the channel [00:02] [[zz]] has joined the channel [00:05] context-: anyone get an error with mongoose not finding 'hooks' module [00:05] context-: nm [00:06] context-: its this craptastic package [00:06] skript_ has joined the channel [00:06] Dreamer3 has joined the channel [00:08] tuhoojabotti: Gist<3 [00:09] tuhoojabotti: Helped me find a bug I missed. :P [00:09] Aria has joined the channel [00:09] tuhoojabotti: Gotta love revisions [00:12] Aria has joined the channel [00:14] piscisaureu_ has joined the channel [00:17] Spion has joined the channel [00:19] Twelve-60 has joined the channel [00:20] Aria has joined the channel [00:21] jacobolus has joined the channel [00:21] timhudson has joined the channel [00:22] Aria has joined the channel [00:23] brownies has joined the channel [00:23] jtsnow has joined the channel [00:24] industrial has left the channel [00:24] willwhite has joined the channel [00:24] tsutton has joined the channel [00:26] Aria has joined the channel [00:27] samBiotic has joined the channel [00:29] rauchg has joined the channel [00:30] timhudson has left the channel [00:31] tracker1 has joined the channel [00:32] mikeal has joined the channel [00:32] tayy has joined the channel [00:34] pen has joined the channel [00:35] Chani: darnit. [00:36] Chani: can someone tell me how to make http://paste.kde.org/90523/ work? [00:36] Chani: I'm gettting [00:36] Chani: I'm gettting ReferenceError: fd is not defined at postWrite (/home/chani/Documents/SFU/cmpt431/a2/test2.js:22:5) [00:37] Chani: what's the least ugly way of getting the fd passed along to all the other callbacks? [00:39] Chani: oh! it was simple - but pastebin broke so I can't show you :P [00:40] azend has joined the channel [00:40] Chani: also... why does that code not work if I use var foo = function(... instead of function foo(... [00:41] tuhoojabotti: Chani: I made my mum a Minecraft account yesterday, and taught her how to play, now THAT was tricky. [00:41] tuhoojabotti: Also bunch of pastebins out there. [00:41] tuhoojabotti: I use new one every time I paste ":D" [00:41] Chani: yeah, but I'm lazy :) [00:44] brownies has joined the channel [00:45] chapel: Chani: it's because you aren't passing F=fd [00:45] chapel: fd [00:45] chapel: function postWrite(e) { [00:45] chapel: you just pass e [00:46] _jgr has joined the channel [00:49] k1ttty has joined the channel [00:53] Chani: hmm. do write streams have async methods, or is it all synchronous? [00:55] context-: anyone noticed how mongoose's docs suck [00:56] CIA-110: node: 03Henry Rawas 07master * r56ec4e4 10/ (lib/net_uv.js lib/timers_uv.js): net_uv: fix test-net-connect-timeout.js test - http://bit.ly/lwKB8N [00:56] TooTallNate: context-: how so? [00:56] jmoyers: Chani def not synch [00:56] jmoyers: its a queue, as far as i know [00:56] jmoyers: it emits events telling you whether the queue is full, etc [00:56] context-: TooTallNate: they dont tell you how any of the methods actually work [00:56] jmoyers: look at `drain` and co [00:57] context-: count.. takes a query (which is?) and a callback... and the callback takes? its in the context of? [00:58] context-: there is no actual 'reference' ,... i have to use the browsers search function to find count 8 times on the page. the fifth one is what im looking for. the first words you see are 'counts documents' with the actual code for the function to the left... [00:59] context-: if i wanted to see the code for count id just open the code up [00:59] TooTallNate: well callbacks generally have a (err, returnedValue) payload [00:59] context-: i go to the api reference as a reference of how to actually use said library [00:59] context-: TooTallNate: it still fails to tell you what you give the function. [01:00] jmoyers: patches welcome ;-)? [01:00] jmoyers: though i generally agree [01:00] TooTallNate: context-: indeed, patches are welcome. and that API page is indeed crap... [01:00] context-: TooTallNate: http://screencast.com/t/6o8wSgFl0RO ... from that, how exactly do you call count() and what should i expect in said payload. [01:01] context-: heh [01:01] TooTallNate: but thats because it's auto-generated from the inline comments [01:01] TooTallNate: the guides are a lot more helpful [01:01] context-: yeah [01:01] jmoyers: though, didn't you hear the latest gobbledy gook on twitter!? [01:01] jmoyers: ORM is an antipattern [01:01] brownies has left the channel [01:02] TooTallNate: jmoyers: with mongoose I generally disagree [01:02] Prometheus: out of curiosity, does node.js happen to have any freelancer/gig sites dedicated to it? [01:02] TooTallNate: jmoyers: you can write helper functions with mongoose that void most of the arguments against ORM [01:02] TooTallNate: imo at least [01:07] context-: jmoyers: when it comes to nosql id prolly agree. but this library uses it so im forced to use it [01:07] mwilliams_ has joined the channel [01:08] avalanche123 has joined the channel [01:09] jakehow has joined the channel [01:09] bnoordhuis has joined the channel [01:10] cognominal has joined the channel [01:11] mundanity has joined the channel [01:15] Swimming_bird has joined the channel [01:18] ryan0x2 has joined the channel [01:19] catshirt has joined the channel [01:20] csanz has joined the channel [01:20] csanz: i installed ngist using the latest version of npm, but it doesn't create the command link [01:20] csanz: do i need to pass in a special switch [01:24] chapel: csanz: let me look at it [01:24] csanz: chapel: thanks man [01:24] wookiehangover has joined the channel [01:25] chapel: need to install it with -g flag [01:25] chapel: npm install ngist -g [01:27] philtor has joined the channel [01:32] edude03 has joined the channel [01:35] csanz: chapel: thanks! [01:42] okuryu has joined the channel [01:43] context-: well. if only i knew how this crap was working now [01:43] tmzt: anybody know a process manager like cluster that supports websockets? i"m using nginx proxy_tcp so I don't need it serving from the same port and it doesn't have to be written in node [01:44] MarcinM: what does -g do, anyway [01:45] MarcinM: ah, global mode [01:45] MarcinM: nm [01:45] MarcinM: npm has a man entry. who knew :P [01:45] MarcinM: (other than everyone here, cough) [01:45] tmzt: TooTallNate: are you the mongoose dev? [01:46] TooTallNate: tmzt: no but I work for LearnBoost [01:47] tmzt: hmm, is there a clean way to update an existing record without falling down to mongo-native? [01:47] tmzt: oh, without retieveing it and save() ing [01:48] t|f: Evening all. Anyone have anything to say about nodester, good or bad? Looking for a very cheap hosting for initial deployment of an app and doesn't come cheaper than free. I know you get what you pay for but I have near zip budget. I also know no db, have to use RiakAsYouGo, S3, CouchCloud, or MongoDB cloud (names may off, from memory). [01:48] TooTallNate: tmzt: good question. I'm not entirely sure [01:48] TooTallNate: why wouldn't you be retrieving an instance of it? [01:49] carmony has joined the channel [01:49] tmzt: mostly I use mongoose because I like the User.find* syntax over the db.open() callbacks [01:49] tmzt: for PUT, there's no reason to [01:50] TooTallNate: tmzt: well internally mongoose knows to only send the minimal command needed for the changes [01:50] tmzt: it would still have to cast it to a document though, but I'm mostly taking the PUT data and casting that [01:50] TooTallNate: sorry, what do you mean PUT? [01:50] tmzt: HTTP PUT like a REST pattern [01:51] TooTallNate: so you mean creating a new instance of a document? [01:51] TooTallNate: that's not already in the db? [01:51] tmzt: no, I mean updating an existing document using and identifier or query or _id [01:51] tmzt: like PUT /users/1 would update the user with idx:1 [01:51] TooTallNate: ya i get ya [01:52] tmzt: so it would look more like User.update({idx:1},data) [01:52] TooTallNate: still, I'm not entirely positive on that one [01:52] tmzt: with a callback [01:52] tmzt: okay [01:52] TooTallNate: try opening a github issue and one of the other guys will know [01:52] tmzt: I don't need it for this project, if I ever do my REST to ORM layer for mongoose it will be useful [01:53] tmzt: I just use User.collection.update() but I lose the casting and validation [01:53] Chani: ACTION grumbles about fs not having cp [01:54] mike5w3c has joined the channel [01:54] mikeal has joined the channel [01:56] tmzt: back to my original question, anybody know a unix process manager that works for node processes and websockets? [01:56] TooTallNate: Chani: fs.createReadStream("origFile").pipe(fs.createWriteStream('copiedFile')) [01:57] sub_pop has joined the channel [01:57] skm has joined the channel [02:01] Chani: oh ya, I forgot abut pipe :) thanks [02:02] Chani: and then... um... I get a "drain" event when it's done copying? [02:08] sechrist has joined the channel [02:10] neoesque has joined the channel [02:14] sub_pop has joined the channel [02:15] tayy has joined the channel [02:23] tim_smart has joined the channel [02:23] towski has joined the channel [02:23] Marak has joined the channel [02:24] Marak: To mad science! [02:25] t|f: Anyone have anything to say about nodester, good or bad? Looking for a very cheap hosting for initial deployment of an app and doesn't come cheaper than free. I know you get what you pay for but I have near zip budget. I also know no db, have to use RiakAsYouGo, S3, CouchCloud, or MongoDB cloud (names may off, from memory). [02:31] Chani: anyone know how to fsync a writestream? [02:32] Chani: I might be able to snag the fd and call fsync on that, but, if there was an undocumented method on writestream itself that'd be nicer... [02:32] Chani: but the only method in stream.js is pipe [02:33] AvianFlu: Chani: I hear there's an undocumented fs.fsync [02:34] AvianFlu: try it, I might be confused [02:34] Chani: AvianFlu: yes, there is [02:34] jtsnow has joined the channel [02:34] Chani: AvianFlu: but only for an fd, as far as I've seen... [02:35] Chani: aha, writestream code is in fs.js... [02:35] niftylettuce has joined the channel [02:36] Chani: oh geez, WriteStream.write secretly takes a callback [02:37] vid_ has joined the channel [02:38] edude03 has joined the channel [02:38] Chani: hmm. I wonder if I have access to this.fd [02:38] JasonSmith has joined the channel [02:38] xDROPx has joined the channel [02:38] Chani: looks like I should be able to.. :) [02:40] unvamp has joined the channel [02:42] niftylettuce has joined the channel [02:42] Chani: hmm, I can't remember and can't find anyhting in the docs, but... I have this vague feeling that it is not safe to repeatedly call write() on a WriteStream without checking for something-or-other [02:42] skm has joined the channel [02:42] Chani: oh, n/m [02:42] Chani: "Note that it is unsafe to use fs.write multiple times on the same file without waiting for the callback. For this scenario, fs.createWriteStream is strongly recommende" [02:43] Chani: so it's the opposite :) [02:43] sourcode has joined the channel [02:44] jakehow has joined the channel [02:44] seawise has joined the channel [02:45] AvianFlu: yeah streams ftw [02:47] Chani: crap! I can't get the fd that way [02:47] Chani: and writestream has no fsync method of its own [02:48] Chani: anyone know how to extract a fd from a stream? [02:51] k1ttty has joined the channel [02:52] unlink has joined the channel [02:52] unlink has joined the channel [02:53] chjj: chani: stream.fd [02:53] chjj: you can also set the fd of a write/read stream when creating it [02:54] chjj: e.g. fs.createWriteStream(null, { fd: 1 }) [02:55] Chani: oh bloody fucking hell. it's not the fd that's the problem; fs.fsync was never working for me at all. I forgot to check for errors. [02:55] Chani: this is, um, bad. [02:56] Chani: Error: EBADF, Bad file descriptor [02:56] Chani: why would it think that? [02:57] Chani: ohhhh. [02:57] Chani: once it's closed it stops being valid :P [02:57] Chani: um... hrm. [02:57] Chani: crud. [02:58] Chani: how do I make sure a file is really-really written to disk, *after* it's closed? [02:58] chjj: so dont close it [02:58] chjj: ? [02:58] Chani: hmm. for some of my writes that wuold work [02:58] chjj: if it doesnt throw, im guessing its written to disk [02:58] Chani: but for the pipe, the only way I know it's *finished* is the close... hmm..or... [02:58] tayy has joined the channel [02:59] raynos1 has joined the channel [02:59] raynos1: Does anyone have a stable large scale web application (browser) to use for advertising javascript as a solid development eco system [03:00] raynos1: The google applications don't count (due to infinite resources) and cloud9IDE is too stable [03:01] chjj: what do you mean (browser)? are you trying to sell the clientside to someone? if so, why do googles apps not count? [03:01] gavin_huang has joined the channel [03:01] chjj: im confused as well, js is really the only option there [03:02] Chani: damnit all to hell. why am I never getting "end"? the pipe example uses it... [03:03] raynos1: I would like to convince a C# programmer that there is currently enough potential in js for the small developer to produce applications of a similar size and quality, particularly in terms of robustness [03:04] baoist has joined the channel [03:04] raynos1: Basically can you deploy web applications with similar levels of robustness and speed/ease of development in javascript. [03:04] SubStack: I don't know any small developers [03:05] chjj: well its kind of hard, as soon as someone creates a successful, robust web app, it will get sold to the suits and no longer be the little guy [03:05] chjj: youre asking for a successful web app that is unsuccessful [03:05] raynos1: Well small developer / little guy is the wrong term. [03:06] SubStack: raynos1: http://browserling.com has a solid node backend [03:06] raynos1: SubStack: self promotion \o/ [03:06] Prometheus: they have pretty solid looking UI too =) [03:06] Prometheus: really digging that [03:06] SubStack: yep [03:06] Prometheus: ha [03:06] Chani: ahh, the docs are wrong, pipe just calls close, not end... [03:07] Chani: *but*, the input stream still emits end, and that should be close-enough for flush. [03:07] Chani: I hope. [03:07] hassox has joined the channel [03:08] Chani: hmm. [03:08] raynos1: SubStack: Why does it not match my UK keyboard layout :( [03:08] CIA-110: node: 03Ryan Dahl 07master * r5a2155d 10/ src/node.js : Set process.useUV also on env NODE_USE_UV=1 - http://bit.ly/iFXzo3 [03:09] raynos1: SubStack: I cant type '@' in IE6 :( [03:10] Chani: so.. .I'm doing all this PITA obsessive fsync stuff for my assignment, because the server has to really know for sure that things have been written, so that it can recover properly from failures. but... what about real-world node projects? does anyone out there care? [03:11] nornagon has joined the channel [03:11] Chani: nornagon: hey, ltns :) [03:11] raynos1: But yes, I was looking for a solid non-buggy web application that was done by a small / medium team. [03:11] crmt has joined the channel [03:11] nornagon: Chani: oh hi! [03:12] nornagon: Chani: how go your nodejs adventures? [03:14] Chani: nornagon: fairly well [03:14] sechrist has joined the channel [03:14] Chani: thanks to the TA being really annoying and answering questions in ways that make me have to redo parts of the assignment, I'm getting lots of experience :P [03:14] Chani: see this is why you should never start assignments early... [03:15] SubStack: raynos1: oh the shift thing is messed up [03:15] SubStack: anyhow browserling is just myself and my cofounder [03:15] Emmanuel_ has joined the channel [03:16] Melkor_ has joined the channel [03:17] Prometheus: Chani: what kind of a class lets you use nodejs? [03:17] Prometheus: I'm really in the wrong uni [03:17] Prometheus: or school [03:17] Prometheus: =) [03:17] ceej has joined the channel [03:19] caiges has joined the channel [03:19] gkatsev: SubStack: nice job on nodeup [03:20] SubStack: gkatsev: I didn't have much to say about the core parts though [03:20] SubStack: ACTION keeps to userland for the most part [03:20] gkatsev: it's ok [03:20] mapleman has joined the channel [03:20] gkatsev: it was interesting [03:21] necrodearia has joined the channel [03:21] gkatsev: especially since I've not really been keeping up or using node much lately [03:21] Chani: Prometheus: well actually the teacher changed her mind this year and I wasn't supposed to be using it, but since I was more than halfway through by the time we found out, I got an exception :) [03:21] Prometheus: Chani: very nice [03:21] Prometheus: lucky you =) [03:21] Prometheus: I've been force fed Java :/ [03:21] Chani: yeah. [03:21] Chani: oyy. most people are using that [03:22] Chani: we got confined to "what's on school computers", which is kinda mean, since java's the only language that comes with decent libraries [03:23] Prometheus: Chani: unless you install your own.. =P [03:23] SubStack: java teaches bad habits, like using classes for everything [03:23] Chani: but yeah, I managed to make the course double as a way to learn js :) yay [03:23] SubStack: Chani: I did that in university too except with haskell [03:23] Chani: hehe [03:24] Chani: I wrote a compiler in haskell last year [03:24] SubStack: all my computer graphics and algorithms homework was in haskell [03:24] SubStack: much nicer than using c++ [03:24] Chani: huh, I never thought of using it for that [03:24] Chani: actually, I haven't though of much to use it for besides compilers :) [03:25] Chani: darnit, I'm falling sleep and it's not even 9. I guess I do have to eat dinner after all... [03:25] mapleman has joined the channel [03:28] chjj: sometimes i wish js had goto statements [03:28] horofox has joined the channel [03:28] adrianmg has joined the channel [03:28] xerox: why? [03:28] SubStack: Chani: you can hack those in with stackedy [03:28] SubStack: and burrito [03:28] chjj: nice for writing parsers sometimes [03:29] horofox: I'm using express and I want to store my schemas from mongoose in a different file, I've tried using exports but it didn't work... [03:31] Xano has joined the channel [03:32] pen has joined the channel [03:32] sorensen: im doing that now [03:33] hij1nx has joined the channel [03:33] sorensen: https://github.com/sorensen/aebleskiver/blob/master/lib/schemas.js [03:35] Chani: SubStack: hack what in? [03:36] zeade has joined the channel [03:36] horofox: sorensen: so you are not using exports? how does node get "access" to the schemas? [03:36] sorensen: err sorry got distracted [03:36] Chani: ah crud. I hope there's still somewhere selling food at this hour. [03:36] sorensen: Schemas = require('./schemas') [03:36] sorensen: just require that [03:37] sorensen: im using it in https://github.com/sorensen/aebleskiver/blob/master/lib/backbone-crud.js [03:37] horofox: sorensen: did you write that code? [03:37] Chani: ACTION hasn't had time to stock the apartment with emergency hacked-all-day-forgot-to-eat supplies ;) [03:37] sorensen: i think alot of it came from nodepad [03:37] SubStack: Chani: gotos [03:37] sorensen: er u mean the careless copy pasta i did on top [03:38] sorensen: the schemas anyway [03:38] Chani: SubStack: that was chjj :) [03:38] sorensen: y u ask [03:38] horofox: sorensen: what does module.exports do? [03:38] horofox: lol [03:39] horofox: ACTION is trying to figure out how to do it from scratch [03:39] sorensen: lets you require it for commonJS [03:39] sonnym has joined the channel [03:39] horofox: hm [03:39] sorensen: im sure there are better examples [03:40] sorensen: but as for mongoose schemas [03:40] CStumph has joined the channel [03:40] sorensen: also: https://github.com/alexyoung/nodepad/blob/master/models.js [03:40] horofox: sorensen: ok, i think its alright [03:41] stepheneb has joined the channel [03:42] Emmanuel_ has joined the channel [03:43] Prometheus: sorensen: that nodepad thing is cool [03:43] Prometheus: found http://dailyjs.com/2010/11/01/node-tutorial/ =) [03:43] sorensen: ah nic [03:43] tracker1 has joined the channel [03:44] SubStack: v8: 'doom'.bold() [03:44] v8bot: SubStack: "doom" [03:44] infynyxx has joined the channel [03:46] felipellrocha has joined the channel [03:47] felipellrocha: hey. im new to node.js and i was looking at some templating engines available for node... and i was just wondering if anyone has any good recommendations to get me started... [03:47] temp01 has joined the channel [03:48] devaholic: jade or ejs [03:49] hookio has joined the channel [03:49] Prometheus: whoa, why haven't I subscribed to dailyjs before [03:49] felipellrocha: devaholic: thz. whats the diff between the two? [03:50] devaholic: with ejs you still write html [03:51] devaholic: jade is a bit more minimal [03:52] devaholic: but it comes with a small learning curve [03:52] Aria has joined the channel [03:52] felipellrocha: devaholic: cool. i like that... thz! do you know of any performance benchmark around? [03:54] devaholic: uhh [03:54] devaholic: not really, sorry [03:55] devaholic: if youre new to node.js, this might blow your mind though [03:55] devaholic: https://github.com/dannycoates/node-inspector [03:55] devaholic: (might be what youre looking for) [03:56] felipellrocha: devaholic: thz! :D [03:57] devaholic: Melkor_ is from omaha? the hell [03:58] boehm has joined the channel [03:59] balaa has joined the channel [04:00] brownies has joined the channel [04:02] ngs has joined the channel [04:04] jerrysv has joined the channel [04:09] stepheneb has joined the channel [04:10] kbni has joined the channel [04:12] jerrysv_ has joined the channel [04:12] hookio has joined the channel [04:16] ldopa has joined the channel [04:16] Swizec has joined the channel [04:17] Swizec has joined the channel [04:18] pHcF has joined the channel [04:19] amerine has joined the channel [04:22] necrodearia has joined the channel [04:23] perezd has joined the channel [04:24] Nuck: I'm listening to NodeUp [04:24] Nuck: SubStack: You really are the _why of node. [04:25] Nuck: FUCKING YES BLOODY CHAINSAWS [04:26] Nuck: IT NEEDS TO BE DONE. [04:26] Nuck: isaacs is a fucking genius. [04:26] Nuck: A mad genius. [04:26] Prometheus: NodeUp? [04:27] MikeMakesIt has joined the channel [04:27] Prometheus: yet another thing I'm missing out on? [04:27] Nuck: Prometheus: isaacs, SubStack, and a few others did a podcast. [04:27] Prometheus: ooh [04:27] Prometheus: url? [04:27] MikeMakesIt has left the channel [04:27] Nuck: Prometheus: Check iTunes [04:27] Prometheus: Nuck: alright, thanks [04:27] Nuck: It's called NodeUP and it has a sexy logo [04:28] ryan0x2_ has joined the channel [04:30] MikeMakesIt has joined the channel [04:31] MikeMakesIt has left the channel [04:33] hassox has joined the channel [04:36] ekryski has joined the channel [04:39] fson_ has joined the channel [04:39] kmiyashiro has joined the channel [04:39] electronplusplus has joined the channel [04:39] electronplusplus: hi [04:40] Prometheus: Nuck: found it, thanks for that =) [04:40] electronplusplus: There's a project that allows to create a "TCP" socket in javascript, what's the name? [04:43] tim_smart: electronplusplus: node.js? [04:43] electronplusplus: at client side tim_smart [04:43] tim_smart: electronplusplus: socket.io [04:43] infynyxx has joined the channel [04:43] tim_smart: Or Websockets's [04:44] ceej has joined the channel [04:44] electronplusplus: not websockets [04:44] electronplusplus: a TCP socket [04:44] MikeMakesIt has joined the channel [04:44] electronplusplus: tim_smart: client side and I could use an IP and the remote port [04:45] tim_smart: websockets are the closest you can get [04:45] electronplusplus: and it's not socket.io [04:45] electronplusplus: websockets have a fucking header [04:45] felipellrocha: anyone worked with server side dom for templating? its looking so interesting :) [04:45] electronplusplus: I don't get why they have a header [04:47] seivan has joined the channel [04:47] caiges has joined the channel [04:48] darshanshankar has joined the channel [04:48] sounko has joined the channel [04:53] balaa has joined the channel [05:01] knuthy has joined the channel [05:07] matwill has joined the channel [05:08] kennymeyers has joined the channel [05:09] kennymeyers has left the channel [05:09] kennymeyers has joined the channel [05:09] darshanshankar has joined the channel [05:11] pifantastic has joined the channel [05:13] sreeix has joined the channel [05:19] saikat has joined the channel [05:21] namelessnotion__ has joined the channel [05:21] Swizec has joined the channel [05:24] jakehow has joined the channel [05:30] ezmobius has joined the channel [05:36] Badababuba has joined the channel [05:36] siculars has joined the channel [05:38] CodyGray has joined the channel [05:38] CodyGray has left the channel [05:38] jslatts has joined the channel [05:39] febits has joined the channel [05:42] dexter_e has joined the channel [05:43] dgathright has joined the channel [05:47] brianseeders has joined the channel [05:48] brianseeders has joined the channel [05:52] stagas_ has joined the channel [05:52] nornagon has joined the channel [05:54] bartt has joined the channel [05:59] Skola has joined the channel [06:00] jtsnow has joined the channel [06:01] mikeal has joined the channel [06:05] smtlaissezfaire has joined the channel [06:06] fangel has joined the channel [06:08] sourcode has joined the channel [06:13] jonmaim has joined the channel [06:14] zwittar has joined the channel [06:14] jonmaim: Hello, does anyone know what's the best way to pass data between middleware in express? [06:18] kmiyashiro: ? [06:19] tim_smart: jonmaim: Seems the generally accepted way is to attach is to the response object [06:19] tim_smart: I'm not a fan of that though... [06:19] SubStack: jonmaim: what manner of data? [06:19] tim_smart: attach it* [06:19] SubStack: it's all just javascript [06:19] SubStack: this isn't rails, you can pass around data in the usual ways [06:19] kmiyashiro: attach it to the request [06:19] caiges has joined the channel [06:20] tim_smart: SubStack: With browsify, can I tell it to not inject the path, process etc logic? [06:20] tim_smart: *browserify [06:20] SubStack: path is used internally [06:20] seivan has joined the channel [06:20] thermal has joined the channel [06:20] hassox has joined the channel [06:20] SubStack: tim_smart: you can just minify it :p [06:21] SubStack: > require('browserify')({ filter : require('uglify-js') }).bundle().length [06:21] SubStack: 3638 [06:21] SubStack: ^ tiny [06:21] SubStack: or 8934 bytes uncompressed [06:22] tim_smart: Still a bit much when you just want a simple registry [06:22] jonmaim: SubStack: simple data from database [06:23] tim_smart: jonmaim: Got a code example, we can be more specific then [06:23] SubStack: tim_smart: luckily most connections can tolerate 3k nowadays :p [06:24] tim_smart: SubStack: I might just make a simple packager with the basics [06:24] SubStack: tim_smart: lots of people have done that [06:24] tim_smart: Just to cure the itch [06:24] SubStack: there's brequire [06:24] tim_smart: Ah cool [06:25] _1marc has joined the channel [06:25] nornagon has joined the channel [06:25] _1marc has left the channel [06:25] SubStack: browserify aims at node compliance where possible [06:25] SubStack: and developer convenience [06:28] jonmaim: tim_smart: I will attach the data that need to be passed between middleware to the request object. That's the hint I needed thx :-) [06:29] sub_pop has joined the channel [06:29] namelessnotion has joined the channel [06:31] tayy has joined the channel [06:33] amerine has joined the channel [06:34] steffkes has joined the channel [06:35] Wa has joined the channel [06:37] FireFly|n900 has joined the channel [06:41] gozala has joined the channel [06:44] mediahack has joined the channel [06:51] dexter_e has joined the channel [06:51] temp01 has joined the channel [06:53] charleyd has joined the channel [06:56] Wa has joined the channel [06:57] __doc__ has joined the channel [06:58] zomgbie has joined the channel [07:00] materialdesigner has joined the channel [07:03] sreeix has joined the channel [07:03] ditesh|cassini has joined the channel [07:11] gkmngrgn has joined the channel [07:12] patrikkarlin has joined the channel [07:12] shapeshed has joined the channel [07:13] jameson has joined the channel [07:14] AAA_awright has joined the channel [07:14] yozgrahame has joined the channel [07:21] admc has joined the channel [07:28] mikeal has joined the channel [07:30] marlun has joined the channel [07:30] shapeshed_ has joined the channel [07:31] markwubben has joined the channel [07:31] CIA-110: node: 03Ryan Dahl 07master * ra1e8fcc 10/ (4 files in 2 dirs): Merge branch 'v0.4' - http://bit.ly/lh4QFs [07:31] CIA-110: node: 03Ryan Dahl 07master * r69d20f5 10/ (lib/net_uv.js test/simple/test-net-connect-buffer.js): use_uv: Correct readyState on connecting - http://bit.ly/jKN43S [07:32] SamuraiJack has joined the channel [07:34] Skola: Is the "Dragon book" still the way to go for learning compilers? [07:34] febits has joined the channel [07:36] JasonSmith has joined the channel [07:38] xDROPx has joined the channel [07:38] xDROPx has joined the channel [07:40] xDROPx has joined the channel [07:41] omni5cience_ has joined the channel [07:41] saikat has joined the channel [07:44] mike5w3c_ has joined the channel [07:44] context-: "not websockets, a tcp socket" .... best quote ive read from this channel so far. [07:45] context-: last i checked websockets are over tcp. so you get your tcp socket PLUS ! [07:48] pigmej has joined the channel [07:52] Ramosa has joined the channel [07:52] jetienne: context-: check again [07:54] context-: "WebSocket is a technology providing for bi-directional, full-duplex communications channels, over a single Transmission Control Protocol (TCP) socket." [07:54] context-: there is your tcp socket [07:54] jetienne: you didnt check again, you keep repeating [07:54] hlindset has joined the channel [07:54] hlindset has joined the channel [07:54] jetienne: context-: the point being both are very different [07:55] bx2 has joined the channel [07:55] context-: they are hardly comparable technically. two totally different layers of OSI [07:55] context-: but it IS a tcp socket. [07:55] jetienne: nah [07:55] jetienne: this is why you need to check again :) [07:56] mega_ has joined the channel [07:56] context-: what i said is correct. [07:56] context-: websocket gives you a tcp socket PLUS [07:56] jetienne: hehe [07:56] context-: whether you want the plus or not is not up to you ;) [07:57] jetienne: context-: for next time check again, or you may repeat again and other people will contradict you :) [07:57] indutny: hey, checkout a SPDY demo site: https://spdy.indutny.com/ [07:58] indutny: now with valid SSL cert! [07:58] indutny: :) [07:58] shapeshed has joined the channel [08:02] context-: spdy gives you 'channeled' http connections right? (in a sense) [08:02] indutny: context-: yep [08:02] context-: kk [08:03] context-: i like how they put it in chrome and then are like 'oh yeah, win! implement now. k thnx bye' [08:03] bx2 has left the channel [08:04] indutny: :) [08:06] FireFly|n900 has joined the channel [08:07] shirro has joined the channel [08:07] shirro has joined the channel [08:08] Prism has joined the channel [08:10] sreeix has joined the channel [08:13] mraleph has joined the channel [08:14] baoist has joined the channel [08:16] euforic has joined the channel [08:16] baoist has joined the channel [08:17] robhawkes has joined the channel [08:24] MikeMakesIt has joined the channel [08:26] hassox has joined the channel [08:28] `3rdEden has joined the channel [08:32] charleyd has joined the channel [08:41] hybsch has joined the channel [08:42] fly-away has joined the channel [08:44] uchuff has joined the channel [08:47] thejh has joined the channel [08:48] MikeMakesIt has joined the channel [08:54] saurabhverma has joined the channel [08:54] simenbrekken has joined the channel [08:56] niftylettuce has joined the channel [08:58] liar has joined the channel [09:00] zomgbie_ has joined the channel [09:05] adambeynon has joined the channel [09:09] shapeshed has joined the channel [09:10] jacobolus has joined the channel [09:10] aliem has joined the channel [09:11] ajpiaNOU has joined the channel [09:11] Me1000 has joined the channel [09:11] hwinkel has joined the channel [09:12] Me1000 has joined the channel [09:13] vjvjftft has joined the channel [09:14] jonmaim has joined the channel [09:15] stagas has joined the channel [09:16] stephank has joined the channel [09:20] mendel_ has joined the channel [09:34] admc has joined the channel [09:34] shapeshed has joined the channel [09:34] ajpiaNOU has joined the channel [09:36] ajpiaNOU has joined the channel [09:43] tokumine has joined the channel [09:45] pen has joined the channel [09:47] Yoric has joined the channel [09:50] code2k has joined the channel [09:52] herbySk has joined the channel [09:53] mange has joined the channel [09:55] Emmanuel_ has joined the channel [09:57] ts__ has joined the channel [09:58] caiges has joined the channel [10:09] jonmaim has joined the channel [10:10] jborst has joined the channel [10:12] eirikb has joined the channel [10:13] eirikb: Hello. How can I use search with npm (code)? I tried var npm = requrie('npm'); npm.load({}, function() { npm.search(['jquery'], function() { console.log(arguments); }); }); but it will only throw out all packages [10:15] eirikb: s/npm.search/npm.commands.search [10:16] unlink has joined the channel [10:16] unlink has joined the channel [10:17] JoshC1 has joined the channel [10:20] MattJ has joined the channel [10:22] eirikb: I can always just: npm.commands.ls([], function(err, data) { Object.keys(data).filter(function(key) { return key.match(/jquery/); }); }); [10:23] onr: eirikb: hey :) [10:23] eirikb: onr: Hey :) [10:24] eirikb: Filter works, but I guess it's best with search [10:25] sourcode has joined the channel [10:25] Ramosa has joined the channel [10:26] dexter_e has joined the channel [10:27] Ramosa: does node.js work with SWIG? If I got a c++ library that I would like to access via node.js and would prefer not to write too much c++ myself [10:28] Ramosa: or is the specific c++ module/addon for that purpose? [10:33] etaty has joined the channel [10:39] tokumine has joined the channel [10:42] StephenFalken has joined the channel [10:50] akshatj has joined the channel [10:53] adrianmg has joined the channel [10:53] jomoho has joined the channel [10:56] mikl has joined the channel [10:56] mikl has joined the channel [11:07] pastak_ has joined the channel [11:07] Wizek has joined the channel [11:08] pastak__ has joined the channel [11:12] level09 has joined the channel [11:13] adrianmg has joined the channel [11:13] balaa has joined the channel [11:18] necrodearia has joined the channel [11:19] Mrfloyd has joined the channel [11:19] adrianmg1 has joined the channel [11:25] dexter_e has joined the channel [11:29] ePirat has joined the channel [11:32] blup has joined the channel [11:34] adrianmg has joined the channel [11:35] mc_greeny has joined the channel [11:38] zomgbie has joined the channel [11:39] mxp has joined the channel [11:43] christkv has joined the channel [11:43] deedubs has joined the channel [11:45] xandrews has joined the channel [11:45] caiges has joined the channel [11:45] bbrandon has joined the channel [11:47] Yoric has joined the channel [11:47] Aria has joined the channel [11:50] xDROPx has joined the channel [11:50] [AD]Turbo has joined the channel [11:53] tayy has joined the channel [11:53] sethetter has joined the channel [11:53] aliem has joined the channel [11:56] ePirat: Hello [11:58] asabil has joined the channel [11:58] trepan has joined the channel [12:02] Yoric has joined the channel [12:04] RushPL has joined the channel [12:16] ePirat: I have a question, why the example from the video on node.js website doesnt work? https://gist.github.com/1059975 [12:18] ePirat: ok i found it [12:18] ePirat: i spelled length wrong... [12:19] sethetter has joined the channel [12:25] Ramosa: 575 people can be awfully quiet :p [12:25] shimondoodkin has joined the channel [12:26] dall has joined the channel [12:26] Aiden_ has joined the channel [12:26] dall: hello [12:27] dall: https://github.com/joyent/node/wiki/Installation <---- do i have to install node in this manner or do i have to donwload the tar.gz ? [12:30] dvv has joined the channel [12:31] pigmej: does anyone know how to pass additional parameters to cradle.save , cradle.get etc? [12:33] dall: there arent' differencesif i install node from tar.gz or github ? [12:34] patrikkarlin has joined the channel [12:34] Aria: dall: not if you use the same branch. [12:34] Aria: dall: trunk, however, is unstable, soon to be the 0.5 series. [12:34] shimondoodkin: dall what would you like to do? [12:34] Aria: er. master, not trunk. [12:34] shimondoodkin: dall: is it a server ? [12:34] shimondoodkin: dall: is it a dev? [12:35] shimondoodkin: is it windows / mac? [12:35] shimondoodkin: linux? [12:35] dall: server [12:35] dall: linux [12:35] dall: i want to run my website [12:35] dall: i developed it using express [12:36] dall: now i want to put node on my linux VPS [12:36] mAritz has joined the channel [12:36] shimondoodkin: dall: usually you donwload a tar.gz [12:37] TomY has joined the channel [12:37] TomY_ has joined the channel [12:37] dall: shimondoodkin, ok i will donwload the tar [12:37] dall: i heard that i can install node using NPM....maybe i remember wrong [12:37] shimondoodkin: dall: for production you usualy want to conserve the version, so you can use nave or nvm when you run your script [12:38] code2k has joined the channel [12:38] Aria: no, npm requires node to run ;-) [12:38] dall: Aria, :) ok [12:38] Aria: but you might be thinking of nvm [12:38] dall: hmmm [12:38] dall: maybe [12:38] dall: shimondoodkin, ok but is 2011.06.29 node-v0.4.9.tar.gz the last stable version of node ? [12:39] pigmej: anyone is using craddle? [12:41] rauchg has joined the channel [12:41] shimondoodkin: pigmej:https://github.com/cloudhead/cradle/blob/master/lib/cradle.js#L293 [12:42] eirikb has left the channel [12:42] namelessnotion has joined the channel [12:43] dall: shimondoodkin, i'm going to install this tar.gz [12:43] shimondoodkin: dall: as aria said the 0.5 version is unstable yet, however you can get the unstable version from github. , yes sems like it is the last stable version [12:44] pigmej: shimondoodkin: ? [12:44] pigmej: ah ok but it's commented;D [12:44] dall: shimondoodkin, as far i have understand......github always has the newest version....and the tar is the stable [12:44] pigmej: ah ok got it :) [12:44] dall: right? [12:45] pigmej: hmm butt that's not what I wanted... [12:45] pigmej: because I can't send there additional parmeters... [12:46] rvb has joined the channel [12:46] bentkus: what will make the 0.5 release so special? [12:47] shimondoodkin: dall: yes and look also on the network to see who have the newest modifications, but this is not the case with node js better get the stable version from tar [12:48] dexter_e has joined the channel [12:48] dall: ok [12:48] pigmej: shimondoodkin: the problem it seems taht you you can't add http parameters to cradle things... [12:48] dall: so when they will create 0.5.tar.gz i will download it because it will be stable [12:48] dall: oook [12:49] pigmej: also I have no idea how to for example [12:49] pigmej: include_docs=True [12:49] pigmej: in views... [12:49] pigmej: also start/end keys... [12:49] pigmej: etc [12:51] Nican has joined the channel [12:53] hlindset has joined the channel [12:53] hlindset has joined the channel [12:54] skript_ has joined the channel [12:55] zomgbie has joined the channel [12:57] unvamp has joined the channel [12:58] shimondoodkin has joined the channel [13:01] Xano has joined the channel [13:02] sethetter: I'm trying to run unit tests on an object using mongoose, I think I may be doing the module exports incorrectly though. What do I need to export to be able to return new instances of a mongoose model? [13:03] pen has joined the channel [13:04] k1ttty has joined the channel [13:06] FireFly|n900 has joined the channel [13:06] FireFly|n900 has joined the channel [13:13] zeade has joined the channel [13:14] balaa has joined the channel [13:14] robhawkes has joined the channel [13:18] pkrumins: ACTION breaks silence [13:18] Aria: 'allo [13:20] Skola: sethetter [13:20] sethetter: yes? [13:20] Skola: export an instance of the model [13:20] sethetter: Would exporting a function that returns a new instance of the model work? [13:21] sethetter: That's what I am doing now [13:21] skohorn has joined the channel [13:22] AntelopeSalad has joined the channel [13:22] Skola: mongoose.model('ModelName', ModelName) [13:22] Skola: module.exports = mongoose.model('ModeName') [13:22] Skola: IIRC [13:22] ceej has joined the channel [13:23] Skola: ModelName* [13:23] sethetter: I tried that at one point too, but my expresso test is still saying my instance is undefined [13:24] Skola: well you do require it don't you? [13:24] sethetter: Yes [13:25] shimondoodkin has joined the channel [13:25] sethetter: If it's required like - "var Model = require('../model');" then I should be able to do "var m = new Model();" right? [13:26] piscisaureus has joined the channel [13:26] Skola: you also did YourModel = new Scheme ({ etc }) ? [13:26] sethetter: Yes [13:26] CStumph has joined the channel [13:26] Skola: :S [13:27] shimondoodkin: sethetter: you can do like: module.exports=function to return [13:27] sethetter: to return new instance of Model, right? [13:28] shimondoodkin: sethetter: or object to return [13:29] sethetter: then I use it by doing "var m = Model();"? after it's required? [13:29] bx2 has joined the channel [13:29] shimondoodkin: sethetter: you can, but better don't. because the module is cached and you might get a static variable. better return a function that when called will do new [13:29] shimondoodkin: sethetter: a function that will return a new object [13:30] sethetter: right, that's what i did. i meant in the document it's required into [13:30] sethetter: I can init a new instance of the model by doing "var m = Model();", correct? or is that wrong [13:30] sethetter: That would be calling the function that returns a new instance of the object right? [13:30] shimondoodkin: sorry, i don't know what you are doing [13:31] sethetter: my mongoose model is defined in one file, exported with "module.exports = function() { return new Model(): }" [13:31] pigmej: shimondoodkin: do you know how to pass additional HTTP arguments to cradle ? [13:31] pigmej: because in thtat source that you showed there is no info about it;)) [13:32] sethetter: then in another file I have required with "var Model = require('../model');" and then trying to get a new instance of the model with "var m = Model();" [13:32] bogomips has joined the channel [13:32] unomi has joined the channel [13:32] temp01 has joined the channel [13:34] Aiden_ has joined the channel [13:40] hwinkel has joined the channel [13:40] liar has joined the channel [13:40] jonmaim has joined the channel [13:40] shimondoodkin: sethetter: if your model is defiend with schema like in this file then it should be ok https://github.com/LearnBoost/mongoose/blob/master/test/model.test.js [13:41] shimondoodkin: sethetter: seems like yes [13:42] shimondoodkin: pigmej: what do you mean by additional parameters? [13:42] scottschecter has joined the channel [13:43] tshpaper has joined the channel [13:43] sethetter: I think I see the problem, I wasn't defining the model again inside of my tests, but they are here [13:43] shimondoodkin: sethetter: maybe you did not defiend your model [13:43] sethetter: I did in the file I required in, but not in my test file [13:44] sub_pop has joined the channel [13:44] pigmej: shimondoodkin: to make a request like this [13:44] sethetter: They have their test set up differently here. I defined my schema in a different file, and tried to require that into my test file [13:44] pigmej: curl -X PUT http://some_host:5984/some_db/some_doc?x=1 [13:45] materialdesigner has joined the channel [13:45] shimondoodkin: sethetter: try to print what you get, with console.log [13:46] sethetter: Not sure why I didn't do that before.. [13:46] sethetter: But that revealed the problem, it's the testing library I'm using apparently [13:46] pigmej: shimondoodkin: you got the idea? [13:46] sethetter: The object it printed was correct [13:46] sethetter: But should.js is telling me the var is undefined. [13:47] shimondoodkin: pigmej: yes [13:48] sethetter: I'll try running tests through the assert module instead. [13:48] pigmej: i think it's possible to add it to existing doc-id [13:48] bbrandon has joined the channel [13:48] pigmej: but it seems it's impossible to save new document(without doc-id) with additional parametres [13:48] shimondoodkin: pigmej: the simple answer is you can't, https://github.com/cloudhead/cradle/blob/master/lib/cradle.js#L374 it will be escaped when splited maped on escapestring and joined again. [13:49] akshatj has joined the channel [13:49] pigmej: damn right ;/ [13:49] pigmej: so I can't use cradle ;/ [13:49] shimondoodkin: you can patch it [13:49] Nican has joined the channel [13:50] pigmej: hmm [13:50] pigmej: but it's funny [13:50] pigmej: because it seems that it worked [13:51] pigmej: http://wklej.to/TiBXB/text [13:51] pigmej: but it's for existing docs ;/ [13:52] shimondoodkin: pigmej: do you want it go as a querystring, not as doc id, right? [13:53] pigmej: sure but if it will work in that way [13:53] pigmej: i can accept it also... [13:53] pigmej: and that ?x=1 is not mapped as docid [13:53] pigmej: it seems to be passed as argument [13:54] sethetter: Got it worked out. Something was messed up with the should library, but I reinstalled locally with npm and everything turned out good! :) [13:55] shimondoodkin: you can check if id contains '?' from the end and split by it and add it later after the escape [13:55] Mrfloyd has joined the channel [13:55] pigmej: shimondoodkin: well [13:55] pigmej: the thing is [13:55] pigmej: that document.save [13:56] pigmej: db.save [13:56] pigmej: goes through post [13:56] pigmej: not put... [13:56] pigmej: eh not edit [13:56] pigmej: post => not known id [13:56] pigmej: put => known one [13:59] shimondoodkin: pigmej: why do you use cradle? it seems like nobody is updating it [14:00] Melkor_ has joined the channel [14:01] jensn has joined the channel [14:01] pigmej: shimondoodkin: what's better than cradle ? [14:02] shimondoodkin: pigmej: i dont know, but i know that https://github.com/mikeal is the guru of couchdb [14:02] pigmej: shimondoodkin: he don't have his own lib for couch;p [14:03] shimondoodkin: pigmej: i mean maybe to look on what he is doing [14:04] pigmej: well [14:04] pigmej: he's not using couchdb as I see... [14:05] pigmej: just some couchapp plays [14:05] jslatts has joined the channel [14:05] pigmej: cradle last update is 14.06 (2 weeks ago) [14:05] pigmej: his couchdb things >1 year ago [14:06] shimondoodkin: oh [14:07] pigmej: i wonder why... [14:07] pigmej: because isn't Mikeal from CouchOne? [14:07] shimondoodkin: pigmej: in general you can make a quick patch for this for your needs, also maybe it is possible to find something new on https://github.com/joyent/node/wiki/modules [14:08] pigmej: anyway it's funny in node.js world [14:08] pigmej: that most of libs are lack serious functionalities... [14:08] JasonSmith: Many people from the Couch community feel like, Couch is HTTP. Couch is REST. Use an HTTP client. That has the least impedence mismatch [14:08] pigmej: most of them works in single db setups etc... [14:08] JasonSmith: Mikeal would definitely recommend https://github.com/mikeal/request for couch access [14:09] JasonSmith: I fully agree. I see no point in couch clients. *However* I spoke with Charlie Robbins at NodeConf and he said cradle is very good and I should revisit it. He's sharp so I will assume he is right [14:09] pigmej: JasonSmith: well [14:10] pigmej: maybe it's very good [14:10] pigmej: but... you can't use it with *any* cluster setup [14:10] pigmej: so it's useless in serious production setups [14:10] JasonSmith: pigmej: couch cluster? [14:10] pigmej: am I wrong? [14:10] pigmej: JasonSmith: yup [14:10] dexter_e has joined the channel [14:11] JasonSmith: First, "any" is a big word. Single-write master, multi-read slaves could still work. However you cannot use it "generally" with couch -- totally [14:11] pigmej: heh [14:11] unlink has joined the channel [14:11] pigmej: master slave [14:11] JasonSmith: sorry, I saw "cluster" and read "couch" [14:11] pigmej: isn't a solution :) [14:12] JasonSmith: bigcouch and lounge clusters both strike me as cradle-compatible [14:12] pigmej: JasonSmith: yup [14:12] pigmej: until [14:12] pigmej: you want to change [14:12] pigmej: RW [14:12] pigmej: params [14:12] pigmej: to adjust the performance for db / document [14:12] JasonSmith: Don't get me wrong, I told the author of cradle that cradle was shit. (This was 5 seconds before Charlie told me who he was) [14:12] pigmej: and/or security [14:12] Charuru has joined the channel [14:13] pigmej: sure that it works with default values [14:13] pigmej: defined per cluster... [14:13] pigmej: but well.... [14:13] JasonSmith: I will check out cradle again on his say-so but I still feel super comfortable using HTTP to access couch [14:13] pigmej: some data needs to be more secure than others [14:13] pigmej: generally agree... [14:13] FIQ has joined the channel [14:13] JasonSmith: pigmej: indeed [14:13] pigmej: but [14:14] pigmej: "cradle — a high-level, caching, CouchDB client" [14:14] pigmej: replace with [14:14] pigmej: "cradle — a high-level, caching, CouchDB client, not for cluster setups" :P [14:14] JasonSmith: right [14:14] pigmej: result? cradle is a 'toy' [14:14] pigmej: ;-) [14:14] kmwallio has joined the channel [14:14] pigmej: (my personal opinion) [14:15] JasonSmith: Accessing the local couch on an iphone, android, or webos strikes me as a worthwhile configuration :) [14:15] pigmej: sure... it will work in 90% of cases very very well [14:15] pigmej: hehe :)) [14:15] JasonSmith: since those are somewhere between alpha and vaporware, I would reply to myself: so what? [14:15] pigmej: i just wonder why he splits the id, escapes it [14:16] pigmej: and joins back... [14:16] JasonSmith: pigmej: where is that? [14:16] JasonSmith: CouchDB has one exception to its id rules, which is all slashes must be %2f *except* "_design/". Could it be that? [14:16] pigmej: https://github.com/cloudhead/cradle/blob/master/lib/cradle.js#L374 [14:16] pigmej: JasonSmith: yup... but [14:17] pigmej: he doesn't replace slashes... [14:17] JasonSmith: oh interesting, not sure about that code [14:17] JasonSmith: yes, my idea wasn't relevant [14:17] pigmej: above you have POST [14:17] pigmej: where there is no that replace [14:17] pigmej: ok forget [14:17] pigmej: :P [14:17] pigmej: thta was bullshit that I said ;) [14:17] pigmej: ;-) [14:17] pigmej: anyway... [14:17] pigmej: from my point of view [14:18] pigmej: id.split('/').map(querystring.escape).join('/') [14:18] JasonSmith: my own code does: encodeURIComponent(url).replace(/^_design%2f/, '_design/'); // :( [14:18] pigmej: fixes 'only' the _ [14:19] akshatj has joined the channel [14:19] pigmej: hmm [14:19] dall: hi guys [14:20] dall: i just installed node on the server [14:20] pigmej: JasonSmith: http://wklej.to/hGNVO/text [14:20] JasonSmith: anyway I am sure they would welcome your patch to correct this honest oversite, pigmej :) [14:20] pigmej: same code but from npm... [14:20] dall: i launched my website (one page....with one

hello

) [14:20] dall: node seems slowly [14:20] dall: Requests per second: 57.21 [#/sec] (mean) [14:20] pigmej: dall: did you remember about async? [14:20] dall: locally it was around 2500 / second [14:21] dall: pigmej, async ? [14:21] pigmej: so you didnt :-) [14:21] pigmej: callbacks etc? [14:21] dall: yes [14:21] dall: i'm using express [14:21] JasonSmith: gotta run. good chat, pigmej [14:21] pigmej: JasonSmith: cu [14:22] dall: pigmej, as i told you the same around 2500 / second locally [14:23] bsutt has joined the channel [14:23] mynyml has joined the channel [14:24] sethetter has joined the channel [14:25] bsutt has joined the channel [14:25] dall: pigmej, what could it be? [14:26] pigmej: dall: hard to say... [14:26] pigmej: check if you don't block somewhere... [14:27] AntelopeSalad has joined the channel [14:30] ryantm has joined the channel [14:31] Emmanuel_ has joined the channel [14:32] Leonidas_ has joined the channel [14:32] hij1nx has joined the channel [14:34] jtsnow has joined the channel [14:36] dexter_e has joined the channel [14:37] unomi has joined the channel [14:37] kersny_ has joined the channel [14:39] Mrfloyd has joined the channel [14:39] bogomips has joined the channel [14:40] dall: hmm i think the problem should be my low cost VPS :-( where could i reat a small dedicated server? [14:41] `3rdEden has joined the channel [14:41] bogomips: do you want lease a server ? [14:42] smtlaissezfaire has joined the channel [14:42] dall: yes [14:43] dall: bogomips, yes [14:44] perlmonkey2 has joined the channel [14:44] hlindset has joined the channel [14:47] bogomips: dall in my little experience a valid and economic solution is hetzner.de [14:48] bogomips: i have 8 core , 8 giga of ram, 750Gb raid 1 , 42� /month [14:49] nightshift has joined the channel [14:50] akshatj has joined the channel [14:50] mapleman has joined the channel [14:51] Skola: dall even if you have a shit VPS, 57 req/sec on that is aweful [14:51] dall: bogomips, good [14:52] dall: Skola, i have this vps http://www.giga-international.com/?show=vserver (the second) [14:54] pigmej: bogomips: hetzner is problematic.. [14:54] pigmej: and you have 4 cores;p [14:54] pigmej: not 8 :P [14:55] dall: pigmej, why problematic? [14:55] pigmej: thechical help ;) [14:55] pigmej: technical* [14:55] pigmej: and all you can have is 100mbit [14:55] bogomips: i never had problems [14:55] pigmej: well [14:56] pigmej: they once connected LARA to wrong server [14:56] pigmej: someone had access to one of mine servers [14:56] pigmej: and there is 150 eur setup in hetzner as I remember... [14:56] pigmej: the cheapest will be ovh kimsufi #1 [14:56] sylvinus has joined the channel [14:57] bogomips: yes 160� for setup [14:57] bogomips: but is one time [14:57] pigmej: yup [14:57] pigmej: that's why i still have hetzner machines [14:57] pigmej: because of that setup [14:57] pigmej: ovh >.... > hetzner [14:57] stepheneb has joined the channel [14:57] pigmej: setup / routing [14:58] bogomips: this is my server http://www.hetzner.de/en/hosting/produkte_rootserver/eq4 [14:58] pigmej: yup [14:58] pigmej: 4 cores + ht [14:58] bogomips: 17:03:23 up 237 days, 21:37, 6 users, load average: 1.06, 1.36, 1.46 [14:58] pigmej: not a prolbem [14:58] dall: maybe hetzner should be good for me [14:58] bogomips: yes 4 core [14:59] bogomips: Intel� Core� i7-920 Quadcore [14:59] pigmej: dall: depends what do you want [14:59] pigmej: kimsufi @ovh yu can have for hmm [14:59] pigmej: 15 eur? [14:59] pigmej: without 150 setup [14:59] pigmej: as I remember [14:59] pigmej: and hetzner disks are pretty slow [14:59] paznicul has joined the channel [15:00] dall: idont' want a big server.... Intel� Core� i7-920 Quadcore is too much [15:00] pigmej: dall: I said.. go for kimsufi [15:00] pigmej: or hetzner X series [15:00] bogomips: /dev/md1: [15:00] bogomips: Timing cached reads: 16312 MB in 1.99 seconds = 8185.66 MB/sec [15:00] bogomips: Timing buffered disk reads: 258 MB in 2.29 seconds = 112.73 MB/sec [15:01] pigmej: it's build on top of old AMD [15:01] pigmej: bogomips: so yuo even slower one that I on that box [15:02] mynyml has joined the channel [15:04] dshaw_ has joined the channel [15:04] catshirt has joined the channel [15:06] sourcode has joined the channel [15:06] azeroth_ has joined the channel [15:07] mapleman has joined the channel [15:09] level09 has joined the channel [15:09] level09 has left the channel [15:10] mandric has joined the channel [15:11] dscape has joined the channel [15:11] catshirt has joined the channel [15:11] akshatj has joined the channel [15:11] rfay has joined the channel [15:12] shimondoodkin has joined the channel [15:12] cafesofie has joined the channel [15:14] ekryski has joined the channel [15:14] shimondoodkin: how to load coffee modules in node [15:14] shimondoodkin: how to use https://github.com/assaf/zombie [15:15] maushu has joined the channel [15:16] mrmanager has joined the channel [15:16] shimondoodkin: found had to use cake build [15:18] CStumph has joined the channel [15:18] kmwallio has joined the channel [15:20] m00p has joined the channel [15:20] jtsnow has joined the channel [15:21] hybsch has joined the channel [15:23] pigmej: ok [15:23] pigmej: bug in cradle found:P [15:24] KingJamool has joined the channel [15:24] JeremyJDKS has joined the channel [15:25] un_golan has joined the channel [15:27] pigmej: https://github.com/cloudhead/cradle/issues/83 ;-) [15:28] CStumph has joined the channel [15:29] wbw72 has joined the channel [15:29] pigmej: anyway... [15:29] pigmej: JasonSmith: cradle is truly a joke [15:29] pigmej: it uses keep-alive *very very wrong* [15:30] dgathright has joined the channel [15:31] CrazyGoogle has joined the channel [15:32] chapel: jslatts: yo [15:32] CrazyGoogle: hi, anyone tried to build nodejs on haiku os ? [15:32] jslatts: whats up chapel [15:32] chapel: not much, just saying hi [15:32] chapel: funny that sorensen got stuck fixing his car the other night [15:32] JasonSmith: pigmej: To me, a good so-called "couchdb client" is not a translation from HTTP to language X, but rather making things possible which would usually require lots of effort and bugs [15:33] JasonSmith: for example, https://github.com/iriscouch/cqs -- is it a CouchDB client? [15:33] rauchg_ has joined the channel [15:33] chapel: anyways, nodeknockout registration opens soon, just trying to figure out who to be on a team with https://twitter.com/#!/node_knockout/status/86943890476777474 [15:33] WeiKeWen has joined the channel [15:33] JasonSmith: It creates, updates, and removes documents. It creates design documents. But it's hard to call a "couchdb client" [15:33] zemanel has joined the channel [15:34] JasonSmith: my feeling is, no. THAT is the couchdb client. The other stuff is a neat learning tool [15:34] al3xnull has joined the channel [15:34] hij1nx has joined the channel [15:34] JasonSmith: another example: https://github.com/iriscouch/follow [15:35] pigmej: agree [15:35] pigmej: but you know... [15:35] JasonSmith: Follow does (and only does) a feature which a proper couch client should do: abstract the _changes feed into something more useful [15:35] pigmej: using plain http requests [15:35] pigmej: is a little bit pain [15:35] chapel: well using plain isn't too bad [15:35] FIQ has joined the channel [15:35] pigmej: chapel: 'slow' ;) [15:35] t|f: Noob question, but could use help: if I have x in dependencies in package.json, do I need to also do npm install x in my dir? [15:35] pigmej: and I have no time to write a wrapper ;/ [15:36] jslatts: chapel: yeah, that sucks [15:36] chapel: but the only thing that couchdb really is missing is proper updating [15:36] pigmej: chapel: it's design ;) [15:36] chapel: I know [15:36] pigmej: if you want in place updates => mongo [15:36] chapel: ACTION doesn't need them [15:36] pigmej: then yuo will get other problems ;) [15:36] chapel: I <3 couchdb [15:36] JasonSmith: pigmej: request({uri:db+'/some_doc', method:'POST', json:doc_body}, function(er, resp, ok) { if(er) throw er; console.log('Easy peasy: ' + ok) }) [15:37] pigmej: hehe [15:37] pigmej: in theory 'yes' [15:37] JasonSmith: In other words, to me, the ideal abstraction or "client" is request: just make HTTP *slightly* more concise and no more [15:37] pigmej: in practice... not that easy [15:37] pigmej: sure... [15:37] JeremyJDKS: Hey guys [15:37] pigmej: JasonSmith: but still there is no 'light' wrapper over http [15:37] pigmej: to couch [15:37] pigmej: that just for example replaces the 'method' argument [15:37] pigmej: etc [15:38] maushu_ has joined the channel [15:39] pHcF has joined the channel [15:39] mynyml has joined the channel [15:39] smtlaissezfaire has joined the channel [15:39] t|f: nvm answered my own question. [15:39] JasonSmith: CouchDB client libraries are either too complex or too simple. Perhaps that is a clue that CouchDB hit a sweet spot? :p [15:44] Kavinsky has joined the channel [15:46] thalll has joined the channel [15:47] pigmej: JasonSmith: sure... [15:47] pigmej: but you know... [15:47] pigmej: handling 'bare' http.request [15:47] pigmej: everywhere... 'sucks' [15:47] pigmej: writting wrapper sucks more because of possible bugs.. [15:51] mikeal has joined the channel [15:51] pigmej: JasonSmith: node-couchdb-min seems ok :) [15:52] CrazyGoogle: tryed to compile nodejs on haiku os :( http://pastebin.com/2jeFAdmP [15:52] JasonSmith: pigmej: Hadn't seen it yet, thanks. [15:52] JasonSmith: Gotta run, cheers [15:53] smtlaissezfaire has joined the channel [15:53] level09 has joined the channel [15:54] pigmej: JasonSmith: cu [15:54] Beck has joined the channel [15:55] stepheneb has joined the channel [15:58] sreeix has joined the channel [15:58] herbySk has joined the channel [15:58] kbni: public service announcement [15:59] kbni: drinking in the bathtub is dangerous [15:59] kbni: that is all [15:59] febits has joined the channel [15:59] Sorella has joined the channel [16:00] CrazyGoogle: libuv has to support #haiku too :D [16:00] bbttxu has joined the channel [16:04] __sorin__ has joined the channel [16:04] TomY has joined the channel [16:04] charleyd has joined the channel [16:04] ldopa has left the channel [16:06] hogeo has joined the channel [16:08] ryanmcgrath has joined the channel [16:09] ldopa has joined the channel [16:11] level09: is there a way to get url snapshot with some node.js module ? [16:11] level09: url snapshot = webpage snapshot [16:13] patrikkarlin has joined the channel [16:15] mange has joined the channel [16:19] dscape has joined the channel [16:21] stepheneb has joined the channel [16:21] supster has joined the channel [16:23] jtsnow has joined the channel [16:25] felixge has joined the channel [16:25] felixge has joined the channel [16:25] necrodearia has joined the channel [16:28] ekryski has joined the channel [16:29] dall: https://github.com/evnm/nvm [16:29] simenbrekken has joined the channel [16:29] dall: why to add it to bashrc? . ~/.nvm/nvm.sh [16:30] coyo has joined the channel [16:31] rhdoenges has joined the channel [16:33] _1marc has joined the channel [16:35] marvin_ has joined the channel [16:35] tuhoojabotti: Whyn ot to add? [16:36] dall: tuhoojabotti, :-) i just asking why to do it :-) [16:36] stepheneb has joined the channel [16:37] catshirt has joined the channel [16:42] wookiehangover has joined the channel [16:44] CoinOpeBoy has joined the channel [16:44] jtsnow has joined the channel [16:46] Locke23rus has joined the channel [16:48] smtlaissezfaire has joined the channel [16:49] Yoric has joined the channel [16:49] hlindset has joined the channel [16:49] hlindset has joined the channel [16:49] mcutler has joined the channel [16:52] andrewfff has joined the channel [16:52] hwinkel has joined the channel [16:55] patcito has joined the channel [16:56] aliem has joined the channel [16:57] zackattack has joined the channel [16:57] JeremyJDKS has left the channel [16:59] charleyd has joined the channel [17:03] piscisaureus_ has joined the channel [17:03] tjholowaychuk has joined the channel [17:04] sreeix has joined the channel [17:05] wbw72 has joined the channel [17:06] necrodearia has joined the channel [17:06] tj has joined the channel [17:06] jonmaim has joined the channel [17:10] mrryanjohnston: afternoon, noders :) [17:10] Beck has left the channel [17:11] jvduf has joined the channel [17:13] patrikkarlin: sup [17:13] dexter_e: Whats the simplest and most reliable way to put Node on Port:80 on a live machine? [17:14] dexter_e: These days [17:14] dexter_e: I heard haproxy is awesome but it seems high evel [17:15] Guest48147: you could use the nodejitsu tools or try cluster [17:16] tjholowaychuk has joined the channel [17:16] robhawkes has joined the channel [17:18] bergie has joined the channel [17:19] cjm has joined the channel [17:19] bogomips2_ has joined the channel [17:20] Wa has joined the channel [17:20] brianseeders has joined the channel [17:21] gazumps has joined the channel [17:23] knuthy has joined the channel [17:23] kuhrt has joined the channel [17:31] hunterloftis has joined the channel [17:34] jvduf has joined the channel [17:34] Melkor_ has joined the channel [17:34] hunterloftis: Express.js is ignoring ajax requests from Zepto.js -- can't figure out why. Have experienced weird behavior with Connect/Express based on ajax content-type before... [17:35] tjholowaychuk: hunterloftis: what's the request header look like? [17:35] hunterloftis: tjholowaychuk: Trying to figure that out, hard to see on mobile ;) [17:35] tjholowaychuk: ah [17:36] tjholowaychuk: well you can just console.log(req.header) [17:36] hunterloftis: Yep hooking that up right now [17:36] tjholowaychuk: not sure about zepto but jquery does some funky stuff at times [17:37] hunterloftis: tjholowaychuk: should it be req.header()? logging .header gives me [Function] [17:37] tjholowaychuk: sorry req.headers [17:37] tjholowaychuk: grr [17:37] hunterloftis: thx [17:37] tjholowaychuk: everyone pluralizes header these days [17:38] hunterloftis: tjholowaychuk: https://gist.github.com/1061427 [17:38] hunterloftis: I've run into something similar with jQuery before, can't remember exactly what it was though. I feel like the content-type was wrong... or something [17:38] jelveh has joined the channel [17:39] tjholowaychuk: does it have no body [17:39] coyo has joined the channel [17:39] hunterloftis: there's no body [17:39] hunterloftis: It's just a GET [17:39] tjholowaychuk: that's why [17:39] tjholowaychuk: fuck [17:39] hunterloftis: Well, 1 sec [17:39] tjholowaychuk: why the hell do they do that [17:39] hunterloftis: I just added that content-type stuff, don't blame zepto [17:39] tjholowaychuk: they set the content-type for no body haha [17:39] hunterloftis: I did it to see if it would change the behavior [17:39] tjholowaychuk: oh [17:39] tjholowaychuk: haha [17:39] tjholowaychuk: backbone did that too [17:39] hunterloftis: but it does that before that change ;) [17:39] tjholowaychuk: looks fine other than the content-type [17:40] tjholowaychuk: depending on the middleware i guess, sometihng might be getting jammed [17:40] tjholowaychuk: https://github.com/visionmedia/express-trace [17:40] tjholowaychuk: try that for a request, might help detect where it's at [17:40] dexter_e has joined the channel [17:40] hunterloftis: tjholowaychuk: haha [17:40] bogomips2_ has left the channel [17:41] hunterloftis: tjholowaychuk: My change actually didn't do anything [17:41] hunterloftis: tjholowaychuk: zepto adds that by default [17:41] bogomips2_ has joined the channel [17:41] tjholowaychuk: oh :s [17:41] tjholowaychuk: it shouldn't [17:41] hunterloftis: tjholowaychuk: Yeah, I remembered I had issues with that, so I decided to change it... I assumed for GET it wouldn't already be urlencoded [17:41] tjholowaychuk: GET typically has no body [17:41] tjholowaychuk: but regardless if the request has no message there should be no content-type [17:42] hunterloftis: If I patched connect to just not care, would that break anything? [17:43] tbranyen: heh i've had to use content-type to get the right format back from asp.net web services with get requets [17:43] tjholowaychuk: i already have if ('GET' == req.method || 'HEAD' == req.method) return next(); [17:43] tjholowaychuk: so bodyParser actually should be ok [17:43] tjholowaychuk: i think i added that after the jquery issue last time [17:43] tjholowaychuk: sounds like zepto also inherits jquery bugs [17:43] tjholowaychuk: haha [17:43] tjholowaychuk: AWESOME [17:44] tbranyen: tjholowaychuk: in fairness to jquery chances are they do that for a reason [17:44] Bwen has joined the channel [17:44] tbranyen: for some obscure opera/ie related issue [17:44] tjholowaychuk: yeah maybe [17:44] tbranyen: also curious if thats still a problem with the ajax rewrite [17:45] tbranyen: the previous ajax code was fuggin oldd [17:45] tjholowaychuk: oh god [17:45] tjholowaychuk: and terrible [17:45] tjholowaychuk: i haven't seen the new api [17:45] tbranyen: no arguments there :-p [17:47] jakehow has joined the channel [17:47] tjholowaychuk: i liek how in safari a NodeList is typeof 'function' [17:47] tjholowaychuk: haha [17:47] tjholowaychuk: javascript is so fucked [17:48] blueadept has joined the channel [17:48] hunterloftis: tjholowaychuk: Should connect 1.4.2 work regardless of incorrect content-types? [17:49] tjholowaychuk: bodyParser should ignore GET now yeah [17:49] tjholowaychuk: not invalid data though [17:49] tjholowaychuk: dont send json as x-form-www-urlencoded etc [17:49] hunterloftis: Right [17:50] hunterloftis: Is there anything else I should need to do to get this error out then? I get no errors, only a timeout whenever there's a content-type on the ajax [17:50] hunterloftis: To be sure I'm about to remove content-type from zepto temporarily [17:50] tjholowaychuk: well it depends, it could be an issue in your app [17:50] tjholowaychuk: hard to say without seeing code or stepping through with a debugger [17:50] tjholowaychuk: could be many things [17:51] hunterloftis: aha [17:51] hunterloftis: no it's definitely the content-type thing [17:51] hunterloftis: When I put content-type 'none' (since otherwise zepto sets it to urlencoded) everything works as expected [17:51] tjholowaychuk: LOL toString.call(arr) in ff 4 "[xpconnect wrapped native prototype]" [17:51] hunterloftis: But of course sometimes I *will* be posting data, so... [17:51] tjholowaychuk: WTF [17:51] tjholowaychuk: browser are so fucking retarded [17:52] tjholowaychuk: thank god i dont deal with this shit [17:52] hunterloftis: haha [17:52] tbranyen: tjholowaychuk: thats true for all host objects [17:52] tbranyen: i think its a firebug issue [17:52] felipellrocha has joined the channel [17:53] tbranyen: console.dir( Storage.prototype ) for instance gets you nothing useful in firebug, but in dragonfly/chrome dev tools you get the prototype [17:53] tj has joined the channel [17:54] tbranyen: hunterloftis: patch the zepto code so that if you don't pass a body set the content type to none? [17:54] tbranyen: or do that in your own code [17:54] coyo has joined the channel [17:55] hunterloftis: tbranyen: Yeah that's what I'm considering, but since I've run into this problem several times... it seems like it would be nice for express to be able to disregard content-type if there's really no body [17:56] balaa has joined the channel [17:56] Guest70671: if it's a GET it should be ok [17:56] Guest70671: otherwise it's just dumb [17:57] perlmonkey2 has joined the channel [17:57] googol has joined the channel [17:57] hunterloftis: It looks like express bodyParser just passes off parsing to qs if it sees urlencoded: 'application/x-www-form-urlencoded': qs.parse [17:58] tjholowaychuk has joined the channel [17:58] ryanj has joined the channel [18:00] felipellrocha_ has joined the channel [18:01] hunterloftis: ah shit it looks like zepto may send a body regardless of whether you actually give it data or a POST request [18:02] sreeix has joined the channel [18:02] felipellrocha_ has joined the channel [18:06] tbranyen: quick q why are you using zepto? [18:06] jelveh has joined the channel [18:06] tbranyen: mobile stuff? [18:07] balaa: hi everyone, whats the most mature MVC framework written with node? [18:07] tjholowaychuk: i dont get why zepto copied the jquery api, i'd at least take that as a chance to get rid of the bad parts [18:08] tbranyen: tjholowaychuk: hype and follower count [18:08] tjholowaychuk: i guess [18:08] tbranyen: i dunno its a very familiar api [18:08] tjholowaychuk: i haven't done client-side stuff for ages [18:08] tjholowaychuk: and i notice so many flaws [18:08] tjholowaychuk: with jquery [18:08] hunterloftis: tbranyen: yeah mobile [18:08] hunterloftis: Yeah it's super familiar, that's the nice part about zepto [18:08] tbranyen: jquery seems to be flawed just short enough to bother most people [18:08] tbranyen: not bother* [18:08] level09 has joined the channel [18:09] tbranyen: as evidenced by how almost all sites use it [18:09] hunterloftis: What is it you guys mind so much about jQuery's api? [18:09] necrodearia has joined the channel [18:09] tbranyen: hunterloftis: i work at a company that employees four jquery team members, so... i'm a bit biased [18:09] tbranyen: employs* [18:10] hunterloftis: tbranyen: Yeah but I mean, what do you guys dislike about the api? [18:10] tbranyen: hunterloftis: i don't especially dislike anything about jquery's api [18:11] tbranyen: seems some stuff is kind of annoying like the data function [18:11] tbranyen: that can get html5 data-attrs but not set them [18:11] tbranyen: the new attr/prop stuff is kind of weird [18:12] mrmanager has joined the channel [18:12] tbranyen: its just manager [18:17] patrikkarlin: what whuld be the benifits of setting data? [18:18] yorick: there's no way to get Buffers() in or out crypto.hash? [18:19] tjholowaychuk has joined the channel [18:19] saikat has joined the channel [18:21] hunterloftis: How can I get npm to update all the stuff in node_modules? [18:21] hunterloftis: npm update doesn't give me anything [18:21] tjholowaychuk: i've only ever used npm install [18:21] tjholowaychuk: when i make a change [18:22] hunterloftis: tjholowaychuk: yeah that's probably a better idea anyway, I should keep package.json current [18:22] tjholowaychuk: yeah it will bite you at this stage in the game [18:22] hunterloftis: yeah [18:22] hunterloftis: The problem was that I had a connect before the 'if GET' update [18:22] tjholowaychuk: happened to us lots with 40+ deps [18:22] hunterloftis: damn yeah [18:22] hunterloftis: that'd be rough [18:22] hunterloftis: We have 20 [18:23] AvianFlu has joined the channel [18:23] MikhX has joined the channel [18:24] hunterloftis: Awesome, now zepto ajax works with 0 changes. [18:24] tjholowaychuk: whoop [18:24] hunterloftis: Only took me like 1.5 hours to figure out wtf was going on with the iphone ;) [18:25] tjholowaychuk: ideally bodyParser shouldn't ignore GET, since you *could* technically have some kind of json query to GET data [18:25] tjholowaychuk: but [18:25] tjholowaychuk: meh for now i guess [18:25] tjholowaychuk: until these things fix themselves [18:25] stepheneb has joined the channel [18:26] hunterloftis: Yeah I know what you mean, but I'm happier with the jQuery/zepto/etc working ootb - body on GET is a weird edge case [18:26] AvianFlu: wow, I wish MY bugs fixed themselves! :-P [18:26] tjholowaychuk: i dont think people use GET bodies much in practice [18:26] tjholowaychuk: so i agree for now :D [18:27] tjholowaychuk: though I prefer not to patch based on other libraries having bugs [18:28] hunterloftis: tjholowaychuk: oh come on, JS has a long tradition of cross-pollinating bugs ;) [18:29] tjholowaychuk: haha [18:31] Jakwac has joined the channel [18:32] sub_pop has joined the channel [18:33] hlindset has joined the channel [18:33] hlindset has joined the channel [18:33] Sorella_ has joined the channel [18:34] hij1nx has joined the channel [18:40] X-Scale has joined the channel [18:41] dexter_e has joined the channel [18:43] jonmaim has joined the channel [18:44] herbySk has joined the channel [18:45] petrjanda has joined the channel [18:46] sreeix has joined the channel [18:46] sreeix has joined the channel [18:47] balaa has joined the channel [18:47] omni5cience_ has joined the channel [18:47] JKarsrud has joined the channel [18:48] meso has joined the channel [18:49] sreeix has joined the channel [18:49] necrodearia has joined the channel [18:49] necrodearia has joined the channel [18:51] saikat has joined the channel [18:51] Sorella has left the channel [18:52] tob1 has joined the channel [18:52] smtlaissezfaire has joined the channel [18:57] StephenFalken has joined the channel [18:59] Me1000 has joined the channel [18:59] skohorn has joined the channel [19:03] __sorin__ has joined the channel [19:04] Ravatar has joined the channel [19:04] bartt has joined the channel [19:04] stepheneb has joined the channel [19:04] bnoordhuis has joined the channel [19:07] hwinkel has joined the channel [19:07] sergej222 has joined the channel [19:07] ryanmcgrath has joined the channel [19:08] ceej has joined the channel [19:10] stagas has joined the channel [19:10] hwinkel has joined the channel [19:13] SuMarDi has joined the channel [19:15] hellp has joined the channel [19:15] jomoho has joined the channel [19:15] hdon has joined the channel [19:15] hereicode has joined the channel [19:17] towski has joined the channel [19:18] coyo has joined the channel [19:21] sergej222: hi, i'm writing an application based on cef(chromium embedded framework), so i could use the code base in web and desktop environments. I got it working with python framework pyramid (ex pylons) without any sockets (raw request/response communication through buffers). Which is the best way to achieve it with node.js to elemenate the need of a second serverside programming language? Take a closer look at http.js, remove all socketbased code and [19:22] felipellrocha has joined the channel [19:25] hij1nx has joined the channel [19:27] ryanmcgrath has joined the channel [19:33] al3xnull has joined the channel [19:34] hippich has joined the channel [19:35] orospakr has joined the channel [19:36] knuthy has joined the channel [19:38] augustl: is it possible to build a npm package without publishing it? [19:38] augustl: wanna test how my .npmignore and "files" property work without actually publishing [19:39] tjholowaychuk: you could probably $ npm install in the dir [19:39] tjholowaychuk: and inspect what is actually installed [19:39] tjholowaychuk: not sure [19:40] tjholowaychuk: though it's pretty typical glob stuff [19:40] augustl: with "files": ["lib", "LICENSE", "README"] in package.json, why would npm also include every other file in the directory? :S [19:40] augustl: wait, it doesn't include every other file [19:40] pquerna: cus... its npm. [19:40] tjholowaychuk: i dont know if "files" does anything [19:40] augustl: it does include my "vendor" directory though [19:40] tjholowaychuk: i've never used it at least [19:40] augustl: files specify which files that should be part of the package [19:40] pquerna: how i do it is using a private npm registry... but that has lots of.. complications. [19:40] augustl: and it does restrict the files to the ones I specify, but it does include my vendor dir. [19:40] pquerna: (if you aren't using it for other reasons) [19:41] augustl: tjholowaychuk: after a "npm install", how do I inspect what's installed? [19:41] augustl: or, where does npm install the package? [19:41] avalanche123 has joined the channel [19:41] jakehow has joined the channel [19:42] augustl: bah, adding "vendor" to .npmignore doesn't help either [19:42] willwhite has joined the channel [19:43] materialdesigner has joined the channel [19:43] augustl: it doesn't add my "test" folder [19:43] augustl: so it must be something special with the "vendor" folder [19:43] augustl: npm is strange.. [19:44] augustl: odd, grepping for "vendor" in the npm repo doesn't yield anything [19:47] augustl: oh.. the npm package itself also has these problems [19:47] augustl: doc/, html/, test/, is all there [19:49] level09 has joined the channel [19:51] jvduf_ has joined the channel [19:52] TomY has joined the channel [19:53] hereicode1 has joined the channel [19:55] ghost has joined the channel [19:55] hlindset_ has joined the channel [20:04] orospakr: opinions on what is the best maintained/most awesome data persistence system for node? in particular I want to build a REST web service, with some business logic. I could honestly go for either SQL or "NoSQL". It's more a matter of which is nicer and better supported. :) [20:04] augustl: impossible question to answer is impossible to answer [20:04] igl1 has joined the channel [20:04] orospakr: heh. [20:05] orospakr: I figured I'd get that response. [20:05] augustl: there are well maintaned libs for many dbs [20:05] orospakr: more a matter of hearing what folks' opinions are. [20:05] augustl: I've used both mysql and pgsql [20:05] hereicode has joined the channel [20:05] augustl: and mongodb [20:05] bnoordhuis: flat files - the ultimate nosql [20:05] orospakr: heh. [20:07] augustl: wether or not to use a document database depends on wether or not you store documents, I suppose [20:07] augustl: then there's graph databases, relational databases, and what not [20:08] FireFly|n900 has joined the channel [20:10] Yoric has joined the channel [20:10] onr: augustl: almost all data stores are same. syntax and indexing differs [20:10] augustl: I'd argue that a graph database is pretty different from a relational database [20:10] augustl: based on what I've heard about them, not actual knowledge ;) [20:11] onr: both sql databases and graph databases store data in key/value [20:11] onr: binary trees and hash tables [20:12] necrodearia has joined the channel [20:14] bnoordhuis: onr: b-trees rather [20:15] onr: right [20:16] t|f: Just published my first npm package designed for public use, though its a minor thing. Package name is wabtools. Place for various Node related build scripts, tools, and extensions I write. Currently has one, a nodeunit reporter that uses Stacker to watch lib dir for file changes, track changes, and intelligently schedule a run of passed in files. https://github.com/BillBarnhill/wabtools [20:16] towski has joined the channel [20:19] yozgrahame has joined the channel [20:20] jetienne has joined the channel [20:22] mandric has joined the channel [20:24] baoist has joined the channel [20:24] Vertice has joined the channel [20:25] tokumine has joined the channel [20:29] davidwalsh has joined the channel [20:30] hlindset has joined the channel [20:30] hlindset has joined the channel [20:33] mange has joined the channel [20:36] level09 has joined the channel [20:36] clifton has joined the channel [20:38] admc has joined the channel [20:38] hookio has joined the channel [20:38] tilgovi has joined the channel [20:38] yozgrahame has joined the channel [20:40] hereicode has joined the channel [20:40] hereicode has left the channel [20:41] stagas has joined the channel [20:41] mdetrick has joined the channel [20:42] davidvanleeuwen has joined the channel [20:42] samBiotic has joined the channel [20:43] iFire has joined the channel [20:45] sergej222 has left the channel [20:46] shapeshed has joined the channel [20:46] samBiotic has joined the channel [20:46] brownies has joined the channel [20:47] AAA_awright has joined the channel [20:47] joekarma has joined the channel [20:47] al3xnull has joined the channel [20:48] Aria has joined the channel [20:48] jelveh has joined the channel [20:50] charleyd has joined the channel [20:50] ph^ has joined the channel [20:53] saikat has joined the channel [20:55] Nexxy has joined the channel [20:56] hij1nx has joined the channel [20:57] mange has joined the channel [20:59] gde33 has joined the channel [21:01] level09_ has joined the channel [21:08] steffan has joined the channel [21:08] flippyhead has joined the channel [21:10] Nuck has joined the channel [21:11] Charuru has joined the channel [21:13] nightshift has joined the channel [21:15] dgathright has joined the channel [21:20] flippyhead has joined the channel [21:22] blup has joined the channel [21:22] __sorin__ has joined the channel [21:23] chbrown has joined the channel [21:23] dall has joined the channel [21:23] dall: hello [21:24] Aria: 'allo [21:25] mandric has joined the channel [21:26] chbrown: Does anyone know why node carves out such a huge chunk of memory (11.6 GB) of VIRT memory? (as reported by htop) [21:28] tayy has joined the channel [21:28] smtlaissezfaire has joined the channel [21:29] bnoordhuis: chbrown: that's address space - not the same thing as memory usage [21:30] chbrown: address space? [21:30] Destos has joined the channel [21:31] jelveh has joined the channel [21:31] bnoordhuis: chbrown: how much do you know of how addressing works on x86 systems? [21:32] chbrown: not a whole lot. got a link for me? [21:32] bnoordhuis: the wikipedia lemma on virtual memory probably [21:32] bnoordhuis: but i'll try to explain it anyway [21:32] chbrown: okay, i'm listening [21:33] bnoordhuis: as an example, i can write a program for x64 unix that maps a 500 GB file into memory - the address space of my program [21:33] bnoordhuis: that doesn't mean the program is actually using 500 GB of your RAM [21:34] bnoordhuis: but it means that if i read the byte at address (500*1024*1024*1024) [21:34] bnoordhuis: i'll see the last byte of that 500 GB file [21:35] bnoordhuis: ehm, is this making it clearer? [21:35] chbrown: Yeah, that's clear. [21:36] chbrown: Why does Node think it's going to need 11 GB of space, though? [21:36] bnoordhuis: depends [21:36] bnoordhuis: are you using add-ons? [21:36] chbrown: Yeah. Mongodb is probably the most costly. [21:36] bnoordhuis: right [21:37] bnoordhuis: i think that if you run node without any extras, you'll notice that it uses maybe 1.5 GB of virtual memory [21:37] chbrown: Hmm. I started up another, older, app that just uses pg for its data backend and it reserves exactly the same VIRT footprint. [21:37] chbrown: Actually, likewise with node repl. [21:38] chbrown: Maybe it's just some fraction os my available disk space? [21:38] chbrown: *of [21:38] bnoordhuis: chbrown: no, that hasn't anything to do with it [21:39] bnoordhuis: to wit -> 1000 31537 5.2 0.3 639956 12580 pts/4 Sl+ 23:38 0:01 node [21:39] bnoordhuis: the 639956 is node's virtual memory footprint [21:40] chbrown: Right [21:40] bnoordhuis: and those 600 MB are nearly all v8 heap [21:41] bnoordhuis: chbrown: i suspect that one your add-ons mmaps() a big chunk of memory for i/o or whatever [21:41] overra has joined the channel [21:42] bnoordhuis: i shouldn't say 'memory'... address space [21:42] chbrown: Hmm. Okay, thanks for the insight. It's not giving me trouble -- just curious why there was such a large number in htop. [21:44] boogyman has joined the channel [21:48] dgathright has joined the channel [21:48] tokumine has joined the channel [21:51] Renegade001 has joined the channel [21:52] sreeix has left the channel [21:54] jelveh has joined the channel [22:00] CStumph has joined the channel [22:02] samBiotic: has anyone used the mdns module and experienced multiple serviceUp events? thanks. [22:04] fangel has joined the channel [22:04] lakkris has joined the channel [22:06] Wa has joined the channel [22:08] CStumph has joined the channel [22:08] td123 has joined the channel [22:09] MikhX has joined the channel [22:09] philtor has joined the channel [22:10] td123: hi, when I build nodejs 0.4.9, I do make test, and I get one error "release test-http-dns-fail" which is the exact same test failure as http://permalink.gmane.org/gmane.comp.lang.javascript.nodejs/21237 and https://github.com/LockerProject/Locker/wiki/OSX [22:10] td123: is this a known reported issue? [22:11] level09 has left the channel [22:12] td123: ah, looks like I'm experiencing https://github.com/joyent/node/issues/703 [22:12] dspree has joined the channel [22:13] ldopa has joined the channel [22:16] CStumph has joined the channel [22:17] dgathright has joined the channel [22:18] JKarsrud: Ho there [22:18] JKarsrud: Any of you used mu (mustache for node) with the express framework before? [22:19] new2node has joined the channel [22:19] MikhX has left the channel [22:22] idearain has joined the channel [22:22] halfhalo has joined the channel [22:23] leoncamel has joined the channel [22:24] CStumph has joined the channel [22:24] devuo has joined the channel [22:28] brainproxy: is npm_config_root environment variable depcrecated? [22:29] halfhalo has joined the channel [22:31] bogomips2__ has joined the channel [22:32] Mrfloyd has joined the channel [22:32] CStumph has joined the channel [22:33] seawise: what host to choose for node? [22:33] seawise: Joyent, Rackspace, Amazon EC2? [22:33] SubStack: localhost [22:34] onr: seawise: linode [22:35] seawise: do you use linode? [22:35] onr: yup [22:35] JKarsrud: hahaha, I lol'd SubStack:D [22:35] seawise: can you give me link to your host on it? I will measure it for bandwidth for different places around the globe? [22:36] onr: http://www.linode.com/speedtest/ [22:38] weezle has joined the channel [22:38] seawise: I have a project for Singaporean client, seems that Amazon is only option [22:38] seawise: do you know reliable cloud service with datacenter in Asia? [22:38] mikeal has joined the channel [22:38] mikeal: ok [22:38] mikeal: question [22:39] mikeal: socket.destroy(ret) [22:39] mikeal: does that emit an error with ret as the value? [22:39] onr: seawise: shinjiru.com [22:40] CStumph has joined the channel [22:41] mape_ has joined the channel [22:42] phiggins: so no mkdir_p in core? [22:43] phiggins: also not a function/anything to treat `pwd` as a relative root? fs.mkdir("./ugh") ? [22:43] Skola has joined the channel [22:43] phiggins: need to fs.mkdir(__dirname + "ugh") ? normlize() doesn't translate "./" to `pwd` [22:43] SubStack: phiggins: mkdirp doesn't belong in core [22:43] SubStack: npm install mkdirp [22:43] phiggins: why [22:44] SubStack: you can also path.resolve(process.cwd(), dir) [22:44] phiggins: makes me sad. /me writes more code. [22:45] SubStack: phiggins: no code to write, npm install mkdirp [22:45] phiggins: would have to install npm, then consider license of 3rd party shit for something I'll just write in 5-10 lines for me [22:45] phiggins: really? even php has mkdir_p [22:45] SubStack: if you are not using npm then you are doing it wrong™ [22:45] phiggins: ;) [22:45] SubStack: php does it wrong™ [22:46] phiggins: so does node, apparently. [22:46] mikeal: ryan_: you around? [22:46] SubStack: node does not include fluff [22:46] SubStack: node only includes enough to write a package manager [22:46] Mrfloyd has joined the channel [22:46] SubStack: because all that shit belongs in user space [22:46] phiggins: destined to be repeated over and over. [22:46] SubStack: phiggins: look at all the neglect the core libs in perl, ruby, and php see [22:47] SubStack: I personally think the http module should be in user space too [22:47] SubStack: node doesn't go far enough [22:48] phiggins: i just want to fs.writeFileMagically("/some/path/that/doesnt/exist.txt", data) [22:48] CoinOpeBoy has joined the channel [22:48] phiggins: and clearly I need 3rd party stuff to do this basic op [22:48] phiggins: hey mikeal [22:48] CStumph has joined the channel [22:49] SubStack: phiggins: npm install mkdirp [22:49] phiggins: npm not ok [22:49] SubStack: or you can write your own lib [22:49] SubStack: and publish it to npm [22:49] CoinOpeBoy has joined the channel [22:49] phiggins: i must be an early adopter. my npm is broken [22:49] SubStack: because that is where all the software lives [22:51] SubStack: not using npm is like willful negligence [22:51] td123 has left the channel [22:51] pigmej has joined the channel [22:51] CoinOpeBoy has joined the channel [22:51] xDROPx has joined the channel [22:51] JKarsrud: phiggins: sure you installed npm right? Works like a charm here [22:51] JKarsrud: :) [22:51] tuhoojabotti: :D [22:51] idearain has joined the channel [22:52] phiggins: said I needed to sudo to do it, perm denied for /usr/local/node [22:52] JKarsrud: wtf, that didn't happen here :/ [22:52] JKarsrud: I just curl'd it [22:52] tuhoojabotti: I installed it to home :) [22:52] tuhoojabotti: Node and npm [22:52] phiggins: good for all of you. [22:52] JKarsrud: phiggins :( [22:53] JKarsrud: I just wish I could get Mu to render my effin' template :P [22:53] paznicul has joined the channel [22:53] charleyd has joined the channel [22:54] hlindset has joined the channel [22:54] hlindset has joined the channel [22:54] Ramosa has joined the channel [22:56] mikeal: SubStack: hey [22:56] mikeal: i wanna bounce a few ideas off of you [22:56] mikeal: i'm refactoring the HTTP client [22:56] JKarsrud: gosh darn it, this sucked. I feel like a total noob now :D [22:56] CStumph has joined the channel [22:56] mikeal: is there ever a case where "error" is called on a socket but "end" is not? [22:57] tuhoojabotti: JKarsrud: Welcome to the club. [22:57] JKarsrud: tuhoojabotti: thank you :D [22:57] mikeal: or if close() or destroy() is called and "end" is not called? [22:57] JKarsrud: Well, at least I got it working now :D [22:57] JKarsrud: kindof [22:58] siculars has joined the channel [22:59] JKarsrud: anyone in here use express? [22:59] tuhoojabotti: No, I wrote my server myself. [23:00] JKarsrud: k [23:00] tuhoojabotti: I know I _should_ use express. [23:00] JKarsrud: it just seems like a nice starting point, with the routing and all… [23:01] iFire has joined the channel [23:01] FIQ has joined the channel [23:01] JKarsrud: except that Mu doesn't play nicely :/ [23:02] tuhoojabotti: What is My? [23:02] tuhoojabotti: Mu* [23:02] JKarsrud: node.js implementation of mustache.js [23:02] JKarsrud: or mustache really [23:02] JKarsrud: https://github.com/raycmorgan/Mu [23:02] tuhoojabotti: I use dustjs, though the development seems quiet [23:03] JKarsrud: I love mustache.js as a client side template engine, so I thought I'd use it in both places, with mustache.js on the client, and Mu on the server [23:04] arlolra has joined the channel [23:04] tuhoojabotti: So what's your problem exactly? [23:04] JKarsrud: but in express res.render doesn't work, keeps complaining that the view doesn't exist [23:05] CStumph has joined the channel [23:05] petrjanda has joined the channel [23:06] JKarsrud: not even that, it just throws a typeerror object is not a function [23:07] tuhoojabotti: You're doing something wrong. :) [23:07] Skola has joined the channel [23:07] JKarsrud: yeah, I figured as much [23:07] JKarsrud: http://pastie.org/2156268 [23:09] JKarsrud: the commented section in the get() works [23:09] boogyman has joined the channel [23:10] tuhoojabotti: Yeah I have no idea. [23:10] JKarsrud: now it complains in the console that object is not a function from Mu, if I add an empty options object in the the render function, view.js (express) complains about the same thing [23:10] squeese has joined the channel [23:11] tuhoojabotti: Well good luck with that, I'm off to bed. :P [23:11] JKarsrud: I was just hoping that I could use res.render instead of going through Mu like that, but whatever, it works fine either way =) [23:11] tuhoojabotti: ye [23:11] JKarsrud: thanks anyway, have a good night ;) [23:12] tuhoojabotti: Ye, you too. :P [23:13] saikat has joined the channel [23:14] jborst has joined the channel [23:14] JKarsrud: hmm, seems like I could use stache instead :) [23:14] JKarsrud: That might solve my problem [23:14] JKarsrud: https://github.com/fat/stache/ [23:16] smtlaissezfaire has joined the channel [23:21] smtlaissezfaire has joined the channel [23:27] markwubben has joined the channel [23:27] SubStack: mikeal disappeared >_< [23:29] bogomips2_ has joined the channel [23:33] Wa has joined the channel [23:34] carmony has joined the channel [23:38] vicapow has joined the channel [23:38] vicapow has left the channel [23:38] insin has joined the channel [23:45] Brandonn has joined the channel [23:46] samBiotic: has anyone used the mdns module and experienced multiple serviceUp events? thanks. [23:47] lmorchard has joined the channel [23:48] mrryanjohnston-e has joined the channel [23:51] bene has joined the channel [23:51] bene has left the channel [23:54] kuya_ has joined the channel [23:56] JKarsrud: oh snao! expresso looks hot. Anyone used it before? http://visionmedia.github.com/expresso/ [23:58] jesusabdullah: JKarsrud: Yeah, it's not bad [23:59] jesusabdullah: JKarsrud: It's one of the more popular test frameworks for node. Another is vows, and there is at least one more with significant adoption [23:59] jesusabdullah: Don't remember what it's called >_< [23:59] mraleph has joined the channel