[00:00] rauchg_: mnot: spec != real world [00:00] rauchg_: now this is becoming a classic multiple headers debate haha [00:00] rauchg_: we could set up async bots to do this job for us [00:00] mnot: rauchg_: yeah, sure. But the object of that spec is to give advice to real world implementers. [00:00] ryan[WIN] has joined the channel [00:01] mnot: rauchg_: …and basically what it now says is that if you send multi-line headers, they probably won't work. [00:02] floby has joined the channel [00:02] mnot: rauchg_: so I'm not sure what the debate is about; everybody knows they don't really interop. [00:03] frisk has left the channel [00:03] piscisaureus: ACTION impatiently waiting for the v0.5 fork [00:03] jimt has joined the channel [00:03] rauchg_: mnot: http://tools.ietf.org/html/draft-ietf-httpstate-cookie-21#section-3 [00:04] rauchg_: that's another draft right there [00:04] mjr_: mnot: the debate is how node should handle parsing and storing headers that are specified multiple times. It ends up being slower to put them all in their own array. [00:04] mnot: rauchg_: you're talking about folding multiple headers into one comma-separated header; aha [00:04] mnot: rauchg_: not folding header fields themselves [00:05] creationix: zzak: I did [00:05] mnot: what does "put them all in their own array" mean? [00:05] zzak: grats ^^ [00:05] mnot: you mean an array of key, value tuples — each corresponding to a single header line (NOT key)? [00:06] creationix: what did I start [00:06] creationix: oh noes [00:06] mnot: creationix: it's been going on for years, don't worry, you didn't start it ;) [00:06] creationix: ryah: I'll come up with something minimal and sane [00:06] charlenopires has joined the channel [00:07] mnot: my position is that node is a low-layer HTTP implementation, and that therefore the data structure for headers has to loose reasonably little information [00:07] ossareh_ has joined the channel [00:07] mnot: I'd really like to see numbers that the data structure I described above causes real-world perf problems, because my testing didn't show any. [00:07] ryah: ACTION shakes chrome *why are you calling shutdown on an ssl connection?* [00:08] creationix: "Origin servers SHOULD NOT fold multiple Set-Cookie header fields into a single header field"... nice [00:08] Teravus has joined the channel [00:09] mnot: creationix: if you haven't already, see thread on nodejs-dev starting in early Nov, "Changing HTTP headers" [00:09] creationix: oh, I remember [00:09] mnot: creationix: cookies are a special case (also called out in HTTPbis). Hopefully it's only them, but as it's said, hope is not a strategy. [00:10] Teravus: Question, where would someone ask about consulting and possibly contracting with a node.js 'expert'? [00:10] vilhonen has joined the channel [00:10] creationix: Teravus: you could try the node.js mailing list [00:10] creationix: or in here [00:10] tlrobinson has joined the channel [00:11] Teravus: Ok, thanks much. [00:11] creationix: mnot: so the implementation I have half done at the moment stores the headers as a simple array of strings [00:11] creationix: the key and value are already combined into a single line [00:11] maushu has joined the channel [00:11] Teravus: I was originally going to send the company to the list, however I wanted to see if there was a specific place that that kind of question goes. Some projects have that :). [00:11] creationix: I also have an external index with keys toLowerCase()ed to quick lookup [00:11] mnot: creationix: I saw moderate overhead in doing so, and as you've noticed, that's an issue for cookies (and possibly other badly-behaved headers) [00:12] Teravus: Thanks much. [00:12] creationix: mnot: not an array per unique header, but a single array for the entire response [00:12] jdrannbauer has joined the channel [00:12] creationix: Teravus: there is a nodejs job-board out there, but I'm not sure how much traffic it gets [00:13] Vertice has joined the channel [00:13] mnot: creationix: ah, can you give a short example? [00:13] Country has joined the channel [00:13] matyr has joined the channel [00:14] creationix: so headers = ["Content-Type: text/html", "Set-Cookie: SID=123981723498", "Set-Cookie: lang=en-US; Path=/"] [00:14] mjr_: creationix: that sounds simple enough, but then you'd need some kind of headers.get("Content-Type") [00:14] mjr_: ? [00:14] creationix: and index = {"content-type": 0, "set-cookie": [1, 2]} [00:14] creationix: mjr_: right [00:14] mnot: mjr_: I'm assuming that a bunch of utility functions will be necessary [00:14] creationix: that's the part I have implemented [00:14] creationix: but the edge cases get nasty [00:14] mjr_: Otherwise users will have to do headers.indexOf("key") themselves [00:15] mnot: eventually with some perf optimisations [00:15] creationix: mnot: right, the headers array and the index would be private data [00:15] mjr_: You know, putting them in an array, exactly as received, would fix the downcasing thing, as well as the mysterious reordering issues. [00:15] mnot: creationix: so, I think the only place where we differ is on the list items; I'd like to see the colon and any whitespace parsed out, so you have a list of name, value tuples [00:15] creationix: otherwise the index could get out of date with the headers list [00:16] creationix: mjr_: esactely [00:16] creationix: mnot: right, but that's too expensive [00:16] mjr_: I can't believe we are having the multiple headers debate again. [00:16] mnot: how so? you'll have to parse out the name, value each time you want to do something [00:16] creationix: mnot: no I dont, the index has the name, already normalized even [00:17] creationix: only if you want to read the value and then it's a simple substr [00:17] mnot: oh, I see, missed that part [00:17] mnot: hmm [00:17] Teravus: the edge cases of HTTP do get nasty :) [00:17] mnot: well, if you're going to go that far, why not preserve case in the header field-name? [00:17] creationix: the hard part is doing things like deleting just a single instance of Set-Cookie [00:17] mnot: ah, you do [00:17] creationix: how in the world does the user specify which one they want to remove [00:18] prettyrobots has joined the channel [00:18] mnot: so, what I like about this approach is that there's very little information loss; really, only the line delimitation (\r\n vs. \n) and possibly end-of-line whitespace (depending on how you do it) [00:18] creationix: and is removing a single set-Cookie header even something that we need to support [00:18] mnot: which are only useful in very specific use cases (e.g., HTTP analysis tools) [00:18] creationix: mnot: this isn't for parsing, but I guess the same api could be used there too [00:19] creationix: I'm doing this for http response headers [00:19] mnot: it'd really need to be the same data structure / api across the board, I think [00:19] creationix: true [00:19] Teravus: ACTION was working on C# WebServer (http://webserver.codeplex.com/), getting it to support a very specific thread model as part of his work on OpenSimulator.... and the edge cases are usually a result of the expectation that servers need to handle improper use of the protocol gracefully. [00:19] creationix: I might not get this in time for 0.4.0 [00:19] creationix: oh well [00:20] creationix: the release cycle seems fast enough [00:20] mnot: ok, well my only feedback at this point is that if you don't split out the names and values ahead of time, make sure that whitespace is rejected before the colon wherever it occurs; it's a security issue. [00:21] creationix: mnot: how is it dangerous? [00:21] mnot: creationix: because whitespace isn't supposed to appear there, and different implementations strip it differently [00:22] creationix: and wouldn't ryah's http parser reject such invalid data anyway? [00:22] mnot: so that "Content-Length : 0" might appear as two different headers, depending on who's parsing it [00:22] mnot: that allows an injection attack [00:22] mnot: good question; I dont' remember ATM [00:22] mnot: but you also need to make sure someone doesn't send one [00:22] creationix: and you're talking about parsing headers, not generating headers, right? [00:22] creationix: hmm [00:22] mnot: well, it's probably best to error on it [00:23] skm has joined the channel [00:23] mnot: anyway, I'm interested to see how complex it'll become; that seems like the potential risk here [00:23] ceej has joined the channel [00:23] creationix: so what, if any changes, should I try to get in for 0.4.0? [00:24] creationix: I don't want to add sugar that we later have to undo to support multiple headers [00:24] mnot: ryah? I thought it was more or less closed... [00:24] Teravus: Thanks for the tip, I hope your day has been fun and productive :) [00:24] creationix: the multiple headers issue was closed [00:24] creationix: I'm working on mutable headers as a patch [00:24] shiawuen has joined the channel [00:24] felixge has joined the channel [00:24] felixge has joined the channel [00:24] rjrodger has joined the channel [00:25] mnot: can you stick it on github/ [00:25] mnot: ? [00:25] creationix: mnot: https://gist.github.com/816004 [00:25] creationix: that's without multiple-header support [00:25] felixge has joined the channel [00:25] felixge has joined the channel [00:25] creationix: it's pretty simple [00:25] jimt has joined the channel [00:26] jpld has joined the channel [00:26] jpld has joined the channel [00:26] mnot: so, with multiple headers, you'd return an array from getHeader()? [00:26] mnot: (i.e., all the time, 1 or many)? [00:26] creationix: just a sec... [00:26] ziro` has joined the channel [00:27] creationix: mnot: https://gist.github.com/c3d8a34e7044170d7bd7 [00:27] creationix: I haven't settled on a good API for the multiple headers case, it seems to be a very difficult problem [00:27] mnot: yes [00:28] creationix: but I'm sure having a return value that changes type is bad [00:28] mnot: a correct solution isn't very programmer-friendly [00:28] mnot: yes [00:28] creationix: in this version, I have getHeader(name) which always returns the first header or undefined and getHeaders(name) which always returns an array (zero or more items) [00:29] creationix: so it smooths over some of the insanity [00:29] mnot: this is what I stopped on a few months ago: https://github.com/mnot/node/commit/71c158e933416c2ac8bccd57ccca9790f4086173 [00:30] creationix: I see yours is comma aware [00:30] creationix: I didn't want to delve into that mess [00:30] maushu has joined the channel [00:31] mnot: not really 'aware' [00:31] mnot: just will give you a comma-separated string if you ask for it [00:31] mnot: .raw always gives an array [00:32] tvon has joined the channel [00:32] mnot: .split lets you split a comma-separated string, if you know that the content is quoted strings (it doesn't know) [00:32] creationix: I see [00:32] mnot: I've built implementations that try to automatically do the right thing depending on the header in the past [00:32] mnot: they tend to get really complex and nasty :) [00:33] mnot: so I was taking a toolbox approach here; it's up to the developer to figure out the appropriate tools to use [00:33] TheMiddleMan_wor has joined the channel [00:33] cshzt has joined the channel [00:35] torvalamo: can't we make something really complex and nasty and get it over with? [00:35] jacobolus has joined the channel [00:35] torvalamo: like, take a month [00:35] torvalamo: get nasty :p [00:35] creationix: torvalamo: that's not the problem [00:35] sholmes has joined the channel [00:36] creationix: the issue is that people will bikeshed it into oblivion and real work will cease [00:36] ceej has joined the channel [00:36] jimt has joined the channel [00:36] creationix: low-level things are hard to argue, but high-level stuff with tons of sugar and intelligence is full of opionions [00:36] cshzt: so, nothing ever happens.. nothing ever will.. [00:37] sholmes: creationix, that's your oppinion. xP [00:37] chapel: hmm [00:37] temp02 has joined the channel [00:37] cshzt: still bothers me the Ruby / Rails legacy, which I never had, with Node [00:38] chapel: hmm [00:38] mnot: right. the important thing here is to make sure that the actual data representation doesn't lose information and doesn't block (e.g., by performing suck-ily). Everything else is noise; people can add onto it as they want. [00:38] cshzt: torvalamo, yo, motherfucker, just bring it [00:38] creationix: my opinion (which I have experience to back up) is that any API that tries to be everything for everyone will fail to be anything for anyone and impossible to maintain [00:39] mnot: creationix: agreed [00:39] torvalamo: i brought it to your mother, isn't that enough? [00:39] creationix: small, simple, and high-quality tools get out of the way and let work get done [00:39] creationix: mnot: right, I want the simplest tool that enables developers to do whatever they want [00:40] creationix: it's not node's job to develop a full stack web framework for you [00:40] mnot: the practical problem is that if it's too low-level, people will complain that node doesn't ship with useable tools for the 80% case. But I think adding a few tools that are optional to use and don't get in the way of folks who just want the low-level data representation should address that. [00:40] creationix: but it is node's job to allow you to send multiple headers if it's needed [00:40] mnot: yup [00:40] chapel: can someone look at this and answer the question? https://gist.github.com/e6c665f921ccf97d9714 [00:41] cshzt: node ships with everything I need as an experienced programmer [00:41] cshzt: there is no doubt [00:41] chapel: it isn't related to the codes function, I just want to know if the code is translated into the 2nd style [00:41] blueadept has joined the channel [00:41] creationix: chapel: I believe so, a quick test should show if that's the case [00:41] galaxywatcher has joined the channel [00:41] Ratty_: chapel: yes [00:42] chapel: well its what I figured [00:42] Ratty_: whitespace before the dot is ignored. [00:42] chapel: was a curiosity I never paid attention to before [00:42] chapel: kk [00:42] creationix: ASI is sometimes weird, but you should be good there [00:42] cshzt: can I take a special moment to diss Cockfjord? [00:42] chapel: cause I translated that example into coffeescript and it translated that into the 2nd code [00:44] marcosvm has joined the channel [00:44] cshzt: http://crockfordfacts.com/crockford.jpg he hates JS [00:44] Ratty_: I never tried coffeescript [00:45] bartt has joined the channel [00:45] floby has left the channel [00:45] cshzt: http://jshint.com/ [00:46] rburke has joined the channel [00:46] ossareh_ has joined the channel [00:47] cshzt: l8r :) [00:47] dominic_ has joined the channel [00:47] cronopio: hi noders. Im using mongoose for mongoDB, but i cant set a compund Index. I have indexes: [{codigo: 1}], on model definition. But when save get null [00:48] sholmes: express uses the staticServer middleware from connect? [00:49] sholmes: staticProvider I mean [00:54] aldonline has joined the channel [00:55] bradleymeck1 has joined the channel [00:56] Coal has joined the channel [00:56] sholmes: how would I make a compression middleware; would I somehow go inbetween the staticProvider middleware would would I make a whole new middleware? [00:58] isaacs: ryah: https://gist.github.com/817664 [00:59] iszak has joined the channel [00:59] isaacs: ryah: from 23 lstat calls to 7 [01:00] isaacs: (in a test file that does 3 fs.realpathSync calls, using a cache) [01:00] bradleymeck1: sholmes, override res.write/end [01:00] ryah: isaacs: great [01:01] sholmes: bradleymeck1, but what would be the ramifications of that? What if I'm calling .write in chucks? [01:01] sholmes: and then the chunks get compressed incorrectly [01:01] isaacs: ryah: oh, i guess the "Object.prototype.hasOwnProperty.call" stuff is unnecessary, since "hasOwnProperty" isn't a valid abs path anyhow. [01:02] ryah: isaacs: in the test can you test the number of calls to fs.lstat like we do in test/simple/test-require-cache-without-stat.js [01:02] charlenopires has joined the channel [01:03] isaacs: ryah: i'm seeing this: counterBefore = 25 [01:03] isaacs: counterAfter = 25 [01:03] creationix: isaacs: good point, maybe that will help performance (re: use .hasOwnProperty directly) [01:03] isaacs: er, wait, that wasn't with my patch.. [01:03] cjm has joined the channel [01:03] isaacs: creationix: it's a smaller difference than the stats it's preventing. [01:03] isaacs: :) [01:04] isaacs: ok, same either way... [01:04] ryah: isaacs: er, i meant can you add a test to make sure the number is stats is small to the realpath test [01:04] ryah: similar to test-require-cache-without-stat [01:04] isaacs: ohh, ok [01:04] isaacs: ryah: well, i actually added a test that will fail if fs.realpath tries even a single stat for something that's in teh cache. [01:05] edw has joined the channel [01:05] ryah: that sounds good [01:05] ryah: im in the middle of something, i'll check out the patch in a minute [01:05] isaacs: ok, kewl [01:05] torvalamo: you brought the laptop to the toilet, didn't you? [01:06] isaacs: an interesting side effect of this is that you can give fs.realpath a cache with fake entries, and get "imaginary" realpaths [01:06] isaacs: function test_lying_cache_liar(cb) { [01:07] mnot: isaacs: is multipart-js really, really broken (for parsing) or just unloved? [01:07] isaacs: mnot: mostly just unloved. [01:07] isaacs: mnot: it's unloved and really really broken for writing, afaik [01:07] mnot: isaacs: thx. I just need a parser ;) [01:07] isaacs: mnot: ok [01:07] isaacs: mnot: it also doesn't do a lot of node-specific stuff that it could [01:08] mnot: isaacs: understood. [01:08] isaacs: mnot: if you just need a parser, and don't need nested multipart support, i'd go with felixge's formidable [01:08] mnot: isaacs: ah, thx for the tip [01:09] isaacs: i should really unpublish multipart, so that people looking for multipart will see felix's thing first [01:09] dominic_ has joined the channel [01:09] isaacs: done [01:09] isaacs: :) [01:10] aro has joined the channel [01:11] Sebmaster: does "use strict"; have any effect on node scripts? [01:13] creationix: Sebmaster: some, it's partially implemented in V8 [01:13] creationix: I wouldn't use it till it's fully implemented [01:13] creationix: or node upgrades may break code that you thought was compliant, but wasn't [01:14] perlmonkey2 has joined the channel [01:14] Sebmaster: oh okay :( [01:15] Sebmaster: hopefully js engines will soon implement many performance improvements for strict code [01:15] creationix: hope so [01:16] boogyman has joined the channel [01:16] sprout has joined the channel [01:17] Lorentz has joined the channel [01:17] jesusabdullah: What do you mean by "strict code?" [01:17] ryah: so, i understand now why tls is not working. that's good. [01:18] creationix: ryah: yay! [01:18] ryah: ('data' events are being emitted from the socket before 'secure' is fired) [01:18] ryah: where by socket i mean a CryptoStream [01:18] mattly has joined the channel [01:18] ryah: which actually is not at all a socket. [01:18] creationix: that will do it [01:19] Jaye has joined the channel [01:19] Sebmaster: jesusabdullah: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/ [01:22] jesusabdullah: Huh. [01:22] c4milo1 has joined the channel [01:22] jesusabdullah: I don't know how I feel about that. [01:22] arrty has joined the channel [01:22] prettyrobots has joined the channel [01:22] Sebmaster: you dont know? [01:22] jesusabdullah: Indeed. [01:23] Sebmaster: how's that? [01:23] jesusabdullah: Well [01:23] jesusabdullah: I don't know how I feel about it. [01:23] jesusabdullah: I'm not sure if I feel like it's a good thing, or a waste of time. [01:23] shaver: strict mode can me slower in some cases, but they're rare [01:24] jesusabdullah: Oh, I don't mean in terms of cpu cycles. I hardly care about execution speed [01:24] shaver: sorry, I was referring to sebmaster's comment [01:24] jesusabdullah: Ah [01:24] Ratty_: Doesn't take a lot to be strict [01:24] emacsen_ has joined the channel [01:25] shaver: the integrity primitives are good, though [01:25] shaver: freeze/seal [01:25] mikeal has joined the channel [01:25] ceej_ has joined the channel [01:25] shaver: and Object.create for portable prototype-chain control [01:25] Aria has joined the channel [01:25] emacsen has joined the channel [01:25] emacsen_ has joined the channel [01:25] Sebmaster: i love object.create [01:26] Sebmaster: i hate the way of doing inheritance via a new object [01:26] shaver: I like array extras, too, but then I would :-) [01:26] jesusabdullah: YOU're an array extra! [01:26] jesusabdullah: ...fuck it, I'm going home. [01:27] aldonline has joined the channel [01:27] opengeard has joined the channel [01:28] ryah: okay. chrome serves tls now. [01:28] ryah: whew. [01:28] Aria: Woo! [01:28] creationix: and there was much rejoicing [01:28] creationix: ryah: shall I test it on creationix.com? [01:28] ryah: basically firefox was working because it sucks [01:28] creationix: just git pull latest [01:28] ryah: chrome pushes data before the handshake is complete [01:29] ryah: i need to commit it still. one sec. [01:29] creationix: ok [01:30] CIA-99: node: Ryan Dahl master * r9de5043 / lib/tls.js : tls: only emit data after 'secure' event - http://bit.ly/gHgKSE [01:30] ryah: creationix: --^ [01:30] iszak: oeer updates [01:30] creationix: ryah: cool, I'll try it out [01:30] mscdex: i thought Object.create() was slow? [01:30] creationix: ryah: I gave up on the header sugar patch for now, but I have a small patch for assert that I forgot to send you [01:30] mscdex: :S [01:31] creationix: mscdex: it is, sadly [01:31] iszak: slow or slower. [01:31] jpld has joined the channel [01:31] creationix: slow is relative [01:31] iszak: we think of something as slow relative to something else, what is this something else? [01:31] ryah: unoptimized [01:31] creationix: like *only* 10k reqs per second instead of 15k [01:31] mscdex: faster than molasses [01:31] iszak: that is a big difference. [01:32] creationix: well, that's not concrete, but yeah, it's slower [01:32] AAA_awright: What was Chrome's problem, btw? [01:32] iszak: when you load a module it's cached, right? [01:32] creationix: for actual object creation It's an order of magnatude or two slower [01:33] iszak: 0.4.0 should be out this month? [01:33] mscdex: this week? [01:33] mscdex: lol [01:33] ryah: this week [01:34] iszak: excellent. [01:34] ryah: with or without bugs [01:34] ryah: :) [01:34] mscdex: ! [01:34] creationix: bugs can be fixed later, but API needs to be stable [01:34] iszak: ryah, is there a set release circle for versions? e.g. every two weeks a minor release. [01:34] mscdex: bugs? i thought they were features :O [01:34] ryah: every week for minor [01:34] iszak: I thought so, someone tried to say otherwise. [01:35] iszak: How different is the API from 0.2.x to 0.4.x? [01:35] kawaz_wo_ has joined the channel [01:35] zentoooo has joined the channel [01:35] creationix: woot! https://creationix.com:8000/wordle.jpg [01:35] iszak: Because if we can write a regular expression to find and replace the API. [01:35] creationix: ryah: ^ [01:36] Sebmaster: ryah: with platform_cygwin.cc? [01:37] ryah: sigh [01:37] ryah: no, i don't think so [01:37] hornairs has joined the channel [01:37] Sebmaster: oO a stable release without win support? [01:37] Sebmaster: or is the mingw build working? [01:38] ryah: mingw is kind of working [01:38] ryah: creationix: yeah - still kind of broken [01:39] creationix: what's that? [01:39] ryah: i still can't get websockets working [01:39] creationix: websockets over tls? [01:39] creationix: that's a shame, but not a show-stopper [01:40] ryah: it's indicative of bigger bugs though [01:40] creationix: think the bugs might be fixed in the next couple months? [01:41] ryah: going to try to fix it now :P [01:41] mscdex: SubStack: ping [01:41] creationix: ryah: that works too [01:41] creationix: let me know if you need more testing [01:42] mscdex: iszak: https://github.com/ry/node/wiki/Migrating-from-v0.2-to-v0.3 [01:42] chapel: yay, Im going to be able to do proper https uploading !!! [01:43] chapel: ryah++ [01:43] v8bot: chapel has given a beer to ryah. ryah now has 2 beers. [01:43] iszak: mscdex, why would anyone migrate to 0.3 from 0.2? most people like stability. [01:43] creationix: the 0.3 API is what 0.4 will be [01:43] mscdex: yep [01:43] mscdex: :) [01:43] davidthings: ryan, thanks for the TLS fix. Working now for me now too. [01:43] creationix: it's no longer 0.3 as soon as it's deemed stable, but it's the same API [01:44] bingomanatee: ACTION has yet to see a stable release of bingomanatee [01:44] iszak: mscdex, but thanks [01:44] thrumins: met with ioventures! [01:45] davidthings: ryah, I meant, of course. [01:45] Lorentz: Yay for tls \o/ [01:46] piscisaureus: git push -f test master:master && rec restart @test [01:47] piscisaureus: *oops wrong box [01:47] chapel: lol [01:47] ossareh has joined the channel [01:49] iszak: piscisaureus, it's okay it happens to me too, especially when you have three monitors [01:49] piscisaureus: yeah. I have only two. Was distracted by youtube hehe [01:50] chapel: 2 here as well [01:50] chapel: I would love 3 [01:50] chapel: two 30" and one 24" vertical [01:50] ryah: isaacs: [01:50] ryah: stat("/home/ryan/src/Socket.IO-node/index", 0x7fff56117d20) = -1 ENOENT (No such file or directory) [01:50] isaacs: yo [01:50] ryah: stat("/home/ryan/src/Socket.IO-node/index.js", {st_mode=S_IFREG|0644, st_size=44, ...}) = 0 [01:50] SubStack: mscdex: pong [01:50] ryah: lstat("/home/ryan/src/Socket.IO-node/index.js", {st_mode=S_IFREG|0644, st_size=44, ...}) = 0 [01:50] ryah: open("/home/ryan/src/Socket.IO-node/index.js", O_RDONLY) = 5 [01:50] ryah: how come there is a stat and then a n lstat? [01:50] iszak: chapel, three 23" here, wanted to get 1440p tho [01:50] isaacs: hm. good question. [01:50] dominic_ has joined the channel [01:50] chapel: ah [01:50] chapel: I have a 1080p 24" [01:51] isaacs: ryah: oh, right, because the "stat" is to see if it's a thing, and then the lstat is to realpath the thing that it is [01:51] chapel: and an old 20" 1050 [01:51] isaacs: ryah: if it's a symbolic link to something that doesn't exist, then teh stat will fail [01:51] ryah: what if we realpath() something that doesn't exist? [01:51] isaacs: ryah: it'll fail, but slower. [01:52] isaacs: ryah: well, in this case, at the same speed, i guess [01:52] isaacs: since the rest is already cached [01:52] taters has joined the channel [01:52] ryah: but persumably one less stat? [01:52] ryah: i.e. if we don't check to see if the thing is there first [01:52] iszak: chapel, you jelly? [01:52] chapel: I jelly? [01:52] chapel: like the insoles? [01:53] iszak: jelly => jealous [01:53] chapel: am I jealous? of who? [01:53] iszak has joined the channel [01:53] chapel: maybe of ryah for being such a badass [01:53] iszak: ryah, ahaha don't like memes :P [01:53] ryah: ;) [01:54] piscisaureus: since when can you get kicked here. lol. should do that more often. [01:54] piscisaureus: v8bot should have a counter [01:54] iszak: I'm amazed Joyent hasn't asked for Topic space. [01:54] ryah: isaacs: basically i want to know if statPath is necessary, can't we just call realpathSync instead ? [01:55] chapel: hmm, did someone get kicked? [01:55] chapel: I have join/parts ignored [01:56] konobi: iszak: why would we? [01:56] konobi: =0) [01:56] creationix: ryah, just fyi, it's not working quite right [01:56] creationix: https://creationix.com/ can't seem to load the image [01:56] iszak: konobi, no reason not to? [01:56] creationix: but hitting https://creationix.com/wordle.jpg directly works [01:57] chapel: hmm [01:57] creationix: (in chrome on linux) [01:57] chapel: yeah sais waiting [01:57] chapel: chrome osx [01:57] konobi: iszak: it's up to ryah if he wants to put joyent stuff on the channel topic [01:57] iszak: Just saying. [01:57] chapel: haha [01:57] maushu: IS BAD. [01:57] creationix: ACTION is taking a break to eat... [01:58] isaacs: ryah: sure, we can [01:58] isaacs: ryah: that's fine. [01:58] iszak: isaacs, did that feature end up getting implemented? [01:58] isaacs: iszak: which ? [01:58] iszak: versions range. [01:59] chapel: who runs the logger? [01:59] chapel: oh, I had an idea for a webirc client, but where a bot would sit in the channel always logging the channel, and someone could come to the website and see whats happening in channel, if they wanted to talk, they could click a button and it would log them in under their own session and username, but seamlessly [02:00] ryah: isaacs: want to add it to your patch? [02:00] isaacs: yeah, sure [02:00] ryah: sweet [02:00] ryah: git reset --hard HEAD^ [02:00] isaacs: ryah: oh, wait... [02:01] isaacs: ryah: we also want to know that it's not a dir, that's why [02:01] isaacs: if (stats && !stats.isDirectory()) { [02:01] ryah: i see.. [02:01] piscisaureus: is there no syscall on posix that combines lstat and readlink? [02:01] isaacs: hm... maybe it'd be nice to have a realpathSyncThatReturnsStatAndPath? [02:01] isaacs: but probably named something different? [02:02] ryah: realpathSync(path, { allowDirs: false }) [02:02] ryah: :) [02:02] isaacs: heh. [02:02] ryah: okay, nevermind. we can have an extra syscall [02:02] isaacs: that'd be easy, if you're srsly suggesting it. [02:03] ryah: i'm not [02:03] CIA-99: node: isaacs master * r9bed5dc / (lib/fs.js lib/module.js test/simple/test-fs-realpath.js): (log message trimmed) [02:03] CIA-99: node: Support caching for realpath, use in module load [02:03] CIA-99: node: This adds support for a cache object to be passed to the [02:03] CIA-99: node: fs.realpath and fs.realpathSync functions. The Module loader keeps an [02:03] CIA-99: node: object around which caches the resulting realpaths that it looks up in [02:03] CIA-99: node: the process of loading modules. [02:03] CIA-99: node: This means that (at least as a result of loading modules) the same files [02:03] isaacs: but i mean, there could be a "realpathStatSync" that returns the lstat object, and sticks a "path" member on it [02:03] ryah: isaacs: thanks [02:04] piscisaureus: ryah: now I need to rebase that patch again? [02:04] ryah: piscisaureus: oh yeah, please [02:04] ryah: it didn't apply when i tried [02:04] ryah: i forgot to tell you [02:05] mnot: mjr_: you about? [02:06] mjr_ has joined the channel [02:06] mnot: aha [02:06] piscisaureus: ryah: maybe it's newline issues again, try merging if it fails. https://github.com/piscisaureus/node/commit/48c866943a4cd18cf91efe609f2f943edfd1910d [02:06] jimt has joined the channel [02:06] mnot: mjr_: is offline working in node_pcap [02:06] mnot: ? [02:06] mjr_: mnot: I dunno, I've never actually used it. Someone else added that. [02:07] ryah: isaacs: oh god. [02:07] ryah: int offset = linenum == 1 ? 62 : 0; [02:07] ryah: + if (offset != 0 && NULL != getenv("NODE_USE_STRICT")) { [02:07] ryah: + offset += 14; [02:07] hobodave has joined the channel [02:07] ryah: + } [02:07] ryah: + [02:07] isaacs: :P [02:07] isaacs: yeah [02:07] isaacs: it'd be better to just put a \n at the end of the module's first line, and always subtract 1 from the line number. [02:07] kjeldahl has joined the channel [02:07] ryah: yeah, but we don't format the stack traces [02:07] ryah: unfortunately [02:07] isaacs: ryah: i did throw up a little in my mouth when i wrote that. [02:08] piscisaureus: yummy [02:08] ryah: piscisaureus: doens't merge [02:08] ryah: error: patch failed: src/platform_win32_winsock.cc:130 [02:08] chapel: who here uses linode? [02:09] piscisaureus: wtf!! [02:09] ryah: piscisaureus: just push it to github, and i'll fetch [02:09] ryah: er - tell me which branch it's in [02:09] mjr_: ryah: do you want to hear about more https server issues? [02:09] ryah: mjr_: yes [02:10] ryah: piscisaureus: nevermind, i got it [02:10] mnot: mjr_: mattstevens? Hmm. Can't see how to get it to generate events from an offline file. [02:10] piscisaureus: ryah: branch = push [02:10] piscisaureus: oh ok [02:10] wadey has joined the channel [02:10] mjr_: ryah: For some reason, not all clients can verify the server cert. Some indeed can. If I use the same cert/key files with stunnel, they all can. [02:11] mjr_: mnot: instead of openlive you need the other open. [02:11] ryah: mjr_: interesting. [02:11] mnot: mjr_: using pcap.createOfflineSession [02:11] ryah: piscisaureus: what is (HANDLE) ? [02:12] mjr_: Mobile Safari pops up this interesting dialog with all valid-looking data in it, but still it is unhappy. [02:12] NuckingFuts: Are there any IRC servers implemented in nodeJS? [02:12] ryah: piscisaureus: did you make that up or is that windows? [02:12] piscisaureus: ryah: some opaque fd that the windows api uses [02:12] mjr_: mnot: yeah, that should be it. If it doesn't work, let me know, and I'll fix it. [02:12] piscisaureus: just like SOCKET [02:12] ryah: NuckingFuts: http://tinyurl.com/ircd-js [02:12] NuckingFuts: ryah: thanks :D [02:12] piscisaureus: I didn't make it up [02:13] NuckingFuts: Oh right, It's IRC DAEMON derp [02:13] matyr_ has joined the channel [02:13] ryah: piscisaureus: it's a type? [02:13] mjr_: ryah: also, I'm using a wildcard cert, if that makes any difference. I wonder if there's some magical openssl thing you have to do in that case. [02:13] piscisaureus: yeah. [02:13] ryah: mjr_: hm, i dont think so... [02:14] piscisaureus: it's defined as (void*) I think [02:14] jchris has joined the channel [02:14] mjr_: Well, if you go here, you may or may not be able to see what I mean: [02:14] mjr_: https://test1-nr2.voxer.com/ping [02:14] ryah: piscisaureus: can you do c++ style casts? [02:14] ryah: piscisaureus: e.g. static_cast() [02:14] mnot: mjr_: doesn't appear to. I'm messaging mattstevens, will see if he has thoughts. [02:14] piscisaureus: umm. sure. [02:14] piscisaureus: I think there are a lot of C-style casts in node, especially in my code, but ok [02:15] ryah: piscisaureus: i know, im just trying to set the tone :) [02:15] ryah: i break this rule myself [02:15] ryah: piscisaureus: also [02:15] ryah: + return SetHandleInformation((HANDLE)_get_osfhandle(fd), [02:15] ryah: + HANDLE_FLAG_INHERIT, 0) != 0; [02:15] iszak: is the issue tracker even used on github. [02:16] ryah: piscisaureus: the second line should align with the first ( on the first line [02:16] beta_ has joined the channel [02:16] ryah: iszak: yes [02:16] iszak: Just the only labels are for versions < 0.1.0 [02:16] piscisaureus: ryah: ok. usually i just use double indent to wrap lines, but ok [02:16] skm has joined the channel [02:17] ryah: we don't use the labels [02:17] jonaslund: ACTION would say indent aswell [02:17] jonaslund: oh on the ( [02:17] jonaslund: nvm [02:18] sholmes: should I upgrade Node.js to the latest or should I wait? [02:18] Lorentz: Upgrade now~ [02:18] sholmes: I'm running 0.3.1 [02:19] sholmes: what's the easiest way for me to update? [02:19] cloudhead has joined the channel [02:20] sholmes: I'm confused :S [02:20] sholmes: How do I update... [02:20] skm_ has joined the channel [02:21] piscisaureus: ryah: what if the stuff doesn't fit if you align it with the first ( [02:21] Lorentz: I personally stick with tagged releases rather than git, just make uninstall and make install. [02:21] jamescarr: I install multiple versions [02:21] jamescarr: with aliases to switch the version I am running [02:21] cloudhead has joined the channel [02:22] ryah: piscisaureus: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml [02:22] ryah: piscisaureus: then you're allowed to go down to a 2 indent [02:23] chapel has joined the channel [02:23] piscisaureus: ACTION wishes tortoisediff shows columns [02:23] ryah: piscisaureus: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Function_Calls#Function_Calls [02:24] ryah: 4 space indent if you can't fit it in aligned with ( [02:24] piscisaureus: ryah: all args on a separate line is so freakin unreadable [02:24] necromancer has joined the channel [02:24] ryah: piscisaureus: i like it [02:24] benburkert has joined the channel [02:24] ryah: it's what v8 uses [02:25] vipaca_ has joined the channel [02:26] sholmes: now, with the staticProvider, how does express know whether a request is for a static file or for a routing callback? What happens if the file in the static server has the same name as one of the routes? [02:26] ChrisPartridge has joined the channel [02:26] Lorentz: Separate lines isn't so bad, better than long long args in a single long line. [02:28] Viriix has joined the channel [02:28] vipaca_: Is there a method to make node use java code? [02:29] sprout has joined the channel [02:30] vipaca_: I would like to do var ArrayList = require('java.util.ArrayList'); [02:31] chris6F has joined the channel [02:32] dominic_ has joined the channel [02:32] piscisaureus: ryah: what if static_cast fails? [02:32] vipaca has joined the channel [02:32] vipaca has joined the channel [02:33] isaacs: vipaca: no. [02:33] bingomanatee: I know this is OT but how can you clone a subdirectory of a repository? [02:34] Prometheus: using git? [02:34] Ratty_: in git? you can't [02:34] ryah: piscisaureus: ? [02:34] Prometheus: yeah [02:34] cjm has joined the channel [02:34] Prometheus: I tried that once, turns out it's no-can-do =) [02:34] piscisaureus: ryah: ..\src\node_net.cc:99:69: error: invalid static_cast from type 'long int' to type 'void*' [02:34] sholmes: "env Application environment set internally, use app.set('env') on Server#listen()" what does Server#listen() mean? [02:34] piscisaureus: that is 200% correct [02:34] bingomanatee: was afraid of that. [02:35] ryah: piscisaureus: reinterpret_cast ? [02:35] vipaca: Not sure if that last question made it through or not. But I was wondering is it possible todo var ArrayList = require('java.util.ArrayList'); [02:35] piscisaureus: oh I thought that was for objects [02:35] isaacs: vipaca: it made it. it's not possible, no. [02:36] isaacs: vipaca: no one has written a java binding, that i'm aware of [02:36] edw has joined the channel [02:36] isaacs: piscisaureus: hey, how should i walk up a path on windows? [02:36] piscisaureus: like, on the command line? [02:36] piscisaureus: cd .. [02:36] piscisaureus: :-) [02:36] isaacs: piscisaureus: since there's no path.split [02:36] piscisaureus: oh [02:37] isaacs: well, no, let's say i wanted to figure out just from a string, what all the parent dirs would be. [02:37] isaacs: is that even possible? [02:37] isaacs: i guess i could keep calling dirname() [02:37] isaacs: but doesn't hte path show up with \ instead of /? [02:37] piscisaureus: isaacs: either is correct on windows [02:37] piscisaureus: just use path.split(/\\\//) [02:38] piscisaureus: oh just use path.split(/[\\\/]/) [02:38] isaacs: hm, i see. [02:38] piscisaureus: but you need to be careful with the first elements you get out [02:38] Ratty_: If it's cygwin then it's unix style paths anyway [02:38] isaacs: but \ is not correct on posix [02:38] isaacs: Ratty_: right, but then the process.platform will be "cygwin" not "win32" [02:38] piscisaureus: isaacs: you can also try path.resolve(path, "..") to get the next parent path [02:38] isaacs: i'm ok with splitting it and doing it two ways [02:38] Ratty_: ah [02:39] Stephen has joined the channel [02:39] isaacs: i see [02:39] isaacs: looks like dirname is actually not so bad. [02:39] isaacs: since you've made that windows-friendly. [02:39] piscisaureus: yeha [02:39] isaacs: what happens when you dirname("C:")? [02:39] isaacs: just returns .? [02:39] Ratty_: python has os.sep which is the path separator, maybe you need to implement that [02:40] piscisaureus: isaacs: you get 'c:' [02:40] isaacs: Ratty_: piscisaureus has implemented things to do the same job. [02:40] piscisaureus: c: is a relative path [02:40] isaacs: piscisaureus: oh, right [02:40] isaacs: piscisaureus: what about C:\ [02:40] isaacs: what's the dirname of that? [02:40] piscisaureus: heh. also c:. wrong [02:40] isaacs: ok... [02:40] piscisaureus: what do you think it should be [02:41] isaacs: i dunno. [02:41] piscisaureus: because it should be fixed [02:41] isaacs: path.dirname("/") is "/" [02:41] piscisaureus: then I guess it should be c:\ [02:41] vipaca has joined the channel [02:41] vipaca has joined the channel [02:41] isaacs: piscisaureus: so i guess the --yeah [02:41] isaacs: what you said [02:41] piscisaureus: hmm ~ ~ [02:42] isaacs: piscisaureus: https://github.com/ry/node/issues/issue/650 [02:42] gf3 has joined the channel [02:42] davidascher has joined the channel [02:42] piscisaureus: isaacs: it is really a bug because I intended to do the right thing [02:43] isaacs: piscisaureus: so, basically, i'm implementing this algorithm: https://github.com/isaacs/node/blob/v0.5/doc/api/modules.markdown [02:43] piscisaureus: code is kinda ther [02:43] comster has joined the channel [02:43] isaacs: so, some way to split the path up into parts would be great. [02:44] isaacs: i guess, i could just on windows do p.split(/[\/\\]/) and on others do p.split(/\//) [02:44] isaacs: then take the first as given (which will be '' on unix, and C: on windows) [02:44] isaacs: assuming that it's an abs path to begin with, that should be fine. [02:44] evanmeagher has joined the channel [02:44] isaacs: and, in this case, it will already have been realpath'ed [02:45] piscisaureus: isaacs: why not [02:45] piscisaureus: var path = process.cwd(), path; [02:45] piscisaureus: do { [02:45] piscisaureus: // try [02:45] piscisaureus: var newpath = path.resolve(path, '..'); [02:45] piscisaureus: if (newpath == path) break; [02:45] piscisaureus: path = newpath; [02:45] piscisaureus: } while (true) [02:45] isaacs: piscisaureus: go to the bottom of that modules.markdown page [02:45] isaacs: https://github.com/isaacs/node/blob/v0.5/doc/api/modules.markdown [02:45] isaacs: the "NODE_MODULES_PATHS" sub [02:46] daniellindsley has joined the channel [02:46] sholmes has joined the channel [02:46] jano has joined the channel [02:46] isaacs: if i have an array of path parts, that's pretty trivial [02:46] bartt has joined the channel [02:46] piscisaureus: isaacs: so this is the resurrection of path.split? [02:46] isaacs: haha [02:46] isaacs: no, not really [02:47] piscisaureus: I'm okay but it should have sensible semantics [02:47] isaacs: just a sorta ad-hoc version. [02:47] isaacs: that only works for guaranteed absoltue paths [02:47] isaacs: if it's something that lives on require('path') then it has to be a lot more solid, and that's hard to do right (as we saw) [02:47] eee_c has joined the channel [02:48] arnorhs has joined the channel [02:48] isaacs: ok, cool, i've got a good simple strategy. thanks for talking me back from the ledge ;) [02:48] isaacs: time to catch a train. [02:49] piscisaureus: okay [02:49] piscisaureus: a train? in the US [02:49] NuckingFuts: Soo... Can I use the Crypto stuff to encrypt data and generate a public key? [02:49] bbttxu has joined the channel [02:49] piscisaureus: ACTION updating world view [02:49] opengeard has joined the channel [02:50] NuckingFuts: I don't intend to use HTTPS, just SSL to encrypt a string. [02:50] Jaye has joined the channel [02:51] sholmes: is my localhost server online when I run a node.js app? [02:51] sholmes: or is there something more I have to do in order for other computers to make requests to my server? [02:53] matyr has joined the channel [02:55] maushu: sholmes, depends on what you have on the second argument for listen. [02:56] maushu: Depending on what hostname you have there the connections will come for it. [02:56] maushu: localhost or 127.0.0.1 would make the server blind to the outside [02:57] maushu: Omitting the argument will make it work with any hostname. [02:57] Me1000 has joined the channel [02:59] mjr_: Man, this https stuff is so complicated. [02:59] piscisaureus: ryah: ping [02:59] mjr_: I should just stop trying to understand it and let someone else figure it out. [02:59] maushu: mjr_, activate SEP field! [02:59] yhahn has joined the channel [02:59] vipaca_ has joined the channel [03:00] piscisaureus: ryah: ReferenceError: cache is not defined [03:00] piscisaureus: at Object.realpathSync (fs.js:521:5) [03:00] piscisaureus: at tryFile (module.js:101:15) [03:00] piscisaureus: at Function._findPath (module.js:141:18) [03:00] piscisaureus: at Function._resolveFilename (module.js:254:25) [03:00] mjr_: Charging my SEP field generator is also somebody else's problem, and there's no tail recursion optimization. [03:00] piscisaureus: at Function._load (module.js:208:25) [03:00] piscisaureus: at Array. (module.js:358:10) [03:00] piscisaureus: at EventEmitter._tickCallback (node.js:108:26) [03:00] piscisaureus: %$^#$%^#$& [03:01] brapse has joined the channel [03:01] maushu: ACTION is ignoring what mjr_ is saying since he has his SEP field activated. [03:02] creationix: ACTION is back [03:02] NuckingFuts: piscisaureus: You seem smart at Node.JS. Can I use the Crypto module to envrypt strings, and (if so) how? [03:03] creationix: NuckingFuts: look for the crypto module in the API [03:03] creationix: err, nevermind, you saw that [03:03] creationix: but it should be documented [03:03] ryah: piscisaureus: huh? [03:03] NuckingFuts: creationix: Yeah, I just can't figure out how to use it lol [03:03] piscisaureus: ryah: it works for you [03:03] bingomanatee has joined the channel [03:03] NuckingFuts: creatDecipher, decipher.update? [03:03] piscisaureus: ? [03:03] MikhX has joined the channel [03:04] NuckingFuts: It makes no sense to me :V [03:04] ryah: piscisaureus: HEAD, yeah [03:04] piscisaureus: NuckingFuts: I have no idea, honestly [03:04] piscisaureus: I heard a rumour that crypto was going away so maybe it's best not to rely on it [03:04] NuckingFuts: ryah: Can the crypto module be used to encyprt strings via public-private key encryption? [03:05] NuckingFuts: And is what piscisaureus says true? [03:05] vipaca_: Is there a tool do something like var ArrayList = require('java.util.ArrayList'); [03:05] iszak: ryah, can we get a redirect for http://nodejs.org/docs/v0.3.x/api/ or http://nodejs.org/docs/v0.3/api/ to the latest version of that api? [03:05] sholmes has joined the channel [03:05] sholmes: hey guys. [03:07] vipaca_: one other question is there an easy way to do benchmarking? [03:07] perlmonkey2: NuckingFuts: looks like the following 6 methods are what you need: http://nodejs.org/docs/v0.3.8/api/crypto.html#crypto.createCipher [03:08] jetienne has joined the channel [03:09] jacobolus has joined the channel [03:12] NuckingFuts: perlmonkey2: Aye, but how do I generate a keypair? >_> [03:12] sholmes: would anyone recommend using Ni? [03:12] Ratty_: The Knights [03:13] NuckingFuts: Ratty_ lol [03:13] Lorentz: Wait until a new release for Ni comes out [03:13] piscisaureus: ryah: https://github.com/piscisaureus/node/compare/ry...push [03:14] sholmes: Lorentz, why? [03:15] perlmonkey2: NuckingFuts: you need openssl. Their site has great docs on how PK encryption works and how to use the tool. [03:15] Lorentz: sholmes: Try to camel case ecky ecky ecky ptang ptang zoo bowing zow sing [03:15] sholmes: wtf O.o [03:16] sholmes: Am I suppose to understand that? [03:16] broofa has joined the channel [03:16] langworthy has joined the channel [03:16] Lorentz: No, but the knights would. [03:16] NuckingFuts: perlmonkey2: Are the Node functions just wrappers around OpenSSL? [03:17] sholmes: Fhat wucking nights? [03:17] sholmes: s/nights/knights [03:17] perlmonkey2: NuckingFuts: I would assume Crypt uses the openssl api, since it requires openssl for the crypt module to work. [03:17] sholmes: what knights? [03:17] chris6F: monty python [03:19] sholmes: I only seen one thing on monty python, and that was the SPAM episode. [03:19] sholmes: So, sorry, I don't know what you mean Lorentz. :\ [03:19] sholmes: But as far as Ni goes, why shouldn't I use it? [03:19] sholmes: Is it because there's not enough development going into it anymore? [03:20] sholmes: Is it not as powerful as something like express? [03:20] NuckingFuts: Not quit what I'd meant, perlmonkey2, but I'll look anyways XD [03:21] Lorentz: sholmes: Personally not used ni myself, so can't say. I mainly use express. [03:21] Lorentz: Can't be that different, can it? [03:23] sholmes: well with Ni routes are automatically handled for you where a path such as '/hello/world/1/2/3' get's routed to the world() function exported by /controllers/hello [03:23] Me1000 has joined the channel [03:23] sholmes: and the 1 and 2 arguments are accessable within that world() function using path.split('/') [03:24] sholmes: err, no. [03:24] sholmes: the 1 and 2 can be parameters for world() [03:25] sholmes: yeah, so it kinda makes things easier. If you want to create a new function don't have to do app.get('/newfunction', require('controllers/newfunction.js')) everytime you want to add a new directory. [03:25] sholmes: idk, I'm just not feeling it with express for some reason. [03:26] creationix: sholmes: if you want something minimal try stack [03:26] sholmes: I can't follow the guide. Maybe that's because I'm new to most of this stuff (PHP guy here). [03:26] creationix: then you can build your own system [03:27] sholmes: I want something that will be able to make it easy for me to separate my application in an MVC pattern. That is, I want my controllers to controll the input from requests, views to be templated html, and models to be objects that access MySQL [03:28] sholmes: Maybe express can do this for me? [03:28] creationix: sholmes: then why use node? [03:28] creationix: just curious, not saying you shouldn't [03:28] sholmes: creationix, because it's JavaScript! [03:28] creationix: rails already does that very well [03:28] sholmes: :D [03:28] creationix: look for the mvc example in express [03:28] sholmes: I don't know ruby. Not particularly interested in learning it either. [03:28] creationix: I think it's in the examples folder [03:28] warz has joined the channel [03:28] sholmes: also, Node is asynchronous by default [03:29] creationix: yes, which makes is hard for most people, but awesome to those who know what it means [03:29] sholmes: Wouldn't a front-end developer like myself know what it means? [03:30] creationix: well, there isn't actually that much async in a browser [03:30] dominic_ has joined the channel [03:30] sholmes: sure, there's the event loop [03:30] creationix: right, it's evented all the way [03:30] creationix: but most things you do are sync [03:30] creationix: they are in-memory operations [03:31] sholmes: like alert and stuff I guess? [03:31] creationix: well, setting innerHTML is sync [03:31] creationix: writing to a file in node isn't [03:31] sholmes: ah [03:31] dominic_ has joined the channel [03:31] creationix: ajax and user interaction is evented [03:31] creationix: but that tends to be pretty shallow in complexity [03:31] sholmes: well, it's not too hard to understand if you've done addEventListener in the DOM [03:32] creationix: agreed, that's one of the reasons node uses javascript [03:32] astoon has joined the channel [03:32] creationix: the culture is a good fit for node's goals [03:33] sholmes: yeah, also, sense pretty much the primary/only langauge on the front-end is much JavaScript, it makes a perfect fit as being *the* server-side solution to web applications [03:33] creationix: sholmes: seriously, if, for some reason the existing frameworks don't work for you, try a meta framework like stack to build your own framework [03:33] creationix: it's lots of fun and not that hard [03:33] creationix: sholmes: yep [03:34] sholmes: hmm, link to stack? [03:34] creationix: https://github.com/creationix/stack [03:34] creationix: also before stack, tj and I made connect (the engine behind express) [03:34] sholmes: haha, you salesman. xP [03:34] creationix: hey, I saw a need, wrote the software, and now I share it [03:34] creationix: nothing wrong with that [03:34] creationix: ;) [03:34] matyr_ has joined the channel [03:35] sholmes: yeah, there's not much sales involved in giving something away. [03:35] creationix: https://github.com/senchalabs/connect [03:35] creationix: but Express does have an MVC example for the exact thing you're looking for [03:35] ezmobius has joined the channel [03:35] creationix: I'd try that first unless you just really enjoying making your own stuff [03:37] sholmes: hmm [03:37] sholmes: well, the problem I have with express... [03:37] aldonline_ has joined the channel [03:37] eml-mobile has joined the channel [03:37] sholmes: I don't know the syntax for the first argument in app.get/post [03:38] creationix: well, that's easily learned, it's not complicated [03:38] sivy has joined the channel [03:39] sholmes: How would I do an adding type of thing were /add/1/2 would be able to return 3? [03:39] creationix: /add/:one/:two [03:39] sholmes: now what's the : do? [03:39] creationix: and I think it puts them in req.params.one and req.params.two [03:39] creationix: variables [03:40] creationix: it's based on sinatra/rails [03:40] sholmes: what if you want to use the : sometime in your paths? [03:40] skm has joined the channel [03:40] creationix: http://www.sinatrarb.com/intro.html [03:40] creationix: sholmes: not sure [03:40] emacsen_: creationix, I've given up on wheat. I think it's just worth it to hack the example of express you have as a proto-blog and add markdown support [03:40] creationix: I think it also supports javascript regular expressions instead of parsed strings [03:41] creationix: that's how I did it back in node-router [03:41] sholmes: also, what if you want to do a sub path: /sum/1/2/3/5/8/etc... [03:41] sholmes: where it returns the sum of all the variable number of arguments [03:41] emacsen_: creationix, now if only someone would write an org-mode parser in js.... [03:41] braddunbar: i'm having some trouble with my no.de machine, anyone have experience with that? (already tried #joyent - no one there) [03:42] braddunbar: creationix: haven't tried wheat yet - love step though, wonderful piece of code [03:42] creationix: sholmes: instead of trying to find a framework to do the work for you, it's often easier to just implement it as a custom module [03:42] creationix: braddunbar: thanks, you should try stack [03:42] creationix: it's step for http servers [03:42] davidthings has joined the channel [03:42] sholmes: creationix, but why reinvent the wheel and not benifit from other's work? :P [03:43] creationix: wheat is hard to use [03:43] emacsen_: creationix, to use? no... to extend... it's messy inside [03:43] emacsen_: it's not impossible, but it's not clean [03:43] gf3 has joined the channel [03:43] emacsen_: especially for how small it is [03:43] braddunbar: creationix: huh, checking it out now [03:43] creationix: emacsen_: yeah, it was my first real node project [03:43] creationix: about 3 week of hard coding [03:44] emacsen_: creationix, ouch [03:44] losing has joined the channel [03:45] sholmes: can only one callback out of two with the same route get called in express? [03:46] creationix: good question [03:46] creationix: maybe it stacks them? [03:46] creationix: I'm not sure what all express add on top of connect [03:46] mikeal has joined the channel [03:46] arpegius has joined the channel [03:46] creationix: mikeal: evening [03:46] mikeal: heya [03:47] creationix: mikeal: how goes your world? [03:48] _dnyy has joined the channel [03:48] creationix: sweetness http://groups.google.com/group/v8-users/browse_thread/thread/dfca8638ab56d295?pli=1 [03:48] mikeal: pretty good [03:48] creationix: .bind() won't be dog slow anymore [03:48] mikeal: first few days at yammer are going well [03:49] creationix: mikeal: are you going to move? [03:49] mikeal: to SF? now ay [03:49] mikeal: er way [03:49] mikeal: i like my backyard :) [03:49] creationix: :D [03:49] mikeal: and i like riding my bike [03:49] mikeal: so it works out well :) [03:49] creationix: sounds good [03:49] sholmes: hmm, I tried out too callbacks and only the first one did anything [03:49] creationix: sholmes: sounds about right [03:50] sholmes: also the sinatrarb.com link you sent me mentioned this behavior too [03:50] arpegius has joined the channel [03:50] mikeal: creationix: do you happen to have a projector? [03:50] creationix: mikeal: nope [03:50] sholmes: creationix, about multiple path sub directories; how would you match a route with variable number of subdirectories: /path/1/2/3/etc? [03:51] creationix: sholmes: I can make a gist if you want [03:51] sholmes: sure [03:51] creationix: though, express does it with blobs [03:51] creationix: and then you just get a string with slashes in in it [03:51] sholmes: blobs? [03:52] creationix: * [03:52] creationix: I think [03:52] sholmes: * is a blob? [03:52] creationix: oh, not blobs, splats [03:52] creationix: that's what they are called [03:52] sholmes: oh [03:52] luke`_ has joined the channel [03:52] sholmes: hmm, sinatra does that too I think. [03:52] arpegius_ has joined the channel [03:52] creationix: yep [03:52] sholmes: but I'm really sketchy on my ruby syntax. :P [03:53] sholmes: would it be params.splat? [03:53] creationix: I think so [03:53] sholmes: let me test it out/play with it. [03:53] creationix: initially Express was a port of Sinatra to node [03:54] sholmes: Never heard of Sinatra before Express. But yeah, I guess I have to get familiar with Sinatra if I want to get used to Express. [03:54] blowery_off has joined the channel [03:54] creationix: I still think writing your own framework is best, but I'm probably crazy like that [03:54] creationix: and we have plenty of frameworks [03:56] sholmes: yeah, I was initially going to write NodeIgniter, but I found out about Ni, which is exactly that. [03:56] creationix: nice, I haven't heard of Ni [03:56] sholmes: CodeIgniter is a PHP framework, so I was planning on porting it. But then Ni is already a port, so I figured I could just use that. But one of the reasons why I'm hassitent to just using Ni, is because I don't know about the development on it. [03:56] creationix: I used CodeIgniter back in the day [03:56] creationix: it's the PHP equivalent to Sinatra I think [03:57] braddunbar: so, my no.de smartmachine is complaining that it "Cannot find module 'express'" although express is installed and can be required from the repl [03:57] sholmes: Yeah, I've never used CodeIgniter. Haha. I just saw some of the tutorials on the codeigniter site, and I was impressed with the simple MVC patterned it created. [03:57] Lorentz: Wonder if there's a zend framework port or something. [03:57] Remoun has joined the channel [03:57] creationix: I have the original Yii manual printed out and sitting on my shelf [03:57] arpegius has joined the channel [03:58] vipaca has joined the channel [03:58] vipaca has joined the channel [03:58] boaz_ has joined the channel [03:58] amerine has joined the channel [03:58] sholmes: well, the thing with CI is that you follow the path/routing pattern, '/controller/function/arg/arg/.,,' [03:58] creationix: sholmes: I can whip up a stack module to do that routing real easy if you want [03:59] sholmes: This is cool, but I wonder if there's more that you can get out of Express'/Sinatra's route strings. [03:59] sholmes: creationix, I already did that myself too, haha. [03:59] creationix: so make a route "/:controller/:function/*" and then in the handler delegate to the right controller's function and .apply with the splat split on "/" [04:00] sholmes: It's really easy, yes. It only took me a few hours one night. But then I didn't do too much more to it, because Ni already has everything there. [04:00] sholmes: hmm. [04:00] creationix: the think about stack, and connect/express is modules can be shared [04:00] sholmes: shared? [04:00] creationix: so I can use connect's gzip module in my stack program if I want [04:01] creationix: or my streaming static file server module can be used in express/connect [04:01] creationix: reusable middleware modules [04:01] creationix: does Ni use the same format, or is it custom? [04:02] dipser_ has joined the channel [04:02] sholmes: I think Ni actually uses Connect. :) [04:03] sholmes: https://github.com/chetan51/ni [04:03] mscdex: it's the framework that says, "Ni!" [04:03] creationix: nice [04:03] sholmes: mscdex, I don't get it. x\ [04:03] mscdex: srsly? [04:03] saikat has joined the channel [04:04] creationix: http://en.wikipedia.org/wiki/Knights_who_say_Ni [04:04] sholmes: Well, I always though Ni was pronounced like knee, but I guess I get it if you meant Ni is pronounced like Hi. [04:04] sholmes: oh, not another monty python reference... [04:05] mscdex: ;-) [04:05] mikeal: NI! NI! [04:05] sholmes: gosh, maybe I should start watching MP [04:05] sholmes: anyway. [04:06] yx has joined the channel [04:06] creationix: wow, it's even in vim [04:06] creationix: :Ni! [04:06] sholmes: Sense Express can do Ni's routing behavior, maybe that's a reason to go with Express? [04:06] sholmes: Ni is in vim? [04:06] jesusabdullah: National Instruments?! [04:06] jesusabdullah: I LOVE LabVIEW! [04:06] creationix: Express's core router is actually part of Connect [04:06] creationix: but I think express adds more on top of it [04:07] edw has joined the channel [04:07] dominic_ has joined the channel [04:07] jesusabdullah: Actually, LabVIEW kinda sucks, if only because it's really hard to shove a function into a pipe when you have to make a distinction between functions and pipes. [04:07] sholmes: creationix, why does express use express.createServer()? [04:07] sholmes: I mean [04:08] creationix: I think it's a subclass [04:08] sivy has joined the channel [04:08] sholmes: var app = require('express').createServer(); [04:08] NodeTwister has joined the channel [04:08] mikeal: creationix: trying to put together a meetup at my house this Saturday [04:08] sholmes: Why not just var app = require('express') [04:08] creationix: and connect is a "subclass" of node's http server [04:08] mikeal: can you make it? [04:08] creationix: mikeal: probably not, I'm picking up my family from the airport [04:08] mikeal: where did you sent them off to? [04:08] creationix: I'll be in the city tomorrow though [04:08] creationix: Texas! [04:09] NodeTwister: What's up nodists? [04:09] mikeal: awesome, you have any free time in the city tomorrow? [04:09] NodeTwister: ACTION is proudly in Manhattan. [04:09] sholmes: You *sent* your family off somewhere? [04:09] sholmes: ACTION is proudly in Orange County [04:09] mikeal: OAKLAND! [04:10] sholmes: right on [04:10] NodeTwister: I'd rather be in Madonna [04:10] NodeTwister: But Alphabet City is a pretty awesome part of Manhattan [04:10] sholmes: she's still alive? [04:11] creationix: mikeal: http://bit.ly/dElJpj [04:11] polotek has joined the channel [04:11] NodeTwister: sholmes: Madonna is beautiful dude [04:11] sholmes: NodeTwister, is that next to Candy Land? [04:11] NodeTwister: Anyway, back to node.js [04:11] mikeal: what time is that happening tho? [04:11] NodeTwister: No, Alphabet City is a Manhattan neighborhood [04:11] mikeal: oh, 10am [04:11] mikeal: i could do something for dinner maybe [04:11] mikeal: if you're up for it [04:11] mikeal: i'm done with meetings around 5 [04:12] Aikar: how come fs.readFile('~/.bashrc', doesn't work... ? [04:12] Aikar: cant use tilda? [04:12] NodeTwister: Is there a way to call a function and have that function print something out to the browser without having to pass the response variable to the function? [04:12] creationix: mikeal: I'm going to the developer event after that too [04:12] NodeTwister: This is really bugging me [04:12] creationix: not sure when it gets out [04:12] sholmes: so the best Sinatra style routing can do is splat strings? [04:12] sholmes: req.params.splat is undefined when I try access /hi with the route /* [04:13] amerine_ has joined the channel [04:13] NodeTwister: Is response.write() the *only* way to send stuff to the browser? [04:13] yhahn: Aikar: you need to use path.resolve (0.3) i don't believe you can use ~ in (0.2) [04:13] mikeal: wait [04:13] sholmes: in fact, there's no mention of splat in req when I inspect it [04:13] mikeal: there is another event after that event? [04:14] techwraith has joined the channel [04:14] sholmes: NodeTwister, that and response.end('stuff') AFAIK [04:14] NodeTwister: Damn [04:14] polotek: NodeTwister: not sure what you're getting at [04:14] sholmes: Why, what's wrong with that? [04:14] polotek: what problem are you trying to solve [04:14] NodeTwister: I'm tired of passing response to a function just so I can print form it [04:14] NodeTwister: *print from inside the function [04:15] sholmes: by print you mean res.write? [04:15] NodeTwister: yes [04:15] sholmes: hmm, what if you were to res.write(myFunction()); then just return what you want from myFunction? [04:15] polotek: NodeTwister: you want an automatic output type of thing like PHP? No deal ;) [04:16] sholmes: polotek, what are you proposing? [04:16] NodeTwister: Can I make response a global? [04:17] polotek: nothing. just being facetious. I'm still not sure why what NodeTwister is frustrated [04:17] paulrobinson has joined the channel [04:17] polotek: NodeTwister: no [04:17] sholmes: NodeTwister, maybe you want a templating engine of somekind? [04:17] polotek: there is one res object per request [04:17] polotek: and it incapsulates the connection for that request [04:17] paulrobinson has left the channel [04:18] sholmes: polotek, do you use express? [04:18] polotek: if you're building up a non-trivial response, you should almost certainly be using a templating engine [04:19] NodeTwister: Such as? [04:19] ryah: NodeTwister: jade [04:19] ryah: NodeTwister: http://jade-lang.com/ [04:19] Lorentz: What was that templating engine thing that basically had inline nodejs? [04:20] Lorentz: Sort of how php does things, embedded into html [04:20] NodeTwister: js embed? [04:20] ryah: Lorentz: http://www.jspp.io/ [04:21] Lorentz: ryah: Thanks [04:21] NodeTwister: And it's the only thing PHP ever got fat [04:21] NodeTwister: *right [04:21] Lorentz: I honestly can't read jade template files. If I'm doing web dev, I have to see the html :\ [04:21] ryah: ACTION shakes fucking openssl BIOs violently [04:22] NodeTwister: Embeded code in HTML is the only good idea from PHP (and it came from JSP) [04:23] NodeTwister: JSP I have to admit is pretty awesome :) [04:23] btipling has joined the channel [04:25] riven has joined the channel [04:25] riven has joined the channel [04:25] boaz__ has joined the channel [04:25] yozgrahame has joined the channel [04:25] Roelven_ has joined the channel [04:25] piscisaureus has joined the channel [04:25] techwraith has joined the channel [04:25] amerine has joined the channel [04:25] polotek has joined the channel [04:25] dominic_ has joined the channel [04:25] edw has joined the channel [04:25] saikat has joined the channel [04:25] boaz_ has joined the channel [04:25] blowery has joined the channel [04:25] pifantastic has joined the channel [04:25] gf3 has joined the channel [04:25] aldonline has joined the channel [04:25] ezmobius has joined the channel [04:25] warz has joined the channel [04:25] jacobolus has joined the channel [04:25] sholmes has joined the channel [04:25] brapse has joined the channel [04:25] yhahn has joined the channel [04:25] Jaye has joined the channel [04:25] opengeard has joined the channel [04:25] bbttxu has joined the channel [04:25] arnorhs has joined the channel [04:25] eee_c has joined the channel [04:25] comster has joined the channel [04:25] Guest39400 has joined the channel [04:25] cjm has joined the channel [04:25] ChrisPartridge has joined the channel [04:25] cloudhead has joined the channel [04:25] beta_ has joined the channel [04:25] kjeldahl has joined the channel [04:25] jimt has joined the channel [04:25] hornairs has joined the channel [04:25] zentoooo has joined the channel [04:25] kawaz_wo_ has joined the channel [04:25] emacsen_ has joined the channel [04:25] Aria has joined the channel [04:25] prettyrobots has joined the channel [04:25] mattly has joined the channel [04:25] perlmonkey2 has joined the channel [04:25] aro has joined the channel [04:25] Coal has joined the channel [04:25] galaxywatcher has joined the channel [04:25] tvon has joined the channel [04:25] Vertice has joined the channel [04:25] vilhonen has joined the channel [04:25] sonnym has joined the channel [04:25] cilantro has joined the channel [04:25] Epeli has joined the channel [04:25] pauls has joined the channel [04:25] Twelve-60 has joined the channel [04:25] nonnikcam has joined the channel [04:25] Evet has joined the channel [04:25] creationix has joined the channel [04:25] Ond has joined the channel [04:25] mrtrosen has joined the channel [04:25] mayfield_ has joined the channel [04:25] w0rse has joined the channel [04:25] pieterv has joined the channel [04:25] disq has joined the channel [04:25] aklt has joined the channel [04:25] wtcross has joined the channel [04:25] unfo- has joined the channel [04:25] FireFly|n900 has joined the channel [04:25] agnat has joined the channel [04:25] rwaldron has joined the channel [04:25] Utkarsh has joined the channel [04:25] tfe_ has joined the channel [04:25] jpick has joined the channel [04:25] jonaslund has joined the channel [04:25] aurynn has joined the channel [04:25] here has joined the channel [04:25] wilmoore has joined the channel [04:25] slaz has joined the channel [04:25] stagas has joined the channel [04:25] lukegalea has joined the channel [04:25] devdazed has joined the channel [04:25] pt_tr has joined the channel [04:25] fairwinds has joined the channel [04:25] zorzar_ has joined the channel [04:25] webben has joined the channel [04:25] muk_mb has joined the channel [04:25] liquidproof has joined the channel [04:25] mysterion` has joined the channel [04:25] Druid_ has joined the channel [04:25] nolan_d has joined the channel [04:25] beawesomeinstead has joined the channel [04:25] gstrock_ has joined the channel [04:25] Silks has joined the channel [04:25] cronopio has joined the channel [04:25] hswe_ has joined the channel [04:25] jeromegn has joined the channel [04:25] phiggins has joined the channel [04:25] RushPL has joined the channel [04:25] desaiu has joined the channel [04:25] gstrock has joined the channel [04:25] forzan has joined the channel [04:25] prank has joined the channel [04:25] phed__ has joined the channel [04:25] pedrobelo has joined the channel [04:25] skyler_brungardt has joined the channel [04:25] tk has joined the channel [04:25] tanepiper has joined the channel [04:25] Alfie-- has joined the channel [04:25] neshaug has joined the channel [04:25] SvenDowideit has joined the channel [04:25] dspree has joined the channel [04:25] bwinton has joined the channel [04:25] Sami_ZzZ has joined the channel [04:25] Bosmon has joined the channel [04:25] killfill has joined the channel [04:25] hdon has joined the channel [04:25] opus_ has joined the channel [04:25] Ratty_ has joined the channel [04:25] mfernest has joined the channel [04:25] rbranson has joined the channel [04:25] AAA_awright has joined the channel [04:25] gbot2 has joined the channel [04:25] node-faq has joined the channel [04:25] viirya has joined the channel [04:25] rphillips has joined the channel [04:25] cha0s has joined the channel [04:25] crodas has joined the channel [04:25] mdoan has joined the channel [04:25] Crshman has joined the channel [04:25] cainus has joined the channel [04:25] mmso has joined the channel [04:25] PyroPeter has joined the channel [04:25] hosh_office has joined the channel [04:25] jdub has joined the channel [04:25] mitchell`off has joined the channel [04:25] Draggor has joined the channel [04:25] slloyd has joined the channel [04:25] zz_raja has joined the channel [04:25] halfhalo has joined the channel [04:25] CIA-99 has joined the channel [04:25] beppu has joined the channel [04:25] geoffeg has joined the channel [04:25] kawaz_home has joined the channel [04:25] meder has joined the channel [04:25] Noya_ has joined the channel [04:25] lightharut has joined the channel [04:25] EGreg_ has joined the channel [04:25] DoubleV has joined the channel [04:25] bruse has joined the channel [04:25] robert_c|away has joined the channel [04:25] ajpiano has joined the channel [04:25] v8bot has joined the channel [04:25] m3nt0r^aw has joined the channel [04:25] caligula has joined the channel [04:25] flukes1 has joined the channel [04:25] tylergillies has joined the channel [04:25] devinus has joined the channel [04:25] superdug has joined the channel [04:25] martigam has joined the channel [04:25] ddollar has joined the channel [04:25] sanslocust has joined the channel [04:25] mediacoder has joined the channel [04:25] moneal has joined the channel [04:25] tomaw has joined the channel [04:25] Kami_ has joined the channel [04:25] matti has joined the channel [04:25] orospakr has joined the channel [04:25] tux21b has joined the channel [04:25] maru_cc_ has joined the channel [04:25] eirikur has joined the channel [04:25] cce has joined the channel [04:25] Aikar has joined the channel [04:25] darklajid has joined the channel [04:25] bluegene has joined the channel [04:25] pekim has joined the channel [04:25] franck34 has joined the channel [04:25] drudge has joined the channel [04:25] janne has joined the channel [04:25] olegp has joined the channel [04:25] jshaw has joined the channel [04:25] cnu has joined the channel [04:25] zum has joined the channel [04:25] persson has joined the channel [04:25] aakour has joined the channel [04:25] morgabra has joined the channel [04:25] r00s has joined the channel [04:25] papyromancer has joined the channel [04:25] brainproxy has joined the channel [04:25] [tm] has joined the channel [04:25] augustl has joined the channel [04:25] mojombo_ has joined the channel [04:25] Nacho__ has joined the channel [04:25] Sembiance has joined the channel [04:25] mif86 has joined the channel [04:25] brianc has joined the channel [04:25] sucaba-524 has joined the channel [04:25] joeshaw___ has joined the channel [04:25] pquerna has joined the channel [04:25] inarru has joined the channel [04:25] DoNaLd` has joined the channel [04:25] thedjinn has joined the channel [04:25] Hadaka has joined the channel [04:25] Pilate has joined the channel [04:25] MrNibbles has joined the channel [04:25] hober has joined the channel [04:25] cyraxx has joined the channel [04:25] tmzt has joined the channel [04:25] guybrush has joined the channel [04:25] coffeecup has joined the channel [04:25] polotek: what the hell just happened? [04:25] sholmes: IT'S ARMAGEDDON!!! [04:25] sholmes: is everyone still here? [04:25] sholmes: what was that all about? [04:25] polotek: I'm here [04:25] sholmes: I have no idea [04:25] indexzero has joined the channel [04:25] indexzero has joined the channel [04:26] sstephenson has joined the channel [04:26] mrkurt has joined the channel [04:26] ChrisPartridge: net split [04:26] sholmes: this is peculiar [04:26] davidascher has joined the channel [04:26] kjeldahl has joined the channel [04:26] ChrisPartridge: http://en.wikipedia.org/wiki/Netsplit [04:26] sholmes: this is like one of those bad post-apocolyptic movies... [04:26] sholmes: is it over? [04:26] polotek: interesting [04:27] polotek: I guess I knew stuff like that happened. just didn't think it would manifest like that [04:27] polotek: a bit dramatic [04:27] NodeTwister: Node.js is good for making a Madonna fan site :-) [04:27] sholmes: I'll say [04:27] NodeTwister: ACTION is making the best Madonna fan site ever in node.js [04:27] cronopio: wtf!? [04:27] sholmes: I'm shitting myself. O.e [04:27] sholmes: Wha, you're not the developer for Madonna's Node website are you? [04:27] polotek: sholmes: what irc client are you using? [04:28] sholmes: X-Chat [04:28] PyroPeter has joined the channel [04:28] NodeTwister: Yes I am [04:28] sholmes: Wait, you said fansite. [04:28] NodeTwister: *Official* fan site [04:28] btipling has joined the channel [04:28] sholmes: No way. Congrats man! [04:28] sholmes: That's pretty cool. [04:29] jetienne: http://www.jspp.io/ is converting the usual <" [04:29] polotek: googled for node.js + madonna [04:29] NodeTwister: It is--especially since it's for Madonna [04:29] jetienne_ has joined the channel [04:29] polotek: surprisingly more there than I thought [04:29] temp01 has joined the channel [04:29] cognominal has joined the channel [04:29] saikat has joined the channel [04:29] opengeard has joined the channel [04:29] comster has joined the channel [04:29] mayfield_ has joined the channel [04:29] pieterv has joined the channel [04:29] disq has joined the channel [04:29] rwaldron has joined the channel [04:29] jpick has joined the channel [04:29] aurynn has joined the channel [04:29] opus_ has joined the channel [04:29] mfernest has joined the channel [04:29] rphillips has joined the channel [04:29] mmso has joined the channel [04:29] cnu has joined the channel [04:29] cronopio: NodeTwister: wow [04:29] NodeTwister: ACTION loves Madonna very much. [04:29] sholmes: so I was saying though. Can I someone confirm that Node does/doesn't use splats like Sinatra? [04:30] aurynn: is there an npm search? [04:30] polotek: sholmes: better to compare sinatra to express [04:30] polotek: node is much lower level than that [04:30] Lorentz: aurynn: npm list | grep ? [04:30] sholmes: NodeTwister, so official fansite is basically her official site or is it her official "fan site"? [04:30] Blink7 has joined the channel [04:30] Lorentz: That's what I do, for now. [04:30] aurynn: ah [04:30] polotek: I think express supports regexes [04:30] polotek: don't know about splats [04:30] sholmes: polotek, sorry that's what I meant. :P [04:30] Lorentz: There's also npm search itself. [04:30] NodeTwister: sholmes: Official fanclub. [04:30] vipaca has joined the channel [04:30] vipaca has joined the channel [04:31] sholmes: polotek, I meant Express when I said Node [04:31] Lorentz: Not sure what it does. [04:31] polotek: http://search.npmjs.org/ [04:31] mscdex: SubStack: what do you think about adding in a condition to the while loop in loop() that checks end AND if offset >= buffer.length ? [04:31] polotek: or "npm ls foo" on the command line [04:31] NodeTwister: As in, endorsed by Madonna's company. [04:31] NodeTwister: (And property of) [04:31] polotek: Lorentz: you don't have to grep [04:32] polotek: npm list takes keywords to search on [04:32] Lorentz: polotek: It's a habit. [04:32] sholmes: NodeTwister, they're paying you right? [04:32] polotek: ACTION was asking that question to himself [04:32] NodeTwister: sholmes: Of course. [04:32] pquerna: but but but, i want multiple headers [04:33] NodeTwister: ACTION is making $600 a day [04:33] sholmes: NodeTwister, are you single handingly doing it, or are you working with a team? [04:33] mscdex: SubStack: i've got a binary file that only has key:length:data blocks, so i need to keep looping while there is still blocks to be retrieved, but i won't know when i've reached the end of the buffer [04:33] NodeTwister: And spending it all on the Manhattan amenities [04:33] sholmes: NodeTwister: lucky [04:33] polotek: NodeTwister: how did you get them to agree to use node? [04:33] NodeTwister: sholmes: I have people under me to help [04:33] sholmes: I made $500, in two weeks. :\ [04:34] Lorentz: Never had a client asking to work in node yet :( [04:34] NodeTwister: polotek: They had problems in the past scaling a site that was LAMP [04:34] sholmes: Did they ask you to work in Node NodeTwister, or did you propose it? [04:34] creationix: pquerna: sshhh [04:34] NodeTwister: Well, you have to really sell node/nginx to them. [04:34] Lorentz: Sigh, only if I could serve websockets through nginx. [04:35] NodeTwister: I proposed it sholmes. [04:35] Aria: write a module for it, Lorentz! [04:35] sholmes: Yeah, I wouldn't have thought Madonna's crew would have known a lick about Node. [04:35] Lorentz: Aria: It's something about nginx having support only for http 1.0, rather than 1.1 needed for websockets. [04:35] NodeTwister: And now Madonna may be the first to have a node.js site [04:35] ryah: pquerna: is it possible that BIO_read and SSL_read both return WANT_READ [04:35] ryah: pquerna: :/ [04:35] Lorentz: Rather than an issue with node or socketio or anything. [04:36] sholmes: Well, there are other sites already using Node.js. But she might be the first "out there" site. [04:36] NodeTwister: sholmes: They are surprisingly forward-thinking about things like async I/O vs. threadpools [04:36] ryah: pquerna: also are BIO_ errors handled by SSL_error ? :) [04:36] sholmes: I think I'm starting to love Madonna now. :P [04:36] NodeTwister: But to be sure, the focus is more on stuff like CSS [04:36] polotek: I think it would be cool to get info from a pretty straight up content time [04:36] polotek: just massive numbers [04:36] NodeTwister: sholmes: I always have :) [04:36] polotek: see what node can handle [04:37] sholmes: NodeTwister what framework are you using? [04:37] sholmes: Express? [04:37] NodeTwister: sholmes: Straight node.js with some custom modules [04:37] Lorentz: Aria: I guess technically it'd be writing a module. Just, for nginx, not nodejs. [04:38] NodeTwister: Static stuff is of course served via nginx directly [04:38] sholmes: Oh so it's not 100% node? [04:38] Aria: Right. I meant for nginx ;-) [04:38] NodeTwister: sholmes: Stuff like CSS files are served by nginx, so no [04:39] NodeTwister: Okay, I have to vogue [04:39] sholmes: NodeTwister, interesting. Is there any reason why you chose to do that an not just some static provider middleware? [04:39] NodeTwister: sholmes: To use node.js in a big project, really. [04:40] NodeTwister: And we're doing some interesting things I can't talk about yet :-) [04:40] ryah: and does SSL_get_error apply to fucking BIO_ functions? [04:40] ryah: gah [04:40] sholmes: NodeTwister, that's what I'm going to do. :\ [04:40] saschagehlich has joined the channel [04:40] NodeTwister: Anyway gtg vogue, bye [04:40] polotek: sholmes: better to let nginx handle static stuff [04:40] pquerna: ryah: SSL_get_error doesn't (?) [04:40] clarkfischer has joined the channel [04:40] sholmes: polotek, why? [04:40] vipaca: any guides for tuning a sever for node deployment i.e. upping file descriptors [04:40] polotek: let the node process focus on dynamic stuff [04:40] sholmes: Cannot Node do it all? [04:40] mscdex: vipaca: ulimit [04:41] polotek: sholmes: sure it can, but IMO it's not the best use of node resources to just serve static stuff [04:41] Vekz has joined the channel [04:41] polotek: plus it's not quite as efficient as something like nginx [04:41] kiddphunk has joined the channel [04:41] sholmes: polotek, well serve static stuff, but also do dynamic stuff of course [04:41] polotek: and you probably want nginx in front of node anyway since it's still pretty raw [04:42] polotek: give you better consistency on your public facing side [04:42] sholmes: what do you mean by raw? [04:42] polotek: as in new and not fully battle tested [04:42] ryah: pquerna: ah, that's my problem [04:42] sivy has joined the channel [04:42] polotek: you want a fallback if node falls over [04:43] sholmes: polotek, falls over as in the project becomes no more? [04:43] polotek: you can have nginx server your nice "technical difficulties" pages and such [04:43] polotek: plus you can have nginx load balance across several nodes [04:43] matyr has joined the channel [04:43] polotek: falls over as in you hit some obscure bug or don't handle some exception properly [04:43] jakehow has joined the channel [04:44] pquerna: ryah: http://linux.die.net/man/3/bio_should_retry [04:44] sholmes: but I could run into a bug the same way with dynamic stuff handled in Node [04:44] polotek: mscdex: someone should write a real blog post about that [04:44] polotek: I'd like to see more details and proven configurations [04:44] mscdex: huh? [04:44] pquerna: SSL BIOs are the only current exception to this rule:.... [04:44] mscdex: oh, ulimit? [04:44] vipaca: mscdex: Is there a way to specify epoll, kqueue [04:44] polotek: about configuring a server for production node [04:44] pquerna: ACTION head explode [04:45] sholmes: What if you where just servering templates, CSS, and JS files from your Node static provider? [04:45] mscdex: vipaca: it automatically choses the best method depending on the platform you're on [04:45] polotek: is anyone else actively ignoring the conversation between ryah and pquerna? [04:45] polotek: it's making my head hurt [04:45] sholmes: Then most of the stuff is done throught realtime communication between the client and server. [04:46] sholmes: ACTION raises hand [04:49] sholmes: NodeTwister: what language/framework are you using on the nginx side? [04:49] superjudge has joined the channel [04:49] polotek: sholmes: nginx doesn't do dynamic scripting [04:50] polotek: well technically it can, sort of [04:50] polotek: but it's mostly just a static web serving engine [04:50] sholmes: well what's the point of a static file server that doesn't do any kind of templating? [04:50] polotek: if you're doing templating it's not "static" [04:51] polotek: "dynamic" scripting includes templating [04:51] Lorentz: apache lets you do perl magic in the configs. [04:51] ryah: god. [04:51] polotek: at least in my vocabulary [04:51] sholmes: so, he's only using it for CSS and JS file serving? [04:51] ryah: ACTION stabs himself [04:51] Lorentz: Yes, right in the configs. [04:51] Aria: BIO is that fun, eh, ryah? [04:51] ryah: ACTION stabs openssl first then stabs self. [04:51] Aria: ACTION joins in the openssl stabbery. [04:51] polotek: ryah: that's right, take them down with you [04:51] jetienne_: with dox, is it possible to customize the generated html ? [04:52] sholmes: polotek: well what's the point of having a nginx server if you are more likely to be serving "dynamic" files? [04:52] pquerna: more minions for selene when i take a sabbatical. [04:52] polotek: sholmes: with a high traffic content site, it's really important to make serving static files as efficient as possible [04:52] polotek: nginx is way better for that [04:52] polotek: it's tailored for it [04:52] polotek: when you need things to be dynamic, you need a scripting language [04:52] polotek: so you pass the request to node [04:53] polotek: neither is "more likely" [04:53] sholmes: Surely Node couldn't be that bad? [04:53] polotek: they're both part of the site experience [04:53] polotek: but you pick the best tool for the job [04:53] Aria: Or it's important to be able to increase the resources serving bottleneck parts. [04:53] sholmes: Node could do the static providing if I wanted right, perfectly fine? [04:53] Aria: Squeezing 10% extra out won't save you jack if your use doubles. [04:53] Aria: But adding a second server does that nicely. [04:54] polotek: sholmes: yeah, lots of people run everything from node [04:54] Lorentz: I also like doing reverse proxy with nginx, since some stuff I serve are done in php and ruby and etc, but still want to pass it through port 80. [04:54] polotek: but like I said, I don't know anyone doing a traditional high traffic content site with it [04:54] sholmes: hell, Express/Connect comes with a staticProvider middleware [04:54] hosh_office: sholmes: you don't have to front with Nginx if you don't want to. What you get out of it are things like load balancing, and multi-homing built in [04:54] Aria: multi-homing, eh? [04:54] sholmes: I'm not familiar with load balancing or multi-homing. [04:55] polotek: Aria: virtual hosts [04:55] Aria: Oh. That's not multi-homing. [04:55] hosh_office: sholmes: suppose you want two different node apps running on the same server, and you only have one ip but different web sites [04:55] sholmes: You see, I'm came from a complete PHP background, hardly even delt with apache aside from .htaccess files. [04:55] Lorentz: virtual hosts aren't quite multihoming. [04:55] hosh_office: Aria: multi-homing is the old term. I don't know why I forgot to use "virtual server" these days [04:55] sholmes: hosh_office, listening [04:55] Aria: Multi-homing means something else entirely. Like "having two ISPs" else entirely. [04:56] polotek: I'm not familiar with the term multi-homing either [04:56] polotek: I kind of assumed from context [04:56] saikat has left the channel [04:56] astoon has joined the channel [04:56] Aria: Like "use two pipes efficiently" differently. [04:56] sholmes: hosh_office, what you're saying is you can host multiple sites on the same server? [04:56] hosh_office: Aria: ok sure whatever [04:56] saikat has joined the channel [04:56] hosh_office: sholmes: you can put the two apps into the same node process if you want to [04:56] ryah: oh man. [04:57] hosh_office: sholmes: or you separate them out and front both with nginx and use nginx to figure out who to proxy too [04:57] sholmes: why couldn't you juse run two processes? [04:57] Aria: you could. [04:57] hosh_office: sholmes: ok sure, if you have two different IP addresses [04:57] sholmes: hmm, couldn't you use a node process to be a proxy? [04:57] ryah: [0x20ad3f0] BIO: BIO_read:EncOut want read [04:57] ryah: yes! [04:57] Aria: You could. Then you have three processes! [04:57] hosh_office: sholmes: uh, yeah you can use a third node.js to proxy it :-P [04:57] killfill has joined the channel [04:58] hosh_office: There's just tools man [04:58] polotek: I want the whole stack to be node [04:58] ryah: (that 'yes!' was sarcastic) [04:58] hosh_office: polotek: well good for you [04:58] polotek: one configured for static serving, load balancing and proxying [04:58] sholmes: hosh_office: I see. [04:58] polotek: serving to several others [04:58] sholmes: polotek: me too! [04:58] sholmes: I mean why not? [04:58] polotek: a couple application servers [04:58] hosh_office: Asymmetric fast transients [04:58] polotek: a background job queue process [04:58] sholmes: I believe Node came up close to nginx when it came to proformance [04:58] sholmes: anyway [04:58] Me1000 has joined the channel [04:59] polotek: a websocket process [04:59] sholmes: have to head home from startbucks, they're closing. eek [04:59] dominic__ has joined the channel [04:59] sholmes: be back soon [04:59] ryah: [0x20ad3f0] SSL: SSL_read:ClearOut want read [04:59] ryah: [0x20ad3f0] BIO: BIO_read:EncOut want read [04:59] polotek: all communicating iwth various datastores [04:59] ryah: god. [04:59] polotek: and each other through message passing [04:59] ryah: does it want to handshake again? [04:59] hosh_office: Sure. How does that help you get your app out and working? [04:59] polotek: ryah: try rebooting it [04:59] polotek: >_> [04:59] creationix: sholmes: when you get back, I have an optimized MVC middleware for you [05:00] polotek: creationix: what's happening with the headers? [05:00] pquerna: ryah: what do you mean handshake again? [05:00] hosh_office: polotek: my point is that you can't just look at evented I/O, you have to look at evented people I/O too [05:01] pquerna: ryah: but either way, you can see if it was in wireshark / ssldump [05:01] mscdex: SubStack: scratch that, i found out i can just check a vars value for null after trying to read in a value to detect end of file [05:01] creationix: polotek: I think I'm going to go with a simple patch for now [05:01] creationix: I just learned node already has some support for multiple headers [05:01] creationix: https://github.com/ry/node/blob/master/lib/http.js#L454 [05:01] creationix: that changes my objections to pushing a change by tomorrow [05:02] ryah: pquerna: both reads want to read again [05:02] polotek: yeah I knew that the parser supported them okay [05:02] Jaye: polotek: I have built have of that, its pretty easy with node <3, dont own the license/IP due to it being for work though :(, most annoying thing is websockets dont like being redirected [05:02] rbranson has joined the channel [05:02] ryah: and the socket isn't providing more data... [05:02] Jaye: *half [05:02] polotek: I thought we were saying we didn't want to push this api change unless it also supported multiple headers [05:02] polotek: more explicitly [05:02] creationix: polotek: right, but node does more than I thought already [05:02] chapel: hmm [05:03] creationix: so I'm fine with a small change now and a better one later [05:03] pquerna: ryah: yeah. dunno why it would do that, but... all seems possible. [05:03] polotek: \o/ [05:03] ryah: pquerna: if both SSL_read and BIO_read want read, and chrome isn't sending more data [05:03] chapel: hmm [05:03] polotek: I so rarely convince people of things when it comes to node patches [05:03] ryah: pquerna: what would be your action? [05:04] ryah: next tick and try again? :P [05:04] jetienne_: ryah: find somebody who know the lib to give info ? [05:04] cjm has joined the channel [05:04] polotek: jetienne_: openssl is dark voodoo magic. probably not coded by humans [05:05] jetienne_: eb2._global = window || global || console.assert(false); <- is that ok to discover the global name space ? this is for a js library [05:05] jetienne_: polotek: the code is old so it ages badly. common in computer stuff [05:06] polotek: jetienne_: you need to use typeof [05:06] pquerna: ryah: well, why would chrome not send anymore data? socket closed? [05:06] polotek: if window isn't defined you'll get an error [05:06] Guest91152 has joined the channel [05:06] pquerna: ryah: i guess i'd look at wireshark / the ssl proto going over the wire if it was a chrome specific thing [05:07] jetienne_: polotek: ok thx [05:08] sholmes has joined the channel [05:08] ceej_: what's better for channel based real time app... socket.io and redis or faye? [05:09] sholmes: back [05:09] creationix: sholmes: ok, I'm working through the bugs, but here is the general idea [05:09] aldonline has joined the channel [05:09] sholmes: ACTION listening :D [05:09] polotek: ceej_: I've only used socket.io and it's pretty popular [05:10] polotek: but I was interested in trying faye for something [05:10] creationix: sholmes: https://gist.github.com/817917 [05:10] polotek: if you try it, share your experience [05:10] ceej_: ye I've used both just not sure.... [05:10] cronopio: ceej_: i use faye, and always work great!! [05:10] cronopio: ceej_: and is easy to use [05:10] ceej_: I built a real time game...socket.io seemed faster but it's only going to be used for a b2b app [05:11] sholmes: creationix: and this just does what Ni does? [05:11] creationix: no idea what Ni does [05:11] creationix: but this maps /math/add/1/2 to math.add(req, res, next, 1, 2) [05:11] sholmes: it does what CodeIgniter does, if you can remember how that worked. [05:12] jetienne_: polotek: eb2._global = typeof window2 !== "undefined" ? window2 : typeof global !== "undefined" ? global : console.assert(false); <- less clean :( [05:12] sholmes: creationix: that's an interesting concept [05:12] creationix: I know the general pattern, but any request handler in node needs req and res (and next if it's middleware) [05:13] creationix: and the "controllers" and be in their own files that are lazy loaded [05:13] m0 has joined the channel [05:13] edw has joined the channel [05:13] polotek: jetienne_: this is a hack to try and merge browser and server environments anyway [05:13] polotek: I wouldn't worry too much about how clean it is [05:13] m0: Hello everyone, I am wondering, who is running a node 25/7? [05:13] sholmes: creationix, well, at least with the NodeIginiter I was making, I just applied an object to the controller function so that this.res and this.req within the function will be the objects [05:13] m0: 24* [05:13] polotek: that looks okay to me by the way [05:13] jetienne_: polotek: ok [05:13] polotek: but there is another wrinkle. at least in node [05:14] sholmes: come to think about it, that might be an interesting way to implement connect/stack [05:14] polotek: node also has the capability to run each module in it's own separate context [05:14] m0: I am trying to run a node on my dedicated box, and it errors out http://pastebin.com/HERrwuE7 (I have no idea when it errors out) I check back the other day [05:14] polotek: in which case each module has it's own separate global object [05:14] hosh_work has joined the channel [05:14] polotek: I've never played with this and I don't think it's a commonly used feature [05:14] polotek: but you should probably be aware [05:14] matyr_ has joined the channel [05:15] sholmes: polotek, that's awesome! [05:15] sholmes: I was proposing an imports object for modules, but this definately will do. How does it work? [05:15] polotek: m0 [05:15] polotek: m0: you need to catch errors [05:16] jetienne_: polotek: yes i use brequire to support require() in browser [05:16] m0: polotek: catch where? I have no idea where to catch [05:16] polotek: with either req.on('error'...) [05:16] polotek: or process.on('UncaughtException'...) [05:16] sholmes: creationix: would /math/list/1/2 map to math.lsit(req,res,next,1,2)? [05:17] creationix: sholmes: ok, bugs ironed out, not it's runnable [05:17] tvon has joined the channel [05:17] m0: DO error messages bubble up?/ [05:17] polotek: sholmes: set environment variable NODE_MODULE_CONTEXTS [05:18] Yuffster_work has joined the channel [05:18] sholmes: polotek, hmm. seems a bit hacky. [05:18] polotek: m0 all errors bubble up [05:18] polotek: if it reaches the top of the stack uncaught, node will crash [05:18] polotek: well it's print and exit [05:18] tmpvar: goodnight folks, ryah good luck with the ssl stuff [05:19] creationix: sholmes: ok, I added sample output [05:19] sholmes: let me upload my script [05:19] creationix: that should explain it [05:19] sholmes: how do I upload scripts to github like that haha [05:19] sholmes: maybe is should just use paste bin. [05:19] creationix: gist.github.com [05:19] Solsys has joined the channel [05:19] creationix: it's like pasebin [05:20] creationix: but also if a full-fledged git repo [05:21] sholmes: creationix, is there a way to remove them after I pasted it? [05:21] sholmes: here it is btw https://gist.github.com/817929 [05:21] creationix: sholmes: you might be able to delete it [05:21] sholmes: I'm really a neat freak! xP [05:21] matyr has joined the channel [05:22] creationix: sholmes: that works, but there is some sync io in there [05:23] creationix: so "index" is the default controller name? [05:23] creationix: and "index" is also the default method name [05:23] sholmes: yes [05:23] sholmes: it is [05:23] sholmes: they are [05:23] creationix: ok, yeah, this can be made into a nice middleware [05:24] creationix: sholmes: how much longer will you be up tonight? [05:24] creationix: I need to get something else done before my friends on the east coast conk out [05:24] sholmes: haha, probably all night. maybe 12:00 [05:24] sholmes: it's 9:30 now [05:24] creationix: pacific? [05:24] sholmes: yup [05:24] creationix: cool [05:24] sholmes: same? [05:24] creationix: yeah, I'm in Sunnyvale [05:24] m0: polotek: it does listen for errors github (http://goo.gl/ukcTs [05:24] CIA-99: node: Ryan Dahl master * r519dc2c / (src/node_crypto.cc src/node_crypto.h): tls: split bio errors from ssl errors - http://bit.ly/fM2Mi7 [05:25] CIA-99: node: Bert Belder master * r36846f9 / (5 files): Windows: child process fixes - http://bit.ly/i0VyV1 [05:25] sholmes: right on! [05:25] CIA-99: node: Bert Belder master * r8d70294 / lib/fs.js : Fix fs.realpathSync on windows - http://bit.ly/h6tPXH [05:25] m0: I guess it will be difficult to figure out where it crashes. [05:25] sholmes: before you go off, what did you mean about the io? [05:25] techwraith: Are there any really simple authentication modules for express out there? [05:25] polotek: ryah: nice [05:25] creationix: sholmes: just a few parts of your code that won't scale well [05:25] creationix: like existsSync [05:25] creationix: and inline requires [05:25] ryah: polotek: doesn't fix anything [05:25] jashkenas has joined the channel [05:25] creationix: and calling process.cwd() on every request [05:26] davidthings has joined the channel [05:26] davidascher has joined the channel [05:26] polotek: m0: this is clever [05:26] polotek: but it's not really catching the event [05:26] sholmes: existsSync, hmm. [05:26] polotek: it's just forwarding it to another event emitter [05:26] polotek: you'll have to catch it on that one too [05:27] creationix: path.exists is quite nasty actually [05:27] polotek: ryah: oh, sorry :/ [05:27] creationix: better to fs.readdir the controller directory on startup and just require all the controllers once [05:27] creationix: then you can use the super fast .hasOwnProperty check on your controller container [05:27] orospakr has joined the channel [05:27] m0: polotek: is there a quick way to initiate an error to test :) [05:28] polotek: how do you mean? [05:28] sholmes: creationix, but if I use fs.readdir then they wont be modules [05:28] polotek: like throw errors to test your handling code? [05:28] sholmes: oh wait [05:28] sholmes: nvm [05:29] polotek: sure, throw new Error('this is on purpose :)'); [05:29] m0: polotek: why would catching errors help my problem? [05:29] m0: polotek: It says Error: ETIMEDOUT, Connection timed out, [05:30] polotek: m0: that's a timeout error [05:30] polotek: are you catching on('timeout') ? [05:30] m0: Even if I can catch those errors, how will that help me handle them? [05:30] retsam has joined the channel [05:32] polotek: m0: by catching them they won't stop the server and cause node to bottom out [05:32] polotek: you give it a callback, inspect the error [05:32] polotek: log it [05:32] polotek: do any necessary clean up [05:32] polotek: then move on [05:32] m0: polotek: http://goo.gl/oKEol [05:32] dominic__ has joined the channel [05:32] m0: polotek: it is being caught and then emitting it. [05:32] saschagehlich_ has joined the channel [05:33] m0: So I don't understand why it would crash. Emitting isn't throwing [05:33] polotek: re-emitting a timeout doesn't make sense [05:33] dgathright has joined the channel [05:34] polotek: I don't know exactly what's going on just based on your error message [05:34] polotek: you've got a lot of non-trivial code here [05:34] polotek: but re-emitting doesn't actually handle anything [05:34] polotek: it's also possible that you're not actually handling all errors [05:34] polotek: I'm not inspecting this code in depth [05:35] polotek: but your event handlers are inside if statements and such [05:35] m0: polotek: I am using https://github.com/miksago/node-websocket-server maybe it was a bad idea. [05:35] polotek: maybe the error is happening in some other code branch [05:35] kiddphunk has joined the channel [05:35] polotek: I'm not sure what state it's in right now. it was pretty stable last time I checked [05:35] polotek: but node has also changed quite a bit in the last few weeks [05:35] m0: polotek: I was presenting nodejs to ~116 people and they loved it, then I get this email saying it crashes if you keep it on for one day. [05:35] polotek: are you using 0.2 or 0.3? [05:35] m0: So I was investigating :/ [05:36] cloudhead has joined the channel [05:36] themiddleman has joined the channel [05:36] m0: polotek: I am using 0.2.6 [05:36] m0: The stable version [05:37] sivy has joined the channel [05:37] skm has joined the channel [05:37] polotek: yeah it's been pretty stable for a while. and node-websocket-server works well on that version [05:37] polotek: not sure [05:37] polotek: you'd really have to try to reproduce the error and dig into it [05:37] m0: It happens when I keep the server online for a day or so [05:38] polotek: m0: oh I've got an idea [05:38] robotarmy has joined the channel [05:38] polotek: one problem with node currently is that it's tough to get info from errors of async operations [05:38] polotek: because you lose most of the useful stack trace [05:38] m0: Yea correct [05:38] mscdex: maybe you can disable the timeout [05:38] polotek: but you could try https://github.com/tlrobinson/long-stack-traces [05:39] mscdex: afaik it's just a connection idle timeout [05:39] polotek: which basically stitches the stack traces back together [05:39] polotek: could give you more clues [05:39] polotek: mscdex: yeah but he's not sure how to find what's causing it [05:39] polotek: and it's after it runs for a few days [05:40] m0: polotek: alright, I will pop that baby in and see if a bigger error message happens next couple of days [05:40] tykelewis has joined the channel [05:40] polotek: which always makes me suspicious of memory leaks [05:40] polotek: suspect* memory leaks [05:40] dgathright has joined the channel [05:40] creationix: sholmes: what about routes with only one segment? [05:40] polotek: which makes more sense [05:40] sholmes: creationix: segment? [05:40] creationix: sholmes: is it the controller name with index method or method name on index controller [05:41] creationix: does /foo map to /index/foo or /foo/index? [05:41] sholmes: it maps to /foo/index [05:41] creationix: ok, just checking [05:41] sholmes: yeah the file comes first. [05:42] m0: polotek: thank you, I just imported lst, and I will see how it goes :) [05:42] dgathright has joined the channel [05:42] m0: ACTION wonders why I am too excited seeing errors [05:44] sholmes: grr, google corrected my query from node to nude... [05:44] zentoooo has joined the channel [05:44] retsam has joined the channel [05:45] opengeard has joined the channel [05:45] m0: lol [05:45] jetienne_: sexy node, look at my slope and i will show you my perpendicular [05:45] jetienne_: we will be paralell to the end of space :) [05:45] jetienne_: geometric love [05:45] polotek: okay folks, I'm out [05:46] polotek: take it light [05:46] sholmes: jetienne_: you're just going off, and I'm not following. xP [05:46] micheil has joined the channel [05:46] sholmes: NO! [05:46] sholmes: I wont! [05:46] jetienne_: dox is light [05:46] jetienne_: sholmes: .- [05:46] jetienne_: :) [05:46] jetienne_: dox needs more skins tho [05:46] chris6F has joined the channel [05:47] dgathright has joined the channel [05:48] jetienne_: but the command line is cool. i can generate the doc zwithout thinking, and in a makefile line [05:48] sholmes: dox? [05:48] jetienne_: http://visionmedia.github.com/dox/ a jsdoc parser which generate this kind of page [05:48] jetienne_: backbone.js is using it too i think [05:49] sholmes: blah [05:50] sholmes: I'll stick with an HTML templating engine and MySQL [05:50] sholmes: I've yet to step outside of my confort zone, Node being an exception. [05:51] jetienne_: sholmes: on your code, you dont use doxygen or such ? [05:51] sholmes: no [05:51] sholmes: not sure what it is actually [05:51] sholmes: I'm just starting out Node. And I'm using Express and I'll find a template engine [05:51] chapel: JimBastard: ping [05:52] jetienne_: sholmes: some preformated way to comment inside the source itself. thus being able to generate teh doc [05:52] JimBastard: yo [05:52] sholmes: jetienne_: :S [05:52] jetienne_: https://github.com/visionmedia/dox/blob/master/lib/dox/index.js#L33-37 sholmes this kind of comment [05:53] sholmes: so dox is a comment to documentation thing? [05:53] jetienne_: sholmes: you can find this line in the doc page i gave earlier [05:53] jetienne_: sholmes: yes. doxygen too [05:53] ezmobius has joined the channel [05:53] sholmes: huh. Interesting idea. [05:53] ceej_: anyone know why i'd get this? Redis connection to 127.0.0.1:6379 failed - ECONNREFUSED, Connection refused [05:53] ceej_: https://gist.github.com/817975 [05:54] jetienne_: ceej_: this means redis is not listening at this address [05:54] statim has joined the channel [05:54] jetienne_: ceej_: check the address and redis conf [05:55] ceej_: it's definitiley correct [05:56] jetienne_: ceej_: check again :) [05:56] jetienne_: ceej_: do "telnet 127.0.0.1 6379" [05:56] ceej_: I'm looking at the redis to go config [05:56] k04n has joined the channel [05:57] jetienne_: ceej_: if the telnet say connection refused, check again and again. this mean reddis is not listening to this address [05:57] ceej_: why's it trying to connect there? It's no where in the code [05:57] jetienne_: ceej_: dunno i dont use reddis [05:59] ceej_: using redis-client doesn't work either [05:59] jashkenas has joined the channel [06:00] jetienne_: ceej_: because reddis is not launched. i told you 3 time already :) [06:01] objectvar has joined the channel [06:01] jetienne has joined the channel [06:01] jetienne has joined the channel [06:01] sholmes: can you match routes with regular expressions in Express? [06:02] necromancer has joined the channel [06:02] peol has joined the channel [06:02] jashkenas has joined the channel [06:03] ceej_: jetienne_: but it is.... I ran createClient [06:05] saschagehlich has joined the channel [06:05] jetienne: ceej_: you felt in the 4th dimension then :) [06:08] Coal has joined the channel [06:10] techwraith has joined the channel [06:12] muk_mb has joined the channel [06:13] cjm has joined the channel [06:13] franck34 has joined the channel [06:13] clarkfischer has joined the channel [06:13] muk_mb has joined the channel [06:18] jimt_ has joined the channel [06:18] sholmes: does Node have a phpMyAdmin alternative? [06:18] necromancer has left the channel [06:19] necromancer has joined the channel [06:19] necromancer: whoops! [06:19] JimBastard: sholmes: phpMyAdmin is for mysql? [06:20] sholmes: JimBastard: yes [06:20] JimBastard: so you want a web interface for mysql built in node? [06:21] creationix: that sounds line fun actually [06:21] stepheneb has joined the channel [06:21] creationix: JimBastard: can I convince you to write some unit tests for a node patch? [06:21] JimBastard: creationix: perhaps? [06:21] JimBastard: whats up [06:21] creationix: mutable headers for http [06:22] JimBastard: let me review that post for a second? [06:23] chapel: JimBastard: indexzero around? [06:23] JimBastard: is it https://gist.github.com/816004 ? [06:23] JimBastard: chapel: hes up in boston atm, if hes not online i dunno [06:23] chapel: hmm ok [06:23] chapel: forever isn't working right [06:23] JimBastard: how so? [06:23] chapel: cant get it to background using start [06:24] chapel: works if I omit start [06:24] chapel: ie forever script.js [06:24] chapel: but the moment I add start: forever start script.js [06:24] chapel: it just doesn't do anything [06:25] creationix: sholmes: https://github.com/creationix/creationix/blob/master/controllers.js [06:25] creationix: sholmes: it's a proper connect style middleware now [06:25] mjr_: pquerna: have you used the latest https server? [06:25] creationix: JimBastard: yeah, that's the one [06:26] creationix: I've got one update to add some error checking, but I think the api stays the same [06:28] creationix: sholmes: https://gist.github.com/818029 [06:28] creationix: sholmes: you don't have to use it, but you're welcome to use the code for ideas [06:28] sholmes: hmm. what benifits are there to loading all the controllers? It would seem that this takes more load on the server [06:29] ceej_: got it working :) [06:29] creationix: sholmes: It could be modified to lazy load them [06:29] creationix: sholmes: but it's a bit harder, you don't want to call require for every request, it sometimes does a little IO [06:29] sholmes: lazy load, meaning not load them. [06:29] sholmes: all* [06:30] creationix: not load them till the first time it's needed [06:30] creationix: so syntax error won't crash the server till that page is hit [06:30] JimBastard: so creationix , where would the tests go? /test/simple/test-http-server-? [06:30] creationix: JimBastard: wheverer the writeHead tests are [06:30] sholmes: you mean by loading all at once with fs.readDir you "cache" them so to speak? [06:31] creationix: sholmes: right, notice that code is outside the request handler [06:31] creationix: it's only executed once at server startup [06:31] matyr_ has joined the channel [06:31] sholmes: clever [06:31] creationix: but inside the setup function, so you can have several instances of the middleware with different controller folders [06:31] creationix: so a blog could be mounted at /blog and another app as /foo [06:32] creationix: they would share the common requires outside the setup function, but nothing inside it [06:32] sholmes: hmm. when you add controllers though, you'll need to restart the server [06:32] creationix: correct [06:32] creationix: but you have to do that for changes in controllers anyway [06:33] creationix: and that's more often than adding controllers [06:33] JimBastard: chapel: forever start myscript.js should just work [06:33] sholmes: or use nodemon or node-dev which will probably automatically restart [06:33] JimBastard: you should file an issue if it does [06:33] chapel: I know [06:33] JimBastard: n't [06:33] chapel: okay, well I will look into it [06:33] chapel: I am running 0.4.0-pre atm [06:33] JimBastard: maybe update [06:33] JimBastard: id file an issue [06:33] chapel: forever v0.3.1 with an update to bin/forever to allow -c [06:34] chapel: I will try and track down the issue when I have time [06:34] sholmes: creationix: would you recommend using something like nodemon or node-dev for production? [06:34] creationix: sholmes: I just use upstart [06:34] creationix: with the respawn directive [06:34] sholmes: what's upstart [06:35] creationix: it's build into ubuntu [06:35] chapel: hmm [06:35] creationix: for managing servers [06:35] chapel: sholmes: check out restartr as well [06:35] sholmes: ah, I see. [06:35] sholmes: chapel: link? [06:36] creationix: sholmes: https://gist.github.com/818043 [06:36] sholmes: creationix: when you server process fail/crashes upstart will restart the server for you? [06:36] JimBastard: creationix: im still not sure where to add those tests, im looking through the whole suite now [06:36] JimBastard: theres a lot of tests [06:36] chapel: sholmes: https://github.com/aaronblohowiak/restartr [06:37] chapel: sholmes: others might be more up to date, but restartr allows you to use coffee [06:37] creationix: sholmes: with "respawn" it will auto-restart it if the process dies [06:37] creationix: it's not the best, but good enough for my use and very easy [06:37] sholmes: coffeescript? [06:38] sholmes: are there many Node.js developers out there to hire? haha [06:38] chapel: to hire? [06:38] chapel: plenty [06:39] clarkfischer: Is anyone out there looking to hire node.js developers? [06:39] clarkfischer: (few) [06:39] mape: An entire team? [06:39] chapel: The N Team! [06:40] chapel: I love it when a plan comes together [06:40] clarkfischer: node is not yet seen as being production-ready, I don't think [06:40] JimBastard: ive been looking for node ninjas for a while, but ninjas are hard to spot [06:40] clarkfischer: Most people wouldn't rely on it. [06:41] JimBastard: our stack is 100% node [06:41] JimBastard: aside from the database [06:41] JimBastard: and linux [06:41] chapel: clarkfischer: maybe some companies, but I see more and more people moving to node, maybe exploratory atm, but still a lot of interest [06:41] creationix: clarkfischer: most, no, but many do [06:41] creationix: HP is putting lots of trust in it [06:41] chapel: yeah [06:41] JimBastard: when node hits 1.0.0 it will be a big deal [06:41] clarkfischer: well that's good to hear [06:41] clarkfischer: I can't wait for this stuff to explode [06:41] chapel: are you going to the thing tomorrow creationix ? [06:42] creationix: chapel: yep [06:42] chapel: cool [06:42] Lorentz: Wonder how long it'll be until it's 1.0.0. [06:42] creationix: I'd better get some sleep, it starts pretty early [06:42] chapel: how much node info? [06:42] chapel: kk, well have fun, cant wait to hear about it [06:42] creationix: Lorentz: super rough estimate with zero credibility. 1 year [06:42] chapel: I was thinking that [06:42] chapel: we are at 0.4 [06:43] creationix: I expect to hear plans and schedules from Joyent soon, they seem to be organizing the release and bug tracking process lately [06:43] chapel: dont feel like breaking out my thought process cause its lame [06:46] edw has joined the channel [06:47] nilcolor has joined the channel [06:48] borgenk has joined the channel [06:50] mikeal has joined the channel [06:53] amerine has joined the channel [06:55] dominic__ has joined the channel [06:56] aurynn: Hmm. So, I'm getting an error where I'm unable to resolve 'connect/middleware/session/memory' for require, but I installed connect through npm. [06:57] aurynn: What obvious thing am I missing here? :) [06:58] dingomanatee has joined the channel [06:59] FireFly has joined the channel [07:00] gggg has joined the channel [07:01] Utkarsh_ has joined the channel [07:01] razvandimescu has joined the channel [07:02] creationix: aurynn: what node version [07:02] creationix: I'm seeing some weird issues with require too on 0.4-pre [07:02] aurynn: 0.2.6, in this case [07:03] creationix: no clue [07:03] aurynn: I suspect my paths are messed up, but I don't know how to test that [07:03] creationix: you can always console.dir(require.paths) [07:03] creationix: and look and see what files are in those paths [07:04] creationix: but npm shims change all that dynamically [07:04] creationix: so that might not help [07:04] zentoooo has joined the channel [07:04] creationix: anyway, I'm heading home now, it's been a long day at work [07:05] disq has joined the channel [07:05] disq has joined the channel [07:05] aurynn: k [07:07] yhahn has left the channel [07:08] Jaye: if reduced to last resort you can require.paths.unshift the path where the module is, has always worked for me when my paths are messed up [07:09] chapel: hmm [07:09] chapel: I am about to sign up on linode, anyone have a referral code they want me to use? [07:09] nilcolor has joined the channel [07:11] Me1000: chapel: I do if you can hold up one sec [07:11] chapel: just waiting to press continue :) [07:12] aurynn: Let me log in :) [07:12] Me1000: 9b9336de01f82c7886663fa7d51202a54c24f79f [07:12] Me1000: chapel: ^^ [07:12] aurynn: eaa93d10637e88e23cfb0d4c035b5ae34e9a2ddf [07:12] aurynn: damnit [07:12] mscdex: hehe [07:12] Me1000: lol [07:12] chapel: sorry aurynn [07:14] chapel: anyone have any advice for running node on linode? [07:14] dominic__ has joined the channel [07:14] MikhX has joined the channel [07:16] _jud has joined the channel [07:17] mraleph has joined the channel [07:18] _jud: quick async js question if anyone is in here (not idling) [07:18] chapel: _jud: ask away [07:20] _jud: hmm, I was going to post the code on pastie, but that didn't work out so well [07:21] _jud: basically, I have a JS object [07:21] _jud: and one of the properties takes an async function [07:21] _jud: so [07:22] saschagehlich has joined the channel [07:22] _jud: var account = {user: asyncSelectUserID(function(data){return data})} [07:23] _jud: but of course, that doesn't work [07:24] razvandimescu has joined the channel [07:24] creationix: chapel: I run creationix.com on linode [07:24] _jud: since there are a few calls like that in this object, I would need to nest 3+ callbacks (+handle errors) [07:24] creationix: I just compile node using nvm and then use upstart to keep the server running [07:24] creationix: I use npm to install packages [07:25] chapel: kk, should I use a 64bit os? [07:25] creationix: chapel: no, 32 is better [07:25] chapel: okay [07:25] chapel: that was my main question [07:25] creationix: unless your server needs LOTS of ram [07:25] chapel: nope [07:25] chapel: 512mb plan [07:25] chapel: just playing around [07:25] creationix: last I checked, V8's 32'bit code it still better and it uses less ram due to the pointers being smaller [07:26] chapel: _jud: depending on how you go about things, you could do [07:26] creationix: 'night eveyone [07:27] chapel: asyncSelectUserID( function(data) { account = data; }); [07:27] tilgovi has joined the channel [07:27] chapel: nn creationix [07:27] creationix has left the channel [07:27] chapel: if said command doesn't take much time that is [07:27] chapel: if its instance, nothing blocking, then it should be fine [07:29] SamuraiJack has joined the channel [07:29] _jud: chapel: that is an idea, except there are 3 different async property lookups in the actual object I am working with [07:29] chapel: okay [07:30] chapel: do you have more code to gist? [07:30] chapel: hard to see context [07:30] _jud: yea [07:30] _jud: let me put it up on gist [07:34] jimt has joined the channel [07:35] _jud: chapel: https://gist.github.com/6d4b56940252779cf03e [07:38] chapel: if any of those functions are blocking, or take some time, they probably wont be filled by the time xfer is used elsewhere [07:39] _jud: right, they take a ~80ms, but xfer is used immediately after [07:39] chapel: account is the only one I dont know about, the other look fine I assume [07:39] jimt has joined the channel [07:39] _jud: ah, well xfer.duser and xfer.cuser are both empty when xfer is used [07:39] chapel: anyways, with async, you need to scope things, it might be better to use call backs to make sure stuff is being handled [07:39] dgathright has joined the channel [07:40] chapel: yeah [07:40] chapel: I assume account is for a db? [07:40] _jud: correct [07:40] chapel: well those need to be handled with call backs [07:40] chapel: similar to what I showed above [07:41] chapel: there are a lot of ways to handle stuff like that [07:41] _jud: so build the xfer var, then query db and alter xfer with the callbacks? [07:41] _jud: to fill in duser and cuser [07:41] chapel: yeah probably, and then you would call whatever function you needed to use xfer in inside the call backs of those [07:41] _jud: yea [07:42] _jud: I was just hoping there was some pattern I was missing to get that to work as is [07:42] _jud: haha, I hate getting so nested [07:43] chapel: well there are cleaner ways to handle it [07:43] chapel: but they require a little more architecting [07:43] chapel: you could use a code library like seq/step [07:43] _jud: something a bit like seq? [07:43] chapel: but I recommend learning how to handle it yourself [07:44] chapel: remember that you can send functions around [07:44] silence has joined the channel [07:44] _jud: you mean, instead of using anonymous callbacks [07:45] chapel: yeah [07:45] chapel: you could make a function that takes xfer and a callback function [07:45] chapel: and it could handle the db stuff [07:45] chapel: at that point, you are basically just making it organized better [07:46] chapel: instead of nesting it [07:46] _jud: right [07:46] _jud: I may look into rewriting my little orm to better handle this case [07:46] _jud: thanks for the help chapel [07:46] chapel: np [07:46] chapel: good luck [07:47] dguttman has joined the channel [07:47] retsam has joined the channel [07:47] devrim has joined the channel [07:48] lumino has joined the channel [07:49] ph^ has joined the channel [07:49] dominic__ has joined the channel [07:50] iszak: woo more commits [07:50] iszak: time to rebuild, I love the master/trunk. [07:53] matyr has joined the channel [07:56] TomY_ has joined the channel [07:58] jimt_ has joined the channel [07:58] aguynamedben has joined the channel [07:58] hellp has joined the channel [08:04] ivanfi has joined the channel [08:07] liar has joined the channel [08:11] yozgrahame has joined the channel [08:14] briznad has joined the channel [08:15] dguttman has joined the channel [08:18] muhqu has joined the channel [08:18] hwinkel has joined the channel [08:19] evl: Anything like sprintf or format in node? [08:19] evl: As in sprintf("The %d brown %s", 5, "gnomes") [08:20] Utkarsh_: http://phpjs.org/functions/sprintf:522 [08:21] Utkarsh_: or https://github.com/simplegeo/node-sprintf [08:24] evl: thanks :) [08:24] q_no has joined the channel [08:25] admc has joined the channel [08:26] janm has joined the channel [08:26] pietern has joined the channel [08:26] relix has joined the channel [08:27] benburkert has joined the channel [08:28] herbySk has joined the channel [08:28] tc77 has joined the channel [08:28] kal-EL_ has joined the channel [08:29] mhausenblas has joined the channel [08:29] Jaye has joined the channel [08:30] edw has joined the channel [08:30] mhausenblas_ has joined the channel [08:31] shiawuen1 has joined the channel [08:32] daglees has joined the channel [08:32] daglees has joined the channel [08:33] agnat has joined the channel [08:33] [AD]Turbo has joined the channel [08:33] CrazyGoogle has joined the channel [08:34] [AD]Turbo: hi there [08:38] liar has joined the channel [08:40] jbpros has joined the channel [08:40] ilpoldo has joined the channel [08:42] void_ has joined the channel [08:43] marcosvm has joined the channel [08:43] DanielSim has joined the channel [08:44] [AD]Turbo has joined the channel [08:46] shiawuen has joined the channel [08:46] sriley has joined the channel [08:46] matyr_ has joined the channel [08:47] Jaye: win32 in commit logs on master = :D [08:49] FireFly|n900 has joined the channel [08:49] marcosvm: cool for windows users. Is this working? [08:49] Druid_ has joined the channel [08:50] FireFly|n900 has joined the channel [08:50] FireFly|n900 has joined the channel [08:51] nmtmason has joined the channel [08:52] nook has joined the channel [08:52] adambeynon has joined the channel [08:55] stagas has joined the channel [09:00] dans_ has joined the channel [09:02] herbySk74 has joined the channel [09:04] q_no has joined the channel [09:07] aklt has joined the channel [09:09] zomgbie has joined the channel [09:12] matthewtodd has joined the channel [09:14] matthewtodd has left the channel [09:15] matthewtodd has joined the channel [09:15] altamic has joined the channel [09:15] altamic has joined the channel [09:15] dgathright has joined the channel [09:16] ROBOd has joined the channel [09:18] andrewfff has joined the channel [09:20] themiddleman has joined the channel [09:22] skohorn has joined the channel [09:25] rjrodger has joined the channel [09:26] Fullmoon has joined the channel [09:30] prettyrobots has joined the channel [09:30] aurynn has joined the channel [09:33] xla has joined the channel [09:34] sriley_ has joined the channel [09:34] nook has joined the channel [09:36] iszak: are there any callbacks for when loading a module? [09:36] matthewtodd has left the channel [09:38] ryah: module loading is sync [09:39] romainhuet has joined the channel [09:42] lumino has joined the channel [09:43] matyr has joined the channel [09:46] mscdex: having to work with really difficult legacy code sucks [09:48] svenlito has joined the channel [09:58] bzinger has joined the channel [09:59] bzinger has joined the channel [09:59] jimt has joined the channel [10:00] matyr_ has joined the channel [10:01] themiddleman has joined the channel [10:02] floby has joined the channel [10:02] floby has left the channel [10:03] caolanm has joined the channel [10:04] luke` has joined the channel [10:07] lumino has joined the channel [10:10] hellp has joined the channel [10:13] edw has joined the channel [10:14] muk_mb has joined the channel [10:15] mnot has joined the channel [10:16] Ratty_: How do I make jslint allow octals? It moans about passing 0777 to mkdir. I'd rather use that than 511. [10:18] viirya has joined the channel [10:20] devkorcvince has joined the channel [10:21] agnat has joined the channel [10:21] SubStack: v8: parseInt('777',8) [10:21] v8bot: SubStack: 511 [10:21] SubStack: Ratty_: ^^^ [10:22] Ratty_: Blegh [10:22] Ratty_: That's rather ugly though [10:25] mAritz has joined the channel [10:25] unfo-: Ratty_, make it go jslint and then just change 511 back to 0777 ? [10:25] SubStack: yes well, that will teach you to use jslint! [10:26] Ratty_: :'( [10:27] andrewfff has joined the channel [10:28] shiawuen has joined the channel [10:28] maushu has joined the channel [10:28] zentoooo has joined the channel [10:28] kristsk has joined the channel [10:29] zentoooo has joined the channel [10:30] zentoooo has joined the channel [10:33] evl: How much bigger over the network is a char compared to an uint? :) [10:34] kristsk: 0 [10:35] kristsk: if you are sending just one of either [10:35] kristsk: as MTU typically is 1500 bytes [10:36] fly-away has joined the channel [10:38] herbySk has joined the channel [10:39] evl: kristsk: I'm trying to build an optimized protocol for sending X/Y/id of a participant over websockets so I'm trying to figure out a good trade-off between size and readability [10:40] CrazyGoogle has joined the channel [10:42] kristsk: i see. [10:42] margle has joined the channel [10:44] kristsk: depends on size of uint then [10:46] jimt has joined the channel [10:50] cjm has joined the channel [10:54] floby has joined the channel [10:58] matyr has joined the channel [10:59] matthewtodd has joined the channel [11:02] floby has left the channel [11:03] dgathright has joined the channel [11:07] evl: I'm looking at the blog sample of Express, where the Post object is defined as var Post = exports = module.exports = function(foo) but the node.js docs say exports is the same as module.exports. Is there any difference between the two? [11:08] Coal has joined the channel [11:16] Sami_ZzZ has joined the channel [11:16] maritz has joined the channel [11:16] ivanfi has joined the channel [11:17] mike5w3c has joined the channel [11:18] versicolor has joined the channel [11:19] jetienne has joined the channel [11:21] ph^ has joined the channel [11:22] svenlito has joined the channel [11:24] q_no has joined the channel [11:27] xla has joined the channel [11:31] felixge has joined the channel [11:33] charlenopires has joined the channel [11:35] jimt has joined the channel [11:37] shobhit has joined the channel [11:39] shobhit: I am installing on Windows and while doing ./configure I am getting following error 1 [main] python 5928 C:\cygwin\bin\python.exe: *** fatal error - couldn't [11:40] shobhit: release memory for python [11:40] shobhit: Any help would be great [11:42] shobhit: 1 [main] python 3488 C:\cygwin\bin\python.exe: *** fatal error - couldn't release memory 0x196E4000(1032192) for '\\?\C:\cygwin\lib\python2.6\lib-dynload\time.dll' alignment, Win32 error 487 [11:44] tfe_ has joined the channel [11:45] shobhit: Anyone know about the above cygwin Windows problem [11:45] unomi has joined the channel [11:49] [AD]Turbo: is it possible to get the (socket.io) client from the client sessionId ? [11:50] cjm has joined the channel [11:50] fermion has joined the channel [11:51] SubStack: [AD]Turbo: you can always just clients[client.sessionId] = client [11:52] [AD]Turbo: so i can do clients[client.sessionId].send(...) ? [11:52] TobiasFar has joined the channel [11:52] d0k has joined the channel [11:53] xandrews has joined the channel [11:58] zorzar has joined the channel [12:03] Utkarsh has joined the channel [12:11] Ori_P has joined the channel [12:12] gg411 has joined the channel [12:16] syntheze has joined the channel [12:19] herbySk has joined the channel [12:19] SubStack: [AD]Turbo: yes [12:20] shiawuen has joined the channel [12:21] jan____ has joined the channel [12:22] CIA-79 has joined the channel [12:23] edw has joined the channel [12:24] jan____ has joined the channel [12:25] stagas_ has joined the channel [12:26] floby has joined the channel [12:26] floby has left the channel [12:26] ziro` has joined the channel [12:29] ivanfi has joined the channel [12:31] adambeynon has joined the channel [12:33] floby has joined the channel [12:33] floby has left the channel [12:34] dude has joined the channel [12:35] mjr_ has joined the channel [12:39] herbySk has joined the channel [12:41] emerleite has joined the channel [12:42] jacobolus has joined the channel [12:43] CrazyGoogle has joined the channel [12:44] vyvea has joined the channel [12:45] jimt_ has joined the channel [12:47] shiawuen has joined the channel [12:50] cjm has joined the channel [12:50] stepheneb has joined the channel [12:52] fairwinds has joined the channel [12:52] ryanfitz has joined the channel [12:54] matyr has joined the channel [12:55] lukegalea: good morning everyone. [12:56] lukegalea: Is anyone using AjaxIM? [12:56] lukegalea: is it working well? [12:59] evl: I'm looking at the blog sample of Express, where the Post object is defined as var Post = exports = module.exports = function(foo) but the node.js docs say exports is the same as module.exports. Is there any difference between the two? [13:01] CrazyGoogle has joined the channel [13:04] matyr has joined the channel [13:05] jimt has joined the channel [13:05] lukegalea: mastering node goes over the difference: http://visionmedia.github.com/masteringnode/ [13:05] lukegalea: but I'm not sure why you would use both exports and module.exports.. I thought it was one or the other. (or rather: the module.exports takes precedence). Hopefully someone can fill us in :) [13:06] lukegalea: so: no one involved with AjaxIM is around eh? [13:07] lukegalea: darn. I'll try later when people might actually be awake.. :) [13:07] matyr_ has joined the channel [13:07] mike5w3c has joined the channel [13:08] emerleite: Hi folks, I've started a node project called node-database-cleaner yesterday. It aims to clean all database entries and very usefull to tests tear down. Need contributors - https://github.com/emerleite/node-database-cleaner [13:12] q_no has joined the channel [13:12] eresair has joined the channel [13:14] perlmonkey2 has joined the channel [13:15] pdelgallego has joined the channel [13:17] astoon has joined the channel [13:22] adambeynon has joined the channel [13:22] jano has joined the channel [13:25] ChrisPartridge has joined the channel [13:26] c4milo1 has joined the channel [13:27] aro has joined the channel [13:31] adambeynon has joined the channel [13:33] matyr has joined the channel [13:38] hwinkel has joined the channel [13:38] bradleymeck1 has joined the channel [13:41] ehynds has joined the channel [13:42] stepheneb has joined the channel [13:45] ehynds: hi guys. i'm trying to export a mysql client object but am having trouble accessing its methods. can someone peep this pastie? http://pastie.org/1544865 [13:46] bradleymeck1: ehynds, require("...").client as it is now, or to export it directly use module.exports = client [13:47] ehynds: great, thanks. [13:47] xandrews has joined the channel [13:53] matyr_ has joined the channel [13:55] necromancer has joined the channel [13:55] mAritz1 has joined the channel [13:55] skohorn has joined the channel [13:56] unomi has joined the channel [13:57] Ori_P has joined the channel [13:58] cjm has joined the channel [13:58] matyr has joined the channel [13:58] alexweber15 has joined the channel [13:58] fumanchu182 has joined the channel [13:59] jlecker has joined the channel [14:01] arpegius has joined the channel [14:01] herbySk has joined the channel [14:04] pandark_ has joined the channel [14:04] matyr has joined the channel [14:04] jakehow has joined the channel [14:06] dominic__ has joined the channel [14:07] trotter has joined the channel [14:13] matyr has joined the channel [14:14] brian_irish has joined the channel [14:15] bshumate has joined the channel [14:15] bshumate has joined the channel [14:15] Poetro has joined the channel [14:16] Ari-Ugwu has joined the channel [14:19] Zenergy has joined the channel [14:19] FireFly has joined the channel [14:21] Sbioko has joined the channel [14:21] Sbioko: Hello [14:21] Sbioko: how to define field which can be String or Array/Object in Mongoose? [14:22] Sbioko: anyone? [14:23] fly-away has joined the channel [14:23] nonnikcam has joined the channel [14:24] Lorentz: http://mongoosejs.com/ [14:24] Lorentz: Notice the schema. [14:25] Sbioko: Lorentz: there are no info on defining fields with multiple types of data [14:25] Sebmaster has joined the channel [14:25] stalled has joined the channel [14:26] matyr_ has joined the channel [14:27] edw has joined the channel [14:28] gmci has joined the channel [14:28] Lorentz: Sbioko: I see, you want some kind of catch all kind of field that does either [14:28] Lorentz: Not sure then [14:29] Sbioko: Lorentz: if I simply will not define it, will it work? [14:30] sivy has joined the channel [14:30] Utkarsh has joined the channel [14:30] Lorentz: I can't answer that. Not sure. Try it and see, although I don't know why you really want such alternating kind of value. [14:30] Sbioko: ok [14:30] Sbioko: thanks anyway Lorentz [14:30] Sbioko has left the channel [14:30] lukegalea: Sbioko: In old mongoose, the default was to let you put anything in.. [14:30] lukegalea: and you had to specifically tell it to cast. [14:30] matyr has joined the channel [14:30] Lorentz: lukegalea: He left already. [14:31] lukegalea: aah [14:31] lukegalea: dang [14:31] lukegalea: I was going to say he could just tell Mongoose to cast to Object ;) [14:32] Lorentz: Hmm, that is an idea, since object does everything [14:32] Lorentz: Being an object and all [14:32] matyr_ has joined the channel [14:32] k04n has joined the channel [14:33] sivy has joined the channel [14:34] lukegalea: yep [14:34] zomgbie has joined the channel [14:35] chrischris has joined the channel [14:36] davidsklar has joined the channel [14:38] Druid_ has joined the channel [14:39] Ori_P has joined the channel [14:40] floby has joined the channel [14:41] trotter_ has joined the channel [14:42] figital has joined the channel [14:42] floby has left the channel [14:44] bzinger has joined the channel [14:44] MrTopf has joined the channel [14:44] davglass has joined the channel [14:45] jpstrikesback has joined the channel [14:47] losing has joined the channel [14:47] shiawuen has joined the channel [14:47] shiawuen1 has joined the channel [14:49] Jonasbn_ has joined the channel [14:50] jmar777 has joined the channel [14:53] jherdman has joined the channel [14:54] nerdEd has joined the channel [14:55] bradleymeck has joined the channel [14:58] broofa_ has joined the channel [14:59] malkomalko has joined the channel [15:01] xla has joined the channel [15:02] aklt has joined the channel [15:03] broofa_ has joined the channel [15:03] cjm has joined the channel [15:03] sonnym has joined the channel [15:03] zomgbie has joined the channel [15:04] Bioxyde has joined the channel [15:09] yhahn has joined the channel [15:09] rjrodger has joined the channel [15:09] FireFly|n900 has joined the channel [15:12] SamuraiJack has joined the channel [15:12] broofa has joined the channel [15:13] blueadept has joined the channel [15:17] versicolor has joined the channel [15:17] felixge has joined the channel [15:17] felixge has joined the channel [15:18] Bersam has joined the channel [15:19] pauls has joined the channel [15:20] Bersam: hi everybody ... i have problem with building node.js on a window$ i get this error Build failed: -> task failed (err #2): {task: libv8.a SConstruct -> libv8.a}. what should i do? [15:20] Sebmaster: use node v0.3.1 [15:20] Sebmaster: Bersam: ^ [15:20] ukev has joined the channel [15:21] Bersam: Sebmaster: okey i'll try it :) thanks [15:22] EyePulp has joined the channel [15:23] shinmei has joined the channel [15:23] danoyoung has joined the channel [15:25] stagas has joined the channel [15:25] danoyoung has left the channel [15:26] danoyoung has joined the channel [15:29] vipaca has joined the channel [15:29] vipaca has joined the channel [15:30] tvon has joined the channel [15:31] danoyoung has joined the channel [15:31] danoyoung has joined the channel [15:32] stephank has joined the channel [15:33] versicolor has joined the channel [15:36] danoyoung has joined the channel [15:39] devrim has joined the channel [15:39] eee_c has joined the channel [15:41] nerdEd has joined the channel [15:43] jquerygeek has joined the channel [15:43] jquerygeek: having some problem on node.js setup on windows [15:43] ryanfitz has joined the channel [15:43] jquerygeek: can anybody help me on that please [15:44] jonaslund: jquerygeek: stick to 2.6 or 3.1 if you use cygwin for the moment [15:44] jquerygeek: i m on 2.6 [15:45] jquerygeek: I am facing this prob : Build failed: -> task failed (err #2): {task: libv8.a SConstruct -> libv8.a} [15:45] jquerygeek: but the solved is not working as wiki saying [15:46] jonaslund: jquerygeek: do you have microsoft visual C/studio installed ? [15:46] jquerygeek: nop [15:46] Bersam has left the channel [15:46] jonaslund: check in build\default if there is a v8.lib file [15:47] amerine has joined the channel [15:47] jquerygeek: nop there is no file as it [15:48] jonaslund: ok then there was probably some other error causing it [15:48] jonaslund: use pastebin and paste the log [15:49] jquerygeek: not clear about pastebina nd paste log [15:49] jquerygeek: will you please tell details [15:50] jonaslund: off to dinner right now, copy-paste from the text from the build into pastebin [15:50] jonaslund: or download a binary build [15:50] jonaslund: there is ready made builds of 2.6 [15:51] ceej has joined the channel [15:55] vipaca: How do you make node use specific implementation such select, epoll, kqueue? [15:55] paulrobinson has joined the channel [15:56] nilcolor: which MongoDB driver Mongoose using? [15:56] kawaz_home has joined the channel [15:56] slaskis: I've written a little node command line script that does a lot of downloads and I'd like to show progress on those how would i go about to draw progressbars similar to wget? since they're parallel i can't really just sys.print("#") or it would just go all over the place. [15:56] vilhonen: nilcolor: https://github.com/christkv/node-mongodb-native this one [15:57] slaskis: how does people usually go about to do such things? [15:57] nilcolor: vilhonen: oh, thanks! [15:57] vilhonen: np [15:57] vipaca: or am I misunderstanding the way node works? [15:57] podman has joined the channel [15:58] vilhonen: vipaca: it's probably determined at compile time [15:58] paulrobinson has left the channel [15:58] daniellindsley has joined the channel [15:58] vipaca: I would imagine any documentation about how to change this at compile time? [15:59] jquerygeek: I am facing this prob when installing via cygwin : Build failed: -> task failed (err #2): {task: libv8.a SConstruct -> libv8.a} [15:59] jquerygeek: can anybody help on it [15:59] vilhonen: vipaca: why do you want to change it? [16:00] vipaca: the specific system call to handle file descriptors [16:00] Kingdutch has joined the channel [16:00] vipaca: i.e. select or epoll or kqueue [16:00] evl has joined the channel [16:00] evl has joined the channel [16:00] chrischr_ has joined the channel [16:00] vilhonen: vipaca: it chooses the best available one [16:00] vilhonen: automatically [16:00] vipaca: oh wow the best [16:01] Me1000 has joined the channel [16:01] necromancer has joined the channel [16:01] EyePulp: any way to dump the current line of script being run when using console.log (or better, name of script & # of line)? [16:01] cha0s has joined the channel [16:01] cha0s has joined the channel [16:01] edw has joined the channel [16:01] vipaca: vilhonen: I would like to ensure the best is being used [16:01] vilhonen: vipaca: actually it seems to use libev and it makes the choice of the underlying system [16:02] vipaca: the underlying system can have more than one file descriptor listener implementation [16:02] jquerygeek: having some problem on node.js setup on windows [16:02] jquerygeek: can anybody help me on that [16:03] strmpnk has joined the channel [16:05] robotarmy has joined the channel [16:05] mr_daniel has joined the channel [16:06] vilhonen: vipaca: which one do you think is the best [16:07] vipaca: vilhonen I believe that the answer to that question depends on what you are trying to accomplish [16:07] cjm has joined the channel [16:08] ceej has joined the channel [16:08] vilhonen: ok, could you give me an example of two implementations where the implementations beat each other in different situations [16:09] vipaca: What I'm looking for is information on tuning a node deployment and specifically changing the underlying system call would be helpful [16:09] podman has left the channel [16:09] vilhonen: I already told you that it's using libev and it decides the implementation [16:11] ceej: having a really weird issue, so I can ping http://72.190.40.203:3000/ but I can't view it in the browser, if I do localhost:3000 I can view it.... [16:11] vilhonen: there's epoll for linux, kqueue for macs and select for really old or rare systems and I haven't heard of people trying to tune it by changing implementations [16:12] ceej: same with browser.cj.am:3000 [16:13] vilhonen: I can't think of a situation where select can beat epoll or kqueue other than providing compatibility for other platforms so I think it's safe to say that the one available is the best one [16:13] jonaslund: hummmm [16:13] jonaslund: we need to get some kind of support company going for node.js soon [16:13] sprout has joined the channel [16:14] jonaslund: or maybe just provide binary builds on windows :) [16:14] mikeal has joined the channel [16:17] mw has joined the channel [16:17] Sebmaster: +1 for binary builds [16:18] Sebmaster: jquerygeek: Use node v0.3.1 [16:18] flukes1 has joined the channel [16:18] jonaslund: i think he left [16:18] Sebmaster: hmpf, he already left [16:18] jonaslund: he was PM'ing me [16:18] Sebmaster: yea... [16:18] Sebmaster: oh ok [16:19] liar has joined the channel [16:19] jonaslund: but his patience didn't extend past my dinner [16:19] Sebmaster: impatient people... [16:19] Sebmaster: meh [16:19] Sebmaster: w/e [16:19] jonaslund: people who start PM'ing at once are just a ... pain [16:19] Sebmaster: yea [16:20] jonaslund: usually an indication that they want you to do everything for them [16:20] Sebmaster: i guess ive to thank the people at nodejs-mysql-native [16:20] Sebmaster: lol [16:20] jonaslund: i hate being "arrogant" but some people just ticks that off [16:20] svenlito has joined the channel [16:20] jonaslund: ACTION takes a peek at how scons works [16:21] Sebmaster: we need a platform_cygwin.cc :( [16:21] jonaslund: it seems everyone hates waf and since we're kinda stuck with scons already due to v8 it might be an idea to look at using scons for everything [16:21] Sebmaster: sounds reasonable [16:22] statim has left the channel [16:22] vilhonen: why not autotools, then you don't have to worry about anything else than maintaining couple of dozen cryptic scripts macro template files [16:22] jonaslund: but i wonder if there is a reason it wasn't used from day 1 ? [16:22] ceej: meh made a proxy pass in apache [16:23] Sebmaster: jonaslund: I guess just ryah can answer you at this point [16:23] Alfie-- has joined the channel [16:23] jonaslund: vilhonen: the biggest problem with the build system (i think) right now is getting things working on windows, autotools is hardly helping in that area :) [16:24] hornairs has joined the channel [16:25] necromancer has joined the channel [16:26] brapse has joined the channel [16:26] jonaslund: ACTION reads the scons manual [16:26] vilhonen: windows users :( [16:26] vilhonen: but I wouldn't use the autotools anyway [16:27] BillyBreen has joined the channel [16:27] jonaslund: what's so bad about windows really ? [16:27] malkomal_ has joined the channel [16:27] vilhonen: it doesn't have a proper shell and development culture revolves around visual studio [16:28] dguttman has joined the channel [16:28] _dnyy has joined the channel [16:28] vilhonen: doesn't have a package manager [16:28] vilhonen: everything's GUI based [16:28] jonaslund: i consider the lack of a package manager a positive thing :) [16:28] jonaslund: give me binary bundles that just work(tm) any day [16:28] mikeal has joined the channel [16:28] jonaslund: i don't care about a little bloat as long as i don't have to fight dependencies [16:29] caolanm: ACTION boggles [16:30] q_no has joined the channel [16:31] jonaslund: vilhonen: If i want to use stable for most things but "cutting edge" tools for some things you usually end up with a lot of manual work or some breaking of the base [16:31] matthewtodd has left the channel [16:31] kristsk: the edge is cutting alright. [16:32] ceej: is there a reason node wouldn't let me expose my port to the public...no pun intended? [16:33] jonaslund: maybe some OS firewall or restriction [16:33] ceej: they are all turned off my router has port forwarding for the port [16:33] Vertice has joined the channel [16:33] kristsk: os / port ? [16:33] ceej: locally it works pinging it works [16:33] kristsk: which interafce do you use? [16:33] ceej: browser.cj.am:3000 [16:34] kristsk: telnet: connect to address 72.190.40.203: Connection refused [16:34] ceej: I'm running off my mac [16:34] ceej: can you try again [16:34] kristsk: same [16:35] ceej: wtf but can you see http://sdfsdfsdf.cj.am ? [16:35] Nietecht has joined the channel [16:35] jpstrikesback has joined the channel [16:35] kristsk: An Error Was Encountered [16:35] kristsk: Unable to determine what should be displayed. A default route has not been specified in the routing file. [16:35] kristsk: looks like i can [16:36] ceej: yee so you can conenct to port 80 [16:36] jchris has joined the channel [16:36] jonaslund: same here [16:36] ceej: both 80 22 and 3000 are being forwarded :/ [16:36] ceej: makes no sense what so ever [16:37] NuckingFuts has joined the channel [16:38] kristsk: so if forwarding works, there must be something on your mac [16:38] sprout has joined the channel [16:38] NuckingFuts: Still can't make sense of the Crypto lib :/ [16:38] ceej: what would be wrong though? used to work just fine... every firewall is off [16:39] kristsk: try some other port [16:39] jonaslund: yeah [16:39] NuckingFuts: Well, I think I sorta understand, but I can't tell how to generate a keypair :dummy: [16:39] NuckingFuts: derp, I always use dA's emotes lol [16:39] jonaslund: some strange app might think that 3000 is useful for sometihng [16:39] beawesomeinstead has joined the channel [16:39] beawesomeinstead has joined the channel [16:40] kristsk: yea [16:40] ceej: can you try http://meh.cj.am:3000/ [16:41] kristsk: um nothing [16:41] jonaslund: socket.io [16:41] jonaslund: kristsk: check source [16:41] ceej: should just be a blank page [16:41] squeek has joined the channel [16:41] SwiftLayer has joined the channel [16:41] kristsk: oh wait [16:41] jonaslund: localhost', {port: 3000, rememberTransport: false/*, transports: ['xhr-polling']*/}); [16:41] kristsk: it worked [16:41] jonaslund: could be a problem connecting though :D [16:42] squeek: any npm folks around? I'm having some hell trying to get my first package together [16:42] ceej: ye now there's an issue connecting [16:45] warz has joined the channel [16:45] nook has joined the channel [16:46] ceej: this is what I have.... https://gist.github.com/fee68cace707989f46ad [16:47] eee_c has joined the channel [16:47] heavysixer has joined the channel [16:48] aklt has joined the channel [16:49] squeek: https://gist.github.com/38e3154308ff931af23c Any ideas? [16:49] sh1mmer has joined the channel [16:50] dmcquay has joined the channel [16:52] Sebmaster: squeek: Maybe try to name the module glossy? [16:52] squeek: .... what [16:52] Sebmaster: didnt publish my first package yet, so im just guessing [16:52] Sebmaster: your module hash [16:53] squeek: name" : "glossy" / [16:55] caolanm: ceej: your app is only available on your machine? [16:56] Sebmaster: squeek: Is your index.js in your lib folder? [16:56] squeek: Nope. [16:56] ceej: caolanm: well it should be public as I'm forwarding the port but ye I can only access it locally right now :/ [16:56] Sebmaster: but you did install your module right? [16:56] caolanm: ceej: are you running it on 127.0.0.1? because you might want to try 0.0.0.0 [16:56] squeek: Sebmaster: yes, that's what the terminal output is saying. [16:56] ceej: yee [16:57] jonaslund: hmmmm [16:57] jonaslund: now i got the basics of scons [16:57] jonaslund: let's try to make a script :) [16:57] squeek: Sebmaster: http://github.com/squeeks/glossy repo, if that answers any other questions [16:58] romainhuet_ has joined the channel [16:58] ceej: caolanm: that seems to work but try http://browser.cj.am/ it won't connect [16:58] tedsuo has joined the channel [16:59] ceej: socket.io gives access denied [16:59] NuckingFuts has joined the channel [16:59] Sebmaster: squeek: Try specifying a main-hash [16:59] caolanm: ceej: running it behind nginx or apache? [16:59] ceej: I have apache running [16:59] squeek: Sebmaster: What do you mean? [16:59] ajpiano has joined the channel [16:59] caolanm: ceej: well it won't work with websockets [17:00] Sebmaster: squeek: like "main": "./index.js", [17:00] cronopio has joined the channel [17:00] ceej: caolanm: doesn't it switch to long poling though? [17:00] caolanm: ceej: try disabling websockets as an option in socket.io [17:00] tjholowaychuk has joined the channel [17:01] squeek: Sebmaster: doesn't work, neither. [17:01] caolanm: ceej: because it may think your browser supports websockets and try it regardless [17:01] caolanm: ceej: I've not used socket.io in a while so I might be wrong... [17:01] ceej: caolanm: I'm trying it in an IE vm [17:01] aguynamedben has joined the channel [17:01] ceej: it used to work [17:01] Sebmaster: squeek: Where did you add the main? [17:02] squeek: https://gist.github.com/56ec5f4a587584adf0a5 [17:03] misterm has joined the channel [17:04] Sebmaster: squeek: I can't see any difference compared to mine now... [17:05] ceej: caolanm: ye it will still only work locally [17:05] Sebmaster: exept im storing everything in my lib folder... [17:06] squeek: Sebmaster: There is no clear docs showing the format, nor do any two npm packages do anything consistently. What I've done so far is tried my best to match up something. [17:06] ehynds: hi guys. first day to nodejs. i'm creating a basic login/auth system for my site. here's the "register" logic which works fine, but am wondering if I missed anything/have any refactoring tips: http://pastie.org/1545625 [17:07] caolanm: ceej: I suspect the fact you are proxying it through apache... [17:07] Sebmaster: squeek: ill test a bit with my package [17:07] ceej: nope i turned that off [17:07] caolanm: ceej: oh? you're accessing it directly now? [17:07] caolanm: hmm [17:08] ceej: yeep [17:08] caolanm: ceej: is it falling back to flash sockets? [17:08] caolanm: that might require another port opening [17:08] jakehow has joined the channel [17:08] ceej: that could b eit [17:08] amerine has joined the channel [17:09] losing has joined the channel [17:10] stephank has joined the channel [17:10] vilhonen: I wrapped microsoft's RxJS in a library: https://github.com/vvilhonen/node-rx [17:10] vilhonen: npm library that is [17:11] hobodave has joined the channel [17:11] ceej: 843, just opened that up still no luck :/ [17:12] yozgrahame has joined the channel [17:13] marcosvm has joined the channel [17:14] NuckingFuts: Still looking for help with crypto :V [17:14] nook has joined the channel [17:15] nerdEd has joined the channel [17:16] tykelewis has joined the channel [17:17] ceej: hmmm my no.de instance is gone [17:19] cilantro has joined the channel [17:19] mattly has joined the channel [17:21] edw has joined the channel [17:24] rauchg_ has joined the channel [17:26] romainhuet has joined the channel [17:27] eee_c has joined the channel [17:27] galaxywatcher has joined the channel [17:31] steffkes has joined the channel [17:31] zomgbie has joined the channel [17:32] m14t has joined the channel [17:32] m14t has left the channel [17:34] hellp has joined the channel [17:34] EyePulp: so no way to determine the current line of code being executed if I wanted to dump it to a console.log(); ? [17:34] jtsnow has joined the channel [17:35] kristsk: umm. new Error() ? [17:35] prettyrobots has joined the channel [17:35] EyePulp: kristsk: [17:36] EyePulp: kristsk: are you asking or saying? =) [17:36] kristsk: saying heh [17:36] altamic has joined the channel [17:36] sprout has joined the channel [17:37] kristsk: new Errr().stack prolly will be too much [17:37] Aikar: EyePulp: look at your editor? :P [17:37] Aikar: (sarcasm) [17:37] EyePulp: Aikar: touche' [17:38] eresair has joined the channel [17:38] Aikar: i believe there was a topic on -dev about a __line [17:38] Aikar: and someone posted code to implement it [17:38] EyePulp: I was thinking about how in firebug console.info() would self document the file & line of code it was called on [17:38] Aikar: Object.defineProperty(global, '__line', { get: function() { stuff with new Error() and stack trace }}); [17:39] EyePulp: it was ridiculously helpful [17:39] jonaslund: hmmmm [17:39] Aikar: oh theres arguments.callee variable it prolly uses [17:39] jonaslund: Sebmaster: c-ares uses waf aswell [17:40] Me1000 has joined the channel [17:40] felixge has joined the channel [17:40] felixge has joined the channel [17:40] broofa has joined the channel [17:40] swistak has joined the channel [17:41] paulrobinson_ has joined the channel [17:41] ghost has joined the channel [17:43] tjholowaychuk: s.writeFile(file, process.pid+'', encoding='ascii'); [17:43] tjholowaychuk: haha [17:43] tjholowaychuk: some people take the docs to literally [17:43] mjr_ has joined the channel [17:44] mikedeboer has joined the channel [17:44] Aikar: tjholowaychuk: what you mean lol [17:44] tjholowaychuk: Aikar: encoding='ascii' [17:44] tjholowaychuk: creating a global [17:44] tjholowaychuk: ive seen that quite a few times now [17:46] Aikar: oh lol [17:47] Aikar: EyePulp: https://gist.github.com/663919 [17:47] Aikar: found that on irc logs [17:47] Aikar: that is along the lines of what you want [17:47] Aikar: so modify from there [17:47] Sebmaster: jonaslund: Rewrite c-ares + node waf? [17:47] EyePulp: cool - thanks for looking [17:48] Sebmaster: jonaslund: Or the v8 scons [17:48] jonaslund: Sebmaster: I'm making a little run at making a scons script to build everything but v8 [17:48] jonaslund: and just use the existing scons for v8 [17:49] Aikar: EyePulp: someone wrote a more exact __line implementation, dunno where its at though [17:49] isaacs has joined the channel [17:49] Aikar: google groups doesnt understand "__line" is not "line" [17:49] tjholowaychuk: Aikar: I did [17:49] tjholowaychuk: Aikar: not sure if I have it laying around [17:49] EyePulp: tjholowaychuk: I'd heap beers upon you if you could find it [17:49] tjholowaychuk: what do you guys need it for [17:50] mikeal has joined the channel [17:50] Aikar: just him not me :p [17:50] here has joined the channel [17:50] Aikar: he wants to do some debug with __line [17:50] mikeal has joined the channel [17:50] mojombo has left the channel [17:50] Aikar: you should submit it as a patch to node tj lol [17:50] EyePulp: tjholowaychuk: I've got a lot of debugging that it would be nice to get back to the proper line with some of my console logging [17:50] Aikar: only need to put it in 1 place in the global obj [17:50] tjholowaychuk: ryan doesnt want any weird hackery (i dont blame him) [17:50] Aikar: ah [17:51] admc1 has joined the channel [17:51] Aikar: its a pretty common feature of interpreted languages, would be nice to have support for it [17:51] EyePulp: common & helpful [17:51] EyePulp: =) [17:52] benburkert has joined the channel [17:52] superjudge has joined the channel [17:52] dguttman has joined the channel [17:53] EyePulp: heck, make it a unique method of console - console.info('foo); >>> script.js line:42 foo [17:53] Aikar: finally got some time to work on my templating engine again last night. RL been eating me up. Got a new syntax support for it :O https://github.com/Aikar/node-nova/blob/master/tests/templates/template.js [17:54] ossareh has joined the channel [17:55] jonaslund: dumdidum [17:55] prettyrobots_ has joined the channel [17:55] Coal has joined the channel [17:56] jonaslund: woop [17:56] CrazyGoogle has joined the channel [17:56] tedsuo has joined the channel [17:56] jonaslund: seems like c-ares is building [17:58] softdrink has joined the channel [17:58] arpegius has joined the channel [17:59] m64253 has joined the channel [18:00] galaxywatcher has joined the channel [18:01] jonaslund: uuuhh [18:01] jonaslund: does C99 allow declarations after code ? [18:01] dgathright has joined the channel [18:01] mikedeboer_ has joined the channel [18:04] hoodoos has joined the channel [18:04] hoodoos: hello, guys. I have a question about http DELETE request. Should it contain content-length or transfer-encoding like POST and PUT or shouldn't like GET/HEAD? [18:05] hoodoos: as far as I can see node http client adds transfer-encoding to request if no content-length specified for DELETE requests [18:05] luke` has joined the channel [18:05] guybrush: mjr_: https://gist.github.com/818907 [18:05] rwaldron has joined the channel [18:06] WhenRaptors: @hoodoo:http://www.w3.org/Protocols/rfc2616/rfc2616.html [18:06] hoodoos: and I couldn't find anything in rfc related to wether DELETE method request can or cannot contain body [18:06] kristsk: if it is not specified, the prolly it is up to implementator to decide [18:06] mjijackson has joined the channel [18:06] kristsk: are there any other DELETE users out there? [18:07] hoodoos: WhenRaptors, well, I couldn't find anything exact on that topic there [18:07] Aikar: jonaslund: from C99 wiki page [18:07] Aikar: intermingled declarations and code, variable declaration no longer restricted to file scope or the start of a compound statement (block) [18:07] jonaslund: Aikar: yeah wikipedia page for C99 answered that [18:07] WhenRaptors: @hoodoos: its up to you then [18:07] jonaslund: ryans http_parser module uses that [18:08] WhenRaptors: @hoodoos: I personally wouldn't require it [18:08] jonaslund: blew up my msvc compile [18:08] Aikar: lol [18:08] jonaslund: i'm "fixing" it right now [18:08] kristsk: http://webdav.org/specs/rfc4918.html#METHOD_DELETE [18:08] jonaslund: maybe it'll be easier to compile as C++ in the long run [18:08] [[zz]] has joined the channel [18:08] Aikar: thats one reason i never really messed with C and stuck to C++ on windows dev >_> i kept putting var decs intermingled with code and it bitched lol [18:08] floby has joined the channel [18:09] nerdEd has joined the channel [18:09] floby has left the channel [18:09] hoodoos: kristsk, is there anything about body there, I can't find it yet [18:10] yumike has joined the channel [18:10] WhenRaptors: if the RFC doesn't mention it, don't do it [18:10] kristsk: yeay [18:10] kristsk: yeah [18:10] jonaslund: Aikar: I started using alot of "C++", went back to C to avoid doing "OO" in all the wrong places [18:10] brianc has joined the channel [18:10] hoodoos: well, is node acts strange to add transfer-encoding: chunked for such requests? [18:10] jonaslund: Aikar: oh and some platforms i worked on earlier had shitty c++ compilers aswell [18:11] WhenRaptors: hoodoos: yes, but does it break anything? [18:11] jonaslund: Aikar: imho block scopes works most of the time [18:11] hoodoos: WhenRaptors, yes, sometimes, I use nginx to proxy requests and it won't proxy transfer-encoding: chunked requests :) [18:13] broofa has joined the channel [18:13] WhenRaptors: does node act oddly if the transfer encoding is not chunked [18:13] Aikar: jonaslund: lol, can still code C style in C++ :P most my work involved 1 or 2 classes at most lol [18:14] nilcolor has joined the channel [18:14] clarkfischer has joined the channel [18:15] hoodoos: WhenRaptors, mm, what do you mean? if I manualy set content-length: 0, everything is fine [18:15] mikeal has joined the channel [18:16] rauchg_ has joined the channel [18:16] janm has joined the channel [18:19] chrischris has joined the channel [18:19] davidascher has joined the channel [18:20] bradleymeck: 1. directory structure is a cluster in windows (look at a power user's %PATH%, ugggg) 2. The shell is lols (including you powershell, i just wanted a fing env variable) 3. Visual studio from a command line... yea... [18:20] bradleymeck: wow, scrolling [18:21] nerdEd_ has joined the channel [18:24] tmpvar has joined the channel [18:24] noahcampbell has joined the channel [18:25] ryah: ACTION looks around for a piece of rope to hang himself [18:25] Aikar: dont do it! [18:26] ryah: openssl has defeated me [18:26] Aikar: lol [18:26] kristsk: mhh [18:27] qFox has joined the channel [18:29] bronson has joined the channel [18:31] tmpvar: ryah, seriously? [18:32] augustl: is URL encoding built in somewhere? [18:32] bradleymeck: v8: encodeURIComponent(" lol! ") [18:32] v8bot: bradleymeck: "%20lol!%20" [18:33] bingomanatee has joined the channel [18:33] CIA-79: node: Ryan Dahl master * r56ab929 / (src/node_crypto.cc src/node_crypto.h): Remove unused parameter from crypto::Handle*Error - http://bit.ly/fGkDvB [18:33] CIA-79: node: Ryan Dahl master * ra48a075 / (lib/net.js lib/tls.js): better debug messages in net and tls - http://bit.ly/gI7OYc [18:33] CIA-79: node: Ryan Dahl master * ra0702b5 / (136 files in 14 dirs): Upgrade V8 to 3.1.2 - http://bit.ly/hXBrWu [18:33] augustl: bradleymeck: doh.. thanks :) [18:33] Country has joined the channel [18:33] bradleymeck: fing heck lazy sorting if hurting my head [18:34] Aikar: ryah: why +c on channel? :( now CIA doesnt stand out lol [18:34] shachaf has joined the channel [18:34] nejucomo has joined the channel [18:35] peol has joined the channel [18:35] peol has joined the channel [18:36] aheckmann has joined the channel [18:36] maushu has joined the channel [18:36] ryah: Aikar: oh, i don't know [18:36] ryah: how do i change it? [18:36] ryah: :/ [18:36] Aikar: i find banning people who abuse colors more enjoyable than +c :P [18:37] Aikar: freenode doesnt use anope services so im not sure... but look for a "mode lock" setting [18:37] yozgrahame has joined the channel [18:38] x_or has joined the channel [18:38] Aikar: ryah: oh they do use anope, its /cs set #node.js mlock +nt [18:38] piscisaureus has joined the channel [18:38] Aikar: do that and itll remove the +c lock [18:38] Poetro1 has joined the channel [18:38] SubStack has joined the channel [18:38] Aikar: then youll be able to remove it [18:39] inimino has joined the channel [18:39] x_or: When did nodeconf tickets go on sale? I missed that, drat. [18:39] jonaslund: ryah: hey, i removed some C99isms from http_parser.c (MSVC doesn't support C99) [18:39] jonaslund: want a patch for that ? [18:40] ryah: msvc doesn't support c99? what? [18:40] jonaslund: apperantly not [18:40] ryah: that can't be right [18:40] jonaslund: http://en.wikipedia.org/wiki/C99 [18:41] noahcampbell_ has joined the channel [18:41] jonaslund: ryah: i'm doing a a small experiment on trying to build node with scons to get the building into line with the V8 building [18:41] ryah: :| [18:41] ryah: jonaslund: oh, interesting [18:41] ryah: jonaslund: how's it going? [18:41] jonaslund: c-ares, http_parser compiled so far [18:42] mischief has joined the channel [18:42] galaxywatcher has joined the channel [18:42] jonaslund: libeio is giving me some troubles [18:43] jonaslund: although i just got an idea.. [18:43] tmpvar: did anyone figure out how we are going to handle libeio? [18:43] ryah: tmpvar: ? [18:43] jbergstroem: jonaslund: won't it be.. tedious to maintain that? [18:43] zzak has joined the channel [18:43] zzak has joined the channel [18:43] jonaslund: jbergstroem: actually i suspect it'll be less of fuzz [18:43] ryah: jbergstroem: if he can get it running properly, i'd use it [18:44] jonaslund: jbergstroem: V8 uses scons and afaik we pull V8 more than any other lib [18:44] tmpvar: ryah, last time we talked, it seemed like it was going to be a series of patches to libeio to work around the differences of io in win32 [18:44] dguttman has joined the channel [18:44] tedsuo has joined the channel [18:44] tedsuo has left the channel [18:44] case__ has joined the channel [18:45] jonaslund: jbergstroem: right now when building for mingw you'll fail the build if you have MSVC installed since scons picks MSVC as a compiler while the node waf script picks mingw [18:46] hellp has joined the channel [18:46] jbergstroem: jonaslund: oh, not very familiar with building on windows. good to know. when it comes to having scons doing most stuff for node, i'm all for it; it's just that everytime i dig into working with these build system i come out with fewer brain cells .. [18:47] benreesman has joined the channel [18:48] jchris has joined the channel [18:49] jonaslund: tmpvar: libeio prolly works well enough for development for the time being [18:49] edw has joined the channel [18:50] dguttman has joined the channel [18:50] jonaslund: tmpvar: windows has io completion ports that are probably kind of equalient to kernel events,kpoll or whatever it's called [18:50] dguttman has joined the channel [18:50] aguynamedben has joined the channel [18:53] softdrink has joined the channel [18:53] cjm has joined the channel [18:54] jonaslund: hey [18:54] dustinwhittle has joined the channel [18:54] jonaslund: libeio uses select? maybe a IOCP rewrite on windows would be combined with a support for epoll on linux and kevent on freebsd ? [18:55] TobiasFar has joined the channel [18:57] MikhX has joined the channel [18:58] prettyrobots has joined the channel [18:58] davidthings has joined the channel [19:01] zomgbie has joined the channel [19:02] pdelgallego has joined the channel [19:02] niklasfi has joined the channel [19:05] niklasfi: hello, this is an http related question, but i did not find an appropriate channel to ask on (tried #http but that does not exist). I would gladly be pointed to the right channel. the question is: how to i tell a client that only one connection to the server is permitted at a time? if i send 403 as a reply to the second request that stops the download with down them all [19:05] rburke has joined the channel [19:05] rburke has joined the channel [19:06] nmtmason has joined the channel [19:07] mikedeboer has joined the channel [19:08] tlrobinson has joined the channel [19:08] kristsk: nighty. [19:10] zomgbie has joined the channel [19:12] TheTruthIsHard has joined the channel [19:13] hunterloftis has joined the channel [19:14] hunterloftis: Question: demo server, ideally behind nginx (or something) so you can run demo1-demo10 on different :ports without a separate machine for each little test [19:14] TheTruthIsHard: An inconvenient truth: Asynchronous code is harder to maintain than synchronous code. [19:14] hunterloftis: Problem: some demos use websockets, which arent supported by nginx. Ideas? [19:14] Me1000 has joined the channel [19:15] TheTruthIsHard: Damn it, node.js sucks [19:15] TheTruthIsHard: Why can't I have a multidimensional array? [19:16] mscdex: hunterloftis: put the websocket tests on ports controlled directly by node? [19:16] hunterloftis: mscdex: So have demo1.server.com:90 for webscoket demo 1? [19:16] mscdex: v8: [['foo'], ['bar']] [19:16] v8bot: mscdex: [["foo"], ["bar"]] [19:16] mscdex: looks multidimensional to me [19:16] mscdex: :) [19:16] hunterloftis: mscdex: Considering that, makes it iffy to be used behind certain times of firewalls, etc [19:17] TheTruthIsHard: How do you declare a multidimensional array? [19:17] liar has joined the channel [19:17] jesusabdullah: This is javaSCRIPT, not java! [19:17] mscdex: hunterloftis: how is it any different than setting up a port for nginx? [19:17] TheTruthIsHard: var a[200]b[100] -- what I want [19:17] jesusabdullah: You just make it! [19:17] jesusabdullah: You mean [19:17] aurynn: TheTruthIsHard, just.. make it.. [19:18] jesusabdullah: a[200][100] [19:18] mscdex: TheTruthIsHard: you don't declare it, you just create and assign it however you want [19:18] jesusabdullah: ACTION had better get to work [19:18] TheTruthIsHard: Are arrays heap or stack then? [19:18] hunterloftis: mscdex: It's different because lots of proxies at businesses won't let their users visit blah.com:3000 [19:18] jonaslund: most things in JS is on the heap [19:18] TheTruthIsHard: ok [19:18] hunterloftis: mscdex: but might be the best solution for these simple demos [19:19] jonaslund: TheTruthIsHard: if you use closures then even function "local" variables gets onto the heap [19:19] jonaslund: since you have closures [19:19] mscdex: hunterloftis: i thought you were already doing blah.com:90, blah.com:91, etc for nginx? [19:20] hunterloftis: mscdex: blah.com:90, when behind nginx, can become demo1.blah.com:80 [19:20] hunterloftis: and then blah.com:91 can become demo2.blah.com:80 [19:21] Coal has joined the channel [19:22] TheTruthIsHard: Madonna and node and nginx -- my world is complete! [19:22] jonaslund: uhhh [19:22] jonaslund: vanilla libeio doesn't support win32 at all ? [19:22] dgathright_ has joined the channel [19:23] TheTruthIsHard: Hmm, I forgot how to do associative arrays in ECMAScript :( [19:23] aklt has joined the channel [19:23] Sebmaster: v8: {'assoc': 1} [19:23] v8bot: Sebmaster: SyntaxError: Unexpected token : [19:23] Sebmaster: :( [19:23] langworthy has joined the channel [19:24] BillyBreen has joined the channel [19:24] jonaslund: v8: [{'assoc' :1}] [19:24] v8bot: jonaslund: [{"assoc": 1}] [19:24] Sebmaster: huh? [19:24] TheTruthIsHard: I want a two-dimensional array: Incremental array with an associative array on the end [19:24] Sebmaster: v8bot is bad [19:24] jonaslund: v8bot uses the same repl as node? [19:24] jonaslund: i think i noticed the same problem there [19:24] TheTruthIsHard: Or I should say, I want an incremental array of associative arrays! :) [19:25] Sebmaster: v8: var a = {'assoc': 1} [19:25] v8bot: Sebmaster: undefined [19:25] Sebmaster: there we go [19:25] Sebmaster: v8: a={'assoc':1} [19:25] v8bot: Sebmaster: {"assoc": 1} [19:25] Sebmaster: yeea, got it [19:26] Aikar: i think hes leaving now [19:26] TheTruthIsHard: How do I declare an incremental array of associative arrays? Any ideas? [19:27] Aikar: TheTruthIsHard: there is no associative arrays in js [19:27] Aikar: only objects [19:27] ukev has joined the channel [19:27] TheTruthIsHard: So I can reference the array with: madonna[98]['likeaprayer'] [19:27] TheTruthIsHard: Is there a substitute? [19:27] Aikar: make madonna an array of objects [19:27] TheTruthIsHard: How do you declare that Aikar? [19:28] Aikar: madonna = [{foo:'1'}, {foo: '2'}] [19:28] Aikar: madonna[1].foo [19:28] Aikar: or madonna[1]['foo'] [19:28] Aikar: {} in js is an object, [ ] is an array [19:28] tanepiper: mikeal: is the head request compatible with 0.3.8 > API yet? jjust asking as i'm doing a lot of GET requests in this app :) [19:28] torvalamo has joined the channel [19:29] TheTruthIsHard: This is like JSON :D [19:29] FireFly|n900 has joined the channel [19:29] Aikar: .... [19:29] Aikar: json = javascript object notation [19:29] clarkfischer: hah [19:29] TheTruthIsHard: Sorry for the newb questions [19:29] tanepiper: is it JSON :D [19:29] Aikar: so of course its sim to json lol [19:29] ezmobius has joined the channel [19:29] niklasfi has left the channel [19:29] Aikar: json is just a more stricter form of javascript objects [19:29] jonaslund: i think i noticed the same problem there [19:29] clarkfischer: it's object literal notation [19:29] TheTruthIsHard: ACTION is a noder in training! :p [19:29] jonaslund: *facepalm* [19:30] mscdex: *facehp* [19:30] Aikar: iseewhatudidthere [19:30] mscdex: palm is no longer! [19:30] tanepiper: *facehairypalm* [19:30] mscdex: :S [19:30] clarkfischer: *faceharrypotter* [19:30] Aikar: TheTruthIsHard: should prolly learn about JS basics first. [19:31] TheTruthIsHard: Aikar: No time for that [19:31] Aikar: >_> [19:31] hosh_work has joined the channel [19:31] Aikar: then you dont have time to code w/e your doing :p [19:31] TheTruthIsHard: ACTION is making $90/hour to write node.js code [19:31] clarkfischer: whattt [19:31] tanepiper: and you don't know JS? [19:31] TheTruthIsHard: Right. [19:31] clarkfischer: I'll trade you [19:31] jonaslund: then learn it and don't expect us to do your job [19:31] tanepiper: someone's getting ripped off D: [19:31] TheTruthIsHard: They hired because I know C. [19:31] mscdex: you can't program in node if you aren't comfortable with javascript first [19:31] Aikar: how bout you pass that job onto us :p [19:31] TheTruthIsHard: jonaslund: I am learning :) [19:32] TheTruthIsHard: Aikar: I hire noders sometimes [19:32] rwaldron has left the channel [19:32] Aikar: and if your getting paid for it, how do you 'not have time', your getting paid to learn, so go learn [19:33] Aikar: w/o learning, its going to take you a while anyways [19:33] TheTruthIsHard: Seriously, I am learning [19:33] Aikar: trying to do the job w/o learning basics is basically getting other people to do your work for you and you get paid for it [19:33] TheTruthIsHard: JIT learning ;p [19:33] Aikar: wheres my 30$ for teaching you how to do arrays of objects :P [19:34] TheTruthIsHard: Aikar: Paid in full in gratitude. :) [19:34] Aikar: well i guess at least i dont have to pay taxes on that [19:34] TheTruthIsHard: hehe [19:34] Aikar: stupid taxes on paypal donations :( [19:34] mscdex: under-the-table gratitude [19:34] Aikar: ended up oweing taxes from extra income lol [19:34] admc has joined the channel [19:35] TheTruthIsHard: My taxes sometimes exceed what I make [19:35] TheTruthIsHard: Damn capital gains [19:35] clarkfischer: TheTruthIsHard, if you're a C programmer, and as long as you're familiar with callbacks and closures, you'll be fine. [19:35] TheTruthIsHard: yeah [19:35] ossareh has joined the channel [19:35] clarkfischer: JS isn't hard if you are a 'programmer' [19:35] Aikar: callbacks and closures is usually something a Dev is not going to know lol [19:35] Aikar: a c dev* [19:36] jonaslund: TheTruthIsHard: http://www.ecma-international.org/publications/files/ECMA-ST-ARCH/ECMA-262,%203rd%20edition,%20December%201999.pdf should be fully implemented [19:36] clarkfischer: well, if he is writing *ANYTHING* in node, he probably knows how to use callbacks [19:36] clarkfischer: since most of the apis are async [19:36] jonaslund: TheTruthIsHard: http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf <- current version but maybe not fully supported yet (and not well supported in browsers yet) [19:36] squeek: isaacs: around? [19:37] TheTruthIsHard: Of course, callbacks are all over my code :) [19:37] FireFly|n900 has joined the channel [19:37] TheTruthIsHard: My C++ binding is async too :) [19:37] piscisaureus has joined the channel [19:38] jonaslund: TheTruthIsHard: those docs are the ecmascript standard (basically the core of javascript) [19:38] clarkfischer: Where in the world does one find a $90/hr node.js job.... [19:38] clarkfischer: damn [19:38] TheTruthIsHard: clarkfischer: NYC :) [19:38] clarkfischer: Damn the west coast! [19:38] TheTruthIsHard: But I spend most of it [19:38] TheTruthIsHard: :( [19:38] tilgovi has joined the channel [19:38] clarkfischer: But you also get to have subways take you home when you're drunk ;) [19:38] TheTruthIsHard: Women are expensive ;( [19:38] Aikar: some rich person who thinks nodes a niche market and hard to find devs and thinks its worth 90/hr lol [19:39] jonaslund: around 80$ is my absolute minium rate when contracting [19:39] TheTruthIsHard: clarkfischer: I use hired carsw. [19:39] jonaslund: but that is only for short term jobs or for doing really fun stuff [19:39] TheTruthIsHard: *hired cars [19:39] clarkfischer: ACTION starts furiously working on his portfolio [19:39] Aikar: i dont bother with contract work anymore, too busy, full time job in which i also get to use node at, and i got my own personal projects i do when im at home [19:39] piscisaureus: Aikar: who :-) [19:39] mjr_: There are lots of programmers who make more than $90/hr to work on all kinds of software, even PHP stuff, if you can believe it. [19:39] TheTruthIsHard: Subways are for bluecollar workers [19:40] Aikar: piscisaureus: that guys employer lol [19:40] clarkfischer: Subways are awesome. [19:40] Aikar: it really depends on area too [19:40] jonaslund: Aikar: I have my own company, i do whatever i want most of the time until i run out of funds. then i contract for shorter periods [19:40] TheTruthIsHard: Self-respecting professionals in NYC ride in hired cars [19:40] Aikar: like in my state, 90$/hr would be unheard of, in cali, not so much :p [19:40] Zenergy has joined the channel [19:40] clarkfischer: In LA we don't have public transportation (to speak of) [19:40] clarkfischer: I have to drive my drunk ass home or pay through the nose for a cab [19:40] jonaslund: I live in bloody sweden and 90$ hours is fairly cheap [19:41] piscisaureus: seems like I'm grossly underpaid [19:41] Aikar: can get a 150k roomy 3 bedroom house here for 1k$/mo morg, so yeah cost of living is huge inmpact in pay [19:41] TheTruthIsHard: ACTION rides livery. [19:41] squeek: jonaslund: only because the USD got owned [19:41] clarkfischer: Ugh [19:41] TheTruthIsHard: piscisaureus: Most developers leave money on the table. [19:41] jonaslund: on the other hand living costs in Stockholm are fairly high compared internationally and there's a huge lack of developers [19:41] clarkfischer: What kind of formal qualifications do I need for a $90/hr dev job? [19:42] Zenergy: I would like to know this [19:42] squeek: oh, you're an 08. figures. [19:42] clarkfischer: ACTION cannot afford a bachelors degree [19:42] TheTruthIsHard: Aikar: Hah! I pay $4200/month for a two bedroom [19:42] jonaslund: (Not compared to NY/London but in the level slightly below) [19:42] mjr_: Degrees have little to do with it. [19:42] jonaslund: squeek: haha :D [19:42] jonaslund: squeek: where are you located ? [19:42] sprout1 has joined the channel [19:42] mjr_: Mostly you need to be good at what you do, and socialize so that employers find out. [19:43] tapwater has joined the channel [19:43] hornairs has joined the channel [19:43] TheTruthIsHard: <-- Not good at what he does, but for some reason looks the part/people think I am [19:43] swistak: GOOD LUCK IS ALSO HELPFULL [19:43] swistak: argh sorry for caps [19:43] clarkfischer: Well, I'd like to think I'm good at what I do, and as for socializing, I haven't any idea where to start. [19:43] TheTruthIsHard: I end up contracting out stuff [19:44] Zenergy: ... [19:44] clarkfischer: Right now I'm swamped with freebie websites for random dudes I've met [19:44] squeek: jonaslund: i London [19:44] piscisaureus: jonaslund: scons working out? [19:44] swistak: clarkfischer, start with github account and start submiting talk proposals [19:44] TheTruthIsHard: clarkfischer: Relate your trade to things they are familiar with [19:44] swistak: blog also helps [19:44] jonaslund: squeek: originally ? [19:44] Aikar: but yeah a 90$/hr job in NYR For TheTruthIsHard may be equiv to 40-50 where i live (NC) [19:44] squeek: .au [19:44] TheTruthIsHard: ALWAYS WEAR A NICE SUIT [19:44] Aikar: NYC* [19:44] clarkfischer: swistak, I've got a github account, but it's not impressive. [19:44] jonaslund: squeek: huh.. where did that 08 remark come from? :) [19:44] TheTruthIsHard: Aikar: Yeah, I spend it too freely too [19:45] swistak: clarkfischer, doesn't mather, write simple stuff, publish all that can be usefull, and blog/tweet about it [19:45] Sebmaster: jonaslund: Hows the rewrite going? [19:45] squeek: jonaslund: I know the dirty little secrets that go on in that country. [19:45] swistak: talk in your local RUG about it, submit talk proposals to conferences [19:45] TheTruthIsHard: Okay guys ttyl :) [19:45] tvon has joined the channel [19:45] jonaslund: Sebmaster: libeio is giving me a hard time [19:45] piscisaureus: jonaslund: what are you doing to libeio [19:46] piscisaureus: (rewrite like in rewriting node?) [19:46] clarkfischer: Right now I'm working on what will (hopefully) be an impressive HTML compression library using node+jsdom [19:46] jonaslund: piscisaureus: i'm trying to compile stuff with scons [19:46] jonaslund: piscisaureus: ignoring waf [19:46] piscisaureus: ok. sounds sane [19:46] tanepiper: whats the best way to string \u chars quickly from strings? [19:47] tanepiper: for example \u202e\u202d\u202cbees\u202c [19:47] jonaslund: piscisaureus: that way we could maybe get rid of that awful mingw/msvc mismash [19:47] tanepiper: when i JSON.parse it I get â.®â.­â.¬beesâ.¬ [19:47] jchris has joined the channel [19:47] warz has joined the channel [19:47] Sebmaster: jonaslund: Is the mingw build working currently? [19:47] jonaslund: tanepiper: that seems correct [19:47] piscisaureus: jonaslund: but why is there a problem with libeio in particular [19:47] swistak: tanepiper, that might be correct [19:48] swistak: might need good font to see it though [19:48] jonaslund: piscisaureus: not really sure yet.. a "initial" problem is that eio.c includes eio.h at the top [19:48] tanepiper: i think it is, damn must be flickr's stupid api :( it should just be 'bees' [19:48] piscisaureus: jonaslund :-/ [19:48] jonaslund: piscisaureus: ssize_t is undefined [19:48] felixge has joined the channel [19:48] felixge has joined the channel [19:48] jonaslund: anyhow i made a win32eio.c wrapper that just includes xthread.h first and then eio.c [19:49] jonaslund: (didn't care to read through the docs about how to do forced includes yet) [19:49] ajnasz has joined the channel [19:49] jonaslund: the problem is that the xthread.h patch that adds ssize_t (or was it ssize?) confuses the regular windows headers that gets included afterwards [19:49] piscisaureus: jonaslund: you can just patch libeio I guess. I did that already because it is not windows compatible out of the box [19:50] piscisaureus: just include windows.h first then :-) [19:50] jonaslund: piscisaureus: i'm gonna test something with the wrappe rfirst [19:50] superjudge has joined the channel [19:51] piscisaureus: jonaslund: just `typedef int ssize_t` should work [19:51] mscdex: bees? [19:51] mjijackson has joined the channel [19:52] jonaslund: piscisaureus: xthread.h does exactly that [19:52] tanepiper: mscdex: http://www.flickr.com/photos/bees/2362225867/ [19:52] tanepiper: as you can see the name of the account is bees [19:52] mscdex: seeb [19:52] mscdex: :p [19:52] liar has joined the channel [19:52] tanepiper: so why all these formatting unicode chars are there, i have no idea [19:52] isaacs: squeek: yo [19:52] tanepiper: ahhh [19:53] jonaslund: piscisaureus: I'll try moving the eio.h incldue [19:53] piscisaureus: ok [19:53] tanepiper: mscdex: weird, instead of a string it's using unicode chars to reverse [19:54] mscdex: tanepiper: the url has 'bees', but it says 'seeb' in the "By" [19:54] squeek: isaacs: cheers for that brah, turns out my npm install is hosed, gimme a tick [19:54] mscdex: flickr uses two separate account names? :S [19:54] mscdex: unless that's a gallery name? [19:54] isaacs: squeek: curl http://npmjs.org/install.sh | sh [19:54] mscdex: i've never really used flickr before, so i have no clue here :) [19:54] jonaslund: hummm [19:54] TheTruthIsHard: I'm doing it wrong: var messages = new Array(); messages[0].subject = "blah"; [19:54] jonaslund: i wonder if something else is going on [19:55] Frogal has joined the channel [19:55] TheTruthIsHard: v8bot: var messages = new Array(); messages[0].subject = "blah"; [19:55] v8bot: TheTruthIsHard: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [19:55] isaacs: TheTruthIsHard: indeed. messages[0] will be undefined [19:55] isaacs: v8: var messages = new Array(); messages[0].subject = "blah"; [19:55] v8bot: isaacs: TypeError: Cannot set property 'subject' of undefined [19:55] TheTruthIsHard: isaacs: How do you make it not undefined? :\ [19:55] jonaslund: TheTruthIsHard: var messages=[{subject:"blah"}]; [19:55] isaacs: v8: var messages = []; messages[0] = {some:"object}; messages[0].subject = "blah"; messages [19:55] v8bot: isaacs: SyntaxError: Unexpected identifier [19:56] mscdex: heh [19:56] jonaslund: or var messages=[]; messages.push({subject:"blah"}); [19:56] isaacs: v8: var messages = []; messages[0] = {some:"object"}; messages[0].subject = "blah"; messages [19:56] v8bot: isaacs: [{"some": "object", "subject": "blah"}] [19:56] TheTruthIsHard: Ah, push! [19:57] isaacs: v8: var messages = []; messages.push({subject:"blah"}); messages [19:57] v8bot: isaacs: [{"subject": "blah"}] [19:57] isaacs: TheTruthIsHard: ^ [19:57] TheTruthIsHard: thnx [19:57] jonaslund: piscisaureus: something stinks about my build errors though [19:58] jesusabdullah: v8: var hardness = []; hardness.push({material: "truth", scale: "mohs", value: 11}); hardness [19:58] v8bot: jesusabdullah: [{"material": "truth", "scale": "mohs", "value": 11}] [19:58] jesusabdullah: hah [19:58] astoon has joined the channel [19:58] SubStack: nice palm media blitz from hp, but no mention of node! [19:59] jesusabdullah: Who likes materials science jokes?? [19:59] jesusabdullah: SubStack: :( [19:59] SubStack: silly HN comments [19:59] jonaslund: ARGHHHHHHHHHHHHH [19:59] jesusabdullah: That's the best part of the palm phones! [19:59] jesusabdullah: SubStack: link? [19:59] SubStack: I know right? [19:59] jonaslund: piscisaureus: THERE?! [19:59] TheTruthIsHard: SubStack: How are they using node? [19:59] techwraith has joined the channel [19:59] piscisaureus: yeah [19:59] piscisaureus: umm brb [19:59] SubStack: TheTruthIsHard: from what I gather it's a pretty important chunk of webos [19:59] squeek: isaacs: Yeah, my npm is really, really hosed. Suggestions: npm uninstall to wipe out every last trace of its existance? [20:00] mscdex: SubStack: they could have used some of your illustrations! ;-) [20:00] TheTruthIsHard: SubStack: RU seriouz? [20:00] SubStack: http://news.ycombinator.com/item?id=2197945 [20:00] TheTruthIsHard: What does node.js do for WebOS? [20:00] jesusabdullah: I think the node feature is cool enough that I'd seriously consider getting one over an android right now, despite having never seen a palm phone [20:00] TheTruthIsHard: WebOS apps are node? :p [20:00] jesusabdullah: TheTruthIsHard: My understanding is that you program your apps in javascript. [20:00] jesusabdullah: on node [20:01] colinclark has joined the channel [20:01] mjr_: webos uses node internally for external service integration [20:01] bartt has joined the channel [20:01] jonaslund: hmm [20:01] mjr_: creationix is working on it, but he isn't here right now [20:01] SubStack: TheTruthIsHard: ask creationix, who works at hp doing node stuffs [20:01] jonaslund: how do i "revert" a file with git ? [20:01] SubStack: hah yep [20:01] mjr_: He tweeted that there might be a webos-related announcement today. [20:01] squeek: isaacs: on second thoughts could it be that /usr/local/lib/node/ isn't in node's default require path? [20:02] TheTruthIsHard: So will webOS kill Android? [20:02] isaacs: squeek: could be [20:02] jesusabdullah: Hmm. webOS tablet, it seems? [20:02] jesusabdullah: TheTruthIsHard: Unlikely, I'd think. But who knows? [20:02] jonaslund: haha [20:02] TheTruthIsHard: After all, both are webkit and Linux [20:02] isaacs: squeek: what platform? what version of node? how did you install node and npm originally? [20:02] jonaslund: webOS kill android :) [20:02] jesusabdullah: I saw on the supabowl commercials that Motorola has a droid tablet out now [20:02] jonaslund: does anyone use webos ? [20:03] jesusabdullah: Well, HP [20:03] mscdex: i'd never buy motorola [20:03] jesusabdullah: Why come, mscdex? [20:03] mscdex: such a bad track record with rom updates [20:03] TheTruthIsHard: Nokia is the best [20:03] jesusabdullah: I mean, sure, everyone knows Nokia is where it's at, but [20:03] mscdex: and empty promises [20:03] jesusabdullah: TheTruthIsHard: ^5 [20:03] ezmobius_ has joined the channel [20:03] squeek: isaacs: OS X 10.6.6, 0.2.4, brew install node, and the standard shell script install of npm. [20:03] jonaslund: Nokia *chuckle* [20:03] stride: but they made the x-files mobiles! [20:03] TheTruthIsHard: Nokia is about to destroy both Apple and Android [20:03] squeek: err, 0.2.5 [20:03] SubStack: lulnokia [20:03] SubStack: not even erlang can save them now! [20:04] mscdex: nokia has bet the farm on meego [20:04] jonaslund: SubStack: erlang is from ericsson [20:04] mscdex: they don't have anything else [20:04] SubStack: pfft, same thing [20:04] jonaslund: mscdex: no they haven't .. and that is the problem [20:04] stride: TheTruthIsHard: uh, how? [20:04] jesusabdullah: I bet Nokia will keep a pretty solid stronghold in their own country, at worst [20:04] TheTruthIsHard: Nokia is going to make tablets [20:04] mscdex: jonaslund: they have but they're not doing enough with it [20:04] jonaslund: SubStack: sonyericsson (The mobile division) is doing android these days and actually quite successfully [20:04] Ari-Ugwu has joined the channel [20:05] stride: every ass makes tablets nowadays [20:05] SubStack: jonaslund: well maybe that's why nokia isn't doing so well, not enough erlang [20:05] mscdex: they said they're coming out with 1 meego device this year [20:05] mscdex: or so i read [20:05] jonaslund: SubStack: ericsson itself is mostly about systems nowadays, leaving all consumer stuff to sonyericsson [20:05] jonaslund: the playstation mobile is an android phone i think [20:05] mscdex: yep [20:05] mscdex: xperia play [20:06] jonaslund: i really can't fathom why they do a playstation mobile and then also "playstation portable 2" [20:06] jonaslund: make 2 sucky things instead of one good thing [20:06] jesusabdullah: That's Sony for you [20:06] jesusabdullah: Maybe they just stole the plans from Ben Heck [20:06] jesusabdullah: :D [20:07] jonaslund: jesusabdullah: well apperantly the PS phone is a x10 mini pro with the keyboard exchanged for a gamepad [20:07] jonaslund: the x10 is a huge hit in sweden [20:07] TheTruthIsHard: I love using anonymous functions for callbacks. It's the best thing in Javascript! [20:07] TheTruthIsHard: Anyone agree? [20:07] stride: jesusabdullah: you don't steal. you find stuff in bars [20:07] squeek: lol jizzmodo [20:07] jesusabdullah: TheTruthIsHard: Preachin' to the choir :D [20:07] jonaslund: it's a very small and usable phone [20:07] TheTruthIsHard: ;p [20:07] jonaslund: and cheap [20:07] aguynamedben has joined the channel [20:08] jesusabdullah: TheTruthIsHard: Though, multiple nested callbacks can get hairy. It's an interesting problem. [20:08] TheTruthIsHard: Microsoft and Nokia will partner to destroy everyone [20:08] jonaslund: ACTION suspects the playstation phone will outsell playstation portable 2 by a huge factor [20:08] TheTruthIsHard: Whayt goes wrong with multiple nested callbacks, as long as everything happens in the right order? [20:08] jonaslund: Nokia needs to kill a few darlings [20:08] jonaslund: they have far too many [20:09] jesusabdullah: Well, nothing really GOES wrong, but it ends up being a lot of indentation [20:09] jonaslund: the problem is that when they cut stuff people are gonna hate them [20:09] jesusabdullah: Offer to sell? [20:09] TheTruthIsHard: jesusabdullah: That's why I have two screens ;p [20:09] jesusabdullah: :D [20:09] clarkfischer: If you name the multiple nested callbacks it can be quite pretty [20:09] ehynds: is it a bad idea to set exports = {} rather than define each method individually? [20:09] jesusabdullah: One time, SubStack came back from coding something and said, "My code looked like this: >" [20:09] Coal has joined the channel [20:10] jesusabdullah: Good times [20:10] clarkfischer: there's a great thread on the mailing list about the pros/cons of async programming [20:10] mjr_: Anybody used the new https server with iOS clients? [20:10] piscisaureus: jonaslund: back [20:10] piscisaureus: what stinks? [20:10] Aikar: ehynds: no but you need to do module.exports = {} [20:10] Aikar: not exports = {} [20:10] Aikar: as exports will then be decoupled from module [20:11] mjr_: I can't get it to verify my server cert, but Safari is just fine with it. And iOS works fine with stunnel. [20:11] Aikar: ehynds: i do most my exports like module.exports = {}; its fine [20:11] ehynds: Aikar, thanks [20:11] jesusabdullah: What's really great is when people think that the right solution to fixing the > problem is to add coroutines ;) [20:11] lukegalea: Hey everyone.. I asked earlier when everyone was asleep: but has anyone toyed with ajaxim ?? Anything positive/negative to say before we go down that road? [20:11] Aikar: whats ajaxim? :P [20:11] MrTopf has joined the channel [20:11] jesusabdullah: I'm also curious [20:11] jesusabdullah: Instant messaging framework, according to ddg [20:12] lukegalea: http://ajaxim.com/ [20:12] lukegalea: yep, they have a node implementation of the server side [20:12] Aikar: so you want to replace it with a node system [20:12] lukegalea: based on express + connect [20:12] isaacs: squeek: ok, that's why it didn't work. when you installed npm, it was back when Homebrew node would confuse npm. [20:12] Me1000 has joined the channel [20:12] edw has joined the channel [20:12] squeek: isaacs: yeah I hosed my node install, putting in 0.2.6 [20:12] jesusabdullah: Huh. Looks kinda like facebook chat [20:13] isaacs: squeek: ok, cool [20:13] lukegalea: We are currently using http-bind + ejabberd. Not working that great. I would love to hear from a noder that had used ajaxim. [20:13] isaacs: squeek: on the plus side, `brew rm node` should take npm with it [20:13] jonaslund: piscisaureus: deps/libeio/xthread.h line 21 ... recognize it? :P [20:13] squeek: isaacs: it didn't, I had to go in there and fish it out, sadly. [20:13] isaacs: ew [20:13] piscisaureus: jonaslund: noh [20:13] piscisaureus: it's trouble with your include path I guess [20:14] jonaslund: there's a missing semicolon there [20:14] jesusabdullah: lukegalea: I haven't used it, obviously, but it sounds like it's built on fairly solid technologies and it hasn't broken my computer yet. If it looks like what the doctor ordered to you, what would you lose by trying it out? [20:14] jonaslund: so i was getting weird-ass errors all over the place that i though were releated to that eio.h thingy [20:14] isaacs: squeek: npm (current) should work fine with a homebrew installed node, but you'll probably want to manually add /usr/local/lib/node to your NODE_PATH [20:15] jesusabdullah: Every time I see "eio.h" I think, "eieio.h" [20:15] piscisaureus: jonaslund: maybe gcc is a little more forgiving than msvc [20:15] jonaslund: piscisaureus: It's #idef _WIN32 .... #ifndef ..mingw [20:15] lukegalea: jesusabdullah: ya, that's the next step. It's just when you have a fully working implementation it's easy to feel that the grass is greener over there. But the big difference between the node solution and the erlang one is that I've been able to understand all the node code given a few mins to review... whereas there's a **TON** of technology required to do the equivelent in ejabberd. [20:16] lukegalea: I'll report back :) [20:16] piscisaureus: jonaslund: har har. and you manually defined __MINGW32__ trying to fix stuff [20:16] jonaslund: piscisaureus: no.. look at the line again [20:16] jonaslund: piscisaureus: the typedef there lacks a semicolon [20:16] jesusabdullah: lukegalea: So, you already have a chat thing implemented? [20:16] tvon has joined the channel [20:16] piscisaureus: owwww [20:16] jonaslund: so it was borking up things in other include files [20:16] piscisaureus: hehe [20:17] softdrink has joined the channel [20:17] aguynamedben_ has joined the channel [20:17] piscisaureus: probabaly that xthread.h was never tested on windows, let alone msvc :-) [20:17] jesusabdullah: lukegalea: I'd imagine that, at worst, you waste some time playing with node.js and end up reverting to your existing solution. [20:17] ezmobius has joined the channel [20:18] lukegalea: jesusabdullah: Well, I've been yearning for an excuse to use node at work instead of just in the evenings.. :) This looks like it might be it ;) [20:19] jonaslund: piscisaureus: did you try using this one? http://locklessinc.com/articles/pthreads_on_windows/ [20:19] squeek: isaacs: schweeeeet. fixed. thanks. [20:19] squeek: now to get this puppy up. [20:19] isaacs: :D [20:19] piscisaureus: jonaslund: no, this: http://sourceware.org/pthreads-win32/ [20:20] jonaslund: what was the problem with that one ? [20:20] piscisaureus: erm, nothing [20:20] piscisaureus: it is the one that comes with mingw [20:20] jonaslund: oh ok [20:20] piscisaureus: the only problem is that I couldn't link it statically without causing segfautls [20:20] jonaslund: you said you tried something else aswell ? [20:22] jesusabdullah: /!\ ATTENTION /!\: I'm getting to play with a research-grade freezer. I just mashed the set point to -40 C. THAT IS ALL. [20:22] piscisaureus: jonaslund: I was planning to drop libeio entirely and with that get rid of libpthreads [20:22] jesusabdullah: This is the good part about my job. Lotsa funky toys. [20:22] piscisaureus: but that's more of a long term plan [20:22] jonaslund: piscisaureus: yeah i know [20:22] jesusabdullah: Now if only I could program them with jabbascripts... >:3 [20:22] jonaslund: piscisaureus: but i'm working short-term now :) [20:22] piscisaureus: that's good [20:22] zylo has joined the channel [20:22] piscisaureus: I think you can compile that pthreads thingie on msvc tho [20:23] jonaslund: piscisaureus: btw.. if you're gonna do away with libeio you should get someone to take a look at epoll and kevent at the same time [20:23] piscisaureus: jonaslund: I think libev supports kqueue and epoll [20:23] heavysixer has joined the channel [20:24] Ratty_: ls [20:24] Ratty_: bah [20:24] mikedeboer has joined the channel [20:24] kordless has joined the channel [20:24] squeek: Ratty_: at least you weren't putting a sudo password prompt in the wrong window. [20:24] jonaslund: piscisaureus: hmm.. so what is libeio used for ? [20:25] piscisaureus: manage a thread pool in which syncronous file operations are run [20:25] piscisaureus: so they appear nonblocking [20:26] squeek: isaacs: https://gist.github.com/fb93a4e6f27bcf95d4e9 FFFFFFUUUUUUUUUUU [20:26] tilgovi has joined the channel [20:26] Coall has joined the channel [20:26] softdrink: does anyone know of any other libraries similar to backbone.js offhand? [20:27] jonaslund: hmm ok [20:27] omni5cience: softdrink: similar but different? [20:28] softdrink: in the same family, solving similar problems, etc [20:28] isaacs: squeek: weird. try again? [20:28] squeek: weird. it's up now. [20:28] isaacs: kewl [20:29] isaacs: squeek: sometimes doing "unpublish" and then re-publishing works [20:29] omni5cience: like an mvc framework? [20:29] isaacs: squeek: things will get more stable when i get npm using the new http client api [20:29] squeek: oooh. [20:29] omni5cience: I've heard about knockout.js [20:30] mikeal has joined the channel [20:30] aurynn: Interesting. Updated to newer express/connect and now my form inputs have +'s instead of spaces. [20:30] mikeal: everyone in the bay area needs to come to jsBBQ [20:30] mikeal: http://jsbbq.org/ [20:30] tanepiper: aurynn: as they should! [20:30] ezmobius_ has joined the channel [20:31] aurynn: tanepiper, ...? [20:31] jmar777 has joined the channel [20:31] tanepiper: aurynn: URLencoded form data [20:32] aurynn: Yes, I was expecting it to be decoded before it got to my routes. [20:32] tanepiper: mikeal: did you get my ping from earlier? [20:32] tanepiper: aurynn: oh [20:32] mikeal: tanepiper: nope [20:32] aurynn: as it was prior to the update [20:32] tanepiper: mikeal: does head request work with 0.3.8? i'm doing a hell of a lot of GET request in this app :D [20:33] mikeal: master, yes [20:33] ezmobius has joined the channel [20:33] tanepiper: cool, shall grab now [20:33] mikeal: API should be compatible [20:33] mikeal: even though the implementation shifted a lot [20:34] tanepiper: i'll feedback any bugs i find, got a lot of implementation to do using request [20:34] aldonline has joined the channel [20:34] mikeal: awesome [20:34] mikeal: that's what i need [20:34] mikeal: i want to get some feedback before i push a release [20:35] mAritz has joined the channel [20:36] TheTruthIsHard: Do you ever have days when you write terrible code because you can't think creatively enough/or aren't inspiired to write elegant code? :\ [20:36] w0rse_ has joined the channel [20:36] TheTruthIsHard: I am writing garbage code today, but I have no choice--I have to meet the deadline at the end of the day [20:37] Ratty_: That's when you need to smoke a spliff [20:37] TheTruthIsHard: true dat [20:37] aurynn: so bodyDecoder isn't firing properly [20:37] aurynn: hmm [20:37] Bioxyde has left the channel [20:38] mnot has joined the channel [20:38] TheTruthIsHard: My keyboards are all sticky and sugary :\ [20:39] aurynn: tjholowaychuk, any thoughts on why the bodyDecoder() middleware isn't decoding my input properly? [20:39] tjholowaychuk: aurynn: what's the input? [20:39] aurynn: Just some basic text, via POST [20:40] tjholowaychuk: aurynn: one sec [20:41] aurynn: Sure [20:42] jonaslund: TheTruthIsHard: your name doesn't happen to be Rod ? [20:42] chrischris has joined the channel [20:42] TheTruthIsHard: Rod? [20:42] tobetchi has joined the channel [20:42] jonaslund: http://thedailywtf.com/Articles/Meet-Rod.aspx [20:43] isaacs: ryah: for 0.4, you still want require.paths to be mutable? [20:43] isaacs: ryah: if so, is it alright if the node_modules paths aren't in it? [20:43] aurynn: tjholowaychuk, node 0.2.6, if tat matters [20:43] aurynn: *that [20:44] tjholowaychuk: aurynn: no no, just patching my stuff one sec lol [20:44] tjholowaychuk: will release a new version right away [20:44] aurynn: Oh, awesome :) [20:44] broofa has joined the channel [20:46] jtsnow has joined the channel [20:47] tjholowaychuk: isaacs: if a parent module has the dep 'foo: 0.0.4', and some other deps use this module as well, but say have 'foo: >= 0.0.3' will they use 0.0.4? or stick with 0.0.3? [20:47] tjholowaychuk: basically the issue is that im finding myself releasing larger projects due to tiny dependency changes [20:47] isaacs: tjholowaychuk: if 0.0.4 satisfies them, then they may get it [20:47] tjholowaychuk: even though the previous still work fine (for most people) [20:47] tjholowaychuk: ok [20:47] tjholowaychuk: cool [20:47] isaacs: tjholowaychuk: npm does try to reuse deps wherever possible. [20:48] isaacs: it doens't prune any more, though, because that opened up a few hornets' nests. [20:48] TheTruthIsHard: Is node.js perfect? [20:48] isaacs: if you want to prune, you can do npm update foo --prune [20:48] isaacs: TheTruthIsHard: no! [20:48] isaacs: TheTruthIsHard: it's nowhere near perfect! (yet) [20:48] aurynn: TheTruthIsHard, Yes, in that everything is perfect. [20:48] Ratty_: node.js is still a baby [20:49] aurynn: It, like all programming languages, allows the perfection of the programmers' soul to emerge. [20:49] bingomanatee has joined the channel [20:49] adulteratedjedi has joined the channel [20:49] isaacs: it is not the platform, but WE that are perfect! [20:49] isaacs: heh [20:49] TheTruthIsHard: Is node.js cooler than PHP? [20:49] jetienne: if there is a bug, the plateform is to blame tho [20:49] aurynn: I don't think anyone has done thermal conductivity tests on programming languages. [20:50] tjholowaychuk: aurynn: connect 0.5.9 is out, with my one stupid dep change [20:50] tjholowaychuk: the querystring mod had a bug [20:50] jesusabdullah: Did somebody say thermal conductivity? [20:50] jesusabdullah: This happens to be my area of expertise [20:50] jetienne: tjholowaychuk: btw current dox got a bug in " escaping in the output html [20:50] TheTruthIsHard: Is node.js better than PHP? [20:50] tmpvar: yes [20:50] jonaslund: no [20:50] TheTruthIsHard: sweet [20:51] jetienne: TheTruthIsHard: no, but you are :) [20:51] aurynn: TheTruthIsHard, define "better" [20:51] amacleod has joined the channel [20:51] TheTruthIsHard: aurynn: More leet [20:51] jetienne: better = less $ [20:51] jonaslund: oh geez [20:51] tmpvar: better in every way? yes [20:51] jesusabdullah: Man, I really need to move to Oakland [20:51] jesusabdullah: >_< [20:52] TheTruthIsHard: Node.js is more elite than PHP imo [20:52] RushPL has joined the channel [20:52] TheTruthIsHard: But objecctive C in webappps pwns too [20:52] omni5cience: TheTruthIsHard: Tots [20:53] omni5cience: :P [20:53] aurynn: tjholowaychuk, still seeing the issue. [20:53] jesusabdullah: I should put node.js in my thermotron [20:53] NickP: I need to truncate an HTML string - is there an easy way in JS to append closing tags to the truncated string if it needs them? Something similar to HTML Tidy, but in JS? [20:53] tjholowaychuk: aurynn: maybe npm didnt update "qs" [20:53] jetienne: TheTruthIsHard: you are a poor troller, go practice [20:53] jesusabdullah: then we could say it's the coolest programming language around [20:53] heavysixer_ has joined the channel [20:53] TobiasFar has joined the channel [20:53] aurynn: hm [20:53] aurynn: I'll update that [20:53] isaacs: jesusabdullah: yes, you should. oak land is made of win. [20:53] jesusabdullah: and by language I mean, umm [20:54] TheTruthIsHard: jetienne: Practice in #rubyt? [20:54] jetienne: TheTruthIsHard: yep good place, go [20:54] jesusabdullah: environment, or something [20:54] jesusabdullah: isaacs: I stayed with substack and pkrumins when I went to a conference in SF in mid-December. [20:54] aurynn: tjholowaychuk, Got it! :) Thanks muchly [20:54] jesusabdullah: isaacs: I liked Oakland more than SF, which was surprising. [20:55] isaacs: jesusabdullah: yeah, it smells nicer, and we have more trees. [20:55] isaacs: jesusabdullah: there are dodgy parts, of course. lotta factories and poor people on the west side. [20:55] TheTruthIsHard: jetienne: Sorry, gong back to coding :) [20:55] TheTruthIsHard: ttyl [20:56] jesusabdullah: Yeah, definitely was a little scared of West Oakland while on the BART [20:56] chrischr_ has joined the channel [20:57] dspree has joined the channel [20:58] slaskis: tjholowaychuk: tobis browser seems to fail whenever set-cookie is an array [20:58] tjholowaychuk: slaskis: possibly, node is a douche and has to many options there [20:58] shiawuen has joined the channel [20:58] tjholowaychuk: so i may not have covered that [20:58] tjholowaychuk: cant remember [20:59] slaskis: tjholowaychuk: allright, is the headers parsing something that's changed (just updated to 0.3.8 so it could be that?) [20:59] tjholowaychuk: slaskis: yeah i think its always an array now or something [21:00] iszak has joined the channel [21:00] slaskis: ah, well that's good, then i don't have to check for it being both [21:00] altamic has joined the channel [21:00] tjholowaychuk: yup lol [21:00] tjholowaychuk: unless that is not the case, havent played with 0.3.x much yet [21:00] aurynn: Is there a node-powered bugtracker yet? [21:00] tjholowaychuk: hope its normalized now [21:02] tim_smart: Google Chrome vim bindings are hot. [21:02] pauls has joined the channel [21:02] mikeal1 has joined the channel [21:03] jonaslund: piscisaureus: there ? [21:03] piscisaureus: yeah [21:03] jonaslund: hmm [21:03] slaskis: tjholowaychuk: also, the cookie parsing fails with a cookie with Path= instead of path= (i've added toLowerCase to mine, i hope it won't break anything else) [21:03] jonaslund: piscisaureus: how is the sys/time.h time.h relationshpi [21:03] jonaslund: msvc lacks a sys/time.h [21:03] tjholowaychuk: slaskis: wtf, who uses Path ? [21:03] tjholowaychuk: ive never even seen that [21:04] broofa_ has joined the channel [21:04] jonaslund: piscisaureus: could you try compiling with time.h instead of sys/time.h to see if it works ? [21:04] jonaslund: piscisaureus: since the sys/time.h dependency is for win32 [21:04] piscisaureus: included from where? [21:04] jonaslund: eio.c [21:04] jonaslund: unistd.h also doesn't exist [21:04] montylounge has joined the channel [21:04] jonaslund: lemme see what requiers it [21:05] broofa has joined the channel [21:05] jonaslund: utime.h [21:05] slaskis: tjholowaychuk: haha the website i'm parsing does, some kind of python thing [21:05] tjholowaychuk: boo [21:05] jonaslund: let's see where this ends up [21:05] broofa has joined the channel [21:06] alek_br has joined the channel [21:06] BillyBreen has joined the channel [21:06] piscisaureus: jonaslund: afaict sys/time.h is used only on posix [21:06] marcab has joined the channel [21:06] jonaslund: ok a bunch of compile errors [21:06] slaskis: tjholowaychuk: should i add these as issues? in case you want to keep track for some reason [21:06] nilcolor has joined the channel [21:06] tjholowaychuk: slaskis: yeah sure [21:07] hwinkel has joined the channel [21:07] piscisaureus: jonaslund: oh wait [21:07] slaskis: tjholowaychuk: there was already one... https://github.com/learnboost/tobi/issues#issue/23 [21:08] piscisaureus: *wrong libeio :-( [21:08] tjholowaychuk: slaskis: oh, shit. github never tells me these things [21:09] jameshome_ has joined the channel [21:09] piscisaureus: jonaslund: just time.h works for me [21:09] jonaslund: cool [21:09] jonaslund: revert that.. i'll include it if i get stuff compiling [21:09] evl has joined the channel [21:09] piscisaureus: jonaslund: unistd can just go away entirely [21:11] noahcampbell_ has joined the channel [21:14] jchris has joined the channel [21:14] slaskis: tjholowaychuk: another thing with tobi (i know, nag nag) is that the jquery object it exposes is sort of broken, i remember we talked about it earlier here about a month ago [21:15] tjholowaychuk: slaskis: jquery + jsdom always seems really broken whne i use it [21:15] slaskis: but it looses context in an $.fn.each [21:15] tjholowaychuk: regardless what project [21:15] slaskis: haha [21:16] slaskis: well, this particular issue can be fixed though [21:16] slaskis: don't remember what i did but i got it working last time i played with it [21:17] tmpvar: tjholowaychuk, have you tried html5 as the parser? [21:17] slaskis: stupidly enough it doesn't seem like i commited that fix [21:17] tjholowaychuk: tmpvar: nope not yet, that guy tweeted me saying it was better though [21:17] tjholowaychuk: ill have to try [21:17] jonaslund: piscisaureus: hmmm [21:17] piscisaureus: ~ ~ ~ [21:18] tmpvar: i'd like to hear the results, if they are positive I would consider making it the default parser [21:18] slaskis: this one? https://github.com/aredridel/html5 [21:18] tmpvar: yes [21:18] tfe_ has joined the channel [21:19] slaskis: it also uses jsdom? [21:19] tmpvar: there is an option to use Aria's html5 parser in jsdom [21:20] tmpvar: it used to include jsdom, not sure if it still does [21:20] slaskis: oh, cool [21:22] dude_ has joined the channel [21:22] malkomalko has joined the channel [21:22] jonaslund: piscisaureus: where is DIR defined in mingw ? [21:23] piscisaureus: DIR like struct DIR? [21:23] tokumine has joined the channel [21:23] piscisaureus: jonaslund: what context? [21:24] jonaslund: deps\libeio\eio.c(282) : error C2061: syntax error : identifier 'DIR' [21:24] piscisaureus: jonaslund: ah [21:24] piscisaureus: dirent.h [21:24] jonaslund: it's because of a define that has DIR *something [21:24] jonaslund: hmm [21:24] bingomanatee has joined the channel [21:24] kiddphunk has joined the channel [21:25] astoon has joined the channel [21:25] jonaslund: i wonder if mingw wraps the win32 equivalents [21:25] piscisaureus: jonaslund: if you can't get it to work, comment it out [21:26] jonaslund: piscisaureus: ah yeah dir is dirent.h [21:26] piscisaureus: I think the msvcrt equivalents are _findfirst()/findnext() [21:26] jonaslund: i wrote an abstrcation for this ages ago [21:26] jonaslund: for win32 vs *nix [21:26] ryah: yes. fixed the bug [21:26] jonaslund: piscisaureus: yes they are [21:27] piscisaureus: jonaslund: just drop it for the moment [21:27] piscisaureus: it's more useful now to get a list of issues than trying to solve them one by one [21:27] nerdEd has joined the channel [21:27] jonaslund: could be [21:27] piscisaureus: ryah: congrats. whatever the bug was :-) [21:28] CIA-79: node: 03Ryan Dahl 07master * rdafd6d9 10/ lib/tls.js : TLS: Don't give up if you can't write 0 bytes - http://bit.ly/e3dL4Q [21:28] piscisaureus: jonaslund: eventually we will call the windows api directly so this posix dir stuff is going away anyway [21:28] jonaslund: piscisaureus: if i'm gonna need tons and tons of silly fixes everywhere getting out the important parts for compiling will be annoying aswell [21:28] piscisaureus: true :=) [21:28] piscisaureus: it sucks [21:29] piscisaureus: I have been procrastinating this for quite some time now. [21:29] tanepiper: mikeal1: ping [21:29] jonaslund: right now it's still not more than 20 lines in total excluding the scons script (that is maybe 20 lines itself so far with c-ares, pthread,etc) [21:30] markp_ has joined the channel [21:30] altamic has joined the channel [21:30] altamic has joined the channel [21:30] markp_: hello gentlemen, i have a question involving piping data to a child process [21:31] markp_: i'm piping data from an HTTPClientResponse into a python script [21:31] markp_: the python script never seems to see EOF [21:31] ukev has joined the channel [21:31] swistak has joined the channel [21:31] markp_: i know the script works b/c i do "cat a_file.txt | python myscript.py" and the script terminates [21:31] fatjonny has joined the channel [21:32] piscisaureus: ryah: put the "logs at http://nodejs.debuggable.com/" message back ... [21:33] Coal has joined the channel [21:35] jakehow has joined the channel [21:36] Ond has joined the channel [21:36] rot13 has joined the channel [21:37] chris6F has joined the channel [21:39] indexzero has joined the channel [21:43] ryah: rauchg_: how do i force xhr in socket.io? [21:44] Elven_Thief has joined the channel [21:44] stephen_mcd has joined the channel [21:47] sprout has joined the channel [21:48] jchris has left the channel [21:48] EyePulp: ryah: on the client side? you limit the transports [21:48] spetrea-home: guess what dudes [21:48] spetrea-home: I cooked again [21:48] spetrea-home: fish [21:49] spetrea-home: in a big way [21:49] spetrea-home: now with fried sweet potatoes [21:49] EyePulp: do you have adequate ventilation? [21:49] spetrea-home: EyePulp: all the way man, all teh way [21:49] spetrea-home: EyePulp: sure I got it [21:49] EyePulp: you may be reminded you cooked fish for a long time otherwise. [21:49] adulteratedjedi has joined the channel [21:49] spetrea-home: EyePulp: lol [21:49] EyePulp: =P [21:50] spetrea-home: EyePulp: only haters remind that man [21:50] sprout2 has joined the channel [21:50] spetrea-home: EyePulp: only haters [21:50] spetrea-home: they be hatin' [21:50] spetrea-home: but I'm breaking their nose with the smell of this fish [21:50] EyePulp: what kind of fish? [21:52] davidascher has joined the channel [21:54] bradleymeck has joined the channel [21:55] chris6F_ has joined the channel [21:57] hwinkel has joined the channel [21:57] jonaslund: piscisaureus: i found some laxly licenced library [21:57] jonaslund: piscisaureus: for dirent [21:58] piscisaureus: nom nom nom [21:58] piscisaureus: use ut [21:58] piscisaureus: for so long as it is needed [21:58] ryah: rauchg_: yt? [21:59] jonaslund: utimebuf hmm [22:00] isaacs: ryah: hey. node_modules patch sent. i tried to make it pretty trivial to remove require.paths from the process if we decide to do that eventually, and just use the per-module module.paths. [22:00] chris6F has joined the channel [22:01] piscisaureus: jonaslund: you started with the most difficult part :-) [22:01] tanepiper: weird bug of the day - using mikeal1's updated request module and somehow requesting a file and getting abuffer back twice the size of the response [22:01] tanepiper: but looking in the code, don't see any reason for it D: [22:01] jonaslund: piscisaureus: thatis ? [22:01] piscisaureus: libeio [22:01] jonaslund: oh [22:01] jonaslund: it's not that bad [22:01] mjijackson has joined the channel [22:02] jonaslund: apart from that silly lacking semicolon it's been ok [22:02] wadey has joined the channel [22:03] piscisaureus: jonaslund: I think utimbuf is just _utimbuf on msvc [22:03] piscisaureus: [22:04] jonaslund: yep [22:05] mikeal has joined the channel [22:05] jonaslund: why do you have spaces in your preproc directives ? [22:06] jonaslund: oh hmm.. indentation [22:06] piscisaureus: jonaslund, yeah maybe ask ryah, he has opinions on style [22:07] jonaslund: ok libeio builds [22:08] piscisaureus: woooo [22:08] jonaslund: damn pthread-win32 is sprouting warnings [22:08] EyePulp: argh - anyone using the current mongoose know how to set a schema to accept unstructured {foo:bar} type objects? [22:09] mape: ryah: change the transports to only include xhr? [22:09] jimt has joined the channel [22:09] altamic has joined the channel [22:09] altamic has joined the channel [22:09] jonaslund: seems every function has a separate file [22:10] EyePulp: mape: that's what I said earlier - but I figured I misunderstood the question (it felt odd to know the answer instead of being the one asking the question)... =) [22:11] mape: EyePulp: Oh yeah, just woky up, should have spotted [22:11] EyePulp: not at all. I'd like to take a nap now though. [22:12] mape: woke up.. woky >_< [22:13] colinclark has joined the channel [22:14] jonaslund: uuuhu [22:14] jonaslund: piscisaureus: this pthread-win32 [22:14] mikeal: tanepiper: twice the size? [22:14] jonaslund: any idea what version cygwin uses [22:14] jimt has joined the channel [22:14] mikeal: in byteLength? [22:14] jonaslund: the downloaded tar-gz for 2.8.0 doesn't even compile out of the box [22:14] jonaslund: oh nvm [22:14] jonaslund: it seems i can't do *.c :( [22:15] piscisaureus: jonaslund: libeio is .c too I think? [22:16] jonaslund: piscisaureus: pthread-win32 has a C file that includes other C files [22:16] jonaslund: so the sources isn't strictly taking *.c [22:16] piscisaureus: yeah. baad [22:16] piscisaureus: libev does that too btw [22:17] jonaslund: oh my god [22:17] jonaslund: EVERYTHING seems to be build by includes via pthread.c [22:18] jonaslund: or maybe that's a simplified file [22:18] tanepiper: mikeal: actually i had the problem as well using fs.writeFileStream with just http.get if I tried to create a string first to contain the buffer [22:18] piscisaureus: then just build pthread.c :-) [22:18] jonaslund: yes i will [22:18] jonaslund: this is just an insane setup [22:18] hornairs has joined the channel [22:18] tanepiper: but if i write directly to the file stream from res.on('data' it works fine [22:19] mikeal: is it unicode? [22:19] tanepiper: but i don't think i was using request right, since responseBodyStream is depricated and you don't real;y have a stream example [22:19] tanepiper: mikeal: it's an image [22:20] alexweber15 has joined the channel [22:20] jonaslund: \o/ seems to have built [22:20] Sebmaster: jonaslund: libio or just pthread.c? [22:20] jonaslund: both libeio and pthread.c [22:20] jimt_ has joined the channel [22:21] Sebmaster: nice [22:21] jonaslund: don't know if everything is in yet [22:21] jonaslund: haven't tried linking [22:21] tanepiper: mikeal: basically, i want to do this: https://gist.github.com/3669100c04283e063c6f but with request [22:21] jonaslund: and i'm yet to connect with V8 [22:21] tanepiper: since i wouldlike to use the same lib everywhere and not switch between request for some stuff, and http for other stuff [22:22] mikeal: tanepiper: encodeing:"binary" [22:22] Sebmaster: theres just one mysql orm for node.js now, right? [22:22] davidthings has joined the channel [22:22] mikeal: sorry, no e [22:22] mikeal: https://github.com/mikeal/request [22:22] losing has joined the channel [22:22] mikeal: • encoding - Encoding to be used on response.setEncoding when buffering the response data. [22:22] aurynn: anyone used datejs with node? [22:22] jonaslund: Sebmaster: should be enough ? [22:22] jonaslund: ACTION is not fond of ORM [22:23] Sebmaster: jonaslund: sequelize depends on a rather "old" client [22:23] aurynn: And if I'd read the modules page.. :) [22:23] vyvea_ has joined the channel [22:23] EyePulp: aurynn: is there a port of it on the modules page? [22:23] aurynn: yes [22:23] EyePulp: ah - cool [22:23] Sebmaster: jonaslund: latest update in december [22:24] jonaslund: Sebmaster: if i want to handle objects i'd use an object db.. if i want to do relational stuff i'd keep using that to the fullest [22:24] tanepiper: mikeal: yea, but how do i buffer data into the stream? [22:24] mikeal: responseBodyStream [22:24] mikeal: README dude [22:24] tanepiper: oh, it throws it's depricated [22:25] jonaslund: the problem with ORM imho is that it's good for crud stuff, yet alot of what you do with a database is far more complex [22:25] mikeal: it shouldn't throw [22:25] Sebmaster: jonaslund: The problem im having with object dbs right now is 1. transactions and 2. relations over the document level [22:25] mikeal: it should just print a warning [22:25] mikeal: in master i'm working on a newer api [22:25] jonaslund: and when you do CRUD.. you want to have transactions.. not usually what the ORM stuff is focused on [22:25] mikeal: require({url:"…"}).pipe(createWriteStream('text.txt')) [22:25] tanepiper: mikeal: https://gist.github.com/056164d9949bf529fc7c [22:25] Sebmaster: jonaslund: hmm, i guess there has to be some way to combine these two [22:26] liar has joined the channel [22:26] dgathright has joined the channel [22:26] jimt has joined the channel [22:26] tanepiper: mikeal: this is my code: https://gist.github.com/9c014babf5b396d11b58 [22:26] jonaslund: what kind of transactions ? [22:27] tanepiper: ok, lemme try that [22:27] slaskis: tjholowaychuk: using node-jquery instead of the one you have in tobi works better for me, the only thing i changed is to require("jquery") instead of ./jquery/core [22:28] Sebmaster: jonaslund: im not quite sure yet, i guess ive to think this over [22:28] tjholowaychuk: slaskis: weird, different version of jquery maybe? [22:29] slaskis: could be, or different node-hacks [22:29] jonaslund: Sebmaster: maybe there is uses for ORM.. personally i think it's an abstraction that's there for so many wrong reasons [22:29] slaskis: or commonjs adjustments [22:30] jonaslund: granted.. i'm comming from the java direction where stuff usually sucks [22:30] Sebmaster: jonaslund: i like this kind of abstraction as long as ive to add some methods to the object [22:30] rjrodger has joined the channel [22:30] Sebmaster: i wont create an object for just a few values, which i want to update [22:31] jimt_ has joined the channel [22:31] tanepiper: mikeal: based on what you said, i assume you mean? https://gist.github.com/8911dc999fb28033aaa1 to which i still get and error [22:32] piscisaureus: ACTION just used a screenshot and ocr to save a precious piece of code after a crash :-) [22:32] mikeal: you found a bug :) [22:32] tanepiper: \o/ [22:32] tanepiper: ro :( [22:32] tanepiper: *or [22:32] hellp has joined the channel [22:32] tanepiper: i'll raise a ticket then [22:33] mikeal: tanepiper: fixed [22:33] mikeal: pull [22:33] Sebmaster: jonaslund: but i maybe want a object for something like a user, where i need to do many different kind of usages [22:33] tanepiper: pulling and testing [22:34] vnguyen has joined the channel [22:34] tanepiper: on the slow ass latent connection here :( [22:34] ryah: okay. socket.io kind of works. [22:34] ryah: over https [22:34] ryah: rauchg_: would like some aid from you [22:34] ryah: if you have a moment [22:34] davidsklar has joined the channel [22:35] tanepiper: mikeal: still broken - file with my http example works, should only be 233,777 bytes [22:35] tanepiper: with request and that code, 375, 510 bytes [22:36] strmpnk has joined the channel [22:37] arpegius has joined the channel [22:37] jimt has joined the channel [22:37] tanepiper: mikeal: removed encoding: binary - it works [22:38] zzak: ryah: you should make a convore for nodejs.. theres already a few random ones but nothing official [22:38] m64253 has joined the channel [22:38] mikeal: yeah, don't mix encoding with streaming [22:38] mikeal: err, piping [22:38] mikeal: log a bug on that and I'll find a way to fix it [22:39] ryah: zzak: ? [22:39] TheEmpath has joined the channel [22:39] zzak: ryah: http://convore.com/ [22:40] zzak: http://news.ycombinator.com/item?id=2198521 [22:40] ChrisPartridge has joined the channel [22:40] CIA-79: node: 03isaacs 07master * r4651348 10/ (9 files in 7 dirs): node_modules module lookup, +docs and test. - http://bit.ly/f96yoQ [22:40] CIA-79: node: 03isaacs 07master * r81b4d45 10/ (2 files in 2 dirs): Better assert in the node_modules tests - http://bit.ly/dRbX3n [22:40] isaacs: \o/ [22:41] sivy has joined the channel [22:42] tanepiper: convore looks pretty cool :) [22:42] jimt_ has joined the channel [22:42] Poetro1: when did CIA-79 learn colors? [22:42] tanepiper: although evilbot ignores me [22:43] mikeal: wow, wait a second [22:43] mikeal: you're breaking the module system right now? [22:44] langworthy has joined the channel [22:44] Jaye: *heard the word breaking* huh what? hows it changing? [22:44] mikeal: i thought the module system changes were rolling in after 0.4.0 [22:46] mscdex: Poetro1: it's always done colors/bold, but lately it has not been using color/bold at all. looks like it's back again :) [22:46] isaacs: mikeal: s/breaking/fixing/ [22:47] Poetro1: mscdex: i c, i dont remember it was color that's all [22:47] isaacs: mikeal: it's good. seriously. [22:47] isaacs: you'll like it. [22:47] mscdex: heh [22:47] isaacs: mikeal: the system path removal is 0.5. but the additions are pre-0.5 [22:48] isaacs: battery failure imminent. bbaib. [22:48] mikeal: no, i love it [22:48] mikeal: i just thought you were breaking the global modules system now :) [22:48] jchris has joined the channel [22:49] jchris has left the channel [22:50] masutu has joined the channel [22:51] piscisaureus: ryah: -fno-builtin-memcpy no longer needed? [22:51] Sebmaster: isaacs: how do i set the force parameter when publishing to npm? [22:52] ryah: piscisaureus: sigh [22:52] ryah: why aren't they landing that? [22:52] piscisaureus: ryah: maybe it's a perf killer on older gccs? [22:52] jimt has joined the channel [22:52] piscisaureus: mraleph: ^ [22:52] Sebmaster: isaacs: nvm, i guess un- and republishing worked fine [22:53] romainhuet has joined the channel [22:53] piscisaureus: hmm mr aleph is not around [22:53] CIA-79: node: 03Bert Belder 07master * r35e3222 10/ deps/v8/SConstruct : [22:53] CIA-79: node: Workaround for V8 bug 884 [22:53] CIA-79: node: See http://code.google.com/p/v8/issues/detail?id=884 - http://bit.ly/euaLw0 [22:54] piscisaureus: ACTION building v8 again. coffee, anyone [22:55] Sebmaster: piscisaureus++ [22:55] v8bot: Sebmaster has given a beer to piscisaureus. piscisaureus now has 2 beers. [22:55] jacobolus has joined the channel [22:55] stepheneb has joined the channel [22:55] WebAppsInC has joined the channel [22:56] WebAppsInC: :-( [22:56] piscisaureus: yeah, beer will do [22:56] WebAppsInC: Node.js has failed me for the last time. [22:56] WebAppsInC: sprintf() -- undefined function [22:56] piscisaureus: lol @ webapps in c [22:57] Sebmaster: WebAppsInC: http://phpjs.org/functions/sprintf:522 [22:57] squeek: WebAppsInC: sprintf is a unix thing, not an ECMA thing. [22:58] derferman has joined the channel [22:58] chrischris has joined the channel [22:58] noahcampbell_ has joined the channel [22:58] Jaye: why in gods name would you want to drag the horribly unstandardized php functions into JS :( [22:58] Jaye: sadface man [22:59] fly-away has joined the channel [22:59] jonaslund: Jaye: sprintf is from C, not php [22:59] jonaslund: oh phpjs [22:59] Jaye: yeah [23:00] Ratty_: Some people like masocism [23:00] Sebmaster: i guess it should be pretty close to the c implementation^^ [23:00] jonaslund: sprintf isn't that bad though if it follows the format of the C variant [23:00] jonaslund: (without all the bugs :)) [23:01] wvl has joined the channel [23:01] WebAppsInC: Sebmaster: Suggesting PHP is an insult where I'm from. [23:02] WebAppsInC: <-- S. Korea [23:02] squeek: What's big in the ROK? [23:02] WebAppsInC: It's a way to say "Slag off, mate" [23:02] Sebmaster: WebAppsInC: My first language was php :( [23:02] Sebmaster: now im insulted! [23:02] Jaye: mine was VB :D [23:02] Vertice: Sebmaster: many people's first language was php [23:02] WebAppsInC: squeek: We really like wriiting our web apps in C [23:02] squeek: WHAT [23:03] altamic has joined the channel [23:03] altamic has joined the channel [23:03] squeek: <`∀´> WHAT [23:03] Sebmaster: i like the concept of node.js more than php tho [23:04] jonaslund: writing webapps in C kinda fits a country that mandates IE [23:04] squeek: and mandates activex. urgggh. [23:05] jonaslund: my first language was basic (on the C64) [23:05] TobiasFar has joined the channel [23:05] jonaslund: then qbasic/qb or VB (can't really remember what came first for me) [23:05] jonaslund: then assembly.. then c/c++ [23:05] wvl: Hey all -- is there a way to get at the parse tree or source code for an object? [23:05] superjudge has joined the channel [23:06] jonaslund: then java .. and then a big bunch of other languages finally (but not to a proficient level maybe) [23:06] bradleymeck: wvl, what kind of object [23:07] WebAppsInC: We wriite our web apps in C [23:07] Jaye: sys.inspect [23:07] Sebmaster: java's vm has such a high startup time :( [23:07] Sebmaster: too long imo [23:07] jetienne has left the channel [23:07] jonaslund: i don't see why that is a big problem [23:07] jonaslund: actually i don't think it's that long anymore [23:08] WebAppsInC: Sebmaster: That's why we scrapped JSP and came up with a templating engine that let's you embed C code in HTML [23:08] sonnym has joined the channel [23:08] wvl: bradleymeck: Jaye -- I would like to be able to do something like: sys.inspect(sys) and have it return something useful. [23:08] wvl: ie code + data, not just data... [23:08] jonaslund: java has very good runtime performance once running and if you've had the patience to write good code [23:08] bradleymeck: ... it is useful, im not understanding what you want though [23:08] WebAppsInC: Fucking printf() from inside a ! [23:08] bradleymeck: objects arent code [23:09] WebAppsInC: It's nice let me tell you. [23:09] xandrews has joined the channel [23:09] tykelewis has joined the channel [23:09] jonaslund: ACTION 's troll sensor is tingling [23:09] WebAppsInC: What's even more brilliant is that we can embed HTML inside C for loops [23:10] bradleymeck: sounds a lot like ejs for node [23:10] barodeur has joined the channel [23:10] wvl: I'm looking for something like parse_tree or ruby_parser for ruby, but for node [23:10] bradleymeck: i dont want to deal w/ c types generally [23:10] WebAppsInC: evl: eval() [23:11] Jaye: eval is evil :| [23:11] squeek: string eval is evil. block eval isn't. [23:12] jonaslund: string eval has it's uses [23:12] altamic has joined the channel [23:12] altamic has joined the channel [23:12] bradleymeck: wvl, so you want a Javascript parser + something that would take an Object and spew back a parse tree that could make that object (and its functions)? If so, we have the parts you need (inimino's parser basically and some know-how of its AST), but we dont have them put together [23:12] squeek: jonaslund: and none of them involve speed or performance [23:12] wilmoore has joined the channel [23:13] fission6 has joined the channel [23:13] jonaslund: squeek: eval("(function (..) {..})") -> re-use [23:13] Jaye: for most cases where you can use string eval why not just use the new function constructor? [23:13] markwubben has joined the channel [23:13] wvl: yes bradleymeck, exactly. Thanks for the pointer to inimino's parser -- that is more than I'd found. [23:13] fission6: i just tried fs.writeFileSync ("something.html", "hello") and doesnt seem anything is writing or the file is not being created [23:14] cjm has joined the channel [23:14] vyvea_ has joined the channel [23:14] Sebmaster: ACTION is going back to work [23:14] bradleymeck: Jaye, only reason to use eval over Function is to have access to local scope :P [23:14] vyvea_ has joined the channel [23:16] Jaye: fission6: try fs.writeFileSync("./something.html", "hello", "utf-8"); [23:17] zzak: ryah: https://convore.com/discover/search/?q=node :'( [23:17] vnguyen has joined the channel [23:18] fission6: ok - i think i had some odd logic issue tooo [23:21] cjm has joined the channel [23:22] tlrobinson has joined the channel [23:24] indexzero has joined the channel [23:24] hornairs has joined the channel [23:25] indexzero: @ryan: You get a chance to look at that patch from Tim and I about mutable headers? [23:25] indexzero: ACTION slaps head [23:25] indexzero: @ryah: last message was for you [23:25] adulteratedjedi has joined the channel [23:27] c4milo1 has joined the channel [23:27] altamic has joined the channel [23:27] altamic has joined the channel [23:29] mike5w3c_ has joined the channel [23:29] tanepiper: mutant headers, HIDE! [23:29] jimt has joined the channel [23:30] unomi has joined the channel [23:33] MrTopf has joined the channel [23:36] mjr_: ryah is inches from fixing my https issue, then you can have him back. [23:37] rjrodger has joined the channel [23:38] indexzero: ACTION cedes the floor to https and mjr_ *bow* [23:38] mjr_: It's soooo close [23:38] indexzero: nice [23:39] indexzero: can't wait, I already told @ryah I'd buy him a case of whatever beer he wants when it's done [23:39] mjr_: Yeah, good https is going to be great. [23:39] indexzero: to be delivered at NodeConf or earlier (his choice) [23:39] mjr_: Such a great win for node. [23:39] tanepiper: ACTION can almost feel 0.4  [23:40] indexzero: mjr_: You were very vocal about mutable headers, have you looked at the patch I was talking about? [23:40] indexzero: https://gist.github.com/818305 [23:40] mjr_: I haven't, but I don't have room in my brain right now, sadly. [23:41] skm has joined the channel [23:41] indexzero: mjr_: I spent most of yesterday re-reading all the threads on the mailing list about mutable headers / multiple headers [23:41] mjr_: Trying to get our app running on 0.4-pre with https and new HTTP API. [23:41] indexzero: this patch only addresses mutable, not multiple [23:41] Ari-Ugwu has joined the channel [23:41] indexzero: mjr_ fair enoug [23:41] indexzero: *enough [23:41] mjr_: I know, I remember having lots of opinions about this a while back. [23:42] indexzero: mjr_ well formulated opinions, it's amazing the wealth of information in the nodejs-dev list if you just know what you're looking for [23:42] jimt_ has joined the channel [23:42] mjr_: It's been pretty fun being involved in the node community. Lots of smart people getting things done really quickly. [23:42] kriszyp has joined the channel [23:43] ryah: im waiting for someone to bring me a TLS bug - other than mjr's [23:44] jacobolus has joined the channel [23:45] Vertice has joined the channel [23:45] ryah: i also want people to try the new node_modules patch [23:45] tlrobinson has joined the channel [23:45] ryah: landing this release is going to be bumpy :) [23:45] tanepiper: shall look at the commits and prepare for the horror :D [23:47] PhatBoyG has joined the channel [23:49] rauchg_ has joined the channel [23:49] mjr_: I've been tracking 0.3.x for a while now, so hopefully I won't have too much pain with 0.4. [23:50] tanepiper: yea, i upgraded to 0.3.8 today - so far so good [23:51] ceej: is there anyway with socket.io to send some vars from the client to the server on connect? or do you just have to send a message after? [23:51] eee_c has joined the channel [23:52] mikeal has joined the channel [23:52] chris6F_ has joined the channel [23:52] tanepiper: ceej: client.on('connection' ? not exactly sure, but i think there is [23:53] ceej: tanepiper: though tso to but can't find anything [23:53] clarkfischer: tanepiper, I'm pretty sure you just have to do a .send on('connection'... [23:54] slickplaid: I had wondered why the Frisbee kept getting larger as I looked at it, then it hit me! [23:54] jimt has joined the channel [23:54] tanepiper: clarkfischer: ye, sounds about right - i've mainly done stuff with Dnode specifically, rather than plain socket.io so wasn't sure [23:55] Vertice_ has joined the channel [23:55] Vertice_ has joined the channel [23:55] clarkfischer: tanepiper, i wrote a chat client, in which identification was necessary [23:55] clarkfischer: and I just had it send a message on connect identifying [23:55] clarkfischer: and the session wasn't valid until identification occurred. [23:56] Coal has joined the channel [23:59] tjholowaychuk has joined the channel