[00:06] erikcorry: rektide: You could add __noSuchMethod__ in node if you can persuade Ryan. [00:07] erikcorry: I don't know whether that would be easier than persuading Google. [00:07] erikcorry: Personally what I don't like about it is that it's a one-off. [00:07] erikcorry: What if you have two uses for __noSuchMethod__? [00:07] erikcorry: The first one defines __noSuchMethod__. [00:07] erikcorry: What does then next do. [00:07] rolfb has joined the channel [00:08] rektide: Well, I'm writing a Commons Chain framework right now [00:08] rektide: chaining is not an unaddressed issue [00:08] rektide: although i agree [00:08] rektide: an event oriented interface would obvious be kick ass [00:09] cmlenz has joined the channel [00:09] isaacs__ has joined the channel [00:09] rektide: write one __noSuchMethod__ handler that does event handling [00:09] inimino: erikcorry: does v8 have some API hooks for it? [00:10] erikcorry: Not as far as I know. [00:10] erikcorry: You would have to modify the V8 source. [00:10] rektide: inimino: there have been /win 5 [00:10] rektide: (irc fail) [00:10] erikcorry: But node has its own copy so that's at least theoretically possibkle. [00:11] erikcorry: I don't actually understand what you mean by an event oriented interface. [00:11] inimino: erikcorry: oh, well, yeah... I doubt Ryan wants to fork V8 though [00:11] erikcorry: Perhaps I should work out how to scroll back in irssi. [00:12] inimino: page up? [00:12] erikcorry: Doesn't work for me. [00:12] inimino: oh, well, dunno then :) [00:13] erikcorry: I'll just wait for the logs on debuggable, then maybe I'll get it. [00:13] inimino: the logs are realtime [00:14] erikcorry: Clever. [00:20] erikcorry: Why do actors need __noSuchMethod__? [00:21] inimino: to support method acting? [00:22] inimino: my joke was so bad it made dnolen quit [00:22] erikcorry: lol [00:54] isaacs has joined the channel [01:00] rakeshpai has joined the channel [01:11] ashb: \o/ [01:11] ashb: 1 ok - textWithNoMarkup [01:11] ashb: i think i've finally tamed the W3C bat shit ANT+XSLT+XML code gen process [01:14] dnolen has joined the channel [01:16] rakeshpai has joined the channel [01:17] inimino: :-) [01:17] inimino: good work [01:18] isaacs: inimino: lulz! [01:18] isaacs: it's definitely possible to do event-based stuff without __noSuchMethod__. just uglier [01:19] isaacs: foo.do("something", arg, arg, arg) [01:19] isaacs: foo.on("something", function () { doSomething() }) [01:19] isaacs: etc [01:19] isaacs: the "something" can be arbitrary, and a no-op if there are no listners. [01:20] isaacs: of course, foo.something(arg, arg, arg) is prettier, but meh. javascript isn't the prettiest language, we all know htat. [01:20] keeto: and __noSuchMethod__ has a big flaw. [01:20] isaacs: keeto: what's that? [01:20] ashb: someone do me a quick favour: do you get a syntax error in node if you do [a,b] = [1,2]; [01:20] keeto: it won't catch this: obj.myMissingMethod.apply(...); [01:20] isaacs: ashb: yes [01:20] ashb: (i dont care if it doesn't work, i just care if it gives a syntax error or not [01:21] isaacs: it's v8, which is like safari [01:21] kriskowal: http://wiki.ecmascript.org/doku.php?id=strawman:catchalls [01:21] ashb: wasn't expecting it to work [01:21] inimino: v8 hews close to the standard [01:21] isaacs: ReferenceError: Invalid left-hand side in assignment [01:21] ashb: just wondering if it would just not give a syntax error [01:21] ashb: yeah figured so. just wanted to double check [01:21] ashb: i'm taking the asserts.js from http://github.com/felixge/node/blob/de78e7a917c891f3fc0404ecd380dcd1b55e7ec2/test/mjsunit/test-assert.js [01:21] inimino: (which doesn't have destructuring assignment) [01:21] inimino: it should be a syntax error per spec [01:21] ashb: and adding in the bit to get spidermonkey stack traces [01:21] inimino: something about invalid LHS I suppose [01:22] inimino: ah [01:22] inimino: nice [01:23] ashb: and it had: [01:23] ashb: [undef, undef, this.fileName, this.lineNumber] = [01:23] ashb: /^(.*?)@(.*?):(.*?)$/.exec( stack[1] ); [01:23] ashb: in it [01:24] isaacs: ashb: yikes [01:24] isaacs: yeah... node won't like that. [01:24] ashb: isaacs: thats not the worst of it [01:24] isaacs: hehe [01:24] ashb: http://groups.google.com/group/mozilla.dev.tech.js-engine/browse_thread/thread/af195c5aafbfcb32 [01:24] ashb: 2nd to last post [01:24] ashb: nothing else is particualrly hard to at least compile on v8 [01:25] inimino: hehe [01:26] inimino: not sure if v8 has error.stack either [01:26] inimino: I guess you'll find out next ;) [01:27] ashb: var has_error_instance_stack = (new Error()).stack; [01:27] ashb: and else if (that^^) [01:27] isaacs: (new Error()).stack; [01:27] isaacs: "Error\n at EventEmitter. (eval at readline (/Users/isaacs/dev/js/node/lib/repl.js:49:8))\n at EventEmitter.readline (/Users/isaacs/dev/js/node/lib/repl.js:49:18)" [01:28] ashb: so it does, but it has a different format [01:28] inimino: nice [01:28] inimino: for extra bonus points do them both in one regex [01:28] ashb: but the Error.captureStackTrace one should work instead [01:30] ashb: cool. that seems to work [01:31] jed has joined the channel [01:32] ashb: http://github.com/felixge/node/blob/de78e7a917c891f3fc0404ecd380dcd1b55e7ec2/test/mjsunit/test-assert.js <-- its cool for me to copy that right? [01:33] ashb: hmmm tho testing itself is odd. or is the assert from mjsuint? [01:34] ashb: oops! minor bug! [01:35] ashb: http://github.com/felixge/node/commit/de78e7a917c891f3fc0404ecd380dcd1b55e7ec2#L0R250 [02:08] aguynamedben has joined the channel [02:10] jed has joined the channel [02:21] kriskowal: what's the second argument to v8's Error.captureStackTrace? [02:21] kriskowal: and is typeof __filename the best way to detect node? [02:22] kriskowal: it would be good for commonjs to standardize on system.engine [02:22] ashb: engine or platform? [02:22] ashb: cos node's engine is v8 [02:22] ashb: (to me obv.) [02:23] ashb: function captureStackTrace(obj, cons_opt) { [02:23] ashb: var raw_stack = %CollectStackTrace(cons_opt ? cons_opt : captureStackTrace, [02:23] ashb: 853 + stackTraceLimit); [02:23] ashb: doesn't make much sense to me [02:24] ashb: ah [02:24] ashb: // If the caller parameter is a function we skip frames until we're // under it before starting to collect. [02:25] kriskowal: ah [02:25] ashb: so skip frames until fail is found [02:26] ashb: oh that might be the first param not the second [02:27] ashb: confused. [02:27] ashb: nm [02:27] ashb: :D [02:47] crux has joined the channel [03:15] bh has joined the channel [03:42] dnolen has joined the channel [04:07] bh has joined the channel [04:48] bobaman has joined the channel [04:49] bobaman: i'm having some trouble with http.ClientRequest [04:49] bobaman: i think i'm calling everything correctly, but my response.finish callback never fires [04:50] bobaman: er, request.finish rather [04:51] malkomalko has joined the channel [04:52] malkomalko: allo [04:52] bobaman: http://gist.github.com/247896 [04:53] bobaman: lines 102-115, in particular [04:54] bobaman: any idea why that responseHandler would never get fired? [04:58] inimino: bobaman: looks ok to me [04:58] inimino: bobaman: can you create a smaller test case, and maybe try http://google.com/ or something? [04:59] bobaman: hehe, i have been trying http://google.com/ [05:00] bobaman: just added a log run [05:09] malkomalko: everybody having a solid night? [05:27] bobaman: inimino: man, i am just completely at a loss with that http client stuff [05:28] inimino: bobaman: got anything smaller that doesn't work? [05:28] bobaman: working on finding something [05:28] inimino: k [05:34] bobaman: bah... it works stand-alone [05:36] blakemizerany has joined the channel [05:41] bobaman: inimino: found it!! [05:42] bobaman: i was accidentally passing null for the client port [05:42] inimino: oh? [05:42] inimino: oh [05:42] inimino: heh [05:42] bobaman: because the URI didn't specify one [05:42] bobaman: switched it to port || 80 and now it works [05:42] inimino: ah... [05:42] inimino: :) [05:46] Micheil: inimino: It's still got a lot of work to do though [05:46] Micheil: inimino: I need a better way of cleaning up the old sessions [05:47] inimino: Micheil: are they not getting cleaned up? [05:47] sudoer has joined the channel [05:47] Micheil: inimino: also, I can't seem to set multiple sessions with it [05:48] inimino: multiple sessions? [05:48] Micheil: inimino: sort of what you say about Set-Cookie header, it seems to only take one cookie atm, even though I've tried plugging in session data from another service [05:49] Micheil: inimino: I'm going to leave the session manager as default, because all sessions belong to a sessionmanager [05:49] inimino: why would you need more than one session on the same request? [05:50] Micheil: I guess if no session manager is passed into exports.create, then we could auto create a manager, but then that could get messy [05:51] inimino: also if you are going to have a SessionManager object it seems like lookupOrCreate should be a method of that object [05:51] Micheil: rektide: one use for noSuchMethod is for require and loading extra file. [05:53] inimino: session.getSetCookieHeaderValue() // method name too long? [05:54] inimino: I think I'm going to leave it and see if anyone complains, it's descriptive [05:54] jtoy has joined the channel [05:56] Micheil: inimino: yeah, sessions aren't being cleaned correctly [05:56] Micheil: it fails to loop through all of them, not sure why though [05:57] inimino: Micheil: there was a bug I saw earlier, not sure if that is related [05:57] Micheil: inimino: okay, re the cookies, you can't seem to have multiple cookies attached to a request.. just need to confirm this though [05:57] Micheil: one sec [05:58] bentomas has left the channel [05:58] inimino: Micheil: you can have more than one cookie as long as they have different names [06:00] Micheil: https://gist.github.com/a4a29020bb72f1d62646 [06:00] Micheil: this should set multiple cookies [06:04] inimino: doesn't look right [06:05] Micheil: I'm not sure then [06:06] inimino: I think you need one set-cookie header per cookie [06:06] inimino: ;-separators are just for parts of that same cookie [06:07] Micheil: nup [06:08] inimino: http://en.wikipedia.org/wiki/HTTP_cookie#Cookie_attributes [06:09] inimino: everything I know about cookies I learned from Wikipedia ;-) [06:09] inimino: too bad the only relevant RFCs are completely disconnected from real-world practice [06:11] Micheil: oh, here we go: [06:11] Micheil: I was doing it wrong: https://gist.github.com/a4a29020bb72f1d62646 [06:12] Micheil: inimino: do you think I should create a super class for creating cookies, then work the way down? [06:13] inimino: hm, not sure [06:14] careo has joined the channel [06:14] inimino: maybe [06:15] JoePeck has joined the channel [06:16] sudocarl: inimino is your sessions framework on GH yet? [06:17] jed: inimino: too true. [06:17] Micheil: inimino: do you want to be added as a collab on the Node.js-Sessions project? [06:18] inimino: sudocarl: I'm importing the project history into git at the moment [06:18] sudocarl: cool :) [06:19] sudocarl: can you send me a message when its up? [06:19] sudocarl: my name is carlsverre on GH [06:19] inimino: I'll probably just publish my own git repo instead of GH [06:19] Micheil: inimino: can you also send me a message when it's up? [06:19] sudocarl: thats fine too [06:19] sudocarl: :) [06:19] inimino: k [06:19] sudocarl: or just put a note on here :D [06:23] bobaman: -sigh- my proxy works great for text, but dies horribly on images and anything compressed [06:23] bobaman: i guess somehow i'm not sending things over the wire, bit for bit? [06:25] inimino: maybe an encoding issue [06:28] bobaman: not sure... just checked content-length versus what i sent over the wire [06:28] bobaman: identical [06:28] Micheil: inimino: I think what I'll end up doing is having a default SessionManager declared within the Sessions.js module, and then if you create your own sessionmanager instance, you can pass that in when you create a session, otherwise the default instance will be used [06:29] inimino: Micheil: sounds reasonable [06:30] zimbatm has left the channel [06:30] Micheil: but yeah, currently they don't delete the sessions, which is an absolute bugger [06:32] Micheil: why does apple do this to me: http://www.apple.com/au/education/hed/students/discounts.html :( [06:37] sudoer has joined the channel [06:40] inimino: sudocarl: git clone git://boshi.inimino.org/sessions/ [06:40] sudocarl: thanks :) [06:45] PowerToExt has joined the channel [06:55] eddanger has joined the channel [07:02] eddanger: On FreeBSD 7.2 my build failed... any ideas? [07:02] eddanger: Build failed [07:02] eddanger: -> task failed (err #2): [07:02] eddanger: {task: libv8.a SConstruct -> libv8.a} [07:23] sudoer has joined the channel [07:33] jtoy has joined the channel [07:36] kriskowal has joined the channel [07:37] aguynamedben has joined the channel [07:52] path[l] has joined the channel [07:55] blakemizerany has joined the channel [07:56] richtaur has joined the channel [08:06] richtaur has joined the channel [08:30] the_undefined has joined the channel [08:34] rakeshpai has joined the channel [08:37] johan-s has joined the channel [08:50] kriskowal has joined the channel [09:05] richardb has left the channel [09:09] cmlenz has joined the channel [09:15] path[l] has joined the channel [09:30] rtomayko has joined the channel [09:39] aguynamedben has joined the channel [09:39] aguynamedben has left the channel [09:47] jed_ has joined the channel [09:54] binary42 has joined the channel [10:09] Connorhd_ has joined the channel [10:23] JoePeck has joined the channel [10:36] webben has joined the channel [10:51] fearphage has joined the channel [10:55] fearphage: does jsconf us 2k10 have a location yet? [11:08] Bluebie has joined the channel [11:52] Wes- has joined the channel [11:52] fearphage has joined the channel [11:52] Connorhd_ has joined the channel [11:52] jed has joined the channel [11:52] johan-s has joined the channel [11:52] careo has joined the channel [11:52] malkomalko has joined the channel [11:52] sr has joined the channel [11:52] dims has joined the channel [11:52] Sinjo has joined the channel [11:52] halorgium has joined the channel [11:52] lmorchard|away has joined the channel [11:52] Atmoz has joined the channel [11:52] Nailor has joined the channel [11:52] frodenius has joined the channel [11:52] ashb has joined the channel [11:52] beppu has joined the channel [11:52] mediacoder has joined the channel [11:52] jan____ has joined the channel [11:52] CIA-28 has joined the channel [11:53] Connorhd_ has joined the channel [11:54] frodenius has joined the channel [11:54] Nailor has joined the channel [11:54] jed has joined the channel [11:54] Atmoz has joined the channel [11:55] malkomalko has joined the channel [11:55] ashb has joined the channel [12:00] malkomalko: it's in voodootikigod's mother's house down in VA [12:12] Micheil has joined the channel [12:35] Micheil has joined the channel [12:37] Micheil: fearphage: yeah, it's in washington [12:38] soveran has joined the channel [12:40] fearphage: Micheil: state? [12:40] fearphage: or dc? [12:40] Micheil: dc [12:40] fearphage: ok [12:40] fearphage: thanks [12:40] Micheil: fearphage: check their site. [12:41] fearphage: http://jsconf.us/2010/ ? [12:41] fearphage: not very informative just yet [12:42] Micheil: fearphage: you just don't know how to use it [12:43] Micheil: ;P [12:43] fearphage: i wasn't looking for secrets [12:45] Micheil: fearphage: well, I'd love to tell you how to use their site, but I can't [12:45] fearphage: is jsconf supposed to be a secret? [12:52] Bluebie: how weird.. [12:52] Bluebie: open a console, type jsconf.help() [12:53] frodenius has joined the channel [12:57] Micheil: fearphage: the early bird prices are. [13:08] fearphage: seems like there'd be an informative page with secret stuff embedded [13:08] fearphage: instead of the current page with a date and no location and everything requires research [13:17] PowerToExt has joined the channel [13:24] ashb: thats the point for the moment [13:32] Micheil: fearphage: it's currently looking for speakers and stuff [14:09] rolf- has joined the channel [14:17] soveran has joined the channel [14:41] pmuellr has joined the channel [14:51] malkomalko: anyone up? [14:54] ashb: no [14:54] malkomalko: figured! [15:34] bentomas has joined the channel [15:43] malkomalko: it's starting to come together! [15:44] Wes-: right now? [15:44] bentomas has joined the channel [15:44] malkomalko: pretty much yah, just hit a good point in my project, think it's going to be possible [15:50] binary42 has joined the channel [15:51] nefariousD: malkomalko: what kind of project are you putting together? [15:51] brandon_beacher has joined the channel [15:51] malkomalko: node_fsdb "FileSystemDataBase" [15:51] mediacoder: Micheil: what do you think about adding a setTimeout function on every session, which can be cleared or if triggered, the session deletes itself :-) wouldnt taht be nicer than iterating over the session-store? [15:53] nefariousD: oooh, thats cool [15:54] malkomalko: yah, the basics work, now that I know I can do it, going to write some finder methods/crud stuff [15:54] malkomalko: can write 100k basic json objects in 4.8 seconds [15:54] malkomalko: and I got JSON.parsing working, so it's def doable [15:54] nefariousD: will it be hitting the disk on each operation, or does it keep the data in memory? [15:54] malkomalko: I'd like to have it cached in memory as phase 2, as well as figuring out smart ways to split up large files... stuff like that [15:58] nefariousD: sounds pretty cool [16:06] michaelk^ has joined the channel [16:19] sifi has joined the channel [16:20] sifi: there is an error in the documentation for posix.cat function. You use puts instead of sys.puts when printing [16:26] kendes has left the channel [16:32] johan-s has joined the channel [16:47] sudoer has joined the channel [16:49] pdelgallego has joined the channel [16:55] jan____: sifi: assume var puts = require("sys").puts; [17:04] Wes-- has joined the channel [17:27] ashb: http://code.google.com/speed/public-dns/ [17:28] eddanger has joined the channel [17:28] inimino: interesting [17:30] Wes--: WTF [17:31] Wes--: Are they just running a big caching nameserver? (that collects information and feeds the machine?) [17:31] bobaman has joined the channel [17:33] aguynamedben has joined the channel [17:42] fictorial has joined the channel [17:45] fictorial: anyone know the memory and CPU overhead of a setTimeout? Can I for instance have 50,000 of them in my app? (don't ask, it's complicated :) [17:46] fictorial: I haven't looked yet (tsk) but I assume it's an ev_timer or some-such [17:46] Wes--: fictorial: I've never used node, but I can't see them occupying anything more than an entry in an event loop list somewhere [17:46] fictorial: Yeah, that's my intuition as well. [17:47] fictorial: ok so node_timer.h ... ev_timer [17:50] malkomalko_ has joined the channel [17:50] frodenius: fictorial: 50000 timeouts? ^^ care to explain? [17:51] fictorial: and ev_timer looks like it's a couple of doubles, a few ints, and a pointer [17:51] fictorial: ok [17:51] fictorial: frodenius: hehe, I'm experimenting - ignore me :) [17:51] frodenius: ah [18:00] pmuellr has joined the channel [18:00] eddanger: Hi All, any known issues on FreeBSD... my "Hello World" app runs fine for the first request, then the second request "Segmentation fault: 11 (core dumped)" [18:02] inimino: ryah: the new parser not supporting MOVE broke my app :( [18:03] inimino: ryah: do you have any specific plan for how to change that? [18:04] inimino: ryah: I could probably hack something into the parser but if you already have a plan that's cool too [18:13] ashb: it has a hardcoded list of VERBs? [18:13] Connorhd has joined the channel [18:13] ashb: doesn't 1.1 say you can use anything you like as a verb? [18:15] inimino: ashb: yes, and yes [18:16] pmuellr_ has joined the channel [18:21] inimino: I should say, the HTTP RFC doesn't really specify how an HTTP /parser/ should behave, but to be conforming, the server needs to at least reply if it doesn't know the method [18:29] inimino: the new parser is very cool, though [18:30] ashb: http://github.com/ry/http-parser that one? [18:31] inimino: yeah [18:31] inimino: nice fast, clean C code [18:31] ashb: oh wow. very much hardcoded list of VERBs tho [18:31] inimino: yes... [18:33] ashb: wonder why it doesn't just slurp until space [18:35] ashb: oh i guess because he wants constants for the verbs [18:35] Wes--: ashb: a lex/yacc parser would almost certainly do the same thing [18:35] Wes--: unless you were insane and didn't use verb-tokens (ie. assembled verbs in .y) [18:37] cloudhead has joined the channel [18:39] nefariousD: wewt! I got undefined's php/mysql-via-stdout node script working like a champ [18:47] shfx: nefariousD: nice [18:50] nefariousD: i dunno if im happier with the mysql access or the ability to interact with external scripting languages :P [18:50] nefariousD: ACTION thinks it would be fun to get this working with python.. [18:53] the_undefined has joined the channel [18:54] shfx: nefariousD: do you have it on github? or just mashing up localy? [18:55] nefariousD: mashing it up locally [18:55] nefariousD: i can give you the link to the github for the original code [18:55] nefariousD: one sec [18:55] shfx: it would be great [18:55] cmlenz has joined the channel [18:55] nefariousD: http://gist.github.com/247564 [18:56] nefariousD: theres a couple tweaks you have to make to get it working correctly, though.. [18:56] shfx: ty [18:56] nefariousD: in test.js, require('../lib/mysql') should just be require('./mysql') [18:58] nefariousD: also in test.js, on line 11, youll want to modify the command to be: var query = db.query('SELECT * FROM posts LIMIT 10'); [18:58] nefariousD: otherwise it returns an associative array filled with astericks for the keys and values :P [18:58] nefariousD: if I knew more about git, i'd submit the fix [19:02] pmuellr has joined the channel [19:04] hassox has joined the channel [19:05] shfx: nefariousD: dunno how github works, tried commiting ? [19:06] nefariousD: nope, not yet.. I want to read more about it before I try committing and mess something up :P [19:06] shfx: haha good point ;) [19:06] shfx: geez, nodejs is so fun to work with [19:07] mediacoder: nefariousD: iirc this was just a gist :-) ..not sure if you can "pull request" forked gists :-) [19:07] mediacoder: shfx: defenitely [19:08] nefariousD: i have *no* idea what a gists is :P [19:08] nefariousD: but i do agree, nodejs is a blast [19:08] shfx: :D [19:08] mediacoder: like a pastebin :-) [19:08] Nailor: but smarter :p [19:08] nefariousD: im mainly interested in browser games, and the implications provided by node for that field are mind blowing [19:08] nefariousD: ahh gotcha [19:09] sudoer has joined the channel [19:09] shfx: nefariousD: i was a game developer a month ago, we were developing a browser game mainly in js and ph [19:09] shfx: php* [19:09] orlandov: now we just ahve to wait for canvas to not suck [19:09] inimino: eww, PHP [19:10] shfx: yeah.. ewww [19:10] inimino: canvas is pretty awesome already [19:10] shfx: yeah, but not fully accelerated by hardware afaik [19:10] orlandov: yeah [19:10] nefariousD: i dont mind php :P [19:11] orlandov: that's the prob... any kind of canvas game will peg my browser [19:11] nefariousD: i have developed a pretty cool php/js based brwoser rpg for a couple months and ended up selling it [19:11] shfx: yeah [19:11] erikg: the fact that you have to redraw the whole canvas to evoke changes probably has implications for hw acceleration [19:11] orlandov: i think webgl will be the shit [19:11] nefariousD: its just that with php, you have to min your limitations and not shoot for game mechanics which arent going to be suited well to a non-realtime environment [19:12] shfx: yeah, we were pushed to use C++ backend for realtime battles [19:12] shfx: and php was used to pull data from db [19:12] shfx: mostly [19:13] shfx: and pushing ;) ofc [19:13] shfx: but it wasnt so fun at all [19:13] shfx: if u wanna look: http://tanadu.com/en/ [19:14] nefariousD: my main interest is finding ways to tie advanced javascript into the experience to make up for php's shortcomings.. the real battle is being careful with where your data is processed and validated, such that you're using the client's cpu as much as possible without introducing the possibility of dat amanipulation [19:16] shfx: aye, client should do the numerics and server should check in the middle of processing [19:16] shfx: so its fluent [19:16] hassox_ has joined the channel [19:17] nefariousD: indeed [19:18] Wes--: nefariousD: are you trying to mix and match PHP with JS? I do that here, have found significant work can be done merely by developing a mechanism to share sessions [19:20] nefariousD: Wes--: Something like that, yes.. Very interesting idea! Do you mean sharing standard PHP sessions with node? [19:20] Wes--: nefariousD: yes [19:20] Wes--: nefariousD: I do it read-only, would not be hard to do re-write [19:21] Wes--: of course, I'm not on node, so my implementation doesn't help much. But it should be totally doable [19:21] Wes--: and actually, async session reads probably would work better than what PHP does now [19:21] Wes--: (locking problem) [19:21] nefariousD: Ahh, thats a pretty interesting idea.. [19:21] shfx: Wes--: woah [19:21] shfx: :D [19:22] nefariousD: An idea that has been formulating for me is to use couchdb or somesuch to kind of 'emulate' sessions, and use mysql for the heavier data CRUD [19:22] nefariousD: i usually prefer storing my php sessions in a database, anyway, just because where I work we're usually load sharing sites/apps over a few web servers with a central db server [19:23] Wes--: nefariousD: well, if you do something like that, my phpsession implementation would run on couchdb without a lot of work (i develop on spidermonkey) [19:23] Wes--: might be an interesting way to do a gateway or some such [19:23] nefariousD: absolutely [19:23] nefariousD: do you happen to have a site/repo/git up anywhere? [19:24] nefariousD: I'd love to check it out [19:24] dnolen has joined the channel [19:27] Wes--: nefariousD: http://code.google.com/p/gpsee/ -- Note, haven't done any work with couchdb, but should not be a big deal. Session-handling code is over here -- http://code.google.com/p/gpsee/source/browse/modules/cgi/phpsess.c .... looks like that still uses Apache Runtime routines, need to port back to vanilla C [19:28] nefariousD: thanks muchly [19:33] Connorhd_ has joined the channel [19:49] gwoo has joined the channel [19:52] fictorial has joined the channel [19:58] sudoer has joined the channel [19:59] jtoy has joined the channel [20:13] hassox has joined the channel [20:15] jtoy has joined the channel [20:17] kriskowal has joined the channel [20:20] gwoo_ has joined the channel [20:29] aconbere has joined the channel [20:29] keeto_ has joined the channel [20:29] aconbere: hey, I'm trying to do some xml serialization, and I'm not super familiar with V8, wondering if anyone knows if a native dom serialization function exists [20:30] inimino: aconbere: V8 is purely a JavaScript engine, you'd need a DOM library [20:33] keeto_ has joined the channel [20:34] aconbere: inimino: ah, I just assumed it came with the "standard" browser tools as well [20:34] aconbere: perhaps that was foolish [20:34] aconbere: :) [20:36] aconbere: this might be tricky! [20:39] aconbere: inimino: do you have an opinion of the direction that node.js would rather go with xml parsing? My first choice would be to attempt to work on libxml2. [20:40] nefariousD: could fork off a child process to either a command line standalone app or a php/perl/python script or somesuch, and use STDIN and STDOUT for communication :D [20:40] inimino: aconbere: there is a libxml2 binding someone has [20:40] inimino: aconbere: or was working on, I don't remember offhand who it was [20:40] blakemizerany has joined the channel [20:40] aconbere: inimino: http://libxmljs.squishtech.com/ [20:41] aconbere: ? [20:41] mediacoder: aconbere: http://github.com/sprsquish/libxmljs [20:41] mediacoder: yea [20:41] aconbere: thanks :) [20:45] binary42 has joined the channel [20:56] aconbere: hmmm [20:56] aconbere: so I've build libxmljs.node [20:56] aconbere: and I have it in my project directory [20:56] aconbere: the documentation suggests I should [20:56] aconbere: require("libxmljs.node") [20:57] aconbere: which throws an exception about the file extensions not being supported [20:57] aconbere: but require("libxmljs") fails to find the module [20:57] aconbere: any suggestsions? [21:00] inimino: aconbere: try require("./libxmljs") [21:01] aconbere: inimino: thanks, that did it [21:06] emyller_ has joined the channel [21:07] emyller_ has joined the channel [21:10] soveran has joined the channel [21:10] jcrosby has joined the channel [21:12] dnolen has joined the channel [21:19] malkomalko has joined the channel [21:34] hassox has joined the channel [21:51] Micheil: mediacoder: quite possible. [21:52] blakemizerany has joined the channel [22:00] mediacoder: Micheil: i have forked your repo and played a bit in the past hours. [22:03] Micheil: nice stuff :D [22:03] jspiros has joined the channel [22:04] bobaman has joined the channel [22:04] Micheil: mediacoder: do you think the session manager makes sense? [22:05] mediacoder: hmm.. i liked it [22:05] mediacoder: i liked it very modular ..like there is the session, the session-manager and the session-storage [22:05] mediacoder: (in my example) [22:05] Micheil: mediacoder: oh, make sure you're pulling the 0.0.3 branch [22:06] Micheil: as that'll be merged into master over the next few days [22:06] mediacoder: yea.. i started with your old and updated a bit..so its hybrid :-P [22:06] mediacoder: i liked the idea of the manager, which would take care of variable storage options, etc [22:07] Micheil: mediacoder: hmm.. well, if it's possible, and you could make yours into a fork of 0.0.3branch, then I'll merge things back in [22:08] Micheil: also, part of the reason for the SessionManager is to have an option in there for storage type [22:08] mediacoder: yea..ill have a look also in the next days.. i changed quite much, so not sure, if you want to marge it back [22:09] Micheil: however, the save handlers aren't needed, use EventEmitter [22:09] olivvv has joined the channel [22:09] mediacoder: hehe, yea [22:11] Micheil: also, nice readme ;P [22:11] mediacoder: just didnt want to make the deletion itself part of the session-object, since there would be different approaches with different storage-adapters [22:11] mediacoder: :-) [22:12] Micheil: yeah [22:12] inimino: mediacoder: where is your code? [22:12] Micheil: hmm.. well, I'm going to continue working through it [22:12] Micheil: http://github.com/mediacoder/node-sessions [22:12] mediacoder: http://github.com/mediacoder/node-sessions [22:12] Micheil: anyway, bbl. [22:12] sudoer has joined the channel [22:16] inimino: huh, sys.p [22:16] inimino: that's nice to know about [22:18] michaelk^ has joined the channel [22:19] mdg has joined the channel [22:19] rolfb has joined the channel [22:21] mediacoder: inimino: hm, atleast it works :-) maybe thats inspect now :-) [22:22] inimino: it's implemented as sys.error(sys.inspect(x)) [22:22] inimino: should probably be documented [22:22] inimino: mediacoder: so you're returning a promise, are you going to add disk-based session storage? [22:23] frodenius: uhm, why the wrap in (function(){ })() ? [22:23] mediacoder: yea, i wanted to play with some more storage adapters..sure this one doesnt need promise [22:23] mediacoder: but tomorrow i want to use memcached or have a look at db adapters [22:24] mediacoder: frodenius: hm.. bad habit maybe :-) [22:24] inimino: I am considering adding disk storage, but I don't personally need it so I probably won't [22:24] sixtus42 has joined the channel [22:24] malkomalko: :) [22:24] frodenius: indeed :>, totally unnecessary in node [22:24] mediacoder: :-) [22:25] inimino: I only need sessions for small authentication tokens, though [22:25] inimino: people storing lots of data in them would probably want disk storage [22:26] mediacoder: yea, same here. so i defenitely prefer in-memory sessions and maybe some nice strategies to dump and reload or soemthing [22:27] inimino: yeah [22:33] bobaman: weird.... my http client code is working for GET requests, but not POSTs :-( [22:34] Wes--: bobaman: are you setting content-length correctly? [22:34] bobaman: quite sure [22:34] bobaman: just checked a sec ago actually [22:36] bobaman: the callback for request.finish(callback) never gets called [22:37] bobaman: weird.... [22:38] bobaman: i dumped the request, and it outputted a GET [22:39] bobaman: oh... i'm an idiot [22:39] brandon_beacher has joined the channel [22:39] bobaman: my switch didn't have a break and it feel through from POST into the GET block [22:41] bobaman: sweet, it all works! [22:41] bobaman: high-speed scriptable http proxy... done [22:43] nefariousD: hmm.. anyone recall the name of that apache *nix app that simulates load testing? [22:43] mediacoder: ab [22:44] nefariousD: called just 'ab'? [22:44] mediacoder: the bin is..i think the google-friendly name is apache benchmark [22:45] sixtus42_ has joined the channel [22:45] nefariousD: gotcha.. thanks [22:48] blakemizerany has joined the channel [22:49] nefariousD: hrm.. is there a central place where most of the node apps/examples/demos being made by the community are being posted (other than the google group) ? [22:50] nefariousD: i know theres ryans list on github [22:50] nefariousD: i guess im just wondering if thats the main spot [22:50] mediacoder: guess so [22:50] mediacoder: been updated recently iirc [22:56] mattly has joined the channel [22:59] sixtus42 has joined the channel [23:00] RayMorgan has joined the channel [23:01] nefariousD: ugh.. i think i picked the wrong vps provider.. fivebean is laggy =\ [23:01] nefariousD: anyone have any experience with the rackspace cloud vps service? [23:05] inimino: nefariousD: linode and slicehost are nice [23:06] nefariousD: yea, I used to have a linode account, but my 2 year old son made 20$ a month a tiny bit more than I could budget out :P [23:06] nefariousD: im getting my current account for 12$ or so a month [23:07] blakemizerany has joined the channel [23:07] nefariousD: 12$ gets me 35gb storage, 450gb bandwidth, 384mb dedicated ram, 768mb burstable ram, and an ip address, which isn't too bad [23:07] nefariousD: its just that it seems a little laggy [23:08] inimino: not bad [23:08] inimino: I think linode has a plan around that price point [23:08] nefariousD: it could be that they oversell their servers, something linode was very clear about never doing [23:10] inimino: yeah, could be [23:13] rektide: anyone using IOC in node.js ? [23:13] sixtus42: rektide: why would you do that in a dynamic language? [23:13] rektide: i like declarative setup ? [23:13] inimino: rektide: probably depends what you mean by that [23:15] rektide: well, i was wondering if anyone has used any existing tooling with node.js, if there's anything to work with [23:16] sixtus42: rektide: that's what I was trying to say. javascript itself has all the features that the typical IOC tool in e.g. java would provide you [23:17] rektide: so i an write a bunch of objet definitions and javascript will magically figure out the dependency graph for the order they need to be loaded? [23:17] rektide: i had no idea javascript had that feature [23:17] rektide: thats really want i want, not having to write object definitions starting at leaves and working up the graph [23:18] rektide: s/so i an/so i can/ [23:18] sixtus42: rektide: js won't autoload no, but you don't really need to load in order unless code is executing on load [23:18] inimino: IoC is a broad enough term that I still really don't know what you mean [23:19] rektide: right now i'm only really concerned about dependency injection [23:20] inimino: perhaps with a more concrete example I could help [23:23] inimino: to me IoC includes things like Promises and CPS, I don't really connect the term with anything to do with dependencies... [23:23] rektide: http://pastebin.com/m7deaa8df [23:24] rektide: that code wont compile because of hte order of declarations [23:24] rektide: one domainRoute depends on the pathRouter, declared later [23:26] inimino: you can use an object [23:26] inimino: well... [23:27] inimino: why are you indexing object properties with a regex literal? [23:28] rolfb has joined the channel [23:28] rektide: if the key fits [23:29] inimino: well, by the time that object is passed to RegexRouter, it doesn't contain any regexes anymore [23:29] inimino: object property names are just strings [23:30] inimino: anyway, the easiest way to do what you want there is probably just to put things in the correct order, if that turns out to be complicated then you could add a layer of indirection using functions, closures, or object property lookup [23:30] kriskowal has joined the channel [23:31] rektide: http://pastebin.com/mc7be932 [23:31] rektide: i've done some testing, regex's appear to be valid keys. hmm i guess i havent tested whether the key is still a regex when i .each it [23:32] jcrosby has joined the channel [23:32] rektide: yes, i could add a layer of dependency injection [23:32] inimino: yeah, that should be i.match, but it'll just be a string at that point [23:33] inimino: (and match is actually a method of strings, not regexes) [23:33] inimino: "a".match(/a/) == true [23:33] rektide: ah its backwards [23:34] inimino: so you probably want to put something like [[/test/,handler],[/next test/,handler]] or something [23:37] silas1 has joined the channel [23:37] blakemizerany has joined the channel [23:47] cloudhead has joined the channel [23:49] RayMorgan has joined the channel [23:50] frodenius: completely OT, but funny: http://www.youtube.com/watch?v=1bXeQ7baYEE