[00:08] creationix_ has joined the channel [00:09] demolithion has joined the channel [00:17] isaacs has joined the channel [00:25] bpot has joined the channel [00:28] mattly has joined the channel [00:48] eriklarson has joined the channel [00:56] bmizerany has joined the channel [01:00] creationix has joined the channel [01:13] fizx has joined the channel [01:22] MattJ: pkrumins: Yay, Speeqe crashed it seems :) [01:39] Aria has joined the channel [01:45] kenneth_reitz has joined the channel [01:59] pkrumins: test [02:02] kenneth_reitz: test [02:02] icey: test [02:08] cloudhead has joined the channel [02:24] fizx has joined the channel [02:25] maushu has joined the channel [02:27] fizx has left the channel [02:31] softdrink has joined the channel [02:32] creationix has joined the channel [02:47] ditesh|cassini has joined the channel [03:03] aho has joined the channel [03:05] nsm has joined the channel [03:06] kenneth_reitz has joined the channel [03:09] noonat has joined the channel [03:22] softdrink has joined the channel [03:27] isaacs has joined the channel [03:29] JimBastard_ has joined the channel [03:29] JimBastard_: caus there aint no party like a javascript party [03:32] KungFuHamster: heh [03:32] KungFuHamster: my lady and I are playing everquest and drinking vodka [03:33] PyroPete1 has joined the channel [03:36] JimBastard_: im preparing slides for tommorow [03:52] JimBastard_ has joined the channel [03:57] icey: JimBastard_: how many people would you say are at jsconf this year? [03:57] JimBastard_: i dunno [03:57] JimBastard_: ive been a bit too drunk to count that high [03:58] icey: lol [03:58] JimBastard_: i know it sold out early [03:58] JimBastard_: i think at least 100 people [03:58] JimBastard_: maybe 200? i dunno [03:58] icey: wow [03:58] icey: way more than i thought would have been there [03:58] JimBastard_: yeah its been a fun time [03:59] JimBastard_: met lots of great people [03:59] JimBastard_: doing my slides now [03:59] JimBastard_: not really sure how to format my talk [04:05] KungFuHamster: pig latin [04:06] noonat has joined the channel [04:06] KungFuHamster: NTFS? [04:09] sudoer has joined the channel [04:14] micheil has joined the channel [04:17] JimBastard__ has joined the channel [04:17] quirkey has joined the channel [04:17] JimBastard__: sup quirkey [04:27] bpot has joined the channel [04:48] charlesjolley has joined the channel [04:49] mattly: is there any way to require a file outside the current directory's tree without adding it to the require.paths ? [04:50] mattly: like, __dirname is "/foo" and i want to require a file in "/bar" [04:50] mattly: doing "require './../bar'" doesn't seem to work [05:01] fictorial: is there any sort of maximum string length in node/v8? [05:02] fictorial: I have a weird issue with the redis client and I'm trying to determine who is at fault, node, v8, or redis [05:03] joshbuddy has joined the channel [05:03] joshbuddy has joined the channel [05:05] fictorial: one of the tests reads its own code to test large SETs and GETs in redis. [05:05] sudoer has joined the channel [05:06] fictorial: it's failing when the code read contains these characters: ö日本語 [05:06] fictorial: which is part of a test of SETting and GETting UTF-8 encoded data [05:06] fictorial: hmm, is that not UTF-8 encoded as \u00F6\u65E5\u672C\u8A9E ? [05:21] JimBastard_ has joined the channel [05:53] tlrobinson_ has joined the channel [06:03] micheil_mbp has joined the channel [06:14] dobe has joined the channel [06:32] JimBastard_ has joined the channel [06:35] rictic has joined the channel [06:42] gJ|Alex has joined the channel [06:47] gwoo has joined the channel [07:01] mikeal has joined the channel [07:02] phazm has joined the channel [07:06] phazm: I've just recently (read: today) learned about node.js, and I'm curious if it is the solution I've been looking for. I am building a site that has a serverside counter -- the counter can be modified at any time, so the front-end currently sends an ajax request every second to update the date from the server. For an online example, check out the timers on http://bidsauce.com/ -- the same... [07:06] phazm: ...method is employed there, just ajax requests every second. Could node.js be somehow utilized to make this more efficient, such as only updating when a change is needed, rather than an arbitrary interval [07:08] eriklarson has joined the channel [07:14] micheil: phazm: look up WebSockets. their a HTML5 thing, and I'm currently building a WebSocket server in node [07:15] inimino: look up "Comet" [07:17] sh1mmer has joined the channel [07:21] phazm: thank you both, I will take a look into them [07:23] dgathright has joined the channel [07:23] dgathright has joined the channel [07:28] botanicus has joined the channel [07:40] micheil: WebSockets > Comet [07:43] dekroning has joined the channel [07:46] micheil: inimino: what's the prefered way to do a mixin (between two objects) these days? [07:54] KungFuHamster_ has joined the channel [07:55] nefariousD has joined the channel [07:55] darkf_ has joined the channel [07:56] tekky has joined the channel [08:28] hellp has joined the channel [08:35] mape: fetching the Object.keys(obj) and for looping though them? [08:35] mape: and merging that [08:37] micheil: hmm.. [08:37] ewdafa has joined the channel [08:41] psynaptic has joined the channel [08:42] mape: micheil: How is the progress on the WebSocket server? :) [08:42] micheil: that's why I need the mixin [08:43] mape: what doesn't work with for(key in defaults){if(!options[key]) options[key] = defaults[key];} ? [08:45] micheil: I just couldn't think of how to do it. [08:45] micheil: (I ended up flogging the mixin from tim's proto) [08:46] mape: k, think they use the Object.keys(obj) in Node.js source [08:46] micheil: yeah [08:47] micheil: there's no mixin in node's core now [08:53] rnewson has joined the channel [08:53] rnewson has joined the channel [08:58] javajunky has joined the channel [08:58] N` has joined the channel [09:07] nsm has joined the channel [09:09] micheil: mape: finally making some progress. [09:09] mape: Nice :) [09:15] javajunky: ARGGH TWITTER OAUTH IS MAKING ME ILL [09:22] javajunky has joined the channel [09:23] mape: Isn't it more or less click and play? [09:23] micheil: not to self: never pass in a direct reference to the buffer into a variable when working with ondata() [09:23] micheil: ends up having a bit of a heart-attack [09:24] micheil: mape: now with the key3 token for the connection, I'm using just a slice of a buffer, so I don't introduce any encoding errors [09:30] javajunky: mape: yes it should be, but I appear to be completely stupid, there will be some tiny whitespace error somewhere screwing my signature, but I'm damned if I can find it ;) [09:31] mape: hehe [09:34] felixge has joined the channel [09:34] felixge has joined the channel [09:37] javajunky: 4 hours of my life … turns out I rpobably shouldn't have base64 encoded an already base64 string (such a fool) [09:37] rnewson has joined the channel [09:37] rnewson has joined the channel [09:37] javajunky: sleep is ace! [09:38] mape: :D [09:43] ahc has joined the channel [09:44] ayo has joined the channel [09:48] nsm has joined the channel [10:31] psynaptic has joined the channel [10:48] javajunky has joined the channel [10:50] maritz has joined the channel [10:50] xla has joined the channel [10:57] tisba has joined the channel [11:18] pdelgallego has joined the channel [11:23] demolithion has joined the channel [11:37] jed_ has joined the channel [11:41] herbySk has joined the channel [11:56] riottaba has joined the channel [11:57] derbumi has joined the channel [12:09] lifo has joined the channel [12:18] demolith1on has joined the channel [12:19] felixge_ has joined the channel [12:23] sveisvei has joined the channel [12:25] charlesjolley has joined the channel [13:32] javajunky has joined the channel [13:37] hsuh has joined the channel [13:46] tlrobinson_ has joined the channel [13:55] hellp has joined the channel [13:57] alex-desktop has joined the channel [14:00] sh1mmer has joined the channel [14:18] charlesjolley has joined the channel [14:18] charlesjolley_ has joined the channel [14:18] devongovett has joined the channel [14:19] nsm has joined the channel [14:19] devongovett: Hello! I just updated to the latest release of node and got the following error upon running my code: Error: Cannot find module 'multipart'. Has the multipart module been removed or renamed? I cannot find reference to it in the API docs. [14:20] mape: Yes it has been moved out [14:20] devongovett: where to? [14:20] mape: http://github.com/isaacs/multipart-js [14:21] devongovett: Oh. It says pre-pre-alpha there. Why was it removed? [14:21] mape: That I'm not sure of [14:23] devongovett: hmm. maybe I can find the old version from 0.1.31 and copy that. [14:24] devongovett: http://github.com/ry/node/raw/v0.1.33/lib/multipart.js [14:31] sh1mmer has joined the channel [14:39] charlesjolley has joined the channel [14:50] javajunky has joined the channel [15:01] caolanm has joined the channel [15:04] caolanm: is there a list of backwards incompatible changes between node v0.1.90 and v0.1.91? I'm getting some tests failing after upgrading... [15:06] micheil has joined the channel [15:06] caolanm: The post on Node v0.1.91 on the mailing list doesn't seem to list anything that should require code changes :\ [15:06] micheil: caolanm: what's the error say? [15:07] devongovett: downgrading to v0.1.33 because there are too many problems with the latest version. Node.js really needs some API stability. [15:07] caolanm: micheil: sorry, its not very informative... just callbacks not firing [15:07] micheil: using? [15:07] caolanm: but they work fine under v0.1.90! [15:07] micheil: what were the callbacks using? [15:08] micheil: is the code on github? [15:08] caolanm: yes [15:08] caolanm: one sec [15:08] micheil: link? [15:08] micheil: devongovett: feel free to ask for help [15:08] devongovett: micheil: thanks! [15:08] micheil: devongovett: as far as I know, 1.90/1.91 is where node is heading towards [15:08] caolanm: ironically, its a testing lib ;) http://github.com/caolan/nodeunit [15:08] micheil: if you have code samples, then link them [15:09] caolanm: the tests just use the assert module [15:09] devongovett: micheil: I realize that, but I don't have time right now to refactor my code so much after each release. Just sticking with the previous version until I have the time. :-) [15:10] micheil: devongovett: well, yeah, the API is stablising pretty quickly afaik. [15:10] micheil: _ry may have more on that [15:10] micheil: caolanm: which callbacks are not firing? [15:11] devongovett: micheil: I've having problems with HTTP headers not being send correctly when I gzip my responses - something that I didn't have a problem with in previous releases. [15:11] micheil: hmm.. sounds odd devongovett [15:12] caolanm: micheil: http://github.com/caolan/nodeunit/blob/master/test/test-runmodule.js ...see line 80 [15:12] sh1mmer has joined the channel [15:13] caolanm: micheil: it only logs up until 'test2' [15:13] caolanm: (and a much longer timeout makes no difference) [15:13] caolanm: also, if you can think of a nicer way to write that test, please let me know! ;) [15:14] rnewson has joined the channel [15:14] caolanm: this is likely going to be a bit difficult for you to debug without knowing the src a bit... :( [15:15] caolanm: the only thing it does make quite a bit of use of is nextTick [15:15] caolanm: which I see had some updates for 0.1.91 [15:16] tlrobinson_ has joined the channel [15:18] micheil: I can't see why it wouldn't work [15:18] devongovett: The problem I've having with the latest release is that when I gzip my responses, they are downloaded rather than being displayed in the browser. [15:18] dobe has joined the channel [15:18] devongovett: This didn't happen before. [15:18] micheil: send a content-type header devongovett [15:18] micheil: caolanm: Upgrade V8 to 2.2.3.1 could be it [15:19] devongovett: micheil: did that. text/html [15:19] micheil: hmm.. [15:20] caolanm: micheil: I'm just running with the v8 included in the download from nodejs.org which should already be 2.2.3.1 right? [15:20] inimino: devongovett: and a transfer-encoding? [15:20] micheil: yeah, in the 0.1.91 build that is the version [15:20] micheil: hey inimino [15:20] devongovett: inimino: Content-Encoding [15:21] inimino: hey micheil [15:21] devongovett: inimino: I added content-encoding: gzip, but not transfer encoding [15:21] inimino: hm [15:21] micheil: devongovett: "content-coding" is also listed [15:21] piranha has joined the channel [15:22] devongovett: Transfer-Encoding: chunked is automatically being added I think [15:22] devongovett: however the headers shown by curl are very weird. [15:22] devongovett: s: e [15:22] devongovett: t: e [15:22] devongovett: Connection: keep-alive [15:22] devongovett: Transfer-Encoding: chunked [15:23] devongovett: only getting the first letter of the key and values that I give it [15:23] micheil: hmm.. [15:23] caolanm: micheil: strangely, the module seems to work just fine... despite the tests failing :\ it could well be the tests themselves which are broken. [15:23] micheil: devongovett: paste your code [15:23] micheil: caolanm: that's what I'm thinking [15:24] devongovett: micheil: its kind of long. gist maybe. [15:24] micheil: I always thought deepEqual was for things like objects [15:24] technoweenie has joined the channel [15:24] inimino: devongovett: oh, that's an issue I've seen before [15:24] caolanm: micheil: but an array is really just an object right? ;) [15:24] micheil: caolanm: try replacing line 80 with: for(...){} [15:24] micheil: caolanm: not really [15:25] micheil: eg, assert.equal(call_order[0], "testStart") [15:25] CodeOfficer has joined the channel [15:25] caolanm: ok, I'll try that [15:25] micheil: see if that passes. [15:25] devongovett: inimino: really? [15:26] inimino: devongovett: yes, I don't remember why, but it had something to do with headers being given as an array [15:26] inimino: which the code also allows [15:26] micheil: here's why it's failing caolanm: [15:26] caolanm: :o [15:26] micheil: line 141: lib/assert.js: } else if (typeof actual != 'object' && typeof expected != 'object') { [15:27] devongovett: inimino: I was using an associative array, but I changed it to a hash. Still not working. [15:27] micheil: typeof actual == "array" [15:27] caolanm: node> typeof [] [15:27] caolanm: 'object' [15:27] caolanm: using node-repl [15:27] micheil: :/ [15:28] devongovett: inimino: got it to work. I found another place where it had been set to an array. That is a very weird bug. Is there a bug report for that? [15:28] micheil: caolanm: well, yeah, deepEqual I'm sure is for objects, not arrays [15:28] inimino: devongovett: I don't think it's considered a bug, because some people use the array-setting functionality... [15:28] inimino: devongovett: but you can post your code on the mailing list and see if someone has an idea about how to give better error messages [15:29] caolanm: micheil: ok, I've replaced it with seperate tests for each member of the array, still fails :( [15:29] inimino: caolanm: what's the code that fails? [15:29] micheil: devongovett: I never saw you post a link to your code.. [15:29] micheil: http://github.com/caolan/nodeunit/blob/master/test/test-runmodule.js#ln80 [15:29] micheil: inimino: [15:29] micheil: ^^ [15:30] devongovett: micheil: I didn't. There is too much and it isn't organized in a way that I can easily post it while making sense to everyone besides me. :-) I will probably write a separate test and post it to the mailing list at some point. [15:30] micheil: devongovett: we're normally pretty good at deciphering code [15:31] inimino: caolanm: what if you sys.p(call_order) [15:31] devongovett: micheil: yeah, the problem is that it is split into many different files and I would need to post everything. [15:32] micheil: devongovett: cd DIR && git init && git add . && git remote add git@github.com:USER/REPO.git && git commit . -m "add" && git push --all [15:32] caolanm: inimino: http://pastebin.com/XCrCh5Wt [15:32] devongovett: micheil: fun! [15:33] caolanm: dang, you have no idea how long I've been doing sys.puts(sys.inspect(x))! [15:33] micheil: caolanm: sys.log is call too [15:33] caolanm: whoa! [15:33] devongovett: Anyone know why the multipart module was removed? [15:33] caolanm: when did all that arrive? hehe [15:33] inimino: caolanm: so most of one of the tests didn't finish running... deepEqual is doing its job [15:34] caolanm: yeah, I don't think its deepEqual [15:34] caolanm: :) [15:34] micheil: devongovett: unmanagable [15:34] inimino: devongovett: it was "unmaintainable" as per the commit message [15:34] caolanm: inimino: but the strange thing is that this code works fine on v0.1.90 [15:34] micheil: hmm.. [15:35] inimino: since when is there a 0.1.91 btw [15:35] micheil: caolanm: well, the 0.1.91 changelog did say speed improvements to nextTick [15:35] caolanm: yeah, thats the one that I'm suspicious of [15:35] devongovett: micheil: oh. For now I just copied the multipart module from v0.1.33. Maybe something better will be released sometime. [15:35] caolanm: but I have not a jot of evidence [15:35] inimino: hm [15:35] caolanm: hehe [15:35] inimino: is 0.1.91 tagged in git? [15:35] caolanm: inimino: groups.google.com/group/nodejs/browse_thread/thread/1ef862a02ed95c83 [15:36] micheil: devongovett: issacs released something better [15:36] micheil: caolanm: try putting the call_order.push calls above the asserts [15:36] devongovett: micheil: it says that it is pre-pre-alpha so that doesn't make me very trusting :-) [15:36] eriklarson has joined the channel [15:36] micheil: devongovett: afaik, it works though [15:37] caolanm: micheil: sorry, same result [15:37] micheil: hmm.. [15:38] caolanm: would someone mind cloning it and running ./test.js ? [15:38] micheil: sure [15:40] caolanm: micheil: thanks :) [15:40] micheil: hmm.. [15:42] charlesjolley has joined the channel [15:42] micheil: caolanm: wtf? AssertionError: ["test7","log","testDone"] deepEqual ["test7"] [15:44] inimino: maybe something to do with http://github.com/caolan/nodeunit/blob/master/lib/nodeunit.js#L45 [15:49] kenneth_reitz has joined the channel [15:49] caolanm has joined the channel [15:50] caolanm: argh, network problems for a bit there! [15:50] caolanm: micheil: did you get anywhere with running the tests? [15:50] micheil: nope, just made more fail [15:51] caolanm: same fail or new fail? [15:51] caolanm: :) [15:52] dgathright has joined the channel [15:53] micheil: new one :P [15:53] caolanm: not what I wanted to hear, haha [15:57] maushu has joined the channel [16:03] tlrobinson_ has joined the channel [16:04] dgathright has joined the channel [16:06] malkomalko has joined the channel [16:07] micheil: caolanm: this is really weird [16:07] dnolen has joined the channel [16:07] JimBastard_ has joined the channel [16:10] _ry: caolanm: there weren't any api changes [16:10] _ry: between 0.1.90 and 0.1.91 [16:10] caolanm: _ry: yeah, thats what I thought [16:11] caolanm: which is why its so odd [16:11] _ry: i guess you're hitting some bug [16:11] _ry: caolanm: are you at jsconf? [16:11] bajeczka has joined the channel [16:11] caolanm: agh, I wish! way to rub it in :p [16:11] _ry: was going to say i could look at it live :) [16:13] caolanm: thanks for the offer :) [16:17] nsm has joined the channel [16:18] JimBastard_: hee hee [16:18] JimBastard_: hook.io talk in a few hours [16:18] JimBastard_: slide deck is still in bad shape [16:21] lifo has joined the channel [16:23] micheil: caolanm: found a possible source of error./. [16:24] micheil: obj.error == undefined [16:25] dgathright has joined the channel [16:28] brapse has joined the channel [16:29] micheil: caolanm: actually. I have no idea [16:30] herbySk has joined the channel [16:33] siculars has joined the channel [16:35] JimBastard_ has joined the channel [16:37] micheil: caolanm: all that changed in assert between 0.1.91 and 0.1.90 was a bit of whitespace [16:38] caolanm: hmm [16:44] javajunky has joined the channel [16:46] micheil: are you using process.mixin? [16:46] sudoer has joined the channel [16:47] micheil: http://github.com/ry/node/commit/4e7e2f872421e9c89538807ce191cd86e40341ab [16:47] micheil: actually. yeah that [16:48] caolanm: micheil: I'm not using process.mixin so far as I know [16:48] caolanm: you think it might be related to these nextTick changes? [16:48] micheil: why not? [16:51] caolanm: sounds plausible [16:52] tlrobinson_ has joined the channel [16:58] Yuffster has joined the channel [17:02] derbumi has joined the channel [17:05] gwoo has joined the channel [17:07] mattkanwisher has joined the channel [17:13] RayMorgan has joined the channel [17:17] tlrobinson_ has joined the channel [17:21] _ry: caolanm: possible [17:21] _ry: caolanm: can you make a test cse [17:23] derbumi has joined the channel [17:24] caolanm: _ry: I won't be able to until tomorrow now, but I'll see what I can do [17:25] piranha_ has joined the channel [17:27] technoweenie has joined the channel [17:30] riottaba has joined the channel [17:30] JimBastard_ has joined the channel [17:32] caolanm: bye all, have fun at jsconf :) [17:36] FSX has joined the channel [17:37] teemow has joined the channel [17:37] rnewson has joined the channel [17:49] rnewson has left the channel [17:50] charlesjolley has joined the channel [17:51] herbySk: _ry: got the fix? [17:56] _ry: herbySk: yeah - i ahven had a chance to look at it [17:56] _ry: (at jsconf) [17:56] _ry: but yes, got it [17:59] herbySk: ok [18:01] kixxauth has joined the channel [18:07] tlrobinson_ has joined the channel [18:10] RayMorgan has joined the channel [18:20] noonat has joined the channel [18:21] piranha has joined the channel [18:27] mikeal has joined the channel [18:27] derbumi has joined the channel [18:30] mape: SeedJs? :) [18:32] twomashi has joined the channel [18:34] twomashi: Hi, im trying to implement http-parser in a python module, can anyone answer a few questions? [18:34] teemow has joined the channel [18:34] twomashi: for example im not sure if you can have multiple parsers concurrently or just one [18:38] cedric__ has joined the channel [18:38] _ry: twomashi: okay [18:39] _ry: twomashi: i think there is a python binding to the http-parser already [18:39] _ry: twomashi: http://github.com/davisp/pyhttpc [18:40] twomashi: oh. Lovely. [18:40] twomashi: thanks [18:43] mape: So fab.js seems to be pretty much node.js but geared towards webish? [18:45] _ry: it has a really cool way of doing mini-middleware [18:45] _ry: i didn't get it until i saw jed's talk [18:46] mape: django like? [18:46] maritz has joined the channel [18:47] _ry: eh,no.. [18:49] softdrink has joined the channel [18:53] Aria has joined the channel [18:53] technoweenie has joined the channel [18:54] technowe_ has joined the channel [18:55] jbrantly: _ry: taking a quick look at the examples, and without having seen the talk, I assume "mini" is enforced? It looks like it gets unwieldy with larger stuff [18:55] _ry: jbrantly: not sure [18:55] _ry: might be cool? [18:57] _ry: pretty cute syntax though [18:58] JimBastard_ has joined the channel [18:59] felixge has joined the channel [19:00] mape: Are there any slides for fab up? [19:02] micheil: last I looked, fab was still confusing as ever, I can see it's chained, and then it can accept regexps, but nothing about it otherwise [19:02] cruxst has joined the channel [19:02] mape: http://wiki.github.com/jed/fab/fab-app-specification [19:02] mape: makes a little more sence [19:03] micheil: hmm.. [19:03] gwoo has joined the channel [19:04] mape: but yeah, a larger example would be nice, that actually does something [19:04] micheil: I can kill too much time looking at ffffound [19:04] micheil: +one f in there [19:05] micheil: or not [19:11] tlrobinson_ has joined the channel [19:12] mape: micheil: http://github.com/tlrobinson/fab [19:13] bpot has joined the channel [19:15] aho has joined the channel [19:17] _ry: you have to see the talk [19:17] mape: Yeah, thats the problem.. [19:17] CIA-77: node: 03Herbert Vojcik 07master * rc2a0672 10/ (9 files in 3 dirs): Script class with eval-function-family in binding('evals') plus tests. - http://bit.ly/aryoH8 [19:18] mape: Feels like it could turn into defacto? [19:19] micheil: not for me I don't think.. way too many ()'s [19:19] mape: hehe [19:19] micheil: night' [19:20] mape: nn [19:25] BinaryPie has joined the channel [19:29] herbySk: _ry: Thanx. What about docs? Should I somehow provide it? [19:31] herbySk: _ry: And, since the evalcx replacement was accepted (I did it in separate commit cause I was not sure), then EvalCX function can be removed from node.cc (eventually, later, ...) [19:37] tlrobinson_ has joined the channel [19:39] tlrobinson_: mape: that fork is really old [19:40] tlrobinson_: i should probably update it [19:40] mape: tlrobinson_: Has some info though [19:40] mape: But I guess the info is off as well then? [19:42] cruxst has joined the channel [19:42] JimBastard_ has joined the channel [19:42] JimBastard_: hey guys im about to start my jsconf talk [19:42] mape: Good luck! :) [19:43] JimBastard_: this window will be on the screen [19:43] JimBastard_: so feel free to curse and say bad things [19:43] _ry: JimBastard_: you shouldn't be on irc [19:43] mape: Hehe k [19:43] _ry: :) [19:43] _ry: JimBastard_: good luck [19:43] Aria: Hm. How synchronous can I rely on events I emit being? [19:43] JimBastard_: thanks _ry [19:43] MattJ has joined the channel [19:43] _ry: Aria: what do you mean [19:44] CIA-77: node: 03Ryan Dahl 07master * r4ff45c2 10/ src/node.cc : Remove old EvalCX - http://bit.ly/bgD6ZE [19:44] _ry: herbySk: ---^ [19:45] Aria: I'm emitting tokens into a parser, some of the actions take nonzero time. I'm getting something coming up in the wrong order, and wondering if it could be one handler returning before an earlier one. [19:45] MattJ: Why did Node switch from GnuTLS to OpenSSL? Purely license reasons? [19:45] _ry: MattJ: for ease of install [19:46] rnewson has joined the channel [19:46] MattJ: Mmm, ok :) [19:46] Aria: Ease of install? Did nobody notice how unstable the ABI for OpenSSL is?! [19:47] herbySk: _ry: ok... where should I put the docs (I mean, where in doc file)? I can't find any doc for bindings, only for modules... aftre process under category "process.binding('evals')"? [19:47] _ry: Aria: no [19:47] _ry: Aria: i mean - as long as the api is stable.. [19:47] Aria: ... and you don't mind recompiling node when you upgrade OpenSSL.. [19:48] _ry: anyway - more people have it [19:48] Aria: OpenSSL upgrades trigger nearly 1/3 of the linux distro I use to rebuild. [19:48] Aria: Aah. [19:48] _ry: it's also a bit more trusted [19:48] Aria: I'd have used nss. [19:48] MattJ: I was just curious as to whether there were technical reasons for the switch [19:48] MattJ: I'm having memory usage issues with OpenSSL, and was considering trying out GnuTLS (not related to Node) [19:49] TobiasFar has joined the channel [19:50] _ry: herbySk: stat a new section [19:51] _ry: MattJ: with the new net2 branch merged the ssl stuff had to be redone completely [19:52] _ry: and i've noticed, like, node-crypto using openssl and i know it's more commonly found [19:52] _ry: plus the license issue (which admittedly is very minor) [19:52] MattJ: Yeah [19:53] _ry: plus openssl is heavily tested [19:53] ewdafa: openssl is a good move [19:53] _ry: whereas gnutls - well - i don't know [19:53] _ry: it's hitting 1.0 soon (already?) [19:54] Aria: Already. [19:54] Aria: But we'll see how much that means. [19:54] Aria: ("already" as in "ten years later") [19:54] _ry: but i don't want to be the odd man out [19:54] _ry: everyone else uses openssl [19:54] _ry: there isn't much reason to use gnutls... [19:54] MattJ: I think that's the main reason everyone uses OpenSSL :) [19:54] Aria: Hehe. That's rapidly changing, since people get so frustrated with OpenSSL's ABI changing [19:55] Aria: And its own craziness with licensing too. [19:55] _ry: yeah but it's understood [19:55] _ry: or at least tolerated [19:55] Aria: Yeah, somewhat. [19:57] Aria: (Heh, guess you're right . . . with the set I have installed on my server, 1 requires gnutls, 3 require nss, and 20 require openssl) [19:59] Aria: (and nss and Javascript have already mated more than once.) [19:59] _ry: i do like the gnutls api better than openssl [19:59] Aria: Yeah. It's a lot nicer. [20:01] Aria: And NSS falls somewhere in the middle. [20:01] Aria: (and has a GPL-compatible but not GPL license) [20:09] jbrantly: everybody is silent over in #github, and you guys seems like github gurus :) would it be against the ToS to create a site which upon a users request (or web hook) would pull recent commits from GitHub for further processing? [20:13] ewdafa: i think the nodejs and openssl license look fairly compatible [20:15] Aria: Yeah, I'm sure they are. GPL's the sticking point, with its "no more restrictions" restriction [20:15] ewdafa: indeed [20:15] Aria: (advertising clause in OpenSSL is an additional restriction) [20:15] ewdafa: yeh that's what i figured [20:15] Aria: Just like 3-clause BSD [20:18] maushu has joined the channel [20:19] JimBastard_ has joined the channel [20:20] JimBastard_: successful presentation is mildy successful [20:20] JimBastard_: at least it wasnt complete fail [20:20] rolfb has joined the channel [20:20] _ry: JimBastard_: it was good but needed more demos [20:20] _ry: people love demos [20:21] ewdafa: and benchmarks [20:21] JimBastard_: yeah i mean, its just not ready [20:21] JimBastard_: i think another two months or so [20:21] _ry: demos and benchmarks [20:21] JimBastard_: and it will be kicking ass [20:21] _ry: true [20:21] mape: what was it about? [20:21] JimBastard_: hook.io [20:21] mape: ah [20:21] JimBastard_: i didnt think id be presenting, im suppose to be in NYC righ tnow [20:22] maushu: link to presentation? [20:22] Connorhd: is there a reason the site is offline atm? [20:22] Connorhd: well, the site is up, the api is offline [20:23] maushu: The api is sleeping. [20:23] rictic has joined the channel [20:23] JimBastard_: yeah it got killed [20:24] maushu: JimBastard_, your interface needs rethinking. [20:25] maushu: I recommend a visual programming language like. [20:26] cruxst has joined the channel [20:26] teemow has joined the channel [20:26] jbrantly: JimBastard_: what are you planning on using for the database? I see right now node-persistence/memory, but I assume thats temporary? [20:27] maushu: Doesn't need to be temporary. Using Memory NoSQL is pretty decent. [20:28] JimBastard_: hi sorry [20:28] JimBastard_: jbrantly: perstore or node-dirty or both [20:28] JimBastard_: in memory / json datastore by default [20:28] JimBastard_: then we'll have wrappers for all the big players [20:28] JimBastard_: maushu: the front-end is a joke [20:29] JimBastard_: maushu: hook.io front-ends are decoupled [20:29] maushu: Btw, your server sent error 502.5 Evil Gateway [20:29] maushu: You might have the sauron virus. [20:29] JimBastard_: ? [20:29] JimBastard_: lolwut [20:30] maushu: Yeah, I know. My jokes are geeky. [20:34] JimBastard_: Connorhd: the site probably got accidentialied during the presentation. [20:34] JimBastard_: its not really a stable version yet [20:34] ewdafa: hehe [20:37] mape: http://www.flickr.com/photos/tr4nslator/sets/72157623883700702 [20:37] mape: fab slides [20:37] mape: non handy though :S [20:39] mape: http://www.flickr.com/photos/tr4nslator/4531794283/in/set-72157623883700702/ <3 [20:43] RayMorgan has joined the channel [20:46] cruxst has joined the channel [20:47] bmizerany has joined the channel [20:51] Aria: Augh. This does look like a race condition. Ew. [20:52] Aria: I'm emitting start tag, start tag, insert data. It's executing in the order start tag, insert data, start tag. [20:53] Yuffster has joined the channel [20:55] cruxst has joined the channel [20:56] tlrobinson_ has joined the channel [20:58] okito has joined the channel [20:59] Aria: Hm. Are there any synchronization primitives in Node? [21:03] cruxst has joined the channel [21:05] javajunky: aria: um no, not really, they're kinda not needed really ? .. is this on app startup ? ... [21:06] Aria: Not exactly on startup. [21:06] Aria: I'm writing an event-driven HTML5 parser. My token stream is emitted in order, but the parsing seems to be happening in a different order. [21:07] javajunky: Hmm, I've no idea if there are guarantees on event emitter's being listened to in the order they were emitted … beyond my knowledge, sorry :( [21:07] Aria: Aw. [21:07] javajunky: I guess I'd expect that to be the case though [21:07] Aria: Yeah, there's a whole class of problems you can't solve if not. [21:08] javajunky: wwell there's been plenty of parsers written (not to mention the built in http parsers etc.) so I imagine its a bug in your code (but you may well be right :) ) [21:08] herbySk: IT should be the case, the events are not stored anywhere, emit("event") immediately fires the listener (afai understood the node_script.cc) [21:09] herbySk: ee, sorry, node_events.cc [21:09] Aria: Yeah. But is it fired synchronously? [21:09] Aria: Immediately, sure, but various parts of my code take very different amounts of time. [21:10] herbySk: yes... problem may occur if the listener itself do something async and thing begin to be ... well, let's say interesting. [21:10] Aria: Notably, the HTML5 formatting reparenting algorithm is non-trivial, and it's that call and the (very simple) next call that are reversed for me. [21:10] Aria: Mmm, the listener's not doing anything async. [21:11] Aria: This could well be a bug in my code, but I'm trying to find a reliable way to determine that. [21:12] javajunky: if something is executing in the event-loop (i.e. the listen doesn't perform a setTimeout/nextTick) then nothing else should happen in the intervening period… it should be ok I would think ? [21:12] Aria: Aright. I'd never run into any documentation that stated either way. [21:12] herbySk: What I see from node_events.cc, emit immediately looks up the listeners of the event and calls them in order stored. [21:13] herbySk: So I really don't know what can be a problem here. [21:13] Aria: Heh, alright [21:13] Aria: ACTION digs into node_event.cc to see for herself. [21:14] Aria: Hm. Yeah. No threading there. [21:14] Aria: Looks pretty synchronous. [21:15] Aria: Guess it's my bug, and back to figuring out why. [21:15] javajunky: just fwiw the *whole* point of node.js/server side js is that there aren't any threads involved, which removes the need for sync. primitives [21:15] Aria: ACTION nods. I wasn't sure if it was loop-based or if it was just hiding threads.  [21:16] Aria: The docs don't actually say. [21:16] javajunky: …but as pointed out earlier if you do something 'async' in one of the emitted events then I guess there's no reason why it couldn't 'complete' *after* another event had been emitted/completed [21:16] Aria: Yeah. [21:16] Aria: That I'd expect. [21:16] noonat has joined the channel [21:18] darkf has joined the channel [21:19] okito has joined the channel [21:22] CIA-77: node: 03Carl Jackson 07master * r966a2c5 10/ src/node_crypto.cc : Some type signatures were changed in OpenSSL 1.0. - http://bit.ly/9IB7jN [21:22] CIA-77: node: 03Herbert Vojčík 07master * recd449f 10/ doc/api.markdown : Docs for Script class of 'evals' binding. - http://bit.ly/94NSnZ [21:22] _ry: fuck [21:23] CIA-77: node: 03Herbert Vojčík 07master * r8daa1f8 10/ doc/api.markdown : Docs for Script class of 'evals' binding. - http://bit.ly/9FYGac [21:23] _ry: forced push, sorry [21:24] rnewson has joined the channel [21:26] rnewson has left the channel [21:26] CIA-77: node: 03Standa Opichal 07master * rfa514a9 10/ wscript : [21:26] CIA-77: node: Do a manual check for openssl if 'pkg-config openssl' fails. [21:26] CIA-77: node: This makes the node_crypto module available for node built using just a [21:26] CIA-77: node: default OS X dev environment (no darwinports or fink). - http://bit.ly/arstug [21:30] Aria: Oh. Ech. forced push on top of your code? [21:31] bmizerany has joined the channel [21:43] hsuh has left the channel [21:48] riottaba has joined the channel [21:49] isaacs has joined the channel [21:49] javajunky has joined the channel [21:50] keeto has joined the channel [21:50] tlrobinson_ has joined the channel [21:51] Aria: Okay, this is still weird. This is NOT acting synchronous at all. [21:52] Aria: I'm putting debug statements in, and seeing the caller logged after the called functions inside execute. [21:55] Aria: Yargh! [21:55] malkomalko_ has joined the channel [21:56] towski has joined the channel [21:57] marekw2143 has joined the channel [22:03] dobe_ has joined the channel [22:12] keeto has joined the channel [22:15] isaacs: Aria: got a link to the code? [22:16] isaacs: Aria: it could be that you're mixing stdout and stderr, which can cause oddness. [22:16] Aria: http://theinternetco.net/~aredridel/projects/js/nodenetwork/ [22:16] Aria: At this point, all the output is sys.debug [22:17] isaacs: Aria: ok, but where's the bit that's doing the wrong thing? [22:18] isaacs: there's a lot of code here. [22:18] Aria: Yeah, trying to describe. One moment. [22:19] isaacs: okie [22:20] mattly has joined the channel [22:20] Aria: html5/treebuilder.js -- insert_text gets called before html5/in_body_phase.js' startTagCloseP, despite the calling code in html5/parser.js calling it (via a dynamic method lookup in html5/parser/phase.js, in processStartTag) [22:21] Aria: That's part of what makes this hard to debug -- it's a big codebase, thanks to the complexity of the HTML5 parsing spec. [22:23] isaacs: yeah... html's a bear. [22:24] Aria: It's fed by an EventEmitter that emits chunks of data (at the moment, I haven't handled data that breaks in certain places mid buffer), which the tokenizer breaks up into tokens, and emits them. [22:24] isaacs: sorry, this appears to be a bit above what i can jump into atm [22:24] Aria: The parser responds to tokens and alters the state of a dom-like TreeBuilder [22:24] Aria: Hehe, no problem. [22:24] Aria: I'll get it eventually. [22:24] Aria: I'm staring at debug output and getting my head around it. [22:24] isaacs: if you get a reduction that shows the incorrect behavior, i'll be happy to take a look. [22:25] isaacs: i know more or less how nodejs works, but this thing is bigger than node ;) [22:25] Aria: ACTION laughs. Yeah. It is. [22:25] isaacs: you're doing the god's work, taking on an html parser. my hat goes off to you, sir. [22:25] Aria: ACTION laughs.  [22:26] isaacs: if i didn't have to work for a living, i'd consider it. [22:26] Aria: This is a port of the Ruby html5 library, and it actually only took 8 or so hours to get this far. [22:26] isaacs: oh, nice [22:27] Aria: And it parses at least trivial documents that excercise a good portion of the spec. [22:28] Aria: Except, it seems, either all or this particular instance, text inside a p tag ends up outside the p, right before the p tag. [22:28] isaacs: hm. [22:28] isaacs: so stuff like

hello? [22:28] Aria: Yeah. [22:28] isaacs: well, that's broken. [22:28] javajunky: ;) [22:28] sveisvei has joined the channel [22:29] Aria: Exactly that:

Hi!

ends up as Hi!

[22:29] Aria: Hehe, indeed it is. [22:29] isaacs: gr. [22:29] lifo has joined the channel [22:29] isaacs: well, good luck tracking that down [22:29] isaacs: is it broken in the ruby version? [22:29] Aria: Hehe, thanks. I'll find it. I always do. [22:29] Aria: No, it's not. [22:29] isaacs: cuz that seems like a pretty serious bug. [22:29] isaacs: oh, ok [22:29] isaacs: herbySk: hey, you around? [22:29] Aria: But it could well be my porting, too, since things like "foo.last" in js are big. [22:29] Aria: foo[foo.length - 1] ... oy. [22:30] herbySk: yes [22:30] javajunky: you could add .last onto the array prototype, but then you'd just feel hatred ;) [22:31] isaacs: herbySk: on my module-refactor branch, i just made some changes that you might approve of. [22:31] javajunky: Aria: You could consider something like http://github.com/visionmedia/ext.js/blob/master/lib/ext/core_ext/array/extensions.js .. that library will give you 'last' 'first' etc. etc. [22:31] isaacs: herbySk: i'd like your feedback if you have any. the thought of you having to rewrite node's whole module loader makes me sad, so i cut it up a bit more, so hopefully you can just change smaller bits of it. [22:31] isaacs: herbySk: http://github.com/isaacs/node/blob/module-refactor/lib/module.js [22:32] javajunky: ..but messing with core prototypes is generally considered to be un-cool… [22:32] herbySk: fine... i will have a look [22:33] herbySk: (sorry for not putting the name: at the beginning, I'm using IRC for a first few days yet) [22:33] isaacs: herbySk: it's no problem. i only use the name: syntax when there's a lot of conversations going on. [22:33] isaacs: Aria, javajunky: This would be safe and unobtrusive: Object.defineProperty(Array.prototype, "last", { get : function () { return this[ this.length - 1 ] }}) [22:34] isaacs: Aria: you could also maybe have it be a setter, something like this: { set : function (x) { this[this.length - 1] = x } } [22:35] herbySk: isaacs: when I tried defineProperty with get only, it ended with error that it needs set [22:35] javajunky: isaacs: yeah I've still not get my head around ES5 stuff (which I *assume* that is related to) ..all the 'enumerable, read write ' properties etc.) [22:35] isaacs: herbySk: must've been a bug. works for me. [22:35] isaacs: node> Object.defineProperty(o, "foo", { get : function () { return "bar" } }) [22:35] isaacs: {} [22:35] isaacs: node> o.foo [22:35] isaacs: 'bar' [22:36] herbySk: ok then [22:36] isaacs: javajunky: it's simpler than the spec makes it seem [22:36] isaacs: the tricky bit is that it can be EITHER a getter/setter, OR a value, but not both. [22:36] isaacs: so if you do { get : ..., value:100 } then it'll throw [22:37] javajunky: isacs: actually I think thats what that code is doing, just using the short-hand 'get ' syntax ? [22:37] javajunky: ughh need to read up on this ;) [22:37] isaacs: javajunky: except, i think when you use the syntax it remains enumerable, no? [22:38] isaacs: yeah, it does [22:38] isaacs: adding enumerables to prototypes = bad manners. [22:38] isaacs: herbySk: so, anyway, module.js... [22:38] isaacs: herbySk: i got rid of the if (length === 1) bit that you didn't like. [22:39] isaacs: herbySk: i also added a compilers and loaders hash, so registerExtension will be even easier to put back. [22:39] javajunky: ACTION wanders off to read the spec ;)  [22:39] tav has joined the channel [22:40] javajunky: hmm actually time for sleep nn [22:40] technoweenie has joined the channel [22:43] dgathright has joined the channel [22:44] RayMorgan has joined the channel [22:45] herbySk: isaacs: yeah, i'm looking into it... looks a but heavy to me... this was the way how I planned to do it before, but your design has shown me the more streamlined possibility: only have loaders, which can be "precompilers" as well. [22:46] isaacs: right [22:46] herbySk: isaacs: plus, you f(require) instead of f.call(this, require) - it can't work [22:46] isaacs: herbySk: i'm calling it as a method [22:47] isaacs: oh, derp... [22:47] isaacs: i'm dumb. [22:47] isaacs: nvm [22:47] isaacs: hahaha [22:47] isaacs: it's a method of the compilers hash object, not the module object. [22:48] isaacs: not sure how that was passing make test... [22:48] herbySk: that's what I [22:48] herbySk: 'was talking about [22:48] _ry: JimBastard: ping [22:48] _ry: JimBastard: is there a party tonight? [22:48] isaacs: right. easily fixed, hold on a sec. [22:48] herbySk: I think you should not create special load object, instead make them methods of Module itself [22:48] isaacs: right [22:48] herbySk: by some nameing scheme [22:49] isaacs: the advantage of this system is that all modules ahve easy access to the same loader/compiler set. [22:49] isaacs: via this.loaders[".foo"] or whatever. [22:49] isaacs: so a coffeescript module can add support for coffeescript modules very easily [22:50] herbySk: prototype should solve it well [22:50] _ry: ACTION has a plan with RayMorgan to take over the world [22:50] _ry: using Mu [22:50] herbySk: better _ry than google [22:50] isaacs: herbySk: what do you think about this? [22:50] isaacs: this.loader = this.loaders[ (ext in this.loaders) ? ext : ".js" ]; [22:50] isaacs: this.loader(); [22:50] herbySk: I fear google [22:50] RayMorgan: yes we do! [22:51] herbySk: Of no, issacs, why not normally, why this ugly way? [22:51] isaacs: ACTION is envious of jsconf attendees [22:51] isaacs: herbySk: that's pretty normal. [22:51] herbySk: this.loaders[....].call(this, require) [22:51] herbySk: this is normal [22:52] _ry: isaacs you're missed [22:52] mnutt has joined the channel [22:52] isaacs: _ry: aww, thanks! [22:52] _ry: and palm might be using your sax-js parser [22:52] isaacs: orly? [22:52] herbySk: (if you're goona just callit, not redefine, so what is normal depeneds on what you want to achieve, of course) [22:52] isaacs: herbySk: true that. i guess i'm so used to optimizing for speed, i keep forgetting it doesn't much matter in this case. [22:53] _ry: but they want to switch to something in C cause they have speed/memory concerns [22:53] isaacs: _ry: well, a c port would probably be faster. but enough to matter? i dunno. [22:53] isaacs: _ry: it's unlikely that if you're using sax-js that xml parsing is your bottleneck. [22:54] herbySk: issacs: I think you should read http://www.herby.sk/alanknight.html (original is somewhere on the net) and pay attention to optimization part [22:54] herbySk: grrr, tyop again [22:54] herbySk: and again [22:56] _ry: isaacs: yeah - i don't really get thier concern [22:56] herbySk: optimizing is completely useless in module system (with exception of good caching). Number of modules is finite in an app, and eventually, every one will be in the cache... The speed lost while loading them is negligible. [22:56] isaacs: herbySk: ok, well, since the cost of file reading is about 2 orders of magnitude higher than the cost of function.call vs obj.method, you've convinced me. [22:56] isaacs: herbySk: right, especially since it's a startup-time optimization. [22:56] _ry: RayMorgan: any idea when the party is? [22:57] isaacs: _ry: yeah, i mean, if they're even considering using js for anything, chances are they're doing some stuff that's WAY more expensive than parsing xml with sax-js. like, reading the xml from a file or socket or whatever. [22:57] isaacs: _ry: or starting up the js engine. [22:57] RayMorgan: _ry: I believe it starts at 8 [22:59] RayMorgan: I just want to publicly let everyone know in IRC that I am not a old gray haired guy. :) [22:59] RayMorgan: (btw... nothing wrong with old gray haired guys) [23:00] isaacs: ACTION is old enough to have more than a couple gray hairs [23:00] RayMorgan: everyone here that I have met in person thought I was an old guy [23:01] isaacs: RayMorgan: you're http://github.com/raymorgan, right? [23:01] RayMorgan: yeah [23:01] isaacs: RayMorgan: from your picture, i figured you for about 14 or so. [23:01] isaacs: :P [23:01] RayMorgan: haha [23:01] RayMorgan: nice [23:01] dnolen has joined the channel [23:01] RayMorgan: Actually I think I was 17 when I took that... so not too far off [23:03] RayMorgan: that was years ago though.. btw, my actual github account is: http://github.com/raymorgan [23:03] RayMorgan: http://github.com/raymorgan [23:03] RayMorgan: wtf [23:03] RayMorgan: http://github.com/raymorgan [23:03] RayMorgan: .... [23:03] RayMorgan: irc client fail [23:03] RayMorgan: it is raycmorgan [23:06] hassox has joined the channel [23:12] isaacs: RayMorgan: right, right. [23:12] isaacs: RayMorgan: your'e this guy, though, right? http://twitter.com/account/profile_image/raycmorgan?hreflang=en [23:13] RayMorgan: yeah [23:13] RayMorgan: that was me like 5 years ago [23:13] RayMorgan: but I look pretty much the same [23:18] tlrobinson_ has joined the channel [23:23] herbySk: isaacsL http://github.com/herby/node/commit/f328c0964d868efc8523a7bec7f81e4e559db61d [23:23] herbySk: s/L/:/ [23:24] isaacs: herbySk: i just pushed the change to add the this-context fixing. [23:24] isaacs: herbySk: i'd rather use a collection of functions than a naming convention. [23:24] herbySk: this make it lighter - no loaders or compilers, and loadPlain is nicely usable by other loaders... [23:24] herbySk: nevertheless, look at the rest, there's more [23:25] isaacs: herbySk: it's no more usable than module.loaders[".js"] [23:25] herbySk: especially breaking compile, since it's very finely usable when there is more to require [23:25] herbySk: (my .sandboxed etc. plus more fancy things like securable modeules and I don't know what) [23:26] isaacs: ok, so you want to split the creation of the require function out? [23:26] herbySk: here when I write new loader, I can reuse polain loaders by calling this.loadPlain [23:26] isaacs: that kinda makes sense. [23:27] isaacs: herbySk: you can still reuse it just as easily if it's in the same collection as all the others. just call the .js loader [23:27] herbySk: there, I would need to this.loaders.js.call(this) [23:27] isaacs: sure, what's wrong with that? [23:27] herbySk: yes, it's a little more awkward, but usable [23:27] isaacs: it's a few more characters, but it's less reliance on naming conventions, and it's an unusual enough edge case that i think the added specificity is probably worth it. [23:28] isaacs: the fewer things that are exposed directly on a module object, the better, since the module object is part of the execution environment that users use. [23:28] herbySk: no, it's not unusual edge, it's the way how to implement extCache-like precompiling without using compilers [23:28] isaacs: putting them all in a collection kinda tidies it up a bit, i think [23:28] isaacs: herbySk: that's the unusual case i'm talking about. [23:29] isaacs: herbySk: splitting out require generation is a good idea, but I'm not sure what you gain that you don't already get from being able to swap out this.require [23:29] herbySk: naming convention is much more extansible.... I can this["load... [23:29] isaacs: since the require function just calls this.require [23:29] herbySk: "] = ... for an instance [23:30] herbySk: but not if it was shared in a collection. [23:30] isaacs: the naming convention is 100% exactly as extensible. they are the same extensibility. [23:30] isaacs: oh, i see... [23:30] isaacs: you want to be able to customize it just for THIS object. [23:30] isaacs: still doable, but trickier. [23:30] isaacs: this.loaders = Object.create(this.loaders); this.loaders[".js"] = somethingNew [23:30] isaacs: works fine. [23:31] herbySk: fine,.... scratching over the head, but works. [23:31] mau has joined the channel [23:31] isaacs: also, couldn't you just change out this.require if you wanted to change that? do we really need to factor out the require function binding? [23:32] isaacs: i mean, there's very little to module.compile right now [23:32] isaacs: it's just binding this.require to this, and then setting up a few data points to match the modules/1.1 spec [23:33] isaacs: (er, binding require to this, this.require is already bound, dur.) [23:34] herbySk: yes, it can probably go as parameter to runJs and I can intercept it there. [23:34] herbySk: but compile/run must be split. [23:35] isaacs: herbySk: the idea is that module.compile takes module.data and makes module.exports into the proper exports object. [23:35] markwubben has joined the channel [23:35] herbySk: I still see a problem, what if have compiled already, and want only to run.... [23:35] isaacs: but you can do that by just exporting a function that you want to run over and over if you like. [23:35] herbySk: so it must be in its own function.... so it can be called from run withour coupling to compile [23:35] malkomalko has joined the channel [23:36] isaacs: herbySk: also, you can just call this.compiled() whenever you like [23:36] isaacs: but that really shouldn't be done. [23:36] isaacs: the correct way to have something that can be run multiple times is to export a function, and run the function over and over again. [23:37] isaacs: according to commonjs, a module's code should only be executed once. [23:37] herbySk: in a single sandbox, i presume [23:37] sh1mmer has joined the channel [23:37] isaacs: generally, although that is implementation-specific. [23:38] isaacs: i believe that couch's commonjs module loading is stateless [23:38] isaacs: i know that narwhal's works more or less like node's. i'm not familiar with the others. [23:38] herbySk: this is not, since global is acessible [23:38] isaacs: right, in node they're all in the same execution contex.t [23:39] isaacs: tim smart has done some experiments swapping out the process.compile for process.evalcx [23:39] isaacs: you run into odd issues there. like having different copies of the Function object, so "foo instanceof Function" can fail, even though typeof foo === "function" [23:39] herbySk: but in case they were separated by one or more means, the module can be loaded more times... and I definitely do not want it to _load_ just reuse the compiled code. [23:40] herbySk: That's why I want the module sstem to be able to use what is called this.compiled in your system.... so it must be able not to compile but create require [23:41] herbySk: I did, too (the experiments). There's some work to do. [23:41] isaacs: yeah [23:41] isaacs: evalcx is the way to get the sandboxing youre after, i think, but it's not straightforward or simple. [23:41] herbySk: And I have the lightweight seperation using require.sandboxed based on Object.create. [23:41] isaacs: it's a small code change with a HUGE effect. [23:41] herbySk: I'd like to use it... but not loading the smae file again and again [23:42] isaacs: herbySk: so, if you really want to execute the module's code multiple times (which is not necessary, and not wise, in my opinion) you *can* do that, since you have access to this.data [23:42] mnutt: has anybody else ever run into Parse Error exceptions thrown by the http server? any way to gracefully catch them? [23:42] isaacs: in fact, just to avoid the temptation, i think i should probably make this.compiled into a flag, and just call the function that process.compile returns. [23:43] herbySk: so, to summarize : be able to ru nwithout compile and let me to customize require in both compile/run as well as only-run cases... then I cab ne be more content [23:43] lifo has joined the channel [23:43] herbySk: I'm not going to compile that data, sorry. I can cache the compiled script. [23:45] technoweenie has joined the channel [23:45] isaacs: ok, then if you really want to do that, you can swap out just the compilers[".js"] script [23:45] isaacs: mnutt: it's not easy. [23:46] isaacs: mnutt: i submitted a patch to change process.compile to not crash on parse errors, but it's kind of a pita. i think _ry wants v8 to fix its bug rather than add code to have nodejs work around it. [23:47] herbySk: I'll see. IF it will be acceptable, I may use it, but it is much too hardcoded for my liking. [23:47] mnutt: isaacs: ok, thanks. [23:47] _ry: mnutt: uh - wait [23:47] _ry: thrown by http server? [23:48] isaacs: _ry: parse errors. [23:48] _ry: isaacs: you're talking about module loading [23:48] herbySk: mnutt: Use process.binding('evals').runInThisContext() instead of compile [23:48] isaacs: oh, no, i'm talking about parse errors thrown by process.compile. [23:48] mattly has joined the channel [23:48] herbySk: it does not crash, it writes error to stderr and happily throws an exception which you can catch [23:48] herbySk: it's officialy in node [23:48] herbySk: (for a few hours already) [23:48] _ry: but i don't think he's using process.compile [23:49] mnutt: _ry: correct, I'm not [23:49] _ry: i think he's getting an http parse bug [23:49] _ry: and the server is crashing ? [23:49] herbySk: aha, sorry, I was getting the impression form isaacs line [23:50] isaacs: oh, nice. [23:50] mnutt: _ry: yes, the output: http://gist.github.com/370625 [23:50] isaacs: wow, when did binding("evals") show up? [23:51] herbySk: today [23:51] herbySk: (that is, yesterday , already, for us in europe) [23:51] mnutt: I'm still trying to reproduce it; it happens every couple of hundred requests but I haven't pinned down which url is causing it [23:53] herbySk: modules: well, I see, if it will be usable, I'll use it, otherwise I;ll do the rewrite. It's much too hardcoded for my liking (like, why _not_ to extract well known pieces to theier own methods and trying to pack as much to single method as possible. It's then extener's pain in the ass). [23:53] herbySk: gonna sleep [23:55] _ry: mnutt: yeah, thanks [23:56] _ry: mnutt: i see the problem - that's an oversight on my part [23:56] _ry: i'll fix it soon [23:56] mnutt: _ry: thanks! [23:58] CIA-77: node: 03Ryan Dahl 07master * r6e715b8 10/ (25 files in 5 dirs): Upgrade Waf to 1.5.16 - http://bit.ly/b8rb5k [23:58] okito has joined the channel