[00:00] zackattack: did someone @zackattack me? [00:00] kevliu: question on http.createClient() ... [00:00] SubStack: tjholowaychuk: it distributes 1 point evenly among the listed maintainers for each package [00:00] tjholowaychuk: ah [00:00] kevliu: my app speaks to several remote endpoints. i have a single connection object for each of these remote URIs [00:00] jacobolus has joined the channel [00:01] kevliu: is this the right thing to do in node, or am i meant to create the connections/requests on demand and destroy them when i'm done? [00:01] prettyrobots has joined the channel [00:01] prettyrobots: piscisaureus: What to do next? [00:02] ryah: kevliu: hm [00:03] piscisaureus: prettyrobots: hmm, write a benchmark [00:03] ryah: kevliu: in 0.4 you should just issue http.request() and let it take care of it [00:03] piscisaureus: I think [00:03] kevliu: btw ryah. two of my colleagues and i will be coming to Joyent at 5:30 [00:03] prettyrobots: I saw the benchmark code. [00:03] reid has joined the channel [00:03] ryah: kevliu: okay - cool. we're hanging out here [00:04] prettyrobots: piscisaureus: Also, I could do builds on Mac. [00:04] prettyrobots: Builds and debugging. [00:04] piscisaureus: prettyrobots: that's also good, there's an issue for that [00:05] kevliu: ryah: my question stems from a tweet of yours, that the http connection obj === req.socket... [00:05] kevliu: for each remote call, i was simply reusing the same connection object-- which means all of my requests were only utilizing one socket. is that correct? [00:06] prettyrobots: piscisaureus: Are you going to be around a while yet? [00:06] piscisaureus: prettyrobots: interesting benchmark: A server that accepts connections, sends 10 kb of data to each client would be useful. The other process should make connections and measure response times. [00:06] piscisaureus: prettyrobots: not really long [00:06] prettyrobots: Ah. [00:06] prettyrobots: I'll pester ryah. [00:06] piscisaureus: prettyrobots: maybe an hour or so [00:06] prettyrobots: Okay. [00:07] stepheneb has joined the channel [00:07] piscisaureus: prettyrobots: I'll take care of that :-p [00:07] prettyrobots: Heh. [00:08] zackattack: Why is it so hard to find a _competent_ Node.js architect? [00:08] ryah: kevliu: discussing with your coworker... [00:09] piscisaureus: ryah: ah you're all in for maximum abstraction? [00:09] ryah: piscisaureus: re liboio? [00:09] ckknight: zackattack: computer systems architecture can be a hard concept to grasp. [00:09] piscisaureus: ryah: si señor [00:09] piscisaureus: there is only oio [00:10] zackattack: ckknight: I know, you need smart people, and there are only so many of them in the world. [00:11] ckknight: you can't just be "smart". You have to be well-versed in the domain you're designing and be superbly knowledgeable about design patterns [00:11] SubStack: can always make more [00:11] tsesame has joined the channel [00:11] ckknight: zackattack: well, that is, if you want to make good architecture rather than a half-assed one [00:11] SubStack: design patterns eww [00:11] Chandra has joined the channel [00:11] ckknight: I know, dirty phrase [00:12] clee: ckknight: eh, PHP will get you 95% of the way there [00:12] clee: ACTION ducks [00:12] ckknight: you shut your trap [00:12] SubStack: where there are design patterns there are missing abstractions [00:12] ckknight: abstraction is a pattern in its own right [00:12] SubStack: sometimes owing to the nature of the language, sometimes not [00:12] ckknight: yeah, often dynamic languages have to rely less on esoteric patterns [00:12] SubStack: it's not [00:12] SubStack: category error! [00:13] ckknight: ? [00:13] gceolin has joined the channel [00:13] SubStack: calling abstractions a design pattern is like calling plants a type of tree [00:14] ckknight: ACTION plants a broccoli tree [00:14] ryah: piscisaureus: call in to the phone [00:14] SubStack: touché! [00:14] ryah: piscisaureus: if you want to chat [00:16] zivester has joined the channel [00:16] piscisaureus: ryah: vocal communication, how sexy [00:19] ryah: zackattack: ./configure --debug && make [00:19] ryah: zackattack: export NODE_DEBUG=http,net [00:19] ryah: zackattack: and run your app with node_g app.js [00:20] numero has joined the channel [00:20] mkrecny has joined the channel [00:20] tedsuo has joined the channel [00:21] isaacs: i've gotta hop off the call for a bit. [00:21] isaacs: will be back on in a little bit [00:21] SubStack: you'd better! [00:22] briznad1 has joined the channel [00:23] ryah: piscisaureus: anyway - feel free to disagree - i just think that knowing that we've recv'd a EOF [00:23] ryah: or sent a shutdown is useful info [00:23] mkrecny: how would you build a URL resolver? i.e: given a URL you don't know whether it redirects (like a bit.ly link) and you don't know how many times...may even be infinite - you want to get the final destination? [00:23] piscisaureus: ryah: no, I think I agree [00:23] ryah: piscisaureus: we should think about how this applies in the UDP case to however [00:23] ryah: s/to/too [00:24] ryah: piscisaureus: since presumably we want to reuse oio_read and oio_write [00:24] saikat has joined the channel [00:24] piscisaureus: ryah: I need to figure out UDP first I thing [00:24] tjholowaychuk: mkrecny: you follow the Location header [00:24] tjholowaychuk: field [00:24] piscisaureus: thing->think [00:25] Me1000 has joined the channel [00:25] tjholowaychuk: mkrecny: https://github.com/visionmedia/superagent/blob/master/lib/superagent.js#L211-245 [00:25] ckknight: mkrecny: keep following the Location header until you hit a duplicate. When you have (or go past a certain point like 5 hops), you force it to stop. [00:25] ryah: piscisaureus: is it a good time to bring unix up to date? [00:26] piscisaureus: ryah: it's always a good time :-). Seriously. [00:26] Booths: 00:25 < tjholowaychuk> mkrecny: https://github.com/visionmedia/superagent/blob/master/lib/superagent.js#L211-245 [00:26] Booths: bleh [00:26] Booths: stupid irrsi why would double click paste that [00:26] esundahl has joined the channel [00:27] tjholowaychuk: huh [00:27] clee: is this the right way to concatenate data when it comes in on a socket in chunks? [00:27] clee: http://pastie.org/1820977 [00:27] numero: ryah, thanks for the wonderful language !!! [00:27] Booths: tjholowaychuk: I meant to click your link, so I double clicked it without thinking and it somehow pasted it :\ [00:27] tjholowaychuk: oh ahaha [00:27] piscisaureus: ryah: I think now that we have defined graceful shutdown I have all the pieces in place except for preforking [00:28] mkrecny: tjholowaychuk: that's great but you're getting the entire response body [00:28] tjholowaychuk: mkrecny: not on redirect im not [00:28] ryah: numero: you're confusing me with brenden eich [00:29] ryah: :) [00:29] demastrie has joined the channel [00:29] piscisaureus: rofl [00:29] numero: ryah, well guess it is time when people will make node.js synonymous with js [00:29] numero: :) [00:30] piscisaureus: you should thank him for this year's spring fashion [00:30] ryah: clee: why not update the sha1 hash as it comes in? [00:30] prettyrobots: piscisaureus: I'm going to print out the source and go to a coffee shop. I'll try one of those two things later, benchmark or Mac build. If you decided to do one or the other yourself, update the ticket and I'll do the other. [00:30] numero: when some one will say I am a js developer it would implicitly mean node.js dev [00:30] esundahl has joined the channel [00:30] ryah: clee: i.e. put the sha.update() inside the on('data') [00:30] piscisaureus: prettyrobots: w00t. print out? [00:30] losing has joined the channel [00:30] clee: ryah: sure, that makes sense... I don't actually care about the sha, I was just using that to test if the data was being reassembled correctly [00:31] ryah: clee: ah [00:31] clee: so my question is, is this the "right way" or am I allocating too many Buffers or what? [00:31] ryah: clee: well - ideally you'd stream your data somewhere [00:31] gazumps has joined the channel [00:31] ryah: clee: you're kind of doing a lot of copying and allocating [00:32] prettyrobots: Yeah. Its small now. May as well print it out while I can still hold it in my hands. [00:32] clee: ryah: yeah, that's the thing. the data I'm working with needs to be parsed as a single large chunk [00:32] clee: I can't stream it [00:32] ryah: clee: ah - well i guess you don't have much choice [00:33] prettyrobots: piscisaureus: enscript -2 -G -f Courier7 -r -p oio.h.ps oio.h [00:33] clee: so is this the best way to do this awful thing? :) [00:33] piscisaureus: prettyrobots: oh only the .h :-) [00:33] prettyrobots: Formats it two pages on one landscape page. Makes for easy reading. [00:33] piscisaureus: that should be okay [00:33] ryah: clee: i hesisitate to say yes, but ...maybe [00:33] ron__ has joined the channel [00:33] prettyrobots: No all of it. The oio-win.c is only eight pages. [00:34] ryah: hesitate even [00:34] arpegius has joined the channel [00:36] sleeplessinc has joined the channel [00:37] sholmes has joined the channel [00:37] __sorin__ has joined the channel [00:37] sholmes: I'm at a book store. What are some good design pattern books? [00:37] SubStack: learn haskell instead [00:37] sholmes: Specifically centered around JavaScript. [00:38] sholmes: SubStack: O.o [00:38] SubStack: then you'll see how those 'design patterns' are just really crappy versions of higher-order functions [00:38] sholmes: haskell, is a language like others; it's not void of the need for a design pattern any more than the others. [00:39] SubStack: once you start seeing patterns, that's bad [00:39] sholmes: Not sure what you mean. [00:39] SubStack: time to write a library [00:39] sholmes: Why would it be bad to have a pattern? [00:39] SubStack: because it means you have repeating structure [00:39] tjholowaychuk: just dont design crappy apis, that's my design pattern advice [00:39] ron__: any idea what percentage of node projects are picking nosql over sql? how is the performance / stability of the mysql driver for nodejs compared to say PHP/Ruby ? [00:39] tjholowaychuk: shouldn't need to think about it much [00:39] SubStack: but then if you find a bug in the 'pattern' you've got to fix it in two places [00:39] wangyang0123 has joined the channel [00:40] SubStack: tjholowaychuk: exactly! [00:40] tjholowaychuk: just "do" [00:40] tjholowaychuk: haha [00:40] sholmes: wait wait [00:40] sholmes: Where do I put my code? Lol [00:40] SubStack: if you've got callbacks it all falls into place nicely and you don't need all this useless c++/java 'design pattern' classical OO noise [00:40] SubStack: ACTION away! & [00:40] sholmes: I'm after design patterns for the reason that I want to learn where I could put code, how I can organize it. [00:40] techwraith: 14 node servers proxying 1million uploads to s3 - yay node! [00:40] jakehow has joined the channel [00:40] prettyrobots: I like design patterns because of the burden the place on my competitors. [00:41] tsesame_ has joined the channel [00:41] sholmes: So everyone here is recommending I ditch the idea of design patterns? [00:41] prettyrobots: I don't think they teach computer science in the schools any more. [00:41] prettyrobots: They teach object modeling. [00:42] sholmes: I really don't know what I'm doing... [00:42] sholmes: I feel like I know a language in and out, almost, but I don't know what to do with it. [00:42] bshumate has joined the channel [00:42] malkomalko: sholmes: [00:42] prettyrobots: sholmes: That's a good start. [00:42] malkomalko: are you just trying to learn js? [00:42] adamzap has joined the channel [00:42] prettyrobots: Admit you know nothing. [00:42] pengwynn has joined the channel [00:42] adamzap has left the channel [00:42] prettyrobots: ACTION I know nothing. [00:42] malkomalko: nobody knows anything in the grand scheme of things [00:43] sholmes: malkomalko: I'm trying to learn how to use JS; I already know the language, and have been using it, but I'm not sure if the way I'm using it is the right way. [00:43] ron__: i can't convince my boss to use mongodb .. for a social network application .. so reading resulsets and encoding to JSON back and forth between client and server [00:43] malkomalko: don't buy a book [00:43] malkomalko: go read people's code [00:43] prettyrobots: sholmes: People here do use "design patterns". And the original GoF book is an honest book. I like it. [00:43] sholmes: malkomalko: good point, but I'm not looking for an absolute, I'm looking for a relative concept, relative to how to accomplish an application that structured well. [00:43] sholmes: prettyrobots: GoF? [00:43] prettyrobots: It's just that you see a lot of code in the wild where people are laying on one abstraction after another. [00:43] malkomalko: Gang of Four [00:44] malkomalko: the definitive guide on design patterns, they wrote the book... but it's very heady [00:44] sholmes: malkomalko, I'm not going to buy it, I'm going to read it for free at this store. [00:44] sholmes: headY? [00:44] prettyrobots: The Gang of Four: Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides. [00:45] sholmes: this one? http://books.google.com/books?id=9KjSnXNPw2cC&printsec=frontcover&dq=gang+of+four+design+patterns&hl=en&ei=hs-wTY_jE862tge31KXrCw&sa=X&oi=book_result&ct=result&resnum=1&ved=0CC0Q6AEwAA#v=onepage&q&f=false [00:45] malkomalko: http://addyosmani.com/resources/essentialjsdesignpatterns/book/#designpatternsjavascript [00:45] prettyrobots: I gal I know read Head First Design Patterns, and it seemed to do as good a job as the GoF book. [00:45] malkomalko: skimmed through that, was a good book [00:45] systemfault: malkomalko: That page is pure win. [00:46] systemfault: malkomalko: Thanks for sharing. [00:46] prettyrobots: But, sholmes, I believe a lot people come to Node.js to get away from modeling and methodlogy, and to get closer to the operating system and the network. [00:46] malkomalko: welcome [00:46] sholmes: awesome, now I have something to soak in :P [00:46] malkomalko: good overview of design patterns in general, and how to apply them specifically in js [00:46] malkomalko: but as others have said [00:47] malkomalko: they are just patterns, don't try to abuse them or fit them into situations that don't make sense [00:47] prettyrobots: malkomalko: That's a nice page. Thanks. [00:47] prettyrobots: Good resource. [00:47] sholmes: prettyrobots: Node is a good thing in that way that it doesn't force anything on you and is very low level, but I'd like to learn how to spawn my own methodologies. [00:48] prettyrobots: See, that must be why people are barking at you. [00:48] prettyrobots: I wouldn't want to spawn methodologies. [00:48] prettyrobots: I would want to write code. [00:48] prettyrobots: Write a full text search engine in pure node, or extend node-search. [00:48] sholmes: malkomalko, I'm not sure if I'm really looking for design patterns, it's a new concept to me, and I've prolly already been using patterns. However, I don't know if it's something I need until I read about it. [00:48] prettyrobots: Learn some cool algorihtms. [00:48] prettyrobots: Methodologies sounds like new age. [00:49] sholmes: prettyrobots: give me some examples. [00:49] prettyrobots: If you keep your code small enough that others can read it, they will tell you how to make it better. [00:49] sholmes: right now these are just words with vague concepts behind them to me. [00:49] malkomalko: go read the underscore.js source code [00:49] malkomalko: that was a fun read [00:49] prettyrobots: Read jQuery or jRapheal. [00:50] prettyrobots: Read nStore. [00:51] prettyrobots: Cool algorithms: Create a hex dump, create a b-tree, Paxos, r-trees, incremental binary parsers, a bunch of graphics stuff that I know nothing about. [00:51] tjholowaychuk: sholmes: yeah pick something you want to learn, find something that does it, read the source, and read about portions that you dont understand on the net [00:51] tjholowaychuk: or man [00:51] puffpio has joined the channel [00:51] prettyrobots: Draw stuff in Safari using the hardware accelerated 3D built in the SVG engine. [00:52] prettyrobots: By the time you're good at it, 3d transforms will be available in Firefox and IE 10 and you'll be a very expensive programmer. [00:52] prettyrobots: No methologies. All math. [00:52] tekky has joined the channel [00:52] prettyrobots: And I suck at math, so if you do I'll envy you. [00:52] malkomalko: if you really wanted to, you could do my work [00:53] jjmalina has joined the channel [00:53] malkomalko: I could still get paid, and go surf instead [00:53] prettyrobots: Look at jQuery SVG and Safari 3d transforms. If I wasn't wasting my time in this way, I'd waste my time in that way. [00:54] kevliu has joined the channel [00:54] esundahl has joined the channel [00:54] sholmes: Even if I learn the APIs for SVG and 3D stuff, where do I put it in my application? [00:54] esundahl has left the channel [00:54] sholmes: This is really what I'm wondering. [00:55] prettyrobots: The SVG and 3d stuff is just HTML. [00:55] prettyrobots: HMTL/CSS/JavaScript. Put it anywhere. [00:55] prettyrobots: Node.js can run on a Webbynode which is $10.00 a month. [00:55] sholmes: hell, I'm not talking about markup, so that's irrelavent. [00:55] tek has joined the channel [00:56] prettyrobots: I run my apps at Linode on a heroku like hosting environment of my own creation. [00:56] malkomalko: I'm impressed with Webbynode [00:57] prettyrobots: Yeah. Put up Nginx on a Webbynode and run your Node.js apps there, watch them with Monit. [00:57] malkomalko: I know tj hates cucumber, but I'm almost ready to release my node.js implementation out in the wild [00:57] tjholowaychuk: hehe [00:57] tjholowaychuk: i only dislike it because i dont deal with clients [00:57] tjholowaychuk: so it has no point for me [00:58] malkomalko: I made the only test runner be a web runner [00:58] malkomalko: express/socket.io push your test results in async [00:58] malkomalko: push errors, unimplemented steps, the whole shabang [00:58] malkomalko: test suites run really quickly, and it's fun [00:58] tjholowaychuk: the whole #! [00:59] random123: Is node-mysql much near as good as the bindings for PHP? [00:59] malkomalko: haha [00:59] dcampano has joined the channel [00:59] malkomalko: man, my cat wont shut up [00:59] tjholowaychuk: my cat was blind [01:00] piscisaureus: ryah: here? or should I call you? [01:00] prettyrobots: random123: node-mysql is fine. The only problem I've had is that it does not do long binary. [01:00] prettyrobots: I save stuff to file if it is a BLOB or TEXT. [01:00] prettyrobots: Otherwise, it's fast. [01:01] random123: Oh, has anyone ever did a performance test vs PHP's bindings - would the fact that node.js is non-blocking effect that? [01:01] random123: (Maybe in an obscure way) [01:01] ryah: piscisaureus: im here - but best to call [01:02] guybrush has left the channel [01:03] prettyrobots: random123: I use it and I have long running processes that stay tiny. [01:03] prettyrobots: It causes me to grief. I feel really good about it. It makes me like MySQL. [01:03] prettyrobots: s/to/no/ [01:04] prettyrobots: That's about all I can say. Otherwise, it's just pretty darn fast and well written. It doesn't do anything stupid. It has an incremental parser. [01:04] random123: Cool, thanks [01:04] prettyrobots: But, I don't take advantage of that. I slurp everything into an array of hashes. [01:05] prettyrobots: Because my time is worth more than the 128k needed to do so. [01:05] stride has joined the channel [01:06] piscisaureus: damn I hate skype [01:06] tmpvar has joined the channel [01:06] stepheneb has joined the channel [01:06] systemfault: Well.. not that we have another alternative. [01:07] piscisaureus: yes [01:07] piscisaureus: if only telcos would stop living in the 19th century I might in fact use an ordinary phone [01:07] systemfault: :/ [01:08] xiackok has joined the channel [01:08] firedfox has joined the channel [01:08] eventi has joined the channel [01:09] Twelve-60 has joined the channel [01:09] boaz has joined the channel [01:10] chrislor_ has joined the channel [01:10] constantx_ has joined the channel [01:10] dgathright has joined the channel [01:13] ryah: piscisaureus: wrong number - see topic [01:13] piscisaureus: ryah: yeah I dialed that [01:13] piscisaureus: ryah: theres a lot of inaudible stuff going on there [01:14] ryah: oh, ar eyou on? [01:16] sholmes: malkomalko: on that page about JavaScript pages that was "pure win", line 24 or example 6 confuses me a bit. [01:16] sholmes: Is there a typo there, or am I missing something. [01:19] abraxas has joined the channel [01:19] zentoooo has joined the channel [01:21] xandrews has joined the channel [01:21] dgathright has joined the channel [01:23] echosystm has joined the channel [01:23] kf8a has joined the channel [01:23] harth has joined the channel [01:23] Wizek has joined the channel [01:23] chrislorenz has joined the channel [01:24] Wizek_ has joined the channel [01:24] mscdex: prettyrobots: you use blobs? do you have node-mysql patched to use buffers then? [01:24] prettyrobots: mscdex: No. [01:25] prettyrobots: mscdex: I make due without. I hit the issue this week. [01:25] ditesh|cassini has joined the channel [01:25] kevliu has joined the channel [01:26] postwait has joined the channel [01:27] echosystm: does anyone here know if someone has tried the v8 experimental gc branch with node.js ? [01:27] perlmonkey2 has joined the channel [01:27] echosystm: also, does anyone know what they are actually doing to improve the gc? [01:29] prettyrobots: I want a code reading program for the iPhoen. [01:30] prettyrobots: Where i can specify a GitHub repo and get back just the code, formatted nicely to read on the iPhone. [01:30] dansays has joined the channel [01:30] Aikar: [Tyrial] ------ [09:30 PM] ------ [aikar] --- [master] --- [~/projects/cosmos/node_modules/harmonyproxy] [01:30] Aikar: >>> node ../../test [01:30] Aikar: node: ../node-proxy.cc:387: static v8::Handle v8::NodeProxy::CreateFunction(const v8::Arguments&): Assertion `fn->HasNamedLookupInterceptor()' failed. [01:31] Aikar: Aborted [01:31] Aikar: why are assertions running in non debug mode... ? [01:31] sako has joined the channel [01:32] Charuru has joined the channel [01:33] tom_m has joined the channel [01:34] tom_m: hey anyone know what i might be missing here with the jpeg package? when using npm to install it i'm either missing a jpeg library or it's not a compatible version maybe? using fedora14 ... [01:35] tom_m: by chance? :) [01:35] isaacs: tom_m: do you have libjpeg installed in your system? [01:35] isaacs: i'm not familiar with fedora [01:35] tom_m: it's some turbo jpeg lib [01:35] tom_m: libjpeg-turbo-devel.i686 0:1.1.0-2.fc14 [01:36] tom_m: can't find a plain libjpeg ... [01:36] tom_m: at least in the default repos... guess i'll hunt for one [01:38] tom_m: hmm yup i got a libjpeg... i wonder [01:40] boghog has joined the channel [01:40] malkomalko: sholmes: still having trouble understanding that example? [01:41] sholmes: malkomalko: yes, I think it should be Singleton.getInstance().publicMethod(); [01:41] sholmes: I don't understand why it isn't. [01:42] malkomalko: correct [01:42] sholmes: ACTION has been using the observer pattern without even knowing it. [01:42] malkomalko: looks like an error in the code [01:42] sholmes: malkomalko, so it's a typo. [01:42] sholmes: Yeah. [01:42] sholmes: Okay, just was unsure. [01:43] Gelegrodan: Hm, whas the best way to keep track of child process? i want to spawn one for each client that connects (websocket via socket.io) [01:43] sholmes: I wonder if my project https://github.com/samholmes/Animation.js is using the observer pattern correctly. [01:43] jacter has joined the channel [01:44] cloudhead2 has joined the channel [01:46] jtsnow has joined the channel [01:47] sholmes: My project could use a little module pattern [01:49] newy_ has joined the channel [01:50] Wizek has joined the channel [01:51] unomi has joined the channel [01:51] sholmes: I need a good text editor like E only free. [01:51] sholmes: lightweight* [01:51] M2Ys4U has joined the channel [01:51] skm has joined the channel [01:52] echosystm: sholmes: vim [01:52] sleeplessinc has joined the channel [01:52] dguttman_ has joined the channel [01:52] echosystm: macvim if you are on mac [01:52] sholmes: wish I was on a mac (will be one of these days) [01:52] mscdex: Gelegrodan: hang the child process object off of the client object [01:53] sholmes: vim has too steep of a learning curve [01:53] sholmes: plus it's all CLI [01:53] echosystm: its a worthwhile investment [01:53] Nexxy: ^ [01:53] systemfault: gvim isn't cli [01:53] mscdex: console or gui text editor? [01:53] echosystm: vim does not have to be CLI - there is gvim/macvim/etc. [01:53] Wizek_ has joined the channel [01:53] Nexxy: the sooner you learn it, the more time you will save [01:53] echosystm: there is also plugins for pretty much everything you would ever need to do [01:53] systemfault: But yeah.. vim does have a really steep learning curve [01:54] mscdex: i use nano for console stuff and notepad++/gedit for gui [01:54] Nexxy: ._. [01:54] Nexxy: mscdex, you make my heart hurt [01:54] echosystm: pretty much everyone at my workplace uses eclipse and vim [01:54] systemfault: I'm a vim user [01:54] echosystm: seems to be a pretty common combination [01:55] astropirate has joined the channel [01:56] sholmes: does guilllermo rauch use vim? [01:56] seivan has joined the channel [01:56] hvgotcodes: when you start a node server, and then you do an exec, where is the path at? [01:59] sholmes: So what's the deal with vim? [01:59] sholmes: So you can navigate with your letter keys, what's so powerful about that? [01:59] tom_m: its ugly [01:59] tom_m: and the uglier your editor the more hardcore you are [02:00] tom_m: but vim has a lot of power too though :) [02:00] sholmes: it doesn't have to be ugly. [02:00] sholmes: tom_m: what's the power? [02:00] tom_m: and many people find it fast to use once they are comfortable with it. hence more productivity ... but me personally? i dont know i think there's bigger cogs in the productivity wheel. use what you're comfortable with [02:01] perezd has joined the channel [02:01] tom_m: a lot of scripting features [02:01] sholmes: hmm [02:01] tom_m: that can increase productivity... but of course eclipse and many other IDEs provide similar features [02:01] systemfault: The power of vim is that the text become a collection of objects that you manipulate with commands. [02:02] tom_m: and that :) i dont really use vim so i couldn't say that ha [02:02] sholmes: I'll have to get back to this subject later, as I must head out. [02:02] sholmes: later peeps [02:02] systemfault: Later [02:02] thinkdevcode has joined the channel [02:02] kevliu has joined the channel [02:03] constantx has joined the channel [02:03] thinkdevcode: good day gents [02:03] Nexxy: such a selective greeting [02:04] tom_m: and what if there were females here? [02:04] Nexxy: everyone knows there are no girls on the internet [02:04] Nexxy: I'm just saying, this is a room full of developers [02:05] Nexxy: gents doesn't seem that applicable [02:05] hadashikick has joined the channel [02:05] tom_m: oh.... there are girls ON the internet alright [02:06] systemfault: Sure.. check facebook.. [02:06] chrislorenz has joined the channel [02:06] tom_m: yes. facebook... [02:07] Corren has joined the channel [02:07] mscdex: http://goo.gl/D7aw [02:08] Nexxy: oh dear god that's disgusting [02:08] mscdex: :-D [02:08] Opaque has joined the channel [02:08] Wizek has joined the channel [02:08] mscdex: it's a classic! [02:08] jtsnow has joined the channel [02:08] tom_m: hahaha [02:09] zentoooo has joined the channel [02:09] systemfault: while(true) console.log('developers'); [02:09] darshanshankar has joined the channel [02:09] Nexxy: someone needs to introduce that man to the technology of antiperspirant [02:09] tom_m: for a second i thought that was gonna be a link to rebecca black ... still on the internet girls subject [02:09] darshanshankar: hey guys any idea why i'm getting this issue when starting the server? http://pastebin.com/wQZe58NK [02:09] brweber2 has joined the channel [02:10] darshanshankar: works for my friend and elsewhere, so something in my setup is screwed up but i have no idea what [02:10] pyrony has joined the channel [02:10] Wizek has joined the channel [02:16] thinkdevcode: haha classic video [02:16] dnyy has joined the channel [02:17] blueadept: if i'm building an enum set within a schema, and want to include an apostrophe in one of the values, what's the best way to do that? using mongoose btw [02:18] c4milo1 has joined the channel [02:21] hvgotcodes: how do i get the directory the node program resides in, from within the program? [02:22] blueadept: usually '../' works [02:22] blueadept: depends where the code is being called from, but you just walk yourway backwards [02:23] blueadept: i mean your node program shouldn't be allowed to access anything outside of it's root area [02:23] hvgotcodes: blueadept: the script is used in different context, so its started from different places [02:23] hvgotcodes: so thats not going to work [02:23] markstory has joined the channel [02:23] blueadept: i mean, it can access anything within the root area, but it can't go backwards to the root the system of course [02:23] blueadept: where is the script? [02:24] hvgotcodes: blueadept: it depends ;) thats the problem [02:24] hvgotcodes: so sometimes i do node script.js [02:24] hvgotcodes: and sometimes i do node /full/path/to/script [02:25] hvgotcodes: and the script does an exec and needs to execute a file that sits next to it [02:25] blueadept: ah ok, well if you're going to be accessing a file that is in the same area as the file you're calling from, it's './filename.js' [02:25] ditesh|cassini has joined the channel [02:26] hvgotcodes: blueadept: thats what im trying and its not working [02:26] pyrony has joined the channel [02:26] blueadept: what's the error response? [02:27] hvgotcodes: if i do exec to fire off a pwd, the pwd shows / [02:27] hvgotcodes: the error is cant find the file [02:27] hvgotcodes: because its not in / [02:27] hvgotcodes: its in /path/to/nodeserver.js [02:27] blueadept: might have to pastie.org what you're talking about [02:28] blueadept: otherwise it's hard visualize where the error may be coming from [02:28] blueadept: to* [02:28] zivester: is there a point to install the .2.6 version under ubuntu, or should i something more recent? [02:28] mikeal has joined the channel [02:29] blueadept: zivester: going with the most recent, lots of stuff has changed since .2.6 [02:29] hvgotcodes: blueadept: the node server is in /some/long/path [02:29] hvgotcodes: when i fire off a virtual machine, i start it by running node /some/long/path [02:30] hvgotcodes: in the server, i do an exec of a .sh file that is also in some/long/path [02:30] hvgotcodes: when i try to exec "./thescript.sh" it cant find the script [02:30] zivester: so just follow https://github.com/joyent/node/wiki/Installation ? [02:30] hvgotcodes: when i exec "pwd" i get '/' [02:30] galaxywatcher has joined the channel [02:30] blueadept: zivester: yep [02:30] zivester: tx [02:31] blueadept: oh i see, the exec of another screipt within the directory [02:31] blueadept: hm [02:32] blueadept: the script is doing the call of the file, not node itself? [02:32] hvgotcodes: right [02:32] blueadept: and you tried the full path and everything? [02:32] blueadept: just to test? [02:32] hvgotcodes: i can getit to work by full path [02:32] blueadept: yeah yeah [02:32] hvgotcodes: but the problem is thats not very robust [02:32] blueadept: hm, might need a module for that, haven't tried that myself actually [02:39] jspiros has joined the channel [02:41] jhford has joined the channel [02:41] jhford: does node.js need librt? [02:41] jhford: or can it optionally use it? [02:41] darshanshankar: in order to update node, i installed "n" and did n latest - but something screwed up - can anyone help? [02:43] perezd: cloudhead: yt? [02:43] blueadept: jhford: not sure, just compile without it, and if it fails, install it [02:43] jhford: blueadept: i am trying to upgrade waf to 1.6 and i think conf.check was modified [02:44] brianloveswords has joined the channel [02:45] dgathright_ has joined the channel [02:45] joshthecoder has joined the channel [02:46] prettyrobots: piscisaureus: You're *still* awake? [02:46] piscisaureus: yeah [02:47] Aria has joined the channel [02:48] mscdex: noders are always awake [02:48] prettyrobots: I'm going to create an issue for the benchmark program. [02:48] mscdex: asynchronous living [02:48] prettyrobots: mscdex: True dat. [02:50] piscisaureus: ok [02:51] newy_ has joined the channel [02:53] CIA-72: node: 03Robert Mustacchi 07v0.4 * red657e9 10/ src/platform_sunos.cc : Add loadavg for SunOS - http://bit.ly/id0Y7b [02:53] kevliu has joined the channel [02:57] zivester: the website says "see the API documentation for more examples" but those docs link back to the same page? [03:01] zivester: example: http://nodejs.org/docs/ everything loads the same page? [03:02] echosystm: what are people using for ioc/dependency injection in node? [03:03] ekryski has joined the channel [03:05] ekryski: hello all. Anyone know if you can serve more than one domain with express? ie. would you need more than one node instance, more than one physical server, or can you serve two separate domains with different functionality within the same app? [03:06] secoif_ has joined the channel [03:06] datapimp has joined the channel [03:07] devrim has joined the channel [03:10] ekryski: anybody have any experience with this… maybe?? [03:10] ckknight: ekryski: you can have two domains with different functionality using the vhost middleware [03:10] ckknight: or similar but not disparate functionality, even [03:11] JojoBoss: ekryski: https://github.com/visionmedia/express/blob/master/examples/vhost/app.js [03:12] ekryski: beautiful! Thank you very much fellas! I knew it was out there I just wasn't using the right search terms [03:12] lyle has joined the channel [03:12] lyle: hey, what does node expect for nested objects in url parameters? [03:13] lyle: object[subobject]=a&object[othersubobject]=b ? [03:16] piscisaureus: ryah: got you the test, time to go now [03:17] mscdex: lyle: i'm not sure node supports that sort of thing anymore [03:18] seivan has joined the channel [03:19] viirya has joined the channel [03:19] bsstoner has left the channel [03:19] jasong_at_apache has left the channel [03:19] mscdex: lyle: however, if you specify the same key name multiple times, the value will be set to an array of the values [03:20] mscdex: lyle: so "object=a&object=b&foo=bar" would result in: {object: ['a', 'b'], foo: 'bar'} [03:22] mscdex: or "object[]=a&object[]=b" will result in: {'object[]': ['a', 'b']} [03:22] piscisaureus has joined the channel [03:24] timmywil has joined the channel [03:24] levi501d has joined the channel [03:25] dansays has joined the channel [03:25] vipaca has joined the channel [03:25] vipaca has joined the channel [03:25] ekryski has left the channel [03:26] brianloveswords has joined the channel [03:27] indutny has joined the channel [03:27] sleeplessinc has joined the channel [03:28] kylefox has joined the channel [03:29] jtsnow has joined the channel [03:30] sambao21 has joined the channel [03:30] jaket has joined the channel [03:30] azend: anyone know of a good tutorial for getting started with node and express? [03:31] harth has joined the channel [03:31] samcday_away has joined the channel [03:31] adamzap has joined the channel [03:33] onr has joined the channel [03:36] zivester: ACTION is looking for the same thing [03:36] zivester: just found api, http://nodejs.org/docs/v0.4.6/api/ [03:39] Spion_ has joined the channel [03:40] rmustacc has joined the channel [03:42] lyle: mscdex: i've confirmed that node used to support nested object syntax (thanks ubuntu repos for the old version) but does not any longer. [03:42] lyle: i'm very curious as to why the change was made. [03:44] jiggliemon has joined the channel [03:44] jiggliemon: So the docs are down, http://nodejs.org/docs/ is there an API doc for Node.js anywhere? [03:45] hassox has joined the channel [03:45] echosystm: is there any good dependency injection framework for node? [03:45] mnutt_ has joined the channel [03:45] echosystm: or is there some other way to write your code so it is testable? [03:45] lyle: jiggliemon: http://nodejs.org/docs/v0.4.6/api/ [03:46] jiggliemon: thanks Lyle. [03:46] jiggliemon: Is the API stable enough? [03:46] newy_ has joined the channel [03:46] lyle: dunno, i don't use node =P [03:46] Nexxy: ACTION blinks... [03:46] ovnicraft has joined the channel [03:47] beawesomeinstead has joined the channel [03:47] lyle: i'm just here wondering if anybody can explain why node stopped deserializing nested objects from url params at some point [03:48] sechrist has joined the channel [03:48] ezl has joined the channel [03:48] firedfox has joined the channel [03:52] echosystm: if my module depends on some random number generator module, how would i test my module? [03:53] echosystm: every time i run a method, a new random number is generated [03:53] echosystm: in java i would use javaee cdi/spring aop/google guice [03:53] lyle: echosystm: you would stub out the external module so the number isn't random anymore [03:53] echosystm: what is the way to test such things in javascript? [03:53] echosystm: ok, but how do i inject the stub into my module? [03:54] lyle: dunno, i don't use node =P [03:54] k1ttty has joined the channel [03:54] echosystm: is there some way to temporarily override the require function? [03:55] dab_ has joined the channel [03:56] dab_: Hey is the "works" download the latest git sources? [03:56] echosystm: wow, you can replace the require function entirely [03:56] jacter has joined the channel [03:57] echosystm: thats a bit nifty! [03:57] lyle: echosystm: of course you can, it's javascript [03:57] echosystm: so for tests you can just replace require [03:57] cloudhead_ has joined the channel [03:57] echosystm: and make it provide your stubs [03:57] echosystm: wonder if there is a library to make that easier... [03:58] echosystm: anyone know of one? [03:59] sholmes has joined the channel [03:59] themiddleman has joined the channel [03:59] jacobolus has joined the channel [04:00] sambao21 has joined the channel [04:00] ditesh|cassini has joined the channel [04:00] sholmes: Back! [04:01] sholmes: There was a shady druggy character sitting next to me at the B&N, so I headed out. [04:01] newy_ has joined the channel [04:01] sako: hey guys is node.js fit for a blog app? or should i stick to something like django for tht [04:01] sako: im still trying to figure out what node.js will really shine with [04:02] newy_: sako: anything that requires websockets/polling. [04:02] echosystm: sako: i personally think node.js is best for things where you want to go low level [04:02] echosystm: for standard web applications, you wouldnt get much benefit [04:02] echosystm: if youre writing your own tcp server, for example, node.js is great [04:03] dab_: Hey is the "works" download the latest git sources? [04:03] intel_ix has joined the channel [04:03] sako: i see [04:04] sako: whats a good example? [04:04] sako: do you guys know of a very well written node.js app? [04:04] dab_: not mine lol [04:04] EyePulp has joined the channel [04:04] sako: something i could possibly look through on github or something [04:04] echosystm: i think you will find a lot of node.js apps are a bit haywire [04:04] intel_ix: Well, websockets mit is well written [04:04] intel_ix: Well, at least it works [04:05] echosystm: node is young - there isnt much in the way of "best practices" yet [04:05] newy_: sako: here's one. a node chat app. https://github.com/scottgonzalez/node-chat [04:06] sako: very cool thanks! [04:06] zivester: i'm still exploring myself, but http://projects.nuttnet.net/hummingbird/ caught my eye [04:06] intel_ix: is that the one on the main page? [04:06] sako: thanks guys [04:07] sako: great stuff [04:07] zivester: now someone tell me what templating/framework to use for a basic webapp... there are so many! [04:07] intel_ix: Btw, anyone have an idea for a name for an http server thing? [04:08] tolaine has joined the channel [04:08] echosystm: i think express has become the defacto web framework for node [04:08] intel_ix: Just looking for a name [04:09] intel_ix: I was thinking of webspider, but that might be confused with a web crawler [04:09] zivester: echosystm any rec on a templating language? https://github.com/joyent/node/wiki/modules#templating [04:10] echosystm: zivester: ive only used EJS [04:10] echosystm: i dont really like the way haml/jade do things, so i never tried them [04:12] aguynamedben has joined the channel [04:12] zivester: oh yuck... took a quick peak at haml, i dont like that [04:12] NuckingFuts has joined the channel [04:12] echosystm: yeah... [04:12] zivester: i hate when too much of the language gets abstracted.. HTML isn't complicated, we dont need the templating to go that far [04:12] NuckingFuts: zivester: THANK YOU! [04:12] NuckingFuts: Finally, sombody who thinks like me! [04:12] echosystm: EJS is just normal markup that you can put javascript in [04:13] echosystm: i prefer this [04:13] NuckingFuts: EJS is wonderful :B [04:13] NuckingFuts: Don't diss [04:13] echosystm: im not dissing... [04:13] NuckingFuts: Liar [04:13] echosystm: heh. [04:14] NuckingFuts: echosystm: I smell burning pants /glare [04:14] zivester: i come from a perl/template toolkit world... i can write html and js, something simple to embed the data is all i need [04:14] echosystm: i said i prefer EJS [04:14] zivester: ill take a stab with ejs [04:14] echosystm: i have no idea what you are on about NuckingFuts [04:14] zivester: Futs just sounds like he was waiting for someone to say how crazy those languages are :) [04:15] echosystm: futs sounds like a retard... its not like anyones forcing him to use haml [04:15] echosystm: anyway [04:15] Ond has joined the channel [04:16] zivester: ty both for the recommendations... express+ejs here I come [04:19] NuckingFuts: echosystm: But people who use HAML need to be shot. Out of cannons. [04:20] echosystm: ok dude [04:21] zivester: aren't u both saying u like/use ejs? lol [04:21] Nexxy: ACTION straps crash helmet on [04:21] Nexxy: NuckingFuts, I'm ready. [04:21] jbomb has joined the channel [04:22] zivester: ACTION attempts to fill giant pool [04:22] Nexxy: with red jell-o?! [04:22] zivester: lead [04:24] adamzap has joined the channel [04:24] Opaque has joined the channel [04:25] jspiros has joined the channel [04:25] GriffenJBS: anyone used jslint lately? [04:25] newy_ has joined the channel [04:25] Nexxy: define "lately" [04:26] ckknight: GriffenJBS: I use JSHint constantly [04:26] ckknight: if that counts [04:26] prettyrobots: ryah: What OS are you doing the UNIX development on? Linux? [04:26] hassox has joined the channel [04:26] GriffenJBS: crockford has always been picky but now he reminds me of the soup nazi [04:27] onre_ has joined the channel [04:27] GriffenJBS: any way to get jslint to stop complaining about semi colons? [04:28] ckknight: by using JSHint [04:28] rmustacc: jslint has a ton of options, that is probably one of them. [04:28] GriffenJBS: rmustacc: about half the options have been removed [04:28] GriffenJBS: idk exactly, but fewer than there used to be [04:28] zivester: ejs template is .4.1 does that mean i have run node .4.1 ? [04:28] dhasenan has joined the channel [04:29] GriffenJBS: k, k, I thought JSHint was a typo, I get it now [04:29] fairwinds has joined the channel [04:29] ckknight: JSHint is like JSLint if someone stole the soup nazi's recipe [04:30] Nexxy: seinfeld analogies <3 [04:30] ckknight: it's a good analogy. [04:31] rmustacc: GriffenJBS: Since I last synced up with it it had everything we needed, but then again our style rules don't ignore semicolons. [04:31] up_the_irons has joined the channel [04:31] dhasenan: I keep getting errors with node complaining: TypeError: Object function () {} has no method 'isBuffer' [04:32] GriffenJBS: refusing to ignoring optional things, sounds like premature optimizations [04:32] dhasenan: This is when I'm importing a file. [04:32] dhasenan: Like: require('foo'); // throws here -- and changing my code will cause different ones to crop up. [04:32] dhasenan: Any ideas what's going on? [04:33] onre_ has joined the channel [04:33] dhasenan: I can make them go away sometimes by reordering requires, but it seems like this shouldn't be happening. [04:33] kriszyp has joined the channel [04:34] GriffenJBS: dhasenan: have you tried stepping through with inspector and seeing what exactly is at fault? [04:35] dhasenan: GriffenJBS, no -- I'm very new to node and have no idea what the inspector is. [04:35] crazed has joined the channel [04:35] Nexxy: inb4 latex glove joke [04:36] dhasenan: Stack trace, for what it's worth: http://pastebin.com/EzQ08iB6 [04:37] dhasenan: Err, let me fix that... [04:37] jamescarr__ has joined the channel [04:37] bojicas has joined the channel [04:37] GriffenJBS: dhasenan: what is /home/dhasenan/prog/damask/src/core/main.js:24:5 [04:37] dhasenan: http://pastebin.com/qiVVsQrn [04:37] dhasenan: I posted the wrong stacktrace at first. [04:39] GriffenJBS: dhasenan: yeah it's either a bug in fs.js or bad data is being passing into it [04:39] onre_ has joined the channel [04:41] dhasenan: And since reordering require calls can suppress the error, it's a bug in fs.js. [04:42] jamescarr__: hmmm... what frameworks out there are built using express under the hood? :) [04:43] Ond: I don't know of any. Do you need something that express doesn't provide or are you just curious [04:43] GriffenJBS: dhasenan: that's not true, remember the parts load as they are available, order of parallel parts is not garanteed [04:44] echosystm: jamescarr__: why would a framework use another framework under the hood? it makes more sense to build another framework on top of connect, not express [04:45] echosystm: is that what you meant? [04:46] dhasenan: GriffenJBS, you mean that require() loads files asynchronously? Even though it's calling readSync etc? [04:46] jamescarr__: echosystm, not really. I know of connect and all, but it'd make sense imho to build a little more scaffolding on top of express [04:46] newy_ has joined the channel [04:46] jamescarr__: or just use connect, sure :) [04:46] jamescarr__: but express has some good ideas that would be great to reuse in a more fuller web framework [04:47] echosystm: why not just add what you want into express itself? [04:47] hassox has joined the channel [04:47] Crell has joined the channel [04:48] TheIronWolf has joined the channel [04:48] harth has joined the channel [04:49] Ond: Party on harth [04:49] Crell: Hi all. Are general questions about Node kosher here, or is there another channel for newb questions? :-) [04:49] Ond: Fire away [04:49] Crell: Oh goodie. :-) [04:49] jamescarr__: echosystm, thats what I already do [04:50] Crell: I've read a couple articles on node.js recently, and the concept seems interesting at the basic level. What I've not been able to figure out, though, is if processes are shared. [04:50] gazumps has joined the channel [04:50] jamescarr__: most of my medium sized express apps have some homebrew conventions that seem natural... curious if anyone has made a framework on top of it thats all [04:50] rmustacc: Crell: Each node process is separate [04:50] echosystm: shared in whatsense Crell ? [04:50] Crell: That is, does every incoming request get handled in its own process (like PHP) or is it a single persistent process a la Java where multiple requests are handled in the same memory space? [04:51] echosystm: that depends [04:51] echosystm: its completely up to you [04:51] Crell: Figures. :-) [04:51] echosystm: you could have one process or you could have many [04:51] Crell: Hm. [04:51] rmustacc: It's always in the same process unless you do something different. [04:51] jacter has joined the channel [04:51] Crell: So, I'm a PHP developer by trade, and used to a "shared nothing" architecture. That has lots of advantages, but also means that a lot of work has to be repeated every request. [04:52] rmustacc: By default if you open a socket and listen in on it, it's always firing in the same process. [04:52] echosystm: one process would be enough to saturate 100mbit ethernet for most website things i think [04:52] Crell: I'm trying to understand how node.js handles that balance. [04:52] sechrist has joined the channel [04:52] amerine has joined the channel [04:52] Crell: So if you had, say, a global variable or an object that was persistent in memory, it would be shared between requests? [04:52] echosystm: yes [04:52] rmustacc: You could reference it in all requests, yes. [04:53] Crell: Ah, OK, so it's more like JSP in that sense than PHP. [04:53] echosystm: no [04:53] daekano: lol [04:53] Crell: echosystm: Stop confusing me! :-P [04:53] daekano: plant your bonsai tree, grasshopper. [04:53] echosystm: java ("JSP" as you call it) is completely threaded [04:53] jamescarr__: Crell, node.js is more like java in the sense of how memory space is on the server side [04:53] jamescarr__: if you want an object shared, you can make shared across requests [04:53] echosystm: if you have a global variable in Java, you need to handle synchronization [04:53] jamescarr__: you can also choose note to [04:54] Crell: jamescarr__: That's more what I'm going for, yes. I know that JSP uses formal threads and node.js uses event multi-plexing. [04:54] echosystm: you dont have this problem in node, because threads are hidden from you [04:54] echosystm: the downside is that you have to use continuation passing in order to do so [04:54] Crell: In order to do which? [04:54] jamescarr__: echosystm, that is not a downside :) [04:54] echosystm: in order to have the threads hidden frome you [04:55] Crell: OK... [04:55] jamescarr__: people think continuations and callbacks are such a con. Whatever. :) [04:55] Crell: So, let me give an example since I'm still not quite getting this... [04:55] dshaw_ has joined the channel [04:55] jamescarr__: Crell, you'll still run into the same issues if you have code that wouldn't be thread safe in java [04:55] jamescarr__: if you design your code haphazardly [04:55] echosystm: no [04:56] jamescarr__: i.e. multiple requests populating and modifying the same vars and not expecting it [04:56] echosystm: that makes no sense [04:56] Crell: If I have a data object I've loaded from a database, then in PHP I have to reload it on every incoming request. That is extra cost, but it also means I never have to worry about whether or not the object is loaded in my request because it's an isolated memory space. [04:56] jamescarr__: Crell, you can choose :) [04:56] echosystm: jamescarr__: it is impossible to have thread safety issues in your javascript on node [04:56] Crell: In node.js, is that also the case, or if I have a registry that keeps track of loaded objects is that registry shared between requests? [04:56] skm has joined the channel [04:57] Crell: jamescarr__: Just to make life interesting, eh? [04:57] jamescarr__: Crell, you can choose to discard it or keep it [04:57] jamescarr__: it's up to you ;) [04:57] echosystm: thread safety issues can only occur in the C that gets called in the background [04:57] Crell: How exactly? [04:57] jamescarr__: there's no magical "keeping" of your objects inside a request [04:57] Crell: So if I have request 1 come in, and I load an object from a DB and stick it into a global, then when the next request comes in is the object still in that global? [04:58] jamescarr__: yes [04:58] Crell: (Yes globals are bad, I know, it's just an example.) [04:58] Crell: OK, that's what I was trying to get at. [04:58] jamescarr__: I've done this with simple dumb examples... using an array as a datastore ;) [04:58] ckknight: you could make a simplistic in-memory cache [04:58] SamuraiJack has joined the channel [04:58] ckknight: that clears itself every minute or something [04:58] echosystm: you dont want to do that [04:58] Crell: So if I have a lot of loadable data objects I'm playing with, I would want to build an in-memory cache that self-clears after a time or some such. [04:58] ckknight: yeah, you probably don't want to do that [04:59] Crell: I wouldn't? [04:59] ckknight: it's generally a better idea to use redis or memcached [04:59] Crell: Wouldn't that mean a lot more DB traffic if I have to reload data on every request? [04:59] echosystm: the v8 garbage collector is stop-the-world, so you want to put as little on the heap as possible [04:59] Crell: Oh, I see. [04:59] echosystm: there are some libraries for doing in-memory stuff [04:59] Crell: So language-wise possible, just not the optimal approach. Got it. [04:59] echosystm: also there is redis [05:00] ckknight: V8 is stop the world? dang. I figured it'd be generational. [05:00] Crell: What's a redis? [05:00] ckknight: Crell: redis is a key-value store. [05:00] echosystm: it is generational ckknight [05:00] Crell: Another one? :-) [05:00] ckknight: echosystm: I mean generational and incremental [05:00] jamescarr__: yes another one ;) [05:00] echosystm: oh [05:00] jamescarr__: there are only 20 noSQL dbs [05:00] jamescarr__: :) [05:00] jamescarr__: no, I mean 100 [05:00] Crell: ACTION twitches at the term "NoSQL". [05:01] ckknight: Lua is generational and incremental, it's pretty much guaranteed that each GC step doesn't take over 1ms [05:01] echosystm: yep [05:01] echosystm: i have seen that the lua gc doesnt perform as well as node on typical heap sizes though [05:01] random123: Anyone know why when using .write the response is so much slower, ie http://pastebin.com/7yicNFfZ [05:01] echosystm: i dont remember where [05:01] echosystm: it was notably slower though [05:01] rmustacc: v8 does both Mark and Sweep and Scavenge GC. [05:02] rmustacc: It's using the generational stuff for short lived things and eventually switches to using mark and sweep for longer running stuff. [05:02] Crell: OK, so in that case the best strategy would be to keep node.js as stateless as possible, even though it is stateful, and push persistence off to memcache or similar, then, da? [05:03] echosystm: well [05:03] echosystm: you typically want to do that regardless of what language you are using [05:03] Crell: ACTION has no specific project in mind. He's just trying to grok how this works in case he needs it in the future. :-) [05:03] echosystm: i mean, for websites [05:03] rmustacc: Don't worry about GC for now. Play around and get things working and then quantify it. Don't worry about premature optimization. [05:04] echosystm: as soon as your application tier (or whatever you want to call it) starts holding state, it makes it difficult to scale [05:04] Crell: echosystm: As I said, I'm used to PHP where the shared nothing architecture doesn't even make that an option without hacks to use memcache or APC, which are non-typical. [05:04] echosystm: yeah [05:04] Crell: But the shared-nothing design makes horizontal scalability and load balancing dead simple. [05:04] ngs has joined the channel [05:05] echosystm: if you want to do something equivalent to APC, then people usually use redis [05:05] Crell: I see. [05:05] echosystm: there is a node library for similar things, but i cant remember [05:05] jamescarr__: oh, you know why redis really rocks though? [05:05] jamescarr__: I mean... REALLY fucking rocks? [05:05] jamescarr__: pub/sub built in :) [05:05] prettyrobots: random123: What is the performance like if you set a "Content-Length"? [05:05] tshpaper has joined the channel [05:05] jamescarr__: of course, also playing around with couchDB based pubsub with rabbitmq [05:05] Crell: And is using a 3rd party store like that the typical approach in the nodejs world, or is it the "pros only because most people don't have root" setup like with PHP? :-) [05:06] echosystm: Crell: basically all you want to do is take the data off the v8 heap [05:06] Crell: jamescarr__: Which pub/sub architecture? :-) [05:06] jamescarr__: http://redis.io/topics/pubsub [05:07] Crell: echosystm: Hm. [05:07] echosystm: Crell: you might like to look at this: http://pgte.github.com/alfred/ [05:07] Crell: OK, related question then. How does nodejs scale horizontally to multiple servers? Either for performance or for redundancy... [05:07] echosystm: there are other things, i just cant rmember what they are called at the moment [05:08] Crell: ACTION nods. [05:08] aroop has joined the channel [05:08] echosystm: Crell: i think it is safe to say node.js will scale much better than apache + php [05:08] echosystm: php has very high overhead for every request [05:08] Crell: So I keep hearing. :-P [05:09] random123: prettyrobots: That fixed it, thanks [05:09] echosystm: loading up a whole interpreter for every request is pretty insane [05:09] Crell: But even then, some redundancy to separate hardware is still useful. [05:09] matjas has joined the channel [05:09] jamescarr__: php is obnoxious [05:09] ckknight: Crell: absolutely [05:09] Ond: Crell, that are frameworks for that [05:09] ckknight: Crell: if I were launching a real app, I'd do it on at least two servers, running multiple node processes per server [05:09] Crell: I like PHP syntactically, but I agree the engine is hardly a paragon of efficiency... [05:09] Ond: Most notably cluster https://github.com/LearnBoost/cluster [05:09] echosystm: i dont think node.js is best used for the sorts of things you would use php for though [05:09] Crell: ckknight: OK, now we're talking. :-) [05:10] Crell: echosystm: If I'm building a conventional site, no. I'm a Drupal developer and Drupal handles that just fine. [05:10] ckknight: Crell: basically at least the amount of cores you have, run a node process per [05:10] echosystm: the strong point of node.js is that it makes concurrency easy and that will only be an issue if you are doing more low level or complex things [05:10] ckknight: for something like a blog that is nearly all reads and very few writes, a single process is likely "good enough" [05:10] Crell: But for rapid-response data, say for lots of REST activity or a game server or something like that, PHP is not really suited. [05:11] echosystm: yep [05:11] echosystm: well [05:11] echosystm: the non-blocking nature of node makes it good for sustaining a lot of connections that are predominantly idle [05:11] Crell: Which PHP sucks at. :-) [05:11] AAA_awright: Anything where multiple requests interact with each other or where there's going to be long-polling which just kills PHP thread pooling not to mention many popular web servers [05:12] ckknight: node is great for low-CPU, high-concurrency systems. [05:12] jamescarr__: Crell, you should also look into webworkers for concurrency [05:12] AAA_awright: (whew - so, lots of stuff) [05:12] jamescarr__: webworkers rock to do background processing for web requests [05:12] Crell: AAA_awright: I figured my brain would explode if I came in here, but in a good way. :-) [05:12] dgathright has joined the channel [05:12] AAA_awright: Webworkers aren't well optimized for the Node.js commonjs (iirc?) module system [05:12] echosystm: if your connections are intensive in terms of the amount of code that needs to run, its likely that thread-per-connection (ie. java) would perform better than node [05:12] AAA_awright: I think [05:13] Crell: echosystm: By which you mean lines executed, not lines compiled/available, right? [05:13] echosystm: all the context switching of node comes at a price [05:13] echosystm: well, think about what would happen if you had to generate prime numbers or something [05:14] echosystm: all other connections would halt while that is being done [05:14] echosystm: thats probably not acceptible [05:14] Crell: Ah, because it only hands over processing to the next request when you move from one event to another. [05:14] ckknight: no, but you could do some calculations, then do process.nextTick [05:14] AAA_awright: echosystm: What sort of price? Not nearly as much as threads [05:14] Crell: ckknight: What's that do? [05:15] ckknight: Crell: it queues up a callback to be run on the next event loop cycle. [05:15] ckknight: i.e. the next "tick" [05:16] Crell: So that's how you would batch a long process? [05:16] ckknight: yeah [05:16] echosystm: its not really optimal [05:16] echosystm: if you had to do something like that, you would porbably write your own C extension so it can be threaded [05:16] Crell: echosystm: Because nodejs is at its core still a single thread, just rapidly multiplexing, right? [05:16] echosystm: yep [05:17] Crell: Yeah, I can see where that could break badly in some use cases. [05:17] echosystm: i think they are comparatively rare though [05:17] losing has joined the channel [05:17] echosystm: for most people, node.js is a godsend [05:17] AAA_awright: I was going to sugguest reading through the documentation but I realised it's not heavy on theory. Also, finally, a latest alias http://nodejs.org/docs/latest/api/ [05:18] Crell: Yeah, I'm trying to understand the theory right now, mostly. [05:18] AAA_awright: Was that ryah? I forget how you add karma [05:18] echosystm: if you didnt want to write C, you could alternatively just have some java process to offload length tasks to [05:18] Crell: I have no project for nodejs at present. I'm more trying to get a grounding in the concepts so I can recognize if a project comes up that it would be appropriate for. [05:19] Crell: Wait, there are people who want to write C? [05:19] AAA_awright: It's C++ [05:19] AAA_awright: People do it, I'm not sure they enjoy it [05:19] Crell: hehe. [05:19] Crell: ACTION used to write C for the Palm OS. He's rather glad those days are behind him. [05:19] echosystm: its not too hard to write libraries for node [05:20] AAA_awright: I got a Javascript IRC bot and a game server running several times faster than an earlier C++ implementation, though to be fair some of that was having already implemented the thing [05:20] AAA_awright: Like, hours vs. weeks [05:22] rfay has joined the channel [05:22] Crell: rfay: Fancy meeting you here. :-) [05:24] tom_m has left the channel [05:26] rfay: Crell, you slumming again? [05:26] Crell: Just feeding my curiousity. You? [05:26] isaacs has joined the channel [05:26] Crell: Trying to see how the other half lives? [05:26] rfay: crazed, it's good stuff. [05:26] mickaelz has joined the channel [05:26] rfay: sorry [05:26] rfay: Crell, it's good stuff [05:26] ngs has joined the channel [05:27] Crell: node, you mean? [05:29] Crell: rfay: ^^ [05:29] rfay: Crell, that's what I mean :-) [05:30] Crell: We can't seem to get away from nodes, can we... :-P [05:30] liar has joined the channel [05:30] rfay: Crell, I got started on a project with it that now seems in limbo, but I was very impressed [05:30] Crell: Ah. [05:30] Crell: ACTION is just trying to learn more. No project at the moment. [05:30] rfay: Crell, yeah, as if node wasn't already 200K time overloaded, and then Drupal. And now *this* [05:31] ardcore has joined the channel [05:31] ardcore has left the channel [05:31] rfay: Why is *node* such an attractive word [05:31] Crell: Because it's so generic. [05:31] echosystm: it makes me think of nude [05:31] echosystm: i like nude [05:31] ckknight: nudes are artistic. [05:32] Crell: nude.js? [05:32] Crell: There's a library I'd like to use. [05:32] Ond: It exists [05:32] akavlie has joined the channel [05:32] Ond: For nude image detection or something [05:32] ckknight: lol [05:32] Ond: Obviously inspired by node [05:32] Crell: I am so not surprised... [05:32] Crell: http://www.patrick-wied.at/static/nudejs/ - So it does! [05:33] sivy has joined the channel [05:36] indutny: hey [05:36] indutny: checkout this: [05:36] indutny: https://github.com/donnerjack13589/node-spdy [05:36] Crell: OK, I need to sleep. [05:36] indutny: node-spdy library [05:36] Crell: Thanks everyone! This was most enlightening. [05:36] indutny: collaborators need to continue developing [05:36] indutny: s/developing/development [05:41] tk has joined the channel [05:44] firedfox has joined the channel [05:46] pakeha has joined the channel [05:47] brianmario has joined the channel [05:47] catch has joined the channel [05:47] pakeha: hey is there anyone in here who could help with a nowjs problem? [05:54] Emmanuel__ has joined the channel [05:55] darshanshankar: hey pakeha [05:55] pakeha: hey [05:55] pakeha: thanks for the reply [05:56] darshanshankar: whoops this isn't #Nowjs [05:56] darshanshankar: lets switch to there :-) sorry [05:56] pakeha: cool im already there. [05:57] tedsuo has joined the channel [05:58] rchavik has joined the channel [06:00] Me1000 has joined the channel [06:02] kevliu has joined the channel [06:03] kevliu: howdy! [06:03] kevliu: anyone getting socket hang up problems from ciaranj's oauth lib? [06:17] onre has joined the channel [06:22] aguynamedben has joined the channel [06:22] zylo has joined the channel [06:23] indutny has joined the channel [06:23] onre_ has joined the channel [06:24] jmazzi has joined the channel [06:25] __tosh has joined the channel [06:27] kawaz_air has joined the channel [06:29] onre_ has joined the channel [06:29] astropirate has joined the channel [06:30] qFox has joined the channel [06:31] ardcore has joined the channel [06:31] ardcore has left the channel [06:32] saschagehlich has joined the channel [06:33] indutny1 has joined the channel [06:35] mnutt has joined the channel [06:35] matjas has joined the channel [06:35] onre_ has joined the channel [06:36] seivan has joined the channel [06:36] newy_ has joined the channel [06:37] stonebranch has joined the channel [06:37] pakeha has left the channel [06:38] lightcap__ has joined the channel [06:39] lightcap__: I've got two OS X machines, brew install node works great on one, fails on the other. Looks like it's related to openssl, but as far as I can see both machines are set up the same. Anyone seen issues with openssl on OS X related to compiling node? [06:41] onre_ has joined the channel [06:43] astropirate: lightcap__, solved similar issue on Linux by installing libssl-dev not sure what the Mac equivalent is. perhaps installing that will fix your problem. [06:44] lightcap__: yeah, the header files are in the framework directory... that would make sense, but as far as I can tell they're present [06:44] lightcap__: how OS X finds them, well, that I'm not sure about... [06:47] astropirate: maybe brew keeps a record of installed libraries [06:49] kawaz_air has joined the channel [06:50] jdp has joined the channel [06:51] herbySk has joined the channel [06:51] rchavik has joined the channel [06:52] lightcap__: yeah, it's pretty strange so far. [06:53] dahankzter has joined the channel [06:55] kawaz_air has joined the channel [06:56] V1 has joined the channel [06:58] harth has joined the channel [07:04] onre_ has joined the channel [07:04] jdub has joined the channel [07:04] V1: indutny1: thanks for the pull request <3 [07:05] indutny1: V1: np :) [07:06] indutny1: V1: I had written binary search on JS for my B+ Tree implementation some time ago [07:06] V1: indutny1: B trees are awesome [07:07] indutny1: V1: yep [07:07] steffkes has joined the channel [07:07] indutny1: V1: that's it: https://github.com/donnerjack13589/node-index (but now w/o this binary search for some reasons) [07:08] V1: eeeeewww coffeescript [07:08] V1: ;D [07:08] bartt has joined the channel [07:08] jesusabdullah: I'm a coffeescript agnostic >:P I don't really understand how people feel strongly about it either way [07:08] V1: indutny1: looks like a cool project [07:09] indutny1: V1: hahaha :) yep,I know [07:09] indutny1: that was an experiment [07:09] unomi has joined the channel [07:09] unomi has joined the channel [07:09] jesusabdullah: Yeah, looks pretty rad indutny1 [07:09] V1: indutny1: it' does look kinda slow to me [07:10] V1: but that might more be limit of the fs module than of your project [07:10] awenkhh has joined the channel [07:11] indutny1: V1: dunno [07:12] V1: but than again, writing a datastore in nodejs is silly anyways :D [07:12] indutny1: V1: probably that's a cons of my implementation [07:12] indutny1: V1: :D [07:13] coreb has joined the channel [07:14] indutny1: brb [07:15] sveimac has joined the channel [07:16] skm has joined the channel [07:17] onre has joined the channel [07:17] indutny1: upvote please [07:17] indutny1: https://github.com/donnerjack13589/node-index [07:18] ajnasz has joined the channel [07:19] sholmes has joined the channel [07:19] indutny1: fck [07:19] indutny1: wrong link [07:19] indutny1: http://news.ycombinator.com/item?id=2473474 [07:20] indutny1: sorry [07:20] isaacs has joined the channel [07:20] indutny1: thanks [07:20] stagas: indutny1: cool stuff [07:20] dgathright_ has joined the channel [07:20] indutny1: stagas: thanks man [07:21] indutny1: today is a day of revealing my hidden gems [07:21] indutny1: :D [07:21] indutny1: lol [07:22] Nexxy: wrong channel! [07:23] Casperin has joined the channel [07:24] kawaz_air has joined the channel [07:25] indutny1: Nexxy: ? [07:26] Druide_ has joined the channel [07:26] zylo has joined the channel [07:28] jacobolus has joined the channel [07:28] stagas: indutny1: how big values are the benches tested with? [07:30] markwubben has joined the channel [07:30] raphdg has joined the channel [07:31] Nexxy: indutny1, nevermind ^-^ [07:32] saschagehlich: V1: one of my servers seems to be freezing... it does not accept any more socket.io connections. when I tried to strace the process, I got this: https://gist.github.com/47d16f1bc34d3f92cff1 [07:32] stefounet has joined the channel [07:32] saschagehlich: looks like it's stuck in some kind of EAGAIN loop [07:33] dgathright has joined the channel [07:33] V1: saschagehlich: yikes [07:33] stefounet has left the channel [07:34] V1: saschagehlich: server out of file descriptors? [07:34] saschagehlich: then it would throw "too many open files then", right? [07:35] [AD]Turbo has joined the channel [07:36] MikhX has joined the channel [07:36] V1: saschagehlich: good point [07:37] V1: I have never see that issue before.. that's what makes it odd [07:37] saschagehlich: :/ [07:37] saschagehlich: why always me?! [07:38] ditesh|cassini has joined the channel [07:39] sshaginyan has joined the channel [07:40] m64253 has joined the channel [07:40] hackband has joined the channel [07:41] saschagehlich: wtf [07:41] saschagehlich: tj was on some kind of lsd-refactoring-trip or what? [07:41] hackband has joined the channel [07:42] saschagehlich: did that fix some bugs or was it really just refactoring? [07:43] sshaginyan: would you guys recommend installing jsdom with npm? [07:43] saschagehlich: sshaginyan: sure, why not? [07:43] sshaginyan: gave me problems last time [07:43] sshaginyan: something with ENET missing [07:43] sshaginyan: or jsdom.package missing [07:44] sshaginyan: ENOT [07:44] V1: saschagehlich: I was wondering the same thing.. As rauchg is releasing 0.7 on monday [07:44] V1: ._. so i'm like WTF are you doing? [07:44] [AD]Turbo: hi there noders [07:44] paolodedios has joined the channel [07:45] V1: indutny1 I'm gonna apply your bisection patch to my node-bisection as well, as I'm removing the bisection dependency from the hashring module [07:46] mikedeboer has joined the channel [07:46] dgathright_ has joined the channel [07:46] sshaginyan: saschagehlich: this is another error I'm getting when trying to install npm http://pastie.org/1821716 [07:47] sshaginyan: Anyone have any suggestions? [07:47] confoocious has joined the channel [07:47] confoocious has joined the channel [07:47] isaacs: sshaginyan: either install as root, or install it somewhere you have permission to write to [07:48] isaacs: sshaginyan: sudo bash -c 'curl http://npmjs.org/install.sh | npm_install=rc sh' [07:49] sshaginyan: isaacs: tried to install as root this is what I got http://pastie.org/1821718 [07:49] sshaginyan: WARN NOT installed... [07:49] isaacs: sshaginyan: hooray! [07:49] isaacs: sshaginyan: yeah, becasue it does a clean first [07:49] sshaginyan: I see thank you [07:49] isaacs: np [07:49] isaacs: i next version won't warn ther. [07:50] msucan has joined the channel [07:50] sshaginyan: isaacs: Can you help me install jsdom? I've been trying to do this for 2 days now. Please? [07:51] sshaginyan: isaacs: would it be npm install jsdom? [07:51] isaacs: sshaginyan: yes [07:51] astropirate has joined the channel [07:51] isaacs: if you want to do require("jsdom"), yes, do "npm install jsdom", right in the root of your package folder [07:51] hackband_ has joined the channel [07:51] isaacs: it'll install it to ./node_modules so node can just automatically find it easily [07:52] sshaginyan: isaacs: where is my package folder? [07:52] isaacs: sshaginyan: the thing you're writing. your project. yoru program. [07:52] sshaginyan: I've installed node in ~/node [07:52] sshaginyan: I see [07:52] isaacs: maybe it's /home/sshaginyan/projects/my-thing-i'm-using-jsdom-for/ [07:52] isaacs: cd into there, do `npm install jsdom` and then `vim thing-that-uses-jsdom.js` [07:52] piscisaureus has joined the channel [07:53] isaacs: and type "iconsole.log(require('jsdom')):wq" [07:53] isaacs: and shazam [07:53] sshaginyan: isaacs: wow thank you so much. Is there an emacs plugin for node? [07:53] isaacs: hehe, i dunno [07:53] sshaginyan: :( [07:55] sshaginyan: isaacs: I got a dir node_modules [07:56] sshaginyan: isaacs: on the same level as node_modules just create my file "crawl.js" and require("jsdom")? [07:56] isaacs: yep [07:56] isaacs: or anywhere in that folder. [07:57] sshaginyan: isaacs: or would it be require("node_modules/jsdom")? [07:57] isaacs: like ./lib/crawl.js would work. [07:57] isaacs: nope. no node_modules in the require() [07:57] isaacs: "node_modules" is "magic" [07:57] sshaginyan: I see [07:57] isaacs: it's where node modules go :) [07:58] [ADTurbo] has joined the channel [07:59] __tosh has joined the channel [07:59] dgathright has joined the channel [07:59] sshaginyan: isaacs: Same problem as before [07:59] isaacs: sshaginyan: what's the same problem as before? [08:00] TurboAWAY has joined the channel [08:00] sshaginyan: isaacs: I have been trying to use node.js with jsdom + jquery and this is what I get http://pastie.org/1821740 [08:01] isaacs: i see. what version of node are you using? [08:01] mikedeboer_ has joined the channel [08:01] sshaginyan: v0.5.0-pre [08:01] sshaginyan: downgrade time? [08:01] isaacs: dunno. [08:02] isaacs: works fine with the code on master [08:02] isaacs: joyent/node @master, i mean [08:02] isaacs: er, wait, no i'm on the 0.4 branch, i guess. [08:02] sshaginyan: I tried this with ubuntu + os x + debian [08:02] isaacs: nope. master's the same. [08:02] sshaginyan: same problem [08:03] TurboAWAY has joined the channel [08:04] isaacs: oh, yep, that's a bug in jsdom [08:04] sshaginyan: isaacs: A quick search in google solves the problem by installing jsdom from git [08:04] isaacs: should be using require("vm"), not process.binding("evals") [08:04] sshaginyan: isaacs: where should I change this? [08:04] isaacs: post an issue on teh jsdom github repo. bug him ot publish it. tmpvar's usually really receptive. [08:05] sshaginyan: k but how is yours working? [08:05] isaacs: sshaginyan: see that line in the error message telling you the file and line where Script is undefined? tha'ts the file. change "process.binding("evals").Script" to require("vm").Script [08:05] isaacs: I wasn't doing something that was triggering the errorr [08:07] evilhackerdude has joined the channel [08:08] confoocious has joined the channel [08:08] confoocious has joined the channel [08:08] jed__ has joined the channel [08:09] abraxas: How do you guys deal with inspection of error objects? [08:09] abraxas: On property not found errors, when I console.log() the error, it doesn't show the stack. [08:09] abraxas: It just shows Getter/Setter [08:09] karboh has joined the channel [08:09] abraxas: util.inspect doesn't do a better job at it. [08:12] sshaginyan: isaacs: thank you sooooo much. How did you know that was the error? I will tell tmpvar. [08:12] isaacs: sshaginyan: because that api changed kinda recently [08:12] isaacs: abraham: console.log(er.stack) [08:12] isaacs: abraxas: ^ [08:13] abraxas: Sure :) But I would like to be agnostic to the error object. I just want to output the entire object. [08:15] abraxas: Or perhaps stack is always really the only interesting property... [08:15] jaket has joined the channel [08:16] stefounet has joined the channel [08:20] dsirijus has joined the channel [08:20] indutny1: stagas: sorry, was afk [08:21] indutny1: stagas: small documents, like in couchdb [08:21] indutny1: stagas: only _rev _id and value fields [08:21] indutny1: with some short stirng [08:21] indutny1: string* [08:22] mikedeboer_ has joined the channel [08:25] unomi has joined the channel [08:29] Nexxy: ACTION would like suggestions on modules for logging to some sort of (no)SQL... mongo? postgres? [08:30] indutny1: Nexxy: try winston [08:30] indutny1: https://github.com/indexzero/winston [08:30] Nexxy: ooo [08:30] Nexxy: ty [08:30] Nexxy: lewl; "CHILL WINSTON! ... I put it in the logs." [08:30] Nexxy: I like it already! ;3 [08:32] sshaginyan has left the channel [08:35] indutny1: Nexxy: all fame to indexzero and our company nodejitsu [08:35] indutny1: :D [08:39] Nexxy: ^-^ [08:39] Nexxy: oh oh are you donnerjack? [08:39] Nexxy: I saw node-spdy on hn, I want to find a reason to try that sometime! [08:40] tshpaper has joined the channel [08:42] hellp has joined the channel [08:44] vish_ has joined the channel [08:45] robhawkes has joined the channel [08:45] SubStack: oh nice, arguments after the delay in microseconds to setTimeout get passed to the callback [08:45] roidrage has joined the channel [08:45] hebz0rl has joined the channel [08:46] stagas: SubStack: really? [08:46] SubStack: true fact [08:46] stagas: this was happening always? [08:47] SubStack: same for setInterval [08:47] SubStack: ALWAYS [08:47] SubStack: or so I suppose on no evidence whatsoever [08:47] Chester has joined the channel [08:48] stagas: :P [08:49] indutny1: stagas: yep, I'm donnerjack too [08:49] indutny1: :D [08:49] indutny1: thanks [08:49] Nexxy: I asked you that ;P [08:49] stagas: indutny1: Nexxy asked, I already knew :P [08:49] chia has joined the channel [08:49] indutny1: aaaa [08:49] Nexxy: harumph [08:49] Nexxy: ACTION pouts. [08:50] indutny1: ACTION thinks that was a stupid mistake [08:50] indutny1: actually, I'm not even indutny1 [08:50] indutny1: but just indutny [08:50] stagas: SubStack: hm someone should patch nextTick to do the same [08:51] indutny1: ryah: ping? [08:51] SubStack: stagas: that would be pretty useful [08:52] jetienne has joined the channel [08:52] chapel: isaacs: ping [08:52] SubStack: what node version? [08:53] chapel: stagas: like a delay argument in nextTick? [08:53] [[zzz]] has joined the channel [08:53] stagas: chapel: no, args for the callback [08:53] christophsturm has joined the channel [08:53] SubStack: oh wait, wrong place [08:53] chapel: oh [08:53] chapel: I misunderstand I guess [08:55] path[l] has joined the channel [08:59] mape: indutny1: nice work with spdy [09:06] [[zz]] has joined the channel [09:18] d0k has joined the channel [09:22] Xano has joined the channel [09:22] MattJ has joined the channel [09:29] echosystm: why is util.iherits necessary? [09:30] echosystm: MyClass.prototype = Object.create(SuperClass.prototype); ? [09:30] onre has joined the channel [09:32] langworthy has joined the channel [09:32] seivan has joined the channel [09:34] kat has joined the channel [09:35] jacobolus has joined the channel [09:37] onre_ has joined the channel [09:38] markwubben has joined the channel [09:38] Wizek has joined the channel [09:40] sveimac has joined the channel [09:43] onre_ has joined the channel [09:44] m64253 has joined the channel [09:44] fly-away has joined the channel [09:51] onre_ has joined the channel [09:56] onre_ has joined the channel [10:00] mraleph has joined the channel [10:00] Corren has joined the channel [10:02] onre_ has joined the channel [10:02] RusAlex has joined the channel [10:03] Guest89491: wow 500 people here and nobody says something! [10:03] Guest89491: unbelievable [10:04] andy_dawson: did you have a question Guest89491 [10:05] Guest89491: not yet but i want to see you discussing ;) [10:05] shachaf: ACTION will start a "discussion". [10:05] mape: easter [10:05] shachaf: So how 'bout them coroutines? [10:08] chapel: lol shachaf out now! [10:08] chapel: ACTION points at the door [10:11] thalll has joined the channel [10:12] onre_ has joined the channel [10:13] tk has joined the channel [10:15] sh1mmer has joined the channel [10:17] andy_dawson: does anyone have a hint/tip here - trying to prepend a value to an array in mongo - the update says it succeeds via node, but the db is unmodified https://gist.github.com/2b31614ebedfa609d363 [10:18] ph^ has joined the channel [10:20] H4ns has joined the channel [10:21] MEgrez has joined the channel [10:21] Guest51454 has joined the channel [10:27] stagas: andy_dawson: you're not doing anything with doc.items after you unshift [10:28] hassox has joined the channel [10:28] boghog: is there a way to resolve a hostname with node.js? I want to connect to a host with createConnection, but I'd also like to see what the address resolved to (to see if its going over ipv6 or not), but the socket.remoteAddress field is undefined (and the docs do say it is for server-side only, though I'm not sure what that means) [10:28] andy_dawson: stagas: thanks for noticing, gist updated [10:29] andy_dawson: stagas: actually I'll clean it up again .. it works for first insert and not any subsequent update. it's probably user error somehow [10:29] stagas: andy_dawson: shouldn't the unshift go after you set a value on 'update' ? [10:30] cryptix has joined the channel [10:30] H4ns: boghog: there is the DNS object (http://nodejs.org/docs/v0.4.1/api/dns.html), but i'd expect socket.remoteAddress to work, too [10:31] boghog: oh thanks [10:31] boghog: not sure .remoteAddress is undefined even after connecting and having received data [10:31] boghog: although, maybe I missed something [10:33] H4ns: boghog: ah, the documentation is pretty clear, you're right. would be nice to fix that :) [10:33] onre_ has joined the channel [10:33] boghog: yeah, I thnk the C socket API can do it with getpeername or something right? [10:34] H4ns: boghog: correct. there must be some strange reason why remoteAddress is only present in server side sockets. [10:34] jetienne: boghog: yep, possible at C Socket api level [10:35] andy_dawson: stagas: https://gist.github.com/72a3dce50828fc9501fb#comments (cli output in comment) [10:36] stagas: andy_dawson: well that's weird [10:37] andy_dawson: crodas: :/ [10:37] andy_dawson: oops :D [10:37] andy_dawson: but yes. :/ [10:38] andy_dawson: I'll ask in mongodb maybe someone has an explanation [10:39] onre_ has joined the channel [10:44] mike5w3c has joined the channel [10:47] sveimac has joined the channel [10:49] pt_tr has joined the channel [10:50] ManuelKiessling has joined the channel [10:51] tokumine has joined the channel [10:58] andy_dawson: stagas: I conclude it's a bug in the driver [10:58] andy_dawson: jfi [10:59] swizard has joined the channel [11:00] crodas: andy_dawson: did I miss something :-) [11:00] crodas: ? [11:01] andy_dawson: no ;) tab-complete error [11:03] sveimac has joined the channel [11:04] andrewfff has joined the channel [11:05] Country has joined the channel [11:07] mike5w3c has joined the channel [11:11] duncanbeevers has joined the channel [11:13] stonebranch has joined the channel [11:16] sdecastelberg has joined the channel [11:20] F1LT3R has joined the channel [11:21] agileguy has joined the channel [11:22] duncanbeevers has joined the channel [11:22] fairwinds has joined the channel [11:27] pietern has joined the channel [11:29] markwubben has joined the channel [11:31] heavysixer has joined the channel [11:32] dsirijus has joined the channel [11:34] aheckmann has joined the channel [11:35] GriffenJBS has joined the channel [11:39] stagas: SubStack: http://groups.google.com/group/nodejs-dev/browse_thread/thread/c1a01a302b87dc0d [11:40] stagas: :D [11:41] seivan has joined the channel [11:42] bsstoner_ has joined the channel [11:43] piscisaureus has joined the channel [11:45] stephank has joined the channel [11:48] chia has joined the channel [11:50] wereHamster: when I require a module, is there a way to get the absolute path to the module that was loaded? [11:51] wereHamster: require.resolve() maybe? /me goes to check [11:51] ezl has joined the channel [11:52] eee_c has joined the channel [11:59] Guest89491: http://groups.google.com/group/nodejs-dev/topics?gvc=2 [11:59] sveimac has joined the channel [12:03] sonnym has joined the channel [12:09] ChrisPartridge has joined the channel [12:13] astrolin has joined the channel [12:15] k1ttty has joined the channel [12:17] loob2 has joined the channel [12:17] bojicas has joined the channel [12:19] kriszyp has joined the channel [12:20] seivan has joined the channel [12:20] shaunau: andy_dawson: maybe you should be using addtoset? [12:22] SumWon has joined the channel [12:22] synkro has joined the channel [12:24] SumWon: Anyone know of a module that allows you to eval javascript with a callback for when it's finished, or something along those lines? [12:24] V1: vm? [12:24] V1: http://nodejs.org/docs/v0.4.6/api/vm.html [12:25] markwubben has joined the channel [12:25] SumWon: Well, sorta [12:25] V1: other than that. no [12:25] SumWon: But as far as I can tell, there's no way to check when it's done executing. :/ [12:25] SumWon: I dunno, it's like 5 AM, I'm not thinking correctly and need to sleep. [12:27] SumWon: Problem is, if my evaluated code has anything with callbacks, by the time the callbacks are called within the evaluated code, the original function which evals the code in the first place has long finished and called it's own callback. [12:27] cryptix: can somebody tell me if http://visionmedia.github.com/masteringnode/ is worth a read? im still trying to wrap my head around the async/event based stuff… i need the "aaaaah"-effect like when i learned C and got my head arround asm and how to debug it… it suddenly all made sense [12:27] SumWon: Oh god good luck understanding that mess of a sentence that i just made. [12:27] dschobel has joined the channel [12:31] daniel has joined the channel [12:31] raynos: sumwon: build a bridge between your code and the eval code. Append it with "finish()" and then define that function. [12:31] raynos: cryptix: yes it is wowrth a read [12:32] SumWon: What if the eval code has a function with a callback? Finish, at the end of the code, will be called before the callback... :S [12:32] raynos: whether you'll learn how to do asyn/event based stuff thats different [12:32] raynos: SumWon: force the code to have a specific structure. [12:32] Xano has joined the channel [12:32] raynos: besides eval is the devil. Why are we using eval? [12:32] cryptix: thanks raynos [12:32] SumWon: Just playing around with a javascript preprocessing web server lmao... [12:33] SumWon: You can put javascript nodes within an html file that nodejs processes before sending the file to the user. [12:33] SumWon: Hence my problem. By the time it's finished processing the file, it's already been sent. I need to have a callback for when the code is completely processed so it can then be sent to the user. [12:34] SumWon: Or I could just go do something that isn't insanely stupid, like exactly what I'm doing [12:34] SumWon: ACTION shrugs. [12:34] path[l] has joined the channel [12:34] c4milo has joined the channel [12:34] fermion has joined the channel [12:34] mnutt has joined the channel [12:35] raynos: SumWon: have you looked at jspp ? [12:35] SumWon: I have not [12:35] raynos: http://www.jspp.io/ [12:35] raynos: Either you want that. Or you can read their source and figure out their black magic. [12:35] SumWon: Oh, seems someone else has beat me to it lol [12:35] SumWon: Well, either way, thanks [12:36] Nick has joined the channel [12:37] dyer has joined the channel [12:39] jtrudeau has joined the channel [12:41] Max-Might has joined the channel [12:42] jscheel has joined the channel [12:42] jscheel has joined the channel [12:43] path[l] has joined the channel [12:45] path[l] has joined the channel [12:45] dies_el has joined the channel [12:46] raynos: In future check the node modules list :) [12:48] raynos: Oh it's not on the list [12:48] Bj_o_rn has joined the channel [12:49] Guest90382 has left the channel [12:49] Guest90382 has joined the channel [12:51] SumWon: I did hehe [12:52] SumWon: Couldn't find anything relevant [12:52] SumWon: Anywho, this looks really cool [12:52] SumWon: Thanks for the find :) [12:52] SumWon: Anywho, I'm off to bed. I'll have to dive into this in the morning. [12:52] broofa has joined the channel [12:53] mike5w3c_ has joined the channel [12:54] fumanchu182 has joined the channel [12:54] Muon has joined the channel [12:54] Muon has joined the channel [12:55] Schmallon has joined the channel [12:56] sirkitree has joined the channel [12:56] pt_tr has joined the channel [12:56] zemanel has joined the channel [12:58] Guest90382: Hi all, is there any way to get node to respect locale? Examples ... [12:59] Guest90382: Node.js> console.log(new Date().toLocaleString()) --> 'Fri Apr 22 2011 12:58:02 GMT+0000 (WEST)' [12:59] Guest90382: GoogleChrome> console.log(new Date().toLocaleString()) --> 'Fri Apr 22 2011 14:58:32 GMT+0200 (W. Europe Daylight Time)' [13:00] H4ns has joined the channel [13:00] Guest90382: Second example is correct. Ideas? [13:00] jscheel: Guest89491: what happens when you type "date" into your terminal? [13:01] Guest89491: i have no node.js [13:01] Guest89491: lol you spoke with the wrong guest [13:01] jscheel: oh [13:01] Guest89491: ;) [13:01] jscheel: Guest90382: question above ^ [13:01] kmiyashiro has joined the channel [13:02] Guest90382: > Date() --> 'Fri Apr 22 2011 13:01:47 GMT+0000 (WEST)' [13:03] raynos: Might be an issue with v8 versions being out of sync [13:03] hvgotcodes has joined the channel [13:03] jscheel: Guest90382: sorry, I mean in your command line, not in node [13:04] Guest90382: Sorry, stupid me. > date --> Fri Apr 22 15:03:26 WEDT 2011 [13:04] Guest90382: works there [13:04] devdazed has joined the channel [13:05] boghog: what would you guys say is the best way to split a Buffer into seperate lines, where the lines are seperated by "\r\n" ? [13:06] dansays has joined the channel [13:07] sirkitree has joined the channel [13:07] raynos: boghog: regular expressions [13:08] hvgotcodes: where is there documentation on ALL the steps needed to create an https server, including the key stuff and how to connect? [13:08] jmazzi has joined the channel [13:10] rfay has joined the channel [13:10] boghog: thanks raynos [13:11] arpegius has joined the channel [13:12] sourcode has joined the channel [13:13] jamescarr_ has joined the channel [13:13] jmazzi_ has joined the channel [13:14] m64253 has joined the channel [13:14] [[zz]] has joined the channel [13:14] dansays has joined the channel [13:17] sooli has joined the channel [13:17] jlecker has joined the channel [13:17] sooli: Hi all [13:17] sooli: I have an issue with the latest exoressjs and haml: has no method 'call' [13:17] sooli: anyone got the same issue ? [13:17] davidsklar has joined the channel [13:18] jacobolus has joined the channel [13:20] taf2: i created my first node.js c++ addon: https://github.com/taf2/fork.node [13:20] shaunau: boghog: mscdex wrote a [13:20] taf2: what do you guys think? [13:20] taf2: does it make sense to have a fork in node.js ? [13:20] shaunau: *Buffer manipulation lib just the other day, that might help - not sure. [13:20] taf2: seems to me it would be nice to be able to fork a process to go do some busy cpu tasks [13:21] taf2: maybe there is already a node.js way to handle this? [13:21] boghog: shaunau, ah, well I think regex can do what I need, but I'm having a different problem right now, I will need to convert my buffer to a string, but the data in the buffer might not be utf8 or ascii encoded, and those (along with base64) are the only encoding supported it seems [13:21] pdelgallego has joined the channel [13:22] febits has joined the channel [13:22] shaunau: boghog: oh, what is the encoding you expect? [13:23] tokumine has joined the channel [13:24] boghog: shaunau, well it could be anything in theory I think (I'm handling IRC messages), so it should be configurable in my application, but mainly I think i will likely need support for some of the iso8859 encodings [13:24] shaunau: taf2: sounds reasonable.. i dunno what the node way of doing that would be 'normally' [13:25] Guest89491: Am coolsten waere natuerlich eine Node.js implementierung in Java oder .NET [13:25] taf2: shaunau, cool yeah the main thing i am thinking is needed is a real unix pipe interface to build a IPC between the 2 procs [13:25] taf2: maybe it could be another type of Stream [13:26] xandrews has joined the channel [13:27] shaunau: boghog: i see [13:29] shaunau: taf2: i was thinking a similar thing.. so you fork the process and off it goes into the wild blue yonder.. never to be seen again. [13:29] timmywil has joined the channel [13:29] Corren has joined the channel [13:31] shaunau: hmm i started off tweaking things on Mongolia.. that has progressed into a complete rewrite and my project has stalled.. *sigh* [13:31] ditesh|cassini has joined the channel [13:32] unomi has joined the channel [13:33] brianc has joined the channel [13:33] leetreveil has joined the channel [13:33] galaxywatcher has joined the channel [13:38] devrim has joined the channel [13:38] ovnicraft has joined the channel [13:39] leetreveil: Buffer.toString() isn't working as im expecting, b[0] = 255 = á but it's not being converted [13:40] cbibler_ has joined the channel [13:40] leetreveil: any ideas? [13:41] siculars has joined the channel [13:42] mscdex: leetreveil: converted to what? [13:42] timmywil has joined the channel [13:42] leetreveil: to a string [13:42] davidwalsh has joined the channel [13:42] wink_: leetreveil: http://nodejs.org/docs/v0.4.6/api/all.html#buffer.toString [13:42] ManuelKiessling has joined the channel [13:43] postwait has joined the channel [13:44] Bwen has joined the channel [13:44] leetreveil: yeah i've read the documentation [13:44] leetreveil: im using the correct encoding [13:44] setner has joined the channel [13:45] wink_: which encoding are you using? [13:45] brianc: leetreveil: can you gist the actual code? [13:46] leetreveil: utf-8 [13:46] brianc: leetreveil: also, which version of node are you on? [13:47] openpercept has joined the channel [13:47] leetreveil: v0.4.5 text: b.toString(charset, start, end), [13:47] leetreveil: thats the code [13:47] wink_: i dont see 255 being that character in utf8? [13:47] rfay has joined the channel [13:48] leetreveil: http://www.utf8-chartable.de/ U00E1 [13:48] brianc: leetreveil: could you create an executable gist so I could try it out on my end? [13:48] wink_: right, its not 255 [13:49] wink_: its c3a1 [13:49] wink_: http://www.pastie.org/1822460 [13:49] wink_: that prints what you expect [13:49] brianc: wink_: thanks ;) [13:50] wink_: you'll want buf[1] set to 0xa1, not 0xa0 [13:50] leetreveil: hmm i must be reading the wrong encoding then [13:50] wink_: <3 [13:50] prettyrobots: piscisaureus: Good afternoon, sir. [13:50] dies_el: cd [13:50] wink_: leetreveil: im not sure how, im looking at your link [13:50] dies_el: hmm -- this isn't my shell window [13:50] trotter has joined the channel [13:50] dies_el: ACTION rubs eyes [13:51] leetreveil: doh its ascii encoded [13:51] arianrock has joined the channel [13:51] dnolen has joined the channel [13:53] leetreveil: hmm b.toString('ascii') still isnt working [13:53] leetreveil: but when i do String.fromCharCode(b[0]) [13:53] leetreveil: it prints the correct char [13:53] mscdex: well, javascript strings are utf8 [13:53] boghog: shaunau, hrm, looking at http://nodejs.org/docs/v0.4.6/api/buffers.html it seems the 'binary' encoding would allow me to use a regexp on my Buffer data, without potentioally destroying data from encoding conversion, but sadly it is deprecated [13:54] dcampano has joined the channel [13:54] leetreveil: ah that makes sense then [13:54] openpercept has joined the channel [13:54] leetreveil: so if I did toString('binary') that would work right?> [13:55] arianrock: toString('utf-8') [13:56] tokumine has joined the channel [13:56] mscdex: utf8 is the default encoding for buffer's toString() [13:57] eee_c has joined the channel [13:57] leetreveil: yeah so whats the way round this without using 'binary' encoding [13:57] mynyml has joined the channel [13:58] boghog: I guess I have essentially the same question as leetreveil [13:58] Me1000 has joined the channel [13:58] mscdex: what encoding are you wanting to use then? [13:58] mscdex: i'm confused [13:58] leetreveil: the data im reading is ascii encoded - from a file [13:58] leetreveil: I just want it converted to a readable string [13:59] boghog: then either ascii or utf8 would work right? [13:59] mscdex: well, ascii is "readable" [13:59] wink_: its not ascii if it has that a in it [13:59] mscdex: and utf8 works fine with ascii data [13:59] boghog: if it really is ascii, not an iso8859 encoding [14:00] boghog: which is the problem I am having :/ [14:00] wink_: not at 255 anyhow [14:00] mscdex: ascii only goes up to 7F [14:00] mscdex: http://asciitable.com/index/asciifull.gif [14:01] gnagno has joined the channel [14:01] gnagno: hello all [14:01] mscdex: :-D [14:01] mscdex: yo [14:01] duncanbeevers: Wow, I can't believe there's a gif of that. [14:02] V1: yes, make gif of your ascii table so people can copy and paste the codes. O wait [14:02] bingomanatee has joined the channel [14:02] mnutt has joined the channel [14:02] mscdex: psh, no need to copy and paste ascii codes [14:02] mscdex: ;) [14:03] bkozal has joined the channel [14:03] mscdex: plus the domain is so easy to remember :P [14:05] boghog: anyway, does anyone have any idea on how to use a regexp over a buffer that contains text encoded with latin1 or other encodings not supported by node.js/Buffer ? [14:06] boghog: would patches for additional encodings for node.js be supported? :p [14:06] JusticeFries has joined the channel [14:07] leetreveil: yes boghog we are having the same problem :) [14:07] mscdex: boghog: you can't do regex on buffers [14:07] leetreveil: im just going to have to String.fromCharCode over the buffer [14:07] Swimming_bird has joined the channel [14:08] boghog: mscdex, I know, so I have to convert it to string, but I can't use utf8 (illegal character sequences) nor ascii (I lose the 8th bit) [14:08] leetreveil: or use binary encoding for now and switch to fromCharCode when binary is removed [14:08] markstory has joined the channel [14:09] mscdex: maybe just write your own indexOf method [14:09] mscdex: :P [14:09] mscdex: that's what i did [14:09] mscdex: depending on how complex your regex is [14:10] boghog: i think maybe I'll just do that, my regex is very simple [14:10] XaKBooT has joined the channel [14:12] mscdex: here's one i wrote that accepts a single byte or an array of bytes: https://gist.github.com/68ce9f8d2cb3ec1884bf [14:13] leetreveil: and sorry mscdex for confusing you it was 225 = á and 255. oops :p [14:13] mscdex: heh [14:13] Xano has joined the channel [14:14] __sorin__ has joined the channel [14:15] prettyrobots: piscisaureus: Ping me when you're around. Looking for more work. [14:16] yhahn has joined the channel [14:17] Guest89491: get a job [14:18] prettyrobots: Guest89491: Jobs are for suckers. [14:18] prettyrobots: Are you a sucker? [14:18] Guest89491: i suck [14:20] sivy has joined the channel [14:21] Yuffster has joined the channel [14:22] raynos: prettyrobots: get a job :o [14:22] raynos: Preferably in node. [14:22] prettyrobots: raynos: Looking for more tasks on liboio. [14:23] cryptix has joined the channel [14:23] adulteratedjedi has joined the channel [14:24] raynos: I just realised chrome really does not like streaming 10 html5 videos at once. [14:24] ceej has joined the channel [14:24] arianrock: let me try that [14:24] arianrock: no reason why it wouldnt like it [14:24] arianrock: all streaming is in one thread, [14:24] prettyrobots: raynos: It doesn't have to like it. That's its job. [14:25] raynos: I think the main problem is trying to load 10 youtube videos in parallel [14:25] raynos: preferably try it here: http://tosh.comedycentral.com/blog/2011/04/15/nyan-cat-party because it's really annoying. [14:26] V1: or nyan.cat [14:26] hvgotcodes: how do i put basic auth credentials on a node http request? [14:26] dschobel: \quit [14:27] mscdex: hvgotcodes: set the Authorization header [14:28] openpercept has joined the channel [14:28] mike5w3c_ has joined the channel [14:29] hvgotcodes: mscdex, example? [14:29] caike has joined the channel [14:30] hvgotcodes: mscdex: is this still applicable? http://stackoverflow.com/questions/3905126/how-to-use-http-client-in-node-js-if-there-are-basic-authorization [14:30] constantx has joined the channel [14:30] mike5w3c has joined the channel [14:31] aroop has joined the channel [14:32] raynos: hvgotcodes: probably because IvoWetzel is _never_ wrong. [14:32] hvgotcodes: if i upvote that answer, he gets a badge, which Ill do if it works ;) [14:33] hvgotcodes: do all basic auths are they base64? [14:33] mscdex: hvgotcodes: just set the Authorization header to: 'Basic ' + new Buffer(username + ':' + password).toString('base64'); [14:33] hvgotcodes: mscdex: yep thats what the link says [14:33] hvgotcodes: mscdex: what do i need to do to generate keys so i can start an https server? [14:33] hvgotcodes: is there documentation for that anywhere? [14:34] mscdex: keys? like a self-signed cert? or ? [14:34] febits has joined the channel [14:34] hvgotcodes: mscdex: whatever i need to do to be able to run https [14:34] hvgotcodes: yeah i think its a cert [14:35] raynos: I think the documentation is the HTTP 1.1 specification go read it [14:36] Jonasbn_ has joined the channel [14:36] stagas: raynos: this is awesome [14:37] raynos: stagas: what is awesome? [14:37] stagas: raynos: nyan [14:37] mscdex: hvgotcodes: http://nodejs.org/docs/v0.4.6/api/tls.html [14:37] stagas: haha [14:37] raynos: stagas: yes nyan is awesome [14:38] hvgotcodes: mscdex: ah thanx [14:38] jtsnow has joined the channel [14:38] shiawuen has joined the channel [14:39] jefftrudeau has joined the channel [14:39] ian_rc has joined the channel [14:39] cbiscardi has joined the channel [14:40] necromancer has joined the channel [14:41] mbrevoort has joined the channel [14:42] Prism has joined the channel [14:43] mnutt has joined the channel [14:45] ManuelKiessling has joined the channel [14:45] leetreveil has joined the channel [14:46] piscisaureus: prettyrobots: did the test? [14:46] piscisaureus: *benchmark? [14:46] softdrink has joined the channel [14:47] piscisaureus: and fixed the mac build? [14:47] prettyrobots: piscisaureus: Ys. That's what I wanted to ask you. I read through tcp_writealot and wondered if that was the test you wanted. [14:47] prettyrobots: I thought you might have needed it and knocked it out. [14:47] piscisaureus: prettyrobots: nah test_writealot is not a benchmark. It was just to demonstrate that ryah really needs to get write queuing going [14:47] replore has joined the channel [14:48] piscisaureus: (and to test write with multiple buffers) [14:48] prettyrobots: Okay. Well, how about I write up what I think a benchmark should be on the issue I created, and you can correct my misconceptions. [14:49] piscisaureus: eh yeah that's ok [14:49] piscisaureus: mail it to me if I'm not here [14:49] piscisaureus: or comment the issues on github [14:49] prettyrobots: I was going to put it in the Issue tracker. [14:49] prettyrobots: Yes. Exactly. [14:49] Venom_X has joined the channel [14:50] piscisaureus: it should test ~ the same as this ab benchmarks do in node [14:50] prettyrobots: Also, the Mac build is a bit of challenge because it seems that the new error code stuff is not checked into `oio-unic.c`. [14:50] piscisaureus: oh yes [14:50] piscisaureus: ryah was going to fix that yesterday, I think he didn't get around to it [14:50] prettyrobots: So, it's not building because of type errors, so I put that on hold too. [14:50] prettyrobots: Sure. [14:51] prettyrobots: I'm just making my excuses. [14:51] piscisaureus: nvw [14:53] prettyrobots: Anyway, the benchmark patch will be longer, so, if I submit a patch that is all the wrong thing, just tell me, I'll have a much better notion of what's needed if there is something to talk about. I don't mind rewriting, etc. I'm not going to cry if a patch is rejected. Don't hesitate to be critical, etc. [14:53] willwhite has joined the channel [14:53] prettyrobots: FYI. [14:55] davidsklar has joined the channel [14:56] boghog: inside of an event handler, what does the 'this' keyword refer to? I had assumed it would refer to object that fired the event, but it doesn't seem to.. unless i'm 'doing it wrong' [14:56] piscisaureus: we'll see how it goes. I like the idea of having someone write stuff with oio [14:56] piscisaureus: if we made the api really impractical at least we'll know soon. [14:57] piscisaureus: otherwise we end up having tests and bench's which is also goof [14:57] piscisaureus: *good [14:57] firedfox has joined the channel [15:00] boghog: nm, I was indeed doing it wrong [15:00] Guest89491: I'd be interesting in the benchmark results! [15:01] taf2: shaunau, heh, yeah fork and it's on it's own... i was able to use a unix socket to send messages back and forth... https://github.com/taf2/fork.node/blob/master/test/simple.js [15:01] taf2: but i'm thinking a cleaner message interface like var worker = new Worker(); worker.onmessage(function(data) {} ) would be nicer... [15:02] steph021 has joined the channel [15:02] brianloveswords has joined the channel [15:02] pastak_ has joined the channel [15:03] ManuelKiessling has joined the channel [15:04] RusAlex1 has joined the channel [15:06] Wizek_ has joined the channel [15:07] Me1000 has joined the channel [15:07] jpld has joined the channel [15:07] jpld has joined the channel [15:08] shaunau: taf2 yep agreed [15:08] pifantastic has joined the channel [15:12] shaunau: ok, question about callback style: if(err) cb(err); if (validation.hasErrors()) cb(err, validation) OR if (validation.hasErrors()) cb(null, validation) thoughts? [15:13] raynos: depends what is in err when validation has errors [15:13] raynos: I would call cb(err, validation). [15:13] raynos: so that a user can do if (err === null) { ... } [15:14] shaunau: raynos: that's my preference too [15:14] raynos: depends though what you count as validation errors [15:14] raynos: is it _this_ is broken or _this_ might not be right [15:14] rihegher has joined the channel [15:14] raynos: theres a difference in terms of validation. I.e. is it an error or a warning [15:14] stagas: shaunau: no, the first err is if the process was successful, if the validation is falsey, the process was successful but it returns false, err should be null [15:14] shaunau: data type validation, [15:15] Xano has joined the channel [15:15] shaunau: so, "please specify an email address" would be inside validation.errors [15:15] pyrony has joined the channel [15:15] shaunau: stagas but err will be null though, otherwise it would have returned at if (err) cb(err) [15:16] shaunau: oh... if i'd actually put the returns in :) [15:16] shaunau: sorry.. [15:17] stagas: shaunau: depends what you're calling above that returns that err, if it's only validation then skip the err argument entirely and just callback the validation results [15:18] shaunau: so yeah it'd look like: if (err) return cb(err); if (validation.hasErrors()) return cb(err, validation); dostuff(); return cb(err, validation, data); [15:19] ardcore has joined the channel [15:19] H4ns has joined the channel [15:19] shaunau: i'm just trying to get the "style" right to be consisten and not sometimes return cb(null, data) and other times, cb(err,data) - if that makes sense.. [15:20] shaunau: i think i;ll just put al lthe args in.. [15:20] eb4890 has joined the channel [15:21] FireFly has joined the channel [15:21] sreeix has joined the channel [15:23] aroop has joined the channel [15:24] briznad has joined the channel [15:25] NuckingFuts has joined the channel [15:26] cloudhea1_ has joined the channel [15:27] cloudhea1 has joined the channel [15:27] ManuelKiessling has joined the channel [15:27] hackband has joined the channel [15:29] rihegher: Hello There [15:29] rihegher: Is there any french people here? [15:30] rihegher: I'm thinking of organizing a nodecamp in France. [15:30] constantx has joined the channel [15:30] rihegher: Anyone interested? [15:31] Guest89491: french people are not clever enough to use node.js [15:31] nail_: there's jetienne [15:32] nail_: but that would make a nodedate [15:32] kristsk has joined the channel [15:32] strmpnk has joined the channel [15:32] rmustacc has left the channel [15:33] jasong_at_apache has joined the channel [15:33] jiggliemon has joined the channel [15:34] m64253 has joined the channel [15:35] raynos: Whats a nodecamp? [15:35] rihegher: Guest89491: hope you're just kidding, there are already plenty of people using node.js in here [15:35] rihegher: raynos: a barcamp dedicated to node.js [15:35] tbranyen: french people eat french fries with mayo, i seen em they drown em in that shit [15:35] raynos: whats a barcamp? [15:35] rihegher: like http://nodecamp.eu [15:36] tbranyen: France is too far away :( [15:36] boghog: tbranyen, dutch and belgians do too [15:36] tbranyen: boghog: pulp fiction >_> [15:36] boghog: ah :D [15:36] boghog: i asked for mayo in a mcdonalds in NYC once [15:36] raynos: That's pretty cool. [15:36] rihegher: raynos: http://en.wikipedia.org/wiki/BarCamp [15:36] boghog: never seen someone look so shocked and surprised [15:37] tbranyen: you should have asked for a colonoscopy [15:37] raynos: boghog: should have asked for speciaal [15:37] boghog: hah [15:37] raynos: or insist for an oorlog. [15:38] Muon has left the channel [15:38] raynos: rihegher: does that mean i need a new laptop for these camps. [15:39] raynos: I thought I could get away with only keeping my pc upto date. [15:39] rihegher: raynos: well it may be a good idea [15:40] raynos: What is the communities opinion of using / not using mac laptops? [15:41] Spion has joined the channel [15:42] jefftrudeau has joined the channel [15:42] jjmalina has joined the channel [15:43] isaacs has joined the channel [15:44] johnnywengluu: does event loop means that when one event is emitted it loops through all listener callbacks and runs them one by one? [15:44] johnnywengluu: that is what event LOOP means? [15:44] cryptix has joined the channel [15:45] framlin: does anybody know, how to put a json-document authenticated as admin to chouchdb using the http-module [15:46] Melkor has joined the channel [15:46] framlin: if I only try to put without authentication I get {"error":"unauthorized","reason":"You are not a db or server admin."} [15:46] indutny has joined the channel [15:46] raynos: johnnywengluu: event loops and event emitters are seperate. the way the event emitter works is that when an event is emitted it loops through all the lisener callbacks one by one. [15:47] framlin: I know the usernam and the password, but I do not know how to tell that chouch [15:47] johnnywengluu: so what does event LOOP mean? [15:47] raynos: the event loop is an underlying low level thing in node.js Basically everything you do in node runs on the event loop. Whenever another process fires an event the eventloop picks it up and handles your javascript code [15:48] johnnywengluu: hmm [15:48] cbiscardi has left the channel [15:48] Billbad has joined the channel [15:48] GriffenJBS: johnnywengluu: do you use javascript? at it's simplest it's 'while (isTrue) { doEvents() }' [15:49] GriffenJBS: but in node you don't mess with it, you just feed it events [15:49] Billbad has joined the channel [15:50] sirkitre_ has joined the channel [15:50] tjholowaychuk has joined the channel [15:50] raynos: GriffenJBS: It's a lot better then that because it doesnt spin around a whle(true) loop at 100% cpu ;) [15:51] GriffenJBS: raynos: I think he was looking for an description of 'event loop' [15:51] raynos: That's fine, It's just the example made me cringe. [15:51] Wizek_ has joined the channel [15:51] GriffenJBS: lol, yeah I hear you [15:51] ardcore has left the channel [15:54] johnnywengluu: okay i get you [15:54] kmiyashiro: oauth [15:54] kmiyashiro: I hate it [15:54] EyePulp has joined the channel [15:54] johnnywengluu: kinda [15:54] kmiyashiro: anyone have experience with node oauth? [15:55] demastrie has joined the channel [15:55] Guest89491: Bert Belder is the man behind enemy lines doing the Windows work. [15:55] adulteratedjedi has joined the channel [15:57] cwang has joined the channel [15:57] Yuffster_work has joined the channel [15:58] constantx has joined the channel [15:59] brianc1 has joined the channel [15:59] indiefan2a has joined the channel [15:59] pyrony has joined the channel [15:59] mattly has joined the channel [16:00] aroop has joined the channel [16:01] jacobolus has joined the channel [16:01] brianc has joined the channel [16:02] eee_c has joined the channel [16:02] Wizek has joined the channel [16:05] sveimac has joined the channel [16:06] m64253 has joined the channel [16:06] Wizek has joined the channel [16:08] broofa has joined the channel [16:09] ManuelKiessling has joined the channel [16:11] pyrony: do any of you guys use CoffeeScript? [16:12] MikhX has joined the channel [16:12] tjholowaychuk: all of us [16:12] tjholowaychuk: its awesome [16:12] tjholowaychuk: its like ruby and python had a baby [16:13] AAA_awright: ... That's a bad thing [16:13] tjholowaychuk: haha, im just kidding [16:13] Wizek has joined the channel [16:13] AAA_awright: I fear for the day that happens [16:13] AAA_awright: Not to mention the mental image >_> [16:14] tjholowaychuk: well that is pretty much all that CS is [16:14] jjmalina: someone should rewrite node in coffeescript [16:14] blueadept has joined the channel [16:15] tbranyen: jjmalina: i was thinking the same about jquery [16:15] jjmalina: for lols [16:15] jjmalina: tbranyen: even better [16:15] Guest89491: someour should rewrite jquery in c [16:16] grr123 has joined the channel [16:16] wadey has joined the channel [16:16] tbranyen: Guest89491: then compile it to JS with emscripten [16:16] tbranyen: heh [16:18] grrrr12 has joined the channel [16:18] grrrr12: Hi, do i need to worry about race conditions with node? Lets say i have a webserver, each time someone connects i log his ip with arr.length+1 = ip. [16:18] grrrr12: is this safe? [16:18] wilmoore has joined the channel [16:18] duncanbeevers: Are you serious? [16:18] jtsnow has joined the channel [16:19] tbranyen: grrrr12: nothing racist about that [16:19] tbranyen: at all [16:19] azenned has joined the channel [16:19] tbranyen: node is single threaded everything is equal [16:19] sako has joined the channel [16:20] chrislor_ has joined the channel [16:20] wilmoore has joined the channel [16:20] grrrr12: hmm but what if 100 users connect the same time, arr.length wont give the same thing? [16:20] jakehow has joined the channel [16:20] tbranyen: duh [16:20] duncanbeevers: http://en.wikipedia.org/wiki/Single-threaded [16:20] tbranyen: you'll want to fire off updates to all the previously connected fools [16:21] tbranyen: updating them with the length [16:21] tbranyen: if you want to represent it [16:21] tbranyen: accurately [16:21] tbranyen: i don't presume to know what you're doing, but if you want an accurate length count to all nodes its on you to update the client [16:23] pdelgallego has joined the channel [16:23] grrrr12: hmm ok thanks. will read some more on this. [16:23] azenned has left the channel [16:24] eazyigz has joined the channel [16:24] grrrr12 has left the channel [16:24] eazyigz: i am trying to use node-waf, and I get an error: "ImportError: No module named Scripting " [16:24] eazyigz: has anybody seen this? [16:25] arianrock: look in the README file if there are any dependencies? [16:25] daniellindsley has joined the channel [16:26] eazyigz: can somebody recommend a good way to md5 hash a file? I cannot install hashlib on ec2, due to the error I just mentioned. There has to be an easier way! [16:26] pyrony: jbergstroem: Yeaaa, jQuery in coffeee [16:26] pyrony: that'd be nuts [16:26] pyrony: tbranyen* [16:27] demastrie has joined the channel [16:27] pyrony: pyjamas looks cool too [16:27] mnutt has joined the channel [16:28] mscdex: eazyigz: node has a built in hash function [16:28] eazyigz: mscdez: crypto? [16:28] mscdex: yep [16:28] F1LT3R has joined the channel [16:29] roidrage has joined the channel [16:29] eazyigz: mscdex: the api docs aren't clear enough. I don't understand how to use crypto.createHash(algorithm) [16:29] eazyigz: can you give me an example? [16:29] ph^ has joined the channel [16:30] kmwallio has joined the channel [16:31] mscdex: eazyigz: there's an example right there in the docs [16:31] mscdex: http://nodejs.org/docs/v0.4.6/api/crypto.html [16:31] mscdex: http://nodejs.org/docs/v0.4.6/api/crypto.html#crypto.createHash [16:32] sleeplessinc has joined the channel [16:32] Xano has joined the channel [16:32] mscdex: just swap out sha1 with md5 [16:32] BillyBreen has joined the channel [16:34] _tfc has joined the channel [16:38] abraham: did someone say something to me? [16:38] abraham: a while ago maybe? [16:38] Guest89491: lol [16:39] pyrony: ACTION blinks [16:39] awenkhh has joined the channel [16:40] nibblebot: is there a node.js public interface API written in JS for use with autocomplete facilities in IDEs/editors? [16:41] pyrony: probably nt [16:42] pyrony: not* [16:42] mscdex: not currently, but i've got a start on a json version of the api [16:42] mscdex: docs [16:42] mscdex: just need more free time [16:44] duncanbeevers has joined the channel [16:44] sh1mmer has joined the channel [16:46] llkazu has joined the channel [16:46] nibblebot: interesting [16:47] nibblebot: how far along? [16:47] bentruyman has joined the channel [16:47] mikeal has joined the channel [16:48] kevliu has joined the channel [16:48] aguynamedben has joined the channel [16:49] eazyigz has joined the channel [16:49] eazyigz: I am following the createHash(algorithm) example on http://nodejs.org/docs/v0.4.6/api/crypto.html [16:49] eazyigz: however, I see no output [16:49] eazyigz: what gives? [16:50] BillyBreen has joined the channel [16:50] wink_: eazyigz: did you run openssl list-message-digest-algorithms ? [16:51] eazyigz: no i didn't. i didn't know i was supposed to... [16:51] hackband has joined the channel [16:51] wink_: read the documentation ;>, make sure sha1 is supported by your version of openssl [16:51] wink_: what version of node are you running? [16:52] mjr_ has joined the channel [16:52] wink_: that example doesnt exactly work on 0.4.6, i assume you modded the console.log to be correct? [16:53] chrislorenz has joined the channel [16:53] eazyigz: i am running the latest stable version of node [16:53] eazyigz: 4.6 [16:54] eazyigz: wink_: i don't understand why it wouldn't be supported... [16:54] wink_: it is, surely [16:54] wink_: gist your code [16:54] aguynamedben_ has joined the channel [16:54] dgathright has joined the channel [16:54] dansays has joined the channel [16:55] jmazzi_: in backtraces [16:55] jmazzi_: what are the 20:12 at the end? [16:55] eazyigz: wink_: https://gist.github.com/937054 [16:55] jmazzi_: of each js file [16:55] kevliu: howdy! anyone having problems with ciaran's oauth package? [16:55] sshaginyan has joined the channel [16:55] kevliu: when twitter throws a 401/expired token, my app takes a major shit. [16:56] wink_: https://gist.github.com/937056 [16:56] wink_: try that eazy [16:56] tykelewis has joined the channel [16:58] sshaginyan: kevliu: What do you mean by major shit.. what actually happens? What's your error? [16:58] eazyigz: wink_: still not getting output [16:58] kevliu: sshaginyan: the error is as such: [16:58] kevliu: { statusCode: 401, [16:58] kevliu: data: '\n\n /oauth/access_token\n Invalid / expired Token\n\n' } [16:58] eazyigz: the only reason I am trying to use crypto is because it is very difficult to install hashlib on my ec2 instance [16:58] eazyigz: now i cannot use either one of them... [16:58] wink_: im not sure how you're not getting output [16:59] kevliu: and my app becomes unresponsive-- wondering if this was a known issue [16:59] sdecastelberg has joined the channel [16:59] eazyigz: wink_ this is so confusing. thanks for the help though [16:59] wink_: eazyigz: fwiw, that script runs a-ok here ;> [17:00] eazyigz: wink_: is there another sensible hashing library that I can use with node? I don't want to break my head over this, I just need a simple hash object for a file [17:00] matjas has joined the channel [17:00] eazyigz: nothing fancy, and i'm not a cryptologist [17:01] wink_: to be honest, i'd be real worried that something that trivial isnt working right in your configuration [17:01] eazyigz: i'm pissed too [17:02] sshaginyan: kevliu: Have you tried a simple try and catch? [17:02] wink_: i'd put util.logs() all over that thing and try to figure out whats going on [17:02] kevliu: sshaginyan: yep. trying something now-- are we supposed to create a new oauth client for each request, or use one global client? [17:03] eazyigz: wink_: evidently its not going into 'end' callback. Otherwise I would see some output [17:03] wink_: right, is it even getting to the data event though? [17:03] ZeroCoder has joined the channel [17:04] eazyigz: wink_: nope [17:04] wink_: so the readstream isn't doing anything for some reason [17:04] davidwalsh has joined the channel [17:05] dguttman has joined the channel [17:06] wink_: im running 0.4.5, maybe something there changed in that rev [17:06] nibblebot has joined the channel [17:06] wink_: in fact, eazy it does look like ReadStream got played with a little between .5 and .6 [17:07] eazyigz: wink_: that really blows! [17:07] wink_: can you try to downgrade to 0.4.5 to test? [17:07] jiggliemon has joined the channel [17:08] secoif_ has joined the channel [17:08] eazyigz: i will try with 4.5.... [17:08] nibblebot: mscdex: did you want to share your node.js API json doc? [17:08] wink_: eazyigz: try to replace the .ReadStream call with .createReadStream [17:09] Sbioko has joined the channel [17:09] Sbioko: hi [17:09] mscdex: nibblebot: it's far from finished, i only have a couple modules done so far [17:09] Sbioko: is there a way to cache EJS templates in Express.js? [17:09] hvgotcodes: any reason i shouldnt be able to exec a shutdown call on ubuntu, if the user executing the node process has shutdown priveleges? [17:09] Sbioko: or how to get their output to cache them myself? [17:09] nibblebot: mscdex: ok, well if you wanted to put it up on github or something so other folks could contribute, i think it could go quicker [17:10] arianrock: hvgotcodes maybe forcefully use setuid? [17:10] wink_: eazyigz: that replacement may just work on .6 [17:10] edude03 has joined the channel [17:10] sdecastelberg has joined the channel [17:10] dgathright_ has joined the channel [17:10] hvgotcodes: arianrock: the problem i am having is i get the the system is going down message, but it never returns, so the node call never ends [17:10] rihegher has left the channel [17:11] wink_: eazyigz: https://gist.github.com/937112#comments [17:11] arianrock: euhm [17:11] arianrock: it shouldnt do that [17:11] arianrock: it spawns the process, but then it should return to the event loop [17:11] eazyigz: wink_: that worked! [17:11] arianrock: as the execute functions shouldnt be blocking [17:12] Aikar: Sbioko: i believe file system loads are cached. but to cache actual output is a diff story i think. [17:12] Sbioko: Aikar: trying to speed up my app [17:12] Sbioko: because 250 RPS is too slow [17:12] Sbioko: even on localhost [17:12] Aikar: O.o [17:12] Sbioko: without workers [17:12] wink_: <3 [17:12] Sbioko: using memcached + mongodb [17:12] Sbioko: I dont know what's going on [17:12] Aikar: how much content you got? [17:12] Sbioko: oh, will try to use profiler [17:12] arianrock: maybe you have some blocking calls [17:12] Sbioko: Aikar: where [17:13] Aikar: wanna try my template engine? :P [17:13] Sbioko: arianrock: not on pages I'm benching [17:13] tjholowaychuk: Sbioko: the template engine will not be your bottleneck [17:13] Sbioko: Aikar: ehh, no. Already done functionality with ejs [17:13] tjholowaychuk: optimizing the wrong place [17:13] hvgotcodes: arianrock: this is what i am doing https://gist.github.com/88f5d7e9bb48c72e0249 [17:13] tjholowaychuk: if anything it's mongodb-native [17:13] Sbioko: tjholowaychuk: I'm caching items from mongodb with memcached [17:13] Sbioko: tjholowaychuk: nMemcached driver [17:13] Aikar: Sbioko: are you parrallelizing all your db calls where possible? [17:14] arianrock: try not to use sudo [17:14] Sbioko: Aikar: everywhere [17:14] arianrock: wait one minute [17:14] arianrock: euhm [17:14] Guest99303 has joined the channel [17:14] Sbioko: arianrock: interesting [17:14] hvgotcodes: arianrock: why not? [17:14] Sbioko: arianrock: but, everytime I install Node.js it requries sudo [17:14] arianrock: wait, I am talking bullshit, let me examine what's wrong in this code [17:14] arianrock: :P [17:15] Sbioko: arianrock: sorry, but I can't give it [17:15] Aikar: running code with sudo would not affect its performance [17:15] Sbioko: it would be great to hear potential holes [17:15] arianrock: im talking to hgotcodes [17:15] jmazzi_: can anyone tell me why response seems to be out of context? https://gist.github.com/3e408e7ccc32600d84b1 example with outpu [17:15] hvgotcodes: arianrock: go for it ;) [17:15] Sbioko: arianrock: ok [17:15] Aikar: oh sorry saw Sbioko saying your name too [17:16] arianrock: hvgotcodes [17:16] Aikar: Sbioko: can you link code? [17:16] arianrock: are you using require('child_process').spawn ? [17:16] Sbioko: Aikar: no... [17:16] Sbioko: sorry [17:16] hvgotcodes: arianrock: ya [17:16] hvgotcodes: actually no im not [17:16] hvgotcodes: but i could [17:16] hvgotcodes: im using exec = require('child_process').exec, [17:17] V1 has joined the channel [17:17] mscdex: nibblebot: i already created a repo for it some time ago, just haven't had the time to work with it [17:17] nibblebot: link? [17:17] arianrock: that shouldn't be the issue [17:17] pyrotechnick has joined the channel [17:18] arianrock: wait, exec is alot more high level [17:18] Sbioko: Error: EINVAL, Invalid argument [17:18] Sbioko: at IOWatcher.callback (net.js:905:24) [17:18] tmpvar has joined the channel [17:18] hvgotcodes: arianrock: right it is [17:18] arianrock: try doing appending & at the end of your command [17:18] Sbioko: this is what I get when starting with Cluster [17:18] Sbioko: what's this [17:18] hvgotcodes: arianrock: yeah i did that [17:18] hvgotcodes: no dice [17:18] arianrock: "sudo /sbin/shutdown -h 1 &" [17:18] arianrock: no effect? [17:18] Aikar: Sbioko: no more stacktrace? [17:18] hvgotcodes: if you do that from the command line, you will notice you have to hit enter to get it to return [17:18] Sbioko: Aikar: I disabled logging [17:19] hvgotcodes: arianrock: it has an effect, but not good enough when done from node [17:19] arianrock: elaborate [17:19] Sbioko: ok, 370 RPS with Cluster [17:19] hvgotcodes: arianrock: from the CL, shutdown -h 1 does not return, you have to ctrl c [17:19] Rixius has joined the channel [17:19] hvgotcodes: from the CL shutdown -h 1 & does not return, but does if you hit enter [17:20] hvgotcodes: from exec in node, i cannot 'hit enter' or at least dont know how to [17:20] arianrock: well, use a signal handler to send SIGTERM? or whatever is linked to ctrl + c [17:20] arianrock: like [17:20] arianrock: process.kill(SIGTERM) [17:20] jiggliemon has joined the channel [17:20] jonaslund: Sbioko: 250 -> 370? how many cores do you have? Or are you running the bench app on the same machine or something like that ? [17:21] hvgotcodes: arianrock: im not trying to kill node or the shutdown process -- i want it to actually shut down ;) [17:21] Sbioko: jonaslund: local laptop, 2 cores, 3 GB RAM. Benching with ab on some machine [17:21] Sbioko: jonaslund: Apache Bench [17:21] brianmario has joined the channel [17:21] arianrock: hmmph [17:21] gceolin has joined the channel [17:21] hvgotcodes: indeed [17:22] hvgotcodes: i wonder if i could somehow pipe the 'hit enter' in [17:22] onre_ has joined the channel [17:23] arianrock: stdout.on('data', fucntion (data) { res.end(data);}) @ hvgotcodes [17:23] arianrock: o wait [17:23] sleeplessinc has joined the channel [17:23] hvgotcodes: arianrock: ive got it [17:23] arianrock: exec already buffers the output [17:23] JusticeFries has joined the channel [17:24] hvgotcodes: i should not do the res.end in the callbakc [17:24] arianrock: so that wouldn't reall worky, would it [17:24] hvgotcodes: just do it after [17:24] hvgotcodes: and let the exec take its time [17:24] arianrock: well [17:24] arianrock: alright [17:24] arianrock: or you could do [17:24] koo7 has joined the channel [17:25] arianrock: process.nextTick(function(){res.end(stdout)}); [17:25] arianrock: inside the callback [17:25] arianrock: by the wya [17:25] arianrock: it doesnt get called [17:25] arianrock: because you have a return in the if statement [17:26] hvgotcodes: thats only on error [17:26] arianrock: o ya, true [17:26] hvgotcodes: i got it [17:26] arianrock: Alright, I'm going to eat some dinner now. [17:26] MikhX has joined the channel [17:26] arianrock: See you [17:27] hvgotcodes: arianrock: thanx [17:27] hvgotcodes: hopefully the shutdown will run [17:27] hvgotcodes: ;) [17:27] hvgotcodes: oh it did [17:27] hvgotcodes: sweeeeet [17:27] arianrock: Well, I rather keep my computer running, when having dinner ;) [17:27] hvgotcodes: like i said, VM [17:27] hvgotcodes: ec2 instance [17:28] onre_ has joined the channel [17:28] hvgotcodes: now i can control them via http webservices ;) [17:28] arianrock: I should get myself some ec2, or I won't be accepted in hackerdom these days ): [17:28] arianrock: xD [17:28] dguttman_ has joined the channel [17:28] hvgotcodes: eh [17:28] hvgotcodes: doing this for a client [17:29] hvgotcodes: pretty nifty on demand load testing infrastructure for stress testing systems [17:29] hvgotcodes: that you can shutdown over the web [17:30] hvgotcodes: hmm the only problem is if there is an error shutting down, i will still have returned the shutting down message [17:31] k1ttty has joined the channel [17:33] adulteratedjedi has joined the channel [17:34] pedrobelo has joined the channel [17:34] Jahny has joined the channel [17:35] Jahny has left the channel [17:37] demastrie1 has joined the channel [17:37] perezd has joined the channel [17:38] cryptix1 has joined the channel [17:39] rfay has joined the channel [17:39] onre_ has joined the channel [17:40] mbrevoort: issacs: you around? have a quick npm question [17:42] mbrevoort: maybe someone else knows the answer to my npm question [17:42] mbrevoort: if I have a module with a package.json that specifies dependencies with versions, is there some way to start that module so that it will use the modules defined as deps in the package.json rather than what's "active" in npm? [17:43] isaacs: mbrevoort: yes. that's what it should use always [17:43] isaacs: mbrevoort: in 1.0, this guarantee is much more firm. [17:44] isaacs: mbrevoort: if you use something like spark2 or cluster as your "start" command, it'll use the one from your ./node_modules/.bin/ folder, regardless of what's in your PATH normally. [17:44] markstory: I think I'm confused about Object.create(). Does http://jsfiddle.net/f5rmb/1/ make sense to anyone? [17:44] rektide has joined the channel [17:44] rektide: what's the "new" language that made the twitter feeds last week, that extends javascript [17:44] markstory: Does writable default to false? [17:45] markstory: rektide: coffeescript [17:45] rektide: it was compared some to coffeescript [17:45] isaacs: markstory: yeah, you need to have writable:true on there, i think [17:45] rektide: but it extends javascript, instead of replacing it [17:45] pyrotechnick: ahh [17:45] duncanbeevers: Kaffeine [17:45] pyrotechnick: ive seen that before [17:45] pyrotechnick: yeah thats it i think [17:45] pyrotechnick: with static typing and shit? [17:45] markstory: isaacs: Interesting, I'll play with that. [17:45] isaacs: markstory: arr: {value: [1,2,3], writable:true} [17:46] markstory: Yep, need writeable: true [17:46] isaacs: probably also want enumerable:true, if you want it to behave like a "normal" assignment [17:46] markstory: or no dice. [17:46] rektide: duncanbeevers: THANK YOU [17:46] duncanbeevers: pyrony: weepy's kaffeine doesn't add much, mostly makes untangling callbacks simpler. [17:46] rektide: was going bonkers looking for it [17:46] duncanbeevers: Eh, nick autocomplete fail. [17:46] mbrevoort: isaacs: ok, so if i have some server.js that I start like 'node server.js' and I want that to depend on specific versions of modules, what's the best way to do that? [17:47] markstory: I didn't know that Object.create() defaulted properties to non-enumerable write protected values. [17:47] isaacs: mbrevoort: write a package.json file with a "dependencies" hash, then use npm 1.0 to install them in your ./node_modules folder [17:47] isaacs: mbrevoort: and have "scripts" : { "start": "node server.js" } in there, too, if you like, though that's the default in npm 1.0 if it finds a server.js file [17:48] mbrevoort: isaacs: ok, that was the piece I was missing. thanks! will try that [17:48] loungin has joined the channel [17:48] fyskij has joined the channel [17:48] paolodedios has joined the channel [17:49] joshthecoder has joined the channel [17:49] eric__ has joined the channel [17:49] jiggliemon has joined the channel [17:50] Sbioko has joined the channel [17:50] Sbioko: I'm curious [17:50] tedsuo has joined the channel [17:50] Sbioko: how many RPS do you get guys? [17:50] Sbioko: In your apps? [17:51] Sbioko: And what is their size? [17:51] rmustacc has joined the channel [17:51] tjholowaychuk: Sbioko: without mongodb involved I can get an easy 3k w/ jade [17:51] tjholowaychuk: single process [17:52] tjholowaychuk: profile and see what your issue is, bet you anything it's mongodb-native [17:52] Sbioko: tjholowaychuk: what db are you using? [17:52] Sbioko: Redis? [17:52] tjholowaychuk: well depends on the project [17:52] Sbioko: on that project where you get 3k RPS [17:54] Sbioko: tjholowaychuk: what db? [17:54] Sbioko: 386 RPS is what I'm getting now [17:54] tjholowaychuk: Sbioko: redis usually, but we use mongodb for LearnBoost [17:54] replore has joined the channel [17:54] Xano has joined the channel [17:54] tjholowaychuk: and yeah its not super fast [17:54] tjholowaychuk: but mostly due to mongodb-native [17:55] Sbioko: what should I do? [17:55] tjholowaychuk: profile [17:55] drudge: tjholowaychuk: do you guys use mongoose in production? [17:55] tjholowaychuk: drudge: yup [17:55] drudge: scary :P [17:55] tjholowaychuk: haha [17:55] Sbioko: tjholowaychuk: ok, lets imagine that I've profiled app and found out that mongodb slows things down [17:55] Sbioko: tjholowaychuk: what should I do in that case? [17:55] tjholowaychuk: Sbioko: lets not imagine lol [17:55] tjholowaychuk: do it [17:55] tjholowaychuk: dont assume things [17:56] Sbioko: tjholowaychuk: what tool do you recommend? node-inspector? [17:56] duncanbeevers has joined the channel [17:56] markstory: isaacs: thanks for the help :) [17:56] V1: rewrite the driver so it uses the c driver of mongodb to do the heavy lifting instead of node ;D [17:56] kmiyashiro: is connect just a server middleware, no request helpers? [17:57] tjholowaychuk: kmiyashiro: just middleware yes [17:57] openpercept has joined the channel [17:57] tjholowaychuk: use express for that stuff [17:57] tjholowaychuk: connect = utilities for frameworks, express = sugar [17:57] kmiyashiro: I'm using express [17:57] eric__: how's it going? [17:58] kmiyashiro: I'm talking about creating a request to a web API, for example [17:58] kmiyashiro: should I just use vanilla node http? [17:58] tjholowaychuk: yeah or mikeal's request lib or you can try my WIP https://github.com/visionmedia/superagent [17:59] Sbioko: tjholowaychuk: so what tool you suggest? [17:59] Sbioko: for profiling [17:59] s0urce has joined the channel [17:59] s0urce: hi [17:59] drudge: nice tj [18:00] s0urce: faye or socket.io for work with express? [18:00] tjholowaychuk: drudge: I was going to call it "just" just.get() etc but superagent is rad haha [18:00] tjholowaychuk: and makes more sense [18:00] a2800276 has joined the channel [18:00] drudge: tjholowaychuk: yeah pretty badass name. looks nice and clean [18:01] tjholowaychuk: the thing that sucks with node's stuff right now [18:01] tjholowaychuk: is you basically end up re-implement most of core [18:01] tjholowaychuk: when you want to extend stuff like this [18:01] tjholowaychuk: like in cluster I had to rewrite the dns stuff etc [18:01] gazumps has joined the channel [18:01] tjholowaychuk: kinda lame but oh well [18:02] MikhX has joined the channel [18:02] drudge: you like writing code [18:02] drudge: scratch that, you *love* rewriting code [18:02] adulteratedjedi: nothing wrong with that lol [18:02] ryanj has joined the channel [18:03] stagas: it's not node's fault, it's js [18:04] pcardune has joined the channel [18:04] stagas: being so expressive everything can be written in so many ways [18:04] tjholowaychuk: yeah but it can be done in such a way that you dont have to reproduce it when extending something [18:05] reid has joined the channel [18:05] tjholowaychuk: not a huge deal though [18:06] langworthy has joined the channel [18:06] indutny has joined the channel [18:06] JusticeFries has joined the channel [18:06] adulteratedjedi: mark [18:07] ManuelKiessling has joined the channel [18:07] stagas: you have to pick a path [18:08] TheJH_ has joined the channel [18:08] stagas: that's the most confusing part, do I do it this way, or that way, or whatever [18:09] sechrist has joined the channel [18:09] stagas: not everyone is going to like it [18:09] tjholowaychuk: for sure [18:09] tjholowaychuk: after all it is "private" stuff [18:09] s0urce: can any1 gimme a hint, what u should use for something like "current logged in users" function - i want to autoupdate a div for all logged in users if a new one login - better socket.io juggernout or faye? [18:09] tjholowaychuk: so its not necessarily wrong [18:09] tjholowaychuk: just annoying [18:09] tjholowaychuk: when you cant get at it [18:09] demastrie has joined the channel [18:10] drudge: s0urce: faye would work pretty well for that [18:10] sechrist: barbra streisand [18:10] roidrage_ has joined the channel [18:10] cagdas has joined the channel [18:12] eee_c has joined the channel [18:13] saikat has joined the channel [18:13] s0urce: ok drudge ty [18:14] s0urce: can i use the express routes with this? [18:14] drudge: well i think what you want is a faye server attached to your express server and to update the div you'll use the bundled js client [18:15] drudge: in the browser [18:16] perlmonkey2 has joined the channel [18:17] puffpio has joined the channel [18:17] Sbioko: tjholowaychuk: you said mongodb slows things down, but I cache objects in memcached, and have no calls to MongoDB [18:17] jspiros has joined the channel [18:17] stagas: s0urce: just use dnode and call an updateUsers() from the server [18:17] tjholowaychuk: Sbioko: well youare obviously doing something that is slow [18:17] Sbioko: tjholowaychuk: between, caching ejs templates with memcached increased RPS to 700 [18:18] tjholowaychuk: Sbioko: dont forget to NODE_ENV=production [18:18] tjholowaychuk: before benchmarking [18:18] tjholowaychuk: or profiling [18:18] arianrock: I'm back [18:18] ezmobius has joined the channel [18:19] Sbioko: tjholowaychuk: how NODE_ENV=production helps? [18:19] Sbioko: disables debugging, etc? [18:19] path[l] has joined the channel [18:19] tjholowaychuk: express uses it, but currently the only thing it alters is caching of the template functions [18:19] tjholowaychuk: so it's not performing view lookup / compiling the template each request [18:20] TheJH_ has left the channel [18:20] timmywil_ has joined the channel [18:20] Sbioko: tjholowaychuk: Cluster(2 workers) increased + 30 RPS [18:21] Sbioko: ab -n 10000 -c 100 [18:23] arunagw has joined the channel [18:23] boboroshi has joined the channel [18:25] Sbioko: I think I need to use Varnish [18:26] ckknight: Sbioko: do you have code that perhaps I could see? [18:26] V1: you can also buffer the template in object so you send it out more quickly [18:26] Gregor has joined the channel [18:27] Sbioko: I will paste the code now [18:27] raynos has left the channel [18:29] jspiros has joined the channel [18:29] tjholowaychuk: Sbioko: why dont you just profile and figure out what the problem is [18:29] tjholowaychuk: instead of masking it with other "fixes" [18:29] Sbioko: tjholowaychuk: I will [18:30] onre has joined the channel [18:30] mikeal has joined the channel [18:31] Sbioko: http://pastie.org/1823279 [18:31] Sbioko: I did not make it DRY, so dont mad [18:31] tjholowaychuk: jesus [18:31] Sbioko: dont be mad [18:31] test117521 has joined the channel [18:31] Sbioko: this is developing stage [18:31] Sbioko: not production [18:31] Sbioko: so it looks ugly [18:32] Sbioko: cache is nMemcached [18:32] jesusabdullah: TOO BAD SBIOKO I AM ANGRY ANYWAYS [18:32] jesusabdullah: I haven't even opened the pastie! [18:32] test117521: hi, I downloaded the source code for the chat and I can't connect to server [18:32] tjholowaychuk: you are doing all kinds of weird things [18:32] test117521: can someone answer a few q's for me? [18:32] tjholowaychuk: reading the template in via fs etc [18:32] Venom_X has joined the channel [18:33] Sbioko: tjholowaychuk: I'm reading it directly from fs to cache it in memcached [18:33] jesusabdullah: fwiw I would do thing = { a: 1, b: 2} and not thing = {}; thing.a = 1; thing.b = 2; [18:33] Sbioko: tjholowaychuk: I used res.render(...) before [18:33] tjholowaychuk: Sbioko: yeah you dont need to do that, express with NODE_ENV=production does that for you [18:33] tjholowaychuk: but ok lol [18:33] Sbioko: tjholowaychuk: :-D [18:34] Sbioko: tjholowaychuk: it will not cache it in memcached, it will cache it in FS as I understand [18:34] tjholowaychuk: in memory [18:34] pyrotechnick: im making a girl im chasing a node app [18:34] pyrotechnick: to impress her [18:34] Sbioko: in memory, well yeah it might be faster [18:34] tjholowaychuk: pyrotechnick: haha woot :D [18:34] pyrotechnick: to visualise the lyrics to her favourite song [18:34] pyrotechnick: its more three.js than node but it involves node so i think its appropriate [18:34] Sembiance: this 'ambiguous' javascript function is really neat: http://wiki.pageforest.com/#js-patterns/amb [18:35] arianrock: o.o [18:35] Sbioko: tjholowaychuk: what else can you say about that code? [18:35] bsstoner has joined the channel [18:35] Sembiance: I could think of a few problems that would be nifty to solve that way [18:36] danielzilla has joined the channel [18:36] pyrotechnick: do i have a problem? [18:36] pyrotechnick: should i seek help? [18:36] pyrotechnick: or will this work? [18:36] arianrock: idk? [18:37] pyrotechnick: cmon u guys are supposed to be good at logic [18:37] arianrock: I usually take my guitar but a js codez seems cool too? [18:37] Sbioko: tjholowaychuk: no intensive calculations, just mongodb + memcached queries [18:37] arianrock: at logic in what? [18:37] Sbioko: tjholowaychuk: I have no idea [18:37] pyrotechnick: in all forms [18:37] arianrock: I have logic [18:37] arianrock: I haz em [18:37] jesusabdullah: Sembiance: That's neat! I read about it for scheme at one point, never thought it could work in js [18:37] sako has joined the channel [18:37] arianrock: So, what do I need to solve [18:37] Sbioko: tjholowaychuk: maybe I should try MySQL with Handlersocket? :-D [18:37] stisti: pyrotechnick: You rock :) [18:37] tjholowaychuk: no [18:37] tjholowaychuk: lol [18:38] pyrotechnick: i hope it works [18:38] onre_ has joined the channel [18:38] pyrotechnick: i think i'm in love [18:38] llkazu: so, anyone else find the AWS outage to be quite entertaining? [18:38] arianrock: <3 [18:38] arianrock: Love is good [18:38] pyrotechnick: i cant code unless im in love [18:38] arianrock: I'm in love with this geeky girl, she might appriciate such code though [18:38] pyrotechnick: i worked that out a long time ago [18:38] arianrock: too* [18:39] pyrotechnick: maybe we should pool our efforts [18:39] drudge: http://www.theregister.co.uk/2011/04/22/douglas_crockford_javascript_benchmark/ [18:39] pyrotechnick: distributed dating [18:39] arianrock: aye [18:39] arianrock: LOL [18:39] rauchg_ has joined the channel [18:39] cedric303 has joined the channel [18:39] pyrotechnick: map/reduce courting [18:39] pyrotechnick: what do you think? [18:39] pyrotechnick: nerds for nerds [18:39] rauchg_: Sbioko: [18:39] rauchg_: are you using mongoose ? [18:40] Sbioko: rauchg_: yes [18:40] drudge: hey rauchg_ [18:40] rauchg_: Sbioko: [18:40] rauchg_: do you have an index [18:40] rauchg_: on that key you're searching for [18:40] rauchg_: drudge: yo [18:40] V1: O M G, your actually on irc. [18:41] wadey: ah found my last bug with upgrading from 0.2 -> 0.4: New version of V8 encodes unicode in JSON differently [18:41] Sbioko: rauchg_: forgot that. Even if I dont have it, objects are cached in memcahed [18:41] Sbioko: memcached [18:41] rauchg_: Sbioko: [18:41] rauchg_: why would you do that [18:41] Sbioko: why use memcached? [18:41] Sbioko: to cache [18:42] rauchg_: http://www.mongodb.org/display/DOCS/Caching [18:42] dshaw_ has joined the channel [18:42] eee_c has joined the channel [18:42] Sbioko: rauchg_: thanks! Will try to disable it now [18:43] guillermo has joined the channel [18:44] ManuelKiessling has joined the channel [18:44] V1: which memcached driver are you using? [18:44] flippyhead has joined the channel [18:44] jmazzi_: can anyone tell me why @response has a different value inside the jsdom block? https://gist.github.com/3e408e7ccc32600d84b1 [18:44] jpld has joined the channel [18:44] Sbioko: V1: nMemcached [18:44] __tosh has joined the channel [18:45] Sbioko: rauchg_: it just slowed things down: 680 RPS to 70 RPS [18:45] jmazzi_: i also noticed that the 'if' console.log outputs before the 'jsdom' [18:45] V1: Sbioko: And if you disable memcached? [18:46] Sbioko: V1: 680 RPS -> 70 RPS with memcached turned off [18:46] patcito has joined the channel [18:46] tjholowaychuk: you dont need memcached man [18:46] sunblush has joined the channel [18:46] V1: Sbioko: Memcached / v0.0.1 might actually speed up get requests for you [18:46] tjholowaychuk: express will cache the template contents for you [18:46] tjholowaychuk: not the render, but the contents [18:47] V1: Sbioko: Memcached ops/sec improved 14x when I re factored the hashring ;$ [18:47] pedrobelo has joined the channel [18:47] arianrock: how many people here actually use ec2 [18:47] V1: ACTION raises his hand [18:48] Sbioko: V1: can you push your improvements to github? [18:48] V1: Sbioko: it's in the v0.0.1 branch [18:48] arianrock: What do you enjoy most about ec2? [18:48] Sbioko: V1: I saw in profiler, that hashring things take a lot of time [18:48] V1: https://github.com/3rd-eden/node-memcached/tree/v0.0.1 [18:48] Sbioko: V1: I'm using different driver [18:49] Sbioko: but will try that [18:49] Sbioko: thanks [18:49] Sbioko: ! [18:49] V1: nMemcached is my driver, i renamed it `memcached` because it's easier to find ;p [18:49] Sbioko: :-) [18:49] Sbioko: ahh [18:49] Sbioko: thank you for such great thing! [18:49] Sbioko: so no API changes? [18:49] Sbioko: I can just switch? [18:52] robhawkes has joined the channel [18:53] context has joined the channel [18:53] pyrotechnick has joined the channel [18:53] arianrock: welcome back pyro [18:53] V1: Sbioko: uhm except from the fact that it's using a different name, nope [18:53] context: if i have an array like ["some", "more"]. is there a way to 'dig' into an object using this. ie to be able to get to obj["some"]["more"] [18:54] onre_ has joined the channel [18:54] context: any sort of inject() method or something :x [18:54] Sbioko: V1: hm, how to install it? [18:54] Sbioko: V1: npm install memcached? [18:54] Sbioko: does not find [18:54] V1: uhm [18:54] ph^ has joined the channel [18:54] V1: i can probably publish it [18:54] wink_: context: why would you access a single dimension array as though it had multiple dimensions? [18:54] Sbioko: yeah, plz [18:54] tjholowaychuk has joined the channel [18:54] V1: Sbioko: try again [18:55] context: wink_: i want to use this to dig into the object. [18:55] context: i know they are different. im not trying to use it directly. [18:55] wink_: as in, enumerate keys? [18:55] Sbioko: not ok [18:55] Sbioko: Requires: node v0.2.x [18:55] Sbioko: I have v0.4.x [18:55] Sbioko: I have 0.4.5 [18:55] V1: i'll remove the engine line gimme a sec ;p [18:55] Sbioko: ok ;-) [18:55] context: wink_: im simply asking if there is an easy way to do this already, or if i have to write my own sort of 'inject' method [18:56] wink_: im just trying to understand what you're asking so i could answer you [18:56] wink_: as it sits, its not clear to me what you're trying to do [18:56] V1: Sbioko: try again [18:56] context: wink_: i have an array, to keep things simple (less duplication in code). i need to DIG deep into the object, using the property names from this array. [18:56] Sbioko: V1: same [18:57] V1: Sbioko: odd, i just tested it on my node 0.5-dev and it gave no issues :! [18:57] Sbioko: how to install it from source on github? [18:57] wink_: so you want to use the array of property names to access into another object that contains those properties? [18:57] c4milo: is there anything similar to pygments in nodejs? [18:57] context: wink_: ie. blah["property"] is simple... but some cases i need to dig deeper [18:57] context: correct. [18:57] tjholowaychuk: c4milo: I wish [18:57] c4milo: ahaha [18:57] c4milo: me too [18:57] tjholowaychuk: c4milo: pygments has tonnnns, but I would love to have something like that [18:57] tjholowaychuk: in a better language [18:58] V1: Sbioko: git clone git@github.com:3rd-Eden/node-memcached.git --- cd node-memcached --- git checkout v0.0.1 --- npm link [18:58] tjholowaychuk: but you can always just spawn() and write to stdin [18:58] tjholowaychuk: thats what i usually do [18:58] wink_: context: there are definitely ways to do it and you dont even need to know the property names, util.inspect is an implementation of one way [18:58] context: ... wow. [18:58] context: no. i NEED that specific property [18:59] context: and i know there are ways of doing this. [18:59] context: instead of .... reinventing the wheel... i was asking if there is some method already to do something like this. [18:59] c4milo: tjholowaychuk: yeah [19:00] wink_: what a dick response :p [19:00] wink_: you're on your own <3 [19:00] context: you informed me of stuff i already know about. my app needs a specific value.. you just said "well you can have them all" [19:01] wink_: you should ask tj, he'll help you ;> [19:01] arianrock: lokjhgfds hey guys [19:01] context: duncanbeevers: i was thinking something like that. didn't know if there was something that already existed. thnx [19:03] mike5w3c_ has joined the channel [19:04] ph^ has joined the channel [19:04] rauchg has joined the channel [19:04] mike5w3c_ has joined the channel [19:05] arianrock: time to play portal [19:06] V1 has joined the channel [19:07] tbranyen: whats portal [19:07] arianrock: what? [19:07] arianrock: Valve's Portal. it's a game :P [19:07] V1 has joined the channel [19:07] tbranyen: oh right that overpriced game that lasts 2 hours [19:07] arianrock: xDxD [19:07] arianrock: I'm playing portal 1 though [19:07] Aikar: quality > quanitity [19:07] tbranyen: oh the reasonably priced game that lasted 5 minutes [19:08] context: id really like to know how you beat portal 2 in 2 hours. [19:08] pdelgallego has joined the channel [19:08] tbranyen: context: the same way i bet mario in 10minutes [19:08] arianrock: well, I got it for free, so it's 5 minutes of fun for free [19:08] tbranyen: friends must be nice :( [19:08] Aikar: people pay the price when they take days off work here... http://aikar.co/dropbox/icfun/ [19:09] Aikar: the bubblewrap idea is fucking awesome rofl [19:09] tbranyen: haha [19:09] tbranyen: gotta put tape over someones door and fill the space between with garbage [19:09] arianrock: ok time to reboot in windows, that has been ages since I did that o.o [19:09] arianrock: bye linux, bye world [19:10] onre has joined the channel [19:10] Aikar: cherie berry is the lady who inspects all of the elevators in north carolina, and shes considered the most overpaid, under performing person in the state lol, and apparently that guy whos office it is really does not like her lol [19:11] robhawkes has joined the channel [19:13] bartt has joined the channel [19:13] pietern has joined the channel [19:13] matjas has joined the channel [19:14] intel_ix has joined the channel [19:16] intel_ix: http://pastebin.com/jZ1feFpf [19:16] intel_ix: ._. [19:16] zkirill has joined the channel [19:16] Qbix2 has joined the channel [19:16] Qbix2: what is the shortest image proxy I can write [19:16] Qbix2: in node.js [19:16] pyrotechnick: image proxy? [19:16] pyrotechnick: just a proxy server? [19:17] Qbix2: I basically want to request myserver.com/foo?url=encoded_src [19:17] Qbix2: yeah and I want to parse the "url" from get, go and get it from the src, and spit it out with same mime type [19:17] pyrotechnick: oic [19:17] onre_ has joined the channel [19:17] pyrotechnick: like u feed it encoded png or some shit and get an image back? [19:17] pyrotechnick: can some browsers not do data urls or something, whats the application? [19:18] jacobolus has joined the channel [19:18] duncanbeevers: Qbix2: Would it be sufficient to just 301 redirect the request to a canonical rul? [19:18] pyrotechnick: anyway im guess like 10 lines with a lib that could decode the data [19:18] pyrotechnick: im confused lol [19:18] pyrotechnick: going to pass [19:19] newy_ has joined the channel [19:21] saschagehlich has joined the channel [19:22] saikat has joined the channel [19:22] adulteratedjedi has joined the channel [19:23] sh1mmer has joined the channel [19:23] tylerstalder has joined the channel [19:24] nibblebot: getting "Error: EPERM, Operation not permitted" when trying to fs.unlink a directory which has perms 777. Why might this be? [19:24] ManuelKiessling has joined the channel [19:25] rektide: what's the documentation system that powers http://documentcloud.github.com/backbone/ backbone [19:25] Will_ has joined the channel [19:26] zylo has joined the channel [19:26] duncanbeevers: rektide: I believe it's dox http://visionmedia.github.com/dox/ [19:28] context: ok :x and force a var to be a function. it is a function, but its not in the same scope. so its saying its an object [19:28] onre_ has joined the channel [19:28] pifantastic_ has joined the channel [19:29] intel_ix: Where am I supposed to report this: http://pastebin.com/jZ1feFpf [19:30] levi501d has joined the channel [19:30] tobias has joined the channel [19:32] eb4890 has joined the channel [19:32] reid has joined the channel [19:33] onre_ has joined the channel [19:35] arunagw has joined the channel [19:35] stagas: intel_ix: https://github.com/joyent/node/issues [19:36] nibblebot: what's the best node library for higher level filesystem functions? [19:38] bewilled has joined the channel [19:38] bewilled has left the channel [19:38] onre_ has joined the channel [19:39] met_ has joined the channel [19:40] wink_: Qbix2: i've got a solution for ya if you're still there [19:40] bingomanatee has joined the channel [19:41] nibblebot: anyway to rmdir with node? [19:41] met_: hi there, I'm trying to make use of the mysql module in different functions, but it seems that I may receive the wrong callback arrays. Is it generally a problem to send querys to mysql at the same time? the result array appears to be the information from an insert [19:41] saschagehlich has joined the channel [19:43] hackband has joined the channel [19:43] boghog: is there something like an 'include' mechanism for node.js? I have a javascript file with a long list of definitions that I'd preferably keep in its own file, but it is needed only by a single other file. I guess I need the node.js equivalent for throwing a list of #defines in a C header [19:43] timmywil has joined the channel [19:44] boghog: I guess I can just put it in a module, but I'm not sure if that is the most straightforward way [19:44] onre_ has joined the channel [19:45] jmazzi_: there seems to be a a lot of resources out there for node. It's hard to tell which are the most relevant now. Could someone recommend a guide, other than the documentation? Something that shows some practical use cases etc [19:45] jmazzi_: something you might read after the docs [19:46] wink_: Qbix2: https://gist.github.com/937440 its pretty rough around the edges, but it does what you asked :p [19:47] nibblebot: boghog: require [19:47] nibblebot: http://nodejs.org/docs/v0.4.6/api/modules.html [19:47] boghog: ah, ok thanks [19:48] nibblebot: it's not exactly like an include [19:48] nibblebot: your module must export functions that it needs for it's public interface [19:48] boghog: yeah I was reading it, but I think I can use it [19:49] boghog: I just need to export a single object [19:49] johnciacia has joined the channel [19:49] boghog: but I can do module.export = { foo: 0, bar: 1 }, I think [19:50] Qbix2: thanks wink_ [19:52] Aikar: boghog: you can [19:52] boghog: cool [19:53] dguttman has joined the channel [19:53] dguttman has joined the channel [19:55] onre_ has joined the channel [19:55] Marnixvdb has joined the channel [19:55] wdperson has joined the channel [19:56] onr has joined the channel [19:56] lightcap_ has joined the channel [19:59] brianm has joined the channel [19:59] brianm has joined the channel [19:59] trotter has joined the channel [20:01] ManuelKiessling has joined the channel [20:02] randallagordon has joined the channel [20:03] ibrahimal-rajhi has joined the channel [20:03] ibrahimal-rajhi: Hey [20:04] numero has joined the channel [20:04] mizerydearia has joined the channel [20:05] Corren has joined the channel [20:05] onre has joined the channel [20:05] n3ptunedrive has joined the channel [20:06] numero: I get this warning, (node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit. [20:06] JulioBarros has joined the channel [20:06] numero: it comes after some time, I am using nowjs and hence socket.io module as well [20:07] numero: What this warning means and how serious it is ? [20:07] jesusabdullah: It means that there are over 10 listeners on an event emitter [20:07] wink_: numero: its just letting you know you're attaching a ton of listeners to some event and asking you to make sure you meant to do it [20:07] jesusabdullah: and it's probably not bad as long as it's intentional [20:07] wink_: because if you didnt, you're leaking memory [20:07] wink_: if you did, it doesnt matter [20:08] jesusabdullah: but it might NOT be, y'know? Because that seems like quite a few [20:08] jesusabdullah: Also, numero, may I suggest http://github.com/substack/dnode for your RPC needs? It's pretty awesome, and I know at least some people like it more than nowjs [20:08] numero: jesusabdullah, wink_ , aaahhh ! so considerate of node.js !!! [20:09] jesusabdullah: also uses socket.io [20:09] dgathright has joined the channel [20:09] wink_: Qbix2: that thing i sent you will fall down under load, it forgets to .end() [20:10] ezl has joined the channel [20:10] numero: jesusabdullah, wink_ , it has any impact on perfomance ? [20:10] Schmallon has joined the channel [20:11] n3ptunedrive: I just started playing with node.js and thought about using it to pass along server statics to a front-end. Is there a way to start server processes and interact with them? There is the process library, but don't understand starting a process. Could someone pass along some information on this or take some time to help me out? [20:11] onre_ has joined the channel [20:11] wink_: numero: it could, but not much... [20:11] daniellindsley has joined the channel [20:12] numero: jesusabdullah, I did see it before choosing now.js, I think now.js as cleaner approach, atleast for onlookers .. [20:12] wink_: n3ptunedrive: are you hoping to parse stdout of your process? [20:12] fumanchu182 has joined the channel [20:12] numero: jesusabdullah, however I would definately reconsider it [20:12] n3ptunedrive: wink_: I am. [20:13] hkv674 has joined the channel [20:13] jesusabdullah: numero: Different strokes and all :) [20:13] n3ptunedrive: wink_: Not just the node.js process anyway. The documentation seems to focus on it. Just wondering if Process can be used for something other than just node itself. [20:14] numero: jesusabdullah, :), what you think are dnode's pros and cons with respect to now.js ? have you done comparitive analysis ? [20:14] wink_: n3ptunedrive: look under the child process docs, thats where your goodies are [20:14] jesusabdullah: n3ptunedrive: Have you read this? http://nodejs.org/docs/v0.4.6/api/child_processes.html [20:14] wink_: http://nodejs.org/docs/v0.4.6/api/all.html#child_Processes [20:14] numero: n3p, I guess you can spawn a process [20:15] numero: n3ptunedrive, , I guess you can spawn a process [20:15] n3ptunedrive: wink_, jesusabdullah, numero: Thanks =] [20:15] aho has joined the channel [20:15] jesusabdullah: numero: I could, but i think http://stackoverflow.com/questions/5317282/what-is-the-difference-between-dnode-and-nowjs will do you better [20:15] zzak has joined the channel [20:15] jesusabdullah: It's actually quite comprehensive. Whoever answered the question did a good job! [20:16] rook2pawn has joined the channel [20:16] n3ptunedrive: Exactly what I was looking for guys. Guess I just had to scroll down a bit more. [20:16] onre_ has joined the channel [20:16] bradleymeck has joined the channel [20:16] numero: jesusabdullah, wink_ , I am developing rightNow : https://github.com/samyakbhuta/rightNow [20:17] numero: will fork it to use dnode, so we have really comparison !!! [20:17] cwhiteley has joined the channel [20:17] jesusabdullah: I think the now.js people have really been trying to push their product forward, both marketing-wise and tech-wise [20:18] jesusabdullah: The early versions of now.js didn't transparently wrap callbacks [20:19] numero: going through SO article [20:20] RusAlex1 has left the channel [20:22] numero: the biggest selling point of now.js is their shared space [20:22] numero: it make things lot clear [20:23] numero: i can ask any noob programmer to, well, atleast maintain a code !! [20:23] numero: yeah, but having node clients could be really good [20:24] numero: so is bringing the power of middleware [20:24] numero: sri [20:25] numero: _sri, are you one of the nowjs only ? [20:25] intel_ix has left the channel [20:28] jdp has joined the channel [20:28] ibrahimal-rajhi has joined the channel [20:28] rfay has joined the channel [20:28] numero: "NowJS provides a kind of magic API that borders on being cute." ... that's so apt !! [20:29] adulteratedjedi has joined the channel [20:29] perlmonkey2 has joined the channel [20:29] abe: How can I access url arguments through express routes and then use them in socket.io? I'm making an app with 'rooms', so I'd like a user to be able to access specific rooms through urls like 'website.com/room/123' [20:34] numero: abe consider nowjs, which is built using socket.io, they have built in support for "room", they say it group [20:34] numero: jesusabdullah, have you seen the group support in nowjs ? [20:36] jmazzi_: when a stacktrace is output, is it line:char-position? [20:38] jesusabdullah: numero: Not really. I've been using dnode since day 1 and am pretty happy with it so I haven't payed that much attention to now.js [20:38] jesusabdullah: I also have a thesis to finish [20:39] numero: [commercial]what are the hourly rates of node.js developent ? [20:39] numero: jesusabdullah, what that thesis is all about ? [20:41] numero: [commercial]what are the _typical_ hourly rates of node.js developent ? [20:41] indexzero has joined the channel [20:43] jesusabdullah: numero: anisotropic thermal conductivity of snow [20:43] abe: numero: looks pretty cool, but I already made a room system with socket.io. Is there a way I could pass in 'req.params.XXX' too a connection? [20:44] abe: I also think I'd have the same problem with NowJS, since groups need names, and the names would be retrieved from the URL [20:44] numero: jesusabdullah, you took so much time to invent this subject for me it looks ! :) ... but I liked it !! [20:44] blueadept: guys i have an extremely dumb jade question here, just really dumb, http://pastie.org/private/beir5eei9vflt73ubxrzg but the thing is my template is iterating all 5 of the items int this dropdown menue, but it's putting the values in the actual space, what would i be doing wrong here? [20:44] indexzero has joined the channel [20:44] blueadept: i mean it's putting the values in as black spaces, and not the actual values [20:45] Guest89491 has joined the channel [20:45] tjholowaychuk: black spaces? [20:45] blueadept: blank* [20:45] tjholowaychuk: option(value=whatever) text [20:46] tjholowaychuk: value is the data, option tags still need text [20:46] tjholowaychuk: you're not giving it text [20:46] blueadept: oah [20:46] cwhiteley has left the channel [20:47] abe: tj, any idea on how I could pass url arguments into a websocket session? [20:48] numero: what would be asking per hour price for node.js developer/development ? [20:48] wink_: numero: im not sure you're going to get a good answer to that, do you already do consulting work? [20:48] context: numero: thats generally a question that depends on the persons knowledge of the subject [20:48] blueadept: numero: $300 [20:49] rauchg: abe: [20:49] rauchg: as the first message [20:49] rauchg: in the connection [20:49] rauchg: for example. [20:49] numero: abe, I have not worked directly with sockets :( [20:49] Guest89491: 300?????????????????????????????????????????????????? [20:50] blueadept: maybe considerably north of that [20:50] blueadept: hey it depends what your own time is worth honestly [20:50] rauchg: abe, you can also keep track of clients by sending the express session id from the browser to the server through socket.io [20:50] Guest89491: node.js is such a simple library why would a developer cost that much [20:50] abe: you could charge, but is the client requesting node? If not, they may be surprised and not understand your explanation [20:50] numero: wink_, context , blueadept , thanks !! [20:51] context: and context also needs to take consideration [20:51] blueadept: Guest89491: right, so then don't pay it [20:51] Guest89491: i will pay 10$ [20:51] context: im going to charge considerably more if you call me at 3 am cause your production app went belly up and you need it fixed an hour ago literally [20:51] Guest89491: thanks [20:51] jonaslund: depends on the city aswell [20:51] numero: what I am trying to figure out is at what price should be used to estimate the cost !! [20:51] numero: cost of the project I mean [20:52] Guest89491: you must be genius [20:52] numero: if I put a case for node.js a platform to develop something new, they will ask me are the developers available and at what price [20:52] jonaslund: over here you get a lawyer for 300$ [20:52] blueadept: lawyers are way overpriced [20:52] jonaslund: or well.. maybe not all lawyers, but cheap ones prolly [20:52] blueadept: i do all my own legal work :) [20:52] __tosh has joined the channel [20:53] abe: rauchg, i'll look into that. How would I delete the 'connection' event listener? I could just add the listener, pass in the argument, and then remove it in the express routing [20:53] rauchg: why would you delete it ? [20:53] context: i think for any language you will find a wide range of pricing as far as developers go. [20:54] jonaslund: more imrpotantly [20:54] abe: well if I left it in there each following connection would have +N listeners firing [20:54] jonaslund: price != value [20:54] wink_: numero: the rates you get quoted aren't going to be because the person is using node, they'll be because the person wants to charge you that much :p [20:54] numero: I think people have got nice topic, but my question still remains !!! [20:54] blueadept: btw, thanks tj! [20:54] abe: it works if I put the listener inside the express route, but the problem is it floods with extra listeners on each connection [20:54] rauchg: abe [20:54] rauchg: i see [20:54] rauchg: i wouldn't put it there [20:55] jonaslund: i'm pretty sure you can find a helluva lot of crappy developers in areas like NY just because they can't go cheap due to living costs.. and you can find ace eastern europeans who makes a good living even if they are cheap and do excellent work [20:55] rauchg: they're separate req/res flows [20:55] blueadept: i owe you like two starbuck gift cards [20:55] rauchg: abe: look at what i did with learnboost/nodestream [20:55] stalled has joined the channel [20:55] rauchg: it's kind of outdatedish right now, but you can get the idea [20:55] jonaslund: numero: find out the generic consulting fees in your area then double or triple it to match the specific knowledge needed [20:56] indiefan2a1 has joined the channel [20:56] jonaslund: numero: if you are gonna support node.js stuff you better have a company that can put in a pledge to handle stuff like that for the near future imho. node.js itself isn't stable at all yet and i think alot of people doing node are still doing it for themselves [20:57] kevliu has joined the channel [20:57] Qbix2: duncanbeevers: no it woudl not, this is for flash cross domain requirements [20:57] Know1edge has joined the channel [20:58] numero: jonaslund, that helps !! .. thanks !! [20:58] context: numero: go to rentacoder.com im sure you can find a developer for $10/h . find someone who knows wtf they are doing you will spend $100-200 +/h im sure [20:58] numero: jonaslund, are you saying it is not production ready yet ? [20:59] jonaslund: As much as i like using node and the idea of the platform, i do think people should be prepared to eat their own dogfood. if everybody goes out doing haphazard projects because it looks like something fun to do it'll prolly hurt node in the long run if people get disappointed by contractors using it for the wrong things. [20:59] numero: context, I could see things in better perspective now !! [21:00] context: jonaslund: uhh companies are using node [21:00] context: even twitter. albiet for compiling less.js [21:00] context: jonaslund: http://www.quora.com/Node-js/What-companies-are-using-Node-js-in-production [21:00] jesusabdullah: github uses node for their downloader [21:00] numero: jonaslund, but there are best practices yet to evolve and we all need to take a li'l bit of risk, don't ? [21:01] ji0n has joined the channel [21:01] jonaslund: context: these are hopefully companies prepared to "eat their own food" [21:01] context: ok [21:01] wink_: we use node in production, it doesnt have to be a black box :p [21:02] wink_: and it isnt, as long as you test the bits you need, you'll be fine [21:02] mscdex: node.js rules! [21:02] jonaslund: that is one thing, but i'm thinking of situations where consultants push node.js because they want to learn it or think it's a fun experience. If those kind of projects gets "abandoned" by the orignal contractors it could become a blemish on the node name [21:02] context: i honestly dont see why you're so worried about nodejs. if it works now it wont work later? [21:02] jonaslund: If i'm wondering about something i usually search for "blabla sucks" on google.. and those kind of things don't disappear [21:03] mscdex: you're going to have haters no matter what [21:03] context: what mscdex said [21:03] zzak: haters gonna what? [21:03] jonaslund: ofcourse [21:03] rook2pawn: if bad drivers drive good cars and consistently crash or misdrive them, thats nothing on the car [21:03] jpld has joined the channel [21:03] jpld has joined the channel [21:03] mscdex: people already complain about callbacks and other things [21:04] halfhalo: callbacks killed my brother [21:04] Guest89491: lol [21:04] numero: jonaslund, do you think such badass consultant are many ? and client dumb to conclude it was all because of node.js ? [21:05] numero: halfhalo, rofl [21:05] jonaslund: i remember one project where the guys i worked for paid some 100k usd just to get a "development plan" done by some big consulting company [21:05] jonaslund: the plan mainly consisted of some stupid "widget" project to be appended to the mobile app we were to develop [21:05] numero: halfhalo, to die = god invoked callback !!! [21:06] jonaslund: i have no idea where it came from but it had nothing to do with what that company was supposed to be doing [21:06] dcampano has joined the channel [21:06] jonaslund: but "widgets" were all the rage around that time [21:06] numero: jonaslund, i think you need not be cynical about failures with node.js [21:06] mscdex: they still are [21:06] mscdex: :P [21:07] jonaslund: numero: well my point is that, if you're pushing node for a client do it for the right reasons. [21:07] rektide has left the channel [21:08] numero: jonaslund, taken ! [21:17] entropax has joined the channel [21:17] kmiyashiro: anyone have a favorite node json pretty printer? [21:18] Guest89491: Was mich bei sehr vielen "Informatikern" (und einfach nur Programmierern, Admins etc.) stort, ist, dass sie sich einfach nur auf eine Sache spezialisiert haben und sonst gar nichts konnen [21:18] stagas: kmiyashiro: JSON.stringify(data, null, '\t') [21:19] kmiyashiro: oh, sweet. Thought that was a library or something [21:19] brianmario has joined the channel [21:19] Billbad: kmiyashiro: http://jsonformatter.curiousconcept.com/ [21:20] kmiyashiro: I'm looking to actually send formatted json [21:20] kmiyashiro: for display in a
[21:22] kmiyashiro: I'm guessing that JSON.stringify doesn't work in IE
[21:22] wormphlegm has joined the channel
[21:23] davidwalsh has joined the channel
[21:23] kmiyashiro: ah, https://github.com/douglascrockford/JSON-js
[21:23] blueadept: in all fairness node wont even be stable until about 0.6 i believe
[21:24] blueadept: once it because stable, then it's time to start consulting gigs for it
[21:24] blueadept: i wouldn't do it now
[21:24] blueadept: becomes*
[21:26] mscdex: 0.6 is the next stable version
[21:26] mscdex: :P
[21:26] mscdex: well, stable branch
[21:27] blueadept: or you could wait until 1.0
[21:27] Guest21542: hmm
[21:27] Tobsn: i hacked instagram
[21:28] Tobsn: well not really hacked but
[21:28] Tobsn: still bad
[21:28] halfhalo: I hacked the internet
[21:28] blueadept: what can you do?
[21:28] Tobsn: JS injection
[21:28] Tobsn: its working
[21:28] blueadept: yesh
[21:28] Tobsn: i have a funny modal window on it
[21:28] Tobsn: already sent a msg to mikey and techcrunch
[21:28] Tobsn: that will be funny
[21:28] Tobsn: http://instagr.am/p/DbC4Q/
[21:28] Tobsn: if someone wants to see it
[21:29] Tobsn: before they shut it down
[21:29] blueadept: pwnage
[21:29] blueadept: lol, instadumb
[21:29] blueadept: so mean 
[21:29] Tobsn: actually
[21:29] Tobsn: http://instagr.am/p/DbKO5/
[21:29] Tobsn: thats the funny one
[21:29] Tobsn: with picture of modal
[21:30] blueadept: make sure you put your resume link on the message
[21:30] Tobsn: lol no thanks
[21:30] V1: + phone and creditcard details
[21:30] jiggliemon has joined the channel
[21:31] eee_c has joined the channel
[21:32] pyrotechnick has left the channel
[21:33] flippyhead has joined the channel
[21:33] stride: haha
[21:34] __sorin__ has joined the channel
[21:34] heavysixer has joined the channel
[21:34] jacobolus has joined the channel
[21:34] astropirate has joined the channel
[21:36] catshirt has joined the channel
[21:37] tykelewis: Anyone know if there is a way to set a global eventlistener on sockets?  I'm getting "Offset is out of bounds" and "socket hang up" errors when the sockets timeout (I set keep-alive headers, and explicit timeouts), and am trying not to set event listeners on each socket.
[21:37] thegh has joined the channel
[21:39] jacobolus has joined the channel
[21:39] nibblebot has left the channel
[21:40] ip82 has joined the channel
[21:40] mAritz has joined the channel
[21:41] ip82 has left the channel
[21:44] mikeal has joined the channel
[21:44] nmtmason has joined the channel
[21:44] saschagehlich has joined the channel
[21:48] trcarden has joined the channel
[21:49] Me1000 has joined the channel
[21:50] saikat has joined the channel
[21:50] lightcap_ has joined the channel
[21:50] pdelgallego has joined the channel
[21:50] trcarden has left the channel
[21:50] ezl has joined the channel
[21:53] stagas: Tobsn: it throws an error, Object has no method 'modal'
[21:54] Tobsn: yeah sometimes it doesnt really load it fully
[21:54] Tobsn: gonna put in some timeouts
[21:54] stagas: Tobsn: and jQuery is not defined when trying to load simplemodal.js
[21:54] boboroshi has left the channel
[21:54] stagas: oh it worked now :)
[21:54] context: Load your js in the proper order
[21:54] trcarden has joined the channel
[21:55] Tobsn: i do
[21:55] Tobsn: stagas, yeah its weird
[21:55] Tobsn: no idea wtf that is
[21:55] davidwalsh has joined the channel
[21:55] Tobsn: i also dont really want to fix it
[21:55] Tobsn: or look into it
[21:55] Tobsn: cause the real issue is instagram not sanitizing
[21:56] context: Is it "reasonable" to use underscore with modems 
[21:56] context: Node*
[21:56] context: Damn autocorrect 
[21:56] sdecastelberg has joined the channel
[21:56] mscdex: hehe modems
[21:56] Tobsn: hmm
[21:56] Tobsn: modems
[21:56] reid has joined the channel
[21:57] mscdex: context: depends, a lot of stuff v8 has that underscore provides
[21:58] context: Ahh. Maybe I should check out the v8 docs when I get home and see what I'm missing 
[21:58] Tobsn: stagas, http://instagr.am/p/DbKO5/ better? ;)
[21:58] lightcap_: anyone know why node wouldn't compile with homebrew on OS X? Definitely an openssl problem, but the header files are in the 10.6 framework sdk for sure. Somehow missing a link, maybe? https://gist.github.com/937773
[21:58] stagas: Tobsn: yeah, much more scary
[21:59] context: lightcap_: Node compiles fine on os x here 
[21:59] Tobsn: yep
[21:59] context: Do you have the latest Xcode installed
[21:59] lightcap_: yeah on my other machine it does too
[21:59] mraleph has joined the channel
[21:59] context: And with the unix crap too so it installs headed
[21:59] context: Headers
[21:59] lightcap_: context: as far as I know it's the exact same setup (obviously not, but I can't find the damn difference)
[22:00] lightcap_: yeah, XCode is installed.
[22:00] context: Reinstall Xcode 
[22:00] lightcap_: not the latest, latest version that apple is charging 4.99 for and is a fscking 4.5GB download.
[22:00] context: And make sure you select the 'unix development' option or whatver 
[22:00] dshaw_ has joined the channel
[22:00] lightcap_: yeah, it's all there... I tried downloading latest xcode and it failed :-(
[22:01] context: Heh. The latest whatever copy you want
[22:01] context: I don't have that version either
[22:01] rmustacc: lightcap_: You're missing cflags that have the directory for openssl.
[22:01] lightcap_: 4.2GB in
[22:01] lightcap_: rmustacc: ok! that sounds possible.
[22:01] rmustacc: You have no -I that would contain it specified.
[22:01] lightcap_: rmustacc: any idea how homebrew sets that?
[22:01] context: And make sure home brew is up to date
[22:01] rmustacc: I don't use home brew.
[22:01] rmustacc: Sorry.
[22:01] lightcap_: context: brew is.
[22:02] context: Mustacc that's nothing he needs to worry about with omebrew
[22:02] context: Reinstall Xcode
[22:02] context: Your missing stuff. Not home brew doesn't know where it is 
[22:02] tykelewis_ has joined the channel
[22:03] rmustacc: lightcap_: Do you have /usr/include/openssl/*?
[22:03] rmustacc: That's the default place for those header files on OS X it appears.
[22:03] Remoun has joined the channel
[22:03] dgathright_ has joined the channel
[22:04] lightcap_: rmustacc: no, the apple way is to have it in /Developer/SDKs/MacOSX10.6.sdk/usr/include/openssl/
[22:04] lightcap_: and it's there
[22:04] lightcap_: not sure how apple makes the translation from the normal /usr/include/*
[22:04] lightcap_: This shit makes me miss my linux box :-)
[22:04] rmustacc: I have it in /usr/include on the MBP I'm looking at. But I would imagine that g++ doesn't know to look there by default.
[22:05] lightcap_: yeah, what version is that?
[22:05] lightcap_: 0.9.8l?
[22:05] lightcap_: if it's newer then it's something that was installed along side the OS X provided openssl
[22:06] rmustacc: Stock 0.9.8l that came with it.
[22:06] lightcap_: and strangely, brew install openssl && brew link openssl doesn't help even though it does put stuff there.
[22:06] lightcap_: really? and it's in /usr/include/openssl
[22:06] lightcap_: weird
[22:07] lightcap_: anyone else verify that's the case on an OS X box?
[22:07] rmustacc: Both directories exist and have openssl.
[22:07] lightcap_: are they links in /usr/include?
[22:08] mike5w3c_ has joined the channel
[22:08] lightcap_: hmm, I have them there in my other box too, but I thought homebrew put 'em there.
[22:13] lightcap_: I'll try brew uninstalling openssl from the other box and see if they go away
[22:13] lightcap_: well, shit, it's not even installed with brew there...
[22:13] lightcap_: lol
[22:14] lightcap_: must have blown them away somehow
[22:14] lightcap_: so I'll need /usr/include/openssl for sure on the other box
[22:14] lightcap_: any other dirs?
[22:15] mscdex: context: https://github.com/joyent/node/wiki/ECMA-5-Mozilla-Features-Implemented-in-V8
[22:16] MikhX has joined the channel
[22:23] bingomanatee has joined the channel
[22:23] Tobsn: lol submitted it to hackernews, they deleted it.
[22:24] davidwalsh has joined the channel
[22:24] stagas: Tobsn: did you post the link to the alert directly?
[22:24] Tobsn: yep
[22:24] Tobsn: okay
[22:24] Tobsn: instagram fixed it
[22:26] matjas has joined the channel
[22:28] dguttman_ has joined the channel
[22:29] arunagw has joined the channel
[22:30] zackattack has joined the channel
[22:30] harth has joined the channel
[22:30] JusticeFries has joined the channel
[22:30] arunagw_ has joined the channel
[22:31] kevliu: what is the redis client that most people are using right now?
[22:31] zzak: nedis
[22:31] tk has joined the channel
[22:31] kevliu: redis-node or node_redis?
[22:32] ErikCorry has joined the channel
[22:32] brianc: does anyone here know if jade works in IE?
[22:32] tjholowaychuk: brianc: doubt it
[22:32] lightcap_: rmustacc: are there any other dirs I should worry about? looks like the files in both the SDK and /usr/include are the same, so I just copied them over
[22:32] brianc: tjholowaychuk: ah yeah sorry didn't mean to ask you in particular, we talked about it the other day, was just kinda pulsing to see if anyone else knew for a fact yay or nay
[22:32] tjholowaychuk: brianc: like i said before the clientside stuff needs a little bit of love the compiler doesn't yet strip out all the es5 specific stuff
[22:32] tjholowaychuk: ah
[22:33] tjholowaychuk: 99% sure
[22:33] tjholowaychuk: it wont work
[22:33] tjholowaychuk: because nothing works in IE
[22:33] tjholowaychuk: haha
[22:33] brianc: tjholowaychuk: hahaha alrighty
[22:33] zzak: truth
[22:33] brianc: tjholowaychuk: does learnboost do client-side rendering?
[22:33] tjholowaychuk: brianc: we do but our templates are so tiny we just do concats
[22:33] tjholowaychuk: nothing crazy
[22:33] brianc: tjholowaychuk: ah okay cool
[22:34] brianc: the "I am a"  dropdown is borked in IE8.  I dunno if y'all support IE8 or not
[22:34] tjholowaychuk: i dont touch ie
[22:34] zzak: brianc: seen http://icanhazjs.com/ ?
[22:35] tjholowaychuk: im the wrong person to talk to :p
[22:35] brianc: haha
[22:35] zkirill has joined the channel
[22:35] zzak: (mustache on the client)
[22:35] mikeal: brianc, tjholowaychuk: just use es5 shim
[22:36] brianc: mikeal: es5 shim is cool until you do __defineGetter__ 
[22:36] tjholowaychuk: mikeal: I have `make jade.js`
[22:36] rmustacc: lightcap_: You shouldn't have to copy them over, just tell node ./configure to look for openssl there.
[22:36] tjholowaychuk: and make jade.min.js
[22:36] tjholowaychuk: its just not done
[22:36] brianc: mikeal: unfortunately there's no way to shim es5 properties
[22:36] mikeal: yeah, don't use getters and setters :)
[22:37] tilgovi has joined the channel
[22:37] ezl has joined the channel
[22:37] mikeal: it's not good to use them even when they are there
[22:37] lightcap_: rmustacc: yeah, but lots looks there and they should be there anyhow.
[22:38] lightcap_: I've had issues with openssl on this machine for a while, that's likely the culprit.
[22:38] tjholowaychuk: mikeal: yeah, but sometimes you get sick of this.peek().type all over haha
[22:38] brianc: mikeal: roger that
[22:38] tjholowaychuk: but yeah they are to slow right now anyway
[22:38] lightcap_: and node is building fine now
[22:38] tjholowaychuk: just removing them from stylus made it 2x faster
[22:38] lightcap_: thanks context and rmustacc 
[22:38] brianc: damn!
[22:38] mikeal: yeah, it can be annoying, but at least it's clear what is happening
[22:38] lightcap_: never crossed my mind that OS X would put the files in both places
[22:38] mikeal: and you don't opt in to slow mode
[22:39] lightcap_: (seems strange to me still, but, hey)
[22:42] tykelewis has joined the channel
[22:43] mikeal: i have to say
[22:43] mikeal: i've come around a little
[22:44] mikeal: and i kind of like jquery templates
[22:44] brianc: mikeal: yeah was just looking @ them
[22:44] bnoguchi has joined the channel
[22:45] brianc: mikeal: writing full blown html though slows down html based designing cause you gotta manage your closing tags & crap as compared to jade when you just un-indent a section
[22:45] mikeal: pretty simple, quite powerful, very little boiler
[22:45] tjholowaychuk: brianc: yeah i cant stand matching tags
[22:46] mraleph has joined the channel
[22:46] mikeal: it's solving a different problem, IMO
[22:46] brianc: tjholowaychuk: same...the other side of the coin most actual designers if given a whitespace sensitive template would probably have their minds blown
[22:46] tjholowaychuk: brianc: for sure
[22:46] tjholowaychuk: luckily we dont hire designers
[22:46] bnoguchi: isaacs: If I have a mix of dependencies, some intended for local install, some for global install, can I distinguish between the 2 in my package.json?
[22:47] brianc: tjholowaychuk: I've lost count of number of times I wish I could high-five you
[22:47] tjholowaychuk: ahaha
[22:47] brianc: haha
[22:48] Swimming_bird has joined the channel
[22:51] isaacs: bnoguchi: why do you need your dependencies installed globally?
[22:51] varioust has joined the channel
[22:51] ryanj has joined the channel
[22:51] doubletap1 has joined the channel
[22:51] doubletap1 has left the channel
[22:52] isaacs: bnoguchi: (that is, "no")
[22:52] isaacs: bnoguchi: assume that there is no such thing as global installation when developing a package.
[22:53] bnoguchi: isaacs: Right. But I'm bumping into an issue now where one of my dependencies is trying to node-waf locally and it's throwing Permission denied
[22:53] Corren has joined the channel
[22:54] isaacs: bnoguchi: what dependency?  what is it trying to do?
[22:54] isaacs: sounds like that package is broken
[22:54] bnoguchi: isaacs: When I try to install the dependency in isolation locally, it throws, too. When I try to install it globally, it succeeds
[22:54] brianc: I didn't think node-waf required sudo rights
[22:54] bnoguchi: isaacs: bcrypt
[22:54] bnoguchi: isaacs: Odd thing is I'm using sudo for the command
[22:55] EM03: any interactive interpreter for node.js with some sort of tab completion?
[22:55] isaacs: bnoguchi: works with the npm code on head
[22:55] isaacs: bnoguchi: probably an npm bug that just got fixed and might not be released yet.
[22:55] isaacs: bnoguchi: does it work if you *don't* use sudo?
[22:56] brianc: protip - if package requires sudo to install...package is naughty
[22:56] bnoguchi: isaacs: no, same permission denied error
[22:56] isaacs: bnoguchi: what version of npm?  npm -v
[22:56] isaacs: bnoguchi: also, gist the error, please
[22:56] bnoguchi: 1.0.1rc8
[22:56] isaacs: there's a newer rc.  this should work:  npm install npm@rc -g
[22:56] isaacs: the @rc and the -g are necessary!
[22:57] brianc: i like the @rc ... didn't know about that
[22:57] isaacs: it's a tag
[22:57] brianc: i always have installed w/ git & make install
[22:57] isaacs: that works, too
[22:58] saikat has joined the channel
[22:58] isaacs: i make link, myself
[22:58] jakehow has joined the channel
[22:59] bnoguchi: isaacs: K, lemme try with HEAD
[22:59] isaacs: bnoguchi: also: sudo npm cache clean
[22:59] isaacs: might help
[23:00] bnoguchi: isaacs: What exactly does that do?
[23:00] csanz has joined the channel
[23:01] Tobsn: someone here knows the best way to set up replica sets in sharding in mongo?
[23:01] ktotheg has joined the channel
[23:01] bnoguchi: isaacs: Cool, the upgrade fixed it. Thanks!
[23:02] broofa_ has joined the channel
[23:02] bnoguchi: Tobsn: http://blog.learnboost.com/blog/availability-redundancy-and-failover-at-learnboost/
[23:03] Tobsn: sharding part is missing ;)
[23:03] Tobsn: i just wonder if you need to tell the config servers about each replica set server
[23:03] Tobsn: last time i set that stuff up it was replica pairs hehe
[23:04] romanoff has joined the channel
[23:04] CIA-72: node: 03Ryan Dahl 07v0.4 * r3ce5e6f 10/ doc/index.html : Use better ports on the home page - http://bit.ly/i8EB3y
[23:06] rauchg: Tobsn: you just set up a shard on top of the replica set
[23:06] rauchg: http://www.mongodb.org/display/DOCS/Sharding+Introduction#ShardingIntroduction-BalancingandFailover
[23:06] romanoff: Hello everyone. Have a question about modules. Can my module after "require(./supermodule)" extend current environment with its local variables. I understand that it's not preferable way in node. But can I do that? If no, can I somehow populate environment with variables from javascript object. Let's say I have {a:1, b:2} object and after some magic, a and b become local variables
[23:07] rauchg: romanoff you could alter `global`
[23:07] rauchg: or omit `var`
[23:07] rauchg: but you must not
[23:07] mikeal has joined the channel
[23:08] romanoff: romanoff, can you provide some code or link? (about global)
[23:09] honey_badger has joined the channel
[23:10] newy_ has joined the channel
[23:11] honey_badger: node_chat has an xss issue
[23:11] tsesame: I have a basic question about connect
[23:12] honey_badger: i guess its not that big of a deal.. no really users data or anything.. 
[23:12] ckknight: tsesame: don't ask to ask, just ask
[23:13] ryah: isaacs: you're not working on the timer problem?
[23:13] tsesame: well, I'm trying to use .createServer with a callback, very straightforward, and now I want to do something simple like serve a favicon.ico.  The example on serving favicon creates a server that does anothing except serve that image?  what am I missing?
[23:13] isaacs: ryah: no, i've been working on the "how am i gonna fill up a time slot at nodeconf" problem :)
[23:14] honey_badger: lol there is already a pull request for the xss issues.. 
[23:14] tsesame: in other words, how do I serve the favicon alongside of my callback?
[23:14] isaacs: ryah: i'm guessing it's pretty simple, though
[23:15] ryah: i'm sure. going to do it now. just wanted to acquire a lock on the issue.
[23:16] tilgovi has joined the channel
[23:16] JusticeFries has joined the channel
[23:17] kristsk` has joined the channel
[23:22] sleeplessinc has joined the channel
[23:23] fljitovak has joined the channel
[23:24] ryah: i'm kind of surprised it took this long to find this timer bug.
[23:24] wilmoore has joined the channel
[23:24] ryah: it's been there for over a year...
[23:25] pootietang has joined the channel
[23:25] sh1mmer: timing isn't really that important
[23:26] Tobsn: rauchg, so the sets are set up first right? but do i tell the config server about all server in each set?
[23:26] random123 has joined the channel
[23:26] kmiyashiro: anyone know how to use a variable as a regex pattern?
[23:27] Tobsn: new Regex() ?
[23:27] kmiyashiro: like x = 'foo' and I want to do /x/ except make it do /foo/
[23:27] kmiyashiro: oh
[23:27] Tobsn: new regex('/'+foo+'/')
[23:27] Tobsn: something like that
[23:27] Qbix2: hey guys
[23:27] Qbix2: when an http server listens on a port
[23:27] isaacs: ryah: it's pretty unusual to pass a float to setTimeout
[23:27] Qbix2: if I put 127.0.0.1 as the host
[23:27] kmiyashiro: so new Regex('/' + x + '/')
[23:27] Qbix2: what hapens?
[23:27] Qbix2: if I send a request with an HTTP HOST header like qbix.com
[23:27] Qbix2: or foo.qbix.com
[23:28] Qbix2: will node.js respond to this request? or no
[23:28] Qbix2: what's the point of the host
[23:28] Qbix2: in .listen( )
[23:28] Tobsn: kmiyashiro, look up in the docu if there is a regex obj
[23:28] Tobsn: not sure right now
[23:28] Tobsn: but it should work like that
[23:28] matjas has joined the channel
[23:28] Tobsn: ah, i think its new RegExp()
[23:30] zcopley has joined the channel
[23:30] mikeal: Qbix2: you're confusing TCP and HTTP
[23:30] mikeal: you bind a server to an IP/port
[23:31] mikeal: all connections over that port will hit that server, and the http parser will parse http on then if it's a valid requests
[23:31] mikeal: the Host header will be provided in that HTTP request
[23:31] kmiyashiro: got it
[23:31] mikeal: the node http server doesn't distinguish the host header at all
[23:32] mikeal: you have to write your own vhost handling in the http request handler by looking at the the host header
[23:35] honey_badger: so xss a demo nonissue?
[23:38] cbiscardi has joined the channel
[23:39] cbiscardi has left the channel
[23:39] gazumps has joined the channel
[23:39] CIA-72: node: 03Ryan Dahl 07v0.4 * rc8e447e 10/ (src/node.h test/simple/test-regress-GH-897.js): 
[23:39] CIA-72: node: Fix timeouts with floating point numbers bug
[23:39] CIA-72: node: fixes #897. - http://bit.ly/hovqPx
[23:40] Qbix2: how do I get a backtrace in node?
[23:40] ryah: is there anything that needs to get into v0.4.7 ? speak now
[23:40] ryah: Qbix2: console.trace()
[23:41] Qbix2: thanks :)
[23:41] Qbix2: saved me a lot of time
[23:41] ckknight: ryan: hamburger earmuffs!
[23:41] wadey: should test-tls-securepair-client.js be failing for v0.4.6?
[23:41] zzak: +1 hamburger earmuffs
[23:41] ryah: wadey: you know, i think it's been broken on mac ofr a while
[23:42] ryah: i need to figure out what's wrong with that...
[23:42] wadey: ryah: I'm running it on linux right now
[23:42] ryah: relaly?
[23:42] ckknight: http://everythingburger.files.wordpress.com/2010/08/frinkearmuffs.gif
[23:42] ryah: ah, wait a sec...
[23:43] ryah: % ./node test/simple/test-tls-securepair-client.js 
[23:43] ryah: Skipping due to old OpenSSL version.
[23:43] ryah: :)
[23:43] zzak: lol
[23:43] jpld has joined the channel
[23:43] wadey: ah ok :), so mines not skipping for some reason
[23:44] broofa has joined the channel
[23:45] mjr_ has joined the channel
[23:45] mkrecny has joined the channel
[23:45] kab3wm has joined the channel
[23:48] replore has joined the channel
[23:52] Qbix2: hey guys
[23:52] Qbix2: how do I make a server request
[23:52] Qbix2: in node
[23:52] mikeal: oh ryah
[23:52] mikeal: hold on
[23:52] Qbix2: http.serverRequest( ) ?
[23:52] mikeal: i wanted to align the getAgent calls for https and http
[23:52] mikeal: it should take me like 5 minutes to fix and test
[23:53] Qbix2: http.request(options, callabck)
[23:53] Qbix2: 	    var req = http.request(options, function(result)
[23:53] Qbix2:                     ^
[23:53] Qbix2: TypeError: Object # has no method 'request'
[23:53] Qbix2:     at Server. (/projects/qbix/Graffiti/scripts/Graffiti/Graffiti.js:28:21)
[23:53] Qbix2: weird
[23:53] JianMeng has joined the channel
[23:54] Bwen: I think you dont have enough Graffiti in your path there...
[23:54] ckknight: I agree
[23:54] ryah: mikeal: is that an api change?
[23:54] mikeal: it's actually a bug in the current api
[23:54] mikeal: the http intefaces for http and https should be identical
[23:54] mikeal: and they currently aren't
[23:54] Qbix2: aha I have an old node.js
[23:54] Qbix2: probably
[23:54] Qbix2: it has createClient
[23:54] Qbix2: has that been deprecated?
[23:55] ryah: mikeal: agreed - but we can't land that in v0.4
[23:55] ryah: Qbix2: yes
[23:55] Qbix2: ah, that's why
[23:55] Qbix2: how do I update node btw
[23:55] Qbix2: can I use node to update itself? 
[23:56] Qbix2: npm update node?
[23:56] JusticeFries has joined the channel
[23:56] Qbix2: ryah: how do I update node quickly?
[23:57] mikeal: ryah: what if I handle the old case?
[23:57] Qbix2: and when will node 1.0 be released?
[23:57] mikeal: so it reverse compatible with the current API
[23:58] tsesame: Pls help me understand what's missing:  https://gist.github.com/937978
[23:58] rmustacc: Qbix2: Folks are currently working towards 0.5/0.6, as far as I know, there isn't a target date for 1.0 currently.
[23:58] mikeal: ryah: https://gist.github.com/937985
[23:59] Qbix2: okay so how does one update node
[23:59] Qbix2: to the latest version
[23:59] rauchg: Qbix2 use http://github.com/visionmedia/n
[23:59] rmustacc: How are you currently installing it?
[23:59] rauchg: then run `n latest`