[00:04] andreavonhollen has joined the channel [00:28] ekiru has joined the channel [00:30] dgathright has joined the channel [00:31] rtl has joined the channel [00:34] pdelgallego has joined the channel [00:35] isaacs has joined the channel [00:35] isaacs: WHOA! http://github.com/ry/node/commit/cc053e7df7fb1bf44c094b62b8c33820b8497e35 [00:35] isaacs: _ry: nice! [00:57] technoweenie: oh cool [00:57] technoweenie: wonder if twitter-node works still [01:00] technoweenie: yup [01:01] technoweenie: hmm i'm getting this debug printout of the http request [01:02] gwoo has joined the channel [01:09] kriskowal has joined the channel [01:15] rictic has joined the channel [01:22] tav has joined the channel [01:22] tav: ACTION waves [01:22] tav: anyone know if node supports fork() ? [01:30] isaacs: tav: you can create child processes [01:30] isaacs: tav: that JUST changed in the latest head. [01:31] isaacs: tav: in the download from nodejs.org, it works using process.createChildProcess, as documented on nodejs.org/api.html [01:32] isaacs: tav: in the latest HEAD on ry/master, it works by doing require("child_process").spawn(), which you can read about in doc/api.txt in the repository [01:32] tav: isaacs: aha, thanks [01:33] tav: ACTION looks [01:33] isaacs: tav: the new kit is hot. but not very well documented yet. _ry just wrote about it to the mailing lst. [01:33] rictic has joined the channel [01:41] arlolra has joined the channel [01:43] maushu: Performance wise how fast is node.js serving a static file (using streams) compared to a server coded in c? Does v8 do a good job regarding that? [01:44] maushu: I know some code in a vm can be faster than their c counterparts. [01:50] maritz: how do i start a childprocess in another directory? (say, i'm in "./project/app.js" and want to start a childprocess in "./project/subfolder/") [01:50] maritz: so that cwd is subfolder [01:51] maushu: Huh, that doesn't make sense. [01:52] maushu: a childprocess needs a program, not a directory to start. [01:54] maritz: yes, i know. i want to start sass and convert a sass file to a css file. the command is "sass file.sass file.css" no problem works fine. however, if i do an @import in the sass file, sass looks for the imported file in ./project not in ./project/subfolder because that's the cwd. [01:54] cpojer1 has joined the channel [01:56] maushu: Ah, I see. [01:57] maushu: maritz, try process.chdir(directory) [01:57] maushu: It will change the current directory of the process. [01:57] pigdude has joined the channel [01:57] maritz: i can tell the import in the sass file to look in the subdir. but since the subdir is likely going to be changed and dynamic, it would be cool if i wouldn't have to do that. [01:57] maritz: oh, ok. thanks :) [01:58] maritz: damnit, read straight past that in the docs... *headbang* [02:04] arlolra has joined the channel [02:06] JimBastard: mmm that was a nice 18 hour nap [02:06] JimBastard: maybe 16 [02:07] mattly has joined the channel [02:07] maritz: LIAR! [02:07] maritz: :D [02:08] maritz: you slept a maximum of 10 hours and 30 minutes [02:08] maritz: or you write while sleeping. also possible... :D [02:09] Monk has joined the channel [02:11] JimBastard: did i wake up and type something? log time [02:12] brianleroux has joined the channel [02:12] maritz: yep [02:12] dgathright has joined the channel [02:13] brianleroux: ola folks [02:13] maritz: (4:29:43 PM) JimBastard: and thats saying a lot coming from me [02:13] maritz: (thats utc+1) [02:14] maritz: oh god... i'm too tired. that was days ago. sorry [02:14] brianleroux: anyone know how to set parameters when issuing client.request ' POST' ? [02:15] JimBastard: its good to know i wake up from sleeping to wonder where the docs are for v2 of node-dirty, then go back to sleep [02:15] maushu: JimBastard, lol. [02:16] maushu: brianleroux, POST parameters are set in the body. [02:16] maushu: Like get but without "?". [02:17] cpojer has joined the channel [02:17] brianleroux: maushu: not sure I understand.... second string arg is a path... where is the body? a var request = client.request("POST", "/secret"); [02:18] maushu: Humn, let me check. [02:19] maushu: brianleroux, according to the docs the request is only sent after you "request.close()". [02:19] maushu: That means you can send the body before the close. [02:19] maushu: Let me check how you send the body. [02:20] maushu: brainproxy, you use request.write(chunk, encoding="ascii"). [02:20] JimBastard: ive got code kicking around for doing http client requests if you need to look [02:21] maushu: So, you create the request with client.request (and get a request object), write the to the body using request.write (and add listeners for result?) and then request.close(). [02:22] maushu: JimBastard, does keep-alive work with node.js' http server? [02:22] JimBastard: im not sure, i think so [02:26] maushu: On another news my desire to create a mud in node.js has been increasing. Fortunately I've been fighting it successfully. [02:27] maushu: (This came to be since I'm using MUSHclient to test the keep-alive.) [02:28] JimBastard: { "content-length": "123" , "content-type": "text/plain" , "connection": "keep-alive" , "accept": "*/*" } [02:28] JimBastard: looks like it works [02:30] maushu: Yeah, I just tested it. [02:30] maushu: It's great. \o/ [02:35] JimBastard: im a bit busy, but i would like to help if you are serious about building a mud [02:35] JimBastard: i could probably help best doing some front-end framework stuff [02:36] maushu: It's at these times that I wish my name were Sirius. [02:36] JimBastard: where are you from maushu ? [02:36] maushu: Portugal. [02:36] JimBastard: got ya [02:36] maushu: Yes, Sirius is not a normal name around here. :p [02:37] maushu: I don't think it's a normal name mostly anywhere. [02:38] maushu: Anyways, if I were to build a mud (and that is a BIG if), I would try an idea I had ages ago and wrote it in notebook of ideas. [02:38] maushu: Of course it would complicate the mud idea by 1000x times. [02:39] maushu: Still, with an async framework like node.js... it would be awesome. [02:39] mattly: maushu: http://farm4.static.flickr.com/3615/3637524796_88efc832ed.jpg [02:40] maushu: Unfortunately muds have been losing fans for ages. [02:40] mattly: oh man i haven't been on a mud in like fourteen years [02:40] maushu: ^ [02:40] maushu: I rest my case. [02:42] mattly: heh [02:42] JoePeck has joined the channel [02:42] maushu: My idea is awesome. It would make people faint because of its awesomeness and how it changes the usual mud ideas. [02:43] maushu: It is also basically impossible to implement. Yay. [02:43] mattly: is it still text-based? [02:43] maushu: It's still text-based. [02:43] maushu: I would bet that it could even make some people from graphics based games to love it. [02:44] JimBastard: lol [02:44] maushu: It's quite simple, the idea. [02:44] JimBastard: so wait the idea is you use a mud client to connect to node? like is there a standard client / protocol for these things? [02:44] JimBastard: or do you have to build the client as well [02:45] maushu: Huh, telnet? [02:45] JimBastard: got ya [02:45] JimBastard: all telnet? [02:45] maushu: I'm pretty sure all mud servers support telnet, sometimes with other stuff for graphics and colors. [02:45] JimBastard: yeah [02:45] maushu: Anyways, instead of using the good old rooms and entities in those rooms... how about a object oriented? [02:46] maushu: ACTION wiggles his eyebrow. [02:46] maritz: ... [02:46] maritz: why not prototype oriented? [02:46] maritz: i mean, it's javascript afterall [02:46] maritz: :P [02:46] maushu: Don't make me start about prototypes. [02:46] maritz: start! [02:47] maushu: Technically it would use prototypes... so it would end like javascript. That is other topic though. [02:48] brianleroux has joined the channel [02:48] maritz: ooor, you make it a strictly functional mud. and nosql! very important. [02:48] maritz: maybe even let the entire world be set in a cloud?! [02:48] maritz: *duck* [02:48] maushu: Now, continuing this idea (with the hope that *someone* will implement it someday) the world is object oriented, and there are no classical entities like in other browsers. [02:49] maushu: *other mud servers [02:49] rektide_: how can i get the max integer ? [02:50] maushu: rektide_, Number.MAX_VALUE [02:51] rektide_: ty! [02:51] rektide_: i forget that n++ isnt going to roll over [02:51] maushu: So, the player would be a reference to a human object, that human object would contain the stuff that makes a human, like legs, arms, trunk, head and inside those would have organs and stuff. [02:51] maushu: And so on... FOR EVERY OBJECT IN THE WORLD. [02:52] maushu: Insane, isn't it? I know. [02:52] maushu: Maybe when the quantum computers show I will be able to have my own text-based matrix. Yay. [02:53] maritz: right. and who creates all the object definitions? [02:54] maushu: Object definitions? [02:54] maushu: Well, the property of each object would be the sum of its inner properties. [02:54] maritz: who defines what a human is? and what organs he has? [02:54] maushu: Those would be the blueprints. [02:54] maushu: Here you have your "prototype" oriented stuff. [02:55] JimBastard: you should probably port an existing gaming engine for the rules and what not [02:55] JimBastard: no need to reinvent D&D [02:55] maritz: so basically you'd have to hire some monkey to implement all bones/organs of each creature you want to have in your game? :P [02:55] binary42 has joined the channel [02:55] maushu: ...D&D doesn't use such system. [02:56] maushu: maritz, we are programmers. We would make programs to make data structures. [02:57] maushu: JimBastard, D&D doesn't come to this detail, specially computer versions of it. [02:57] maushu: We could use D&D rules for other stuff above this though. [02:58] JimBastard: http://www.wizards.com/d20/files/4E_SRD.pdf [02:58] JimBastard: 4th edition rule set [03:00] JimBastard: you might even be able to just find an existing MUD and port it [03:01] maushu: JimBastard, that is based on statistics. [03:01] JimBastard: k [03:02] maushu: I don't see what it has to do with that insane idea. [03:05] maushu: But, yes. Porting a existing system would be much easier than implementing that idea. [03:05] kriskowal has joined the channel [03:06] kriskowal_ has joined the channel [03:06] maushu: Without anything new compared to other muds I wouldn't feel too much motivated to code it and the players to play it though. Like I said, less and less people are playing IF and mud games. [03:06] steadicat has joined the channel [03:14] codeswing has joined the channel [03:31] Tim_Smart has joined the channel [03:59] JimBastard: maushu: thats what you gotta make it more accessible. build a web interface for it...use some websockets to get real time data going [03:59] JimBastard: fuck the telnet client [03:59] maushu: True, I was thinking about it before. [04:00] JimBastard: i could help with the front-end for that if you wanted to try it out [04:00] maushu: It stops being a mud and starts being a multiplayer browser game though. [04:00] JimBastard: MUB? [04:00] maushu: ACTION facepalms. [04:00] JimBastard: yo _ry which would you rather see a node.js MUD that ran over telnet or over browser with websockets? or both? [04:02] maushu: For him it would be better a browser one. More people, more advertising for node.js [04:02] maushu: But like I said, it would stop being a mud. [04:03] maushu: No more text commands, but buttons. [04:03] maushu: It would be like exchanging irc for messenger. [04:08] mattly: dude the browser is the modern day telnet client [04:08] mattly: *IS* event [04:08] mattly: *even [04:08] mattly: shit [04:09] maushu: *poopy [04:09] mattly: mudroulette [04:09] mattly: boom [04:09] mattly: let's get some VC money behind that shit [04:15] Yuffster has joined the channel [04:23] mikeal1 has joined the channel [04:25] PyroPete1 has joined the channel [04:25] siculars has joined the channel [04:34] sh1mmer has joined the channel [04:40] andreavonhollen has joined the channel [04:52] mikeal1 has joined the channel [05:04] mikeal1 has joined the channel [05:04] steadicat has joined the channel [05:25] siculars has joined the channel [05:32] mikeal1 has joined the channel [05:36] tlrobinson has joined the channel [05:41] aguynamedben has joined the channel [05:49] _sh` has joined the channel [05:50] mikeal1 has joined the channel [05:52] _sh has joined the channel [05:57] kriskowal has joined the channel [06:18] softdrink has joined the channel [06:32] dnolen has joined the channel [06:33] mjr_ has joined the channel [06:35] JoePeck has joined the channel [06:43] JoePeck_ has joined the channel [06:54] unomi has joined the channel [07:07] creationix has joined the channel [07:25] keeto has joined the channel [07:35] bpot has joined the channel [07:39] codeswing has joined the channel [08:13] andreavonhollen1 has joined the channel [08:21] qFox has joined the channel [08:29] ithinkihaveacat has joined the channel [08:52] kriskowal has joined the channel [09:00] ditesh|cassini has joined the channel [09:05] lifo has joined the channel [09:25] pdelgallego has joined the channel [09:26] ditesh has joined the channel [09:49] tlrobinson has joined the channel [10:02] ditesh|titan has joined the channel [10:02] javajunky has joined the channel [10:03] tisba has joined the channel [10:12] kennethkalmer has joined the channel [10:18] Tim_Smart has joined the channel [10:21] callen: does anyone know how to inject a debugger/interpreter into a running node app? [10:21] callen: or rather, how to invoke V8's debugger? [10:21] callen: I've only debugged javascript in a browser/DOM context prior to this. [10:22] Tim_Smart: callen: sys.puts >.< [10:22] callen: Tim_Smart: :\ that's not a debugger. [10:22] Tim_Smart: :p [10:22] callen: you make panda sad :( [10:23] Tim_Smart: http://swik.net/Eclipse/del.icio.us%2Ftag%2Feclipse/Using+Eclipse+as+a+node.js+Debugger/drf8d ? [10:23] Tim_Smart: Dunno, just Googling here [10:23] callen: I'm trying to track down how to just use the V8 debugger. [10:24] callen: you couldn't *pay me* to use Eclipse. [10:24] Tim_Smart: V8 has a debugger? [10:24] QuietKnight has joined the channel [10:24] callen: it has a protocol for it. [10:24] callen: using json and some other some-such. [10:24] Tim_Smart: Um I think I saw about it somewhere [10:24] callen: break, continue, etc. [10:25] Tim_Smart: heh, node --debug? [10:27] callen: it's...oh that's just weird. [10:28] Tim_Smart: Hmm, yeah. I have never tried it [10:29] voxpelli-laptop has joined the channel [10:36] callen: is anyone here using express? [10:37] callen: I'm getting an error+crash when I attempt to go to my localhost url. [10:40] javajunky has joined the channel [10:42] markwubben has joined the channel [11:04] callen: okay, pro-tip [11:04] callen: don't use anything later than node 1.32 with express [11:04] callen: it'll make it crash. [11:05] hellp has joined the channel [11:06] callen: annnnd...express seems to slow node down considerably. [11:12] neynenmo has joined the channel [11:38] voxpelli-laptop has joined the channel [11:43] MattJ has joined the channel [11:45] BRMatt has joined the channel [11:49] hassox has joined the channel [11:52] keeto has joined the channel [11:55] kennethkalmer has joined the channel [12:00] kriskowal has joined the channel [12:19] ditesh|titan has joined the channel [12:30] CraigW has joined the channel [12:31] Monk has joined the channel [12:45] binary42 has joined the channel [13:02] callen: I published some preliminary performance numbers on node vs. django if anyone's interested. [13:04] BrianWall has joined the channel [13:06] BrianWall has joined the channel [13:13] Monk has joined the channel [13:16] BrianWall has joined the channel [13:16] BrianWall has joined the channel [13:20] Monk has joined the channel [13:22] arlolra has joined the channel [13:24] maushu has joined the channel [13:41] BrianWall has joined the channel [13:45] ivan has joined the channel [13:46] tlrobinson has joined the channel [13:55] maushu has joined the channel [14:00] dnolen has joined the channel [14:21] maritz has joined the channel [14:28] BRMatt has joined the channel [14:56] alex-desktop has joined the channel [15:12] javajunky has joined the channel [15:31] r11t has joined the channel [15:36] javajunky has joined the channel [15:52] arlolra: hi. is there a way to append to a file using fs.writeFile, rather than rewriting it? [15:59] maushu has joined the channel [16:04] voodootikigod_ has joined the channel [16:04] voodootikigod_: _ry: process.mixin is being deprecated in favor of... [16:05] inimino: voodootikigod_: in favor of not doing that, or rolling your own, see the mailing list [16:05] voodootikigod_: ok [16:06] voodootikigod_: any thoughts on when the API docs will be updated for that? [16:06] voodootikigod_: specifically the index.js section for module load [16:08] mjr_: I was working on updating the docs last week, before the net2 stuff got merged in. [16:08] voodootikigod_: gotcha [16:08] voodootikigod_: all godo [16:08] inimino: hm, yeah that paragraph should probably just be pulled [16:08] mjr_: creationix has a super cool new doc framework. [16:09] dnolen has joined the channel [16:10] mjr_: The whole API doc could really use a full pass with good examples for every item. [16:17] zelnick has joined the channel [16:21] arlolra: is there a way to append to a file using fs.writeFile? [16:21] maushu: Anyone could tell me or link me to how requests are sent to facebook api? I can't seem to find how a raw request is structure. [16:27] tlrobinson has joined the channel [16:30] beppu_: maushu: http://wiki.developers.facebook.com/index.php/API [16:31] maushu: beppu, that doc doesn't feel complete. [16:32] maushu: I mean, when contructing the query string what data go where? [16:32] maushu: I'm guessing the method go into "method" and the api key to "api_key". What else? That is my problem. [16:39] mau2 has joined the channel [16:41] javajunky1 has joined the channel [16:42] beppu: maushu: good point. I would suggest looking at existing client libs and seeing how *they* do it. [16:42] beppu: http://wiki.developers.facebook.com/index.php/User:Client_Libraries [16:54] KungFuHamster: concerning the previous conversation concerning a rewrite of the node docs... as a programming newb, I heartily support this sentiment [16:54] KungFuHamster: and concerning my overuse of the word 'concerning'... mea culpa [16:56] sh1mmer has joined the channel [17:02] mattly: so is there any kind of generally accepted packaging system for commonjs? [17:03] deanlandolt: mattly: packages 1.0 was ratified a month or so ago [17:03] mattly: oh nice [17:14] steadicat has joined the channel [17:21] mikeal1 has joined the channel [17:36] isaacs has joined the channel [17:43] javajunky has joined the channel [17:44] Yuffster has joined the channel [17:50] javajunky1 has joined the channel [17:50] cloudhead has joined the channel [18:03] mattly: MFer [18:03] mattly: fs.stat returns dates in ISO8601 but it doesn't seem commonJS's Date.parse can handle that format [18:14] javajunky has joined the channel [18:15] jan____: isaacs: how do you know @uliwitness? [18:15] isaacs: jan____: i don't, but he tweeted @ me [18:16] isaacs: jan____: http://twitter.com/uliwitness/status/10831043138 [18:16] jan____: yeah, saw that [18:16] jan____: wondering why he follows you :) [18:16] jan____: the web is a village [18:16] isaacs: apparently he doesnt [18:16] isaacs: maybe he follows #dreamhost or something [18:16] jan____: unlikely :) he's a mac dev [18:17] isaacs: jan____: but he uses dreamhost, so maybe he's just keeping tabs [18:17] isaacs: mattly: fs.stat returns Date objects [18:17] mattly: orly [18:17] isaacs: yeah [18:17] mattly: heh [18:17] isaacs: stat.mtime.toISOString() [18:17] mattly: guess i should pay more attention :D [18:17] isaacs: etc. [18:17] isaacs: :) [18:19] jan____: isaacs: mebbe [18:22] Reshekel has joined the channel [18:23] Moiraaterdjacula has joined the channel [18:25] routeX86Sparc has joined the channel [18:26] tootlinkSunos_Sc has joined the channel [18:26] poopsexObamahub has joined the channel [18:27] arlolra has joined the channel [18:27] poopsexObamahub: Wow you're life is so complete. Havning to use a drug to have fun and listening to sucky music must make you so cool. Partying with women who have been passed around more times then your mom must make you a pimp. [18:27] routeX86Sparc: Apparently everyone is up in arms about this new racist Six Flags Atlanta ride, they say it negatively portrays african americans. I guess the name is a little bit insensitive. They call it the 'Nigger Experience' and the ride is: when you get in the parking lot at the end of the day, you realize that niggers have broken into your car and stolen your stereo. I don't know what to think. [18:28] marienz has joined the channel [18:28] javajunky has joined the channel [18:28] mattly: wow, reminds me of the early days of #rubyonrails [18:28] Bicyclefuncamiga has joined the channel [18:28] inimino: dammit [18:29] Bicycle_Terdjerk has joined the channel [18:32] Hiall has joined the channel [18:41] javajunky has joined the channel [18:48] isaacs: anyone know of a good code review tool/site that doesn't depend on (a) a specific SCM or (b) .patch files or (c) Java [18:48] isaacs: ? [18:49] isaacs: i want to upload a file, and have per-line comments. that's IT [18:50] Reshekel has left the channel [18:53] QuietKnight: isaacs: I started to make one of those, but never finished. I thought it would be great for open source projects. [18:53] isaacs: QuietKnight: go finish it! [18:53] isaacs: hehe [18:54] isaacs: basically i just want pastie + line comments [18:54] QuietKnight: I got as far as my own syntax highlighting code plus a side-by-side diff visualizer (all JS of course). Maybe I will go back sometime and clean it up and make a really simple version. Like you said, pastie + line comments [18:55] QuietKnight: I stopped because I determined that integrating with all of the SCMs would take forever :/ [18:56] isaacs: right [18:56] isaacs: well, github already has line comments on commits, which is great [18:56] isaacs: but sometimes you're writing a whole new file and need to pick it apart as a whole thing [18:56] QuietKnight: didn't know that [18:57] mikeal1: i think the issue with comments on files is that they become out of date [18:57] QuietKnight: I was just thinking it would be great for #javascript, lol [18:57] mikeal1: now, if they *only* allowed you to comment on a line number [18:57] mikeal1: and then removed the comment when that block changed [18:57] isaacs: mikeal1: so lemme comment on a particular commit point [18:57] mikeal1: and kept the comment in line with the block [18:57] isaacs: (already sent the enh req to @defunkt) [18:57] mikeal1: that would be hot [18:57] isaacs: mikeal1: indeed [18:58] isaacs: so, i've gotta make npm work with node again. le sigh... [18:59] mikeal1: net2 breakage? [19:00] isaacs: like you wouldn't believe. [19:00] isaacs: all npm does is sub procs and file operations [19:00] isaacs: oh, and some htt [19:00] isaacs: http [19:00] mikeal1: i didn't realize file operations changed [19:00] isaacs: actually, it's not so bad, now that i look at it... [19:00] mikeal1: i saw the subprocess stdin/stderr differences [19:04] isaacs: yeah, and i actually only use subproc for tgz unpacking now [19:04] isaacs: i was thinking back a few versions ago when npm did subproc for damn near everything, and was actually half-written in bash [19:04] isaacs: but i removed that feature. [19:05] mikeal1: how much did the http api change? [19:05] cpojer1 has joined the channel [19:07] isaacs: mikeal: not even a little, afaik [19:08] zelnick_ has joined the channel [19:08] QuietKnight: I have a question one of you guys might be able to answer, since I'm not getting a response in #commonjs [19:09] mjr_: I was hoping that the http API would change to expose the write buffering somehow. [19:09] QuietKnight: For Modules/1.0 it says: "If there is a dependency cycle, the foreign module may not have finished executing at the time it is required by one of its transitive dependencies; in this case, the object returned by "require" must contain at least the exports that the foreign module has prepared before the call to require that led to the current module's execution." I'm trying to get the plain-English meaning out of that [19:09] QuietKnight: Module A requires Module B. Module B assigns stuff to the exports object, which is returned to Module A. It is talking about Module B assigning to the exports object asynchronously? [19:09] mjr_: But OutgoingMessage.prototype.write() looks almost identical to the older version. [19:10] sh1mmer has joined the channel [19:10] _ry: mjr_: not yet [19:10] _ry: i really want it - i just haven't had the time [19:11] _ry: it shouldn't be hard to hack [19:11] mjr_: Yeah, I keep thinking I might hack it in, then I find other, more urgent things I need from node. [19:11] isaacs: QuietKnight: no, it's talking about how the "exports" object might not be filled in yet when you get it. [19:11] _ry: i think there can be a small perf increase if you can get OutgoingMessage.prototype.write() to go directly to socket instead of first to array and then flush() [19:12] isaacs: QuietKnight: ie, you may be getting the same (referentially identical) "exports" object that the module is attaching to, but A -> B -> A, so the "A" that "B" gets isn't done yet. [19:12] isaacs: QuietKnight: it's only gotten to the point where it required B [19:12] isaacs: _ry: hm... i'm seeing process.stdout but no process.stderr [19:12] QuietKnight: oh, doh. I see. I didn't get circular dependency out of "dependency cycle" [19:13] QuietKnight: isaacs: thanks [19:13] isaacs: QuietKnight: it's possible to break this today by assigning to module.exports in a dependency cycle. we're working on fixing that. [19:14] _ry: isaacs: yeah needs to be hacked in. stderr is sync so it's a bit different [19:14] _ry: process.stderr.write() should always return true [19:14] _ry: no matter how large [19:14] mjr_: _ry: I think sometimes it is the right thing to buffer up in the output array or wherever, but we just need a way to control the size. [19:14] isaacs: _ry: gotcha [19:15] isaacs: _ry: for now i'll just use process.binding('stdio').writeError [19:16] kriskowal has joined the channel [19:16] voxpelli-laptop has joined the channel [19:17] isaacs: ok, npm works with node again. [19:21] tilgovi has joined the channel [19:22] derferman_ has joined the channel [19:23] Tim_Smart has joined the channel [19:29] isaacs: mikeal1: hey [19:29] mikeal1: hiya [19:29] isaacs: so, when i try to sync the js-registry, i'm getting this: [19:29] isaacs: Error: removeListener only takes instances of Function [19:30] isaacs: mikeal1: http://gist.github.com/339506 [19:31] isaacs: should the --couch argument point to the database or just the server? [19:32] mikeal1: the database [19:32] isaacs: ok... same error [19:32] mikeal1: you sure you are totally up to date [19:32] isaacs: GET /jsregistry/_design/app returns false, since it's never been synced yet [19:32] isaacs: yeah [19:32] mikeal1: because a search for removeListener only finds one line [19:32] isaacs: s/false/404/ [19:32] mikeal1: and it's a line where i only remove the function [19:33] mikeal1: you sure you've got node.couchapp.js [19:34] isaacs: HEAD is on ef7938f5a9d7cad12d235576954880958d55ffb5 [19:35] mikeal1: that's the latest [19:35] isaacs: ef7938f Adding much better error handling for http client issues. [19:36] isaacs: k, this is odd... [19:36] isaacs: i think it might be a bug in events.js [19:36] mikeal1: let me update node to newest and see if I see it [19:36] isaacs: ah, not a bug. [19:36] isaacs: just difference [19:36] isaacs: removeListener = function (type, listener) { [19:38] isaacs: mikeal: k, i'll have a patch for you. [19:38] mikeal1: is that how it works on latest node? [19:41] voxpelli-laptop has joined the channel [19:42] isaacs: mikeal: yep [19:43] isaacs: mikeal: pull plz http://github.com/isaacs/node.couchapp.js/commit/06e8a4ab87ad86cfe9506b112f9366e1bc3783ca [19:43] isaacs: now it [19:43] isaacs: 's [19:43] isaacs: now it's failing in a new way :) [19:44] mikeal1: done [19:44] mikeal1: ok, paste me the new way [19:44] mikeal1: and as soon as node is done compiling I can test it :) [19:46] Tim_Smart: _ry: ping [19:47] tlrobinson has joined the channel [19:47] mikeal1: wow! [19:48] mikeal1: isaacs: this is CRAZY [19:48] isaacs: mikeal: ? [19:48] mikeal1: there is a lot of printing [19:48] _ry: Tim_Smart: hey [19:49] mikeal1: is not printing all http requests or something? [19:49] mikeal1: s/not/node [19:49] Tim_Smart: _ry: About the whole sendFD and recvMSG thing, how do I use it? haha [19:49] _ry: Tim_Smart: it needs a higher-level interface [19:49] Tim_Smart: like is there any test cases for it or something [19:49] isaacs: mikeal: um... i'm not seeing that? [19:49] _ry: Tim_Smart: no - it used to be built into net.Stream but i decided to take it out [19:49] mikeal1: so, it's working for me still :) [19:50] _ry: i want to make a net.FDStream class [19:50] isaacs: mikeal: are you creating a brand new db from scratch and then syncing into that? [19:50] mikeal1: but i do see a ton os stuff in the console [19:50] mikeal1: isaacs: yup [19:50] isaacs: hmm.... [19:50] mikeal1: the db already exists [19:50] Tim_Smart: _ry: Right. So how do you get the fd in the child process, to set up the pair? [19:50] mikeal1: when i run sync [19:50] mikeal1: but i clear it out before i sync just for a clean test [19:50] javajunky has joined the channel [19:50] mikeal1: but even running again it updates the doc just fine [19:51] isaacs: mikeal: on port 80? [19:51] mikeal1: i have mine on 5984 [19:51] _ry: Tim_Smart: well eventually it'd be good to have a special "start a node child process" command which passed a socketpair to the child [19:51] _ry: for now, what we can do is open /tmp/node.sock [19:51] Tim_Smart: yup, it would [19:51] _ry: have the child connect to that [19:51] _ry: pass the fd over it [19:51] mikeal1: you should just come up and work from the couchio office tomorrow :) [19:52] Tim_Smart: OK, sounds good [19:52] mikeal1: i'm pretty sure this is a couchdb vhost + rewrite + host header issue [19:52] isaacs: i see [19:52] _ry: Tim_Smart: maybe the fd sending should be part of net.Stream... [19:52] Tim_Smart: _ry: could you pass the fd number over stdin? [19:52] _ry: Tim_Smart: i don't think so [19:52] isaacs: mikeal: fyi, if you wrap your callback error messages in a new Error() you'll get a stack trace [19:52] _ry: maybe though [19:52] mikeal1: so, do you already have the vhost set in couchdb? [19:53] mikeal1: isaacs: why is all this stuff printing ? http://gist.github.com/339520 [19:53] mikeal1: that's new since I updated node [19:53] _ry: we're about this far |<--->| from having multi-process servers [19:54] isaacs: mikeal: vhost set in couchdb: yes. the vhost is registry.npmjs.org and couch is on port 80 of couch.izs.me [19:54] isaacs: port 5984 is not exposed directly [19:54] mikeal1: ok, so couch.izs.me has no vhost ? [19:54] isaacs: mikeal: true [19:54] mikeal1: ok, good [19:54] isaacs: going to couch.izs.me just shows json [19:55] isaacs: and couch.izs.me/_utils is futon [19:55] isaacs: etc. [19:55] mikeal1: and you're syncing to —couch http://couch.izs.me/jsregistry [19:55] isaacs: correct [19:55] Tim_Smart: _ry: http://github.com/Tim-Smart/node-common/tree/webworker/lib/webworker/ [19:55] mikeal1: that should work [19:55] mikeal1: what is the error/ [19:55] mikeal1: ? [19:55] isaacs: error Could not create/update ddoc. [19:56] Tim_Smart: _ry: Currently using stdio, will try port it over to sockets later [19:56] mikeal1: are you in admin party? [19:56] isaacs: yep [19:57] isaacs: and yes, lots and lots of output [19:57] isaacs: which is odd, since i don't see that when npm makes requests [19:57] mikeal1: isaacs: that's a client error [19:57] mikeal1: at the http layer [19:57] mikeal1: so [19:58] mikeal1: or….. maybe now [19:58] mikeal1: er not [19:58] _ry: Tim_Smart: so, what would be great is if you could pass the fd of a server over the socket to the other process [19:58] _ry: Tim_Smart: then the two processes could accept connections [19:58] _ry: the kernel will load balacne between them [19:58] mikeal1: nevermind [19:59] Tim_Smart: _ry: Yes, that would be nice :D [19:59] mikeal1: isaacs: git pull [20:00] mikeal1: run again and paste me the error [20:00] Tim_Smart: Well considering fd's are just a number (in Javascript, or do they wrap the actual fd resource in the C++?), you could just pass it any-old how [20:01] isaacs: mikeal: node.couchapp.js or jsregistry? [20:01] mikeal1: couchapp [20:02] isaacs: TypeError: Object # has no method 'inpect' [20:02] mikeal1: dammit [20:02] mikeal1: inspect [20:03] mikeal1: pull [20:03] isaacs: http://gist.github.com/339506 [20:04] Tim_Smart: isaacs: In module.js, maybe try keep 1 new line between each function? Having them one after another is a little hard on the eyes >.< [20:04] isaacs: this looks relevant: , statusCode: 411 [20:04] Tim_Smart: not sure [20:05] mikeal1: that code does a status code check [20:05] mikeal1: but i'm not convinced that is the right error [20:05] isaacs: mikeal: yah i see that. expects 201 [20:05] mikeal1: so, it's hitting lighthttpd [20:05] mikeal1: and lighthttpd needs the content-length [20:05] isaacs: wait wut? [20:05] isaacs: lighttpd? [20:05] mikeal1:    , server: 'lighttpd/1.4.19' [20:06] isaacs: hahahaha!@H!H@HAHAAH [20:06] isaacs: this is the most delicious pebkac i've ever been a part of!! [20:06] isaacs: hold on, lemme update the /etc/hosts in the vm like i did in the host. i'm so sorry, mikeal, i'm an idiot. [20:06] mikeal1: it's all good :) [20:06] isaacs: it's trying to send from the VM to my live web server, which ... get this ... ***doesn't have couchdb on it*** [20:07] jashkenas has joined the channel [20:08] isaacs: d'oh. still getting a 411, this time from nginx [20:08] isaacs: maybe it needs the content-length as well? [20:08] mikeal1: i can add it for this case [20:09] mikeal1: the method I use for this request doesn't support write buffering of the PUT [20:09] isaacs: or, maybe i need to configure nginx to accept unlengthed PUT requests to that hostname somehow [20:09] isaacs: mikeal: since couchapp reads it from a file, you could just stat the thing, yes? [20:10] mikeal1: fixes [20:10] mikeal1: er fixed [20:10] tmpvar has joined the channel [20:10] mikeal1: isaacs: git pull [20:11] isaacs: YAY!!! [20:12] mikeal1: cool [20:12] isaacs: it worked! [20:12] isaacs: one doc, 81kb [20:12] mikeal1: i'll bug jchris on monday to figure out the auth stuff [20:12] isaacs: er, 8.1 [20:13] tlrobinson has joined the channel [20:21] gwoo has joined the channel [20:30] kriskowal has joined the channel [20:31] kjeldahl has joined the channel [20:31] softdrink has joined the channel [20:38] unomi has joined the channel [20:59] steadicat has joined the channel [21:08] javajunky has joined the channel [21:09] binary42 has joined the channel [21:09] cpojer1 has joined the channel [21:12] alexiskander has joined the channel [21:14] bpot has joined the channel [21:15] cloudhead has joined the channel [21:18] dnolen has joined the channel [21:22] alexiskander has joined the channel [21:25] lifo has joined the channel [21:26] cloudhead: is there a convenient way to iterate over a paths array, checking for the existence of a file? [21:26] lifo has joined the channel [21:26] cloudhead: I can't just break out of the loop because path.exists uses a callback [21:28] mikeal1: directories.indexOf("file") !== −1 [21:30] cloudhead: hmm good idea [21:33] cloudhead: wait no [21:33] cloudhead: the file isn't in the list of dirs [21:33] cloudhead: those are dirs the file could be inside of [21:33] cloudhead: like the require.paths array [21:33] jashkenas: globs would be nice for this. [21:34] cloudhead: yea [21:34] cloudhead: I wonder how require does it actually [21:34] cloudhead: gonna have a look [21:37] rydgel has joined the channel [21:37] rydgel: hello [21:38] rydgel: have someone compiled successfully node.js on FreeBSD 8.0 (AMD64) ? [21:39] Tim_Smart: rydgel: The build bot hasn't [21:39] rydgel: oh there is a buildbot [21:39] Tim_Smart: http://buildbot.nodejs.org:8010/waterfall [21:40] rydgel: thanks [21:41] rydgel: I will try to take an earlier revision [21:42] rnewson has joined the channel [21:45] hecticjeff has joined the channel [21:50] voxpelli-laptop has left the channel [21:50] mikeal1 has joined the channel [21:53] comster has joined the channel [21:59] softdrink has joined the channel [21:59] javajunky has joined the channel [22:08] bpot has joined the channel [22:10] markwubben has joined the channel [22:15] sh1mmer has joined the channel [22:19] devinus has joined the channel [22:20] devinus: so, what's the future of net2 ? what's the goal? [22:21] devinus: i'm seeing mentions of binary Buffer support [22:22] micheil: devinus: net2 is now merged into HEAD [22:24] RayMorgan has joined the channel [22:25] javajunky: ;) isn't it just [22:25] javajunky: seems to be working well which is nice [22:25] maushu has joined the channel [22:26] _ry: has anyone started using the unix sockets? [22:27] Tim_Smart: _ry: About to :p [22:28] Tim_Smart: process.binding('net').socketpair etc right? [22:30] RayMorgan has joined the channel [22:34] devinus: ~/.noderc ? [22:34] devinus: that would be nice [22:34] devinus: or is there another way i can get node-repl to start up by default [22:34] devinus: with some options [22:35] micheil: alias node="node-repl" [22:35] micheil: ? [22:36] _ry: it might be nice to have a ~/.node/startup.js [22:36] devinus: _ry: exactly what i was thinking [22:36] jashkenas has left the channel [22:36] micheil: that could get messy [22:36] devinus: sorry hard to type with my laptop hanging upside down :-/ [22:36] _ry: it could get messy, yeah [22:37] micheil_mbp has joined the channel [22:37] micheil_mbp: whoops. [22:37] micheil_mbp: oh well, I'm off. [22:38] devinus: are there any areas where Node is being forced to diverge from some of the the CommonJS proposals b/c of it's async nature? [22:38] devinus: ACTION curious [22:38] Tim_Smart: devinus: require.* methods [22:39] Tim_Smart: but the commonJS spec is pretty flexible there I think [22:42] devinus: gah [22:42] mikeal1 has joined the channel [22:42] devinus: why do the commonjs proposals dont mention node at all [22:43] mikeal1: do they mention any other js platform? [22:43] QuietKnight: I saw a mention of node in the SecureModules area [22:44] eyzn: http://commonjs.org/impl/ [22:44] eyzn: scroll down a little [22:45] eyzn: ah lol [22:45] eyzn: nvm [22:46] mikeal1: is Modules 1.1 in a state that we should start supporting it? [22:47] isaacs: mikeal: grrrrr [22:47] mikeal1: hehe [22:47] mikeal1: i already don't like the language in this [22:47] mikeal1: The "require" function may have a "main" property that is read-only, don't delete and represents the top-level "module" object of the program. If this property is provided, it must be referentially identical to the "module" object of the main program. [22:47] isaacs: oh, wait, modules 1.1 [22:47] isaacs: yeah, i support that [22:48] mikeal1: MAY have [22:48] isaacs: Tim_Smart and i have been talking about that [22:48] isaacs: isaacs/node/require-rewrite-wip [22:48] mikeal1: i would say MUST if the spec wants to insure cross implementation modules [22:49] mikeal1: WTF [22:49] mikeal1: The "module" object must have a read-only, don't delete "id" property [22:49] isaacs: mikeal: yeah [22:50] mikeal1: how the hell do you insure that [22:50] isaacs: Object.defineProperty(module, "id", {value:id, enumerable:true}) [22:50] isaacs: es5 ftw [22:50] mikeal1: that's ONLY in es5 [22:50] isaacs: it's in v8 [22:50] isaacs: and i don't really care about any other commonjs platforms all that much, personally [22:50] mikeal1: __defineProperty has been in SM for a long time [22:51] isaacs: not to be mean or anything, but they're not what i work on [22:51] mikeal1: i don't know why the spec requires it [22:51] isaacs: well, you can do the same thing with __defineProperty__ [22:51] devinus: this would rock so hard: http://edward.oconnor.cx/2009/12/mozrepl-for-nodejs [22:51] mikeal1: i need to email the commonjs list [22:52] mikeal1: because the uri bit fucks me on CouchDB [22:52] r11t_ has joined the channel [22:52] isaacs: mikeal: howso? [22:52] mikeal1: because the identifiers aren't relative to http or the filesystem [22:52] isaacs: the uri doesn't have to be relative to anything [22:52] mikeal1: so you can't create a URI [22:52] isaacs: it's just an identifier [22:52] isaacs: for example, the module.uri in the native path module is "path" [22:52] mikeal1: module.id is an identifier [22:52] isaacs: it's an identifier such that require(module.id) === module.exports [22:53] mikeal1: isn't the point of .uri to be more than just a generic identifier? [22:53] isaacs: well, it's what the module.id resolved to [22:53] mikeal1: yeah, i can't really do that [22:54] isaacs: it could be a _rev [22:54] mikeal1: i'm so confused [22:54] isaacs: so leave it out :) [22:54] mikeal1: what is the difference between .id and .uri and what are they suppose to be used for? [22:55] isaacs: .uri is like __filename [22:55] isaacs: .id is an absolute identifier that will return the current module [22:55] mikeal1: " String that is the fully-qualified URI to the resource [22:55] isaacs: so when you do require("foo"), the id might be /Users/isaacs/.node_libraries/foo but the uri would be .../foo.js [22:55] mikeal1: __filename is not a fully qualified URI without "file:///" [22:55] mikeal1: in front of it [22:55] rnewson: trunk works since the net2 merge? [22:55] isaacs: well, that's dumb. everyone assumes file:// by edefault [22:56] mikeal1: isaacs: not in the browser implementations, it'll be http:// [22:56] mikeal1: it *think* that's the purpose of this attribute [22:56] r11t_ has joined the channel [22:56] isaacs: mikeal: type /Users/mikeal/.bashrc into firefiox, and see what happens [22:56] mikeal1: i can't [22:56] isaacs: browsers assume file:// if unqualified [22:57] mikeal1: mine won't do what yours does :) [22:57] mikeal1: because of some extensions [22:57] mikeal1: but i know what you're gettign at [22:57] isaacs: oh, ok [22:59] maritz: i get "Permission denied" when i try to bin the http server to port 80. port 3000 works just fine and no other process is using port 80. [23:00] rnewson: maritz: did you run as root or use authbind or similar? [23:00] r11t_ has joined the channel [23:01] brainproxy: anyone got an example of passing a .js script an argument from the command line when it's exec'd using node [23:02] maritz: rnewson: not as root. and afaik i'm not using authbind :D [23:02] rnewson: maritz: only root can bind to <1024, so that's your problem. [23:03] javajunky: brainproxy: http://github.com/ciaranj/kiwi/blob/master/bin/kiwi.js#L758 ? [23:04] mikeal1: i just realized I never actually posted anything to commonjs that we even added modules to CouchDB :) [23:04] mikeal1: sent [23:04] maritz: thanks rnewson :) [23:05] r11t_ has joined the channel [23:07] Tim_Smart: _ry: If I was to open a socket on /tmp/node.sock for web workers, what happens if I were to create more than one worker? [23:07] Tim_Smart: it is this to just init the fd's? [23:07] Tim_Smart: s/it// [23:12] _ry: Tim_Smart: a unix socket is like a tcp server [23:12] BinaryPie has joined the channel [23:13] idoru has joined the channel [23:13] _ry: Tim_Smart: yeah it's just to pass the fd [23:13] _ry: Tim_Smart: each time a web worker starts, they connect to /tmp/node.sock and get a copy of the server [23:13] _ry: of the http server [23:13] Tim_Smart: _ry: Ah cool. Thought so. So essential a simple stack / queue to avoid conflict [23:14] Tim_Smart: Well I'm currently tackling IPC for now [23:17] maritz: okay, trying to use authbind. i'm too stupid. have a /etc/authbind/byport/80 file that is accessible by the user and then call "authbind node app.js" [23:18] maritz: doesn't work. what am i doing wrong? [23:19] rnewson: maritz: check permissions of the file. calling user needs exec rights to the byport/80 file. [23:20] maritz: ookay :D [23:21] maritz: works. great :) [23:22] javajunky has left the channel [23:28] hellp has joined the channel [23:28] devinus: who develops for visionmedia ? [23:29] isaacs: mikeal: can you see this? http://registry.npmjs.org/npm/0.0.5 [23:32] JimBastard has joined the channel [23:34] idoru has joined the channel [23:34] tmpvar: isaacs, i can [23:34] isaacs: w00t!! [23:35] tmpvar: so im going to finally use jsdom for some screen scraping nonsense (will be using isaacs' sax.js as well) [23:35] isaacs: nice [23:35] binary42 has joined the channel [23:37] kriskowal: isaacs might want to throw a file name on the content disposition [23:37] JimBastard: you scraping pages as images? [23:38] JimBastard: tmpvar [23:38] creationix has joined the channel [23:38] Tim_Smart: tmpvar: I was looking at porting a C / C++ DOM library to Node [23:38] JimBastard: javascript party [23:40] creationix has joined the channel [23:42] dnolen has joined the channel [23:53] tmpvar: JimBastard, nope [23:53] tmpvar: Tim_Smart, oh? [23:53] Tim_Smart: tmpvar: Yeah. Well DOM isn't exactly a small operation [23:54] Tim_Smart: and servers need to be uber fast [23:54] tmpvar: yeah [23:54] Tim_Smart: And I can't be bothered implementing a DOM library myself, so using a pre-existing one makes sense [23:55] tmpvar: depending on your needs you could have one dom instance and reuse it [23:55] Tim_Smart: Yeah, and just to template.clone() or something [23:56] tmpvar: im not quite sure what i should do with this node-microseconds [23:58] tmpvar: Tim_Smart, you may be able to use libxml [23:58] tmpvar: write some bindings to their dom stuff [23:59] Tim_Smart: tmpvar: Yeah, libxml2 was in my sights [23:59] Tim_Smart: and for html, use a xmlserializer or something [23:59] tmpvar: yeah