[00:01] Utkarsh__ has joined the channel [00:03] davidwalsh has joined the channel [00:04] kosty_: Guys, I was wondering if data could be lost/overridden by using fs.readFile(filename, function(err, data) { fs.writeFile(filename, process(data));}); in my web-server. sorry if the question is too noob :) [00:06] Ond: Node will over-write, yes [00:08] DTrejo has joined the channel [00:08] DTrejo: isaacs: I think npmjs.org is down? http://www.downforeveryoneorjustme.com/npmjs.org [00:08] DTrejo: not sure if you knew [00:10] kosty_: Ond, thanks. Is there any "nodejs idiom" for reading/writing to a file without using synchronous calls and still having the data preserved ? [00:11] AAA_awright: When I get the time and army of monkey programmers I'll be writing a decentralized, semantically meaningful package manager [00:12] Ond: Are you talking about appending to a previously existing file or just ensuring that node doesn't over-write your file if it already exists? [00:13] grayb has joined the channel [00:13] vipaca has joined the channel [00:13] vipaca has joined the channel [00:13] Spion has joined the channel [00:13] kosty_: more like appending to a file after some really time-consuming processing. [00:14] hornairs has joined the channel [00:14] AAA_awright: kosty_: If you have the data, close the file, process the data, open the file for writing and re-write it, that looks safe [00:14] AAA_awright: For overwriting contents [00:15] dominic_ has joined the channel [00:16] jimt has joined the channel [00:17] kosty_: Since the processing takes some time, I was wondering if the file contents could be changed meanwhile, making the processed data deprecated. [00:19] kosty_: I assume, there's completely no event order [00:19] tshpaper has joined the channel [00:20] davidascher has joined the channel [00:21] SetupLy has left the channel [00:21] jimt has joined the channel [00:21] jgautier has joined the channel [00:21] ParadoxQuine: yup it could [00:22] ParadoxQuine: there's nothing ensuring that you can read the data from the file, do stuff with it, and then write it back to the same file without locking it while you do the data processing [00:23] jgautier: anybody gotten this error with express? TypeError: Cannot read property 'prototype' of undefined at Object. (/usr/local/lib/node/.npm/express/2.0.0beta3/package/lib/http.js:36:48) [00:23] jgautier: node version 0.4.2 [00:23] jgautier: and express version 2 beta 3 [00:24] ParadoxQuine: yea ive gotten a few similar errors, usually by forgetting to apply some property it expected [00:24] kosty_: Thanks guys! [00:24] jgautier: im using the project generator [00:24] kosty_ has left the channel [00:24] jgautier: in express [00:24] ParadoxQuine: hm havent used that [00:25] ParadoxQuine: so im not sure what it might be leaving out or if thats a bug [00:25] ParadoxQuine: is the generator definitely working with v2 [00:25] jgautier: hmm [00:25] jgautier: well its generating files :P [00:25] ParadoxQuine: :P but it could be generating ones that worked in v1 but not v2 right? unless the commit log shows otherwise [00:26] jgautier: ill start commenting stuff out see when it works [00:26] ParadoxQuine: ya thats what ive been doing. the errors are....not particularly helpful right now [00:28] jgautier: hmm its fialing first line [00:28] jgautier: var express = require('express'); [00:28] jgautier: node v4 works with express v2 right? [00:28] ParadoxQuine: yup [00:29] ParadoxQuine: im using it right now [00:29] jgautier: wtf [00:29] jgautier: its probbaly something stupid happening :P [00:29] ParadoxQuine: express 2.0.0b3 and node 4.0.2 [00:29] SubStack: are there docs about how wscript works anyplace? [00:29] ParadoxQuine: or 4.2 or whatever it is [00:29] jgautier: same exact versions i have [00:29] SubStack: trying to integrate this wscript with pkg-config [00:29] ParadoxQuine: maybe npm update all your stuff [00:30] ParadoxQuine: i know you need a recent version of connect to make express 2 work [00:30] jgautier: i already have the npm update..im going to try npm unisntall express then npm install [00:30] ParadoxQuine: mk [00:31] jgautier: ahh i think you may be right [00:31] jgautier: it was connect [00:31] jgautier: let me uncomment everything and see if it works now [00:31] jgautier: yeah that was it [00:34] ParadoxQuine: :) [00:34] ryankirkman has joined the channel [00:35] dominic_ has joined the channel [00:35] ryankirkman: What would be the most efficient way to shorten this if statement: http://pastebin.com/SpTaXtXD ? [00:35] shiawuentan has joined the channel [00:37] rburhum has joined the channel [00:37] briznad has joined the channel [00:38] eventi has joined the channel [00:39] pz_f: ryankirkman: Switch case? [00:40] JaMeSiTeGeN has joined the channel [00:40] ryankirkman: pz_f: Not quite sure what you mean. [00:41] pz_f: ryankirkman: switch(n) [00:41] pz_f: { [00:41] pz_f: case 1: [00:41] pz_f: execute code block 1 [00:41] pz_f: break; [00:41] pz_f: case 2: [00:41] pz_f: execute code block 2 [00:41] pz_f: break; [00:41] pz_f: default: [00:41] pz_f: code to be executed if n is different from case 1 and 2 [00:41] pz_f: } [00:41] ryankirkman: pz_f: I'm not handling multiple cases of 1 variable, so I can't just switch on 1 statement [00:41] pz_f: ryanfitz: Yeah sorry, was thinking of another language that uses select case statements [00:42] JaMeSiTeGeN: Hello node.js [00:42] ParadoxQuine: i don't know of a way to make that shorter since there seems to be nothing about the 3 statements that is similar [00:42] mikegerwitz: ryankirkman: If it's critical that you check that it's not specifically undefined, I'd leave it as is. [00:42] JaMeSiTeGeN: Hello node.js [00:42] ParadoxQuine: i mean you could make the vars into a list and map it but thatd just be awkward [00:42] JaMeSiTeGeN: Hello node.js [00:42] JaMeSiTeGeN: humm. [00:42] ParadoxQuine: hi JaMeSiTeGeN [00:42] pz_f: ryankirkman: But wouldn't the third one be a simple else if you only have three options? [00:42] JaMeSiTeGeN: What wrong wtih this ? /exec -o for i in {1-5}; do echo Hello node.js; done [00:42] mikegerwitz: ryankirkman: Otherwise, doc.value = doc.value || {}; docid = doc.id || doc._id || doc.value._id; But you sacrifice explicit check, and that'll give unintended effects if any of the values can be interpreted as "false", e.g. a 0 id [00:43] JaMeSiTeGeN: Hello node.js [00:43] JaMeSiTeGeN: Hello node.js [00:43] JaMeSiTeGeN: Hello node.js [00:43] JaMeSiTeGeN: Hello node.js [00:43] JaMeSiTeGeN: Hello node.js [00:43] mikegerwitz: JaMeSiTeGeN: do you mean {1..5}? [00:44] JaMeSiTeGeN: yay [00:44] ParadoxQuine: please stop spamming the channel :( [00:44] JaMeSiTeGeN: yea i fixed it [00:44] JaMeSiTeGeN: I wanted to say hello to the channel in style :) [00:45] ParadoxQuine: im not sure repetition is style. i'd say deviation is style. perhaps you need a few randomized values in there [00:45] ParadoxQuine: like "Hello node.js *meatdress*" [00:45] bingomanateeIpho has joined the channel [00:46] grayb: How mature is the mysql module? [00:47] charlenopires has joined the channel [00:47] vipaca has joined the channel [00:47] vipaca has joined the channel [00:49] mape has joined the channel [00:50] squeeks: which one? [00:51] ryankirkman: mikegerwitz: Thanks very much mate. I guess I'll have to stick with the if statement for now [00:52] pcardune has joined the channel [00:53] grayb has left the channel [00:57] Evet_ has joined the channel [00:59] zentoooo has joined the channel [01:01] vipaca has joined the channel [01:01] Evet has joined the channel [01:01] DTrejo: anyone know of a good online side-by-side markdown previewer? [01:02] DTrejo: I suppose I'll just use this and change the horrible small default size of the boxes [01:02] DTrejo: http://markdownr.com/ [01:05] dgathright has joined the channel [01:06] hornairs has joined the channel [01:06] pHcF has joined the channel [01:08] timmywil has joined the channel [01:12] sleeplessinc has joined the channel [01:15] SubStack: pkg-config++ [01:15] v8bot: SubStack has given a beer to pkg-config. pkg-config now has 1 beers. [01:15] dguttman has joined the channel [01:15] isaacs has joined the channel [01:18] DTrejo: isaacs: you saw that npmjs.org is down I'm guessing? [01:24] ikarosdaedalos has joined the channel [01:24] JaMeSiTeGeN has left the channel [01:24] eb4890 has joined the channel [01:24] soulofpeace has joined the channel [01:32] themiddleman has joined the channel [01:33] jimt_ has joined the channel [01:33] eee_c has joined the channel [01:33] sh1mmer has joined the channel [01:34] sourcode has joined the channel [01:37] possibilities has joined the channel [01:37] ryankirkman: I'm using express.js with node as a web server. I'm defining a fair few of my own custom errors. Does anyone know the recommended way to group these custom errors (e.g. in their own module)? [01:40] zachsmith: ryankirkman: I haven't seen anyone do anything like that, but putting them in their own module would be cool [01:43] Sebmaster has joined the channel [01:43] Sebmaster: isaac: You there? [01:43] isaacs: hi [01:43] isaacs: what's up? [01:43] Sebmaster: sorry about that s^^ [01:44] isaacs: oh, whoops, looks like i broke the DNS [01:44] Sebmaster: i just published a new version of my mysql lib to npm, but the new version doesnt show up at search.npmjs.org [01:44] Sebmaster: are the packages cached there? [01:44] Sebmaster: or am i just doing it wrong? [01:44] AAA_awright: Anyone know of a DBus or ICE module? [01:45] barrychapman: who helped me earlier [01:45] barrychapman: i owe them a case of beer [01:46] Sebmaster: isaacs: Hum, when i try to publish it again, it tells me its already published [01:48] isaacs: Sebmaster: probably replication fell over. just a sec [01:48] isaacs: ok, dns is fixed. dscacheutil -flushcache on macs, restart chrome, etc. [01:49] Sebmaster: isaacs: Nice, shows up now [01:50] robotarmy has joined the channel [01:51] Sebmaster: still need to think about a solution for longs in mysql [01:51] Sebmaster: but i guess ill find one [01:52] jesusabdullah: Ugh, I need to re-solder this headphone thing [01:53] jesusabdullah: You were right substack, about the soldering, I think [01:53] jesusabdullah: though it doesn't help that I couldn't get this sleeve on far enough. [01:56] AAA_awright: Javascript is suprisingly pathetic when it comes do plain old numbers [01:56] SubStack: AAA_awright: which operations are you pining for? [01:56] pquerna: hmm. [01:56] AAA_awright: SubStack: Reguarding getting the values of longs from a database [01:57] ryanfitz has joined the channel [01:57] SubStack: longs as in long or longs as in longitudes [01:57] AAA_awright: I also wonder how Date.getTime() is going to work 100 years in the future when the float loses it's precision [01:57] SubStack: write a node-bigfloat! [01:58] AAA_awright: Does V8 allow new primitive types? [01:58] AAA_awright: I would imagine it should if it was written well [01:58] SubStack: well you can just have .op() style operators [01:58] Sebmaster: i hope, ecmascript harmony will introduce better number managment [01:58] SubStack: works pretty well for bigint [01:59] AAA_awright: I wish they would stop calling it STUPID HARMONY [01:59] vipaca has joined the channel [02:00] jesusabdullah: Harmony more like WHOREmony amirite [02:00] SubStack: whore money [02:00] SubStack: the next ecmascript release should be called discord [02:01] SubStack: or strife [02:01] SubStack: and it should fix == [02:02] jesusabdullah: Strife is a cool name [02:02] ryanfitz_ has joined the channel [02:03] Sebmaster: SubStack: Fix ==? [02:03] Sebmaster: what's wrong with it? [02:03] SubStack: js: [2] == 2 [02:03] gbot2: SubStack: true [02:04] Sebmaster: wtf [02:04] Sebmaster: omg [02:04] SubStack: js: true == 1 [02:04] gbot2: SubStack: true [02:04] dgathright has joined the channel [02:04] SubStack: js: true == '1' [02:04] gbot2: SubStack: true [02:04] AAA_awright: js: [2]===2 [02:04] gbot2: AAA_awright: false [02:04] AAA_awright: I don't get it [02:04] jesusabdullah: LIKE A BOSS [02:04] Sebmaster: true == 1 and true == '1' is okay with me [02:04] Sebmaster: but array == numeric value? [02:04] AAA_awright: js: false=="0" [02:04] jesusabdullah: Coercing types! LIKE A BOSS [02:04] gbot2: AAA_awright: true [02:04] Sebmaster: waaat? [02:04] ParadoxQuine: what's wrong with [2] == 2 [02:04] AAA_awright: js: false=="00" [02:04] gbot2: AAA_awright: true [02:04] SubStack: it stringifies with a ',' separator [02:04] ParadoxQuine: it just coerces the type... [02:04] AAA_awright: js: false=="zreo" [02:04] gbot2: AAA_awright: false [02:05] AAA_awright: huh [02:05] SubStack: js: [1,2] == '1,2' [02:05] gbot2: SubStack: true [02:05] Sebmaster: hmm, makes sense [02:05] AAA_awright: js: 0=="false" [02:05] gbot2: AAA_awright: false [02:05] ParadoxQuine: lol [02:05] ParadoxQuine: js: false=="false" [02:05] gbot2: ParadoxQuine: false [02:05] Sebmaster: its a feature, not a bug [02:05] AAA_awright: lol [02:06] ParadoxQuine: js: true=="false" [02:06] gbot2: ParadoxQuine: false [02:06] ParadoxQuine: weak typing is :) [02:06] SubStack: I wouldn't mind it so much if js did it the perl way with a separate string comparison operator [02:06] SubStack: or the python way where == is like === [02:06] ParadoxQuine: then how do you do == in python? [02:06] SubStack: but what it has is a bit counterintuitive [02:06] Sebmaster: v8: var a = {};a.prototype.toString=function(){return '2'};b = new a;b==2 [02:06] v8bot: Sebmaster: TypeError: Cannot set property 'toString' of undefined [02:07] SubStack: ParadoxQuine: comparisons between different types are always false [02:07] Sebmaster: var a = function(){};a.prototype.toString=function(){return '2'};b = new a;b==2 [02:07] SubStack: same with === [02:07] Sebmaster: v8: var a = function(){};a.prototype.toString=function(){return '2'};b = new a;b==2 [02:07] v8bot: Sebmaster: true [02:07] Sebmaster: ohh [02:07] ParadoxQuine: python is strongly typed, right? [02:07] Sebmaster: nice [02:07] Sebmaster: its indeed a feature [02:07] SubStack: ParadoxQuine: not especially [02:08] SubStack: it just has more type checks for some operations instead of doing coercion at the drop of a hat [02:08] SubStack: not that I like python very much on the whole but that seems a sensible approach [02:08] ParadoxQuine: ok [02:08] ParadoxQuine: i'm used to php's approach, which js is consistent with [02:09] ParadoxQuine: if you dont use === it'll try its darndest to make the data the same type so it can compare it [02:09] Sebmaster: php also calls the toString method of an object when comparing with == ? [02:09] ParadoxQuine: im not sure, but you can do 1 == "1" in php and get true [02:09] mikegerwitz: Sebmaster: not that I'm aware of, no [02:09] Sebmaster: yea, i know that [02:09] asdfsafdsa: Hi does anyone have experience making dynamic controllers for a node.js server? i'm using express and i want to separate my code more so I want controllers. There isn't a module that helps with this either. [02:09] pHcF_ has joined the channel [02:09] Sebmaster: mikegerwitz: Thanks [02:10] rfay has joined the channel [02:10] ParadoxQuine: anyone know why my stylus isn't working? left-margin w / 2 * -1 [02:10] SubStack: asdfsafdsa: express is not rails [02:10] mlangenberg has joined the channel [02:10] ParadoxQuine: it doesn't divide....multiplication works fine but division just doesn't happen [02:11] SubStack: why exactly do you want controllers? [02:11] SubStack: I thought even among rails people controllers were the black sheep of the triumverate [02:11] dominic_ has joined the channel [02:11] mattikus has joined the channel [02:11] asdfsafdsa: better organization. you're saying i should put all my logic in one big file? [02:11] SubStack: *triumvirate [02:11] SubStack: >_< [02:12] SubStack: asdfsafdsa: you can just use the module system to organize your project [02:12] SubStack: I don't get the appeal of having the web framework take over the project organization [02:13] jesusabdullah: The blach sheep of the triumvirate, huh? [02:13] andrewfff has joined the channel [02:13] asdfsafdsa: ok. if that's the best way that's what i'll do [02:13] SubStack: jesusabdullah: http://www.youtube.com/watch?v=91C7ax0UAAc [02:13] jesusabdullah: SubStack: Consistency, I'd think. I remember bish0p saying that he liked rails for this reason. Anybody who had used rails would know, basically, where shit should be, because all rails programs fit into the same mold [02:13] mikegerwitz: SubStack: "controller" can apply to anything. Having a module specalize in "controller-like" stuff still qualifies as a controller. [02:14] SubStack: mikegerwitz: it reminds me too much of design patterns [02:14] SubStack: well I guess because it is one [02:14] asdfsafdsa: ok now im confused [02:14] mikegerwitz: SubStack: If you're an OO, you'd better use design patterns :) Otherwise, you're excused [02:14] SubStack: an OO? [02:14] mikegerwitz: OO programmer* [02:15] SubStack: why would I be an "OO programmer"? [02:15] SubStack: design patterns are pretty worthless [02:15] SubStack: wrap that shit up in a reusable module already [02:16] bingomanatee has joined the channel [02:16] AAA_awright: I don't think that's what design pattern means [02:16] mikegerwitz: SubStack: I think you're missing the point of the patterns. They exist because of langauge deficiencies. [02:17] AAA_awright: SubStack: Have you read Design Patterns? [02:17] mikegerwitz: SubStack: http://en.wikipedia.org/wiki/Design_Patterns [02:17] SubStack: mikegerwitz: yes which is why it bugs me so much when people bring over design patterns from languages like java [02:17] jesusabdullah: lol, fat model [02:17] SubStack: AAA_awright: the gang of four bollocks? [02:17] mikeputnam: OMGgetsetfactories! [02:17] bingomanatee: I think that there are some patterns written to address the curddiness of Java - but not all of them fall into that category. [02:17] mikeputnam: ACTION makes shit up [02:18] AAA_awright: SubStack: Yeah [02:18] SubStack: functional design patterns make sense [02:18] bingomanatee: I mean MVC is a design pattern, at the least. [02:18] SubStack: because they're actually combinators [02:18] dominic_ has joined the channel [02:18] mikegerwitz: SubStack: JavaScript is different. "Classes" in JavaScript can be created at runtime. They can be modularized. But the patterns themselves are still very strong principals [02:18] SubStack: but you can pretty much always abstract away this OO pattern stuff with a nice library [02:19] jesusabdullah: I think that noticing design patterns could be useful, but I think they're overrated. That is, you shouldn't go into coding thinking about how to shove your problem into a design pattern hole [02:19] SubStack: so just black box it and move along [02:19] bingomanatee: I don't think anyone is of the illusion that just sewing together design patterns gives you a well desgined site. [02:19] tbranyen: jesusabdullah: i dunno some design patterns make lots of sense and provide obvious expectations [02:19] tbranyen: to someone trying to consume your code [02:19] bingomanatee: But having a shared vocabulary for decorators and factories does speed along some conversatyions. [02:19] jesusabdullah: I think that, ideally, a lot of design patterns could be abstracted [02:20] mikegerwitz: jesusabdullah: some, yep. BUt definately not all :) [02:20] jesusabdullah: For example, in LabVIEW, almost everything is a state machine [02:20] jesusabdullah: so it's almost surprising that they haven't tried to abstract it away [02:20] mikegerwitz: SubStack: Just beacuse you don't "like" design patterns doesn't mean that they are not used. All GoF did was put a name to what people were already doing. You likely use patterns in your own code. [02:20] jesusabdullah: idk, it's annoying having to think about that to me [02:20] SubStack: ug I hate the jargon around design patterns too [02:21] bingomanatee: Don't hate the developer, hate the design pattern yo. [02:21] Jourkey has joined the channel [02:21] Jourkey: what's the easist way to grab a remote image? [02:21] bingomanatee: ACTION personnally wants to jump across the table and start aggressively noogieing every time someone brings up "0" numbers.  [02:21] SubStack: jesusabdullah: well you either can't abstract away some patterns in languages that suck like java or you wouldn't want to because the cure is worse than the disease [02:22] jesusabdullah: SubStack: Sounds like LabVIEW. XD [02:22] bingomanatee: http client calls? Do you mean grab it in the HTML or grab the bytes? [02:22] SubStack: that is, can't abstract the problem away without writing an ad-hoc lisp interpreter [02:22] jesusabdullah: Even if you COULD abstract it, it wouldn't be that useful because there's enough variation in there [02:22] bingomanatee: ^^ Jourkey [02:22] jesusabdullah: Like, I actually usually have multiple switches in my st8 machine [02:22] jesusabdullah: instead of just one [02:22] SubStack: Jourkey: http://nodejs.org/docs/v0.4.1/api/all.html#http.get [02:22] jesusabdullah: Oh well [02:23] Jourkey: i mean grab it and write it onto my local server :) [02:23] [[zz]]: sourcode, hey! [02:23] Jourkey: oh i guess i have to use the url module to split the url first? [02:23] SubStack: that plus fs.writeFile or fs.createWriteStream [02:24] perlmonkey2 has joined the channel [02:24] Jourkey: ok, cool thanks [02:25] sontek_ has joined the channel [02:27] sourcode: [[zz]]: hey, man! [02:27] bingomanatee: Terry Chay had some interesting thoughts on the definition of Design Patterns - its more insidious than you might think: http://blogs.sun.com/SDNChannel/entry/php_palooza_part_2_sf [02:27] jimt has joined the channel [02:31] warz has joined the channel [02:31] asdfsafdsa: so what should i do about controllers? [02:31] asdfsafdsa: using this as reference https://github.com/visionmedia/express/blob/master/examples/mvc/mvc.js [02:32] Hello71 has joined the channel [02:32] Hello71 has joined the channel [02:33] jimt_ has joined the channel [02:35] johans_ has joined the channel [02:37] robotarmy has joined the channel [02:39] bingomanatee: I have an MVC library which is just a formalization of express MVC example + Mongoose: [02:40] jimt has joined the channel [02:40] bingomanatee: https://github.com/bignomanatee/mvc [02:40] bingomanatee: You might find that useful. [02:40] asdfsafdsa: thanks i'll look at it [02:40] bingomanatee: it is an extension of the link asd.. provided, with a user/login system and a forms library [02:41] beawesomeinstead has joined the channel [02:41] beawesomeinstead has joined the channel [02:41] ryah has joined the channel [02:42] dominic_ has joined the channel [02:42] redmind has joined the channel [02:43] Jourkey: where is the image data after i get it? [02:43] dominic_ has joined the channel [02:43] bingomanatee: jourkey - can you give us some context as to the larger use case behind the question? [02:43] Jourkey: res is this big object [02:44] Jourkey: http.get(options, function(res) { [02:44] fayce has joined the channel [02:44] Jourkey: I have something like that, now i need to do fs.writeFile [02:44] Jourkey: what do i put for data? [02:44] bingomanatee: So there is an image file out on the web [02:44] mikegerwitz: Anyone aware of a good JS lexer, written either in JS or C/C++? Preferably a standalone library (for example, I don't want to tear code out of jslint or something). I just need token output. Similar to PHP's token_get_all() [02:44] bingomanatee: you want to copy it to your local web server [02:44] Jourkey: right [02:46] seivan has joined the channel [02:46] redmind: mikegerwitz: pretty easy to build a lexer with https://github.com/sstephenson/strscan-js [02:46] AAA_awright: mikegerwitz: I wonder if you can expose the one V8 uses [02:46] ajpiaNOU has joined the channel [02:47] AAA_awright: I've looked for one too [02:47] AAA_awright: It must handle regexes correctly, quotes within comments, etc, correctly [02:47] ryankirkman: http://jscc.jmksf.com/ [02:47] AAA_awright: Which means recursive parser (ugh) [02:47] bingomanatee: http.get will give you an http.ClientResponse [02:47] mikegerwitz: redmind: Was hoping to avoid building my own :) But thanks [02:47] mikegerwitz: AAA_awright: That would be useful [02:47] redmind: ahh [02:47] mikegerwitz: AAA_awright: yeah, exactly :/ [02:48] redmind: what about using the one in narcissus? [02:48] bingomanatee: You can then either accumulate the result of client.on('data') into a byte stack and use the fs comands to write the result to your web server [02:48] bingomanatee: or pipe the response to a file writer. [02:48] jacobolus has joined the channel [02:49] skm has joined the channel [02:49] redmind: https://github.com/mozilla/narcissus/blob/master/lib/jslex.js [02:49] mikegerwitz: redmind: Interesting..I'll take a look [02:49] Jourkey: hmm ok [02:51] CHINAPOWER has joined the channel [02:51] seivan has joined the channel [02:51] mikegerwitz: a JS interpreter written in JS. heh, I have to admire that [02:51] SubStack: self-hosting! [02:51] mikegerwitz: (I've heard it brought up in this channel before but never took a look) [02:53] mikegerwitz: redmind: I'll have to test it out, but this may work. Thanks :) [02:54] redmind: np [02:54] redmind: am just wasting time here when i am supposed to be working :) [02:58] JJMalina has joined the channel [02:58] eventi has joined the channel [02:59] mikeal has joined the channel [03:00] Jourkey: is it something like this? [03:00] Jourkey: http://pastie.org/1668831 [03:00] Jourkey: sadly i can't get this to work [03:00] Jourkey: i get this [03:00] Jourkey: Error: First argument needs to be a number, array or string. [03:02] redmind: .on('data') emits chunks of data, not sure if end actually returns anything [03:03] kmwallio has joined the channel [03:04] mikegerwitz: redmind: I don't believe end does [03:04] mikegerwitz: Jourkey* [03:06] kawaz_air has joined the channel [03:06] Astro has joined the channel [03:06] Juske has joined the channel [03:06] ossareh has joined the channel [03:07] swistak has joined the channel [03:08] kawaz_wo_ has joined the channel [03:08] broofa has joined the channel [03:12] jesusabdullah: So, I found some comments in a MATLAB script I wrote about why I wrote a procedure that expected access to a global namespace [03:12] jesusabdullah: Man, scoping things into objects like in js makes things like this a lot more slick [03:13] jesusabdullah: Basically, MATLAB's datatypes suck [03:14] sontek_ has joined the channel [03:15] SubStack: light-weight container syntax is such a great idea [03:15] dominic_ has joined the channel [03:15] SubStack: it's rather taken for granted nowadays [03:16] jesusabdullah: I agree. [03:16] jesusabdullah: lightweight containers are awesome [03:16] jesusabdullah: and make functional styles so much easier [03:16] SubStack: I like to call that hackability [03:17] jesusabdullah: I think running MATLAB procedures without passing all the variables should be considered Poor Style [03:17] jesusabdullah: but it happens all the time [03:17] jesusabdullah: Even *I* did it [03:17] SubStack: or larry wall calls it whipituptitude [03:17] jesusabdullah: and I hate it [03:17] kriszyp has joined the channel [03:17] jesusabdullah: haha, yeah [03:17] jesusabdullah: that's a good one [03:17] jesusabdullah: MATLAB: Not very hackable [03:18] jesusabdullah: I kinda wish you could extract the 2D matrix DSL from MATLAB and throw the rest of it in the garbage bin [03:18] SubStack: that's what hmatrix does in haskell [03:18] isaacs: zsh users make things too complicated. [03:18] jesusabdullah: I really should try to learn some haskell sometime [03:18] jesusabdullah: I bet it would be nice if haskell and lisp had a baby [03:18] jesusabdullah: that wasn't an abomination [03:19] SubStack: haskell and javascript [03:19] jesusabdullah: a baby WITHOUT Down's Syndrome [03:19] jesusabdullah: hmm [03:19] jesusabdullah: That could be cool too [03:19] jesusabdullah: I really like the lisp s-expression thing sometimes [03:19] SubStack: I guess you'd end up with erlang [03:19] jesusabdullah: though, I think it would be really easy to ad-hoc that sorta thing [03:19] hobodave has joined the channel [03:19] jesusabdullah: In fact, that sounds like a good exercise [03:20] SubStack: or perhaps a perl6 [03:20] jesusabdullah: hmm [03:20] jesusabdullah: Should learn all the cool toys [03:20] jesusabdullah: I wonder if I'll ever code in MATLAB again ;) [03:20] SubStack: hopefully not! [03:20] jesusabdullah: I bet I'll use Octave again for small things [03:20] gazumps has joined the channel [03:20] jesusabdullah: but yeah [03:20] jesusabdullah: hopefully never again [03:20] SubStack: you wrote that nifty realtime graph thing [03:21] jesusabdullah: Yeah, that was cool [03:21] SubStack: just need some gsl bindings for node [03:21] jesusabdullah: I'd love to extend that to be something worthwhile [03:21] jesusabdullah: Or, if I wrote dnode-python I could use matplotlib [03:21] jesusabdullah: but I don't like mpl :/ It has the features but is kinda clunky and poorly documented [03:21] jesusabdullah: I still kinda wanna write my own js plotting program [03:22] meso has joined the channel [03:22] jesusabdullah: even if it sucks, it [03:22] jesusabdullah: even if it sucks, it'll suck MY WAY [03:24] SubStack: this is amusing: http://news.ycombinator.com/item?id=2318249 [03:24] jesusabdullah: I think I might write a blog post about that comment, and the usefulness of lightweight containers [03:24] SubStack: rpc is fundamentally flawed because errors! [03:24] JusticeFries has joined the channel [03:25] akellehe has left the channel [03:25] jesusabdullah: Do you agree or disagree, SubStack? [03:25] SubStack: well obviously I disagree [03:25] jesusabdullah: pffsht [03:25] SubStack: oh wait, I disagree with the link I posted [03:25] jesusabdullah: I think that conflating procedure and function is a mistake [03:26] jesusabdullah: if I'm using the word correctly [03:26] SubStack: ah yeah [03:26] SubStack: well javascript /already/ lets you ignore all kinds of potential error conditions [03:26] jesusabdullah: I think of procedures as ordered operations, whereas I think of functions as a way to organize doing things [03:26] SubStack: by its dynamic nature [03:26] SubStack: and people get plenty of use out of it [03:27] SubStack: "COM failed so RPC can never work!" doesn't seem to follow either [03:27] SubStack: RPC sucked in the past because languages sucked in the past [03:27] SubStack: and serialization formats sucked in the past [03:28] SubStack: but now we've got json and friendly languages like javascript [03:28] SubStack: where you can do trippy runtime transforms [03:28] jesusabdullah: Yeah, I think he has a point in that node hasn't invented anything completely novel here and that rpc's are more complicated than a typical not-so-rpc [03:28] jesusabdullah: but I don't think that means that RPCs are a bad idea [03:29] jesusabdullah: or that RPC means that it *has* to look *just like* a in-program function call [03:29] SubStack: it doesn't matter that event systems aren't a new idea [03:29] SubStack: they haven't really been done well until node [03:29] jesusabdullah: that too---just because something has existed before doesn't mean it wasn't done *better* [03:29] SubStack: execution > novelty [03:30] ryah: :) [03:30] SubStack: otherwise you could just strawman any concept by releasing a terrible implementation of it [03:30] mbrochh has joined the channel [03:30] mbrochh has joined the channel [03:30] jesusabdullah: Yeah, definitely [03:30] SubStack: which is pretty much what unintentionally happened with rpc [03:31] jesusabdullah: Interestingly enough, RPCs are extremely popular irl [03:31] SubStack: yeah even bad ones [03:31] jesusabdullah: even with shitty implementations [03:31] jesusabdullah: Yeah [03:31] jesusabdullah: That could indicate that it's inherently a good idea [03:31] SubStack: bad rpc systems are still usually better than doing all that by hand [03:31] jesusabdullah: that, or we're all working in the wrong direction [03:31] ryah: RPCs make the need for explicit I/O pretty clear [03:31] jesusabdullah: like some people say happens with classes [03:31] jesusabdullah: but somehow I doubt that [03:31] ryah: we have pretty explicit I/O - a good thing imo [03:32] SubStack: yep, it's pretty nice in node [03:32] ryah: (meaning that I/O implies callback) [03:32] jesusabdullah: node's handling of input/output was well-thought-out [03:32] SubStack: it maps really well onto an asynchronous rpc system [03:32] jesusabdullah: which is kind of the point. [03:33] ryah: now if we only had a system for managing multiple nodes... [03:33] ryah: somewhat adhoc at the moment [03:33] SubStack: clustering? [03:33] dominic_ has joined the channel [03:33] ryah: "use monit" [03:33] ryah: "use UNIX pipes to distribute a fd" [03:33] ryah: "run nohup before your program" [03:33] SubStack: ah totally [03:34] ryah: how do you deploy? use whatever [03:34] jesusabdullah: Oh man, you guys should see what I did with my thesis [03:34] nilyt has joined the channel [03:34] ryah: if those things could be defined as kind of "language features" [03:34] ryah: then i think the usablity equation really changes [03:35] JusticeFries: how is everyone deploying node? [03:35] ryah: however [03:35] SubStack: I should hack on telescreen some more after my next few projects [03:35] Jourkey: i use nodeforever [03:35] SubStack: oh goodness, idea! [03:35] SubStack: can use node-ssh for this [03:36] JusticeFries: or i guess [03:36] JusticeFries: is there a clean way to daemonize a node server? [03:36] SubStack: ssh keys for authentication among nodes [03:36] ryah: SubStack: ssl has auth [03:36] chapel: SubStack: with node-ssh could you make a simulated ssh session in an app that would basically only be app functions? [03:36] ryah: built-in [03:36] eyesUnclouded has joined the channel [03:36] SubStack: chapel: sure [03:37] ryah: SubStack: i.e. create your own CA [03:37] SubStack: that sounds pesky [03:37] ryah: SubStack: auth client connections against the CA [03:37] SubStack: but I'm not too familiar with ssl [03:37] jesusabdullah: http://li225-26.members.linode.com/thesis.pdf Check out chapter 3 near the end [03:37] jesusabdullah: COMSOL loooved to crash and burn and I had issues getting a good management system on the box I was using so, this is what happened. [03:37] zakabird has joined the channel [03:38] ryah: jesusabdullah: nice figures [03:38] Jourkey has left the channel [03:39] jesusabdullah: ryah: Thanks! It's not done yet. Still writing! If you see anything blatantly confusing feel free to tell me. [03:39] ryah: mathmatica? [03:39] jesusabdullah: A combination of MATLAB, COMSOL, python/matplotlib, GIMP and inkscape [03:39] jesusabdullah: I'm an arteest! [03:39] jesusabdullah: I actually used to draw a lot [03:39] jesusabdullah: in high school I even had a web comic [03:39] jesusabdullah: One of my projects is gonna be to make a web comic running app with node [03:40] jesusabdullah: Actually, it might be doable with client-side JS only [03:40] jesusabdullah: but why do that? ;) [03:40] SubStack: jesusabdullah: I like how your thesis reads like you're actually trying to explain your work to other people [03:41] jesusabdullah: SubStack: Thanks :D [03:41] jesusabdullah: Yeah, I really hope someone can learn from my lessons and run with them [03:41] SubStack: in most papers I've read it seems like the author's main motivation is to show how smart they are [03:41] jesusabdullah: even though I'm dropping some details and side-roads [03:41] jesusabdullah: I try not to have too much hubris there [03:41] SubStack: or to cover up how they didn't actually discover anything of value [03:42] DevX101 has joined the channel [03:42] jesusabdullah: Sometimes I fail at that, but what I really like to do when it comes to engineering, truth be told, is to do an advanced Bill Nye impression [03:42] jesusabdullah: and try to explain stuff [03:42] SubStack: the dnode readme could use some work in these respects too >_< [03:43] SubStack: explaining things is pretty tricky sometimes! [03:43] jesusabdullah: The dnode readme isn't too bad, imo [03:43] SubStack: v0.6 is better but I still think I could get the point across more clearly in less words [03:44] SubStack: anyhow, node-ssh is going to make so much awesome stuff possible [03:44] SubStack: wrapping around libssh now, which is itself pretty great [03:44] AAA_awright: How complex is it to just write an SSH server [03:45] Lorentz: Probably surprisingly not trivial, knowing security [03:45] SubStack: AAA_awright: it's not very complex if you limit yourself to only a few of the required key exchange, encryption, and compression algorithms, but it's very hard to get everything right [03:45] AAA_awright: This Node.js SSH server has been hyped for EVER [03:46] SubStack: AAA_awright: I know right? It's pretty tricky. [03:46] AAA_awright: ... or at least a very long time [03:46] zachsmith: SubStack: I thought the DNode readme was pretty good, although I generally don't read words, and skip straight to examples [03:46] SubStack: eh? pretty sure I've been the only one going on about it [03:46] dominic_ has joined the channel [03:46] SubStack: zachsmith: ah well that helps [03:46] SubStack: I like examples. [03:46] zachsmith: me too [03:49] tshpaper has joined the channel [03:49] dgathright has joined the channel [03:49] JusticeFries: wait, node-ssh is coming? [03:50] bentruyman has joined the channel [03:51] JusticeFries has joined the channel [03:51] unlink has joined the channel [03:51] unlink has joined the channel [03:53] eventi has joined the channel [03:54] JusticeFries has joined the channel [03:54] brainless has joined the channel [03:54] saikat has joined the channel [03:56] Emmanuel__ has joined the channel [03:57] SetupLy has joined the channel [03:57] Emmanuel__ has joined the channel [03:57] bentruyman has joined the channel [03:59] beawesomeinstead has joined the channel [04:00] dgathright has joined the channel [04:00] ryah: SubStack: i read so few papers, the ones i do are usually well recommended. i have the feeling the authors always know they've discovered something amazing. [04:01] datapimp has joined the channel [04:01] SubStack: JusticeFries: it is indeed! I'm wrapping libssh right now [04:02] JusticeFries: nice. [04:02] sleeplessinc has joined the channel [04:02] JusticeFries: now for a built in daemon and I'm happy. :D [04:03] SubStack: well I'm attacking the server part of it first [04:03] SubStack: since I need this for tunneling [04:04] SubStack: it should be pretty excellent for building deployment and automation systems too [04:06] JusticeFries: nice. [04:11] harth has joined the channel [04:13] bentruyman has joined the channel [04:13] SetupLy has left the channel [04:18] tbranyen: hmmm thinking about two object literals that map a token to a client and a client to a token for easier lookups [04:18] tbranyen: that speed would come at the cost of memory [04:19] tbranyen: wonder if javascript offers anyone way to help reverse lookups [04:24] rchavik has joined the channel [04:29] L6vi has joined the channel [04:33] gamut has joined the channel [04:33] walkah has joined the channel [04:34] walkah has joined the channel [04:36] gamut: Anybody ever see this cygwin error for git? **fatal error - could not load C:\Windows\system32\winmm.dll, Win32 error 487? [04:36] gamut: the file exists [04:36] gamut: permission issue? [04:38] gamut has left the channel [04:49] warz has joined the channel [04:52] wereHamster has joined the channel [04:52] stalled has joined the channel [04:59] sourcode_ has joined the channel [05:01] davidcoallier has joined the channel [05:16] Know1edge has joined the channel [05:17] jimt_ has joined the channel [05:18] pcardune has joined the channel [05:18] timmywil has joined the channel [05:18] andrewfff has joined the channel [05:19] stalled has joined the channel [05:22] razvandimescu has joined the channel [05:26] sh1mmer has joined the channel [05:26] zentoooo has joined the channel [05:28] dspree_ has joined the channel [05:28] dspree_ has joined the channel [05:28] astoon has joined the channel [05:28] prof-freud has joined the channel [05:28] razvandimescu: is there somebody around that installed the mongodb native drivers for node? [05:28] stonecobra: anyone know of a clean example to do a binary request from one server and pass it through using the 0.4.2 http client api? [05:28] stonecobra: j [05:29] jimt has joined the channel [05:30] briznad has joined the channel [05:31] zeqeiroz has joined the channel [05:33] McMAGIC-- has joined the channel [05:33] btipling has joined the channel [05:33] JianMeng has joined the channel [05:36] datenaoto has joined the channel [05:36] andrewfff has joined the channel [05:42] JJMalina has left the channel [05:42] jimt_ has joined the channel [05:42] JJMalina has joined the channel [05:47] stalled has joined the channel [05:48] matschaffer has joined the channel [05:55] redmind has joined the channel [05:55] Utkarsh_ has joined the channel [05:55] DevX101 has joined the channel [05:55] razvandimescu has joined the channel [05:55] Know1edge has joined the channel [05:55] sourcode_ has joined the channel [05:55] Emmanuel__ has joined the channel [05:55] brainless has joined the channel [05:55] zakabird has joined the channel [05:55] skm has joined the channel [05:55] bingomanatee has joined the channel [05:55] f1lt3r_ has joined the channel [05:55] atiti has joined the channel [05:55] aphelion has joined the channel [05:55] luke` has joined the channel [05:55] unomi has joined the channel [05:55] stepheneb has joined the channel [05:55] fr0stbyte has joined the channel [05:55] a_meteorite has joined the channel [05:55] stonecobra has joined the channel [05:55] SvenDowideit has joined the channel [05:55] shachaf has joined the channel [05:55] brianc has joined the channel [05:55] Vertice has joined the channel [05:55] stylus has joined the channel [05:55] matyr_ has joined the channel [05:55] fayce_ has joined the channel [05:55] Slashbunny has joined the channel [05:55] Nacho has joined the channel [05:55] jdub has joined the channel [05:55] peol has joined the channel [05:55] vilhonen_ has joined the channel [05:55] mischief has joined the channel [05:55] temp01 has joined the channel [05:55] cainus has joined the channel [05:55] joshthecoder has joined the channel [05:55] boucher has joined the channel [05:55] blowery has joined the channel [05:55] deoxxa has joined the channel [05:55] ollie has joined the channel [05:55] jakob has joined the channel [05:55] tswicegood has joined the channel [05:55] chapel has joined the channel [05:55] mrkurt has joined the channel [05:55] sstephenson_ has joined the channel [05:56] masahiroh has joined the channel [06:03] reid has joined the channel [06:04] meso_ has joined the channel [06:06] charlenoqueirozp has joined the channel [06:06] nail_ has joined the channel [06:07] meso__ has joined the channel [06:09] skm has joined the channel [06:09] mscdex: sigh [06:09] mscdex: att is gonna start capping dsl customers soon [06:09] ryanj has joined the channel [06:10] jesusabdullah: Asshats [06:10] jesusabdullah: I'm gonna go start my OWN ISP! [06:10] jesusabdullah: With blackjack! And hookers! [06:11] mscdex: 150gb a month [06:12] razvandimescu has joined the channel [06:12] yenz has joined the channel [06:13] jelveh has joined the channel [06:13] mscdex: i wish there was more dsl choices around here [06:13] redmind: thats funny, here in aus we were stuck with crap like 20GB caps until the ACCC took a bunch of ISP to court over false advertising [06:14] davemo has joined the channel [06:14] mscdex: it's almost like they're expecting people to pay overages, since there's more people streaming (hd) content now more than before [06:15] seivan has joined the channel [06:15] stephen_mcd has joined the channel [06:15] mscdex: i find it hard to believe their claim of "only 2% of customers use more than 150gb a month" [06:16] dominic_ has joined the channel [06:16] dominic_: or have you changed code? [06:17] redmind: mscdex: more likely they have oversold their network/think they can get away with some good old fashion gouging [06:18] mscdex: yeah in a statement they made they tried to contort the issue as if the move was somehow saving people money [06:20] sivy has joined the channel [06:23] dgathright has joined the channel [06:23] dgathright has joined the channel [06:26] makuchaku has joined the channel [06:26] dgathright has joined the channel [06:29] fayce has joined the channel [06:29] patcito has joined the channel [06:37] losing has joined the channel [06:38] sholmes has joined the channel [06:39] jakehow has joined the channel [06:40] sholmes: One thing that's kinda bothering is needing to put a \ before newlines in strings in JS, especially when you're writing SQL. [06:40] reid has joined the channel [06:42] kristsk has joined the channel [06:43] SubStack: sholmes: I like to put a + in front instead [06:43] SubStack: "one"\n+"two"\n [06:43] sholmes: Anyone else find this bothering? [06:44] fangel has joined the channel [06:44] piscisaureus has joined the channel [06:50] harth has joined the channel [06:52] sholmes: SubStack: even more of a hassle, requires more quotations [06:53] dgathright has joined the channel [06:53] sveimac has joined the channel [06:53] sholmes: It's not like PHP where you can just write your SQL between quotes. You have to make sure you escape the newlines or concatenate right... [06:53] sholmes: :\ [06:54] mikeal has joined the channel [06:54] admc has joined the channel [06:54] Utkarsh__ has joined the channel [06:56] dguttman has joined the channel [06:57] sholmes: That's one issue I have with server-side JS. [06:57] sholmes: If only a new JS standard could fix this. >.< [06:59] sholmes: Anyway. Maybe I should put my SQL queries in their own file. But then I wouldn't be able to generate the SQL with JS; it will be more static. [07:02] jelveh has joined the channel [07:06] neshaug has joined the channel [07:06] razvandimescu has joined the channel [07:07] walkah has joined the channel [07:07] walkah has joined the channel [07:07] mraleph has joined the channel [07:14] piscisaureus has joined the channel [07:16] Utkarsh__ has joined the channel [07:17] tbranyen: sholmes: use templating then :D [07:17] sholmes: sql templating? [07:17] pdelgallego_ has joined the channel [07:17] pdelgallego has joined the channel [07:18] void_ has joined the channel [07:19] luke` has joined the channel [07:19] tbranyen: sholmes: like prepared statements [07:20] herbySk has joined the channel [07:20] tbranyen: hell thats how mssql is written if you have long queries make them a separate file [07:20] tbranyen: then dynamically load them in when you need them [07:21] sholmes: but how would you use templating in an sql file? [07:21] muhqu has joined the channel [07:21] tbranyen: why not? its just a text file [07:21] petefoth has joined the channel [07:22] muhqu_ has joined the channel [07:23] kawaz_air has joined the channel [07:23] sholmes: wouldn't you need a templating engine to do that? [07:23] Emmanuel__ has joined the channel [07:23] redmind: node has plenty of those, some good ones [07:24] sholmes: but aren't they for HTML? [07:24] redmind: try dustjs, doesnt force a specific format [07:24] SamuraiJack has joined the channel [07:25] redmind: or the famous mustache [07:27] SubStack: query.replace('%s', function () { return escaper(params.pop()) }) [07:27] astoon has joined the channel [07:29] piscisaureus has joined the channel [07:30] adamt has joined the channel [07:31] bergie has joined the channel [07:31] SamuraiJack_ has joined the channel [07:31] DEVX_ has joined the channel [07:32] kawaz_ai_ has joined the channel [07:32] d_ch has joined the channel [07:33] breccan has joined the channel [07:33] dgathright has joined the channel [07:34] svenlito has joined the channel [07:35] stepheneb has joined the channel [07:37] jetienne has joined the channel [07:37] kawaz_air has joined the channel [07:39] kawaz_work has joined the channel [07:40] __tosh has joined the channel [07:44] emattias has joined the channel [07:44] mikeal has joined the channel [07:45] ph^ has joined the channel [07:45] piscisaureus has left the channel [07:45] piscisaureus has joined the channel [07:49] piscisaureus has left the channel [07:51] piscisaureus has joined the channel [07:52] ph^ has joined the channel [07:52] nyholt has joined the channel [07:52] mytrile has joined the channel [07:54] mischief has joined the channel [07:55] jbpros has joined the channel [07:55] luke` has joined the channel [07:56] Virtuo has joined the channel [08:00] colinsullivan has joined the channel [08:02] fangel has joined the channel [08:05] deltasquare4 has joined the channel [08:06] mAritz has joined the channel [08:06] asdfsafdsa: [08:09] Bemmu has joined the channel [08:10] FireFly|n900 has joined the channel [08:11] pyrotechnick has joined the channel [08:12] pyrotechnick: SubStack: browserify is badass [08:13] SubStack: ^_^ [08:13] aways|bnc: ACTION Hi all [08:13] asdfsafdsa: hi [08:14] [AD]Turbo has joined the channel [08:14] [AD]Turbo: hi there [08:14] makuchaku has joined the channel [08:16] deltasquare4: Hi [08:16] pyrotechnick: sup [08:17] deltasquare4: been playing with http client [08:18] deltasquare4: node doesn't handle 301/302 redirects automatically, does it? [08:18] Utkarsh__ has joined the channel [08:20] matjas has joined the channel [08:21] andrewfff has joined the channel [08:21] SubStack: curse you "undefined symbol" [08:22] stonecobra: deltasquare4: nope, use request if you want that sort of higher level functionality [08:22] V1 has joined the channel [08:22] V1: \o/ [08:22] Hardway has joined the channel [08:23] datenaoto has joined the channel [08:23] deltasquare4: stonecobra: thanks.. I'll check it out [08:24] SubStack: https://github.com/substack/node-ssh/blob/master/wscript [08:25] MrTopf has joined the channel [08:25] SubStack: but then I get this pesky error when I do: node -e 'new(require("./build/default/sshd").Server)(5555,"moo")' [08:25] Zemsai has joined the channel [08:25] jetienne: require doesnt work well with -e [08:26] jetienne: repl in the same dir will work [08:26] SubStack: https://gist.github.com/868894 [08:26] SubStack: same error in the repl [08:26] jetienne: ah ok, so not the same issue as me [08:26] saschagehlich has joined the channel [08:27] SubStack: updated https://gist.github.com/868894 [08:27] SubStack: with the pkg-config output [08:27] SubStack: oh hmm [08:28] SubStack: messing with conf.env [08:28] luke` has joined the channel [08:28] SubStack: I see one of my other wscripts does that [08:28] Zemsai has left the channel [08:28] msucan has joined the channel [08:30] herbySk: NaN === NaN [08:30] herbySk: v8: NaN === NaN [08:30] v8bot: herbySk: false [08:30] herbySk: hm [08:30] SubStack: success! [08:32] fayce has joined the channel [08:33] raphdg has joined the channel [08:33] eschnou has joined the channel [08:34] datenaoto has joined the channel [08:37] troessner has joined the channel [08:38] devrim has joined the channel [08:38] Croms has joined the channel [08:38] V1: Doh, the Server Send Events API === fail.. They forgot to implement a onclose event >_<, close events are seen as errors -__-" [08:38] meso_ has joined the channel [08:38] dubbe has joined the channel [08:40] ph^ has joined the channel [08:41] tc77 has joined the channel [08:41] adambeynon has joined the channel [08:41] maru_cc__ has joined the channel [08:43] meso__ has joined the channel [08:46] Utkarsh has joined the channel [08:46] q_no has joined the channel [08:50] tktiddle has joined the channel [08:50] redmind has joined the channel [08:51] jelveh has joined the channel [08:53] dve has joined the channel [08:53] pyrotechnick has left the channel [08:56] Evet has left the channel [08:57] mhausenblas has joined the channel [08:58] teemow has joined the channel [08:58] kal-EL_ has joined the channel [08:59] mhausenblas_ has joined the channel [09:00] sveimac has joined the channel [09:02] ntelford has joined the channel [09:02] jdub has joined the channel [09:03] schonyo has joined the channel [09:03] TomY_ has joined the channel [09:04] Zemsai has joined the channel [09:06] aklt has joined the channel [09:06] Druid_ has joined the channel [09:07] Zemsai has left the channel [09:07] Shrink has joined the channel [09:07] Shrink has joined the channel [09:07] __tosh has joined the channel [09:08] maru_cc__ has joined the channel [09:11] piscisaureus has joined the channel [09:11] AAA_awright: Is there any reason to not commit a node_modules directory to a Git repository? [09:11] AAA_awright: For use by the application kept there [09:11] piscisaureus: You gotta ask isaacs when he's around [09:12] piscisaureus: But I guess it's fine [09:12] AAA_awright: SubStack: node-ssh needs a README I have no clue what system libraries I need to compile this [09:12] AAA_awright: piscisaureus: Why isaacs? [09:12] asdfsafdsa: is there linux binaries for node.js? [09:13] asdfsafdsa: my computer is too slow to compile it [09:13] AAA_awright: asdfsafdsa: Pre-compiled? [09:13] asdfsafdsa: yes [09:14] AAA_awright: asdfsafdsa: No it's not [09:14] asdfsafdsa: actually, ive compiled it on another computer. could i just transfer the files from there? [09:14] adamt: too slow? rofl. [09:14] adamt: clearly you never ran Gentoo on a slow machine :P [09:14] AAA_awright: asdfsafdsa: You need to give it at least half an hour [09:14] SubStack: AAA_awright: well it doesn't do anything yet so you're not meant to compile it [09:14] AAA_awright: adamt: +1 [09:14] AAA_awright: adamt: As a Gentoo user on a Pentium 1 laptop [09:14] adamt: heh neat. [09:15] andrewfff has joined the channel [09:15] AAA_awright: Not for day to day use, right now I'm using a p4 system, that compiled Node.js in about 15 minutes [09:15] adamt: worst i tried was trying to compile OO.o, and after 13 hours noticing that all CPU cycles went for swapping data between ram and hdd. :P [09:15] AAA_awright: And updates are 1-5 minutes if I don't need to run make clean [09:15] AAA_awright: Hahah [09:16] AAA_awright: adamt: Best to turn down the -j number if it's using too much memory, a PHP compile failed that way [09:16] adamt: 256MB ram and a hdd capabable of about 15MBps transfer :P [09:16] AAA_awright: Ow [09:16] asdfsafdsa: ill rephrase it. it's not too slow, but it crashes if the cpu gets used too much [09:16] asdfsafdsa: which happens when i try to compile node [09:16] AAA_awright: adamt: The third Gentoo system I use, the one that couldn't finish php with -j4, is 512MB [09:17] AAA_awright: asdfsafdsa: You should be able to compile on another system and transfer everything [09:17] rihegher has joined the channel [09:17] rihegher: Hello [09:17] AAA_awright: asdfsafdsa: And after that you should even be able to just run "make" and only recompile what changed, if you want to do just the initial compile that way [09:18] AAA_awright: asdfsafdsa: There is a Git repository on Github that's the compiled version of Node.js... not sure if that's compatible with their TOS but it's there somewhere [09:18] rihegher: Is there anyone using the node-mongodb-native driver ? [09:18] AAA_awright: At least, as of a few months ago there was [09:19] asdfsafdsa: ok thx awright [09:19] Astro has joined the channel [09:21] daglees has joined the channel [09:23] floby has joined the channel [09:28] rihegher has left the channel [09:28] meso_ has joined the channel [09:28] Spion_ has joined the channel [09:29] sveimac has joined the channel [09:30] meso__ has joined the channel [09:31] markwubben has joined the channel [09:32] Emmanuel__ has joined the channel [09:33] meso_ has joined the channel [09:33] aabt has joined the channel [09:34] meso___ has joined the channel [09:35] meso__ has joined the channel [09:35] D000 has joined the channel [09:36] Xano has joined the channel [09:40] muhqu_ has joined the channel [09:42] tbassetto has joined the channel [09:42] svenlito has joined the channel [09:45] Kryckan has joined the channel [09:47] Evet has joined the channel [09:49] makuchaku has joined the channel [09:50] jelveh: ryah: is there a way to work around the agent problem when opening lots of requests? https://gist.github.com/star/864727 [09:50] charlesbrown has joined the channel [09:51] ghost has joined the channel [09:57] fly-away has joined the channel [09:58] adamt: jelveh: internal server error [09:58] jelveh: sorry https://gist.github.com/864727 [10:00] jimt has joined the channel [10:00] sveimac has joined the channel [10:01] saschagehlich has joined the channel [10:02] pietern has joined the channel [10:03] meso_ has joined the channel [10:06] fly-away has joined the channel [10:07] McMAGIC-- has joined the channel [10:08] Croms: Does anyone know how I can reference an external .json file inside node .js files? [10:09] suckerpunch has joined the channel [10:10] bzinger has joined the channel [10:10] deltasquare4: Croms: what do you mean by "reference"? [10:11] deltasquare4: do you want to read configuration or something? [10:13] Croms: The .json file contains an array with about 700 entries. Just need to look up the value of a corresponding key. [10:13] maru_cc__ has joined the channel [10:13] charlesbrown has left the channel [10:13] markwubben has joined the channel [10:14] Croms: I got it working with require(), but i have to rename the .json file to .js. [10:14] mike5w3c has joined the channel [10:15] SubStack: don't do that [10:15] SubStack: JSON.parse(fs.readFileSync(__dirname + '/file.json')) [10:15] SubStack: scratch that [10:15] SubStack: JSON.parse(fs.readFileSync(__dirname + '/file.json', 'utf8')) [10:15] monokrome has joined the channel [10:16] maru_cc has joined the channel [10:16] Croms: Thanks mate. [10:17] MattJ has joined the channel [10:17] technoweenie has joined the channel [10:19] sourcode has joined the channel [10:20] jimt_ has joined the channel [10:23] shaunau has joined the channel [10:24] makuchaku has joined the channel [10:25] jimt has joined the channel [10:25] nyholt has joined the channel [10:25] aho has joined the channel [10:25] makuchaku has joined the channel [10:26] sveimac has joined the channel [10:28] alessio_alex has joined the channel [10:28] vish has joined the channel [10:30] dominic_: hey, is there a npm lilb that can expand file paths /path/*/file/*.js with wildcards? [10:32] danfo has joined the channel [10:32] fisted_ has joined the channel [10:35] astropirate has joined the channel [10:36] squeeks: https://github.com/isaacs/node-glob [10:38] meh has joined the channel [10:38] sh1mmer has joined the channel [10:38] meh: piscisaureus: ping [10:39] froak has joined the channel [10:43] astoon has joined the channel [10:48] chicmome has joined the channel [10:48] chicmome: RangeError: Maximum call stack size exceeded [10:48] chicmome: Help? No idea how to debug this. [10:48] Stan____ has joined the channel [10:49] chicmome: Is there any way to get a stack trace dumped out? [10:52] petefoth has left the channel [10:52] gozala1 has joined the channel [10:53] adamt: what is the recommended library to connect to couchdb with? [10:53] ajnasz has joined the channel [10:55] jimt has joined the channel [10:56] mscdex: chicmome: (new Error()).stack [10:57] TheFuzzball_ has joined the channel [10:57] mscdex: Happy Pi day everyone! [10:58] squeeks: shit, I totally fogot. [10:59] MrTopf has joined the channel [11:06] Croms has joined the channel [11:07] Juske has joined the channel [11:07] andrewfff has joined the channel [11:09] sveimac_ has joined the channel [11:13] nesQuick has joined the channel [11:14] swistak has joined the channel [11:15] eee_c has joined the channel [11:17] Utkarsh has joined the channel [11:20] seivan has joined the channel [11:21] Utkarsh_ has joined the channel [11:21] Croms has joined the channel [11:22] kawaz_air has joined the channel [11:23] piscisaureus has joined the channel [11:25] d0k has joined the channel [11:26] gausby has joined the channel [11:28] mraleph1 has joined the channel [11:32] okuryu has joined the channel [11:32] jasong_at_apache has joined the channel [11:32] mraleph has joined the channel [11:32] xla has joined the channel [11:32] mraleph1 has joined the channel [11:33] mcgiddin has joined the channel [11:36] luke` has joined the channel [11:38] sh1mmer has joined the channel [11:41] lukegalea has joined the channel [11:44] L6vi has joined the channel [11:47] eventi has joined the channel [11:47] jimt_ has joined the channel [11:49] Wizek has joined the channel [11:50] zzak has joined the channel [11:50] zzak has joined the channel [11:52] pastak has joined the channel [11:53] shaunau has joined the channel [11:54] adamt: could anybody tell me how a query to a view with a key is done with cloudhead/cradle? [11:59] zhware has joined the channel [12:00] piscisaureus has joined the channel [12:01] tiemonster has joined the channel [12:02] eventi has left the channel [12:02] jimt has joined the channel [12:03] Sorella has joined the channel [12:03] charlenopires has joined the channel [12:05] [[zz]] has joined the channel [12:05] bergie has joined the channel [12:05] zhware has joined the channel [12:06] mcgiddin has joined the channel [12:07] rbranson has joined the channel [12:07] jimt_ has joined the channel [12:08] floby has joined the channel [12:12] pastak_ has joined the channel [12:12] ryanfitz has joined the channel [12:14] jmar777 has joined the channel [12:16] Utkarsh has joined the channel [12:17] sveimac_ has joined the channel [12:20] Utkarsh has joined the channel [12:21] jimt has joined the channel [12:21] eee_c has joined the channel [12:22] mcgiddin has left the channel [12:23] ph^ has joined the channel [12:23] Utkarsh_ has joined the channel [12:24] zemanel has joined the channel [12:26] jimt has joined the channel [12:33] adamt: does the screencasts on http://expressjs.com/screencasts.html work for anybody? [12:33] FireFly|n900 has joined the channel [12:33] ekes: adamt: plays fine here. [12:33] adamt: weird. thx for checking. [12:39] pdelgallego_ has joined the channel [12:39] pdelgallego has joined the channel [12:39] kriszyp has joined the channel [12:41] seivan has joined the channel [12:45] eventi has joined the channel [12:46] fairwinds has joined the channel [12:46] snafuz has joined the channel [12:47] sveimac has joined the channel [12:48] jimt_ has joined the channel [12:49] sonyon has joined the channel [12:50] fumanchu182 has joined the channel [12:51] dgathright has joined the channel [12:52] Remoun has joined the channel [12:57] rfay has joined the channel [13:00] lessthanzero has joined the channel [13:02] possibilities has joined the channel [13:04] eyesUnclouded has joined the channel [13:04] possibilities has joined the channel [13:05] dominic_ has joined the channel [13:05] dominic_ has joined the channel [13:07] floby has joined the channel [13:10] dyer has joined the channel [13:10] eee_c1 has joined the channel [13:12] eee_c has joined the channel [13:13] arpegius has joined the channel [13:13] dominic_ has joined the channel [13:14] dominic_: chicmome: it's a stack overflow. [13:15] malkomalko has joined the channel [13:17] sveimac_ has joined the channel [13:18] makuchaku has joined the channel [13:22] malkomalko: morning :D [13:22] shaunau has joined the channel [13:23] yyamano has joined the channel [13:25] timmywil has joined the channel [13:25] davidsklar has joined the channel [13:27] ianward has joined the channel [13:27] ianward has left the channel [13:30] boaz has joined the channel [13:31] dnolen has joined the channel [13:31] dnolen has joined the channel [13:32] dnolen has left the channel [13:37] eb4890 has joined the channel [13:37] pandeiro has joined the channel [13:38] BillyBreen has joined the channel [13:39] c4milo1 has joined the channel [13:39] strmpnk has joined the channel [13:40] jlecker has joined the channel [13:41] daglees has joined the channel [13:43] Kryckan has left the channel [13:44] ryanfitz has joined the channel [13:44] shiawuentan has joined the channel [13:45] possibilities has joined the channel [13:45] eee_c has joined the channel [13:45] V1: HA! Opera 8.0 support Socket.IO achieved :)! [13:46] Epeli: Are there many Opera 8.0 users? :) [13:46] dubbe has joined the channel [13:47] Epeli: but that makes Socket.IO more credible anyways :) [13:47] jetienne: V1: nice! [13:48] sveimac has joined the channel [13:48] V1: Epeli: I highly doubt it :p but it's nice to know that it just works :p [13:48] DevX101 has joined the channel [13:48] V1: Socket.IO supports more ancient browsers than I can install on my Mac [13:49] Epeli: hah :D [13:53] Remoun has joined the channel [13:55] seivan has joined the channel [13:55] ajnasz has joined the channel [13:55] timmywil has joined the channel [13:55] jscheel has joined the channel [13:56] squeeks: V1: hey I can get IE for Mac running on Snow Leopard, you don't have to worry about that [13:56] jimt_ has joined the channel [13:56] V1: Really? Cool, got dmg of IE for Mac somewhere? [13:57] squeeks: I haven't got the dmg but I can zip it up. [13:57] squeeks: You just need Rosetta installed. [13:58] V1: Already have rosetta installed, I needed it for Opera 8 support [13:58] tjholowaychuk has joined the channel [13:58] squeeks: http://www.megaupload.com/?d=R0XIRIGB [13:58] V1: Thanks allot :) [13:59] perezd has joined the channel [13:59] Utkarsh__ has joined the channel [13:59] ajashton has joined the channel [14:01] FireFly|n900 has joined the channel [14:01] dominic_ has joined the channel [14:02] FireFly has joined the channel [14:03] V1: Awww Socket.IO doesn't work under IE 5.2 [14:03] squeeks: awwww. file a bug report. [14:03] squeeks: Make them fix it. [14:04] lukegalea has joined the channel [14:04] piscisaureus: Looks like Socket.IO is also not working on my microwave. [14:04] tim_smart has joined the channel [14:04] case__: piscisaureus, works on mine, running netbsd [14:04] case__: ACTION hides [14:04] V1: I should also file a bug against JSON2.js as it also breaks in IE 5.2! [14:05] throughnothing has joined the channel [14:05] piscisaureus: meh netbsd mine runs dos... the games for dos are much better [14:05] dgathright has joined the channel [14:05] shift__: ACTION laughs at the IE5.2 and NetBSD refs. [14:05] mattijs: Is there someone who could tell me how to enable debug output on node.js? I compiled it with --debug already [14:05] lessthanzero has left the channel [14:05] V1: We actually still have some users on our site who users IE 5.5 <3 [14:05] piscisaureus: mattijs: what kind of debug you need? [14:06] Insanity5902 has joined the channel [14:06] mattijs: well, i see debug(some message) statements everywhere [14:06] mattijs: i would like to see those [14:06] piscisaureus: oh, use NODE_DEBUG=module[,module...] node_g [14:06] piscisaureus: so module can be net, or fs, or module [14:06] piscisaureus: or whatever file in lib/*.js [14:07] mattijs: aah, ok. So i got some weird error in the http module so I add that to the NODE_DEBUG env? [14:07] piscisaureus: NODE_DEBUG=http node_g [14:07] piscisaureus: yes [14:07] piscisaureus: add net too to be sure [14:08] jtsnow has joined the channel [14:08] bradleymeck: v1 do they have a good % and/or good reason to be on ie5.5? (plus im sure they are used to the web only half working) [14:08] mattijs: hmm, http module does not seem to want to ouput debug :S [14:09] piscisaureus: but you are getting debug ouput from net? [14:09] mattijs: yup [14:09] pdelgallego_ has joined the channel [14:09] jetienne: piscisaureus: is this debug removed by a postprocessor in the release version of node ? [14:09] pdelgallego has joined the channel [14:09] V1: bradleymeck: I have no clue why on earth someone would still use IE 5.5, I guess they are just afraid to update. And these IE 5.5 users are still actual customers of us.. [14:09] piscisaureus: yeah [14:09] piscisaureus: a preprocessor I guess :-O [14:10] bradleymeck: v1 i would be afraid not to update... but if they are still valuable enough business makes sense [14:10] jetienne: piscisaureus: ok [14:10] suckerpunch has joined the channel [14:11] prof-freud has joined the channel [14:11] dyer has joined the channel [14:12] kenbolton has joined the channel [14:14] paulrobinson has joined the channel [14:15] saschagehlich has joined the channel [14:16] amacleod has joined the channel [14:18] ryanfitz has joined the channel [14:18] akahn has joined the channel [14:19] akahn has left the channel [14:20] paulrobinson has left the channel [14:20] bradleymeck: jetienne / piscisaureus, after some perusing, its in v8/src/macros.py during build debug gets set to either empty or a real macro, so it does some preprocessing during v8's compilation since macros are a bit odd [14:20] saschagehlich_ has joined the channel [14:22] piscisaureus: bradleymey: it is hooked into js2c that turns javascript into c strings so they can be compiled into the node binary [14:22] saschagehlich has joined the channel [14:22] pdelgallego_ has joined the channel [14:22] pdelgallego has joined the channel [14:22] perezd: need a hand, simply did an npm install cradle, and trying to do a basic require('cradle') says module not found, is there a PATH I need to check for? [14:23] mattijs: perezd: what does require.paths say? it should contain paths require checks for modules [14:23] perezd: can I make npm tell me where its installing things? [14:23] jmar777: perezd: which version of node and which versino of npm? [14:23] perezd: latest of both [14:24] Hello71 has joined the channel [14:24] Hello71 has joined the channel [14:24] perezd: 0.3.15 npm, 0.4.2 node [14:24] perezd: i think it may be a path issue [14:24] perezd: need to figure out where npm is installing things [14:24] mattijs: default is a .npm folder in the node library folder [14:25] perezd: root = "/usr/local/lib/node" [14:25] perezd: mine says that [14:25] mikl has joined the channel [14:25] perezd: there is a .npm in there [14:26] mattijs: are the modules linked in that directory? [14:26] JojoBoss has joined the channel [14:26] perezd: I guess I need to change the paths somehow [14:26] perezd: I see things in it yes [14:27] ceej has joined the channel [14:27] mattijs: node should include that directory by default [14:27] steph021 has joined the channel [14:28] zachsmith has joined the channel [14:28] perezd: adding the path manually fixed it [14:28] perezd: for some reason it adds the wrong path (homebrew install) [14:28] mattijs: piscisaureus: do you happen to know anything about HTTP: AGENT SOCKET ERROR: ENOTCONN, Transport endpoint is not connected [14:29] sveimac has joined the channel [14:30] possibilities has joined the channel [14:30] piscisaureus: mattijs: sorry, no. [14:31] Emmanuel__ has joined the channel [14:31] sirkitree has joined the channel [14:32] losing has joined the channel [14:32] sourcode has joined the channel [14:34] rbranson has joined the channel [14:35] augustl: what's a good way to monitor a node http server and restart it asap when/if the process dies? [14:35] unlink has joined the channel [14:35] unlink has joined the channel [14:35] squeeks: cluster. [14:35] tjholowaychuk: augustl: monit, or http://learnboost.github.com/cluster/ [14:36] tjholowaychuk: woah! mah blue button is all messed up in chrome now [14:36] Utkarsh has joined the channel [14:37] augustl: isn't monit polling, by default every 120 seconds? [14:37] softdrink has joined the channel [14:37] augustl: I suppose I could make monit poll every second instead [14:37] V1: you can just configure that augustl [14:38] tjholowaychuk: augustl: yeah you can tweak it no problem [14:38] sveimac has joined the channel [14:39] brianloveswords has joined the channel [14:40] ph^ has joined the channel [14:42] adamvandenhoven has joined the channel [14:43] bentruyman has joined the channel [14:44] postwait has joined the channel [14:45] strmpnk has joined the channel [14:47] bzinger has joined the channel [14:47] xandrews has joined the channel [14:47] jmar777: tjholowaychuk: wonder if that's a chrome bug. i'd expect the box-shadow to follow the border-radius [14:47] squeeks: So when I run require('express').createServer(); in node's REPL, it works. When I run it in a .js file, node chokes with "ReferenceError: express is not defined" [14:47] squeeks: what the hell? [14:48] tjholowaychuk: jmar777: not sure, it was fine before and I havent touched anything [14:48] tjholowaychuk: squeeks: hmm something funky with npm? [14:48] lukegalea has joined the channel [14:49] squeeks: hrm. NODE_PATH is set. [14:50] adamvandenhoven: N00B help please: I'm starting my first Node app. I'm planning to use express, mongoose and Vows (or something similar for BDD). It seems that putting my schema into a separate file which I then require() into the app. All the mongoose examples hardcode the mongo DB URI but that seems faulty in principle and problematic for testing. What's the best practice and/or blog post/tutorial that covers this? [14:50] squeeks: I would imagine isaacs is still in bed. [14:51] Draggor: SubStack: I'm trying to npm install the latest bigint version on cygwin, and now it's yelling that it's failling to unpack the tarball [14:51] tjholowaychuk: adamvandenhoven: with express you can use the configure() callbacks to set up different connections for NODE_ENV=test etc [14:51] bradleymeck: adamvandenhoven, i tend to do stuff like that in configs, can just make a config file for require or if you need something complex, https://github.com/lorenwest/node-config [14:52] tjholowaychuk: bradleymeck: express has config stuff built in :p [14:52] bradleymeck: your framework will never take me alive!, but that is a nice feature... [14:53] tjholowaychuk: haha [14:53] adamvandenhoven: tjholowaychuck & bradleymeck -- Thanks. [14:53] tjholowaychuk: if you use connect there is little reason not to use express [14:53] malloc_ has joined the channel [14:54] bradleymeck: i tend to not use connect anymore, then again im not really doing websites too often in node [14:54] ncb000gt has joined the channel [14:54] tjholowaychuk: gotcha [14:54] JianMeng1 has joined the channel [14:54] ikarosdaedalos has joined the channel [14:54] JJMalina has joined the channel [14:55] Draggor: bradleymeck: got a cygwin environment you can test a 'npm install bigint' against? [14:55] bradleymeck: sure [14:55] c4milo has joined the channel [14:55] Draggor: version 0.2.0 [14:55] brianm has joined the channel [14:56] yyamano has joined the channel [14:56] void_ has joined the channel [14:56] davidwalsh has joined the channel [14:57] bradleymeck: gotta rebuild node since i was messing with it, give sec [14:57] augustl: tjholowaychuk: http://learnboost.github.com/cluster/ makes some claims I'm unable to find more info about, such as zero-downtime reload [14:57] tjholowaychuk: augustl: what about it [14:57] augustl: I just want to read more about it :) [14:58] tjholowaychuk: oh haha [14:58] augustl: what it does, how it does it, etc [14:58] zomgbie has joined the channel [14:58] jmar777: tjholowaychuk: could you expand on using connect w/out express? we're using connect for pure REST API's - no "web application-y" stuff. Any reason we should be using express for primarily json responses (w/ a little content negotation thrown in)? [14:59] pcardune has joined the channel [14:59] fumanchu182: I'm getting up to date on the latest version of node as I upgrade an existing piece of software, did the "sys" module get merged int "utils"? [14:59] tjholowaychuk: jmar777: woudnt worry about it to much for that, but express is pretty thin on top of connect so its not a big deal to use both. even if you are just using small features likes res.send(obj) will respond with json [14:59] tjholowaychuk: not a big deal for that case i suppose [14:59] jmar777: fumanchu182: wouldn't say merged, so much as "moved" [14:59] briznad has joined the channel [14:59] fumanchu182: jmar777, okay but existing calls to sys should be okay? [14:59] davidwalsh has joined the channel [14:59] tjholowaychuk: augustl: when you send SIGUSR2, or $ node server.js restart, or restart() from the REPL [14:59] tjholowaychuk: it spawns a new master process [14:59] tjholowaychuk: to accept connections with your new code [14:59] tim_smart: fumanchu182: OK but not recommended. [15:00] tjholowaychuk: while the other one handles previous connections and slowly dies [15:00] fumanchu182: tim_smart, I will start adding them to my todo list then to convert over to util then. Hopefully a regex replace and match can do them all in batch. [15:00] jmar777: fumanchu182: it's still aliased, but you'll get some warnings if you require('sys'). also, 'util', not 'utils' [15:00] fumanchu182: thanks! [15:01] Draggor: bradleymeck: not a problem [15:01] jmar777: fumanchu182: ya, we recently made the change ourselves. we ended up changing some stuff to take advantage of the new http client interface, but other than that it was a pretty "thoughtless" migration [15:01] colinclark has joined the channel [15:03] dberlinger has joined the channel [15:03] tjholowaychuk: augustl: the code is pretty clean and well documented if you want to see how it works [15:03] gozala has joined the channel [15:04] augustl: tjholowaychuk: I see, tnx :) [15:04] zakabird has joined the channel [15:04] kriszyp has joined the channel [15:05] hobodave has joined the channel [15:05] adamvandenhoven has joined the channel [15:06] yonkeltron has left the channel [15:06] dguttman has joined the channel [15:06] bshumate has joined the channel [15:06] bshumate has joined the channel [15:07] jmar777: tjholowaychuk: thanks - we already ripped about 80% of res.send from express, which so far was the only thing we've needed beyond connect. (massive tjholowaychuk props given in the comments, of course :)) [15:07] tjholowaychuk: jmar777: yeah for something json based you wouldnt really need much more than that [15:07] tjholowaychuk: express exposes the router in a nicer way though [15:08] tjholowaychuk: but ill leave the router in connect [15:08] tjholowaychuk: since its useful for other frameworks [15:08] bingomanatee has joined the channel [15:08] possibilities has joined the channel [15:10] bradleymeck: draggor v8 is failing to build here, will get back to you when its pummeled out [15:10] nciagra has joined the channel [15:10] Draggor: bradleymeck: ha, okay. I just did a sanity check, I'm able to grab it fine on my nix box at least. [15:10] Draggor: cygwin, still confused at that one [15:11] mattfawcett has joined the channel [15:12] bradleymeck: cygwin is like trying to build on prayers and dreams whenever something changes [15:12] herbySk has joined the channel [15:12] warz has joined the channel [15:12] Draggor: I have two installs on my work machine right now, I might go do a third >_> [15:13] visa has joined the channel [15:13] mscdex: what's wrong with the cygwin build? [15:13] randomlast has joined the channel [15:13] randomlast has left the channel [15:14] bradleymeck: not sure, i have your patch in but its giving the same snapshot.cc error 127 [15:14] randomlast has joined the channel [15:15] Ezku\ has joined the channel [15:15] bradleymeck: i wish i could have something like make -superverbose [15:16] lukus has joined the channel [15:16] mscdex: -vvv ? [15:16] mscdex: heh [15:16] mraleph: I thought that node should build on cygwin without any patches now. [15:17] mscdex: the v8 build problem i had was because of the version of windows i was using, that's why reverting back worked for me [15:17] randomlast has left the channel [15:17] bradleymeck: give me a min im pulling in changes and checking, i dont have the fastest machine ever [15:17] mscdex: so not sure what problem you're having [15:17] mscdex: :s [15:18] bradleymeck: building v8 from scons works fine... [15:20] briznad has joined the channel [15:20] mattfawcett: Hi, I'm trying to serialize a Javascript hash eg {name: "Matt", age: 99} into a string to use in the body of a POST request. Eg name=Matt&age=99 - Is there a way to do this built into Node? [15:20] bradleymeck: http://nodejs.org/docs/v0.4.2/api/querystring.html [15:20] jmar777: mattfawcett: JSON.stringify() [15:21] jmar777: mattfawcett: oops, didn't see the query string requirement [15:21] piscisaureus: mraleph: afaict v8 *does* build on cygwin without patches. Only not for mscdex, 'cause he is using windows NT4 [15:21] mscdex: :D [15:21] mraleph: holy cow [15:21] bradleymeck: what would make `make` for node fail when scons for v8 works [15:22] bradleymeck: *when building v8 [15:22] piscisaureus: well I don't know, but you got an error message I presume/ [15:22] mraleph: bradleymeck: does 'scons snapshot=on' works for you? [15:22] mattfawcett: jmar777 - Yeah its the querystring format I need. Trying to avoid writing myself as escaping everything correctly could get problematic [15:22] jmar777: mattfawcett: did you see bradleymeck's comment? that was for you. [15:23] bradleymeck: mraleph ah, no [15:23] mraleph: hehe what's the error? [15:23] mattfawcett: Ah I missed that, Thanks bradleymeck [15:24] bradleymeck: mraleph only have "scons: *** [obj/release/snapshot.cc] Error 127" [15:24] tjholowaychuk: ]\\ [15:24] piscisaureus: mraleph: the only cases where i've building w/ snapshot fail is when v8 used the wrong calling convention and on gcc 4.5.x without -fno-strict-aliasing [15:24] lukegalea has joined the channel [15:25] Venom_X has joined the channel [15:25] mraleph: bradleymeck: can you paste tail of the build log somewhere? [15:25] bradleymeck: im on gcc 4.3.4 [15:25] bradleymeck: sure [15:25] NinjaFox has joined the channel [15:26] tjholowaychuk has joined the channel [15:26] piscisaureus: mraleph: bradleymeck: error 127 generally indicates a spawn() failure [15:26] mraleph: oh [15:27] piscisaureus: I said "generally" please don't kill me [15:27] heavysixer has joined the channel [15:27] SamuraiJack_ has joined the channel [15:28] mraleph: can it be that it fails to spawn mksnapshot? [15:28] piscisaureus: Could be... I don't know what it tries to spawn [15:29] piscisaureus: can also be a dll injection problem (dll not found or need to run rebase) [15:29] mattfawcett has left the channel [15:30] piscisaureus: ^-- it's not necessarily exec() that's failing but it could be spawn() itself [15:30] blowery has joined the channel [15:30] springmeyer has joined the channel [15:31] perlmonkey2 has joined the channel [15:33] piscisaureus: bradleymeck: what is the path to your node source checkout and the path to your cygwin installation? [15:33] lukegalea has joined the channel [15:34] SamuraiJack_ has joined the channel [15:34] bradleymeck: ~(bmeck)/node, C:\Users\bmeck\Cygwin [15:35] zomgbie has joined the channel [15:35] bradleymeck: a clean make takes soo fin long [15:35] JusticeFries has joined the channel [15:35] piscisaureus: yes, known problem :-) [15:36] Manishs has joined the channel [15:36] Ezku\: just tried upgrading with n the first time, it did an amazingly slick job :o [15:36] sleeplessinc has joined the channel [15:37] bradleymeck: http://pastebin.com/0m8twq9s [15:37] dylang has joined the channel [15:38] harth has joined the channel [15:39] postwait: I'm using TLS outside of https stuff, and this commit broke Buffer writing for me: 19b4c27ebf6d0b1aa2ded64d57fa44ec70e8756e [15:40] jano has joined the channel [15:40] V1: ^ fork, patch & commit [15:40] squeeks: and send a pull request, I kind of need TLS fixed. [15:40] V1: :p [15:42] postwait: Still staring at the commit to understand why it broke anything... [15:42] piscisaureus: bradleymeck: so... [15:42] piscisaureus: cd ~/node/build/default [15:42] piscisaureus: strace obj/release/mksnapshot.exe obj/release/snapshot.cc --logfile "/home/bmeck/node/deps/v8/obj/release/snapshot.log" --log-snapshot-positions [15:42] jbu has joined the channel [15:42] piscisaureus: dies where? [15:44] bradleymeck: doesnt say, strace wont fire up on cygwin here, "the procedure entry point_feinitialise could not be located in the dynamic link library cygwin1.dll", `--- Process 10840, exception C0000139 at 77461B76` [15:45] piscisaureus: hmm. looks like you got your cygwin install borked [15:45] bradleymeck: sweet *goes off to tank it and reinstall* [15:45] piscisaureus: bradleymeck: not too fast [15:45] piscisaureus: :-) [15:46] piscisaureus: what does that command do without putting strace in front of it? [15:47] bingomanatee has joined the channel [15:48] squeeks: something involving a fire, chicken blood and a dance under the full moon. [15:48] JusticeFries_ has joined the channel [15:49] piscisaureus has joined the channel [15:49] bradleymeck: doesnt do anything to the console [15:49] themiddleman_itv has joined the channel [15:50] squeeks: perhaps the doctor should prescribe lamb's blood instead [15:50] dgathright has joined the channel [15:50] bradleymeck: same exit code 127 [15:50] piscisaureus: bradleymeck: " [15:50] piscisaureus: gdb 14obj/release/mksnapshot.e01xe [15:50] piscisaureus: > run 14obj/release/snapshot.cc --logfile "/home/bmeck/node/deps/v8/obj/release/snapshot.log" --log-snapshot-positions01 [15:51] piscisaureus: that should come up with an error message [15:51] Hello71 has joined the channel [15:51] Hello71 has joined the channel [15:54] sub_pop has joined the channel [15:54] bradleymeck: odd seems gdb is not installing [15:54] bradleymeck: /wasnt either [15:54] timmywil has joined the channel [15:54] piscisaureus: :-/ [15:55] bradleymeck: going to try a manual install [15:55] matschaffer has joined the channel [15:57] timmywil has joined the channel [15:57] losing has joined the channel [15:58] bradleymeck: piscisaureus : http://pastebin.com/TuxHStEE [15:59] gibbonsr has joined the channel [15:59] reid has joined the channel [16:00] piscisaureus: bradleymeck: so... mksnapshot.exe is not finding the (right) dlls [16:00] ikarosdaedalos has left the channel [16:00] piscisaureus: it could be that you are using the native windows version of python [16:00] piscisaureus: (although usually that would get you this error earlier in the process) [16:01] bradleymeck: i dont think i have native windows python on this box, ill check [16:02] bradleymeck: `cmd.exe python` is pulling out of cygwin(gcc 4.3.5 r 1) python(v2.6.5) [16:02] kawaz_home has joined the channel [16:03] piscisaureus: bradleymeck: you might try copying all cygwin dlls (all dlls in /bin) to ~/node/build/default/obj/release [16:03] piscisaureus: then try the manual command again [16:03] piscisaureus: (not as a permanent solution, just checkin') [16:04] dominic_ has joined the channel [16:05] dominic_ has joined the channel [16:05] bradleymeck: still not finding dlls [16:06] bradleymeck: so im thinking backup and new cygwin install is the way to go [16:06] tbranyen: bradleymeck: did you rebase? [16:07] daniellindsley has joined the channel [16:07] bradleymeck: git rebase? i reset and all that instead [16:07] tbranyen: bradleymeck: cygwin dll rebase [16:10] akellehe has joined the channel [16:11] Venom_X has joined the channel [16:11] bradleymeck: tbranyen even after rebaseall same error [16:11] akellehe has left the channel [16:11] sivy has joined the channel [16:11] tbranyen: eff [16:11] tbranyen: was worth as shot :-/ [16:12] broofa has joined the channel [16:12] sivy has joined the channel [16:12] robotarmy has joined the channel [16:13] Insanity5902 has joined the channel [16:13] Croms: When serving static files, how much of the header information do you need to send as a response? What does node automatically take care of? [16:13] hornairs has joined the channel [16:14] zylo has joined the channel [16:14] tjholowaychuk: Croms: node doesnt really add anything [16:14] tbranyen: Croms: probably status code, content length isn't required but if you send it the client will know how long to wait [16:14] bradleymeck: [content-length, host, type, encoding] should be set [16:15] tjholowaychuk: Croms: if you want http cache support etc you need to add that sort of thing [16:15] squeeks: and HTTP status/version. [16:15] tilgovi has joined the channel [16:16] piscisaureus: But it does interpret javascript code between , doesn't it? [16:16] adamt has joined the channel [16:18] visa has joined the channel [16:19] davidascher has joined the channel [16:19] Croms: Is it safe to ignore the others on this list? http://en.wikipedia.org/wiki/List_of_HTTP_header_fields [16:20] tjholowaychuk: Croms: you need ALL of them [16:20] tjholowaychuk: every last one [16:20] eee_c has joined the channel [16:21] losing has joined the channel [16:21] steph021 has joined the channel [16:21] apucacao has joined the channel [16:22] pcardune has joined the channel [16:22] JusticeFries has joined the channel [16:22] squeeks: Croms: for static? here's the smallest I get away with: [16:22] squeeks: HTTP/1.1 200 OK\nDate: Mon, 14 Mar 2011 16:20:24 GMT\nContent-Type: image/gif; charset=utf-8\nConnection: keep-alive\nContent-Length: 866\n [16:23] unomi has joined the channel [16:25] Croms: Know of any good online references for which headers to send along with all response codes? [16:25] slip has joined the channel [16:25] Croms: Thanks for all of your help btw, appreciated. :—) [16:26] eyesUnclouded has joined the channel [16:27] squeeks: RFC 2616 is all one should need. [16:29] Croms: Thanks bro, I'll look into it. [16:30] throughnothing has joined the channel [16:34] marcosvm has joined the channel [16:35] eee_c has joined the channel [16:35] eyesUnclouded has joined the channel [16:36] lukegalea has joined the channel [16:39] sivy has joined the channel [16:39] SetupLy has joined the channel [16:41] ntelford has joined the channel [16:41] jeff_horton has joined the channel [16:41] baudehlo has joined the channel [16:42] dwww has joined the channel [16:43] lukegalea: Hey, is js-yaml still the hotness for yaml parsing? No updates since Dec 15th.. [16:43] SamuraiJack__ has joined the channel [16:43] fangel has joined the channel [16:44] postwait: ryah: I'm having TLS issues caused by 19b4c27ebf6d0b1aa2ded64d57fa44ec70e8756e [16:44] tjholowaychuk: lukegalea: i dont think it ever was the hottness :p [16:44] tjholowaychuk: i never really finished it [16:44] kevwil has joined the channel [16:44] tjholowaychuk: i only needed a small subset [16:44] tjholowaychuk: backin the day [16:45] postwait: ryah: can you tell me what that patch is supposed to do.. it actually makes it _not_ reentrant and disallows the recursion needed to finish a TLS handshake in some situations. [16:45] lukegalea: tjholowaychuk: cool. It might be sufficient for my uses.. I just want to reach into some rails configs. [16:45] JianMeng1 has joined the channel [16:46] postwait: ryah: in other words, I get no test suite difference reverting that changeset and my code works again! [16:46] noahcampbell has joined the channel [16:47] adamt: yaml is teh suck. [16:47] baudehlo1 has joined the channel [16:47] lukegalea: adamt: Ya.. but we have some nodejs running alongside our ruby apps. If I can avoid having two config files that would be ideal. [16:47] lukegalea: and it's easier to get node to parse yaml then to get rails to use json in it's config files I would think. [16:48] adamt: prolly, but yaml is evil and badly standardized/implemented. :| [16:48] hober has joined the channel [16:48] hosh_work has joined the channel [16:48] bradleymeck: hehe standardized yaml [16:48] adamt: yeah ok i take those words back. [16:48] dominic_ has joined the channel [16:50] bingomanatee has joined the channel [16:51] aways|bnc: ACTION By  [16:52] sirkitree has joined the channel [16:53] isaacs has joined the channel [16:54] ryah: postwait: let me get back to you [16:54] ryah: postwait: also seeing failures in validation test [16:56] isaacs: dominic_: npm install glob [16:57] muk_mb has joined the channel [16:57] rbranson has joined the channel [16:57] isaacs: perezd: npm installs things here: npm get root [16:57] perezd: isaacs: I figured it out, thanks :) [16:58] isaacs: np :) [16:58] isaacs: perezd: it'll be much more obvious in 1.0 [17:00] JianMeng1 has left the channel [17:00] devinus has joined the channel [17:00] Aikar: postwait: i noticed some TLS test failing, maybe related? [17:02] springmeyer has left the channel [17:04] JJMalina has joined the channel [17:04] prettyrobots has joined the channel [17:04] baudehlo: is this a good place to ask Javascript questions or should I go elsewhere? [17:05] Sembiance: hehe [17:05] tjholowaychuk has joined the channel [17:05] Sembiance: baudehlo: There is ##javascript [17:05] harth has joined the channel [17:05] baudehlo: I don't know if it's node specific or not - or I guess more CommonJS specific. [17:05] baudehlo: I'll try there first, thanks. [17:05] nilyt has joined the channel [17:07] Remoun has joined the channel [17:08] liquidproof has joined the channel [17:08] mscdex: baudehlo: it doesn't hurt to ask here too [17:08] mscdex: we won't bite :) [17:08] baudehlo: well here's what I'm trying to do - http://paste.lisp.org/+2KZH [17:09] JojoTheBoss has joined the channel [17:09] baudehlo: I think it might be something to do with scoping but I'm not sure. [17:10] Evet has joined the channel [17:11] robotarmy has joined the channel [17:11] mscdex: baudehlo: you should do util.inherits() before you start defining the prototype [17:11] mscdex: inherits will overwrite the prototype [17:11] matschaffer has joined the channel [17:11] baudehlo: yeah I just got that from ##javascript, thanks :) [17:11] mscdex: :) [17:11] baudehlo: I do need to do it this way though, but I think I can magic it. [17:11] wilmoore_ has joined the channel [17:12] baudehlo: by storing away the prototype methods and then restoring them. [17:12] mscdex: baudehlo: you could also just merge the two prototypes [17:12] baudehlo: ok. [17:13] baudehlo: I'll think of another way to do this anyway. [17:13] mscdex: something like jquery's extend: https://github.com/mscdex/node-imap/blob/master/imap.js#L1322-L1397 [17:16] yorick has joined the channel [17:16] stephank has joined the channel [17:17] Utkarsh has joined the channel [17:17] matschaffer has joined the channel [17:18] hurling has joined the channel [17:18] dominic_ has joined the channel [17:18] hurling: Hello, I need help sending a byte array to a node.js client. Can someone help me? [17:20] hurling: I want to send raw bytes (from mqtt) to a node.js client but I don't know how to decode the stream properly [17:21] hurling: Anyone here? [17:21] postwait: ryah: Aikar : the validation tests fail both before and after that commit. [17:21] mscdex: hurling: what is the problem in particular? [17:21] postwait: ryah: I just don't understand what you're trying to accomplish with the patch. [17:21] mscdex: you use Buffers to deal with raw bytes [17:22] Aikar: postwait: ninja magic [17:22] Venom_X has joined the channel [17:22] amirpc: anyone know where I can find documentation on the memory model in v8? [17:22] hurling: I got an mqtt server sending stuff like that (hex): 90 03 00 0a 00 [17:22] mraleph: amirpc: you can ask me [17:22] hurling: 90 means acknowledgement for something [17:22] mscdex: hurling: ok [17:22] mraleph: amirpc: or you can read source code :-) [17:23] amirpc: mraleph: I'm reading the source right now [17:23] mraleph: amirpc: what do you want to know? [17:23] hurling: how can I validate the first byte is 0x90 on the client side? [17:24] mscdex: hurling: check if the first byte is 0x90 in the 'data' event for your tcp client [17:24] hurling: I tried data.charCodeAt(0) but this returns some code for an INVALID character [17:24] mscdex: nonono don't use stricks [17:24] mscdex: er strings [17:24] mscdex: :S [17:24] amirpc: mraleph: Okay I want to understand how compiled code allocates memory. I'm looking at ZoneObjects and I've put some debugging code in there so I can see how they are getting created, is the VirtualFrame an objcet within a Zone context, etc [17:24] hurling: I converted into buffer [17:24] amirpc: I could go on but really I'm just trying to get a handle on how var a = 5 works internally [17:25] mscdex: hurling: you shouldn't have to do any conversion. make sure you don't perform a setEncoding on the stream [17:25] mscdex: it will provide a Buffer by default to the data event [17:25] mscdex: to the callback [17:25] hurling: no setEncoding on client side? [17:25] mscdex: right [17:26] mscdex: then you can just do data[0] === 0x90 [17:26] amirpc: mraleph: Perhaps a better use of your time than trying to explain anything to me is explain how I shoudl be approaching this, besides enabling logging & profiling is there a way I can get a better understanding of code generation & memory allocation? [17:26] mscdex: or whatever [17:26] amirpc: looking through these logs even with log-all on it has very little to do with memory [17:26] hurling: I'll try [17:27] pcardune has joined the channel [17:28] d_ch has joined the channel [17:28] hurling: amirpc: cant believe it. That was all. Thank you so much. [17:28] liar has joined the channel [17:28] CrypticSwarm has joined the channel [17:29] mraleph: amirpc: ZoneObjects are only used by the compiler and a couple of other things. they exist outside of JS heap. [17:29] postwait: ryah: If you are interested, I have a variation on your patch that "cyclelocks" the individual push/pulls -- which doesn't break my use case. [17:29] amirpc: mraleph: Okay trying to understand the source enough to separate out what is compiler related and what is run time. Any pointers as to where to start reading to understand the JS heap? [17:29] postwait: ryah: but since I'm not sure what you were trying to protect against, I don't know if I protect against it ;-) [17:29] mraleph: amirpc: heap.cc [17:30] mraleph: amirpc: Heap manages JS heap :-) [17:30] mraleph: amirpc: lowlevel things are defined in spaces.cc/spaces.h [17:30] mraleph: amirpc: under lowlevel I mean management of underlying virtual memory. [17:30] amirpc: mralpeh: Okay fundamental question, two fold. 1) How much do I need to poke into the architecture specific code to understand that and 2) Is there an at-a-glance way I can tell the difference between compiler related code & js code? [17:30] amirpc: when I say js code I think you know what I mean, the "runny bits" [17:31] amirpc: oh dude, spaces.h huge comment at the top with exactly what I need [17:31] mraleph: this bits and pieces are not architecture dependant. [17:32] mraleph: and platform dependant things are abstracted away. [17:32] langworthy has joined the channel [17:32] mraleph: any particular reason for digging into V8's memory management? [17:32] pedrobelo has joined the channel [17:32] amirpc: I have a crazy idea that I'm investigating [17:32] baudehlo: is there any chance socket.setSecure() will come back some day (albeit augmented with better certificate support)? [17:33] baudehlo: as you can't do SMTP STARTTLS without a way to upgrade a socket to TLS. [17:33] mscdex: baudehlo: doubtful. you can still do secure connection upgrades [17:33] baudehlo: oh you can? [17:33] amirpc: it's kinda dumb but it's just an idea that if I put a native memcache layer in I can cause v8 to allocate in local memory and immediately serialize to memcache (atomically) which basically provides a persistent shared state [17:33] saschagehlich has joined the channel [17:33] kristsk has joined the channel [17:33] mscdex: baudehlo: check out the source code for the tls.connect() function [17:34] mscdex: it's not as simple as doing setSecure(), but it's possible [17:34] amirpc: which would be useful for a lot of reasons including HA, load balancing...having a user get their own persistent "context" object [17:34] amirpc: it's all achievable other ways but this was interesting to me so I'm reading up [17:35] liquidproof has joined the channel [17:36] baudehlo: mscdex: ah yes I see, it uses pipe() (that's marked experimental though - I assume that status will go away?) [17:36] mraleph: amirpc: well. sounds a bit difficult to me. [17:36] Wizek: Hi there! Does anyone use Mongoose 1(.1.4) here? I'm having trouble disabling it's autonomous _id insertion for embedded documents. How can I disable that? [17:36] amirpc: mraleph: yeah but I'm a glutton for punishment. Any pointers? [17:36] mscdex: baudehlo: i doubt pipe() would go away during 0.4.x [17:37] baudehlo: I mean will the status go away, not the method. [17:37] mscdex: oh [17:37] mscdex: i dunno, ask ryah on that one i guess [17:37] mraleph: amirpc: there is no spatial locality in V8 memory layout, so you will end up sharing huge pieces of memory here and there. [17:37] amirpc: thats what I'm noticing already [17:38] baudehlo: doesn't really matter - I assume something will come it its place. I'll try and whip something together for TLS support in Haraka. [17:38] amirpc: it's not like super cohesive in the sense that I can just serialize some object and be done with it [17:38] steffkes has joined the channel [17:39] postwait: ryah: to expound upon the issue, after a seemingly successful tls handshake, the next call to socket.write(new Buffer([1,2,3,4]) send wrong data to the client. [17:39] mraleph: well... you definitely _can_ serialize. but you can't just map memory chunk containing this raw object into two processes and make it work. [17:39] tjholowaychuk: anyone know how to "throw" in a setter using v8's api? [17:40] tjholowaychuk: since you dont return the handle [17:40] amirpc: well if the entire global context is serialized, on a theoretical level what is "missing"? [17:40] darshanshankar has joined the channel [17:40] jamesarosen has joined the channel [17:40] pr2012 has joined the channel [17:41] floby has joined the channel [17:41] pr2012: Assuming ones Mongo Collection must use a DBRef, anyone know a good way to handle it in node.js with mongo-native? [17:43] amirpc: what do you mean by handle it [17:44] pr2012: Ideally id like to get the referenced document [17:45] pr2012: looking to do that in a non horrible way [17:45] pr2012: the collection I am looking at actually has a list of references on each document [17:46] amirpc: well you'd query out the dbref and then have to do another query for object._id = ref._id I believe, I haven't worked with mongo in a few months but I don't think there is any sort of joining mechanism to follow references [17:46] pr2012: so this could really turn into a whole bunch of unnecesary queries [17:46] bingomanatee has joined the channel [17:46] BobFunk_ has joined the channel [17:46] pr2012: There isn't native to mongo, dbref is just a convention [17:46] namelessnotion__ has joined the channel [17:47] pr2012: other languages seem to handle this within the driver [17:47] pr2012: mongo-native seems to be making it a point not too [17:47] amirpc: they follow references automatically? [17:47] pr2012: yes [17:47] baudehlo: is the canonical doc format for node always Markdown? [17:47] amirpc: wow the only other driver I used was C and it was a while ago and I don't remember it following them [17:47] amirpc: C++ [17:47] v8bot: amirpc has given a beer to C. C now has 8 beers. [17:47] pr2012: ruby/java/groovy can [17:48] tbranyen: baudehlo: seems to be the conanocial format for github heh [17:48] baudehlo: ah fair enough. [17:48] amirpc: yeah sorry can't speak to that, only worked with C++ & node-native and in both of them I fllowed references manu-matically [17:48] pr2012: I understand the performance issues with this, and short of rebuilding the two collections into one, ill probably just have to suck it up [17:48] tjholowaychuk: mraleph: how would you suggest throwing an exception from a setter using v8's api? [17:49] tjholowaychuk: (if even possible) [17:49] mraleph: tjholowaychuk: hmm. Throw should work afaik. [17:50] tjholowaychuk: dont you have to return the handle? [17:50] mraleph: tjholowaychuk: idiom is return Throw(bla-bla); [17:50] harth has joined the channel [17:51] tjholowaychuk: mraleph: but 'typedef void (*AccessorSetter)' :( [17:51] mraleph: ah. [17:51] mraleph: then don't return it :-) should work. [17:51] eddanger has joined the channel [17:51] d_ch has joined the channel [17:51] mikegerwitz: mraleph: While on the topic of getters/setters..is there a reason they are so slow compared to method invocations? getFoo() is always faster than { get foo() {} } [17:52] mikegerwitz: considerably so [17:52] tjholowaychuk: mikegerwitz: they are not optimized yet AFAIK [17:52] mraleph: not optimized yet. [17:52] mraleph: that's the main reason. [17:52] davidascher has joined the channel [17:52] jetienne has joined the channel [17:53] mikegerwitz: mraleph: Well I suppose that's a simple enough answer, heh. Is it on a roadmap? [17:54] mikeal has joined the channel [17:54] mraleph: mikegerwitz: we might be even going through runtime system for each getter/setter invocation. I am not completely sure about this, but it might be the case. [17:54] mraleph: we do not discuss roadmap, sorry. [17:54] mraleph: but you can expect that eventually it would be fixed. [17:54] mraleph: :-) [17:55] mikegerwitz: mraleph: that's good enough :) thanks [17:55] mraleph: tjholowaychuk: yes. throwing from setter with ThrowException works. there is an API test that checks that. [17:56] tjholowaychuk: mraleph: ah ok awesome thanks man [17:56] mraleph: amirpc: well if you serialize everything from reachable from the global context that should work. this is basicly how V8's snapshots work. [17:57] mraleph: but that does not sound very fast to me/. [17:57] amirpc: mraleph: Oh I fully expect it to be terribly slow ;) I'm learning for learnings sake really, I expect once I make it work in any way I'll be able to think about ways to do it "properly" [18:02] dguttman has joined the channel [18:02] colinclark has joined the channel [18:02] d_ch has joined the channel [18:03] ezmobius has joined the channel [18:04] d_ch has joined the channel [18:04] BobFunk_: running into a strange problem that I'm not entirely sure how to debug [18:05] BobFunk_: appears when trying to use the native mongodb driver and the formidable library for streaming multipart processing together [18:05] BobFunk_: here's the gist of it: https://gist.github.com/869558 [18:05] BobFunk_: in itself the form.parse(...) works fine [18:06] BobFunk_: but as soon as I try to do the form.parse(...) from within a cursor.nextObject callback [18:06] BobFunk_: it just doesn't do anything [18:06] Draggor: bradleymeck: ever get your cygwin woes resolved? [18:07] BobFunk_: It works within the .find(... callback [18:07] BobFunk_: but within nextObject - nothing happens - the callback gets called, I see the log statement, but then nothing [18:08] baudehlo: can anyone confirm my first mail to the nodejs mailing list, that: require('dns').reverse('127.0.0.1', function(err,result) { console.log(result)}); // is busted? [18:11] konobi: baudehlo: 127.0.0.1 is generally unresolvable [18:11] eddanger has joined the channel [18:11] baudehlo: not here it's not. [18:11] konobi: baudehlo: i assume you also have it in /etc/hosts [18:12] baudehlo: no it resolves with dig. [18:12] konobi: since node uses c-ares to do async dns lookup, it bypasses the system resolver [18:12] baudehlo: which doesn't examine hosts. [18:12] ryah: postwait: a sloppy commit without a test. i was fixing a bug in a program of mine. [18:12] postwait: ryah: caused a bug in mine :-( [18:12] konobi: baudehlo: work for me (tm) [18:12] mscdex: lol [18:12] baudehlo: konobi: ok, thanks - that's all I care about. [18:13] postwait: ryah: wanna try my blind modification to your patch? (so we can both be lost)? [18:13] skiz has joined the channel [18:13] skiz: does jasmine support pending specs? [18:13] baudehlo: I wrote a perl interface to ares and it worked there, so I wondered if it was a bug in node. May be just a local issue. [18:13] ryah: postwait: yes [18:13] kriszyp has joined the channel [18:14] konobi: baudehlo: np... _lots_ of caching recursive DNS servers just don't respond to 127.0.0.1... stupidly [18:14] Gigawatt: how do i define Getters / Setters for Object inheritance ? [18:14] tjholowaychuk: oh ThrowException() just returns undefined haha [18:14] tjholowaychuk: durr [18:15] Gmcneill has joined the channel [18:15] ryah: postwait: is there anyway we can turn your failure into a test? [18:16] postwait: ryah: https://gist.github.com/869576 [18:16] postwait: Umm... not sure, I'm talking to a remote service. [18:18] qFox has joined the channel [18:19] zomgbie has joined the channel [18:20] aconbere has joined the channel [18:21] reid has joined the channel [18:21] matclayton has joined the channel [18:22] matclayton has joined the channel [18:22] dyer has joined the channel [18:22] mikegerwitz: Gigawatt: Object.defineProperty( Foo.prototype, 'propname', { get: ..., set: ... } ); I'm not sure if that's what you were asking. [18:23] __tosh has joined the channel [18:23] technoweenie has joined the channel [18:23] trotter has joined the channel [18:24] bartt has joined the channel [18:25] jano has joined the channel [18:26] jdalton has joined the channel [18:26] jdalton has left the channel [18:26] ryah: % for i in *cert.pem; do echo $i; openssl x509 -text -noout < $i | grep After; done [18:26] mscdex: you could also do: Foo.prototype.__defineGetter__('getterName', function() { return 'foo' }) [18:26] ryah: agent1-cert.pem [18:26] ryah: Not After : Nov 5 02:30:20 2013 GMT [18:26] SetupLy has left the channel [18:27] ryah: agent2-cert.pem [18:27] ryah: Not After : Nov 5 02:30:20 2013 GMT [18:27] mde has joined the channel [18:27] ryah: agent3-cert.pem [18:27] ryah: Not After : Nov 5 07:56:55 2013 GMT [18:27] ryah: agent4-cert.pem [18:27] ryah: Not After : Nov 5 07:56:55 2013 GMT [18:27] ryah: ca1-cert.pem [18:27] adamt has joined the channel [18:27] mscdex: :S [18:27] ryah: Not After : Mar 12 02:30:20 2011 GMT [18:27] ryah: ca2-cert.pem [18:27] ryah: Not After : Mar 12 07:56:55 2011 GMT [18:27] ryah: ^-- doh [18:27] Bonuspunkt: ^^ [18:28] bartt has left the channel [18:29] Gigawatt: mikegerwitz, thats kind of what im asking, but its still hardcoding the name, i would like a getter / setter that the variable name is past in so i can look up in an array. [18:30] dragunov11 has joined the channel [18:30] Gigawatt: such as in php you have `__get` [18:31] mikegerwitz: Gigawatt: Sorry, I'm not sure I understand. Are you looking for __get from PHP? [18:31] mikegerwitz: Ah [18:31] Gigawatt: yea yea [18:31] batok has joined the channel [18:31] mikegerwitz: Gigawatt: JS doesn't support that, unfortunately [18:31] Gigawatt: something like that [18:31] Gigawatt: is there no hack ? [18:31] sth: there probably is. [18:32] CIA-75: node: 03Ryan Dahl 07v0.4 * r2e40328 10/ (21 files): Extend OpenSSL expiration dates - http://bit.ly/fbQwUi [18:32] mikegerwitz: Gigawatt: Only thing I could think of is using a try/catch block, but that would only work around the block trying to set the value [18:32] Gigawatt: mikegerwitz: i though of something like that, but how could i implement it ? [18:33] ryah: postwait: patch doesn't apply. can you rebase? [18:33] postwait: ryah: on v0.4 ? [18:33] ryah: postwait: yeah [18:33] postwait: branch [18:33] postwait: hmm [18:33] mikegerwitz: Gigawatt: Oh, I'm sorry..exceptions aren't thrown for undefined properties [18:33] mikegerwitz: Gigawatt: That won't work [18:33] postwait: I'll try. [18:33] ryah: should be the same on master too [18:34] lukegalea has joined the channel [18:35] mkrecny has joined the channel [18:35] mrsrikanth has joined the channel [18:37] Utkarsh_ has joined the channel [18:39] mscdex: Gigawatt: you're wanting to have a universal getter/setter for properties that don't already exist? that doesn't exist in v8 yet [18:39] SamuraiJack__ has joined the channel [18:39] mikegerwitz: Gigawatt: You could approach it differently, if you do not want to use methods in place of getters/setters. You said the values are stored in an array. If possible, you can define getters/setters for each element in the array ahead of time [18:40] V1 has joined the channel [18:41] Gigawatt: im building an MVC System where the userController inherits from the baseController, within the user controller i wan the user to be able to do, this.randomVariableName = "something"; [18:41] Gigawatt: and then the baseControleller would place the key / value pair into an array, ready to pass to the template system [18:41] postwait: ryah: Oh... crap.. I reverted your change in my repos :-( [18:42] mikegerwitz: Gigawatt: Ah, yeah, unfortunately you won't be able to. this.set( 'randomVariableName', 'something' ); doesn't look too bad, but I feel your pain [18:42] Gigawatt: mike, do you have a strong PHP Background ? [18:42] mikegerwitz: Gigawatt: With node's popularity, maybe v8 will implement it in the future. But I don't know their opinions on deviating from the standard. [18:42] mikegerwitz: Gigawatt: Yes [18:42] Gigawatt: thought you did :) [18:43] mikegerwitz: Gigawatt: Trying to put those days behind me ;) [18:44] perezd: stupid question, with express.js, can I specify a particular response code somehow? [18:44] tjholowaychuk: perezd: several ways, res.statusCode = n; will work [18:44] tjholowaychuk: perezd: or res.send(status); or res.send(body, status) [18:44] tjholowaychuk: etc [18:44] perezd: thank you! [18:45] perezd: res.send(body) can be a string? [18:45] Gigawatt: yes [18:45] postwait: ryah: try this: https://gist.github.com/869576 [18:45] perezd: kewl [18:45] perezd: thx [18:45] tjholowaychuk: perezd: yeah it can be a string, Buffer, or "object" which is given a Content-Type or application/json [18:45] Gigawatt: mikegerwitz: its not too bad, i still enjoy it [18:45] admc has joined the channel [18:46] perezd: tjholowaychuk: oh perfect, so it serializes... [18:46] perezd: I was just about ot ask [18:46] tjholowaychuk: perezd: yup, so res.send(404);, res.send('Shit, cant find that', 404); res.send({ foo: 'bar' }) etc [18:46] murz has joined the channel [18:46] Gigawatt: sending an object to the send method would convert it into a json string and set the content-type header for you, this is to make ajax more simpler [18:46] ryah: postwait: thanks, that works [18:47] jpick has joined the channel [18:47] mikegerwitz: Gigawatt: There are many things that make PHP good. Just as there are a great many that make it bad (if they drop backwards compatibility, I think they'll be fine). I was just trying to use it for things it shouldn't really be used for. [18:47] Country has joined the channel [18:47] postwait: ryah: it seems that without being able to recurse, some buffers at the end of the a negotiation can be resent or something? [18:48] fisted has joined the channel [18:48] Gigawatt: its an interprete, it will always be shit in comparison to other languages, i mean an array of 10000 arrays of ('a','a','a','a','a','a',) is around 19MB of ram, in python its like 1.7 [18:48] postwait: ryah: my write(new Buffer([0xfa, 0x57, 0xfe, 0xed])), is read on the client as [0xe8,0x03,0x00,0x00] [18:48] jwm has joined the channel [18:48] meelash has joined the channel [18:49] bingomanatee has joined the channel [18:49] terite_ has joined the channel [18:50] postwait: ryah: crap, my manual merge has an error... SecurePair.prototype._cycle = function() { should now take (depth) as a param [18:50] harth has joined the channel [18:51] [tm] has joined the channel [18:51] ryah: postwait: ok [18:51] zomgbie has joined the channel [18:52] NickP has joined the channel [18:52] ntelford has joined the channel [18:52] pdelgallego_ has joined the channel [18:52] pekim has joined the channel [18:53] schonyo has joined the channel [18:53] davidcoallier has joined the channel [18:53] Gigawatt: how can i call a method in my object if all if i have: var method = 'hello'; from that variable how can i call object.hello? [18:54] eyesUnclouded has joined the channel [18:54] pedrobel_ has joined the channel [18:55] ryah: postwait: looks good on my program. will land shortly [18:56] postwait: yikes :-) [18:56] ryah: i should have spent the time to make a test when i made that original patch [18:56] postwait: ryah: seems really scare that I don't know what you were trying to do.... and still got it to work :-/ [18:56] Know1edge has joined the channel [18:57] Know1edge: Hey guys…getting an error when using NPM… Error: node-proxy@0.3.2 install: `make` [18:57] PyroPeter has joined the channel [18:57] Know1edge: Any idea how to fix this? [18:57] charlenopires has joined the channel [18:57] isaacs: Know1edge: can you gist the whole error, from the command you ran, all the way to the end? [18:57] ryah: postwait: somehow i was geting called into _cycle from _cycle [18:57] ryah: postwait: which was messing up the state [18:57] Know1edge: sure 1 sec isaacs [18:57] isaacs: Gigawatt: object[method]() [18:58] postwait: The last setp there explicitly calls into cycle from cycle. [18:58] postwait: And needs to. [18:58] Gigawatt: issacs, its comeing back as undefined ! tried it [18:58] ryah: postwait: well - i should say it was coming from one of the pull/push methods [18:58] isaacs: Gigawatt: then object.hello isn't a function :) [18:58] isaacs: or method is not "hello" [18:58] Gigawatt: console.log(userController['index']); [18:58] Gigawatt: undefined [18:58] postwait: tylergillies: yes... I believe it needs to... [18:58] postwait: due to the way SSL works. [18:58] Gigawatt: but i can call userController.hello(); [18:58] isaacs: v8: obj = {hello:function(){return "hi"}}; m = "hello"; obj[m]() [18:58] v8bot: isaacs: "hi" [18:59] Know1edge: isaacs: im running npm install now [18:59] postwait: yikes, apologies tylergillies (client tabl completion malfunction) [18:59] isaacs: v8: obj = {hello:function(){return "hi"}}; m = "hello"; obj[m] [18:59] v8bot: isaacs: function (){return "hi"} [18:59] isaacs: Gigawatt: um... "index" and "hello" are not the same thing [18:59] dguttman_ has joined the channel [18:59] isaacs: v8: obj = {hello:function(){return "hi"}}; m = "hello"; obj["index"] // ? [18:59] v8bot: isaacs: undefined [18:59] ryah: postwait: these finer locks will prevent the situation i had [19:00] ryah: i think [19:00] postwait: those locks prevent per-stream recursion. [19:00] Gigawatt: no i used hello as an example, the method is index [19:01] Ian_Corne: return("hi") [19:01] Gigawatt: nmm, GOT IT! [19:01] Know1edge: isaacs: http://pastie.org/1671317 here is the command and error [19:01] Gigawatt: i had var Controller = new userController(baseController); [19:01] mAritz: is npm really slow right now or is it my vps network again? :/ [19:01] ryah: postwait: i wish i remembered exactly what was happening... i believe line 235 _maybeInitFinished() call was somehow calling back into _push [19:01] Gigawatt: so i should have been doing Controller['index'] [19:02] mAritz: weird, now it's lighting fast again [19:02] ryah: postwait: which had 'data' events getting emitted out of order [19:02] postwait: oh... interesting. [19:02] isaacs: Know1edge: the error is here: /usr/local/lib/node/.npm/node-proxy/0.3.2/package/src/wscript:9: error: could not configure a cxx compiler! [19:03] postwait: ryah: that will make it into the 0.4.3? [19:03] ryah: postwait: yes [19:03] isaacs: Know1edge: $ npm owner ls node-proxy [19:03] isaacs: brickysam26 [19:04] kawaz_air has joined the channel [19:04] isaacs: Gigawatt: if you have a literal string, then using [] is silly. [19:04] isaacs: Gigawatt: Controller.index() is more clear [19:04] isaacs: Gigawatt: only use [] if you have a variable [19:04] isaacs: or for numeric keys (arrays) [19:05] Gigawatt: i have a variable, if(typeof Controller[route.getMethod()] != 'undefined'){/*...Load method to display page..*/}; [19:05] ossareh has joined the channel [19:05] mikegerwitz: Or reserved words :) [19:06] mikl has joined the channel [19:06] CIA-75: node: 03Theo Schlossnagle 07v0.4 * re3925b7 10/ lib/tls.js : [19:06] CIA-75: node: TLS: Finer locks on _cycle. [19:06] CIA-75: node: Data being sent out of order. - http://bit.ly/i9SUiu [19:06] Know1edge: isaacs: what does that mean [19:06] isaacs: Know1edge: it means, contact the package author, and tell them that "make" fails on your system. [19:06] Know1edge: ok [19:06] isaacs: Know1edge: as for the error, wscript is telling you that you lack a suitable copiler. [19:07] isaacs: maybe try apt-get install gcc34 or something? [19:07] isaacs: i dunno. [19:07] isaacs: mikegerwitz: v8 is actually ok with reserved words. but keys with funny characters, that requires [quoted] as well [19:08] mikegerwitz: isaacs: Yep, right now it is. But if they're reserved, they may be used in the future, breaking your code :) So I'm just staying on the safe side. [19:08] TomY has joined the channel [19:08] TomY_ has joined the channel [19:08] Know1edge: isaacs: i have gcc installed [19:09] pietern has joined the channel [19:09] isaacs: Know1edge: ok. i dunno, then :) [19:09] isaacs: mikegerwitz: the ES5 spec is clear: foo.bar === foo["bar"], even if bar is reserved, no matter what. [19:10] mikegerwitz: isaacs: Oh. well that's good to hear. and shows that IE8 has a broken implementation, yet again [19:10] kubrow has joined the channel [19:10] isaacs: only if bar would creaet a syntax error is it not this way. so, foo.bar-baz is foo["bar"] - baz, not foo["bar-baz"] [19:10] jesusabdullah: I also tend to write it the way it looks best first, then fix shit like that later [19:10] mikegerwitz: isaacs: (a large part of the code I write to be run in node is shared with the browser, thus my practice..but I'll keep that in mind for v8-only JS) [19:10] isaacs: ah, yeah [19:11] isaacs: ACTION pretty much only does v8 js these days. [19:11] mikegerwitz: isaacs: Must be nice. Wish I could do the same. [19:12] ezmobius has joined the channel [19:13] alessio_alex: hello guys [19:13] jesusabdullah: Hey hey [19:13] alessio_alex: I am wondering, can a normal website be created with Node.js ? [19:13] jesusabdullah: What do you mean by that? [19:13] jesusabdullah: by "normal website?" [19:14] zylo_ has joined the channel [19:14] alessio_alex: I mean, a blog for example [19:14] Croms has joined the channel [19:14] jesusabdullah: Yeah dude, definitely [19:14] alessio_alex: Great [19:14] alessio_alex: So there is database interaction? [19:14] jesusabdullah: For example, https://github.com/creationix/wheat is a blog written in node [19:14] jesusabdullah: There are userspace libs for databasery, yes [19:14] PyroPeter has joined the channel [19:14] alessio_alex: great news [19:15] alessio_alex: I am really facinated by this [19:15] alessio_alex: thanks man [19:15] jesusabdullah: https://github.com/joyent/node/wiki/modules#database [19:15] jesusabdullah: If I could recommend a set of libraries to get you going: express and dnode. [19:15] alessio_alex: ok [19:16] alessio_alex: I am a PHP & jQuery programmer [19:16] tjholowaychuk: jesusabdullah: dnode for a blog? [19:16] jesusabdullah: Express is a sinatra-inspired framework, and dnode makes RPCs dead simple [19:16] mraleph: only abnormal websites can be created with nodejs. [19:16] alessio_alex: Can you recomment me some tutorials to get me started? [19:16] jesusabdullah: Well, not for a blog necessarily, but for webpages [19:16] jesusabdullah: http://howtonode.com [19:16] jesusabdullah: perhaps [19:16] tjholowaychuk: alessio_alex: the express repo has tons of ./examples [19:16] jesusabdullah: Also, check out examples of things [19:16] jesusabdullah: Yeah [19:17] alessio_alex: alright.. thanks [19:17] tjholowaychuk: most of the examples are focused [19:17] alessio_alex: also [19:17] tjholowaychuk: but combine a bunch, and you have a blog [19:17] tjholowaychuk: lol [19:17] alessio_alex: Can I run Node.js with cygwin ? [19:17] jesusabdullah: express will probably do almost everything you need, actually :) [19:17] alessio_alex: Or do I need Linux or Virtualmachine ? [19:17] jesusabdullah: I've heard you can run it with cygwin and/or mingw [19:17] jesusabdullah: but I use linux so I can't say from experience [19:17] alessio_alex: ok [19:18] alessio_alex: so express is what I should use [19:18] alessio_alex: thanks guys [19:18] jesusabdullah: It's a good place to start at least [19:18] jesusabdullah: yw [19:18] adambeynon has joined the channel [19:21] Utkarsh__ has joined the channel [19:21] d_ch has joined the channel [19:21] Gigawatt: si there any framework out there that automatically loads your js files depending on the route? such as MVC ? [19:22] adamt has joined the channel [19:22] Gigawatt: for example http;//host/users/edit/22 would load the users file and call the edit function ? [19:22] Gigawatt: passing in the 22 as the first param ? [19:23] jesusabdullah: What if you load ALL of the files and then use your routes to call the right functions? [19:23] jesusabdullah: { 'route1': require('./route1'), 'route2': require('./route2') } [19:24] jesusabdullah: y'know, something along those lines? [19:24] isaacs has joined the channel [19:25] ryah: ACTION removes defineGetters in Node [19:25] mscdex: Gigawatt: have you looked at Geddy already? [19:25] ryah: ryan@ryan-laptop:~/projects/node% time ./node --crankshaft --trace_opt x.js [19:25] ryah: [marking (lazily) for recompilation] [19:25] ryah: [optimizing: / 7f0c0c6dda91 - took 0.425 ms] [19:25] ryah: [marking (lazily) Module._compile for recompilation] [19:25] ryah: END [19:25] ryah: ./node --crankshaft --trace_opt x.js 8.78s user 0.03s system 100% cpu 8.786 total [19:25] ryah: ryan@ryan-laptop:~/projects/node% time node --crankshaft --trace_opt x.js [19:26] ryah: [marking (lazily) for recompilation] [19:26] ryah: [disabled optimization for: / 7f182263c0f9] [19:26] ryah: [marking (lazily) Module._compile for recompilation] [19:26] ryah: [marking (lazily) NativeModule.compile for recompilation] [19:26] ryah: [optimizing: NativeModule.compile / 7f1822622b99 - took 0.370 ms] [19:26] ryah: END [19:26] tjholowaychuk: mraleph1: why is this not 1 :s https://gist.github.com/a21d83e6d4752ce3a2a8 [19:26] ryah: node --crankshaft --trace_opt x.js 14.24s user 0.03s system 100% cpu 14.235 total [19:26] ryah: (the first has global.console not a defineGetter - the second is current v0.4) [19:27] Gigawatt: geddy looks like the kind of thing im looking for [19:27] TomY has joined the channel [19:27] TomY_ has joined the channel [19:27] Gigawatt: thats the way i was going with my application, i thought i would try a framework to save me time but i wanted it specific, ill give that a go [19:28] ryah: [disabled optimization for: EventEmitter.emit / 7faabebc3361] [19:28] ryah: :/ [19:28] pr2012: whats the best ide for node? [19:28] pr2012: working in textmate, not loving it [19:28] mikegerwitz: pr2012: If you asked me, vim :) [19:28] mikegerwitz: (not an IDE, granted) [19:29] mikegerwitz: pr2012: I know some people here use cloud9...Ic an't speak for it though [19:29] Draggor: SubStack: So I just cloned the bigint repo and then built it by hand in cygwin, that worked, but I still get errors with the tarball via npm [19:29] wavded has joined the channel [19:29] Gigawatt: why does geddy want to access my /root path ? [19:29] Gigawatt: during install [19:29] pr2012: ohhh cloud 9 looks ncie [19:29] wavded: anyone know of anyone working on a vim indent/syntax for stylus? [19:30] wavded: if not I was going to start something [19:30] tjholowaychuk: wavded: haven't seen one for vim [19:30] pdelgallego has joined the channel [19:30] tjholowaychuk: I can definitely help, I'd like to stick it in the repo [19:30] razvandimescu has joined the channel [19:30] tjholowaychuk: along with the TextMate bundle [19:30] wavded: sure [19:30] wavded: i don't mind [19:30] wavded: i can start something and pass it along to you if you want? [19:31] tjholowaychuk: ya sure man sounds good [19:31] wavded: alrighty [19:31] tjholowaychuk: appreciated :D [19:31] konobi: http://www.quickmeme.com/meme/Dqe/ [19:31] konobi: heh [19:31] wavded: np, that's what the community is for :) [19:31] tanepiper has joined the channel [19:32] V1: LOL konobi, so true [19:32] jesusabdullah: Where did you find that konobi ? [19:32] unlink has joined the channel [19:32] unlink has joined the channel [19:34] jesusabdullah: Oh gawd, that reminds me [19:34] jesusabdullah: I was following pycon tweets [19:34] jesusabdullah: saw some of the most egregious things ever [19:34] skiz_ has joined the channel [19:34] adambeynon has joined the channel [19:35] Jonasbn_ has joined the channel [19:35] skiz has joined the channel [19:36] konobi: jesusabdullah: one of my colleagues found it [19:36] jesusabdullah: Ah [19:36] jesusabdullah: http://twitter.com/#!/dabeaz/status/46583704583290880 [19:36] jesusabdullah: http://twitter.com/#!/enjalot/status/46642003609522176 [19:37] jesusabdullah: Come rage with me ;) [19:37] pdelgallego_ has joined the channel [19:37] guybrush: tjholowaychuk: what do you think about that? https://github.com/senchalabs/connect/pull/236 [19:37] tjholowaychuk: guybrush: why not server.use('/mountpoint', connect.static(...)); ? [19:38] guybrush: wahaha [19:38] guybrush: sorry for the noise :p [19:38] tjholowaychuk: aha :) [19:38] tjholowaychuk: no worries [19:38] tjholowaychuk: that should do the trick [19:38] modular has joined the channel [19:38] guybrush: right [19:38] guybrush: ignore the pullrequest :p [19:38] patcito has joined the channel [19:39] felixge has joined the channel [19:39] felixge has joined the channel [19:39] pr2012: well cloud9 looks like it could be awesome, but I am guessing the routine seg faults mean it has a way to go [19:39] possibilities has joined the channel [19:40] insin has joined the channel [19:40] sivy has joined the channel [19:40] felixge: ryah: ping [19:40] isaacs: tjholowaychuk: ping [19:41] tjholowaychuk: isaacs: pong [19:41] insin: | . [19:41] isaacs: tjholowaychuk: in express, how does it know whether to use the configure("development" ...) or configure("production"...) [19:41] ryah: felixge: pong [19:41] tjholowaychuk: isaacs: NODE_ENV [19:41] tjholowaychuk: defaults to development [19:41] felixge: isaacs: it's in the express manual ... :) [19:41] isaacs: i see. so i'd set NODE_ENV=production for production? [19:41] felixge: ryah: https://github.com/joyent/node/pull/786 [19:41] tjholowaychuk: isaacs: yup [19:41] isaacs: that explains why it's in the default no.de setup :) [19:41] baudehlo: woo, Haraka now has docs: https://github.com/baudehlo/Haraka [19:41] felixge: ryah: What do you think about this? Stops the crypto update function from automatic type-casting into string [19:41] tjholowaychuk: isaacs: haha yeah I asked Jim to get it in there [19:42] isaacs: awesome [19:42] TheFuzzball has joined the channel [19:42] wavded has left the channel [19:42] ryah: felixge: sure [19:43] ryah: the question is if we should land that in v0.4 [19:43] ryah: is it a change in API? [19:43] felixge: ryah: Well, I would be surprised if people rely on this on purpose [19:43] ryah: let's be conservative and say yes [19:43] felixge: so maybe some broken apps would now get notified about the fact that they are broken [19:44] ryah: yeah.. [19:44] felixge: but yeah, it's an API change for sure [19:44] mcandre has joined the channel [19:44] felixge: so if you want to land it in 0.5.x that's fine with me [19:44] hurling: Hello, what is the easiest way to concatenate two buffers (no strings)? [19:44] mcandre: How can I set the log level so that console.log(message) are invisible? [19:44] ryah: felixge: it'd be nice if it threw a more helpful error message [19:44] mcandre: hurling: concat() [19:44] felixge: I just watched somebody actually relying on the old behavior by accident, and it scare the shit out of me [19:45] dguttman has joined the channel [19:45] felixge: ryah: can I throw something out of DecodeBytes ? [19:45] teemow has joined the channel [19:45] felixge: ryah: or would I have to inspect the return value in each function using it? [19:45] baudehlo: mcandre: there is no log level on console.log [19:46] mcandre: baudehlo: Do console.log, .warn, and .alert work differently? [19:46] tjholowaychuk: mcandre: .error / .warn are stderr [19:46] tjholowaychuk: mcandre: .log is stdout, but yeah no log levels [19:46] baudehlo: console.log buffers too. [19:47] mikegerwitz: hurling: Create a new buffer that is buf1.length + buf2.length and copy the contents in...I'm not aware of a function that does it for you. [19:47] mcandre: Merf. I'm writing a unit test framework. When it tests itself, some tests should fail, and I don't want the warnings to display for them. [19:47] ryah: felixge: no - can't throw from DecodeBytes but you can additionally do a type check before calling DecodeBytes [19:47] mraleph has joined the channel [19:47] mikegerwitz: mcandre: try/catch [19:47] ryah: felixge: in each of those functions in node_crypto.cc [19:47] felixge: ryah: meh : ). [19:47] ryah: felixge: :) [19:47] hurling: mcandre: results in a type error. I am using nodejs Buffer [19:47] felixge: ryah: I'll do it, hang on [19:47] mraleph: ryah: last I checked it's because of the var args = Array.prototype.slice.call(arguments, 1); [19:47] hurling: ah ok [19:47] mcandre: mikegerwitz: Do try and catch silence console.log? [19:47] aabt has joined the channel [19:48] mraleph: ryah: you can do --trace-bailout to see why it bails out. [19:48] mikegerwitz: mcandre: The errors are only output to the console if they are not caught [19:48] mcandre: mikegerwitz (and all): Thanks. [19:48] misham has joined the channel [19:48] zomgbie has joined the channel [19:50] plyons has joined the channel [19:50] ryah: felixge: ThrowException(Error::TypeError(String::New("Not a string or buffer"))) [19:50] plyons: anyone else played with the demo backbone todo app? http://documentcloud.github.com/backbone/docs/todos.html [19:50] ryah: felixge: feel free to #define a macro for that [19:50] plyons: I have a question about the source code there. [19:51] felixge: ryah: I was wondering if you'd prefer a macro or a function for it. I guess macro is slightly faster? [19:52] CIA-75: node: 03Ryan Dahl 07v0.4 * r2a05fe7 10/ src/node.js : [19:52] CIA-75: node: Do not use defineGetter in src/node.js for better crankshaft perf [19:52] CIA-75: node: See: https://groups.google.com/d/topic/nodejs/xJqpp1_s6is/discussion - http://bit.ly/gZnabi [19:52] ryah: felixge: whichever - im sure the compiler inlines it [19:52] Gigawatt: guys, why would geddy require access to my root folder ? [19:52] nilyt has joined the channel [19:53] ryah: mraleph: thanks [19:53] ryah: [marking (lazily) EventEmitter.emit for recompilation] [19:53] ryah: Bailout in HGraphBuilder: @"EventEmitter.emit": reference to rewritten variable [19:53] ryah: [disabled optimization for: EventEmitter.emit / 7fdddf5f8b31] [19:54] mraleph: did you remove the reference to arguments? [19:54] bmavity has joined the channel [19:54] mraleph: I mean did you remove the arguments splice... [19:54] ryah: mraleph: no [19:55] balaa has joined the channel [19:55] mraleph: then this cryptic message referce to it if I remember correctly :-) [19:56] Utkarsh_ has joined the channel [19:56] V1: What I really hate about the EventEmitter set up is that the addListener doesn't allow an array of event names where one function needs to be attached on.. [19:56] mraleph: ryah: hmm. or maybe not. let me think [19:56] V1: My code is always cluttered with multiple listeners that fire the same function :! [19:57] mraleph: ryah: ah. there are two problems there. now I remember. [19:57] ghost has joined the channel [19:58] mraleph: ryah: one is that you the function uses both arguments object and a named argument [19:58] svenlito: is there a separate channel for jade? [19:58] svenlito: ACTION havinaå [19:58] plyons_ has joined the channel [19:58] rfay_afk has joined the channel [19:58] svenlito: having an issue.. [19:59] ryah: mraleph: shit :) [19:59] ryah: mraleph: it's so picky [19:59] tjholowaychuk: svenlito: what's the issue? [19:59] mraleph: ryah: and if you fix that then hydrogen can't chew Array.prototype.slice.call(arguments, blabla). [19:59] mraleph: ryah: well JS is just full of corner cases. we have to move carefully :-) [20:00] V1: the jade channel is probably: /msg tjholowaychuk ;) [20:00] mde has joined the channel [20:00] ryah: mraleph: okay removed the named argument and the slice. still bailing [20:00] tjholowaychuk: haha [20:00] tjholowaychuk: i dont think jade is big enough for a channel [20:00] ryah: [marking (lazily) EventEmitter.emit for recompilation] [20:00] ryah: Bailout in HGraphBuilder: @"EventEmitter.emit": unsupported context for arguments object [20:00] svenlito: tjholowaychuk: im trying node build.js with a project and it's complaining about jade not being available [20:00] ryah: [disabled optimization for: EventEmitter.emit / 7f63c719d371] [20:00] tjholowaychuk: svenlito: ah, well did you $ npm install jade ? [20:00] mraleph: ryah: hmm. that means you still do something with arguments object. [20:00] svenlito: tjholowaychuk: ...yes [20:00] mraleph: other then referencing it with arguments[i] [20:00] tjholowaychuk: svenlito: might be an npm issue then as far as your setup goes [20:01] tjholowaychuk: if you installed with homebrew (not sure if that is an issue anymore) [20:01] tjholowaychuk: definitely not a jade bug though [20:01] kriszyp has joined the channel [20:01] ryah: mraleph: https://gist.github.com/869755 [20:01] svenlito: tjholowaychuk: http://pastie.textmate.org/private/yvvelvemjltzxg1zv1n5w [20:01] mraleph: ryah: there were two places with slice did you remove both? [20:01] zomgbie has joined the channel [20:01] jelveh has joined the channel [20:01] tjholowaychuk: svenlito: yeah that is the standard require() failure [20:01] mraleph: ryah: there is still slice in the other case. [20:02] svenlito: hmk [20:02] tjholowaychuk: svenlito: not jade related though, either npm setup issues, or require.paths is being tampered with etc [20:02] ryah: mraleph: ah, i see [20:02] svenlito: tjholowaychuk: oh ok [20:02] mraleph: ryah: I think we just need to support .slice applied to arguments in Crankshaft. [20:03] ryah: mraleph: it's a pretty common pattern [20:03] felixge: ryah: https://github.com/felixge/node/commit/c37f54536c902fdc48697cb003a2effe2a7cd4b7 [20:03] felixge: is this what you were thinking? [20:03] felixge: I could also combine DecodeBytes and the assert into the same macro I guess, but it seemed like a little too much magic at first [20:03] isaacs: svenlito: can you go into the node repl and do "require('jade')" [20:03] hornairs has joined the channel [20:04] mraleph: ryah: we did discuss it when I was looking at node.js after Crankshaft release; that just requires some non-trivial work. [20:04] mraleph: ryah: yep I know that it is common. [20:04] ryah: mraleph: okay got it to work with emit() [20:04] jelveh: ryah: do you know wether there's a way I can work around this problem: https://gist.github.com/864727 ? [20:05] perezd: stupid question about binding to port 80 on mac [20:05] perezd: I know I can do it if I sudo [20:05] perezd: but [20:05] perezd: then all my modules go missing... [20:05] svenlito: isaacs: as in, on the command line? [20:05] kevwil has joined the channel [20:06] isaacs: svenlito: yeah [20:06] isaacs: svenlito: type "node" to go into the repl. then type "require('jade')" [20:07] svenlito: isaacs: oh, now i get it.. same error [20:07] isaacs: svenlito: great. what's require.paths, while you're in there [20:07] svenlito: isaacs: http://pastie.textmate.org/private/be5jtvc6dffubbpvvzseta [20:08] isaacs: svenlito: great. add this to your .bashrc or .bash_profile: NODE_PATH=/usr/local/lib/node [20:08] isaacs: er, export NODE_PATH=/usr/local/lib/node [20:09] mraleph: ryah: did it save you any ms'es? [20:09] mraleph: for some reason I doubt that you get anything outside of computationally intensive loops. [20:10] gkatsev: does node have ssh bindings and is that planned at some point? [20:10] svenlito: isaacs: ok it finds it now if i do a require [20:10] svenlito: thanks dude [20:10] isaacs: np :) [20:10] ryah: mraleph: very small [20:11] ryah: mraleph: maybe 1% faster or so [20:11] svenlito: isaacs: why does that happen? does it have to do with homebrew? [20:11] isaacs: yes. because homebrew hides the actual executable behind a symlink, node thinks its running at .../Cellar/blah blah [20:11] isaacs: so the default require.paths is based on that location, instead of based on /usr/local/bin/node [20:12] jelveh: perezd: proabably a load path issue [20:12] isaacs: npm is wise enough to respect the location of the symlink, rather than the location of the executable, so that it doesn't install things in a volatile location [20:12] piscisaureus: ACTION wave [20:12] ryah: felixge: yeah, looks good [20:12] JusticeFries has joined the channel [20:13] mraleph: ryah: a week ago or so I was doing some measurements for my slides for nodecamp.eu talk and noticed that considerable amount of ticks on simple http bench lands into runtime dictionary lookup functions --- which means that on the hot path somewhere you probably have a slowcase object or an object which you intentionally use as a hashmap. [20:13] jelveh: perezd: you might also have to set the node path: export NODE_PATH="/usr/local/lib/node" [20:13] perezd: jelveh: yaeh, that was it [20:13] jelveh: cool [20:13] mraleph: ryah: I did not look deeper into that but this is something to keep in mind. [20:14] eyesUnclouded has joined the channel [20:14] zomgbie has joined the channel [20:14] cogno has joined the channel [20:14] dyer has joined the channel [20:15] ryah: mraleph: okay. that's good to know. [20:15] felixge: ryah: want me to squash? [20:15] ryah: felixge: nah, i got it [20:15] felixge: ryah: cool [20:16] cogno: What is the twitter hashtag for node? [20:16] ryah: felixge: going to land in v0.4 anyway [20:16] ryah: cogno: #nodejs [20:17] cogno: Thx [20:17] pHcF has joined the channel [20:17] felixge: ryah: If you haven't merged already, I'm wondering if I should change the patch a little to allow numbers [20:18] ryah: jelveh: not ignoring you, just finishing up this other stuff. one sec. [20:18] felixge: ryah: Type-casting those into strings shouldn't lead to any surprises either [20:18] dominic_ has joined the channel [20:18] piscisaureus: mraleph: so, you are coming to nodecamp after all :-p [20:18] jelveh: ryah: thanks :) much appreciated... I'll be online for a while so no need to rush [20:18] ryah: felixge: nah. let's see if people complain [20:19] felixge: ryah: ok :) [20:19] mraleph: piscisaureus: yes. now I just need to figure out the best way to get to Cologne :-) [20:19] piscisaureus: take the ice I guess [20:19] ryah: mraleph: you prepare early [20:19] piscisaureus: oh ryanair :-) [20:19] piscisaureus: ^-- not a joke :-) [20:19] felixge: piscisaureus: haha [20:20] ryah: ACTION went from colonge to aarhus once. not easy. [20:20] rfay has joined the channel [20:20] mraleph: ryah: prepare is a very strong word, I am just doing preliminary planning :-) [20:20] brapse has joined the channel [20:20] felixge: ACTION can't await node camp. And nodeconf for that matter [20:21] ryah: mraleph: mitfahrgelegenheit [20:21] piscisaureus: ACTION figured out that cologne is actually closer than my girlfriend ... [20:21] ryah: probably faster than flying [20:21] piscisaureus: das heißt trampen iirc :-) [20:21] mraleph: I actually thought about taking night-train that passes through Kolding. [20:22] ryah: piscisaureus: it's pretty mainstream [20:22] mraleph: it's not fast, but at least I can sleep most of the time. [20:22] V1: Is anyone here on IE9 atm? [20:23] piscisaureus: ryah: yes I did it once but this guy was taking advantage of the autobahn a little too much for my guts [20:23] mraleph: ACTION annoyed by the English way of spelling Cologne [20:24] CIA-75: node: 03Felix Geisendörfer 07v0.4 * r9d4c5a1 10/ (src/node_crypto.cc test/simple/test-crypto.js): (log message trimmed) [20:24] CIA-75: node: Crypto update should only accept strings / buffers [20:24] CIA-75: node: I have seen a lot of people trying to pass objects to crypto's update [20:24] CIA-75: node: functions, assuming that it would somehow serialize the object before [20:24] CIA-75: node: hashing. [20:24] CIA-75: node: In reality, the object was converted to '[object Object]' which was [20:24] CIA-75: node: then hashed, without any error message showing. [20:24] jimt has joined the channel [20:24] insin: ACTION recalls a small shop at Aarhus ferry terminal (on the way to Samso) which had one entire wall given over to Haribo and one entire wall given over to porn [20:24] jlecker has joined the channel [20:25] gilesgoatboy has joined the channel [20:25] ryah: ah the danish... [20:25] jbpros has joined the channel [20:26] felixge: ryah: ^--- thanks for mergeing [20:26] zmbmartin has joined the channel [20:26] felixge: * merging [20:27] adamt: what's wrong with the danish? [20:27] NinjaFox: insin: sounds like heaven [20:29] boaz has joined the channel [20:29] mraleph: adamt: nothing... except for soft d :-) [20:29] kawaz_air has joined the channel [20:29] mraleph: I am afraid of it. [20:30] losing has joined the channel [20:30] jimt_ has joined the channel [20:31] adamt: and what might "soft d" be? [20:31] adamt: :) [20:31] techwraith has joined the channel [20:32] Know1edge: isaacs: do you maintain node-proxy? [20:32] isaacs: Know1edge: nope [20:32] mraleph: adamt: the sound in words like mode, flode etc. [20:32] techwraith: What's the best way to write a stream to a file? [20:33] zomgbie_ has joined the channel [20:33] mAritz: what's the best current way to use socket.io with connect sessions? [20:34] mAritz: session-web-sockets from bradleymeck seems a little un-maintained [20:34] V1: mAritz: you can just access the HTTP headers of each client when they connect to the server, so you can parse out the session cookie and probably read it out somewhere [20:34] dominic_ has joined the channel [20:35] Know1edge: no confused… can install any other package fine, but when installing node-proxy it gives me a could not configure a cxx compiler error.. [20:35] dominic_ has joined the channel [20:35] Know1edge: s/no/so [20:35] mAritz: i'm using the connect-redis session store, so i'd have to either rebuild that or try to use the session middleware in socket.io?! [20:36] mraleph: adamt: or more precisely m�de, fl�de :-) I don't use danish keyboard layout so I have to copy �, � and � from Wikipedia :-) [20:36] adamt: Know1edge, not all packages need to compile anything [20:36] alek_br has joined the channel [20:36] adamt: mraleph, you didn't have to :) [20:36] bingomanatee has joined the channel [20:36] Know1edge: i have gcc-c++ on the box [20:36] Know1edge: g++ [20:36] v8bot: Know1edge has given a beer to g. g now has 2 beers. [20:37] mikegerwitz: heh [20:37] TheFuzzball has joined the channel [20:37] techwraith: Man, g and c probably get plastered here every day. [20:37] ryah: jelveh: yes - this is a bug. [20:37] ryah: jelveh: attempting to fix now. [20:38] mikegerwitz: techwraith: yeah saw C here earlier with 8 beers [20:38] techwraith: mikegerwitz: do you have much experience with the fs stuff in node? [20:38] jelveh: ryah: thanks!! [20:38] zomgbie has joined the channel [20:38] V1: mAritz: I don't know, there might be a way to just forward the request from the Socket.IO connection to the cookieParser of connect.. [20:39] techwraith: I'm trying to figure out the best way to stream stuff into a file... [20:39] mikegerwitz: techwraith: To a degree. If nobody's answered you by ~5:15 I can help out, but I have to wait until I get home (work atm). [20:39] techwraith: k [20:39] techwraith: Thanks man [20:39] mikegerwitz: yep [20:39] mAritz: V1: github.com/bnoguchi/Socket.IO-connect is almost what i'd want. however it has some rather serious bugs :/ [20:39] kevwil has joined the channel [20:40] mikegerwitz: techwraith: Oops, idk your timezone! lol, EST [20:40] mscdex: techwraith: fs.WriteStream [20:40] astropirate has joined the channel [20:40] techwraith: pst [20:40] mscdex: techwraith: http://nodejs.org/docs/v0.4.2/api/fs.html#fs.WriteStream [20:40] techwraith: mscdex: thanks [20:40] deepthawtz has joined the channel [20:41] mAritz: wait, do i even need the session stuff? i don't think so... *thinks some more* [20:41] V1: mAritz: but the conecpt of it is correct, you can just run the client.req through your connect server.handle(req, res) and it will apply the middle ware to it [20:42] techwraith: mscdex: So I open up a writeStream, then listen for the open event and write to it every time I receive data, then close it when I'm done? [20:42] gozala has joined the channel [20:43] mAritz: V1: yeah, i'll have a look at that. thanks :) [20:43] zachsmith has joined the channel [20:44] zomgbie has joined the channel [20:44] sourcode has joined the channel [20:44] V1: mAritz: it can be something really simple like this: https://gist.github.com/869835 [20:45] V1: and than you can just access the client.request.session and other connect middleware methods [20:45] tjholowaychuk has joined the channel [20:45] ParadoxQuine has joined the channel [20:46] marcosvm has joined the channel [20:46] mAritz: awesome :) [20:47] V1: the middleware would be loaded once the callback function is called btw. [20:47] jimt has joined the channel [20:48] dominic_ has joined the channel [20:50] mscdex: techwraith: pretty much. [20:50] mscdex: techwraith: it inherits the methods, events, etc from Writable Stream here: http://nodejs.org/docs/v0.4.2/api/streams.html [20:52] techwraith: mscdex: Got it, thanks. [20:52] NinjaFox has left the channel [20:53] jimt_ has joined the channel [20:53] fisted has joined the channel [20:56] meso_ has joined the channel [20:56] Gigawatt: Has node.js got any documentation standards ? [20:57] TheFuzzball has joined the channel [20:57] mAritz: V1: do you mind helping me a little more? client.request and client.response are null in the connect handler. :/ [20:58] Gigawatt: whats the issue mAritz ? [20:58] V1: mAritz: That's odd as it's added in each client object: https://github.com/LearnBoost/Socket.IO-node/blob/master/lib/socket.io/client.js#L66-68 [20:58] dune has joined the channel [20:59] V1: which transport where you using? [20:59] mAritz: V1: xhr-polling [20:59] pz_f has joined the channel [20:59] meso__ has joined the channel [20:59] dguttman has joined the channel [21:00] mAritz: V1: all the other properties on client seem to be good. [21:00] mAritz: Gigawatt: trying to use connect sessions with socket.io :) [21:00] V1: Checking if I can reproduce it [21:00] jimt has joined the channel [21:01] mAritz: i'm also using express, if it makes any difference. (shouldn't afaict) [21:01] skm has joined the channel [21:01] ParadoxQuine: Gigawatt: afaik no. i've been thinking of trying to make some and make templates for the various documentation generators since there is a major need for documentation... [21:02] zomgbie has joined the channel [21:03] V1: mAritz: move the .handle method to when you receive a message [21:03] mAritz: V1: d'oh... that's rather obvious. time to go home i guess. [21:03] V1: client.on('message', function(){ server.handle(client.request,client.response, fn )}) [21:03] Stan____ has joined the channel [21:04] malkomalko has joined the channel [21:04] V1: mAritz: But than again.. when you use websockets you wont have a response [21:05] mAritz: V1: which means i can't change the session id. [21:05] mAritz: except if i write some client javascript that persists the change into the cookie [21:05] Gigawatt: : I agree, we need to have some coding and documenting standards. [21:06] V1: yup [21:06] mAritz: V1: is there a way to get the endless loading animation/state to stop with xhr-polling? [21:06] V1: mAritz: or you might update the `WebSocket.prototype._onConnect` function to store the "socket" argument in the client. [21:07] Gigawatt: If there is non available at the moment im going to go with Zend's standards as to me there the cleanest [21:07] ralphholzmann has joined the channel [21:07] V1: mAritz: What browser are you using? [21:07] mAritz: chromium 9 [21:08] kriszyp has joined the channel [21:08] mAritz: V1: i don't get what you mean by "store the "socket" argument in the client". but then again, i haven't looked at _onConnect. [21:08] V1: mAritz: I see what you mean.. [21:09] V1: the _onConnect method receives 2 arguments "req" and "socket". [21:09] V1: The socket argument is probably the response object. [21:09] piscisaureus has joined the channel [21:10] V1: The WebSocket transport inherits from the Client class. So if you add this.response = socket; this.request = req; in the code it would probably work. [21:10] isaacs: probably going to have an npm user account reset site tonight [21:10] isaacs: that is, pushed live tonight [21:10] EyePulp has joined the channel [21:10] EyePulp: yo ho ho [21:10] dune: I am just getting started with Express, Rails has the :remote option and associated helpers to post forms using Ajax, is there a similar construct for Express? Is there an idiomatic way to pass parameters using ajax? I am using JQuery. Is it just manually writing the $.post calls? [21:11] EyePulp: dune: with $.post() you can specify a hash of values you want sent [21:11] Venom_X has joined the channel [21:11] EyePulp: {foo:'bar'} [21:11] aho has joined the channel [21:12] mAritz: V1: okay, thanks :) [21:12] tjholowaychuk: dune: Express doesn't interface with client-side js at all (currently) [21:12] dune: EyePulp, ok cool. Just wanted to make sure there was not a library called ajaxpost.js or something hanging around :) Thanks. [21:12] V1: mAritz: I'll give Guillermo a poke on the loading indicators in WebKit. [21:13] malkomalko: anybody having weird problems with stylus not being compiled in an express app? can't get it working [21:13] mAritz: V1: so, was that _onConnect stuff only for the session id changing thing or to generally get it working? [21:13] dgathright has joined the channel [21:13] tjholowaychuk: malkomalko: node 0.4.x? [21:13] mAritz: because i don't get to the callback passed to handle() [21:13] malkomalko: yes [21:14] tjholowaychuk: malkomalko: what's the stylus config? [21:14] mAritz: i guess somewhere my middleware is catching it? :/ [21:14] malkomalko: https://gist.github.com/5e071f606ab8fa068512 [21:14] malkomalko: right above my router [21:15] V1: mAritz: I think you can poke TJ for that ;) [21:15] malkomalko: does it need to go after? like right before static? [21:15] tjholowaychuk: malkomalko: before static() yeah [21:15] tjholowaychuk: malkomalko: it's hard to explain, but that setup might not work [21:16] cogno: I remember reading buffers are quite special regarding GC. I can't find an URL though [21:16] mAritz: i'll try debugging it first before i annoy him with my stupidity again :D [21:16] Draggor: SubStack: Would I be able to get contributor status on bigint? There's a few more things I want to add to it. [21:16] malkomalko: what setup? I even just tried with the basic src: __dirname [21:16] malkomalko: does it not like __dirname + '/../' or something? [21:16] mAritz: yep, just confirmed it: middleware catches all :D [21:16] tjholowaychuk: malkomalko: because if you GET /css/compiled/foo.css it's going to try to grab ./css/compiled/foo.styl [21:16] tjholowaychuk: i believe [21:16] tjholowaychuk: even I forget sometimes [21:16] tjholowaychuk: haha [21:17] tjholowaychuk: but to support nesting it is not quite as intuitive as it could be [21:17] malkomalko: app.use(stylus.middleware({ src: __dirname })); [21:17] malkomalko: even just that, with a styl in my config dir (which is where my express_config is), it doesn't compile [21:17] tjholowaychuk: malkomalko: try src: __dirname + '/public' with static()'s root pointed at that path too [21:17] tjholowaychuk: or just try the stylus example in the express repo [21:18] tjholowaychuk: it works for me [21:18] tjholowaychuk: so if it doesnt work then something is going on [21:18] SubStack: Draggor: just send me a pull request [21:18] malkomalko: I don't have my express_config in my route of my project [21:18] malkomalko: I have an express_config under a config directory because I like splitting things out [21:19] malkomalko: blah :D [21:19] tjholowaychuk: malkomalko: https://github.com/learnboost/stylus/issuesearch?state=closed&q=middleware#issue/122 [21:19] tjholowaychuk: this might help describe the issue [21:19] tjholowaychuk: (not saying that IS the issue) [21:19] tjholowaychuk: but sounds like it [21:19] Gigawatt: here's a question [21:19] mlncn has joined the channel [21:19] malkomalko: aight, I'll take a look and play around [21:19] malkomalko: danke [21:20] malkomalko: gonna go home now :) [21:20] tjholowaychuk: it's not a bug, just a major gotcha [21:20] Gigawatt: should i load my entire public directory into memory, (RAM) outside the server scope, as this would be a lot faster and reduce spin cycles? [21:21] ralphholzmann: is there a mysql package that someone would recommend? theres a handful of them out there ... [21:22] ParadoxQuine: can anyone else quickly check whether dividing a variable works in stylus? it seems to me that all the other binops work but division doesn't [21:22] EyePulp: any good idioms under node/mongoose for chaining a series of queries and only having to nest a single callback that would get all the results? [21:22] tjholowaychuk: ParadoxQuine: that is because we need to support say "font: 12px/1.2" for example [21:22] tjholowaychuk: ParadoxQuine: so (only when in a property value) you need to wrap with parens [21:23] tjholowaychuk: ParadoxQuine: foo: (size / 2) for example, but if n / 2 == 4 is fine without [21:23] tjholowaychuk: otherwise you would need "font: 12px\/1.5" [21:23] mAritz: tjholowaychuk: is there a way to immediately skip to the end of the middleware stack of a connect request inside a middleware? [21:24] tjholowaychuk: mAritz: hmm no actually, from the router you can do next(true) to jump passed all the routes and back to connect [21:24] zomgbie has joined the channel [21:24] tjholowaychuk: but connect does not currently have this [21:25] dve has joined the channel [21:25] mscdex: ralphholzmann: node-mysql [21:26] ParadoxQuine: tjholowaychuk: thanks! i think that might be worth documenting in the binary operator section of the docs [21:26] tjholowaychuk: ParadoxQuine: definitely, I will do that [21:26] tjholowaychuk: I swear it was in there somewhere [21:26] V1: Some are faster than others, so you might want to do your own little benchmarking ralphholzmann [21:27] mAritz: tjholowaychuk: okay, so... my real problem: i call "app.handle(request, respond, function () { // i want to get here });" is there a way to get to that callback without processing the rest of the stack? does next(true) do that? [21:27] TomY has joined the channel [21:27] TomY_ has joined the channel [21:27] mscdex: cogno: they're collected where there are no more references to any part of the buffer [21:27] ralphholzmann: mscdex V1 - thank you! [21:28] Spion__ has joined the channel [21:29] dve: I need a good/simple database I can use with a little node experiment.. something like sqlite, that I can do TOP, SUM queries on [21:30] dve: node-sqlite module wont work on my box [21:30] tjholowaychuk: mAritz: not right now it wont nope [21:30] tjholowaychuk: it will pass through all [21:30] cogno: Msdex, in what this is different from "normal" objects [21:30] cogno: ?? [21:31] mscdex: cogno: iirc memory for Buffers are allocated outside of v8 [21:31] techwraith: dve: [21:31] techwraith: Have you tried mongo? [21:31] dune: EyePulp - Check out the Do library - https://github.com/creationix/do [21:31] gkatsev: is it ok to create several http servers listening on different ports in one file or not recommended? [21:31] ParadoxQuine: another question: in connect, when i'm specifying a middleware such as compiler (which i used to set up jade with a separate source and dest dir), what exactly does the "enable" field do? I saw enable ["sass"] in an example but enable ["jade"] or ["stylus"] didn't work so i just set it to enable: true and then stylus worked [21:32] mscdex: gkatsev: sure why not? [21:32] bingomanatee has joined the channel [21:32] mAritz: tjholowaychuk: okay. it's working this way as well, but it has to run through all my routing middleware which is really not ideal :( [21:32] EyePulp: gkatsev: it should be fine [21:32] techwraith: I'm fairly sure it will work if you use it's built in map and reduce functions [21:32] dve: techwraith: I had thought of it but was hoping for something with minimal installs as I want to push it to my joyent machine [21:32] tjholowaychuk: ParadoxQuine: enables one or more compilers [21:32] tjholowaychuk: ParadoxQuine: ['sass', 'less'] etc [21:32] __tosh has joined the channel [21:32] techwraith: Mongo is REALLY simple on joyent [21:32] tjholowaychuk: stylus has it's own middleware [21:32] techwraith: I got it up and running in a couple minutes [21:32] Me1000 has joined the channel [21:33] mraleph1: tjholowaychuk: TryCatch does not catch anything in the same scope… you need to return to JS — then somebody above will catch it. [21:33] dve: techwraith: using mongoose? [21:33] techwraith: Yep [21:33] ParadoxQuine: tjholowaychuk: ok so stylus isn't a valid compiler for that since it has its own middleware? and is that css compilers or could i add jade to that somehow? [21:33] techwraith: dve: but it should be just as easy to use mongo-native if that's what you prefer [21:33] tjholowaychuk: mraleph1: oh :) [21:33] Croms_ has joined the channel [21:33] tjholowaychuk: good to know [21:33] admc has joined the channel [21:34] visa has joined the channel [21:34] tjholowaychuk: ParadoxQuine: yeah, I wanted to add jade support in the connect repo, just open up compiler.js to see how to add it [21:34] techwraith: dve: http://wiki.joyent.com/display/node/Node+SmartMachine+FAQ#NodeSmartMachineFAQ-MongoDB [21:34] dve: techwraith: any 'getting started' blogs you know of [21:34] tjholowaychuk: ParadoxQuine: the object is exported [21:34] dve: techwraith: haha beat me to it! [21:34] techwraith: dve: I aim to please ;) [21:35] ParadoxQuine: tjholowaychuk: i'll go take a look, thanks! [21:35] ryah: jelveh: is there a github issue for that problem? [21:35] dve: techwraith: giving it a go now [21:35] ryah: jelveh: fixed it btw. [21:36] techwraith: dve: let me know if you have any issues, I'll help if I can [21:36] jelveh: ryah: w00t! [21:36] gkatsev: no.de is not letting me ssh in with some of the keys but others work fine... weird [21:36] dyer_ has joined the channel [21:36] dve: techwraith: gracias [21:36] ParadoxQuine: no.de is having key entry problems with its website [21:36] jelveh: ryah: no github issue from me maybe mikeal wrote one, let me check [21:36] techwraith: dve: after you install mongo, just do npm install mongoose and you should be up and running [21:36] ParadoxQuine: gkatsev: you can email tech support and theyll put your keys in, thats what i did when it wasnt working [21:37] ryah: isaacs: where's that site where i can see github issues for node? [21:37] gkatsev: ParadoxQuine: i used the API and it seemed to work. [21:37] ParadoxQuine: gkatsev: ok maybe that works too. their site is buggy though right now [21:37] gkatsev: yeah [21:37] gkatsev: hm... let me try a restart, it fixed it the first time, lol [21:38] jelveh: ryah: haven't found one should I add one? [21:38] V1: mAritz: you can always build your own .handle method and work around it. :P [21:38] mAritz: V1: yeaaaah [21:39] perezd: what are some good use cases for process.nextTick? [21:39] stephen_mcd has joined the channel [21:39] ryah: jelveh: yeah [21:39] mikl has joined the channel [21:39] ryah: jelveh: was there a mailing list thread about it? can you link if so [21:40] jelveh: sure thing! [21:40] jtrally has joined the channel [21:40] ryah: jelveh: yes, found the thread. [21:40] sveimac has joined the channel [21:40] zomgbie has joined the channel [21:41] dominic_ has joined the channel [21:42] boaz has joined the channel [21:43] dominic_ has joined the channel [21:43] eb4890 has joined the channel [21:43] ryah: jelveh: https://groups.google.com/forum/#!topic/nodejs-dev/V5fB69hFa9o [21:43] jelveh: thanks! [21:44] Gigawatt: can i override the default console.log() command ? [21:44] Gigawatt: just use global.console right ? [21:44] skiz has joined the channel [21:45] JimBastard has joined the channel [21:45] V1: or just console.log = function [21:46] JusticeFries has joined the channel [21:46] zomgbie has joined the channel [21:46] datapimp has joined the channel [21:46] skm has joined the channel [21:47] jelveh: ryah: https://github.com/joyent/node/issues/787 [21:47] ryah: jelveh: thanks [21:48] themiddleman has joined the channel [21:48] jelveh: np :) [21:48] CIA-75: node: 03Ryan Dahl 07v0.4 * r36e75b7 10/ (3 files in 3 dirs): [21:48] CIA-75: node: Fix HTTP agent disconnection problem [21:48] CIA-75: node: https://groups.google.com/forum/#!topic/nodejs-dev/V5fB69hFa9o [21:48] CIA-75: node: Closes GH-787. - http://bit.ly/eaJfff [21:48] jelveh: woohooo! [21:52] Venom_X has joined the channel [21:52] EyePulp: who's the sessy fella in test/fixtures/person.jpg [21:52] EyePulp: ? [21:53] pascalopitz has joined the channel [21:53] jamesarosen has joined the channel [21:54] dominic_ has joined the channel [21:55] hornairs has joined the channel [21:56] strmpnk has joined the channel [21:57] ncb000gt: ryah: I squashed those commits down to a single commit for the url parsing issues. https://github.com/joyent/node/pull/770 [21:58] Utkarsh__ has joined the channel [21:59] rtomayko has joined the channel [22:03] yinkei has joined the channel [22:04] bingomanatee has joined the channel [22:04] zomgbie has joined the channel [22:05] Hello71 has joined the channel [22:08] xla has joined the channel [22:09] kriszyp has joined the channel [22:10] losing has joined the channel [22:11] Astro has joined the channel [22:11] hassox has joined the channel [22:12] piscisaureus: ryah: bookmark: http://izs.no.de/joyent/node [22:13] EyePulp: hey tjholowaychuk - getting "Error: EMFILE, Too many open files" trying to start up cluster - anything I should be looking at? [22:13] Utkarsh_ has joined the channel [22:13] tjholowaychuk: EyePulp: what does the debug() output say? [22:14] EyePulp: debug() run from what? [22:14] Stan____ has left the channel [22:14] EyePulp: within the node code? [22:14] tjholowaychuk: there is a plugin [22:14] tjholowaychuk: use(cluster.debug()) [22:14] EyePulp: ah [22:15] sveimac has joined the channel [22:15] EyePulp: does it dump to logs or std out? [22:15] tjholowaychuk: will give a better idea of whats going on [22:15] tjholowaychuk: stdout [22:15] secoif has left the channel [22:16] maushu has joined the channel [22:16] EyePulp: one sec [22:16] jdalton has joined the channel [22:18] EyePulp: hrm [22:18] EyePulp: now I get "Error: EINVAL, Invalid argument [22:18] EyePulp: at IOWatcher.callback (net.js:878:24)" [22:18] bbguitar has joined the channel [22:18] jimt has joined the channel [22:19] piscisaureus: ryah: you can close issue 766 I think [22:19] skiz_ has joined the channel [22:20] robhudson has left the channel [22:20] piscisaureus: It was caused by using -fno-builtin-memcpy but we now use no-strict-aliasing and only for gcc 4.5.x [22:21] bingomanatee: Check out Mongolian for Node - its an interesting literal riff off the command language of the mongo console itself. [22:21] stephen_mcd has joined the channel [22:23] dune has left the channel [22:23] jano has joined the channel [22:23] saschagehlich has joined the channel [22:23] skiz has joined the channel [22:23] perezd: any cradle users in here? [22:24] JimBastard: perezd: sure [22:24] perezd: is there a way to selectively disable the cache on a get? [22:24] JimBastard: i think the cache is global? [22:24] JimBastard: you can turn it on/off [22:24] perezd: ah, was wondering if there was an explicit get [22:24] perezd: even with cache on [22:25] JimBastard: new(cradle.Connection)('http://living-room.couch', 5984, { cache: false, raw: false }); [22:25] JimBastard: something like that [22:26] JimBastard: the code for caching doesnt look too hard either [22:26] bingomanatee: pardon my ignorance but what do you mean by the cache? the event handler? [22:26] JimBastard: https://github.com/cloudhead/cradle/blob/master/lib/cradle/cache.js [22:26] perezd: I think I am asking a dumb question [22:26] perezd: never mind me [22:26] JimBastard: perezd: cache:false is solution? [22:26] perezd: I think the solution is to not try to solve the problem the way I am [22:26] perezd: cache should be global [22:26] JimBastard: bingomanatee: http://en.wikipedia.org/wiki/Cache [22:27] xSmurf has joined the channel [22:27] bingomanatee: okay so in the node context you mean the fact that every module only loadds once ? I understand the principle of a cache. I just don't know what you mean in this context. [22:30] JimBastard: bingomanatee: we are talking about cradle's in memory cache for couchdb databases [22:30] bingomanatee: see that is more helpful. :D [22:31] bingomanatee: so cradle is the couch layer for node.js? [22:31] jdalton has joined the channel [22:31] Venom_X has joined the channel [22:31] JimBastard: its a node library that communicates with couchdb [22:31] alek_br has joined the channel [22:31] jdalton has left the channel [22:33] viewsrc has joined the channel [22:33] jpick has joined the channel [22:33] bbguitar has left the channel [22:34] bingomanatee has joined the channel [22:34] Caceres has joined the channel [22:34] whoops has joined the channel [22:35] Ian_Corne has joined the channel [22:37] tilgovi has joined the channel [22:39] jbpros has joined the channel [22:39] GriffenJBS: Gigawatt: you asked a while back, caching files in RAM is pointless [22:39] Gigawatt: why is that griffen ? [22:40] eyesUnclouded has joined the channel [22:40] GriffenJBS: you don't have fine control over the memory, the OS will swap as it needs to, then your back to reading from disk [22:40] Gigawatt: you would think 1M's worth of files tored in the ram would save more request time then waiting for the disk to spin [22:40] GriffenJBS: if the files are used often, and the system has RAM the OS will keep it cached for you [22:41] GriffenJBS: even windows is smart enough to handle that, OSX, linux, etc all do it quiet well [22:43] GriffenJBS: if you are reading in files, and then transforming them (wav to mp3), make a mp3 tempfile and stream that, the OS will buffer as much of the tempfile in RAM as possible/reasonable [22:43] jamesarosen has joined the channel [22:43] Gigawatt: if i assign a 100K CSS file to a global variable, you saying that the OS will flush that out of the ram if its noit used ? [22:43] Gigawatt: not* [22:43] GriffenJBS: yes [22:44] GriffenJBS: if the OS needs ram it will swap data and even inactive programs to the swap file [22:44] Gigawatt: ooooh, i never knew that, i thought that one you allocate it then it gets stored thare, only get's remove when you unset / delete the variable [22:44] Gigawatt: yes, so hten it goes to the swap, so if the site is active it will be stored in the ram for most of the time, otherwise its cached on the swap right [22:44] GriffenJBS: it's possible v8 is locking the memory to prevent swap, but I can't imagine why [22:45] zomgbie has joined the channel [22:45] GriffenJBS: Gigawatt: yup, that's why you rarely get OOM errors today [22:45] konobi: Virtual memory ftw [22:46] GriffenJBS: v8 would produce them but that was because they used to have a 1G limit, imposed by v8 not the OS or hardware [22:46] Gigawatt: yea i can see that, but it still would be benificial as reading from the ram 70% of the time would result in 70% higher response times [22:46] Gigawatt: Windows uses the paging file right ? [22:46] GriffenJBS: often used data won't be swapped until the active set becomes larger than the physical RAM [22:47] Aria has joined the channel [22:47] GriffenJBS: Gigawatt: depends how you have windows set up, but generally, yes [22:48] Gigawatt: kool kool, thanks for that [22:48] fisted has joined the channel [22:48] Gigawatt: unix uses a whole swap partition right [22:49] GriffenJBS: again depends how it's setup [22:49] Gigawatt: on install it dedicates the partition the same size as the ram. [22:49] GriffenJBS: remember linux is easy to mount network, files, archives, etc [22:49] GriffenJBS: they can all be used for swap is configed for ir [22:49] GriffenJBS: /s/ir/it/ [22:49] Gigawatt: well im new to linux, only really started using it for Node [22:50] GriffenJBS: I've been playing in it for years, I used it to wash the DOS/Windows stick off me [22:50] mlncn has joined the channel [22:50] TomY has joined the channel [22:50] TomY_ has joined the channel [22:50] yozgrahame has joined the channel [22:50] GriffenJBS: stink [22:50] Gigawatt: lol [22:51] GriffenJBS: I remember when I once thought QBasic was pretty cool, easier than ASM, but still lacking in so many ways [22:51] GriffenJBS: nvm, I forgot about GWBasic [22:53] mikegerwitz: GriffenJBS: I cannot say I have ever heard QBasic compared to ASM :) But QBasic will always be pretty awesome. [22:53] BobFunk has joined the channel [22:55] zomgbie_ has joined the channel [22:55] GriffenJBS: mikegerwitz: from low level to high level language, that was relaxing, but shortly you notice your limited by the language, and not the hardware [22:56] warz has joined the channel [22:58] alek_br has joined the channel [22:59] bentruyman has joined the channel [23:00] bingomanatee has joined the channel [23:00] robotarm_ has joined the channel [23:02] saschagehlich has joined the channel [23:02] jamesarosen has joined the channel [23:03] blueadept has joined the channel [23:05] perezd: so anyone who can help me understand: when is the right time to use process.nextTick? [23:05] zorzar has joined the channel [23:05] JimBastard: perezd: good question [23:06] perezd: for instance, I am using it with a REST API, so taht I can return a 200 to a client faster who does not care about if the record is saved or not [23:06] malkomalko has joined the channel [23:06] masahiroh has joined the channel [23:07] bingomanatee has joined the channel [23:07] malkomalko: tjholowaychuk: not sure if you care but there are a few bugs that were fixed in my fork of tobi [23:07] anthonyl has joined the channel [23:09] mraleph1: piscisaureus: 766 is a different issue. [23:09] nciagra has left the channel [23:09] Gigawatt: how do i add breakpoints in my code [23:09] Gigawatt: when using debug> run .. [23:10] mraleph1: piscisaureus: it is caused by global variable with accessors and not having optimized x % 2^n modulo. [23:10] BobFunk: anybody been doing streaming put requests of very large files? [23:10] BobFunk: trying to stream files from disk and to rackspace cloudfiles [23:10] techwraith: dve: did you get the mongo stuff figured out? [23:10] mraleph1: piscisaureus: I've committed optimized modulo today, so it should become better. [23:11] BobFunk: but even if I'm using a streamreader and writing chunks to the http requests, it seems to use about as much memory as the size of the file [23:13] Gigawatt: debugger; - i got it xD [23:15] alek_br has joined the channel [23:16] shoebat has joined the channel [23:17] pr2012 has left the channel [23:17] liar has joined the channel [23:18] tereska has joined the channel [23:19] Gigawatt: why in node.js you cannot do the following ? [23:20] Gigawatt: var service = new require("./libraries/services/json").parser [23:21] pheuter has joined the channel [23:21] pheuter: urgent question, i get setMaxListeners error [23:21] pheuter: askinh me to increase limit [23:21] pheuter: how can i do so? [23:22] dnolen has joined the channel [23:22] tereska has left the channel [23:22] pheuter: EventEmitter memory leak detected [23:22] tereska has joined the channel [23:22] pheuter: https://gist.github.com/520230cb54a2c57f3421 [23:23] pheuter: that is my server file [23:23] pheuter: how do i increate setMaxListeners ? [23:23] tereska has left the channel [23:23] pheuter: anyone? [23:23] tereska_ has joined the channel [23:24] alek_br has joined the channel [23:26] lastk has joined the channel [23:26] tereska has joined the channel [23:27] tereska has left the channel [23:27] GriffenJBS: pheuter: have you read http://nodejs.org/docs/v0.4.2/api/events.html#emitter.setMaxListeners [23:28] pheuter: yeah, i got it now [23:28] muk_mb has joined the channel [23:28] pheuter: server IS an emitter [23:28] pheuter: so server.setMax [23:28] BobFunk: ok - managed to narrow down what's causing me problems [23:28] GriffenJBS: sorry I was slow to respond [23:29] BobFunk: does anybody know why the following code would cause the whole big file to be loaded in memory [23:29] pheuter: np [23:29] GriffenJBS: perezd: use nextTick anywhere you would try to use setTimeout(callback, 0) [23:29] Determinist has joined the channel [23:29] BobFunk: https://gist.github.com/870069 [23:29] GriffenJBS: you don't really want a delay, you just want to defer [23:29] gazumps has joined the channel [23:30] BobFunk: basically just read from a ReadStream and write to a WriteStream - but can see that the whole file ends up in memory [23:30] dguttman has joined the channel [23:30] SubStack: BobFunk: you can use stream.pipe(out) for that too [23:31] tbranyen: isaacs: Error: forbidden user: tim not authorized to modify nodegit: nodegit/0.0.2 [23:31] tbranyen: Huh [23:31] GriffenJBS: BobFunk: not exactly sure why, but it's either agressive caching, or GC is slow to release, are you just watching your system's memory usage? [23:32] tbranyen: oh boom wrong username [23:32] tbranyen: heh [23:32] GriffenJBS: BobFunk: what's the problem? [23:33] malkomalko: is there any way to catch broken pipes when dealing with streams? I'm getting some random EPIPE messages and can't figure out how to catch those [23:34] Gigawatt: GriffenJBS: you know why node does not allow: this.staticHandler = require("../handlers/static").createStaticHandler("" /*TODO*/); [23:35] dgathright has joined the channel [23:35] Gigawatt: for some reasons it returns undefined, but if i use the createStaticHandler after i set it to a local variable, it displays the object [23:35] [[zz]] has joined the channel [23:35] GriffenJBS: there are a lot of possible answers [23:35] GriffenJBS: have you looked at the source? [23:35] Gigawatt: not in depth [23:35] matschaffer has joined the channel [23:36] GriffenJBS: BTW that isn't part of node, what module are you using? [23:36] Aria: By 'set it to a local variable', do you mean var local = require('../handlers/static'); local.createStaticHandler("") ? [23:36] hoodow has joined the channel [23:36] hoodow has joined the channel [23:36] fisted has joined the channel [23:36] raidfive has joined the channel [23:36] GriffenJBS: I'm guessing createStaticHandler doesn't return itself [23:36] Gigawatt: i mean i have a class, and within my constructor i require a few libs, some of these libs create a single instance in there module scope, as there should only ever be one isntance [23:37] BobFunk: GriffenJBS: yeah [23:37] BobFunk: GriffenJBS: watching system's memory usage [23:37] BobFunk: and see it gradually increasing till it reach around 700MB [23:37] Gigawatt: i create an export to return an object, but for some reason it gets funny when returning objects of the OOP Nature [23:37] BobFunk: which is around the size of the file + a bit more [23:37] GriffenJBS: BobFunk: don't worry about it, get your app working then debug it, besides what good is ram if your not using it? [23:38] GriffenJBS: if your getting OOM errors, then we do have a problem to debug [23:38] Gigawatt: http://pastebin.com/pqvcFfbR [23:38] BobFunk: GriffenJBS: not using it on my macbook pro - but on the servers this is supposed to run on RAM is the main constraint right now... [23:39] GriffenJBS: BobFunk: yeah, but are you letting them do the caching or manuallying tuning it all? [23:39] jimt has joined the channel [23:40] BobFunk: GriffenJBS: so far I'm just experimenting with the best solution for streaming uploads directly to rackspace without loading the full files in memory [23:40] BobFunk: so just trying to get an idea if node.js might be a good way to accomplish that [23:40] Gigawatt: http://pastebin.com/nxTkKQN3 [23:40] mathec has joined the channel [23:40] BobFunk: but so far it sure looks like the whole file end up in memory [23:41] Gigawatt: GriffenJBS: check the following 2 pastes [23:41] GriffenJBS: BobFunk: but your fighting your tools, let them do their job, if your truely worried about ram you'd be using C/asm [23:41] BobFunk: might try running it in a virtual machine with little memory and see if it makes a differnce [23:41] GriffenJBS: BobFunk: Sound good, I'm betting it will still work, with no errors [23:41] BobFunk: GriffenJBS: trying to evaluate which tool will do the job - will try it on a VM [23:42] wilmoore_ has joined the channel [23:42] fisted has joined the channel [23:44] GriffenJBS: Gigawatt: can you put 'console.log(require("../handlers/static"))' before this.staticHandler in the Server function [23:44] boaz has joined the channel [23:44] Gigawatt: kk let me see [23:44] GriffenJBS: if that module wasn't loading you should be getting an error, but maybe it's loading the wrong thing [23:44] mlncn has joined the channel [23:45] GriffenJBS: :-) or it's not exporting [23:45] Gigawatt: { createStaticHandler: [Function] } [23:45] dgathright has joined the channel [23:46] GriffenJBS: ok, so 'console.log(this.staticHandler)' after that statement [23:46] Gigawatt: ahh, for some reason the handler method is not assigning to the object [23:46] GriffenJBS: maybe something later is deleting/changing the value [23:48] Utkarsh__ has joined the channel [23:48] Gigawatt: GriffenJBS: i get the object, but for some reason the handle function does not show: http://pastebin.com/pqvcFfbR [23:51] ezmobius has joined the channel [23:52] ruxpin has joined the channel [23:53] dominic_ has joined the channel [23:53] MikhX has joined the channel [23:54] JusticeFries has joined the channel [23:55] breccan_ has joined the channel [23:55] skiz_ has joined the channel [23:55] ezmobius has joined the channel [23:55] skiz_ has joined the channel [23:55] beejeebus has joined the channel [23:56] dominic_: isaacs: thanks, your a champ! (i didn't even know to call that globbing) [23:56] isaacs: :D [23:56] isaacs: dominic_: i think i'm gonna do a pure-js version eventually. [23:57] isaacs: it was fun porting some stuff out of BSD, but in the end, more trouble than it was worth,and it has arbitrary weird limitations. [23:57] Hello71 has joined the channel [23:57] Hello71 has joined the channel [23:58] isaacs: dominic_: and i had to write it for npm 1.0 anyhow :) https://github.com/isaacs/npm/blob/1.0/lib/utils/minimatch.js [23:58] softdrink has joined the channel