[00:00] galaxywatcher has joined the channel [00:00] nooder has joined the channel [00:01] aconbere has joined the channel [00:01] shimondoodkin: found: https://github.com/davglass/nodejs-yui3/blob/master/lib/yui3-dom.js [00:02] shimondoodkin: tmpvar: it could be at jsdom.windowAugmentation(dom, {parser: parser}); [00:02] shimondoodkin: https://github.com/davglass/nodejs-yui3/blob/master/lib/yui3-dom.js#L28 [00:03] tmpvar: you want to know where jsdom gets initialized? [00:04] MetaJake_ has joined the channel [00:04] shimondoodkin: i do not understand your offer [00:04] captain_morgan has joined the channel [00:04] shimondoodkin: is it about yui or in jsdom [00:04] shimondoodkin: yuui ive just found [00:04] prettyrobots has joined the channel [00:05] shimondoodkin: i wanterd to see how he used it [00:05] tmpvar: oh [00:06] programble has joined the channel [00:06] shimondoodkin: as i look on the code at https://github.com/davglass/nodejs-yui3/blob/master/lib/yui3-dom.js#L28 the question i have in mind is how to do the configuration so it wil go in line with the way he uses js dom [00:06] BillyBreen has joined the channel [00:07] BHSPitMonkey has joined the channel [00:07] shimondoodkin: tmpvar: are the options of jsdom(..,.., options) are the same with jsdom.windowAugmentation(.., options)? [00:08] BHSPitMonkey: Can a Socket.IO server receive pure websocket connections, or do they have to come from a socket.io client? [00:08] BHSPitMonkey: (You there, rauchg_ ?) [00:08] tmpvar: shimondoodkin, yeah for the most part [00:09] cloudhead has joined the channel [00:11] xilostech has joined the channel [00:12] pagameba has joined the channel [00:14] isaacs has joined the channel [00:15] jimt_ has joined the channel [00:16] thebigbad: tmpvar: is there a recent commit where the tests pass? [00:16] thebigbad: after 0.1.20, I mean [00:18] tmpvar: have you tried HEAD? [00:19] thebigbad: tmpvar: yup. running again so I can paste error [00:19] thebigbad: { message: 'titleLink Failure (titleLink): expected found <>' } [00:20] tmpvar: can you npm install htmlparser and try that again? [00:20] tmpvar: should be 1.7.2 [00:20] thebigbad: ah, I had htmlparser@1.6.2 [00:21] _mythz has joined the channel [00:21] thebigbad: business: I'm back in it :) [00:21] mscdex: that's good to hear, the unemployment numbers aren't very good nowadays [00:22] thebigbad: I looked around the other day for a way to require specific versions of node modules [00:22] thebigbad: in my current 3-man project, I'm using a README file with the output of npm ls installed :( [00:23] jimt has joined the channel [00:23] sonnym has joined the channel [00:24] shimondoodkin: ive figured that out too also is there a problem to run from a diferent user like www-data [00:26] Booths has joined the channel [00:26] ehaas has joined the channel [00:26] tj has joined the channel [00:27] boaz has joined the channel [00:29] matt_c has joined the channel [00:29] tmpvar: thebigbad, im going to bump the req'd version for htmlparser when 0.1.21 goes out [00:30] thebigbad: kk [00:30] Tim_Smart has joined the channel [00:33] MattJ has joined the channel [00:35] masahiroh has joined the channel [00:35] rkieffer has joined the channel [00:39] EyePulp has joined the channel [00:41] dnolen has joined the channel [00:41] omni5cience has joined the channel [00:41] jimt_ has joined the channel [00:41] yozlet has joined the channel [00:44] isaacs has joined the channel [00:45] shimondoodkin: tmpvar: ive check the code i think it is i mposible to put in in options and have a working jquery, the solution should be like: browser.disableJavascript, browser.enableJavascript [00:47] aheckmann has joined the channel [00:47] shimondoodkin: the disabling/enabling place is at https://github.com/tmpvar/jsdom/blob/master/lib/jsdom/level2/html.js#L1088 [00:47] shimondoodkin: at init [00:47] drewmiller has joined the channel [00:48] charlenopires has joined the channel [00:49] Anti-X has joined the channel [00:51] drewmiller has left the channel [00:51] sprout has joined the channel [00:52] drewmiller has joined the channel [00:53] ossareh has joined the channel [00:53] jimt has joined the channel [00:56] hoffa_ has joined the channel [01:03] indexzero has joined the channel [01:05] davidc_ has joined the channel [01:06] justin__ has joined the channel [01:09] mw has joined the channel [01:11] skiz has joined the channel [01:13] nolan_d has joined the channel [01:13] siculars has joined the channel [01:14] roberthahn_ has joined the channel [01:14] isaacs1 has joined the channel [01:15] roberthahn_: Gooood evening! I'm *sure* this has been asked a lot, but Google hasn't offered up the goodies -- how would one replicate Object.create() in JS environments (like FireFox 3.x) that don't support it? [01:20] mikew3c has joined the channel [01:20] rkieffer_ has joined the channel [01:20] GriffenJBS: is there no way in node/v8/JS to catch oom exception; or create a weak or soft reference? [01:22] SvenDowideit_ has joined the channel [01:23] MetaJake_ has joined the channel [01:26] jashkenas: roberthahn_: you can't replicate it exactly. [01:26] jashkenas: You can either use a subset, or avoid it if you want to write compatible JS. [01:27] siculars_ has joined the channel [01:27] hornairs has joined the channel [01:29] roberthahn_: jashkenas: good to know. is the 'compatible JS' approach using "Classical JavaScript Constructors" (see the first section on this page: http://howtonode.org/object-graphs-2) [01:31] jashkenas: roberthahn_: if you're interested in writing compatible JS, I'd recommend using regular prototypes + new instead of trying to replicate Object.create. [01:32] jashkenas: do you have an example you're trying to write? [01:32] dnolen has joined the channel [01:34] InsDel has joined the channel [01:40] jimt_ has joined the channel [01:40] mbrochh has joined the channel [01:41] creationix has joined the channel [01:41] creationix: Is there something like indexOf, but for objects? [01:41] creationix: I have a value, and I want to know what property in an object points to that value [01:41] creationix: currently I'm looping over the keys and checking for === [01:41] JimBastard has joined the channel [01:43] Tim_Smart: creationix: I don't think there is. [01:44] tk has joined the channel [01:45] isaacs has joined the channel [01:45] jimt has joined the channel [01:45] _mythz has left the channel [01:45] creationix: Tim_Smart: thanks, just checking [01:46] elijah-mbp has joined the channel [01:47] GriffenJBS: why won't this work for Object.create? https://gist.github.com/711097 [01:48] bpadalino: is this a quiz?! [01:48] jashkenas: creationix: some helper libraries implement it... _.include works for both Arrays and Objects. [01:48] jashkenas: _.include({a: 1, b: 2}, 1) => ture [01:49] Tim_Smart: jashkenas: I think creation wants it to return 'a' [01:49] jashkenas: ah, yes. [01:49] Tim_Smart: creationix* [01:49] twoism has joined the channel [01:51] jashkenas: GriffenJBS: that won't work because it doesn't support full property descriptors. [01:52] GriffenJBS: meaning setters and getters? [01:52] jashkenas: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/defineProperty#Description [01:52] GriffenJBS: thanks [01:52] jashkenas: {value : 1, writable: false, enumerable: true} [01:53] jashkenas: a shame ECMA5 didn't pick an Api that could be back-ported. There's a lot you can do with Object.create *without* property descriptors. [01:53] ysynopsis has joined the channel [01:54] roberthahn_: jashkenas: thanks for your feedback re: writing compatible JS. I've written a JS library for validating data (that's not baked into an ORM), and someone suggested that making it work in the browser as well as Node.js would be valuable. So, I'd be getting it packaged up for launch now but for the fact that I use Object.create() in the library. [01:54] rcy has joined the channel [01:55] jashkenas: roberthahn_: It shouldn't be hard to get that swapped out. Is it already up on github? [01:55] CIA-95: node: 03Ryan Dahl 07master * rf123a1a 10/ src/node_script.cc : hack to display syntax errors. FIXME - http://bit.ly/fXNTvp [01:55] GriffenJBS: wow, I based the gist on https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/create which didn't mention those details [01:56] roberthahn_: jashkenas: not yet. I'll get it up there tomorrow night. About to pack it in for now to spend time with my wife. Thanks for your interest. i'll look for you here when it's up [01:57] unomi: what is wrong with json-schema? [01:57] Tim_Smart: roberthahn_: You will find jashkenas quicker on #coffeescript ;) [01:57] unomi: for validating data [01:58] Vekz has joined the channel [01:58] roberthahn_: Tim_Smart: good to know! I'm still pretty new to the node.js community :) [01:58] rkieffer has joined the channel [01:59] kriszyp_ has joined the channel [02:00] msilverman2 has joined the channel [02:01] GriffenJBS: is there no way to catch OOM in node? [02:02] _mql has left the channel [02:03] unomi: GriffenJBS, presumably you could listen to usage now and then [02:04] hornairs: whats the http header that specifies where to start downloading a file from if the download has already started? or rather, how do i implement downloads over http that can be resumed? [02:04] Tim_Smart: ryah: Was writev too slow? [02:04] Tim_Smart: I see you reverted it [02:05] hoffa_ has joined the channel [02:07] langworthy has joined the channel [02:07] theBigZ has joined the channel [02:07] ryah: Tim_Smart: yes [02:08] langworthy: I'm having ssl certificate issues when trying to install ndistro using the command in the README. is this due to recent github changes? [02:08] markwubben has joined the channel [02:11] justin__ has joined the channel [02:12] jimt has joined the channel [02:13] kjeldahl has joined the channel [02:14] bartt has joined the channel [02:15] robotarmy has joined the channel [02:15] isaacs has joined the channel [02:15] bartt has joined the channel [02:15] MetaJake_ has joined the channel [02:16] GriffenJBS: unomi: possible, but not very useful, I'm trying to create a cache using available memory, by the time that catches it, the program has terminated from oom [02:18] Tim_Smart has joined the channel [02:19] unomi: GriffenJBS, caching what kinds of things? [02:19] unomi: on possible workaround might be to mount a ramFS you push things into [02:19] mu-hannibal has joined the channel [02:20] unomi: that way you get around node.js memory limitations, and also have something shareable between multiple nodes [02:20] GriffenJBS: unomi: that is doable, but seems more like it fixes a problem in node/javascript that should be fixed, not worked around [02:21] GriffenJBS: unomi: :-) I'll give you a gold star, that is a cleaver way to do it [02:21] bradleymeck has joined the channel [02:21] unomi: well, it is possible that V8 should return some information when it doubles its memory usage [02:22] unomi: node.js processes are known to need recycling now and then, having it outside any given one is a good idea [02:22] unomi: + you get the multinode core usage [02:23] zikes has joined the channel [02:24] jimt_ has joined the channel [02:24] unomi: working with javascript is all about doing clever things with limited tools ;) [02:24] jashkenas: node.js processes are fine ... if your code doesn't leak -- pretty fantastic actually. [02:24] matt_c has joined the channel [02:25] jashkenas: I have one here that's been running for 6 months under moderate traffic, still sitting pretty at 4.5Mb of resident RAM. [02:25] unomi: jashkenas, it is a very bad idea to rely on node.js processes not quitting arbitrarily [02:25] unomi: or any kind of process for that matter [02:25] jashkenas: sure, not to rely on it. [02:25] jashkenas: I just mean that Node in and of itself doesn't leak. [02:25] GriffenJBS: I'm working on a generic MRU memcache, the idea is to flush out LRU; that's the approach I'm trying, another is to have soft or weak references to objects, that can achieve the same idea [02:25] mikeal has joined the channel [02:26] Tim_Smart has joined the channel [02:26] matt_c_ has joined the channel [02:26] JimBastard: im trying to figure out the best way to do a session check for my single page app. right now i have a cookie and a session, but the only way i can determine who i am is to send an additional XHR when the page loads since my whole site is static html. [02:27] JimBastard: i guess its either do the additional XHR or implement server-side templating in the client [02:27] sivy has joined the channel [02:27] unomi: JimBastard, what do you mean 'who you are'? can't you put that in the cookie you get back? [02:29] JimBastard: unomi: hrmmm [02:29] unomi: one of the things I have seen in persevere is the clever use of response header [02:29] JimBastard: unomi: not really, i'd still have to do the additional request [02:29] unomi: so if a valid session is set, there is a response header of : username [02:29] JimBastard: i have a session id [02:29] JimBastard: its just a quirk of doing single page apps [02:30] JimBastard: gotta do an additional XHR on ready [02:30] unomi: Jimbastard, the client asks for a particular page, a session cookie is attached from the client. if the sessionID is valid a username is set / overwritten in the response [02:30] JimBastard: unomi: yes, sessions, i have them [02:30] Tim_Smar1 has joined the channel [02:31] unomi: then I don't understand what you need the additional XHR for? [02:31] JimBastard: you've logged into the site that lists your videos [02:31] JimBastard: got a session and cookie [02:31] JimBastard: reload the page [02:31] JimBastard: gotta show your list of videos [02:31] JimBastard: its a single page app [02:32] jashkenas: Or, don't have the single page be static HTML. [02:32] JimBastard: aye [02:32] jashkenas: Include the bootstrap data in an inline