[00:00] juandopazo has joined the channel [00:00] arlolra: let the games begin? [00:00] visnup: GOGOOGOGOGO [00:00] mikeal has joined the channel [00:00] slip has joined the channel [00:00] bradwright has joined the channel [00:00] bradwright has joined the channel [00:00] visnup: I'm really excited about our gogogo email [00:00] tjholowaychuk has joined the channel [00:00] adamfshh: what? [00:00] NodeBuddy: adamfshh: https://gist.github.com/1174738 [00:01] ryah: <@visnup> GOGOOGOGOGO [00:01] stonebra_: whooooooo [00:01] slaskis: weee! [00:01] NodeBuddy: ACTION is considering hiring a node.js genius to help him figure out why this node.js server is timing out when it gets a bunch of connections at once. [00:02] tonymilne: visnup: I'd shut my mail client already, but am glad i reopened it for that ;) [00:02] adamfshh: NodeBuddy but this is not a normal file upload? :)) I mean how do you check if the file is not too big? and it has the correct mime type? [00:02] adamfshh: this is too basic, you wouldn't use that in production :P [00:03] jaequery: btw, i found this, http://cutycapt.sourceforge.net/ [00:03] jaequery: this works great [00:03] technoweenie has joined the channel [00:03] NodeBuddy: adamfshh: It is normal [00:03] technoweenie has joined the channel [00:04] NodeBuddy: adamfshh: You check if the file is too big by keeping track of the bytes receive [00:04] NodeBuddy: *received [00:04] Kai`_ has joined the channel [00:04] rhdoenges has joined the channel [00:04] martinciu has joined the channel [00:04] NodeBuddy: adamfshh: And you can set client_max_body in nginx [00:04] jaequery: theres an easier way to do this [00:04] jaequery: just use flash uploader [00:04] adamfshh: and how to you check the file type? [00:04] jkj_ has joined the channel [00:04] jaequery: flash can identify size/type all before its even sent to the server [00:04] adamfshh: jaequery... [00:05] adamfshh: I don't think using flash is a wise idea [00:05] NodeBuddy: jaequery: So can the files object in JavaScript [00:05] NodeBuddy: lol [00:05] jaequery: if facebook/yahoo are doing it, it's good enough for you [00:05] adamfshh: they will switch [00:05] jaequery: use httpp as a failback [00:05] ajsie has joined the channel [00:05] NodeBuddy: LOL [00:06] NodeBuddy: ! [00:06] adamfshh: :D [00:06] CIA-69: node: 03Igor Zinkovsky 07master * r779c93c 10/ (README.md vcbuild.bat generate-projects.bat): merge vcbuild.bat and generate_projects.bat - http://git.io/UvzGbw [00:06] tanepiper has joined the channel [00:07] adamfshh: If I can avoid using plugin based solutions, especially when there are non-plugin solutions, and I don't know flash :P [00:07] adamfshh: If I can I avoid** [00:07] NodeBuddy: Maybe if I masturbate to Madonna it will help me think of where my code is breaking the socket. [00:07] slip has joined the channel [00:07] mikeal has joined the channel [00:07] tmedema has joined the channel [00:07] whoops has joined the channel [00:07] jaequery: its a bit tricky to install at first but your clients will love you for it [00:08] erickt has joined the channel [00:08] adamfshh: for flash?:D [00:08] stonebranch has joined the channel [00:08] jaequery: it has multiple simultaneous uploads, pause/resume, etc [00:08] _ralph has joined the channel [00:08] adamfshh: with node all of this is possible [00:08] adamfshh: and [00:08] adamfshh: what do you do with Mobile Devices? [00:08] adamfshh: you write it again in http/node [00:09] adamfshh: :D [00:09] jaequery: theres also html5 [00:09] jaequery: not sure if they have a good equivalent to flash tho [00:09] adamfshh: i'm sure it is [00:09] mcavage has left the channel [00:09] NodeBuddy: jaequery, adamfshh: Flash won't stop me from uploading a 30GB high rez picture of Madonna that's so big it fills up your server's disc. [00:10] tomh__ has joined the channel [00:10] daleharvey has joined the channel [00:10] jaequery: well, you can [00:10] adamfshh: I don't know flash, but maybe you are right NodeBuddy [00:10] adamfshh: but I'm sure that I can stop you with Node.js [00:10] NodeBuddy: No client-based solution will prevent that kind of abuse [00:10] NodeBuddy: adamfshh: Right [00:10] adamfshh: If something will tell me how to abort a fcking request!! XD [00:10] NodeBuddy: Server is king. [00:10] jaequery: well server-client side you can [00:11] adamfshh: someone* not something xDD [00:11] `3rdEden has joined the channel [00:11] Sorella_ has joined the channel [00:11] NodeBuddy: adamfshh: Maybe from request.addListener('data', you can [00:12] jaequery: adalgiso: are you looping through chunk data ? [00:12] schwab has joined the channel [00:12] ttpva has joined the channel [00:12] jmikola|w has joined the channel [00:12] vikstrous has joined the channel [00:12] adamfshh: NodeBuddy maybe... :) [00:12] NodeBuddy: adamfshh: Stop when the chunks get to be too much! :D [00:12] footyfish has joined the channel [00:12] jaequery: because it sounds like thats all you have to do, just close connection [00:12] Nomon has joined the channel [00:12] FuzzYspo0N: the keyword debugger, is there a way to resume from that from code side.. [00:13] newy has joined the channel [00:13] NodeBuddy: Reminds me of Madonna's song about dancing with transexuals. [00:13] DrMcKay: umm... how did we even get to Madonna? [00:14] Nuck: If you need a client-side solution, use HTML5 File APIs [00:14] Nuck: It's what I'm doing [00:14] jheusala: can we use cloud9ide for Node Knockout? [00:14] adamfshh: Nuck But that can be hacked [00:14] ryah: jheusala: sure [00:14] NodeBuddy: DrMcKay: I am so frustrated with my http.createServer time-out woes that I am considering a wank to Madonna to inspire me to come up with a solution. [00:14] ekryski1 has joined the channel [00:15] arthurdebert has joined the channel [00:15] trentm has joined the channel [00:15] Nuck: adamfshh: That's why you do extra checks on the server, but assume they will be hit far less [00:15] kenperkins: anyone doing html email with node [00:15] arthurdebert has joined the channel [00:15] jheusala: ryah: great! [00:15] matthijs has joined the channel [00:15] NodeBuddy: It's ridiculous. As soon as there's more than one request, it starts timing out :( [00:15] paveq: ryah: doesn't seem to work that well though, still "cloning in progress" after few minutes waiting :p [00:15] Nuck: kenperkins: I'm gonna be, using emailjs and an SMTP server [00:15] Nuck: Right now, I'm using Gmail [00:15] jheusala: actually I'm pretty sure we will do this project as open source anyway [00:15] kenperkins: ryah: interested in trying out clipborad.com: built on nodejs :P [00:15] kenperkins: clipboard.com even lulz [00:16] Nuck: clipborat.com? [00:16] kenperkins: Nuck: We used gmail for about 2 days until they suspended our account :) [00:16] kenperkins: setup exim4 quick, but now I want prettier emails [00:16] NodeBuddy: If anyone has advice on why response.end() would be returning false, I'd love to hear. :| [00:16] bradleymeck has joined the channel [00:16] Nuck: kenperkins: I'm jsut using gmail for testing :P [00:16] FuzzYspo0N: hey bradleymeck [00:16] bradleymeck: yo [00:17] Nuck: I'll be dropping in a proper SMTP server at laucnh [00:17] meso has joined the channel [00:17] Nuck: Possible some email app [00:17] MrNko has joined the channel [00:17] kenperkins: whatre u building [00:17] Nuck: like postmark, etc. [00:17] nrajlich has joined the channel [00:17] Nuck: kenperkins: Art site. [00:17] ryanj has joined the channel [00:17] Sorella_ has joined the channel [00:18] martinciu has joined the channel [00:18] bnoordhuis: NodeBuddy: false means that the response could not be written immediately and was buffered [00:18] Nuck: I wanna make an art community on the knowledge we have today about social networks. [00:18] bnoordhuis: we should document that [00:18] Nuck: As it stands, deviantART is primarily pre-social networking, and I aim to fix that. [00:18] NodeBuddy: bnoordhuis: I would be willing to help write the document for the response object :p [00:19] bnoordhuis: NodeBuddy: sure, just submit a pull request and sign the cla, i'll merge it [00:19] adamfshh: NodeBuddy you said [00:19] adamfshh: adamfshh: Maybe from request.addListener('data', you can [00:19] NodeBuddy: bnoordhuis: And every time response.end() returns false, the connection is timing out. If I get 15 incoming requests, about six of them will time out. [00:20] adamfshh: but how should I stop it? [00:20] adamfshh: :D [00:20] DrMcKay: is it a good practice to write, for example: db.exists() || db.create() ? [00:20] NodeBuddy: cool [00:20] DrMcKay: I mean, without if. [00:20] NodeBuddy: bnoordhuis: So what are some reasons why it can't write the response immediately? [00:20] roidrage has joined the channel [00:20] bnoordhuis: NodeBuddy: there's only one reason: the socket isn't writable [00:21] constantx_ has joined the channel [00:21] crash82 has joined the channel [00:21] bnoordhuis: NodeBuddy: to answer your follow-up question: it isn't writable because the kernel buffer is full for whatever reason [00:21] sriley has joined the channel [00:21] iaincarsberg has joined the channel [00:22] slip has joined the channel [00:22] constantx has joined the channel [00:22] NodeBuddy: bnoordhuis: Then I have a big problem then because this is making things time out. It starts happening when there's more than about three connections at the same time. [00:22] overra: nuck, what's your team name? [00:22] NodeBuddy: I'm running without nginx now and I have tried on different servers. [00:23] antono: yo, sirs! what is the best option for auto-restarting node when files changed? (i found only nodemon) [00:23] ncb000gt_ has joined the channel [00:23] Nuck: overra: Not on a team, this is a company I'm building. [00:23] Fabryz: I use nodemon too [00:23] bnoordhuis: NodeBuddy: time to whip out tcpdump and check where and why the connection hangs [00:23] Nuck: I'm too busy to go on NKO [00:23] NodeBuddy: Maybe I should write code that will keep retrying response.end() every 100ms [00:23] Nuck: I'm curious to watch though [00:23] overra: ah [00:23] overra: same [00:23] NodeBuddy: bnoordhuis: I guess this is a skill I'll need to learn :s [00:24] indutny has joined the channel [00:24] Nuck: Chances are I'll be participating next yeat [00:24] Nuck: year, even [00:24] bnoordhuis: NodeBuddy: yep, the road is long but worthwhile [00:25] chunhao_ has joined the channel [00:25] mjr_: NodeBuddy: I assure you that node can handle more than just a few connections without timing out. Most of our node processes have at least 1000 connections all the time. [00:25] beawesomeinstead has joined the channel [00:25] jj0hns0n has joined the channel [00:26] mrdoodles has joined the channel [00:26] NodeBuddy: What are some common reasons for timing out? [00:26] NodeBuddy: I did take the nginx proxy out of the loop [00:26] Nuck: You know what would be sweet? If somebody built a file upload middleware for Express that made it as simple as in PHP. [00:26] mjr_: NodeBuddy: it's really hard to say. Best to get tcpdump / wireshark out and see exactly what's happening. [00:27] vnguyen has joined the channel [00:27] mrdoodles: hey everyone, i've been using node the past month - i've asked once before, but I'm just wondering which modules are most key (like awesome mongo orms such as mongoose which is pretty amazing) to full blown web apps... [00:28] aheckmann has joined the channel [00:28] Nuck: mrdoodles: I use node-mongo-native, much prefer that. Also, Express is a *godsend* [00:28] daed: "as simple as in php" [00:28] daed: explain that. [00:28] HeikkiV_ has joined the channel [00:29] dshaw_ has joined the channel [00:29] smtlaissezfaire has joined the channel [00:29] Nuck: daed: PHP exposes uploads after already taking the multipart, shoving it into a temp file and exposing the temp file to you. At least, this is straight off my memory. [00:30] NodeBuddy: Wireshark sounds interesting :p [00:30] museic has joined the channel [00:30] Nuck: I want a MiddleWare that does similarly, shoves the file into /tmp/ (using something unique as a filename), and gives me the file descriptor or path [00:30] CrabDude has joined the channel [00:30] Nuck: So I cna just work with req.file [00:30] irae_: hi! is there a preferred way to connect to couchdb from node.js? or are you all sooting for mongodb? [00:31] Nuck: irae_: I personally use Mongo, I like a query language :P [00:31] mrdoodles: Nuck: yeah right now on an extranet I'm using nodemon, express, mongoose, nodemailer, and ejs [00:31] Juan77 has joined the channel [00:32] mrdoodles: basically it's node for a pretty serious gig and I'm competent in a lot of other languages and pretty good in node ... [00:32] Nuck: mrdoodles: I personally use emailjs, I prefer the functions on it, and mailer wasn't working for me. [00:32] mrdoodles: ahhh [00:32] NodeBuddy: mjr_: I am hoping like crazy this is something I've done wrong [00:32] mrdoodles: yeah well there is mailer and nodemailer [00:32] mrdoodles: mailer didn't work for me, but nodemailer is dope [00:33] Nuck: Whichever is the one Marak's article described, that failed for me. [00:33] mrdoodles: ahh [00:33] slip has joined the channel [00:33] mjr_: NodeBuddy: it's probably something simple that ends up being hard to debug. [00:34] Nuck: Seemed to be using a native function as a constructor [00:34] tuhoojabotti: Wohoo [00:34] tuhoojabotti: Got my awesome inheritance to work :D [00:34] JasonSmith has joined the channel [00:34] tuhoojabotti: Plane becomes Player! [00:34] jaequery: any cool live sites powered by node.js? [00:34] NodeBuddy: Okay, very interesting! As I got each response object from incoming requests, I push()ed them into a global array. I set a timeout at 30 seconds to loop through all the response objects and do .end() on them inside a try / catch. [00:34] tuhoojabotti: dev.tuhoojabotti.com? [00:35] Nuck: jaequery: Only major corporation I know that's fully Node-based is learnboost [00:35] tuhoojabotti: :u [00:35] NodeBuddy: That caught the ones that were pending before they timed out. [00:35] Nuck: well, not major [00:35] Nuck: But corporation [00:35] Nuck: I think [00:35] tuhoojabotti: tuhoojabotti corp. [00:35] mattly has joined the channel [00:35] NodeBuddy: Apparently my code is just not doing response.end somehow :s [00:35] mjr_: NodeBuddy: oh yeah, exceptions. They end up not working the way you want them to in an async callback world. [00:35] NodeBuddy: Or my code needs to try response.end more than once? [00:35] jaequery: thats pretty sick tuhoo [00:35] Nuck: tuhoojabotti: We at Unnamed Startup 493 are using it too. [00:35] tuhoojabotti: :E [00:36] jaequery: no no [00:36] jaequery: sick in a good way [00:36] jaequery: :) [00:36] jaequery: is your site open source [00:36] Nuck: tuhoojabotti: I alreasy read your name as "toohoojuhbooty" [00:36] jaequery: ? [00:37] jaequery: let me get my hands on that code [00:37] Nuck: tuhoojabotti: Also, I suggest changing so it isn't "TB" because that's a term for Tuberculosis. [00:37] darshanshankar has joined the channel [00:37] tuhoojabotti: Nuck: What ever floats your boat. [00:37] tuhoojabotti: TB = TeraByte [00:38] CrabDude has joined the channel [00:38] Nuck: tuhoojabotti: Tuberculosis. [00:38] tuhoojabotti: No. [00:38] darshanshankar_ has joined the channel [00:38] Nuck: ACTION didn't know diseases knew Node.js [00:39] Nuck: OH DEAR GOD EVENT-DRIVEN ASYNCHRONOUS INFECTIONS [00:39] tylerstalder has joined the channel [00:39] cpetzold has joined the channel [00:40] blissdev has joined the channel [00:40] jeremyselier has joined the channel [00:40] Hosh has joined the channel [00:40] bwinton has joined the channel [00:40] jmoyers has joined the channel [00:40] darshanshankar has joined the channel [00:40] eirikurn has joined the channel [00:40] bingomanatee_ has joined the channel [00:42] thorsteinsson has joined the channel [00:42] dscape has joined the channel [00:43] pwk0 has joined the channel [00:43] JKarsrud has joined the channel [00:43] slifty has joined the channel [00:43] slip has joined the channel [00:44] nrajlich: ryah: seems like 0.5.5 is breaking native modules... [00:44] DrMcKay has joined the channel [00:44] nrajlich: since `node-waf configure build` is now building into "build/Release", instead of "build/default" [00:45] niftylettuce has joined the channel [00:45] owenb has joined the channel [00:45] addisonj has joined the channel [00:45] dimroc has joined the channel [00:45] indexzero has joined the channel [00:46] sechrist: has anybody written a malicious worm using node yet? [00:46] dimroc: omw [00:46] sechrist: :D [00:47] kelsin has joined the channel [00:47] antono: what GCC required to build node 5.5? is support for 4.6 claimed? [00:47] jkj_: which ide would be nice? emacs? [00:47] justicefries_ has joined the channel [00:47] DrMcKay: jkj_: vim [00:47] mjr_: Marak: you guys really cranked out a lot of good docs on docs.nodejitsu.com. Nice work. [00:47] neorab has joined the channel [00:47] antono: emacs + evil-mode :) [00:47] Marak: mjr_: thanks ! we are gonna iterate like crazy now [00:47] Marak: mjr_: thats like the most bare MVP we could do, finished today [00:48] Marak: mjr_: "finished" :-) [00:48] mjr_: Yeah, it's cool [00:48] dannycoates has joined the channel [00:48] Marak: mjr_: and if anyone argues with the quality of an article, ill blame it on an intern and say "we accept pull requests" [00:48] Marak: :-D [00:48] DrMcKay: Marak: what mjr_ said (I'm not being a part of competitions, but these docs are really nice) [00:48] Demia1 has joined the channel [00:49] cha0s has joined the channel [00:49] cha0s has joined the channel [00:49] sechrist: it's really useful because I try to get people to use node and they stuck trying to replicate things they had done in php [00:49] sechrist: and get lost in the fray [00:49] colinsullivan has joined the channel [00:49] DrMcKay: Marak: I'm totally starting to explain bugs to my boss in this way :D [00:50] bnoordhuis: antono: gcc 4.6 works if you remove the -Werror directives from deps/v8/SConstruct [00:50] azeroth_ has joined the channel [00:50] colinsullivan: Has anyone implemented Facebook Authentication with Socketstream? [00:50] ckknight has joined the channel [00:51] DrMcKay: sechrist: I saw a guy trying to reimplement mysql_* in node :( [00:51] antono: bnoordhuis: thanks. i'll go with CXX=g++-4.5 for now :) [00:51] atmos has joined the channel [00:51] DrMcKay: also, has anyone tried to compile node with clang? [00:53] crash82 has joined the channel [00:53] DrMcKay: (or icc?) [00:53] nym has joined the channel [00:53] admc has joined the channel [00:56] a_suenami has joined the channel [00:56] garann_ has joined the channel [00:57] d0k has joined the channel [00:57] MrNko1 has joined the channel [00:58] misterm has joined the channel [00:59] adamfshh: Does anybody know how to save a buffer stream to a file? My problem is that I can't save images? If I use buffer.toString() then the image is not working [01:00] ckknight has joined the channel [01:00] gtramont1na has joined the channel [01:00] newy has joined the channel [01:00] jamescarr has joined the channel [01:01] Marak: adamfshh: maybe: http://docs.nodejitsu.com/articles/advanced/how-to-use-fs-create-write-stream [01:01] xtianw has joined the channel [01:02] DrMcKay: in couchdb, is it a good idea to use a user e-mail address as a document ID? [01:02] mjr_: it's fine, but beware the uri encoding. [01:02] mjr_: @ is not valid [01:03] devaholic: admin in the google group please take care of that spammer [01:03] ghostwriter_ has joined the channel [01:03] DrMcKay: mjr_: ah, sure, I would miss that, thanks [01:03] mjr_: DrMcKay: in JS you can use encodeURIComponent(email) and decodeURIComponent [01:03] trotter has joined the channel [01:03] arlolra has joined the channel [01:04] DrMcKay: mjr_: yeah, I was thinking about that [01:05] devongovett has joined the channel [01:05] jojohess has joined the channel [01:05] ryanfitz has joined the channel [01:07] blakmatrix has joined the channel [01:09] paveq: how should I import KO project to cloud9? [01:09] paveq: I tried "clone from url", but it doesn't seem to work [01:09] nrajlich: bnoordhuis: ping [01:10] paveq: I tried to fork it in github, but now its "private project", and requires $ [01:10] seebees: one ping only please nrajlich [01:11] MrNko has joined the channel [01:12] darshanshankar has joined the channel [01:14] dylang has joined the channel [01:14] bnoordhuis: TooTallNate: pong [01:15] TooTallNate: bnoordhuis: do you know about native modules building into "./build/Release" instead of "./build/default"? [01:15] TooTallNate: kinda breaks a lot of modules [01:15] robinduckett has joined the channel [01:15] smus has joined the channel [01:15] bnoordhuis: TooTallNate: yeah, that's ryah's work :) [01:15] bnoordhuis: it's part of the switch to gyp [01:15] TooTallNate: :( [01:16] dingomanatee has joined the channel [01:16] TooTallNate: and good solution? is there a way to reference the "build dir" in node-waf? [01:16] bnoordhuis: TooTallNate: in what way is it breaking add-ons? [01:17] ryah: TooTallNate: ./out/Release [01:17] TooTallNate: bnoordhuis: for example: https://github.com/TooTallNate/node-iTunes/blob/master/index.js#L2 [01:17] trepan has joined the channel [01:17] trepan has joined the channel [01:18] victorkane has joined the channel [01:18] TooTallNate: ryah: ya but I don't want to abandon support for older node versions that build into build/default... [01:18] victorkane: Hi everyone. I keep getting "Permission denied (publickey)." upon trying to make my first commit. How do I get the public key up to nko2 on github? [01:19] dgreene has joined the channel [01:19] robinduckett: victorkane: save it to your github profile [01:19] bnoordhuis: TooTallNate: you can check process.version [01:19] bnoordhuis: not a very nice hack of course [01:19] fernando has joined the channel [01:20] smus has joined the channel [01:20] bnoordhuis: TooTallNate: why are you importing from build/default anyway? shouldn't the .js and the .node live in the same directory? [01:21] TooTallNate: bnoordhuis: well I usually like to copy the resulting binary to the same dirs as my JS files, yes [01:21] TooTallNate: https://github.com/TooTallNate/node-time/blob/master/build.sh#L4 [01:21] captain_morgan has joined the channel [01:21] TooTallNate: so there's another example, of it breaking one of my modules [01:22] TooTallNate: I think there's a way for node-waf to copy the resulting binary from the build dir, that's probably the best way to do it [01:22] TooTallNate: need to find an example of that in a wscript [01:23] Drakonite has joined the channel [01:23] Guest35531: I'm just starting to learn node -- should I start with v0.4.11 or with 0.5.4? Will the code I develop with 0.4 need to change too much later when 0.5.x is released? [01:24] AvianFlu: Guest35531, use 0.4.11 [01:24] enhydra has joined the channel [01:24] Guest35531: kk ty [01:25] bingomanatee_ has joined the channel [01:25] paveq: any idea how to import KO project to cloud9? [01:25] bnoordhuis: TooTallNate: bld.install_files('${PREFIX}/', 'filename') [01:26] bnoordhuis: Guest35531: 0.4.11 is stable, 0.5.4 is unstable - nothing big should break if you upgrade later on [01:26] bnoordhuis: did i type 0.5.4? i meant tonight's very sexy 0.5.5 release [01:27] fmeyer has joined the channel [01:27] habblelabble has joined the channel [01:28] ckknight has joined the channel [01:28] Guest35531: ty, some projects I'm trying are not working with 0.5.4 because of things like require.paths or hard limits to npm like {"node":">= 0.4.1 < 0.5.0"} [01:31] kmiyashiro has joined the channel [01:31] jokil has joined the channel [01:33] v3ctR has joined the channel [01:33] PalmerEk_ has joined the channel [01:33] sridatta has joined the channel [01:33] smus has joined the channel [01:34] slifty has joined the channel [01:35] jerrysv has joined the channel [01:35] PalmerEk_ has left the channel [01:37] karlbright has joined the channel [01:37] Me1000 has joined the channel [01:37] darshanshankar has joined the channel [01:37] progme has joined the channel [01:37] Guest35531 has left the channel [01:37] DTrejo has joined the channel [01:38] ckknight has joined the channel [01:39] facorreia has joined the channel [01:39] heavysixer has joined the channel [01:40] PalmerEk has joined the channel [01:41] joaomilho has joined the channel [01:41] joaomilho: hi guys [01:41] joaomilho: two of our team members do no have access to the github repo [01:41] joaomilho: what can we do? [01:42] slip has joined the channel [01:42] eazyigz has joined the channel [01:42] mykul|Home has joined the channel [01:44] _dc has joined the channel [01:44] MrNko has joined the channel [01:45] joaomilho has joined the channel [01:45] ParadoxQuine has joined the channel [01:46] joaomilho: visnup: our team have two users without github access [01:46] joaomilho: visnup: team 5 at engage [01:46] jackbean has joined the channel [01:46] JakeyChan has joined the channel [01:46] joaomilho: lquixada: from br? [01:46] sivy has joined the channel [01:46] micheil has joined the channel [01:46] cying has joined the channel [01:47] visnup: joaomilho: checking [01:47] slip has joined the channel [01:47] hakunin has joined the channel [01:48] secoif has joined the channel [01:48] visnup: joaomilho: done [01:48] cconstantine: I'm using express... how do I get the GET parameters? [01:48] rurufufuss has joined the channel [01:48] JojoBoss has joined the channel [01:49] zomgbie has joined the channel [01:50] cconstantine: nm [01:50] joaomilho: danke!!!!!!! [01:52] TooTallNate: ryah: is there a way to get the build type in waf? (Release, debug, default) [01:54] a_suenami has joined the channel [01:54] ryanj has joined the channel [01:54] slip has joined the channel [01:54] JoshC1 has joined the channel [01:55] NodeBuddy: Is it safe to rely on response.write() to just work? [01:56] NodeBuddy: It is returning a lot when my app is getting a lot of connections and it's making me want to try :'( [01:56] vidi has joined the channel [01:56] NodeBuddy: *cry [01:56] indexzero: Hurricane party NYC in full effect: http://yfrog.com/merdlj [01:56] karlbright: it is returning a lot? a lot of of what? [01:58] __sorin__ has joined the channel [01:58] nickaugust: indexzero: nice :) [01:58] nickaugust: so many macbooks. is there no thinkpad fans left? [01:59] pizthewiz: hope y'all brought your bikes, the subway closes at noon [01:59] fmeyer has joined the channel [02:00] jamesarosen has joined the channel [02:00] nickaugust: no cots at nodejitsu? ;) [02:00] skm has joined the channel [02:00] wookiehang0ver has joined the channel [02:01] mnutt: there are couches you could push together [02:01] ajpiaNOU has joined the channel [02:01] AD7six has joined the channel [02:01] CarterL has joined the channel [02:02] sreeix has joined the channel [02:03] firebus has joined the channel [02:04] jerrysv: indexzero: awesome. but 48 hours in a tie? [02:04] firebus: any good docs on setting up configurations for NODE_ENV? are there a set of default configs for test/dev/stage/prod? [02:05] NodeBuddy: Is it safe to rely on response.write() to just work? [02:05] NodeBuddy: It is returning false a lot when my app is getting a lot of connections and it's making me want to try :'( [02:05] springmeyer has joined the channel [02:05] vertis has joined the channel [02:05] NodeBuddy: Which means it doesn't work :( [02:06] devaholic: nodebuddy you dont have to repeat yourself brah [02:06] _bat has joined the channel [02:06] NodeBuddy: devaholic: Sorry, I thought people lost the context and I wanted to correct myself [02:07] skm has joined the channel [02:07] rickharrison has joined the channel [02:08] arthurdebert has joined the channel [02:08] v3ctR has joined the channel [02:08] slip has joined the channel [02:10] NodeBuddy: To clarify: I am asking if good node.js apps check if response.write() failed and then retry it. [02:10] ingenthr has joined the channel [02:11] NodeBuddy: i.e., the kernel buffer is full because there's lots of HTTP connections going on and response.write() can't write immediately and needs to be deferred. [02:11] industrial: NodeBuddy: whats a lot of connections? [02:12] NodeBuddy: industrial: It is happening 14 [02:12] NodeBuddy: *at 15 connections [02:12] industrial: 15 o_O [02:12] raidfive has joined the channel [02:12] NodeBuddy: industrial: I am getting false from response.write() [02:12] industrial: nodejs is supposed to pull 800+/sec requests [02:12] NodeBuddy: industrial: Right, but it looks like the kernel buffer is filling up [02:12] industrial: (I dont know the answer / can help you, but i thought other people might want the info( [02:12] slifty has joined the channel [02:12] thinkt4nk_ has joined the channel [02:13] NodeBuddy: I am trying to figure out if I should be checking for the kernel buffer being full. [02:13] sharkbird has joined the channel [02:13] devaholic: nodebuddy, its probably a problem somewhere else [02:13] thinkt4nk_ has joined the channel [02:14] NodeBuddy: devaholic: It's only returning false when it gets more than four connections at the same time [02:14] NodeBuddy: *requests [02:14] mrdoodles has joined the channel [02:14] jmoyers has joined the channel [02:14] aguynamedben has joined the channel [02:14] devaholic: that doesnt sound normal [02:14] NodeBuddy: Then on like on 15 requests, response.write() will fail on four of them. [02:15] NodeBuddy: Maybe I need to .drain() [02:16] newy has joined the channel [02:16] sorensen: sup [02:16] sorensen: devaholic [02:17] sorensen: gl to everyone doing NKO [02:17] dylang has joined the channel [02:18] slip_ has joined the channel [02:19] ksheurs has joined the channel [02:19] seivan has joined the channel [02:21] __tomb has joined the channel [02:22] jetienne_ has joined the channel [02:23] ksheurs_ has joined the channel [02:24] slip has joined the channel [02:25] seebees: @NodeBuddy https://github.com/joyent/node/pull/1547 [02:25] industrial: From me aswell, gl guys (and gals!) on the knockout [02:25] seebees: I agree it should wait for .drain() [02:25] industrial: open you knock out some kick ass eatyourowndogfood apps :P [02:26] ryanfitz has joined the channel [02:26] industrial: hope* [02:27] igl has joined the channel [02:27] CrabDude has joined the channel [02:27] Croms has joined the channel [02:27] firebus has joined the channel [02:28] jamesarosen has joined the channel [02:31] jamesarosen: If anybody would like a Zendesk help desk for their NKO project, please let me know. We have a new program to offer a free year to startups, and NKO projects would certainly qualify. [02:31] shipit has joined the channel [02:32] smus has joined the channel [02:32] neilk_ has joined the channel [02:32] newy has joined the channel [02:36] dexter_e has joined the channel [02:36] v3ctR has joined the channel [02:39] galaxywatcher has joined the channel [02:39] MrNko has joined the channel [02:39] nevir has joined the channel [02:42] nevir: Is there a more reasonable way to get the __dirname of the file that's calling your function than parsing the current stack? [02:43] seivan has joined the channel [02:43] Marak: nevir: yes [02:43] Marak: nevir: look at the path modules [02:44] tk has joined the channel [02:44] Marak: nevir: path.dirname(file) i think [02:44] TheCoreh has joined the channel [02:44] Marak: nevir: try this: http://docs.nodejitsu.com/articles/basic/file-system/how-to-use-the-path-module [02:44] TheCoreh has left the channel [02:45] nevir: Marak: I don't have access to the path of the file (and I don't want the caller to have to pass it on every invocation) [02:45] Marak: nevir: use __filename ? [02:46] kmiyashiro has joined the channel [02:46] Marak: nevir: isnt that the path? [02:46] Marak: __filename - The __filename keyword contains the path of the currently executing file. Note that this is not defined while running the Node REPL. [02:46] newy has joined the channel [02:46] Marak: from http://docs.nodejitsu.com/articles/basic/getting-started/globals-in-node-js [02:46] Marak: :-D [02:46] nevir: I don't think that's safe - I'll experiment though [02:47] Marak: nevir: you shouldnt need anything else but __dirname, __filename and path module. if you think you do, you are doing it wrong [02:47] nevir: If you're running in sandboxed mode, it would pick up the filename of the file that defines my function [02:47] nevir: Not the file that's calling me [02:47] nevir: and I would assume it's that way for regular scripts too - but verifying that now [02:47] Marak: if thats the case you should prob pass in a ref [02:48] avalanche123 has joined the channel [02:48] Marak: nevir: if you are in a sandbox, then you need to give yourself the right context [02:48] nevir: I don't own the context - this is just a utility function that I want to expose [02:48] Nathan_ has joined the channel [02:48] tk has joined the channel [02:49] nevir: Hm [02:51] nevir: Yeah, even in non-sandboxed mode, the utility function is picking up __filename from its module's closure, and not doing something special with the global context: https://gist.github.com/1174898 [02:52] jmoyers: there's no reasonable way to do that [02:52] jmoyers: imo [02:52] jmoyers: you pass the filename, done [02:52] brianseeders has joined the channel [02:52] jmoyers: thats good design [02:52] jmoyers: implicit callee path and using that in program logic is bad practice imo [02:52] nevir: Then we should all stop using require() [02:52] jmoyers: the two are… not linked [02:52] jmoyers: at all [02:53] dexter_e has joined the channel [02:53] nevir: Sure they are - it's just that require mucks around with the context of the currently executing script to provide that behavior [02:53] nevir: (and, I'm trying to write a utility similar to require - I'd argue that convention wins out in this case) [02:55] eazyigz has joined the channel [02:55] firebus has joined the channel [02:55] CIA-69: node: 03Peter Bright 07master * r186364e 10/ deps/uv/src/eio/eio.c : [02:55] CIA-69: node: Don't load-time link against CreateSymbolicLink, it doesn't exist on Windows Server 2003. [02:55] CIA-69: node: Fixes #1592. - http://git.io/Sq2RTQ [02:55] k1ttty has joined the channel [02:56] darnold: gdi my NK teammates are not doing anything tonight [02:56] firebus: what does the --save paramter do to npm install? [02:57] tk has joined the channel [02:57] nevir: I think it modifies your package.json w/ the packages that were installed [02:57] nevir: (as dependencies) [02:57] nevir: https://github.com/isaacs/npm/blob/master/lib/install.js#L220 [02:58] abjorn: Ugh. I have a authentication connect middleware that for some reason will work in express when used as route-specific middleware, but not for a global app middleware. For whatever reason when it's run the session middleware hasn't retrieved the session yet unless I use it as route-specific middleware. [02:58] firebus: nevir: thank you! [02:59] nevir: yup :) [03:00] CarterL: darnold: that sucks [03:00] dominictarr has joined the channel [03:00] darnold: yeah we are kinda 50% to an idea too so I can't even get started [03:01] darnold: oh well! [03:01] Aphelion has joined the channel [03:01] slip has joined the channel [03:02] jamescarr has joined the channel [03:03] CStumph has joined the channel [03:04] ksheurs has joined the channel [03:04] abjorn: anyone have any idea? :\ [03:07] jamescarr: heh [03:07] achiu has joined the channel [03:08] juyeongpark has joined the channel [03:09] isaacs has joined the channel [03:09] isaacs: nevir: yes, that is what --save does [03:09] jamescarr: that node-express-boilerplate [03:09] jamescarr: is HEAVY [03:10] CrabDude has joined the channel [03:10] edude03 has joined the channel [03:11] jackbean has joined the channel [03:11] sivy has joined the channel [03:13] andrewfff has joined the channel [03:13] trentm has joined the channel [03:14] boltR has joined the channel [03:14] sharkbird has joined the channel [03:14] dannycoates has joined the channel [03:15] slip has joined the channel [03:21] figital has joined the channel [03:21] slifty has joined the channel [03:22] newy has joined the channel [03:23] seivan: Node knockout blog is down [03:24] chjj: all is lost [03:24] zeade has joined the channel [03:24] abjorn: ACTION slits his wrists [03:25] ParadoxQuine has joined the channel [03:25] ircretary has joined the channel [03:25] darshanshankar_ has joined the channel [03:27] sridatta_ has joined the channel [03:28] jokil has joined the channel [03:28] devongovett has joined the channel [03:29] arlolra has joined the channel [03:30] Croms has joined the channel [03:31] ekryski has joined the channel [03:31] AvianFlu has joined the channel [03:31] ekryski has left the channel [03:31] slip has joined the channel [03:31] ceej has joined the channel [03:32] seivan has joined the channel [03:32] CarterL has left the channel [03:32] fayce has joined the channel [03:32] juyeongpark has joined the channel [03:33] sivy has joined the channel [03:33] juyeongpark has joined the channel [03:33] DTrejo has joined the channel [03:34] TheCoreh has joined the channel [03:35] TheCoreh: hey, just wondering… is it normal for the flash socket transport of socket.io to fail when the server is running at localhost? [03:36] zinkem has joined the channel [03:36] `3rdEden: TheCoreh no it's not normal [03:36] TheCoreh: I disabled all transports other than flash, and it won't connect [03:37] `3rdEden: TheCoreh try increasing the connect timeout on the client side [03:37] `3rdEden: as it needs some time to initialize [03:37] Aphelion has joined the channel [03:37] `3rdEden: also make sure that your browser supports flashsockets [03:37] `3rdEden: if it has native websockets, the flashsocket will not work [03:37] `3rdEden: it also requires flash 10+ [03:38] chovy: what other json streams are out there besides twitter? [03:38] eee_c has joined the channel [03:39] __sorin__ has joined the channel [03:40] vertis1 has joined the channel [03:40] TheCoreh: `3rdEden: hmmm I can't find the docs for the client side configuration [03:41] necrodearia has joined the channel [03:41] Coderah has joined the channel [03:43] `3rdEden: TheCoreh that is correct, as there isn't that much :p [03:43] jxck has joined the channel [03:44] `3rdEden: io.connect(server, {'options': here}); and it's https://github.com/LearnBoost/socket.io-client/blob/master/lib/socket.js#L29 that option [03:44] `3rdEden: so io.connect(server, {'connect timeout': 25000}); for a 25 sec connect timout [03:44] __sorin__ has joined the channel [03:44] v3ctR has joined the channel [03:46] TheCoreh: thanks [03:46] TheCoreh: I'm trying this [03:47] dimroc_ has joined the channel [03:47] fangel has joined the channel [03:47] dimroc__ has joined the channel [03:49] v3ctR has joined the channel [03:50] alts has joined the channel [03:51] slip has joined the channel [03:52] jackbean has joined the channel [03:53] firebus has joined the channel [03:53] firebus: how does socket.io serve /socket.io/socket.io.js when i have no route set up for that? [03:53] firebus: and there's no such file? [03:53] miels has joined the channel [03:53] `3rdEden: firebus it inspects the req.url [03:53] miels has left the channel [03:54] `3rdEden: and handles it for you [03:54] miels has joined the channel [03:54] _dc has joined the channel [03:54] vertis1 has joined the channel [03:54] miels: man every time I go to #nodejs [03:54] firebus: `3rdEden creepy [03:54] jerrysv: `3rdEden: aren't you supposed to be competing right now? [03:54] `3rdEden: jerrysv :$ kinda [03:54] `3rdEden: firebus creepy or handy [03:54] jerrysv: handy [03:55] jerrysv: `3rdEden: and you're a team of one? [03:55] `3rdEden: jerrysv i'm soloing [03:55] Nuck: God I love Joyent no.de [03:55] jerrysv: get busy! sheesh! :) [03:55] Nuck: "Create an instrumentation predicated by this machine." [03:55] chamb has joined the channel [03:55] Nuck: I don't even know what that means. [03:55] Nuck: lol [03:55] Nuck: But it sure sounds like a lot of big words strung together [03:56] `3rdEden: jerrysv =p [03:57] eazyigz: I am getting an error with node-mongodb-native: "error in collection_info.find toArray: too much data for sort() with no index" [03:57] jamescarr: damn [03:57] eazyigz: But it has an index! It is _id [03:58] vertis2 has joined the channel [03:58] TheCoreh: eazyigz: But are you sorting by a field, right? [03:58] TheCoreh: *you are [03:58] eazyigz: TheCoreh: by _id [03:58] jtsnow has joined the channel [03:58] TheCoreh: oh. [03:58] TheCoreh: perhaps it indexes _id differently? [03:59] eazyigz: I posted a question on the google group, but haven't got an adequeate reply yet. [03:59] slip has joined the channel [03:59] eazyigz: TheCoreh: how differently? _id is very convenient because it holds the timestamp [03:59] eazyigz: so when I sort by it, it sorts chronologically - which is what i want [03:59] TheCoreh: oh [03:59] eazyigz: how else can I sort my collection chronologically? [03:59] sh1mmer has joined the channel [03:59] TheCoreh: didn't know that [04:00] TheCoreh: I thought UUIDs were random [04:00] eazyigz: TheCoreh: sure, a part of _id is random, but a part of it has a unix timestamp [04:00] TheCoreh: oh. [04:00] `3rdEden: eazyigz it's not only the timestamp.. [04:00] kuebk has joined the channel [04:01] `3rdEden: if the pid of you application changes your sorting could go wrong [04:01] eazyigz: `3rdEden: by 'pid' you mean process id? How is that tied in with Mondo _id field? [04:01] eazyigz: Mongo... [04:02] `3rdEden: eazyigz the object id is constructed out of a few things.. Hostname, porcess id (pid), timestamp, and a increasing number [04:03] `3rdEden: the increasing number + pid are changed each time you start up your server, it's not a consistent value [04:03] eazyigz: I use this to get the timestamp: cursor[0]._id.generationTime [04:03] eazyigz: and so far it has been accurate [04:03] miels: If I have node installed on ubuntu, where does it log by default? How can I configure where it logs? I'm trying to install monit (https://github.com/nicokaiser/node-monit) [04:03] jamescarr: heh... that assetmanager stuff doesnt seem to work right [04:03] eazyigz: it is the only way I know of sorting chronologically, other than manually inserting unix timestamps as properties in my collection [04:03] jamescarr: it's not picking up my changes [04:04] eazyigz: miels: are you using a logging utility with node? Or just console.log? [04:04] eazyigz: and how are you running node: from command line or from a shell script? [04:06] slip has joined the channel [04:06] miels: eazyigz: just console.log… should I get a logging utility or does this have something to do with making it a service? [04:07] v3ctR has joined the channel [04:07] nickaugust: man i'm tired. what time is it GMT? :P [04:07] eazyigz: have you checked /var/spool/mail/root? On my system it logs there when I have node running as a cron entry... [04:08] amigojapan has joined the channel [04:08] miels: eazyigz: cat /var/spool/mail/root [04:08] miels: cat: /var/spool/mail/root: No such file or directory [04:08] isaacs: ircretary: what time is it? [04:08] ircretary: isaacs: It's 2011-08-27T04:08:51.797Z by my watch, sir. [04:08] habblelabble: 2011-08-27 = 1976 [04:08] isaacs: nickaugust: ^ [04:09] nickaugust: :) [04:09] chamb has joined the channel [04:09] Destos has joined the channel [04:09] MrNko has joined the channel [04:10] eazyigz: miels: locate mail [04:11] _bat has joined the channel [04:11] miels: eazyigz: don't have it.. [04:11] __tomb has joined the channel [04:11] miels: eazyigz: mail that is [04:11] eazyigz: you ran 'locate mail'. And nothing was found? [04:11] eazyigz: and you are on Ubuntu? [04:11] __tomb_ has joined the channel [04:11] miels: eazyigz: yea [04:11] slip has joined the channel [04:12] nevir has joined the channel [04:12] miels: eazyigz: it's okay, thanks. [04:13] eazyigz: miels: sorry, i'm not too familiar with monit yet [04:14] nickaugust: so should I use semicolons or not? i feel like such a prude when i see somones code who almost never uses them [04:14] AvianFlu_ has joined the channel [04:16] jerrysv: nickaugust: i don't feel good unless i can save and jshint comes back clean [04:16] nevir: They're the convention - but the spec/v8 does a good enough job that you really don't have to use them [04:16] nevir: http://mislav.uniqpath.com/2010/05/semicolons/ [04:16] habblelabble: 2010/05 = 402 [04:17] kmiyashiro has joined the channel [04:17] nickaugust: jerrysv: oh gawd you and crockford :P [04:18] skm has joined the channel [04:18] jerrysv: nickaugust: ha, some habits go back decades :) [04:18] plusbryan has joined the channel [04:19] luke`_ has joined the channel [04:19] nickaugust: nevir: thanks for the link [04:19] danielleswank has left the channel [04:20] Nuck: I wish Joyent would open-source their post-recieve hook :'( [04:21] tylerstalder has joined the channel [04:21] NetRoY has joined the channel [04:22] abiii has joined the channel [04:22] pquerna: https://svn.apache.org/repos/infra/infrastructure/trunk/projects/ckl/webapp/ajaxterm.py [04:23] mike5w3c has joined the channel [04:24] liar has joined the channel [04:25] towski has joined the channel [04:25] pquerna: abiii: http://antony.lesuisse.org/software/ajaxterm/ [04:25] juyeongpark has joined the channel [04:25] pquerna: https://github.com/antonylesuisse/qweb [04:26] AvianFlu: I'm pretty sure that I just won NKO: http://turtlerocket.nodejitsu.com [04:27] slip has joined the channel [04:28] sb1752 has joined the channel [04:28] nickaugust: AvianFlu: got my vote :) [04:28] micheil: @ryah are you guys joining london for breakfast? [04:28] abraxas has joined the channel [04:28] jj0hns0n has joined the channel [04:28] micheil: oh, wait, you're not at your laptop. I can see that. [04:29] Nuck: AvianFlu: WIN [04:29] slifty has joined the channel [04:30] robinduckett has joined the channel [04:33] jchris has joined the channel [04:34] jacobolus has joined the channel [04:35] slifty has joined the channel [04:37] Nuck: There are two things I would kill for in Node.js: (1) Express middleware that makes file uploads as simple as in PHP (2) gitolite post-recieve hooks for a daemonized node instance [04:37] eee_c has joined the channel [04:37] Nuck: If anyone builds those, I will buy them a beer someday. [04:37] mldevbrissy has joined the channel [04:38] Nuck: And not a cheap beer, either. [04:38] tmzt_: Nuck: simple and insecure unfortunately [04:38] Nuck: They'll jsut hafta wait a few years for me to turn 21 ;) [04:38] Nuck: tmzt_: Howso? [04:39] tmzt_: HTTP PUT/POST file uploads do not require files be written on the server [04:39] tmzt_: and you can already use formidable, etc. to do it [04:39] tmzt_: then choose to right the file yourself [04:39] Nuck: formidable writes to the server [04:39] Nuck: You didn't know this? [04:39] tmzt_: not when I looked at it for a project [04:39] mrryanjohnston: WOW there are tons of teams for nko [04:40] tmzt_: either that or I supplied randomized names to it so that the rights were sequestered [04:40] Nuck: Ideally, the middleware would stream it to /tmp/ with a random filename, then set req.file to the fd [04:41] Nuck: And then I could get end and other events (hopefully) on that fd [04:42] dimroc has joined the channel [04:42] phoe6 has joined the channel [04:42] Nuck: And then provide a way to check the file type and size (if that's possible) and end the upload [04:42] slip_ has joined the channel [04:42] Nuck: I could event show you example code for how I'd like to be able to interface with it :P [04:42] mbthomas has joined the channel [04:43] Nuck: It's just that I don't understand form/multipart well at all [04:43] CIA-69: libuv: 03Igor Zinkovsky 07master * r3ea037c 10/ src/win/fs.c : windows: free fs arguments inside uv_fs_req_cleanup - http://git.io/_mF5DA [04:44] Nuck: But seriously, that kind of upload handler would further the node community so much [04:44] geetarista: anybody here using a game framework they'd recommend? especially one that supports socket.io? [04:44] Nuck: As it is, uploads in Node.js are practically impossible. [04:44] phoe6: What happens when you do - 'var fu = exports;' [04:45] phoe6: as in, what is special, ( I know it is special). [04:46] mrryanjohnston: phoe6: I believe that exports an empty var fu [04:46] mrryanjohnston: and if you require the file on another page, yo uhave access to the fu variable [04:47] phoe6: okay. access to the fu variable and along with its attributes? (which is being set further down in fu.js). [04:47] phoe6: thanks mrryanjohnston. [04:48] nevir: re file uploads in node - there's always not dealing with it at all: http://aws.amazon.com/articles/1434 [04:48] tedsuo has joined the channel [04:49] nickaugust: mrryanjohnston: 305 teams. yikes! [04:49] mrryanjohnston: phoe6: I wouldn't listen to me as I could have no clue what I'm talking about. I'm really tired right now :p [04:50] Nuck: nevir: I could also handle it via PHP, but I similarly would rather die than do that ;P [04:50] mrryanjohnston: nickaugust: there's going to be some cool projects to look at :) [04:50] phoe6: mrryanjohnston: okay. :) I shall dig a bit to get it right. [04:50] mrryanjohnston: phoe6: check out examples of the module.exports [04:50] mrryanjohnston: phoe6: https://github.com/ncb000gt/node-cron/blob/master/lib/cron.js [04:51] mrryanjohnston: this is a pretty cool one. lines 170/171 [04:51] habblelabble: 170/171 = 0.9941520467836257 [04:51] mrryanjohnston: welp [04:51] dominictarr has joined the channel [04:51] mrryanjohnston: phoe6: last message flood: http://jherdman.github.com/2010-04-05/understanding-nodejs-require.html [04:51] habblelabble: 2010-04-05 = 2001 [04:52] mrryanjohnston: and with that, good night. [04:53] smus has joined the channel [04:53] phoe6: thanks for the pointers. I had looked at the api docs, which said exports.area = function(..,..){}; [04:53] mldevbrissy_ has joined the channel [04:53] phoe6: but this one var something=exports; got me thinking as how this is different? [04:54] Nuck: hmmm [04:54] nevir: That just adds a reference to exports as alias in your global scope [04:54] mikeal has joined the channel [04:54] CIA-69: libuv: 03Igor Zinkovsky 07master * r3a374ca 10/ include/uv.h : add missing values to uv_fs_type - http://git.io/jHUVxQ [04:54] Nuck: Might just see about modding formidable's multipart parser and rolling it myself [04:54] nevir: global.something = exports is the same thing [04:54] phoe6: nevir: ok. [04:55] nevir: you might want to read over https://github.com/joyent/node/blob/master/lib/module.js#L258 to see the guts of how the module's global scope is constructed [04:55] nevir: (though some of that code only applies to sandboxed execution) [04:57] MrNko has joined the channel [04:58] mikeal has joined the channel [04:58] v3ctR has joined the channel [05:02] phoe6: is there a bot? [05:02] aaronblohowiak has joined the channel [05:02] aaronblohowiak: git add . ; git commit -m "`date`" ; git push origin master; ./deploy linode [05:03] shajith_ has joined the channel [05:03] MrNko has joined the channel [05:03] nickaugust: aaronblohowiak: what a cop out commit msg :) [05:03] cpetzold has joined the channel [05:04] aaronblohowiak: nickaugust: some1 needs to make a RESTful lorem ipsum [05:04] nickaugust: hehe [05:04] nickaugust: i dont know if that would win NKO [05:04] nevir: like http://loripsum.net/api ? [05:04] jheusala2 has joined the channel [05:05] jakehow_ has joined the channel [05:05] jakehow__ has joined the channel [05:05] jakehow has joined the channel [05:06] __tomb has joined the channel [05:06] eazyigz has joined the channel [05:06] bicranial has joined the channel [05:07] aaronblohowiak: i LOVE lazyweb [05:07] aaronblohowiak: ty [05:07] slip has joined the channel [05:08] lunks: Does anyone have any guess on why is express escaping my view HTML generated with Jade? [05:08] rhdoenges has joined the channel [05:08] amigojapan has joined the channel [05:08] rhdoenges: anyone else having trouble with the nodeko deploy script on linode? [05:09] nevir: lunks: You're using node!= js.expression syntax? [05:09] defeated has joined the channel [05:10] lunks: nevir: not sure what you mean :P [05:10] colinsullivan: Has anyone successfully deployed a SocketStream app on Joyent? [05:10] lunks: Could you ellaborate? [05:10] nevir: h2= "something" will be escaped - h2!= "something" is unescaped [05:10] indexzero has joined the channel [05:11] lunks: there is no html itself, just jade [05:11] tedsuo: https://github.com/joyent/node/blob/master/lib/http2.js [05:11] slip_ has joined the channel [05:11] lunks: the output generated by jade is being escaped [05:11] nevir: Right, that's jade syntax [05:11] phoe6: Error: Cannot find module 'Socket.IO-node' [05:11] phoe6: But I did npm install socket.io [05:11] lunks: layout however is not being escaped [05:11] phoe6: I faced problem with connect, but that got resolved by doing npm install connect. [05:12] cpetzold has joined the channel [05:12] jkj_: durr. btw. abt. socket.io... examples have connect('http://localhost') but that is obviously not right(?) [05:12] AvianFlu has joined the channel [05:12] lunks: nevir: I'm trying to use this as an inspiration for my app: https://github.com/datapimp/backbone-express-mongoose-socketio [05:13] jkj_: something[tm] should look the proper server address up? [05:13] micheil: jkj_: I could give you something far far better than socket.io (it'd mean you wouldn't need to worry about the managing of the socket server [05:13] `3rdEden: jkj_ it's parsed down [05:13] mikeal has joined the channel [05:13] cpetzold has joined the channel [05:13] jkj_: micheil: what is that? :) [05:13] `3rdEden: you can put anything you want in the io.connect() [05:13] boehm has joined the channel [05:13] micheil: jkj_: it would be Pusher.com's Pipe API [05:13] jkj_: `3rdEden: ok. [05:14] nevir: lunks: I guess I'm a bit confused - is the *entire* view template being escaped, or just portions of it [05:14] micheil: http://pusher-static-staging.heroku.com/docs/pipe [05:14] lunks: nevir: the entire view is being escaped [05:14] lunks: I converted the views from haml to jade in case you're wondering [05:15] jkj_: micheil: quite interesting [05:15] nevir: Ahh gotcha [05:15] `3rdEden: jkj_ micheil but that only works with websockets, so it's not cross platform compatible [05:15] nevir: That's probably at my limit then - I haven't dug very far into express at all [05:15] lunks: And layout was straightforward, but the view itself is *really* being parsed, like this http://pastie.org/2437331 [05:15] micheil: `3rdEden: well, depends what you really need [05:15] micheil: in the latest major browsers, websockets are natively supported. [05:15] smus has joined the channel [05:16] `3rdEden: Sure, but that is still a small amount of browsers [05:16] micheil: Firefox 6, Chrome, Safari, Opera [05:16] micheil: do you really want to be supporting IE6? [05:16] jkj_: in html5 javascript software i quess websockets are mostly there [05:16] `3rdEden: and if one of your judges uses IE, you are fucked ;) [05:16] nevir: lunks: https://github.com/visionmedia/express/tree/master/examples/jade might be helpful [05:16] micheil: (actually, pusher works in IE via the web-socket-js project [05:16] nevir: https://github.com/visionmedia/express/blob/master/examples/jade/app.js#L27 ? [05:17] juyeongpark has joined the channel [05:17] lunks: nevir: it is being generated, but escaped for some weird reason [05:17] lunks: If you look at the pastie, it looks like it should if it was unescaped :P [05:17] nevir: yeah, gotcha - it is evaluating the guts [05:17] nevir: Actually, what's your layout look like? [05:18] lunks: let me paste both [05:18] nevir: k [05:18] fmeyer has joined the channel [05:18] jtsnow has joined the channel [05:19] CrabDude: so… anyone know if there's a way in socket.io to get the url associated with the socket? [05:19] lunks: nevir: solved: body!=body :P [05:20] nevir: yeah, perfect! [05:20] bluejeansandrain has joined the channel [05:20] lunks: You were right from the beginning. Thanks, nevir! [05:20] nevir: lunks: welcome :P [05:20] bluejeansandrain: Hey, need a little input on the process exit event. I'm trying to save session data before the process exits, but nothing async works in the exit event [05:21] bluejeansandrain: is there something else I can look for to see that the process is about to exit while the event loop is still running? [05:21] alindeman has joined the channel [05:22] nevir: http://nodejs.org/docs/v0.4.11/api/process.html#signal_Events Might be able to use that stdin trick? [05:23] nevir: (aka, you trap SIGINT - do the save - and then exit)? [05:23] bluejeansandrain: except I don't want to stop the process from exiting normally [05:24] zilch_ has joined the channel [05:24] slip has joined the channel [05:24] nevir: Sure, but you wouldn't be - as long as you make sure to call process.exit() at some point after it [05:24] bluejeansandrain: by normally, I meant automatically :) [05:25] bluejeansandrain: I've written a fastcgi-ish type proxy for loading and running arbitrary script pages in their own process [05:25] zhenghao1 has joined the channel [05:25] zhenghao1: hi guys, i have a problem running etherpad-lite [05:25] nevir: Well, like you say, if the event loop is dead by that point - so you're stuck with the few async calls available to you (and file io is probably not ideal for your situation?) [05:26] bluejeansandrain: in php there's no such thing as async, so it's easy to detect when a process finished. In node, it exits when there's nothing listening to the event loop anymore [05:26] nevir: Dunno, it seems to me that trapping a signal and deferring it is a totally valid route to go [05:26] zhenghao1: i cloned it from github and ran the necessary installDeps.sh and run.sh [05:27] zhenghao1: When i try to create a "pad" and hit the ok button, it breaks [05:27] bluejeansandrain: hmm... I guess it's not too unreasonable to require the scripts call something when they're ready to exit [05:27] zhenghao1: The error I get is [05:27] zhenghao1: [ERROR] console - TypeError: object is not a function at Object.CALL_NON_FUNCTION (native) at new JS_Parse_Error (/Users/huang/local/node/etherpad-lite/node_modules/uglify-js/lib/parse-js.js:261:20) [05:28] nevir: bluejeansandrain: Oh! Now I get it a bit more - you could, perhaps, inject some wrapper around your scripts before you call them? [05:28] Nuck: I'm tearing Node-formidable apart to figure out how it ticks :P [05:28] defeated: anyone know if there's a way to get chrome beta to cooperate w/ socket.io (or vice versa)? Or am I just stuck telling people to use earlier chrome or another browser for NKO? ;) [05:28] nevir: which just sets up an event to save out state & set up a timeout [05:29] Nuck: I'm gonna make an express middleware that does file upload handling how *I* think it should be done. [05:29] Nuck: And then I'm gonna open-source it. [05:29] sivy has joined the channel [05:29] AvianFlu has joined the channel [05:30] bluejeansandrain: nevir: I am requiring them in a wrapper [05:30] `3rdEden: defeated there is patch for it in github master branch of socket.io-client [05:30] MrNko has joined the channel [05:30] bluejeansandrain: and I can set a max run timeout [05:30] defeated: `3rdEden: awesome, thanks! [05:30] bluejeansandrain: so that if the script doesn't call exit, then I can kill it at some point [05:30] bluejeansandrain: but that'll probably be 30 seconds to a minute [05:30] towski has joined the channel [05:31] sh1mmer: defeated: what's the problem with chrome beta? [05:31] defeated: sh1mmer: I believe they updated to the latest WebSockets spec draft [05:31] defeated: sh1mmer: which was incompat w/ socket.io [05:31] `3rdEden: yup [05:31] cying has joined the channel [05:31] sh1mmer: defeated: you could change the config to not use web sockets [05:32] sh1mmer: and use an alt strategy [05:32] `3rdEden: When I went on vacation i heard that rauchg already had new websocket parsers for it.. but it doesn't seem to be landed yet [05:32] sh1mmer: I dunno if you could get it to do that only for chrome beta though [05:32] sechrist: anybody in here know of a multiple-protocol IM client that's console based? I remember there being the finch purple client but it sucked if I remember correctly [05:32] defeated: sh1mmer: will try that too, but if this patch works, that should do it [05:32] sh1mmer: defeated: right [05:33] qwebirc738419 has joined the channel [05:33] eazyigz has joined the channel [05:35] Marak has joined the channel [05:36] MrNko has joined the channel [05:36] nickaugust: ACTION sleeps. setTimeout 8 hours. [05:36] avalanche123 has joined the channel [05:36] tmzt_: funny enought that actually works in node [05:36] tmzt_: :) [05:36] Nuck: ACTION cracks his knucles and starts reading the code of formidable's parser [05:36] paveq2 has joined the channel [05:37] tmzt_: it uses another library that might be easier to work with [05:37] zilch_ has joined the channel [05:38] w3dot0 has joined the channel [05:39] ksheurs has joined the channel [05:39] seebees has left the channel [05:39] w3dot0 has left the channel [05:39] Nuck: sweet fucking jesus this code is hideous D: [05:39] w3dot0 has joined the channel [05:39] slifty has joined the channel [05:40] cpetzold has joined the channel [05:40] Nuck: defining a series of consecutively-valued constants by setting a temporary variable and doing s++ for each one's value [05:40] Nuck: ACTION vomits [05:40] Nuck: `vinsup: I loled. [05:41] `vinsup: :) [05:41] paveq2 has joined the channel [05:42] Nuck: Can somebody tell me why the fuck somebody would do this? https://github.com/felixge/node-formidable/blob/master/lib/multipart_parser.js#L2 [05:42] Nuck: Seriously, that's a great way to cloud your meaning. [05:43] chjj: nuck: what? [05:43] cpetzold_ has joined the channel [05:43] chjj: nuck: its supposed to be like an enum [05:44] chjj: just think of it as an enum, it makes sense [05:44] Nuck: chjj: It just looks retarded :/ [05:44] Nuck: ACTION changes it to the actual numbers [05:44] chjj: i guess C is retarded then [05:44] Nuck: chjj: I hate C. [05:45] chjj: then you fail [05:45] Nuck: Never could get used to it. [05:45] datibbaW has joined the channel [05:46] sivy has joined the channel [05:46] qwebirc738419: Nuck: because you're not supposed to care about the values. that way he can add and remove flags without having to actually pick values [05:46] chjj: yeah, its easier to change around [05:47] datibbaW: is it possible to replace the current node process with another one? like how execl() in C works? [05:47] zilch_ has joined the channel [05:48] ceej has joined the channel [05:48] slip has joined the channel [05:49] cpetzold has joined the channel [05:49] Nuck: qwebirc738419, chjj: All it does is cloud the meaning of his code to where nobody but a pro can read it. [05:49] Emmanuel` has joined the channel [05:49] Nuck: And that is a Very Bad Thing™ [05:50] chjj: ...? how does it cloud meaning at all? [05:50] MUILTFN has joined the channel [05:50] chjj: its very straight forward unless you dont understand what the increment operator is [05:50] Nuck: chjj: It provides the appearance that something is going on there that you should be paying attention to when you really oughtn't. [05:51] martinciu has joined the channel [05:51] Nuck: Now that I look at all this code, it's written very C-like. [05:51] Nuck: Hundreds of variables declared and initialized at the top of every function to be used 100 lines lower. [05:52] chjj: so whats your preferred lower level language then, if not c? [05:52] qwebirc738419: Nuck, it's not that complex an obfuscation. When you posted the page it took me about 3 seconds to see it and then I was like, "Oh, that's slick, I may use that" [05:52] Nuck: Nothing, I don't do low-level. [05:53] datibbaW: asm =D [05:53] chjj: qwebirc738419: exactly [05:53] Nuck: qwebirc738419: Eh, that didn't bother me as much as him using *= later on [05:53] chjj: i dont see why nuck is so confused by it [05:53] Nuck: chjj: I understand it fine [05:53] chjj: you said it clouds mean, that must mean that there was some delay in fully comprehending it [05:53] chjj: meaning* [05:53] Nuck: But I know that anybody who isn't great at JS wouldn't. [05:53] datibbaW: just out of curiosity .. what are you guys discussing about ? [05:54] qwebirc738419: nothing really :) [05:54] nevir: https://github.com/felixge/node-formidable/blob/master/lib/multipart_parser.js [05:54] qwebirc738419: just debating good coding habits [05:54] nevir: and languages in general, I think - it's fun to listen to [05:54] chjj: nuck, if you can write a better streaming parser than felixge in js, ill be impressed [05:54] Nuck: chjj: I comprehended it but it took me a moment. [05:54] zomgbie has joined the channel [05:54] Nuck: chjj: I plan to modify the parser felixge wrote. [05:54] AvianFlu has joined the channel [05:54] chjj: well i assumed that much [05:54] Nuck: But first, I'm cleaning it up to a style that doesn't taste like C. [05:55] datibbaW: haha .. enums, so funni [05:55] Nuck: If somebody wants C, they should use C. [05:55] nevir: I think, that the point is to leverage the language you're writing in - and adhere to its style (and take advantage of it), rather than force another language's style on it [05:56] Nuck: nevir: Yes, that basically sums up my sentiments. [05:56] qwebirc738419: I agree, but I also agree initializing even in a language where it's not strictly required, is a good thing [05:57] Nuck: Initializing everything at the start of a function is a pointless thing. [05:57] Nuck: Hell, initializing just adds bloat. [05:57] Nuck: And bloat invariably makes simple code look complicated. [05:58] zilch_ has joined the channel [05:58] datibbaW: right ... [05:58] datibbaW: who needs declarations anyway [05:58] Nuck: I declare a variable when I define said variable [05:59] Nuck: And I define a variable when I need to define the aforementioned variable. [05:59] Nuck: No sooner and no later [05:59] nevir: Isn't the first page of this file effectively defining constants, not vars? [05:59] Nuck: nevir: Yes. [06:00] Nuck: And it's not very obvious at a glance what the constants do. I just renamed S to States for that exact reason. [06:00] slip has joined the channel [06:00] bluejeansandrain: ya, one letter variables-- [06:01] chjj: case S.PARSER_UNINITIALIZED: --- if you see that in a state machine, and still cant figure out what S is, theres something wrong [06:01] Nuck: He defined the index variable for a `for` loop at the top of a function [06:01] bluejeansandrain: the write function defines a bunch of vars, but they're pulling in local references to things attached to this. so that he doesn't have to type this. in front of everything [06:01] pickle_mcgee has joined the channel [06:01] bluejeansandrain: seems reasonable to me [06:01] Nuck: Then used it like 50 files up [06:01] chjj: its better performance-wise, nuck [06:02] chjj: he doesnt have to do a hash table lookup every time he references a var [06:02] nevir: that's a /performance/ concern? [06:02] chjj: that parser was written for performance [06:02] Nuck: chjj: I call bullshit, it's no less performant than for (var i = 0 [06:02] chjj: nevir: when youre parsing 2gig files, it *is* a performance concern [06:02] chjj: byte by byte [06:03] Nuck: Now, setting len to a variable, THAT is understandable [06:03] chjj: ive benchmarked it myself when writing my own multipart parser [06:03] Nuck: But that can ALSO be put in the for loop [06:03] chjj: what felix is doing there is smart [06:03] Nuck: In fact, I've seen these things done in 90% of Node's own code. [06:03] Nuck: chjj: Give me jsperf that proves me wrong :I [06:03] Nuck: Until then, I'm gonna say that it's bullshit. [06:03] chjj: do your own damn benchmarks [06:03] chjj: im not here to please you [06:04] chjj: lol i dont care [06:04] chjj: your code will just remain being terrible [06:04] chjj: shouldnt bug me [06:04] Nuck: I highly doubt it. [06:04] datibbaW: oh nice, he uses boyer-moore .. not bad :) [06:04] bluejeansandrain: he stores index on this, pulls the value into local at the top of the stack frame, then pushes it back out to this at the end of the stack frame nuck. That's good for several reasons. It avoids writing this. all over the place, and it means that if he exits the function early he hasn't change the parsers state which in this application is a neat feature [06:05] _dc has joined the channel [06:05] v3ctR has joined the channel [06:05] Nuck: blueadept: He doesn't store the index on this [06:05] Nuck: He stores it as a local variable [06:05] Nuck: hence the "var" [06:05] Nuck: It's comma-delimited var [06:05] bluejeansandrain: index = this.index; then at the bottom: this.index = index; [06:05] Nuck: I'm talking about the variable `i` [06:05] bartt has joined the channel [06:06] Nuck: The iteration on the for loop [06:06] Nuck: He defines it earlier than he has to [06:06] datibbaW: he doesn't do that everywhere [06:06] Nuck: And there is no performance gain in this case [06:06] chjj: so what if theres no perf gain? why cant he define it elsewhere? [06:06] datibbaW: there would be if he has to use 'i' again later [06:06] dexter_e has joined the channel [06:06] bluejeansandrain: you are absolutely right, he did not have to do that [06:07] bluejeansandrain: he's "terrible" [06:07] Nuck: chjj: Because it spreads the code out over multple places [06:07] chjj: so thats the tell-tale sign, now i know, if you put a null statement in a for loop, youre terrible [06:07] datibbaW: nuck which 'i' are you talking about? the one on line 72 ? [06:07] chjj: thank you nuck [06:07] slifty has joined the channel [06:07] Nuck: datibbaW: No, actually, there would be no gain. [06:07] zilch_ has joined the channel [06:08] karlbright has joined the channel [06:08] Nuck: It won't matter whether it's defined 50 operations or 1 operation before the loop [06:08] Nuck: No matter what, the loop still has to wait the same amount of time [06:09] Nuck: So by spreading it out, he just clouds meaning. [06:09] bluejeansandrain: he defined it early so he could use it in the mark function closure [06:09] nevir: Nuck: surprisingly, it is a large perf hit [06:09] nevir: http://jsperf.com/declaration-perf [06:09] karlbright: knockoutttt [06:09] bluejeansandrain: not technically necessary, but a good practice to have it defined before it's first seen top to bottom [06:10] Nuck: bluejeansandrain: Using it out of context of the modification of said variable is VERY bad practice. [06:10] nevir: well, large in the context of doing comparatively nothing in the loop [06:10] bluejeansandrain: I didn't parse that sentence [06:10] chjj: me neither [06:11] sivy has joined the channel [06:11] ecin has joined the channel [06:12] smus has joined the channel [06:12] nevir: Ah, it's a large hit in v8 - declaring the var in the loop is is marginally faster in Nitro [06:12] nevir: Strange [06:12] sylvinus has joined the channel [06:13] bluejeansandrain: might allocate it in a different way based on context? [06:13] slifty has joined the channel [06:13] SamuraiJack has joined the channel [06:17] MrNko has joined the channel [06:18] jamescarr has joined the channel [06:18] Nuck: nevir: You're doing it badly anyways :P [06:18] nevir: what, the bench? [06:18] AvianFlu has joined the channel [06:18] Nuck: the for loops, hold on, I'll fix it :P [06:18] nevir: kk, thanks :P [06:18] torsd has joined the channel [06:19] Nuck: var arr = Array(5000); will make a 5000-entry array, right? [06:19] nevir: The right way, to me, is to jump up a level of abstraction and do it all in coffee script [06:19] nevir: I have absolute faith in Jeremy Ashkenas to deal with the hard stuff for me :P [06:19] jamescarr: why do I keep getting these log entries in the boilerplate app [06:19] jamescarr: GET /reload-content/?_=1314425944297 Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 [06:19] Nuck: v8: Array(5000).length [06:19] v8bot_: Nuck: 5000 [06:19] datibbaW: coffeescript is niice [06:19] Nuck: k good [06:19] juyeongpark has joined the channel [06:19] torsd: it is [06:19] amigojapan_ has joined the channel [06:19] nevir: datibbaW: I can't stand regular JS any more [06:20] datibbaW: haha .. just started on it actually, but i have to work some small magic to make it work for our projects [06:20] brainproxy: I'm currently falling fast down the coffee rabbit hole :) [06:20] nevir: :( [06:20] slip has joined the channel [06:20] brainproxy: trying to figure out a Cakefile setup that meets my needs [06:20] jamescarr: that boilerplate I also wish I knew how mape supressed console.logs in his boilerplate express app [06:20] jamescarr: it's making debugging hard [06:20] brainproxy: so .. qunit or jasmine? [06:21] nevir: hold on a sec - what changed in that benchmark? Chrome 13 is equal perf for both, and chrome 15 is much slower? Hah [06:22] Nuck: http://jsperf.com/declaration-perf/2 [06:22] datibbaW: nevir: wrote a coffee remote compiler so that my dev machine can rewrite all .coffee urls to that server instead ;) didn't want to use the browser runtime [06:23] zilch_ has joined the channel [06:23] Nuck: And I'd be willing to wager part of the problem comes from how it handles everything through buffers instead of streams [06:23] nevir: Nuck: This is just to simulate a bit more work & GC overhead? [06:23] nevir: (err, not GC overhead I guess - these aren't getting released) [06:23] Nuck: nevir: Also the pre-defined length variable [06:23] openpercept has joined the channel [06:24] nevir: as opposed to a literal? o.O [06:24] torsd: anyone here need a ui guy for their open source project. i can help [06:24] Nuck: nevir: I went with an array to iterate over, since that's the more common case than iterating over a set number :P [06:25] nevir: All this is telling me is that copying each value of i into the array has now taken up a majority of the time - but it's still slower (and at this point, it's becoming negligibly slower that you probably don't have to worry about it in non-contrived examples) [06:25] jamescarr: here... we're working hard on the back end presentation builder [06:25] jamescarr: but here's a rough demo [06:25] jamescarr: http://comorichweb.no.de/demo#1 [06:25] jamescarr: :) [06:26] Nuck: nevir: Oh derp, I probably should've defined both arrays as initialization things >_> [06:26] torsd: jamescarr: u referring to me? [06:26] nevir: Lawl [06:26] jamescarr: torsd, no, I am just putting the url out there for people to try out [06:26] Nuck: Either way, it's negligably slower that it's not even a problem to worry about [06:27] nevir: Yeah, it seems that way [06:27] torsd: jamescarr: woah this is cool [06:27] nevir: On the coffeescript note, though, it does compile to pre-declare vars like that. I wonder if that's a perf or compiler consideration [06:27] Nuck: nevir: And it gets closer and closer the logner it goes, by the sounds of it [06:28] slip has joined the channel [06:28] nevir: jamescarr: My remote is timing out :( (#5) [06:28] Nuck: nevir: Who knows, it might be. [06:28] datibbaW: nevir: the hoisting is what js does naturally anyway [06:28] jamescarr: :( [06:28] Nuck: But I'd be willing to wager I could make this code better [06:28] Nuck: I just need an example of what I'm parsing first :P [06:29] AvianFlu has joined the channel [06:29] jamescarr: nevir, yeah, theres some issues [06:29] nevir: jamescarr: No, it's not timing out - I'm just getting confused by the loading bar! [06:29] paul0 has joined the channel [06:29] datibbaW: nuck that should be easy ;) just capture a multipart request and hack away ;) [06:29] __tomb has joined the channel [06:29] jackbean has joined the channel [06:30] jamescarr: nevir, boo... there's no reason for the remote to timeout [06:30] jamescarr: Im getting it too [06:30] qwebirc132671 has joined the channel [06:30] JumpMast3r has joined the channel [06:30] nevir: aww, curses! This is an excellent idea though :) [06:30] qwebirc132671: curses? already been done [06:30] datibbaW: and redone [06:30] nevir: >< [06:30] jamescarr: curses [06:31] paul0: http://pastebin.com/zPnKhQyG [06:31] paul0: did anyone had this problem? [06:31] jamescarr: damn it stopped working [06:31] Nuck: datibbaW: https://github.com/felixge/node-formidable/blob/master/test/fixture/multipart.js [06:31] Nuck: Problem solved :P [06:31] datibbaW: w00tz [06:32] jamescarr: hahahaha... how many node KO apps are busted node-express-boilerplate apps? [06:34] towski has joined the channel [06:36] jamescarr: does anyone know where this GET /reload-content/?_=1314426940082 stuff comes from?? [06:36] anoop has joined the channel [06:39] e6nian has joined the channel [06:40] v3ctR has joined the channel [06:40] mikeal has joined the channel [06:41] juyeongpark has joined the channel [06:41] mldevbrissy has joined the channel [06:42] Nexxy has joined the channel [06:42] Nexxy has joined the channel [06:42] e6nian: lol, Knockout [06:43] Epeli: indeed [06:43] dnyy has joined the channel [06:45] slip_ has joined the channel [06:48] Marak: poopin [06:49] aaronblohowiak: diarrhea? [06:49] ryah: Marak: gross [06:49] Orion- has joined the channel [06:49] Orion-: Hello [06:49] ryah: we dont need to know about that [06:49] SubStack: indeed [06:49] SubStack: for shame [06:50] nevir: welcome, Orion- :) [06:50] aaronblohowiak: webchat!! [06:51] FR6 has joined the channel [06:51] Orion-: Thanks nevir [06:53] rhdoenges has joined the channel [06:53] Orion-: yesterday I asked a question here but did not stay enough time to collect answers because my friends came and we all had a pizza with beers and stuff ... but now I'm ready :) [06:54] Orion-: So I'm new to node.js [06:55] Anton_ has joined the channel [06:55] Orion-: And I wonder what is the best way using node.js to scale a project (a chat) through multiple server hosts ? [06:56] madsleejensen has joined the channel [06:56] slip has joined the channel [06:57] jamescarr: sigh [06:57] ingenthr: Orion-: gotta push the state back to something else, ideally something distributed, like memached [06:58] nevir: ingenthr: Or work on partitioning users (and/or chat rooms) to help split it up w/o having to deal with keeping the data stores replicated and in sync [06:58] v3ctR has joined the channel [06:58] micheil: Orion-: probably with pusher, we'd handle all your socket connections for you [06:59] micheil: so then all you need to do is work on the client and handle the server routing [06:59] fmeyer has joined the channel [06:59] ingenthr: true enough [07:00] Orion-: the thing is inter-node.js communications ... are there some wrappers out there to help join/leave new collaborative nodes ? [07:02] sebastianedwards: Orion-: maybe look into hook.io https://github.com/hookio/hook.io [07:02] Orion-: nevir: this kind of users sharding is really interesting in my opinion :) [07:02] slip has joined the channel [07:03] Orion-: nevir: but sooner or later you still face the load problem when a node is overloaded you will not send users anymore to it [07:04] Orion-: sebastianedwards: I'm looking at it now ... thanks for the link [07:04] fly-away has joined the channel [07:04] nevir: Orion-: Well, it depends on how you expect users to use the system. You can likely get away with having, say, users 1-100 on server 1, users 100-200 on server 2, and so on. Or at least, have the canonical data on those servers [07:04] habblelabble: 1-100 = -99 [07:05] nevir: Orion-: You might want to take a look at the XMPP (Jabber) spec, and see how it deals with federation - I think it does [07:05] nevir: Might give some useful insight [07:05] ingenthr: better is to do a simple modulus hash to map usernames to servers, then for any given username you know where that user would live [07:05] nevir: But that's also likely a much larger project :P [07:06] ingenthr: you just can't add/remove nodes dynamically [07:06] Orion-: it's the overloader '-' in js 4.9 :) it does '..' [07:06] nevir: Yeah, exactly what ingenthr says [07:07] Orion-: ingenthr: already stated that the problem with modulus is when new server join the cluster or leave [07:07] nevir: ingenthr: You could do a sort of "hash ring" method like Amazon's Dynamo (http://s3.amazonaws.com/AllThingsDistributed/sosp/amazon-dynamo-sosp2007.pdf) [07:07] nevir: to avoid that problem [07:07] zastaph has joined the channel [07:07] Orion-: or use a dhash [07:08] slip has joined the channel [07:08] zilch_ has joined the channel [07:09] captain_morgan has joined the channel [07:11] b__erb has joined the channel [07:14] Nuck has joined the channel [07:15] Nuck: Fucking computer froze [07:15] Nuck: Anyways, I'm gonna build a multipart parser around a Readable Stream [07:16] seivan has joined the channel [07:16] jhurliman has joined the channel [07:16] dahankzter has joined the channel [07:17] jackbean has joined the channel [07:17] datibbaW: nuck cool .. what are you going to use it for ? [07:18] Nuck: datibbaW: So I can write a simple middleware for Express that will handle multipart uploads [07:18] datibbaW: i see .. figured that would already be part of express ;) [07:18] datibbaW: haven't done much with node yet heh [07:19] Nuck: Since incoming data is all a stream, if I parse it as such, I can worry less about efficiencies as long as it works as fast as the data comes in :D [07:19] ingenthr: Orion-: there are a few other techniques, but the dynamo consistent hashing is hard to migrate. you can do something like the vbucket approach we had in membase/couchbase and still be somewhat simple [07:20] datibbaW: that's true .. with php you always have to wait for the whole parsing to be finished before you get your hands on it [07:20] datibbaW: except perhaps for put requests [07:21] dexter_e_ has joined the channel [07:21] Nuck: datibbaW: I'll just provide events that'll fire with each part, probably. [07:22] datibbaW: makes most sense [07:22] Nuck: Something like req.multipart.on('part',function()... [07:22] Nuck: And then when it's all done, I'll fire end [07:23] Nuck: With formidable, I honestly don't know how to even work it :P [07:23] outbounder has joined the channel [07:23] Nuck: I was reformatting code, then just went "eh, fuck it, this is shit" [07:23] datibbaW: would be nice if parts could be streamed as well [07:23] Nuck: datibbaW: Meaning? [07:24] Nuck: Like, fire 'part' at the start, then toss them a Readable Stream for that part? [07:24] datibbaW: so that you don't have to parse a whole part before firing the onPart event [07:24] datibbaW: yeah [07:24] amywieliczka has joined the channel [07:24] Nuck: hmmm [07:24] MrNko has joined the channel [07:24] Nuck: That's doable. [07:24] datibbaW: ;) [07:24] Nuck: I like it. [07:24] Nuck: datibbaW: Thanks for the suggestion :D [07:24] amywieliczka has left the channel [07:24] datibbaW: np~ [07:25] Nuck: honestly, a Streaming parser should be easily as efficient as Formidable, if not moreso. [07:25] Nuck: It can take advantage of the great things Node provides. [07:25] amywieliczka has joined the channel [07:26] tdegrunt has joined the channel [07:26] amerine has joined the channel [07:26] datibbaW: node is very promising ... it's getting to a point where i would start considering it for our projects ;) [07:27] Nuck: I'm a big fan of simple encapsulation, so MultiPartse (what I'm naming this module) will take two arguments: stream, and boundary. [07:28] datibbaW: you may take optional size as well [07:28] datibbaW: the client usually adds content-length [07:29] jojohess: anybody know why node-express-boilerplate works in dev but errors out in production with "Caught exception: Error: ENOENT, No such file or directory"? [07:29] stagas has joined the channel [07:29] datibbaW: environment, environment, environment ;) [07:29] Nuck: datibbaW: Yeah, but what the fuck do I do with the length? :P [07:29] Nuck: I know it can be defined, I'm just not sure what to do with that information lol [07:30] datibbaW: nuck it adds a hard limit to your parser [07:31] Nuck: datibbaW: So when it hits that size, do I stop, die, what? [07:31] Nuck: That's the big question. [07:31] defeated: hey, can anyone help me w/ a newbie socket.io question: If I want to handle multiple individual streams (e.g. chat rooms), is it best to use the built in namespacing in combination w/ dynamic namespaces, or is there some other mechanism I'm missing? [07:31] Nuck: Do I want to be leniant or bitchy? [07:31] Nuck: I'm a big fan of leniancy [07:31] Nuck: I'll probably add that after I initially build this :P [07:31] datibbaW: nuck bitchy ... if you receive more data than expected, something messed up [07:31] datibbaW: yeah, it can totally be done as an afterthought [07:31] Wizek has joined the channel [07:32] Nuck: datibbaW: I'm just gonna start by making something capable of parsing it. [07:32] nevir: With multipart? You want to be lenient, but warn all over the place - I think you're going to find that various browsers and everything else don't do a great job of adhering to any semblance of a spec [07:32] outbounder: Hi guys, can somebody suggest me a reasonable good solution for deployment of nodejs,php,ruby projects on one or more remote servers? [07:32] datibbaW: they usually do actually [07:32] nevir: outbounder: heroku is a fantastic host if you don't care about controlling it down to the console level [07:33] Nuck: nevir: I know, but I can work towards a general implementation and worry about fixing it for reality once I'm done :D [07:33] nevir: Nuck: gotcha :P [07:33] Nuck: I think the double-stream implementation will be great. [07:33] Nuck: Because multipart is essentially a stream of streams [07:33] datibbaW: the only thing is .. certain parts can be really small [07:33] outbounder: nevir: yes, however if you own your servers, heroku is not suitable :) [07:34] Nuck: datibbaW: I know, and I'll adapt accordingly. [07:34] Nuck: I'll just detect the number of parts in a section, split them up, then parse each one individually [07:34] Nuck: So I'll just have a splitter and an individual-piece-parser [07:34] outbounder: I've tried so far : chef, puppet, fabric, cast-project, capistrano... but all those seem not quite good multi-tehnology solutions and in fact all fail to configure the server with 'nvm'/'npm' and deploy nodejs app without a big bucket of hacks. [07:35] datibbaW: good thing you don't have to parse the full mime spec ;) otherwise you would have recursion as well haha [07:35] foo1 has joined the channel [07:35] Nuck: datibbaW: D: WHAT? [07:35] nevir: outbounder: Take a look at chef or puppet (I prefer chef & chef-server) - [07:35] Nuck: ARE YOU FUCKING KIDDING ME!? [07:35] nevir: http://www.quora.com/Which-configuration-management-tool-would-you-choose-for-an-EC2-fleet is a good overview of 'em [07:35] Nuck: RECURSION? [07:35] Nuck: ACTION vomits [07:35] datibbaW: woohoo [07:36] Nuck: Fuck AWS and fuck Heroku and fuck clouds. [07:36] dannycoates has joined the channel [07:36] Nuck: ACTION uses regular old Servers [07:36] tylerstalder has joined the channel [07:36] Nuck: How do I scale? I buy more servers. [07:37] datibbaW: hmm .. i wonder, would google support v8 hosting on their appspot soon ? that would be fun [07:37] paul0 has joined the channel [07:37] Nuck: http://chxo.com/be2/20050724_93bf.html I'm gonna use this as a basic reference for implementation :P [07:37] habblelabble: 2/20050724 = 9.974702160380843e-8 [07:37] dominictarr has joined the channel [07:38] Nuck: It's nice and simple, and a good starting point [07:39] junkee[] has joined the channel [07:39] Nuck: I assume I shouldn't worry about HTTP Headers... [07:39] datibbaW: the ones in each part you mean ? think you want to actually [07:40] shajith_ has joined the channel [07:40] Nexxy has joined the channel [07:41] Nuck: datibbaW: I mean overall :P [07:41] Nuck: Starting code now :D [07:41] datibbaW: well, the top http headers will not be your concern [07:41] datibbaW: the ones inside each part are important [07:41] Nuck: If somebody would like to create a multipart form for me to test against, I would <3 you :P [07:42] Nuck: Though most people are working on NKO or don't give a fuck about this lol [07:42] datibbaW: nko ? [07:42] Nuck: Node Knockout [07:43] datibbaW: oh, the hackathon ? [07:43] Nuck: yup [07:43] datibbaW: icic [07:43] slip has joined the channel [07:44] Nuck: Okay, so when I find a --boundary, I should start hand-piping the stream to the piece-parser until the next --boundary [07:45] datibbaW: yeah [07:45] Nuck: However, if there are multiple instances of --boundary, I should split and iterate [07:45] jhurliman has joined the channel [07:45] datibbaW: multiple instances ? [07:45] datibbaW: but you wouldn't know that beforehand [07:46] Nuck: datibbaW: Yeah, like if I manage to get multiple parts in one data event [07:46] Nuck: The data events don't fire per-character or anything [07:46] Nuck: :P [07:47] stagas: well I made this https://github.com/stagas/king it's kind of a always up websocket network but I can't think of any use case :P [07:47] Nuck: oh, but I've also got to think about if --boundary is split among two chunks >_> [07:47] sanduz2 has joined the channel [07:47] Nuck: Hmmm [07:47] datibbaW: yeah .. you need to keep buffers [07:47] LordMetroid has joined the channel [07:47] chjj: nuck that would be extraordinarily slow, you would first have to parse it to split it, javascripts string functions arent binary safe either, if theres a file in there, things will break [07:47] LordMetroid: This code I wrote is butt-ugly [07:47] LordMetroid: http://pastebin.com/eWNG6dpd [07:47] LordMetroid: Is there a way to write the ifs in a more neat fashion? [07:48] chjj: you cant write a streaming parser that way, theres no lookaheads, you have to assume every data event is a single byte [07:48] Nuck: chjj: I'm thinking of it as Strings, but in practice, I'll be using Buffers. [07:48] sanduz2: do you guys think its a good idea to get rid of regular servers and just use node.js for everything including simply serving static html files and such? [07:48] japj has joined the channel [07:48] Nuck: chjj: I can make a streaming parser, and I will. [07:48] datibbaW: just make sure it's binary safe though hehehe [07:48] Nuck: I have ideas for how to handle it all. [07:48] stagas: sanduz2: sure [07:48] chjj: you can buffer bytes but its considered "cheating" for a streaming parser [07:49] Nuck: Like, look for -, if it finds that, check the next character, if that's another -, check the next character, and so on [07:49] sanduz2: stagas, is there a video or link that discusses this topic? i cant seem to find one [07:49] EvRide has joined the channel [07:49] Nuck: chjj: I'm just using Strings analogously in my mind [07:49] datibbaW: chjj you don't have to buffer everything .. just the string from "--" until what currently matches the boundary [07:49] Nuck: It makes it easier for me to conceptualize it all as one big string [07:49] Nuck: datibbaW: Exactly [07:49] datibbaW: once you hit the end of data segment, you send all but that last part [07:50] chjj: datibbaW: im specifically talking about buffering to make things easier, but no you dont have to do that either [07:50] Nuck: Or [07:50] stagas: sanduz2: dunno but I don't see why it would be a problem serving everything from node [07:50] tylerstalder has joined the channel [07:50] chjj: https://github.com/chjj/parted/blob/master/lib/parted.js [07:50] chjj: thats my multipart parser [07:51] sanduz2: stagas, thanks [07:51] chjj: i cheated and buffered the last 3 bytes [07:51] chjj: it simplified things a lot, so i didnt have a million states [07:51] outbounder: nevir: from the article guys has elected chef as good solution. to me it is way too complex to be used for very very simple problem like releasing a single express based nodejs project to a staging and production servers... [07:51] chjj: and then obviously i buffer the headers because you actually want those [07:51] Nuck: I could just check for --boundary as a whole, then check lastIndexOf('-'), and read from that until the end of the chunk, then if I do '--boundary'.indexOf(that) == 0, then I know it's right [07:52] Nuck: In which case I buffer that onto the next chunk [07:52] Nuck: chjj: You make it sound really hard, but honestly, it seems pretty simple. [07:53] chjj: im not trying to make it sound hard [07:53] chjj: you can look at my multipart parser, its very simply written [07:53] Nuck: And I think by using the built-in searching mechanisms whenever possible, I can make it pretty efficient [07:53] Nuck: chjj: Do you have a specific multipart example you were testing it against? [07:53] chjj: yes [07:53] Nuck: chjj: Is it on the github repo? [07:53] chjj: https://github.com/chjj/parted/blob/4bb7b3c97c50e2d04edf2371a245f26f5f267c01/test/test.txt [07:53] nevir: outbounder: Yeah, I won't disagree there - chef is great in a heterogeneous environment, but you've got to be prepared to do a lot of tweaking of recipes :-/ (the application recipe is what a lot of it is built against - no node support there) [07:54] v3ctR has joined the channel [07:54] slip_ has joined the channel [07:56] Nuck: chjj: Wait, is it any number of dashes before the boundary? [07:56] Nuck: Like, it isn't a specific number? [07:56] datibbaW: afaik its two [07:56] Nuck: I thought that too [07:56] Nuck: But chjj's example uses like 6, and it doesn't have a --boundary-- at the end either? [07:56] Nuck: I'm pretty sure that's an EXTREMELY invalid multipart body [07:57] datibbaW: well .. if there are six .. it means, 4 dashes are still part of the content ;) [07:57] jackbean has joined the channel [07:57] Nuck: Ah true [07:57] chjj: Nuck: its directly from a webkit form submisson [07:57] Nuck: Damn [07:57] Nuck: chjj: Even the "------WebKi-just kidding" [07:57] datibbaW: oh ya .. dashes can also be part of the boundary string [07:57] javajunky has joined the channel [07:57] datibbaW: lolz [07:58] chjj: right, i did that because if youre dealing with raw binary files, theres going to be some things that trick you out [07:58] chjj: so thats to make sure the parser isnt fooled by something that might look like a boundary [07:58] outbounder: nevir: yeah... so it looks like there isn't good enough solution. (btw capistrano did succeed to configure and deploy nodejs app, however its ssh based implementation is awful...). So in current situation the only reasonable solution is to hack a usable prototype based on this concept instead: https://gist.github.com/1174534 [07:58] Nuck: chjj: I'm just looking for the entire boundary >_> [07:58] chjj: right, thats what you should do [07:58] Nuck: So in theory my parser wouldn't be faked out by that >_> [07:58] chjj: ...thats the point [07:58] Nuck: Though I guess there's always a chance [07:58] chjj: thats what tests are for [07:59] datibbaW: unless the boundary is split across data parts [07:59] chjj: to test whether your parser works or not [07:59] foo1 has joined the channel [07:59] Orion-: hey chjj :) [07:59] chjj: Orion-: hi [07:59] abiii has joined the channel [08:00] Nuck: Wow, I could easily make a recursive-capable parser too :P [08:00] vns has joined the channel [08:00] jamesarosen has joined the channel [08:00] datibbaW: you could make it a mime parser while you're at it [08:00] datibbaW: haha [08:00] Nuck: datibbaW: http://www.faqs.org/rfcs/rfc1867.html [08:00] Nuck: It allows for multipart within a part [08:00] ttpva has joined the channel [08:01] datibbaW: 1867 .. is that multipart form data spec? [08:01] Nuck: datibbaW: So it seems. [08:01] pt_tr has joined the channel [08:02] jamesarosen has joined the channel [08:03] datibbaW: oh ya ... interesting [08:03] Nuck: If a boundary is across chunks, it'll opt for a slightly slower method of just reading from the last hyphen until the end of the chunk, doing '--boundary'.indexOf(that) == 0, and if so, it'll take the part of the string that isn't grabbed yet and see if the next chunk starts with it. If it does, it'll cut off that part and start streaming again [08:03] MrNko has joined the channel [08:03] Nuck: Problem solved. [08:03] Nuck: :D [08:03] Nuck: I'm great at theorizing code. [08:03] datibbaW: ACTION looks for a bucket [08:04] Nuck: The hard part is actually implementing it. [08:05] datibbaW: think chjj created a stub for boundary search "\r\n--" [08:05] Orion-: What's the best way to achieve multi-node data sharing for volatile data first ? I just read node-memcache can scale to many nodes what about redis ? [08:05] k1ttty has joined the channel [08:05] JaKWaC has joined the channel [08:05] Nuck: datibbaW: I think my boundary-handling will work well, don't you? [08:05] Nuck: lol [08:06] Nuck: chjj: I'm curious what you think of my plan? [08:06] sharkbird has joined the channel [08:06] Nuck: The hardest part may actually be keeping everything streaming [08:06] datibbaW: that's why your code is gonna rock, right? ;) [08:06] Nuck: Managing the pipes will be a complicated process :P [08:06] Nuck: datibbaW: Hopefully [08:06] slip has joined the channel [08:07] sebastianedwards has joined the channel [08:07] Nuck: I'm thinking if I get a chunk that ends with a boundary between chunks, I'll chop off that bit and pipe everything until that point to the part's stream [08:08] Nuck: If it ends up not being a boundary, it'll pipe it on immediately. [08:08] Nuck: I think that's the best way to handle it, honestly. [08:08] Nuck: This will be the first project for my startup that I'll open-source :P [08:09] chjj: nuck: not sure, if it works it works [08:10] Qbix1 has joined the channel [08:10] Orion-: are you guys working for the node ko right now ? [08:11] slip has joined the channel [08:12] V1 has joined the channel [08:13] chjj: nuck: btw, that test of mine i showed you gets cut off on github, the actual file has an ending boundary key [08:13] MrNko has joined the channel [08:13] chjj: that might have been why you were saying its invalid [08:13] chjj: if you do "view raw", i think it shows the full thing [08:13] hellp has joined the channel [08:14] Nuck: chjj: Ah, now it makes sense. [08:14] shipit has joined the channel [08:14] Nuck: Hopefully I'll be able to write this code tommorrow. [08:15] Nuck: For now, I think I'll go to sleep. [08:15] Nuck: That's gonna be quite an undertaking, but if I succeed, I could further the node community quite a lot :P [08:15] Nuck: I'm not sure it'd be possible to benchmark against formidable though [08:15] Nuck: Since that's non-streaming [08:16] Nuck: It'd really be apples and oranges [08:16] ingenthr has joined the channel [08:16] Nuck: But if I *do* succeed, taking a part and writing it to a file will be as easy as part.pipe(file); [08:16] tim_smart has joined the channel [08:16] madsleejensen has joined the channel [08:16] Nuck: Tell me that wouldn't me godly? :3 [08:18] abiii has joined the channel [08:18] Nuck: So basically, my function will return an EventEmitter :D [08:18] Nuck: When a chunk begins, it'll fire 'part' [08:18] cpetzold has joined the channel [08:18] chjj: isnt that what formidable does? [08:18] Nuck: The callback for that will recieve a readable stream which will have that part piped to it [08:18] tk has joined the channel [08:18] tmzt_: formadible uses another library that does that [08:18] chjj: im not sure, ive never used formidable, ive only looked at the code [08:18] chjj: here and there [08:19] foo1 has joined the channel [08:19] Nuck: chjj: If that is in fact what Formidable does, I'd love to see my module benched against it :P [08:19] dominictarr: Nuck: you should return a stream that reemits the data method with the chunks in the right place. [08:19] Nuck: That'd allow more detail than just "this is how long it took to parse a stream" [08:20] Nuck: dominictarr: Huh? [08:20] Orion-: So I guess you don't have much time for my questions at the moment [08:20] dominictarr: then you could still use .pipe [08:20] Orion-: When does the contest finish ? [08:21] Nuck: dominictarr: It's gonna be piping from the readable stream it gets with the raw encoded thing to the stream passed to the 'part' events [08:21] Nuck: But I'm gonna do the piping myself, so I can check for part ends [08:21] te-brian has joined the channel [08:22] goshakkk has joined the channel [08:22] Nuck: My goal is to make an unbuffered, blazing-fast streaming parser for multipart-encoded forms. [08:22] te-brian: I'm using everyauth to authenticate with Yahoo's API. I have my token but now I have no idea what to do with it :) [08:22] te-brian: This seems relavent: http://developer.yahoo.com/oauth/guide/oauth-make-request.html [08:22] te-brian: But I'm not following it [08:22] JumpMast3r has joined the channel [08:23] Nuck: I'm not going to bother with the silly ways of optimization through coding styles, honestly. [08:23] Nuck: But I will provide a version optimized like that. [08:23] Nuck: Well, as optimal as I can get it. I'm sure somebody else could do better :P [08:24] Nuck: But I'll mainly make it optimal by taking advantage of the streaming APIs [08:24] Nuck: And not doing stupid things or buffering :P [08:24] MrNko has joined the channel [08:24] pen has joined the channel [08:25] __doc__ has joined the channel [08:26] skm has joined the channel [08:27] slip has joined the channel [08:27] jarek has joined the channel [08:27] goshakkk has joined the channel [08:27] Nuck: Hopefully I'll finish this parser by the end of tomorrow :P [08:27] jackbean has joined the channel [08:28] zilch_ has joined the channel [08:28] v3ctR has joined the channel [08:29] Nuck: k got a repo set up, I'll push when I get an initial version that sorta-parses shit [08:30] DTrejo has joined the channel [08:32] azeroth__ has joined the channel [08:33] Nuck: Okay, can somebody explain how to use Streams in JS? [08:33] Nuck: Do I just, like, create a new WritableStream? [08:33] Nuck: And what module do I need to require? [08:33] goshakkk has joined the channel [08:34] chjj: nuck: a stream is just an eventemitter really [08:34] chjj: stream inherits from eventemitter, it just gets a pipe method [08:34] Nuck: chjj: But what about the readable and writable shit? [08:34] chjj: if you want it to be readable, do this.readable = true in the constructor and emit data events [08:35] chjj: if you want it to be writable, set this.writable = true, and give your objects a .write and .end method [08:35] piscisaureus has joined the channel [08:35] Nuck: I want to have a WritableStream so I can pipe onto it, but I want it to be a ReadableStream when exposed to the 'part' event. [08:35] Nuck: Evening piscisaureus [08:37] chjj: nuck: you can have it be readable and writable [08:37] chjj: set readable and writable properties to true, then give it a .write and .end method, emit data or part events when necessary [08:37] Nuck: chjj: Okay, I'll look into that later :P [08:38] Nuck: For now, I'm gonna write ignorant to the stream, I just wanna get the core stuff down while it's fresh in my mind [08:38] Orion-: Hey guys What's the best way to achieve multi-node data sharing for volatile data ? I just read node-memcache can scale to many nodes out-of-the-box what about redis ? What are your opinions on the subject, mostly on sharing states through multi nodes on multiple servers across the univers :D [08:39] Orion-: sorry for the "bis repetita" by the way :) [08:39] slip has joined the channel [08:39] piscisaureus: hey nuck [08:39] robinduckett has joined the channel [08:40] piscisaureus: it's morning here btw [08:40] DTrejo: good night piscisaureus ! [08:40] piscisaureus: heh [08:40] piscisaureus: sleep tight [08:41] loob2 has joined the channel [08:44] mikl has joined the channel [08:44] Yoric has joined the channel [08:44] __tomb has joined the channel [08:45] jp323 has joined the channel [08:46] Nuck: piscisaureus: It's quarter to 2 AM here, so technically morning, but that's a minor detail. [08:46] reinhardt has joined the channel [08:46] Nuck: lol I'm putting a comment every other line right now, jsut to make sure I know what I was thinking when rereading the code in morning [08:47] reinhardt: hi all. is anyone working with jsdom? I can't get it deployed due to cnode-waf / contextify issue [08:48] jomoho has joined the channel [08:49] avalanche123 has joined the channel [08:49] slip has joined the channel [08:49] peritus_ has joined the channel [08:49] DTrejo: reinhardt: is this an issue with gcc not being installed on no.de? [08:50] reinhardt: DTrejo: it's local at the moment [08:50] MrNko has joined the channel [08:50] fmeyer has joined the channel [08:50] DTrejo: oh, can't help then, noidea [08:50] reinhardt: thanks [08:50] DTrejo: tmpvar ^ [08:50] DTrejo: he might be able to help [08:50] nevir: Does the npm registry support yanking specific versions of a package? [08:50] DTrejo: yep [08:51] DTrejo: specify the version in your package.json [08:51] nevir: nvm! unpublish is what I'm looking for! [08:51] jackbean has joined the channel [08:51] Nuck: :D I've almost finished writing this thing [08:51] geetarista: I notice that npm installs binaries into ./node_modules/.bin/ -- do I have to pass the full path to use those or is there a way to just call them? [08:51] Nuck: It's shoddy at this point, and it doesn't parse headers, but it seems almost ready to split parts finely. [08:52] Nuck: And it even handles dividers that are split between chunks [08:53] karthikj has joined the channel [08:54] Nuck: chjj: 57 lines with a LOT of comments and whitespace. [08:54] Nuck: I'd say this parser will end up under 100 lines in length. [08:55] Nuck: Though, if I hafta make my own WritableStream, it'll add size. [08:55] karthikj: i have a installation problem.. anyone to help? [08:56] peritus_: how to reach someone who can edit github webhooks for the contest repositories ? [08:57] jetienne has joined the channel [08:58] Renegade001 has joined the channel [08:59] Nuck: chjj: No whitespace or comments, and it's at 32 lines. [08:59] slip has joined the channel [08:59] Fabryz has joined the channel [09:00] mraleph has joined the channel [09:01] tylerstalder has joined the channel [09:01] Orion-: Ok so nobody cares to answer me ? [09:01] Nuck: datibbaW: YAY! [09:02] Nuck: Thanks for the idea, it's working out well thus far :D [09:02] Nuck: It's still sorta pseudocoded, since it's just doing new WritableStream(), but it gives me a basis [09:02] MrNko has joined the channel [09:03] Nuck: Once this is working perfectly, I'll be able to move onto header parsing and get that knocked out, and after that, I get to test it and debug it as a whole [09:03] Orion-: too bad then [09:03] Nuck: But for now, I'm gonna sleep. [09:04] Nuck: v8: setTimeout(function(){ throw new Error('test') }, 5000); [09:04] v8bot_: Nuck: ReferenceError: setTimeout is not defined [09:05] Nuck: Aw damn [09:05] Nuck: lol [09:07] reinhardt has joined the channel [09:07] MrNko has joined the channel [09:08] MrNko has joined the channel [09:08] FireFly has joined the channel [09:09] cpetzold has joined the channel [09:09] reinhardt: anyone know how to handle this? Error: Cannot find module '../build/default/contextify' [09:10] MrNko has joined the channel [09:10] MrNko has joined the channel [09:11] colinsullivan1 has joined the channel [09:13] ank has joined the channel [09:14] slip has joined the channel [09:14] avalanche123 has joined the channel [09:14] neilk_ has joined the channel [09:14] clu3 has joined the channel [09:14] simenbrekken has joined the channel [09:15] v3ctR has joined the channel [09:16] eldios has joined the channel [09:17] MrNko has joined the channel [09:18] amigojapan has joined the channel [09:19] danielleswank has joined the channel [09:22] MrNko has joined the channel [09:22] robi42 has joined the channel [09:24] reinhardt: seems contextify has named it's folders incorrectly [09:24] reinhardt: renaming them fixes things [09:27] Yuffster_work has joined the channel [09:28] seivan has joined the channel [09:29] __tosh has joined the channel [09:30] jim__ has joined the channel [09:31] jim__: hi, could anyone help with installing redback via npm [09:31] jim__: it gets as far as: [09:31] jim__: OSError: [Errno 2] No such file or directory: '/home/jim/node/node-v0.4.11/tools/../lib/node/wafadmin/Tools' [09:33] sh1mmer: is that the full error? [09:33] sh1mmer: can you gist it? [09:33] crash82 has joined the channel [09:33] jim__: On shell I get: http://pastie.org/2437960 [09:34] sh1mmer: what env is this? [09:34] jim__: Ubuntu [09:34] jim__: node installed from source [09:35] jim__: node 4.11 [09:35] sh1mmer: "sh: gmake: not found" [09:35] Orion-: install gmake ? [09:35] jim__: I think that's because it is doing make || gmake [09:35] jim__: I have make [09:35] jim__: it is just trying to run gmake because make failed [09:36] Orion-: oh check that make is in your path then [09:36] jim__: yeah, it is [09:36] jim__: jim@diga:~/node/team-ig$ which make [09:36] jim__: /usr/bin/make [09:36] jim__: comes with build-essential on ubuntu [09:36] Orion-: but anyways it uses make also in your log [09:36] sh1mmer: npm does some permissions stuff [09:37] sh1mmer: maybe try npm -g install redback [09:37] jim__: global? [09:37] sh1mmer: and see if it works with sudo to install global [09:37] sh1mmer: yeah [09:38] Orion-: I think the important thing is: 'OSError: [Errno 2] No such file or directory: '/home/jim/node/node-v0.4.11/tools/../lib/node/wafadmin/Tools' [09:38] jim__: btw, at first it wasn't working because it couldn't find node-waf [09:38] Fabryz: remember to link it after you install it globally [09:38] jim__: so I added some things to PATH and PYTHON_PATH [09:38] slip has joined the channel [09:38] jim__: export PATH=$PATH:/home/jim/node/node-v0.4.11/tools [09:38] jim__: export PYTHONPATH=$PYTHONPATH:/home/jim/node/node-v0.4.11/tools/wafadmin [09:38] jim__: export PYTHONPATH=$PYTHONPATH:/home/jim/node/node-v0.4.11/tools/wafadmin/Tools [09:39] jim__: look right? [09:39] jim__: after that it was getting a bit further [09:40] jim__: The dir it is looking for ('/home/jim/node/node-v0.4.11/tools/../lib/node/wafadmin/Tools') ... [09:40] Fabryz: if you npm install -g remember to do npm link on your project dir [09:40] zilch_ has joined the channel [09:40] Fabryz: or the app won't see it [09:40] MrNko has joined the channel [09:40] wullikam has joined the channel [09:40] jim__: /home/jim/node/node-v0.4.11/lib [09:40] jim__: exists [09:40] jim__: but there is no node dir inside there [09:41] liar has joined the channel [09:42] jim__: global fails to build too [09:42] sh1mmer: same error? [09:42] jim__: with -g I get: make: node-waf: Command not found [09:42] jim__: running sudo npm install -g redback [09:42] sh1mmer: which node ? [09:42] jim__: latest stable [09:43] sh1mmer: sorry `which node` [09:43] jim__: oh right [09:43] jim__: jim@diga:~/node/team-ig$ which node [09:43] jim__: /usr/local/bin/node [09:43] baudehlo has joined the channel [09:43] slip has joined the channel [09:44] sh1mmer: that's weird [09:44] jim__: how so? [09:45] sh1mmer: maybe put /home/jim/node/node-v0.4.11 in your path before that [09:45] sh1mmer: I mean it seems weird it's referencing some local path while building [09:45] jetienne has joined the channel [09:45] sh1mmer: that seems like the reason it is loosing tools [09:45] sh1mmer: maybe install node with ./configure --prefix=~/local [09:46] jim__: to install, downloaded node source and did: make -f Makefile.cmake install from node tarball [09:47] karboh has joined the channel [09:47] jim__: I think it is referencing path in my home dir because I've got PATH set up as export PATH=$PATH:/home/jim/node/node-v0.4.11/tools [09:47] jetienne: is there a special irc channel specific for knockout ? [09:48] defeated: #nodeknockout [09:48] Orion-: jim__: does node works well ? [09:48] jim__: seems to [09:48] jetienne: defeated: thx [09:49] jim__: can start it and do console.log etc [09:49] jim__: and other modules like underscore installed fine via npm [09:49] sh1mmer: well this is a compiled module isn't it? [09:49] jim__: yeah [09:49] sh1mmer: those are always more of an arse [09:50] jim__: yeah, always take a few tries [09:50] sh1mmer: can you just get the git source and make by hand? [09:50] slip has joined the channel [09:50] sh1mmer: once you have the .o you can just chuck it in the require path [09:50] jim__: git source for node? [09:50] sh1mmer: redback [09:50] jim__: or the module? [09:50] jarek has left the channel [09:50] jim__: ok, sounds like a plan [09:51] jim__: the bit which is failing is hiredis [09:51] jim__: which is a bit of redis [09:52] Orion-: I'd say it's wafadmin which is failing [09:52] jim__: yeah, I think so [09:52] tedsuo has joined the channel [09:52] jim__: at first I couldn't build because it couldn't find wafadmin [09:53] jim__: so I added to path: [09:53] jim__: export PATH=$PATH:/home/jim/node/node-v0.4.11/tools [09:53] jim__: but there is also a dir /home/jim/node/node-v0.4.11/build/tools [09:53] jim__: with node-waf in it [09:53] jim__: which is the correct one to have in the path? [09:54] Orion-: dunno [09:54] jim__: they seem to have the same contents [09:55] jim__: my guess is that build was just the dir node used while building [09:55] jim__: and the proper location is the dirs outside of build [09:56] Orion-: should try what sh1mmer proposes [09:56] jim__: ok, any idea which package I want to get from git? redback or redis? [09:56] jim__: I think it is redis that is failing to compile [09:58] sh1mmer: I would start with redback [09:58] sh1mmer: and see how that goes [09:58] jim__: ok [09:58] sh1mmer: i might require redis source I guess [09:58] sh1mmer: but maybe not [09:58] sh1mmer: are you at HQ? [09:58] jim__: not at the moment [10:01] sh1m has joined the channel [10:02] zilch_ has joined the channel [10:02] Orion-: jim__: you're in London ? [10:02] jim__: yeah but at home [10:02] jim__: I left my laptop somewhere [10:03] jim__: so I'm on my desktop :-s [10:03] jim__: going to try installing node again from the tarball [10:03] jim__: see if the install sets things up more conventionally this time [10:03] jim__: think it might be because I built using cmake [10:03] slip has joined the channel [10:03] Orion-: wwoooo ... old cmake :/ [10:04] jim__: something looks wrong with the node install anyway, no nodejs dir anywhere global [10:04] Orion-: did you make install as root ? [10:04] jim__: yeah, think so [10:05] jim__: did it last night so a bit foggy [10:05] Orion-: :) [10:05] jim__: must have done because it put it in /usr/blahblah/node [10:05] brainproxy: jim__: you might want to look at nvm -- makes node and npm install a snap [10:06] jim__: going to just install node with ./configure make make install [10:06] jim__: brainproxy: ok, I'll take a look [10:06] Orion-: but clean your user's env before :) [10:06] jvduf has joined the channel [10:06] brainproxy: jim__: https://github.com/creationix/nvm [10:06] jamesw_ has joined the channel [10:07] safed has left the channel [10:07] Orion-: I always start a brand new console for building stuff, so I don't get polluted by old works en crazy env variables [10:09] jim__: hell yeah, I'm going for the clean everything approach this time [10:09] v3ctR has joined the channel [10:12] __tomb has joined the channel [10:14] jokil has joined the channel [10:14] sridatta has joined the channel [10:14] jim__: this node install looks much healthier than the last one [10:15] jim__: cool, npm install redback works :-D :-D :-D :-D [10:15] jim__: now to make up some lost time [10:16] mike5w3c_ has joined the channel [10:17] zilch_ has joined the channel [10:18] sechrist: How do I plug raw text into an ejs template inside of express? [10:18] sechrist: <%= htmlencodes it [10:18] sechrist: or is there a preferred way to embed json into a template with these node frameworks? [10:20] markwubben has joined the channel [10:21] k1ttty has joined the channel [10:21] slip has joined the channel [10:23] jamesw_: if my players join a game on socket connect, and leave the game on disconnect, any ideas how I can handle quick disconnect and reconnect? [10:23] safed has joined the channel [10:23] jamesw_: i.e. I only want them to leave them game when they have closed the page basically, not because they have a dodgy connection [10:23] jetienne has joined the channel [10:23] zilch_ has joined the channel [10:24] Fabryz: jamesw_ I would be interested in that too [10:25] v3ctR has joined the channel [10:25] jamesw_: I'm too new to node/socket.io to have any clue on that one Fabryz. [10:25] jamesw_: but can't find anyone else who has a clue either. :P [10:30] NetRoY has joined the channel [10:30] Fabryz: jamesw_ try to see if there's someone in #socket.io if you're using it [10:30] Fabryz: lunch time, brb [10:31] zilch_ has joined the channel [10:32] slip has joined the channel [10:32] v3ctR has joined the channel [10:35] rmcastil has joined the channel [10:36] calebc: I'm trying to figure out how to do an OR clause with Mongoose. I basically want to find (pseudocode) User.where(email === foo || username == foo) [10:37] MUILTFN has joined the channel [10:37] calebc: the second == being double is accidental :) Lack of sleep and all [10:37] mc_greeny has joined the channel [10:37] calebc: email is equal to foo or username is equal to foo [10:40] zilch_ has joined the channel [10:42] danielleswank has joined the channel [10:43] Malar has joined the channel [10:43] robotmay has joined the channel [10:44] zilch_ has joined the channel [10:44] topaxi has joined the channel [10:44] slip has joined the channel [10:45] calebc: Figured it out! :) That's how it usually works when you ask [10:45] mykul|Home has joined the channel [10:47] chamb has joined the channel [10:47] luke` has joined the channel [10:48] zilch_ has joined the channel [10:48] safed has left the channel [10:48] squeese has joined the channel [10:49] safed has joined the channel [10:50] safed has left the channel [10:50] safed has joined the channel [10:50] zilch_ has joined the channel [10:51] v3ctR has joined the channel [10:53] zilch_ has joined the channel [10:54] jamesw_: if I do a setTimeout on a function...is there a way to cancel that function before it launches? [10:54] fangel has joined the channel [10:54] slip has joined the channel [10:54] sh1mmer: yes [10:54] sh1mmer: save a reference to the setTimeout [10:55] sh1mmer: and then you can call clearTimeout(ref) [10:55] jamesw_: so just like, var myFunc = setTimeout(); [10:55] zilch_ has joined the channel [10:55] jamesw_: then clearTimeout(myFunc) [10:55] sh1mmer: ja [10:55] jamesw_: thank you very much [10:55] sh1mmer: np [10:56] jamesw_: any hangups if clearTimeout is called and myFunc is no longer valid? [10:57] sh1mmer: shouldn't be [10:57] zilch_ has joined the channel [10:57] jamesw_: awesome, appreciate it [10:58] Kingdutch has joined the channel [11:00] skm has joined the channel [11:00] zilch_ has joined the channel [11:00] luke` has joined the channel [11:02] zilch_ has joined the channel [11:04] zilch_ has joined the channel [11:05] asabil_ has joined the channel [11:06] dahankzter has left the channel [11:06] zilch_ has joined the channel [11:09] slip has joined the channel [11:11] AD7six_ has joined the channel [11:11] zilch_ has joined the channel [11:12] slaskis: arent' require supposed to return the same instance of a module if required multiple times? [11:12] slaskis: i have a case where it doesnt, why could that be? [11:12] mldevbrissy has joined the channel [11:13] danielleswank has joined the channel [11:14] zilch_ has joined the channel [11:15] DrMcKay has joined the channel [11:15] zilch_ has joined the channel [11:15] slip has joined the channel [11:16] pandark_ has joined the channel [11:19] chamb has left the channel [11:20] baudehlo has joined the channel [11:20] zilch_ has joined the channel [11:20] booo has joined the channel [11:20] juyeongpark has joined the channel [11:22] Layke: If you have included your own module, and then require from inside of that, and there is a node_modules from inside of that directory, then I guess that could be a possibility [11:25] slip has joined the channel [11:30] prettyrobots has joined the channel [11:31] slaskis: Layke: thanks, it was because npm on my no.de instance had linked in the express module in one dependency and not in another so they were two separate ones... [11:32] chrizel has joined the channel [11:32] safed has left the channel [11:33] felixhummel has joined the channel [11:33] amigojapan has joined the channel [11:34] simenbrekken has joined the channel [11:36] tonymilne has joined the channel [11:36] adrianmg has joined the channel [11:37] slip has joined the channel [11:37] foo2 has joined the channel [11:41] bosky101 has joined the channel [11:41] okuryu has joined the channel [11:44] ke1s0 has joined the channel [11:47] v3ctR has joined the channel [11:47] asabil has joined the channel [11:48] adrianmg has left the channel [11:51] tylerstalder has joined the channel [11:54] DennisRasmussen has joined the channel [11:54] Cromulent has joined the channel [11:54] MrNko has joined the channel [11:56] v3ctR has joined the channel [11:58] Remoun_ has joined the channel [12:00] topaxi has joined the channel [12:02] slip has joined the channel [12:06] v3ctR has joined the channel [12:07] TheJH has joined the channel [12:07] TheJH has joined the channel [12:08] Yoric has joined the channel [12:08] paveq2 has joined the channel [12:08] PhilK has joined the channel [12:08] apoc has joined the channel [12:09] Zuardi has joined the channel [12:09] ke1s0 has joined the channel [12:10] madsleejensen has joined the channel [12:12] fairwinds has joined the channel [12:12] SvenDowideit has joined the channel [12:12] v3ctR has joined the channel [12:15] slip has joined the channel [12:16] fyskij has joined the channel [12:17] jhurliman has joined the channel [12:18] boehm has joined the channel [12:18] __tomb has joined the channel [12:22] Zuardi_ has joined the channel [12:23] slip has joined the channel [12:24] outbounder has left the channel [12:26] saschagehlich has joined the channel [12:28] v3ctR has joined the channel [12:30] japj has joined the channel [12:31] jackbean_ has joined the channel [12:33] v3ctR has joined the channel [12:34] tomtomaso has joined the channel [12:34] secoif has joined the channel [12:37] zakro has joined the channel [12:38] zakro: hi everyone [12:39] pen has joined the channel [12:40] chunhao_: can anybody recommend a non-orm mongodb library? [12:40] sharkbird has joined the channel [12:40] gsklee has joined the channel [12:41] gsklee: yo [12:42] v3ctR has joined the channel [12:43] zakro: advice for noobs pls [12:44] __tomb has joined the channel [12:44] alindeman: chunhao_: You could just use the driver itself [12:44] jMCg: zakro: read the documentation, try things out, fail, try again, read the documentation, try things out out... [12:45] Qbix1 has joined the channel [12:45] alindeman: chunhao_: http://search.npmjs.org/#/mongodb [12:45] zakro: k tnx [12:47] necrodearia: https://github.com/LearnBoost/socket.io#readme at the very beginning: var io = require('socket.io'); this produces error in firefox: require is not defined [12:49] chunhao_: alindeman: thanks [12:50] sylvinus: my mongoose post("init") hooks are never called when I do new Schema. Any idea how this could happen ? [12:50] pellegrino has joined the channel [12:52] markwubben has joined the channel [12:52] stisti: necrodearia: maybe you should load that code in node.js and use the "client" code in firefox? [12:53] slip has joined the channel [12:53] stisti: i.e. the firefox should use: [12:54] bradleymeck has joined the channel [12:55] necrodearia: stisti, hmm, How do I load the code in node.js? [12:56] gartenst_ has joined the channel [12:57] chamb has joined the channel [12:58] Qbix1 has joined the channel [13:00] tonymilne has joined the channel [13:00] __sorin__ has joined the channel [13:00] progme has joined the channel [13:00] slip_ has joined the channel [13:02] agnat has joined the channel [13:02] [[zzz]] has joined the channel [13:04] huskyr_ has joined the channel [13:04] jamesd has joined the channel [13:06] CoverSli1e has joined the channel [13:07] jetienne has joined the channel [13:09] skm has joined the channel [13:12] slip has joined the channel [13:14] katspaugh has joined the channel [13:14] MrNko has joined the channel [13:15] balupton has joined the channel [13:15] tmedema has joined the channel [13:16] tmedema: Anyone got socket.io working with Browserify? [13:16] seivan has joined the channel [13:16] katspaugh: Hi! Can I get AST representation of the code in v8? [13:16] zilch_ has joined the channel [13:16] SubStack: tmedema: it works with 0.6.8 I think [13:16] SubStack: not the 0.7.x stuff [13:16] tmedema: SubStack: aye, I just need to get it working with 0.7.x ;) Sorry mate, but it's a mayor release [13:17] bosky101 has joined the channel [13:17] CoverSli1e: mayor? mayor of what city? [13:17] tmedema: Oh snap my English aint great. I admit it. Do not hang me, I beg you. [13:17] SubStack: tmedema: socket.io really likes to assign to window.io and then expects the lexical `io` to resolve to window.io [13:17] SubStack: which is a very silly assumption [13:18] zomgbie has joined the channel [13:18] tmedema: SubStack: yeah I heard. Could you maybe give me a rough guide on how to fix it? Should I change all the window calls? [13:18] SubStack: because as soon as you wrap that code in a function it breaks [13:18] SubStack: tmedema: probably you can just var io = window.io = ... [13:19] tmedema: SubStack: hmm, inside the inner functions? [13:19] SubStack: not sure where exactly [13:19] SubStack: wherever it assigns to window.io I guess [13:19] tmedema: SubStack: ah you mean that they expect io to equal window.io, and that is what breaks it? [13:19] CoverSli1e: SubStack: i think browserify could use some simple way of appending and prepending some js to specific files to deal with js libs that don't use require [13:19] jamesduncan has joined the channel [13:20] tmedema: That'd be great [13:20] katspaugh: I know that uglify.js creates an AST from the code and is written in JavaScript. Maybe v8/nodejs has dedicated debugging/inspection facility that could provide the same thing? [13:21] CoverSli1e: there are lots of node debuggers [13:21] tmedema: CoverSli1e: In fact, it'd be a major improvement! (see what I did there..) [13:21] Yoric has joined the channel [13:21] SubStack: CoverSli1e: that functionality already exists [13:21] SubStack: it's in the docs [13:22] SubStack: I forget what I called it [13:22] tmedema: browserify? [13:22] CoverSli1e: sorry i don't like reading [13:22] SubStack: it's an extension of the filter code [13:22] CoverSli1e: i prefer to annoy people on IRC [13:22] SubStack: ah register maybe [13:22] tmedema: SubStack: in that case I guess that functionality does not work with socket.io? [13:23] tmedema: CoverSli1e: actually I appreciate it, apologies for sounding annoyed. ;) [13:24] tmedema: SubStack, did you mean "browserify --require traverse -o bundle.js" ? [13:24] slip has joined the channel [13:24] colinsullivan has joined the channel [13:25] [[zzzz]] has joined the channel [13:25] SubStack: tmedema: it's part of the bundle api [13:25] SubStack: not possible from the cli tool [13:26] bwinton has joined the channel [13:27] tmedema: SubStack: you mean "b.bundle() Return the bundled source as a string."? I'm afraid that's all the docs say about it. [13:27] tmedema: Does it expect a path to a file? [13:27] abiii has joined the channel [13:28] willwhite has joined the channel [13:33] skm has joined the channel [13:34] lunks has joined the channel [13:34] chrisumbel has joined the channel [13:36] tmedema: FYI, I tried the "var io = window.io;" trick at the top of the file. It still says io is undefined however. [13:37] liar has joined the channel [13:38] mikl_ has joined the channel [13:39] slip has joined the channel [13:41] maushu has joined the channel [13:42] jamesduncan has joined the channel [13:43] Spion has joined the channel [13:44] SvenDowideit has joined the channel [13:44] tmedema: SubStack: it works by adding the following line to the top of the file: "var io = window.io = module.exports;" [13:44] anderson__ has joined the channel [13:45] anderson__: I am trying to get node and juggernaut up an running..but I got [13:45] anderson__: process.nextTick error, or 'error' event on first tick [13:45] tmedema: Actually, much better, simply "var io = module.exports;" works. [13:45] anderson__: when I try node server.js [13:45] anderson__: any ideas or help ? [13:47] TheCoreh has joined the channel [13:47] TheCoreh has joined the channel [13:48] fdenbow has joined the channel [13:50] zgryw: mape: what is jquery.cookie used for in node-express-boilerplate? [13:53] abjorn has joined the channel [13:54] Zuardi_ has joined the channel [13:55] SvenDowideit has joined the channel [13:57] jacobolus has joined the channel [13:57] rmcastil has joined the channel [14:00] Fabryz: How to see if I have a npm module installed globally on my machine? and which version [14:00] CoverSlide: npm-g ls [14:01] Fabryz: CoverSlide thanks [14:05] charleso has joined the channel [14:06] museic has joined the channel [14:07] NetRoY has joined the channel [14:07] slip has joined the channel [14:07] slip has joined the channel [14:07] ceej has joined the channel [14:08] DrMcKay: if I have a directory structure typical to node package (lib and test in one directory), is it a good practice to reference lib by a relative path? [14:08] [[zzzz]] has joined the channel [14:09] CoverSlide: DrMcKay: usually i have a `"main": "./lib/package-name.js"` line in my package.json file, and my test script simply use a relative path to the base dir [14:10] jesster7 has joined the channel [14:10] schwab has joined the channel [14:10] skm has joined the channel [14:10] DrMcKay: CoverSlide: ah, good, thanks [14:10] simenbrekken: has console.dir changed in 0.4.11? It no longer prints infinite depth [14:11] MrNko has joined the channel [14:12] micheil has joined the channel [14:15] slip has joined the channel [14:16] nodokodo has joined the channel [14:18] tmedema: Why would the following cause an "Illegal Invocation" error in the browser? console.debug.apply(this, arguments); [14:19] CoverSlide: maybe apply(console ? [14:19] jtsnow has joined the channel [14:19] boehm has joined the channel [14:20] JakeyChan has joined the channel [14:23] zemanel has joined the channel [14:23] tmedema: CoverSlide: of course, major thanks ;) [14:24] phoe6 has joined the channel [14:25] bosky101 has joined the channel [14:27] smus has joined the channel [14:28] Destos has joined the channel [14:28] hakunin has joined the channel [14:29] gerad has joined the channel [14:29] nibblebot has joined the channel [14:29] markwubben has joined the channel [14:31] antono has joined the channel [14:32] slip has joined the channel [14:33] zilch_ has joined the channel [14:33] gerad: Zuardi: you still want your repo public? [14:33] Peniar has joined the channel [14:33] Sidnicious has joined the channel [14:33] Sidnicious has joined the channel [14:35] Zuardi: gerad: yes [14:35] gerad: what's your team slug? [14:35] Zuardi: gerad umeboshi-fireteam-2 [14:36] gerad: Zuardi: done [14:37] gerad: Zuardi: and made you admin on it [14:37] JakeyChan has joined the channel [14:37] gerad: Zuardi: don't change the repo name or anything [14:38] w3dot0 has joined the channel [14:40] bosky101 has joined the channel [14:40] Zuardi: gerad: we did chjanged our team name to "sai do fusca" on the knockout website [14:41] Zuardi: gerad: ok, I wont change the github name [14:41] zilch_ has joined the channel [14:42] slip has joined the channel [14:42] andrebla has joined the channel [14:43] mrdoodles has joined the channel [14:44] Zuardi: gerad: andrebla is here with us (other team) and he wants to make their repo public as well, please help him :) [14:44] andrebla: I want to become a admin of my repository to make it public [14:44] mrdoodles: hey everyone, if i insert a string into mongo with mongoose like "hi I've done an insert" and it becomes "hi I\ive done an insert" - how can i unescape that? [14:44] mrdoodles: i tried unescape(mongoString); [14:44] jga023 has joined the channel [14:44] andrebla: team slug: power-ups [14:46] CoverSlide: mrdoodles: str.replace i think [14:47] mrdoodles: hmm ok ... [14:47] sjbreen has joined the channel [14:47] CoverSlide: escape / unescape use uri encoding [14:47] cying has joined the channel [14:47] mrdoodles: ahh [14:48] huskyr_: hi guys [14:48] huskyr_: how do i do html entities decode/encode? [14:48] CoverSlide: unfortunately there's no equivalent to php's addslashes / stripslashes, has do be done manually, although fairly trivial to implement [14:48] slip has joined the channel [14:49] ryanfitz has joined the channel [14:49] CoverSlide: huskyr_: https://github.com/substack/node-ent [14:49] CoverSlide: npm install ent [14:49] huskyr_: CoverSlide: great [14:49] huskyr_: thanks ! [14:50] SubStack: entities aren't the same as slashes [14:50] Sembiance: happy hurricane irene day :) [14:51] CoverSlide: yeah the slashes stuff was for mrdoodles [14:51] jtsnow has joined the channel [14:51] facorreia has joined the channel [14:51] mrdoodles: :P thx CoverSlide [14:51] mrdoodles: clear [14:51] japj has joined the channel [14:52] geetarista has joined the channel [14:54] [[zz]] has joined the channel [14:54] k1ttty has joined the channel [14:57] eazyigz has joined the channel [14:58] slip has joined the channel [14:59] else has joined the channel [14:59] Fabryz: anyone can link a simple but recent tutorial/screencast for mongoose? [15:01] rafaelcaricio has joined the channel [15:03] gartenstuhl has joined the channel [15:04] gtramont1na: Did any1 manage to make websockets work on joyent?! [15:04] kenperkins has joined the channel [15:05] JakeyChan has joined the channel [15:08] _dc has joined the channel [15:09] Ragnis has joined the channel [15:09] mrdoodles has joined the channel [15:10] zilch_ has joined the channel [15:10] sivy has joined the channel [15:10] devrim has joined the channel [15:11] mape: zgryw: the frontend development.js [15:11] mape: keeping track of the overlay [15:14] Ragnis has left the channel [15:14] zilch_ has joined the channel [15:15] cmichi has joined the channel [15:15] trentm has joined the channel [15:15] Ragnis has joined the channel [15:16] slip has joined the channel [15:16] JakeyChan has joined the channel [15:16] zilch_ has joined the channel [15:16] fly-away has joined the channel [15:17] aconbere has joined the channel [15:18] bosky101 has joined the channel [15:18] lunks has joined the channel [15:21] jerrysv has joined the channel [15:21] mrdoodles: hey everyone, I'm using els, and if i log my news object it looks fi ne. however in my view, i get escaped html :/ I've tried unescape … i think els does it … <%= news[i].body %> [15:22] z6Dabrata has joined the channel [15:23] bassui has joined the channel [15:23] sivy has joined the channel [15:24] mrdoodles: anyone? [15:24] mrdoodles: so now i have this escaped html from express / els .. [15:24] CoverSlide: mrdoodles: try <%- news[i].body %> [15:24] sivy has joined the channel [15:25] jtsnow has joined the channel [15:25] facorreia has joined the channel [15:25] mrdoodles: ahhhh [15:25] erickt has joined the channel [15:25] mrdoodles: CoverSlide: thanks! [15:25] Cromulent has joined the channel [15:25] mrdoodles: why is that ... [15:25] mrdoodles: i know that is what i do with body ... [15:25] andrewfff has joined the channel [15:25] CoverSlide: there is escaped and unescaped output [15:25] mrdoodles: err the view inside the layout ... [15:25] mrdoodles: ahhh [15:25] mrdoodles: so %= is escaped [15:26] mrdoodles: ok [15:26] mrdoodles: vs. %- [15:26] mrdoodles: cool [15:26] slip has joined the channel [15:26] markwubben has joined the channel [15:28] jtsnow has joined the channel [15:29] amigojapan has joined the channel [15:29] Charuru has joined the channel [15:31] cjm has joined the channel [15:31] Wizek_ has joined the channel [15:35] piscisaureus has joined the channel [15:35] slip has joined the channel [15:36] massivebiz has joined the channel [15:37] neilk_ has joined the channel [15:37] zilch_ has joined the channel [15:37] MrNko has joined the channel [15:38] eazyigz has joined the channel [15:38] _dc has joined the channel [15:38] brianseeders has joined the channel [15:39] Spion_ has joined the channel [15:40] mikeal1 has joined the channel [15:42] amigojapan_ has joined the channel [15:48] heavysixer_ has joined the channel [15:48] massivebiz has joined the channel [15:48] bassui: For Jade, do we now use compile() instead of jade.renderFile()? [15:51] slip has joined the channel [15:53] wookiehangover has joined the channel [15:54] mkrecny has joined the channel [15:54] mkrecny has left the channel [15:55] mkrecny has joined the channel [15:55] mkrecny: any help: I need a simple robust key value store that writes to disk - or a way to make redis do this [15:56] Eugene_ has joined the channel [15:57] slip has joined the channel [15:58] museic has joined the channel [15:58] zilch_ has joined the channel [15:59] Eugene_: Hi all! I'm learning Express, and trying to render a Jade template with client-side JS code. Is this possible with native Express? [16:00] z6Dabrata has joined the channel [16:00] mnutt has joined the channel [16:01] jchris has joined the channel [16:01] jesster7 has joined the channel [16:01] martyziff has joined the channel [16:02] jvduf has joined the channel [16:02] slip has joined the channel [16:03] zilch_ has joined the channel [16:04] jesster7 has joined the channel [16:04] randylien has joined the channel [16:05] markwubben has joined the channel [16:06] trentm has joined the channel [16:06] robotmay has joined the channel [16:07] clifton has joined the channel [16:11] Sorella has joined the channel [16:12] TheCoreh has joined the channel [16:12] TheCoreh has joined the channel [16:12] versicolor has joined the channel [16:12] CarterL has joined the channel [16:14] achiu has joined the channel [16:14] ryanfitz has joined the channel [16:15] slip has joined the channel [16:16] mike5w3c_ has joined the channel [16:16] JakeyChan has joined the channel [16:17] zmbmartin: SubStack: how do I move to the next seq from this --> https://gist.github.com/1175550 [16:17] zilch_ has joined the channel [16:17] MrNko has joined the channel [16:18] newy has joined the channel [16:18] edude03 has joined the channel [16:18] nibblebot has joined the channel [16:18] zilch_ has joined the channel [16:19] markwubben has joined the channel [16:20] yept has joined the channel [16:20] skm has joined the channel [16:21] Kami_ has joined the channel [16:21] markdaws has joined the channel [16:21] zilch_ has joined the channel [16:22] clifton has joined the channel [16:22] CrabDude has joined the channel [16:23] infynyxx has joined the channel [16:24] junkee[] has left the channel [16:24] jamescarr has joined the channel [16:26] Qbix1 has joined the channel [16:26] bwinton has joined the channel [16:28] slip has joined the channel [16:28] zilch_ has joined the channel [16:29] kmiyashiro has joined the channel [16:32] booo has joined the channel [16:32] gsmcwhirter has joined the channel [16:35] martyziff has left the channel [16:36] yawNO has joined the channel [16:36] Jiin` has joined the channel [16:37] kenperkins has joined the channel [16:37] sirdancealot has joined the channel [16:37] antono has joined the channel [16:37] zilch_ has joined the channel [16:37] slip has joined the channel [16:38] tbassetto_cloud_ has joined the channel [16:38] jamescarr: my friend on a MBP is getting 500 errors: HMAC Error [16:39] jamescarr: any ideas what might cause this? [16:41] TheJH: !issue search HMAC Mac Book [16:41] jhbot: found issues: 1 [16:41] jhbot: Issue: #556: Segmentation fault with test-crypto on OS X 10.6 [16:41] jamescarr: 10.5 [16:41] zilch_ has joined the channel [16:41] jamescarr: must be the same thing [16:41] jamescarr: FUCK! [16:42] creationix has joined the channel [16:42] creationix has left the channel [16:42] kenperkins: anyone had their nodejs application linked in a techcrunch article? [16:42] TheJH: jamesarosen, [16:42] TheJH: oops [16:43] TheJH: jamescarr, is he asking because npm fails or so? [16:43] jamescarr: no.. everyauth fails [16:44] japj: TheJH: would it be possible to a add a http link to the issue search? [16:44] TheJH: japj, hmm, yes [16:45] jamescarr: TheJH, we;re using everyauth and he gets that HMAC error when loading pages [16:45] achiu has joined the channel [16:45] zilch_ has joined the channel [16:46] Aphelion has joined the channel [16:46] sylvinus: where can i see the logs of my app on no.de ? [16:46] slip has joined the channel [16:48] ryanj has joined the channel [16:48] mykul|Home has joined the channel [16:49] dob_ has joined the channel [16:49] zilch_ has joined the channel [16:50] fdenbow has joined the channel [16:50] jhbot has joined the channel [16:50] TheJH: !issue search HMAC Mac Book [16:50] jhbot: found issues: 1 [16:50] jhbot: Issue: https://github.com/joyent/node/issues/556 : Segmentation fault with test-crypto on OS X 10.6 [16:50] TheJH: :) [16:50] creationix has joined the channel [16:51] japj: /cheer [16:51] creationix: node-waf hates me! [16:52] nickgreenie has joined the channel [16:52] zilch_ has joined the channel [16:55] Jiin` has left the channel [16:55] piscisaureus has joined the channel [16:56] chrisumbel has joined the channel [16:56] jhbot has joined the channel [16:56] jamesarosen: anyone using everyauth with Twitter? I keep getting an exception when trying to go to /twitter/auth to start the process [16:56] chrisumbel_ has joined the channel [16:57] skm has joined the channel [16:58] zilch_ has joined the channel [16:58] gerad: jamesarosen: the node knockout site uses everyauth (via mongoose auth) [16:58] jamesarosen: I think I'm using the wrong key/secret. I'll check tht [16:58] gerad: jamesarosen: https://github.com/nko2/website/blob/master/models/person.coffee#L56 [16:59] gerad: jamesarosen: sounds smart… you probably don't need the findOrCreateuser bit [16:59] kenperkins: what is node-waf [16:59] jamesarosen: no? how should I take the twitter user info and store it then? [16:59] markwubben has joined the channel [16:59] aconbere has joined the channel [17:00] bartt has joined the channel [17:00] zilch_ has joined the channel [17:01] eazyigz has joined the channel [17:01] gerad: jamesarosen: it happens automatically with mongoose auth [17:01] jamesarosen: gerad: what's mongoose? Why would I want it? [17:02] jamesarosen: oh, we're not using Mongo [17:02] jamesarosen: we're using Couch for the datastore [17:02] zilch_ has joined the channel [17:04] tc_ has joined the channel [17:05] jesster7 has joined the channel [17:05] Juan77 has joined the channel [17:05] aheckmann has joined the channel [17:06] zilch_ has joined the channel [17:06] d0k has joined the channel [17:07] Aphelion has joined the channel [17:07] Zuardi has joined the channel [17:07] jamescarr: heh [17:08] CrabDude has joined the channel [17:09] jhbot has joined the channel [17:10] willwhite has joined the channel [17:11] arthurdebert has joined the channel [17:11] micheil has joined the channel [17:12] zilch_ has joined the channel [17:12] bassui has left the channel [17:12] jakehow has joined the channel [17:12] clifton has joined the channel [17:12] jakehow__ has joined the channel [17:12] jakehow_ has joined the channel [17:13] tmpvar has joined the channel [17:13] slip has joined the channel [17:14] jvduf has joined the channel [17:17] ryanj has joined the channel [17:17] jMCg has left the channel [17:17] zilch_ has joined the channel [17:18] lol has joined the channel [17:18] lol: yo all [17:18] lol: got some freaking problems with cyclic requires... anyone dealt with them? [17:20] slip has joined the channel [17:21] piscisaureus has joined the channel [17:22] chjj: lol: whats the problem? [17:22] andrebla has joined the channel [17:22] lol: i have two modules [17:22] lol: A and B [17:23] arlolra has joined the channel [17:23] dimroc has joined the channel [17:23] infynyxx has joined the channel [17:23] chjj: you can have circular requires as long as the second one requires the first one after the first is cached [17:23] lol: chjj: i require A in B and B in A. In B, when i require A the require gives me back an empty Object. [17:24] chjj: you can access A's exports from B by doing module.parent.exports [17:24] chjj: small trick not many people use [17:24] lol: will se if that works [17:24] CarterL has joined the channel [17:24] chjj: lol: why do i always feel youre laughing at me? [17:24] lol: chjj :-D [17:25] sylvinus: we *do* have websockets working in no.de [17:25] Spacerat has joined the channel [17:25] lol: chjj that freaking works. [17:25] lol: is that a legal way to do tingz? [17:25] lol: i mean is it a "hack" or something? [17:25] chjj: lol: i forgot to tell you, you have to put the stuff on A's exports before the require to B takes place, remember its all sync [17:26] jacobolus has joined the channel [17:26] chjj: it is totally not a hack [17:26] chjj: its just a trick no one except me uses ;p [17:26] lol: but then why a simple require does not work? i think i do everything a right way [17:26] chjj: think ill blog about it or something to popularize it so it feels less hackish to everyone [17:27] lol: in a * [17:27] chjj: lol, because when B requires A, A has not been cached yet, so it starts requiring B again [17:27] chjj: resulting in an infinite loop [17:27] MrNko has joined the channel [17:27] lol: wait [17:27] lol: another problem... [17:28] lol: .... [17:28] chjj: ? [17:28] lol: i have A1, A2, A3 and B [17:28] lol: :D [17:28] chjj: oh lol [17:28] bartt has joined the channel [17:28] CarterL has joined the channel [17:28] lol: and referencing A1, A2, A3 from B [17:28] lol: and vica versa [17:28] lol: i can put the require in a method i noticed [17:28] lol: to delay it, so its already cached [17:29] lol: is that a valid solution too? [17:29] chjj: well you could expose them to B through A1 [17:29] chjj: yes [17:29] chjj: very valid [17:29] chjj: if you dont have to worry about using the stuff right away in B [17:29] z6Dabrata has joined the channel [17:29] lol: it feels less right though [17:29] chjj: but if you dont want to make require calls all the time [17:29] lol: i dont want to [17:29] chjj: you can do process.nextTick(function() { a = require('./a'); }); [17:30] chjj: ;p [17:30] lol: now thats a hack i can smell [17:30] lol: :D [17:30] chjj: lol [17:30] chjj: look at the require code, thats the way its meant to work! [17:30] chjj: ;p [17:30] lol: ? [17:30] lol: im aint that good man :D [17:30] lol: dunno if you joking now [17:31] necrodearia has joined the channel [17:31] chjj: i mean, its meant to work that way, to be possible to require modules anywhere once theyre cached [17:31] chjj: totally not a hack ;) [17:31] piscisaureus has joined the channel [17:31] prashanth_ has joined the channel [17:31] lol: im gonna read the documentation not that i dont trust you man [17:31] jamesarosen: everyauth's default logout action doesn't seem to be clearing my session. anyone seen this? [17:31] lol: :D [17:32] Wizek_ has joined the channel [17:32] navaru has joined the channel [17:32] MrNko has joined the channel [17:33] chjj: lol: personally i would go with the other way [17:33] jamesw_ has joined the channel [17:33] lol: chjj which other way we talked about two dozen solutions :D [17:34] MrNko has joined the channel [17:34] prashanth_: can someone lead me to some applications which have been developed over node.js ?? [17:35] prashanth_: or what sort of applications can be developed over node.js as I am a newbie !! [17:35] jhbot has joined the channel [17:35] lol: prashanth_ anything webby really if you have the patience to tackle the callbacks [17:35] zomgbie has joined the channel [17:36] csanz has joined the channel [17:36] prashanth_: ok can i hv an example as such ?? As I was just reading about the same bt am stil not getting the concept of event driven stuff of Node.js [17:37] zilch_ has joined the channel [17:37] pizthewiz has joined the channel [17:37] neorab has joined the channel [17:38] lol: look up async programming [17:39] fdenbow has joined the channel [17:39] prashanth_: ok thanks shall do that !! can u point me a good link to the same ?? [17:39] zilch_ has joined the channel [17:39] jesster7 has joined the channel [17:40] lol: http://www.infoq.com/articles/surviving-asynchronous-programming-in-javascript [17:40] lol: look for the first few sentences [17:40] lol: you will got it [17:40] aaronblohowiak has joined the channel [17:40] lol: get it* [17:40] Sidnicious has joined the channel [17:40] Sidnicious has joined the channel [17:40] prashanth_: Thanku !! [17:40] prashanth_: shall do that [17:40] JakeyChan has joined the channel [17:40] lol: yer welcome [17:42] chjj: prashanth_: anything can be coded in node.js ;), jslinux runs in node.js, we has operating systems for node.js! [17:42] ryanfitz has joined the channel [17:43] chjj: that "has" was unintentional, but it sounds funny so i didnt correct myself [17:43] DTrejo has joined the channel [17:44] Me1000 has joined the channel [17:45] hackband has joined the channel [17:45] jacobolus has joined the channel [17:46] jamescarr: can stylus be used on the client side? [17:47] infynyxx has joined the channel [17:47] isaacs has joined the channel [17:48] hackband has joined the channel [17:48] TheJH: jamescarr, you could try whether browserify can handle it [17:48] aliem has joined the channel [17:48] ke1s0 has joined the channel [17:49] csanz: jamescarr: what do you mean? stylus compiles to css... browser doesn't know the stylus format [17:49] chjj: hence using stylus to compile it [17:49] w3dot0 has joined the channel [17:50] chjj: with a lot of tweaks it might be doable [17:50] TheJH: csanz, maybe he wants something like "live stylus compilation"? [17:50] TheJH: chjj, why "a lot of tweaks"? [17:50] chjj: im not sure, im guessing it uses various node apis and ES5 features possibly [17:51] rickharrison has joined the channel [17:51] chjj: and maybe non-standard things like __proto__ [17:51] chjj: not sure, just guessing [17:51] TheJH: chjj, I think browserify can handle the node API stuff [17:51] zomgbie has joined the channel [17:52] chjj: yeah, for the most part [17:53] piscisaureus_ has joined the channel [17:53] JakeyChan has joined the channel [17:53] chjj: you will still need to tweak the __proto__ out [17:53] chjj: theres no way to shim that in [17:54] chjj: unless browserify handles that when it bundles things? [17:54] __sorin__ has joined the channel [17:54] chjj: not sure [17:54] chjj: itd be cool if it did [17:54] TheJH: jamesarosen, just try it :D [17:56] Juan77 has joined the channel [17:56] dthompso99 has joined the channel [17:57] slip has joined the channel [17:57] zilch_ has joined the channel [17:59] squidgykeys has joined the channel [18:00] patcito has joined the channel [18:01] mjr_ has joined the channel [18:03] alts has joined the channel [18:04] guillermo has joined the channel [18:04] felixhummel_ has joined the channel [18:08] slip has joined the channel [18:08] kenperkins has joined the channel [18:10] jamesarosen: TheJH: was that meant for me? if so, what is "it"? [18:11] TheJH: jamesarosen, not for you. meh, two "james" is a bad idea :( [18:11] TheJH: jamescarr, just try it :D [18:12] firebus has joined the channel [18:12] jamescarr: TheJH, huh? [18:12] TheJH: jamescarr, browserify [18:12] firebus: is there a template engine that will produce dynamic javascript output? or a best practice for generating dynamic .js files? [18:14] industrial: firebus: what do you mean by dynamic output? [18:15] industrial: firebus: also, you can prettymuch output any text format with any kind of template [18:15] firebus: depending on the contents of foo.js differ [18:15] idefine has joined the channel [18:16] firebus: industrial orly? many template engines seem to assume you want to output dom [18:17] eazyigz has joined the channel [18:17] zilch_ has joined the channel [18:17] fille has joined the channel [18:18] industrial: well, take PHP for example. it's a template engine itself. [18:18] industrial: you can write anything outside of tags, HTML or JS or whatever [18:18] squidgykeys has left the channel [18:18] newy has joined the channel [18:19] topaxi has joined the channel [18:20] huskyr_ has joined the channel [18:20] firebus: :) i'm looking for a node.js templating system - sorry for not making that explicit :) it would be hilarious to use php inside node thought - if there's a good way to do that, i wanna know! [18:21] boogyman has joined the channel [18:21] industrial: its probably pretty easy to implement in JS, just concatenate everything together. Here's one I did in Lua; https://github.com/Industrial/luablog/blob/master/lib/template.lua [18:22] zilch_ has joined the channel [18:22] ank has joined the channel [18:23] firebus: industrial: thanks! [18:23] industrial: I did use loadstring (eval) though. [18:24] randylien has joined the channel [18:24] kenperkins has joined the channel [18:26] sb1752 has joined the channel [18:27] hackband has joined the channel [18:27] tedsuo has joined the channel [18:28] slip has joined the channel [18:29] firebus has left the channel [18:29] gerad has joined the channel [18:30] mrdoodles has joined the channel [18:30] jxck has joined the channel [18:31] DrMcKay: oh, that feeling of acomplishment when all tests pass [18:31] zilch_ has joined the channel [18:33] zgryw1 has joined the channel [18:33] dannycoates has joined the channel [18:41] alts has joined the channel [18:41] foo2 has left the channel [18:43] dgathright has joined the channel [18:43] Orion- has joined the channel [18:45] dimroc has joined the channel [18:46] pekim_ has joined the channel [18:47] seebees has joined the channel [18:47] MrNko has joined the channel [18:47] aho has joined the channel [18:50] jakehow has joined the channel [18:50] jxck_ has joined the channel [18:50] jakehow_ has joined the channel [18:50] jakehow__ has joined the channel [18:51] indexzero has joined the channel [18:53] slip has joined the channel [18:55] fmeyer has joined the channel [18:56] jhurliman has joined the channel [18:56] sb1752 has left the channel [18:57] daithi44_p has joined the channel [19:00] chrislorenz has joined the channel [19:01] slip has joined the channel [19:01] isaacs: anyone got a really good websockety test page that really slams the server with ws messages? [19:02] dmkbot has joined the channel [19:02] isaacs: that works in chrome? [19:03] boltR has joined the channel [19:03] TheJH: isaacs, wouldn't the test service also have to know what kinds of messages it should send? [19:03] teadict: websockety is a funny word [19:03] jamesarosen has joined the channel [19:03] isaacs: TheJH: not a test service. [19:04] isaacs: just some app or something that does a bunch of web sockets [19:04] TheJH: isaacs, but it would have to, right? [19:04] isaacs: oh, i dunno [19:07] slifty has joined the channel [19:08] tekkie00 has joined the channel [19:08] markwubben has joined the channel [19:09] maushu: Windows, YOU FOOL! [19:09] maushu: I need to fork! [19:10] Juan77 has joined the channel [19:11] aliemmo has joined the channel [19:11] teadict: if forking is the action of branching a given repository, isn't the action of merging two repositories called spooning? [19:11] calebc has joined the channel [19:11] jkj_: :D [19:11] armando_neto has joined the channel [19:12] jkj_: http://xkcd.com/419/ [19:12] DrMcKay: teadict: :D [19:12] alts has joined the channel [19:12] calebc: If I have set up a validation for a field in Mongoose, and the model fails validation when calling save, does the callback still get called? I'm not seeing it happen. I do see the validation function run [19:13] calebc: and the validation returns false [19:13] teadict: no wonder GitHub didn't implement it [19:14] slip has joined the channel [19:14] DrMcKay: teadict: lol'd [19:14] teadict: :) [19:14] mkrecny has left the channel [19:15] infynyxx has joined the channel [19:15] teadict: instead of the big arrow and the tiny one on the side, there would be two big arrows spooning in a tiny bed [19:16] teadict: github should consider this [19:17] torsd has joined the channel [19:21] slifty has joined the channel [19:23] slip has joined the channel [19:23] jbpros has joined the channel [19:23] ingenthr has joined the channel [19:23] kenperkins has joined the channel [19:25] jetienne has joined the channel [19:25] tk has joined the channel [19:26] huskyr_ has joined the channel [19:26] bassui has joined the channel [19:29] rDx3 has joined the channel [19:29] slip has joined the channel [19:30] [[zz]] has joined the channel [19:30] liveink has joined the channel [19:31] irahgel has joined the channel [19:31] trentm has joined the channel [19:32] huskyr_ has joined the channel [19:32] japj: `3rdEden: did you still have that socket.io error on no.de? [19:33] _dc has joined the channel [19:34] slip has joined the channel [19:36] derferman has joined the channel [19:36] nickgreenie has joined the channel [19:37] z6Dabrata has joined the channel [19:39] chjj: i really hate captchas [19:39] tbranyen: same [19:39] soapyillusions has joined the channel [19:40] boltR has joined the channel [19:41] sharkbird has joined the channel [19:41] scas has joined the channel [19:41] maushu: Does a child_process.fork ever exit by itself? [19:41] postwait has joined the channel [19:43] konobi: maushu: not unless you stop listening for events from the parent [19:44] chjj: i really shouldnt have to ask for a new captcha 15 times before i can get one thats readable [19:44] maushu: Ah. [19:45] beryt has joined the channel [19:46] beryt: hello [19:46] skm has joined the channel [19:46] ingenthr: hi [19:47] beryt: I got a question [19:47] marcosvm has joined the channel [19:47] beryt: regarding trading illegally [19:48] mh` has joined the channel [19:49] riven` has joined the channel [19:49] TheJH: beryt, how is that related to node? [19:49] beryt: what is nod? [19:49] beryt: i am kinda new [19:49] beryt: what is a node? [19:49] beryt: ieuw [19:49] TheJH: beryt, you are in #node.js - this is a channel related to serverside javascript [19:49] beryt: better leave i am out of my league here [19:50] stride: wtf [19:50] bassui: ROFL [19:50] mh`: haha [19:50] CrisO has joined the channel [19:50] mh`: hi all, is fs.sendfile() deprecated? been awhile, i'm using 0.4.x and i don't see it in the docs [19:51] ryanfitz has joined the channel [19:51] slip has joined the channel [19:52] TheJH: mh`, it's not in the docs because it's not supported on some OSes [19:52] Nexxy has joined the channel [19:52] DrMcKay: TheJH: could you give me some example result on how this snappy *should* be working? [19:52] CrisO has joined the channel [19:52] mh`: TheJH: oh, ok [19:53] TheJH: DrMcKay, one sec... [19:53] mh`: it's still 'supported' to use it on sendfile() enabled OSes though? [19:53] mrdoodles: hi everyone. i understand javascript scope extremely well but on node … not as well. this is really vexing me. i have a lib i call "Provider". it is wrapped as a global and is exported and instantiated in my main express app. [19:53] marcello3d has joined the channel [19:53] mrdoodles: so i want to separate out my mongoose models into a folder called "models". so if i just require i get no dice? http://pastebin.com/gvJDhDes [19:54] JumpMast3r has joined the channel [19:55] mrdoodles: so if inside my library which i had it in before i just add - require("../models/User"); i get - ReferenceError: User is not defined [19:55] Anton_ has joined the channel [19:56] DrMcKay: TheJH: funny thing is, Python lib works the same way -.- [19:56] jhine has joined the channel [19:57] jhine: Hi. Not sure if I'm doing something wrong but I've got a js file with console.log("Hello World"); in it and i run it with node file.js but I just get '...' [19:57] trentm has joined the channel [19:59] CrisO has joined the channel [19:59] slip has joined the channel [19:59] jamescarr: putting a res.render inside of a mongoose callback seems a little horrendous! [19:59] creationix has left the channel [20:00] mrdoodles: jamescarr: ? me? [20:00] sfoster has joined the channel [20:00] jhine: Anyone? [20:01] huskyr_ has joined the channel [20:02] prettyrobots has joined the channel [20:02] alts has joined the channel [20:03] TheJH: DrMcKay, meh, finding an example is harder than I thought - can't figure out how I was able to invoke snappy from the erlang console :( [20:03] Nuck has joined the channel [20:04] DrMcKay: TheJH: OK, I'll try to find out [20:04] sirdancealot has joined the channel [20:04] CrisO has left the channel [20:05] bnoguchi has joined the channel [20:05] bnoguchi has left the channel [20:05] mrdoodles: anyone here? :/ [20:05] tbranyen: no i just left [20:05] mrdoodles: anyone using mongoose that can save me for the day? :P [20:05] CrisO_ has joined the channel [20:05] slip has joined the channel [20:05] tbranyen: ah hell naw sorry bro :( [20:06] industrial: there is also a very small #mongoose [20:06] tbranyen: i used mongo-native [20:06] Drakonite has joined the channel [20:06] industrial: mrdoodles: lemmesee [20:07] industrial: mrdoodles: you aren't exporting it [20:07] mrdoodles: industrial: i tried that also on this - http://pastebin.com/gvJDhDes [20:07] dannycoates has joined the channel [20:07] mrdoodles: if i use this line? [20:07] mrdoodles: exports.User = User; [20:08] jamesw_: what's the problem mrdoodles? [20:08] mrdoodles: industrial: basically id like to have all of my models separately within /models [20:08] MrNko has joined the channel [20:08] plow has joined the channel [20:09] jhine: Could anyone tell me why I get "..." when I try to do node m.js [20:09] JaKWaC has joined the channel [20:09] tbranyen: jhine: non matching quotes [20:09] tbranyen: and some really shitty onesbe [20:09] jamesw_: jhine: you are entering the nodejs console [20:09] tbranyen: crap stupid trackpad [20:09] jamescarr: man [20:09] tbranyen: jamesw_: lol thats probably it [20:09] plow: hi, got a bit of a general question, how is node's web server embedded in the engine? Can someone point me to an article on this please? [20:09] jamescarr: this is a little frustrating [20:09] jamesw_: mrdoodles: what is your problem with using /models? [20:09] Nuck: plow: Simply put, there is no web server. [20:10] jhine: tbranyen, the only thing in the m.js file is console.log("Hello World"); [20:10] mrdoodles: jamesw_: / industrial - i use this line - mongoose.model("User", require("./models/User").User); [20:10] plow: Nuck: how would I do it in say Java then? [20:10] Nuck: There is an HTTP parser which wraps around a TCP socket server [20:10] Nuck: You are dealing with raw HTTP requests, essentially [20:10] mrdoodles: for this - http://pastebin.com/FyC5qGu9 [20:11] plow: Nuck: so does that mean you have to write a web app and a web server to be efficient? [20:11] jamesw_: mrdoodles: well, I don't know if I'm doing it right, but to get ours working each model.js file needs 4 things minimum [20:11] mrdoodles: jamesw_: sweet, do show :P [20:11] industrial: mrdoodles: http://pastebin.com/dBFP0BEi [20:11] mrdoodles: i just need my M for my MVC [20:11] TheJH: DrMcKay, `snappy:compress(<<255,255,255>>).` says `{ok,<<3,8,255,255,255>>}` [20:11] jamesw_: mongoose, a Schema definition, "mongoose.model('myModel', mySchema) and module.exports = mySchema [20:11] Nuck: plow: You are creating a web server by hooking the request events. You do this as part of your web app. [20:11] jamesw_: then in the app.js file [20:11] industrial: I do it like that, because then you keep a reference to all three [20:11] jamesw_: 2 different lines of code [20:12] plow: Nuck: why does something Like apache have so much mystique then? [20:12] tylerstalder has joined the channel [20:12] Nuck: plow: Because that's not Node, that's Apache. It *is* a webserver [20:12] jamesw_: var UserSchema = require('./lib/Model/User').User; and var User = mongoose.model('User'); [20:12] Nuck: The PHP file is run with each page load [20:12] jamesw_: if I don't have both those lines of code, it doesn't work [20:12] industrial: keeping a reference to user_schema is a good thing because you can use it for embedding into other documents but still keep it in its separate model file [20:12] schwab has joined the channel [20:12] Nuck: On Node, you run it once and it is the server [20:12] Nuck: It just waits for requests and responds to them accordingly [20:12] plow: Nuck: I would love to have such a simple web server written in Scala, that's why I ask, thanks! [20:13] ryanfitz has joined the channel [20:13] plow: Nuck: the non-blocking/async stuff is superb too [20:13] industrial: because Mongoose does not take {type: OtherSchema} but it will take {type: [OtherSchema]} or {type: other_schema}, where with the last its just an embedding of the object structure [20:13] Nuck: plow: Well, Java sucks, you should use Node. :P [20:13] Nuck: We're also extremely scalable. [20:14] plow: Nuck: I think type-safety is a must-have on large projects, one more thing, how come Node can support so many more concurrent connections than Apache, is that just an Apache setting? [20:14] maushu: plow, node uses events, apache uses threads [20:14] mikeal has joined the channel [20:14] Nuck: plow: Not at all, that's the evented nature of Node. [20:14] CrisO_: mrdoodles, is this what you're trying to do ? http://pastebin.com/UsazWF2T [20:14] plow: Nuck: an actor model in Scala/Erlang would be pretty cool too, I hope we see node's influence spread, thanks guys [20:14] Nuck: Like I said, Node is not just another simple webserver. [20:15] Nuck: plow: PHP never had Type security :PO [20:15] Nuck: ACTION points to Wordpress and Facebook [20:15] mrdoodles: CrisO_: jamesw_ ok typing away, thanks a ton let me play with this - [20:15] plow: Nuck: what I mean is compile time type checking [20:15] mrdoodles: i was using … i won't even mention then adjusted it all when i discovered mongoose [20:16] plow: anyhoo I'm off c ya guys, great community here [20:16] Nuck: plow: Pretty sure PHP doesn't have that. It too is loosely typed. [20:16] mrdoodles: mongoose btw is AMAZING. the issue was now I've gotten "pretty good" and i wasn't sure how scope/exports worked with node so i had a few lib files and a gigannnnticcccc app file [20:16] z6Dabrata has joined the channel [20:16] mqueue has joined the channel [20:16] Nuck: mrdoodles: I have gone exports crazy with my code :P [20:17] mrdoodles: hehehehhe :P [20:17] Nuck: More files than lines in app.js [20:17] slip has joined the channel [20:17] industrial: same, http://pastebin.com/dBFP0BEi [20:17] industrial: I do it like that, for the project I'm working on right now at work, for about 60 models :\ [20:18] Nuck: I use node-mongo-native [20:18] industrial: How do you validate input data? [20:18] industrial: in the controller? [20:18] Nuck: What? No need [20:18] Nuck: There's no reason *to* validate. [20:18] industrial: validate _everything_ ;p [20:18] Nuck: As long as it's a legal string and fits the needs of the field, I don't give a fuck [20:20] antono has joined the channel [20:20] progme has joined the channel [20:21] rmcastil has joined the channel [20:21] V1 has joined the channel [20:21] jacobolus has joined the channel [20:22] Emmanuel` has joined the channel [20:22] mrdoodles: Hey guys, i appreciate everyone throwing in advice, i tried a few, some errors, so i eliminated everything but the code pasted basically ... [20:22] hebz0rl has joined the channel [20:23] mrdoodles: this gave me an error: http://pastebin.com/dBFP0BEi / unexpected token = …. user_schema = user_schema, [20:23] dylang has joined the channel [20:23] mrdoodles: CrisO_: this one gave me an error something like i need to register the model (but it is being registered?) [20:23] isaacs has joined the channel [20:26] bingomanatee has joined the channel [20:26] bingomanatee: Are node.js buffer ints signed or unsigned? [20:26] CrisO_: mrdoodles, your assigning using "=" instead of ":" on module.exports = {} [20:26] mrdoodles: ahh [20:27] huskyr_ has joined the channel [20:29] bnoguchi has joined the channel [20:29] mrdoodles: CrisO_: ohhh sweet, ok let me throw in some methods, this is sweet [20:29] mrdoodles: sorry i looked over the code and almost busted and nut then apple c apple v hah [20:29] elliottcable: Guise, like my shirt? http://ell.io/W8Zb [20:29] aheckmann has joined the channel [20:29] CrisO_: haha [20:29] elliottcable: yeah I need to shave, shut the fuck up, we haven’t had water or power or internet for like 48 hours [20:29] elliottcable: >,> [20:30] elliottcable: <,< [20:30] slip_ has joined the channel [20:30] dnyy has joined the channel [20:30] CrisO_: elliottcable, Irene? [20:31] Sorella has joined the channel [20:32] mrdoodles: oh man, storm is about to hit here in nyc soon [20:32] mrdoodles: our place floods :/ [20:32] jamesw_: is there a reliable way of finding out which versions of packages you are using locally so I can update my package.json correctly? [20:32] mrdoodles: jamesw_: great question I'm wondering myself. [20:32] felixhummel has joined the channel [20:33] clifton has joined the channel [20:33] jamesw_: so far I've just been doing "> 0.0.1" on the ones I don't know :\ [20:33] MrNko has joined the channel [20:33] mrdoodles: heh [20:34] mrdoodles: hey one last mongoose one, i have it going last piece of 'separation'. i was using one object i called Provider = {}; … then setting up getters/setters like this - Provider.prototype.findAllUsers = function(callback) { [20:34] atsuya has joined the channel [20:34] mrdoodles: within my model, User.js, how can i get … that there? [20:35] mrdoodles: i tried prototype obviously ... [20:35] mrdoodles: it just seems silly to setup another object just to hook prototypes to it [20:35] jrdx has joined the channel [20:35] eazyigz has joined the channel [20:36] v3ctR has joined the channel [20:36] industrial: mrdoodles: you don't for finders like that. [20:37] industrial: User.find({}, cb) [20:37] slip has joined the channel [20:37] mrdoodles: yeah [20:37] jamesw_: use statics [20:37] hackband has joined the channel [20:37] industrial: for other.. yeah that. [20:37] jamesw_: mySchema.statics.findAllUsers = function(){}; [20:37] towski has joined the channel [20:38] mrdoodles: ahh ok [20:38] mrdoodles: sweet [20:38] jamesw_: then in your app code you just do MyModel.findAllUsers [20:38] DrMcKay: TheJH: OK, thanks [20:39] industrial: didnt know about statics, I just put those methods directly on the model [20:39] Zuardi has left the channel [20:39] bnoguchi has left the channel [20:39] Nuck: elliottcable: YOU'RE NOT DEAD :D [20:40] jamesw_: industrial: I believe statics were added to mongoose 2.0 which came out...2 days ago [20:40] jamesw_: lots of changes in 2.0 it looks like [20:40] ixti has joined the channel [20:41] mrdoodles: i have a lot of other methods but for the sake of clarity just a find all … http://pastebin.com/ftJDQLkt [20:41] industrial: I just used User.staticMethod = function() {operate on User objects} and User.prototype.modelMethod = function() {operate on this} [20:41] tmzt_: nice, now if they could make .update() work [20:41] industrial: ^ this [20:41] mrdoodles: i remember reading about statics but error ? Cannot set property 'findAllUsers' of undefined [20:41] industrial: also, #mongoosejs [20:41] mrdoodles: ahh sorry industrial [20:42] w3dot0 has joined the channel [20:42] Wa has joined the channel [20:44] Nuck: So now I'm gonna finish up my multipart parser that will hopefully beat formidable at awesome. [20:44] mrdoodles: hah beat at awesome f t w [20:44] jamesw_: mrdoodles: make sure you are doing it to your Schema and not your Model [20:44] bassui: does anyone know how to use jade.compile()? i can't get it to work like jade.renderFile() that is now deprecated [20:44] mikeal has joined the channel [20:45] slifty has joined the channel [20:47] AvianFlu has joined the channel [20:47] slip has joined the channel [20:47] TerrapinM has joined the channel [20:48] mif86 has joined the channel [20:49] kenperkins has joined the channel [20:51] mrdoodles: jamesw_: i tried it on my model, but i get an error - http://pastebin.com/7ABLL7Pi [20:51] mrdoodles: TypeError: Object # has no method 'findAll' [20:51] DrMcKay: TheJH: this thing doesn't even want to build locally [20:51] Me1000 has joined the channel [20:51] TheJH: DrMcKay, huh? [20:52] rektide has joined the channel [20:52] DrMcKay: TheJH: C++ module fails to build with some conversion errors [20:52] cha0s has joined the channel [20:52] mrdoodles: this is driving me insannnee [20:52] TheJH: DrMcKay, the original version, from his repo? [20:52] DrMcKay: TheJH: yes [20:52] temp01 has joined the channel [20:53] slip has joined the channel [20:53] TheJH: DrMcKay, hmm, that's weird [20:53] sylvinus: any estimate on how many projects are using twitter bootstrap ? :) [20:53] DrMcKay: TheJH: yeah, from npm it installs just fine [20:53] jhine: Can you parse variables through require()? [20:53] rektide has left the channel [20:54] TheJH: DrMcKay, maybe he broke stuff in a recent commit? [20:54] jhine: wait nvm [20:55] froderik has joined the channel [20:55] boaz has joined the channel [20:56] shipit has joined the channel [20:56] zomgbie has joined the channel [20:56] MrNko has joined the channel [20:56] ryanfitz has joined the channel [20:56] DrMcKay: TheJH: no, even tags can't build properly [20:56] markwubben has joined the channel [20:56] TheJH: DrMcKay, hmm, weird [20:57] tmedema has joined the channel [20:57] froderik: If i never get any data callback despite that really think i should is there any typical gotchas to look for? [20:57] tmedema: With NPM, how do I check for outdated versions of modules while not taking my project's package.json into consideration? I want to see if I should up the version in package.json for any modules and update. [20:57] felixhummel has joined the channel [20:58] DrMcKay: TheJH: I'll update my node, maybe headers changed [20:59] javajunky has joined the channel [20:59] ryantm has joined the channel [20:59] CIA-69: libuv: 03Igor Zinkovsky 07master * r925564e 10/ src/win/fs.c : windows: improve error handling for fs functions - http://git.io/Ya0Z1g [21:00] sharkbird has joined the channel [21:00] ryanfitz has joined the channel [21:00] slip has joined the channel [21:01] saimon_ has joined the channel [21:02] MrNko has joined the channel [21:03] saimon_: isaacs: are you available to lend a hand to a nodeknockout competitor? I'm having trouble with npm install, it's giving me a perm issue when chmoding package.tgz (under ubuntu) [21:03] museic has joined the channel [21:04] CrisO has joined the channel [21:06] kenperkins has joined the channel [21:06] DrMcKay: TheJH: it still won't compile [21:08] TheJH: DrMcKay, "node-waf" works here [21:08] DrMcKay: TheJH: node-waf configure build? [21:08] TheJH: DrMcKay, works [21:09] TheJH: DrMcKay, https://gist.github.com/6c2fee5e86a00efd5fbb [21:10] DrMcKay: TheJH: shit... [21:11] arlolra has joined the channel [21:11] Silly_Wabbit has joined the channel [21:11] trentm has joined the channel [21:13] necrodearia: stisti, I still haven't figured out how to load the code in node.js [21:13] MrNko has joined the channel [21:14] slip has joined the channel [21:14] DrMcKay: TheJH: I get errors from node headers :/ [21:16] _bat has joined the channel [21:16] jamescarr: hows the knokcout goin folks [21:17] massivebiz has joined the channel [21:17] mif86 has joined the channel [21:17] DrMcKay: TheJH: https://gist.github.com/1175880 [21:17] robotmay has joined the channel [21:18] vikstrous has joined the channel [21:18] zeade has joined the channel [21:19] _dc has joined the channel [21:19] TheJH: DrMcKay, I'm currently running node v0.4.10, maybe it's because of that? [21:19] DrMcKay: TheJH: maybe, I'll try to downgrade [21:20] cha0s has joined the channel [21:20] cha0s has joined the channel [21:20] slip has joined the channel [21:20] tylerstalder has joined the channel [21:21] jamesarosen has joined the channel [21:23] jakehow has joined the channel [21:23] sharkbird has joined the channel [21:23] jakehow__ has joined the channel [21:23] jakehow_ has joined the channel [21:24] Fabryz: is there an integrated helper to obfuscate an email address? [21:24] DrMcKay has joined the channel [21:27] slip has joined the channel [21:27] cjroebuck has joined the channel [21:29] willwhite has joined the channel [21:30] ryanfitz has joined the channel [21:32] eee_c has joined the channel [21:33] trentm_ has joined the channel [21:35] skm has joined the channel [21:36] justbc has joined the channel [21:36] jamesarosen: anyone having success with SCSS? tjholowaychuck has a SASS library, but I can't tell if it supports SCSS [21:37] Flassari has joined the channel [21:38] arnee has joined the channel [21:41] slip has joined the channel [21:42] ysaw has joined the channel [21:43] eazyigz has joined the channel [21:43] robotarmy has joined the channel [21:44] jbrokc has joined the channel [21:45] v3ctR has joined the channel [21:45] rmcastil has joined the channel [21:46] bassui has left the channel [21:47] zemanel has joined the channel [21:48] achiu has joined the channel [21:49] SillyWabit has joined the channel [21:50] irahgel has joined the channel [21:50] rickharrison has joined the channel [21:51] mrdoodles has joined the channel [21:51] slifty has joined the channel [21:52] loob2 has joined the channel [21:52] jhurliman has joined the channel [21:53] davidcoallier has joined the channel [21:54] cha0s has joined the channel [21:55] slip has joined the channel [21:56] tbassetto: SubStack: ping [21:56] markwubben has joined the channel [21:56] versicolor has joined the channel [21:56] SubStack: beep [21:56] ingenthr has joined the channel [21:56] tbassetto: I have a question about dnode.connect() [21:57] malkomalko has joined the channel [21:57] kenperkins has joined the channel [21:57] tbassetto: SubStack: can I have two dnode server with different purpose listening to the same port? [21:57] vikstrous has joined the channel [21:58] bicranial has joined the channel [21:58] SubStack: tbassetto: nope [21:59] mikl has joined the channel [21:59] slifty has joined the channel [22:00] christkv has joined the channel [22:01] tbassetto: bummer. are we sure that no.de accepts connections through port 80 only? [22:02] JaKWaC has joined the channel [22:04] Nuck: tbassetto: Pretty sure it can be any port [22:05] slip has joined the channel [22:06] tzmartin has joined the channel [22:06] CrisO has joined the channel [22:06] tbassetto: Nuck: ok thanks, but only on port open at the same time right? [22:06] tbassetto: guys on #node.js seem to agree :( [22:06] tbassetto: * on #joyent [22:07] JaKWaC has joined the channel [22:07] AvianFlu has joined the channel [22:08] robotarm_ has joined the channel [22:08] mikeal has joined the channel [22:08] jacobolu_ has joined the channel [22:11] martinciu has joined the channel [22:12] robotarmy has joined the channel [22:13] vikstrous has joined the channel [22:13] aconbere has joined the channel [22:14] aguynamedben has joined the channel [22:14] slip has joined the channel [22:17] overra has joined the channel [22:19] gerad has joined the channel [22:20] slip has joined the channel [22:21] mrdoodles: is no.de up now coool [22:23] daed: <3 javascript!@ [22:24] mike5w3c has joined the channel [22:24] mrdoodles: i run my rackspace cloud server and mongohq but a heroku style node host would be nice [22:24] mrdoodles: well. one that worked or wasn't in private beta [22:25] daed: diss. [22:25] blakmatrix has joined the channel [22:25] mynyml has joined the channel [22:25] Klevre has joined the channel [22:26] bassui has joined the channel [22:27] slip has joined the channel [22:28] ceej has joined the channel [22:31] navaru has left the channel [22:31] achiu has joined the channel [22:31] bicranial has left the channel [22:31] jbrokc has joined the channel [22:31] TheCoreh has joined the channel [22:31] TheCoreh has joined the channel [22:31] sfoster has left the channel [22:31] bicranial has joined the channel [22:32] tonymilne has joined the channel [22:35] craigm has joined the channel [22:35] Nuck: Hey, can somebody smart help me figure out WritableStream? [22:37] chjj: nuck: what do you want to know? [22:37] slip has joined the channel [22:38] chjj: there is no WritableStream constructor in node, a Stream is just an EventEmitter that inherits a pipe method [22:38] __sorin__ has joined the channel [22:38] chjj: a lot of the time you dont even need pipe for your stream so you can just inherit from EE [22:39] soapyillusions has joined the channel [22:40] scottschecter has left the channel [22:41] Nuck: chjj: I'm gonna need pipe [22:41] Nuck: Realize I want to pipe to a file [22:41] Nuck: So it is needed [22:42] Nuck: I'll go look for the code behind Streams :P [22:42] Nuck: I can probably steal all that [22:43] chjj: nuck: just make a constructor that inherits from Stream then [22:43] Nuck: chjj: I'm just doing new WritableStream(), then .write()-ing to it [22:43] Klevre has left the channel [22:44] Nuck: inherits from Stream? [22:44] chjj: MyStream.prototype.__proto__ = require('stream').Stream.prototype; [22:44] chjj: like so [22:45] chjj: then give your constructors prototype a write and end method [22:45] chjj: and in the constructor set .writable to true [22:45] Nuck: I might just do util.inherits(Stream, events.EventEmitter); [22:45] chjj: and .readable if you want it to be readable as well [22:45] Nuck: That shit [22:45] Nuck: That looks better to me. [22:46] chjj: its just Object.create, but when you do that you need to reset the constructor property [22:46] chjj: which is why i like __proto__ [22:46] chjj: it doesnt overwrite the default prototype object [22:46] Nuck: Eh? [22:47] brianseeders has joined the channel [22:47] chjj: when you make a function, it automatically has a prototype object with a nonenumerable called "constructor" [22:47] dgreene has joined the channel [22:47] chjj: so any object will inherit that [22:47] zomgbie has joined the channel [22:47] chjj: but if you do, MyConstructor.prototype = Object.create(parent.prototype) [22:47] chjj: it overwrites that prototype object [22:47] chjj: so the constructor property is wrong [22:48] Nuck: ah [22:48] Nuck: util.inherits(Stream, events.EventEmitter); [22:48] Nuck: What about that? [22:48] chjj: so you have to reset it by doing Object.create(parent.prototype, { constructor: { value: MyConstructor } }); [22:48] chjj: thats what util.inherits does ^ [22:48] dimroc has joined the channel [22:48] chjj: it resets constructor to fix it [22:48] Nuck: Well, as long as the end result is essentially the same, it ='s fine. [22:48] MrNko has joined the channel [22:48] Nuck: *it's [22:48] chjj: yeah youre right [22:49] chjj: im just saying [22:49] Nuck: I find the syntax of util.inherits just cleaner [22:49] chjj: i like __proto__ because its a single line [22:49] Nuck: And that too is one-line :P [22:49] chjj: no requiring though ;) [22:49] slip has joined the channel [22:50] Nuck: chjj: Requiring is part of Node, why not use it? [22:50] chjj: because i dont have to [22:50] chjj: i can use __proto__ [22:50] chjj: i certainly do require things [22:50] chjj: just not things i dont need to [22:50] chjj: its called "require" for a reason [22:50] chjj: ;) [22:51] jbrokc has joined the channel [22:51] chjj: i really like __proto__'s other uses too [22:52] Emmanuel` has joined the channel [22:53] v3ctR has joined the channel [22:53] MrNko has joined the channel [22:55] v3ctR has joined the channel [22:56] slip has joined the channel [22:56] Nuck: chjj: I follow the example set my ryan. [22:56] Nuck: *by [22:57] Nuck: He uses util.inherits, and so do I. [22:57] Yoric has joined the channel [22:57] chjj: okay [22:57] chjj: ...? [22:58] chjj: im just a proto enthusiast, i like it, and i wish it were standardized [22:58] Nuck: ah lol [22:59] Nuck: So, I just inherit from Stream, set this.writable to true, then create write functions? [22:59] chjj: yeah, put a .write function on the prototype [22:59] chjj: as well as .end [22:59] Wa has joined the channel [22:59] micheil has joined the channel [22:59] Nuck: ah that too [22:59] Nuck: What happens on .end? [22:59] tonymilne has joined the channel [23:00] chjj: whatever happens with any other stream on end [23:00] chjj: res.end() - call .write if theres an argument and then close the stream for writing [23:00] chjj: so you would usually set .writable = false there [23:00] chjj: and then do whatever you need to to finish up [23:00] chjj: or clean up [23:01] daed: so many falseys [23:01] bingomanatee: i am getting errors of too many files being written to - is there a way to find out how many files you can write at the same time? [23:01] chjj: ulimit -a [23:01] chjj: or better yet [23:01] chjj: ulimit -a | grep files [23:01] bingomanatee: thankx. [23:02] chjj: (oh, its actually ulimit -n, but i hacked it with grep instead) [23:03] vikstrous has joined the channel [23:04] zomgbie has joined the channel [23:04] slaskis: why does require("events").EventEmitter.toString() give [native code]? the source looks like all js to me [23:04] christkv has joined the channel [23:04] chjj: slaskis: what node version? [23:05] slaskis: 0.4.11 [23:05] Nuck: chjj: Should I bother with the flush and such? [23:05] chjj: the EventEmitter constructor was originally implemented in c++ [23:05] slaskis: but the source is the same on 0.5 [23:05] chjj: it was switched to pure js after .5 i think? [23:05] chjj: nuck: what is the flush? [23:05] slaskis: https://github.com/joyent/node/blob/v0.4.11/lib/events.js looks like js [23:06] chjj: not sure then [23:06] Nuck: chjj: IDK, I'm just slimming down the WriteStream in the fs module [23:06] daed: when you write event driven code, do you ever suspect that other threads are jealous of the others? [23:06] daed: i sometimes wonder [23:06] Anton_ has joined the channel [23:06] daed: is the operating system really *fair* [23:07] Nuck: daed: In an ideal world, Node would be a single thread :P [23:07] daed: hey now [23:07] unicron has joined the channel [23:07] daed: let's not get too crazy [23:07] Nuck: However, not everything is evented in the OS [23:07] chjj: Nuck: thats just there as a queue to make sure writes happen in serial [23:07] daed: yeah [23:07] JoshC1 has joined the channel [23:07] Nuck: chjj: So I shouldn't bother with it? [23:07] daed: are there perf metrics/graphs comparing windows to linux on node in particular? [23:08] Nuck: I assume Linux would be better [23:08] daed: haha [23:08] chjj: nuck: well are you going to be writing an 'fs' module? [23:08] daed: i'd bet you were right [23:08] Nuck: chjj: Nope, so I think that's a chunk I can take out [23:09] chjj: nuck: if you want to have your stream do writes to a file, you should actually use fs.WritableStream, theres no point in reimplementing it by hand [23:09] Nuck: chjj: Well, I need it to be generic. [23:10] Nuck: It should be pipable to a file, though [23:10] chjj: or i mean, fileWriteStream [23:10] chjj: or whatever [23:10] chjj: i dont understand [23:10] AvianFlu: fs.createWriteStream [23:10] chjj: use fs.WriteStream for that [23:10] chjj: its already there [23:10] Nuck: It's not a file [23:10] AvianFlu: you can pipe to files [23:11] facorreia has joined the channel [23:11] chjj: what isnt a file? [23:11] Nuck: How many times will I say this, I'm not just writing to a file! [23:11] AvianFlu: so pipe to more than one place [23:11] Nuck: I am merely firing data events, etc. [23:11] AvianFlu: stream.pipe ftw [23:11] chjj: avianflu: no [23:11] Nuck: I jsut need Stream [23:11] lunks: Has anyone succeeded testing Mongoose with Vows? [23:11] chjj: nuck: well you can write to a file stream when you need to and throw data elsehwere when you need to [23:12] Nuck: I might just not bother with a WritableStream, it seems like too much work for too little benefit [23:12] chjj: i dont see the problem [23:12] Nuck: ... [23:12] Nuck: chjj: I provide the stream to a callback, which then does with it whatever it wants [23:12] Nuck: Sorta like req [23:12] Nuck: It is a stream of data [23:12] chjj: okay [23:12] Nuck: But it can be piped, etc. [23:12] madsleejensen has joined the channel [23:12] chjj: and then you would want that stream to make writes to your stream [23:12] Nuck: I think I'll just deal with a basic Stream. [23:12] chjj: to parse it [23:13] slip has joined the channel [23:13] chjj: nuck: i think you misunderstood, im not telling you to inherit from fs.WriteStream [23:13] jxck has joined the channel [23:13] chjj: im telling you to create one if you need to make writes to a file [23:13] fmeyer has joined the channel [23:13] chjj: within your stream [23:13] Nuck: If the callback wants to do that, it can [23:13] chjj: wrap an fs.WriteStream [23:13] Nuck: But I'm being entirely content-agnostic [23:13] chjj: okay [23:14] chjj: im confused why you were talking about fs.WriteStream in the first place then [23:14] Nuck: Because it's the only implementation of a WriteStream I could find [23:14] tylerstalder has joined the channel [23:14] Nuck: I was hoping to repurpose it, but obviously there's a lot of fs-specific stuff [23:15] robi42 has joined the channel [23:15] chjj: the only keys things you need for a readable and writable stream are: a 'data', 'error', and 'end' event. a .readable and .writable property. and a .write and .end method [23:16] unicron has left the channel [23:16] Nuck: chjj: Yeah, but the thing is, I need a stream I can write to in my code and expose as readable elsewhere [23:16] chjj: obviously you can use more events too [23:16] tonymilne has joined the channel [23:16] ryanfitz has joined the channel [23:16] chjj: but those are the basics [23:16] Nuck: So I'll just set .readable on it, and deal with the raw events myself [23:17] daed: is there a microwave-style chaos button where you can scramble thread priorities? [23:19] jamescarr has joined the channel [23:19] jamescarr: check it out http://comorichweb.no.de/ [23:19] jamescarr: har har [23:20] ckknight has joined the channel [23:21] industrial: ckknight: ohai [23:21] industrial: jamescarr: nice :) i was waiting for that one to pop up :D [23:21] ckknight: y helo thar, indy [23:21] industrial: well not specifically by you, just one using deck.js [23:22] Qbix1 has joined the channel [23:23] jbrokc has joined the channel [23:23] slip has joined the channel [23:24] Anton_ has joined the channel [23:26] H4ns`` has joined the channel [23:26] nickgreenie has joined the channel [23:26] madsleejensen1 has joined the channel [23:27] skm has joined the channel [23:27] bassui has left the channel [23:28] dshaw_ has joined the channel [23:28] misterm_ has joined the channel [23:28] misterm_ has left the channel [23:28] fly_ has joined the channel [23:29] misterm has joined the channel [23:29] schwab has joined the channel [23:30] slip has joined the channel [23:33] isaacs has joined the channel [23:35] pksunkara has joined the channel [23:35] slip has joined the channel [23:36] pksunkara: Somebody should start nodecasts [23:36] pksunkara: It will be very helpful [23:36] tbranyen: isn't that already something? [23:37] pksunkara: nodecasts.com is not maintained [23:37] pksunkara: nodecasts.org have only 2 casts [23:38] tbranyen: ah okay [23:39] industrial: pksunkara: send and email to them both (cc), get the ball rolling :D [23:39] V1 has joined the channel [23:39] v3ctR: why is process.nextTick used? [23:39] pksunkara: I don't think the ball will roll [23:39] industrial: pksunkara: you could ask either to give you their domain? [23:39] pksunkara: nodecasts should be started by someone with a strong passion [23:40] industrial: not you? [23:40] pksunkara: I have started using node 2 days back [23:40] pksunkara: I released my first module today [23:40] pksunkara: It's a pygments wrapper [23:41] pksunkara: As I was saying, nodecasts should be maintained by someone with a strong passion [23:42] pksunkara: maybe marak or some good developer [23:42] pksunkara: or maybe even nodejitsu or nodesocket should take it up [23:44] tbranyen: nodesocket? [23:44] tbranyen: hmmm haven't heard of them [23:44] pksunkara: They are going to start hosting node apps next week [23:45] pksunkara: I heard of them through nodeknockout [23:45] AvianFlu: they're the socketstream guys, no? [23:48] Netasta has joined the channel [23:48] pksunkara: AvianFlu: I don [23:49] Netasta: Hmm, I'm not a node.js regular user, but how exactly would one diagnose this error: [23:49] pksunkara: AvianFlu: I don't know, I am new to the community [23:49] Netasta: "Caught exception: TypeError: Cannot call method 'substring' of undefined" [23:49] pksunkara: Netasta: What do you need exactly? [23:52] Netasta: pksunkara: I just found an application around on the internet that I found quite cool and decided to run, it's not very well documented (probably because it's simple and I'm overthinking this) [23:52] Netasta: https://github.com/mape/node-wargames -- I assume, once you install all the dependancies, you just "node server.js" [23:53] newy has joined the channel [23:53] hybsch has joined the channel [23:53] pksunkara: Bascially, the error says that you are trying to get a part of a string which is null [23:54] Netasta: Hmm, I wonder [23:55] v3ctR has joined the channel [23:56] Netasta: pksunkara: It looks like it should work, though, which is what I don't understand [23:57] pksunkara: It has additional dependencies [23:57] pksunkara: it seems [23:57] pksunkara: npm install connect connect-assetmanager connect-assetmanager-handlers express ejs [23:57] Netasta: Already did [23:57] Netasta: :p [23:57] Netasta: ACTION read the issues tab and followed around through there. [23:58] idefine has left the channel [23:59] TooTallNate has joined the channel [23:59] pksunkara: Need to try it before I can tell you more