[00:01] r11t has joined the channel [00:01] BBB has joined the channel [00:09] tmpvar has joined the channel [00:15] charlenopires_ has joined the channel [00:18] CIA-77: node: 03Ryan Dahl 07master * r939a6c7 10/ doc/index.html : Clean up homepage - http://bit.ly/ds2BM3 [00:18] CIA-77: node: 03Rob Ellis 07master * r5c78c45 10/ (lib/ini.js test/fixtures/fixture.ini test/simple/test-ini.js): Added Parse INI to Node, tests - http://bit.ly/9KjwMV [00:20] micheil_mbp has joined the channel [00:36] abadr has joined the channel [00:38] felixge has joined the channel [00:38] felixge has joined the channel [00:43] softdrink has joined the channel [00:48] r11t_ has joined the channel [01:01] siong1987 has joined the channel [01:03] dnolen has joined the channel [01:04] aho has joined the channel [01:05] cloudhead has joined the channel [01:09] CIA-77: node: 03Ryan Dahl 07master * rb9cd336 10/ (lib/querystring.js test/simple/test-querystring.js): Bugfix in querystring - http://bit.ly/aTerv3 [01:17] alexiskander has joined the channel [01:18] RayMorgan has joined the channel [01:20] brapse has joined the channel [01:26] creationix has joined the channel [01:37] dnolen has joined the channel [01:40] creationix has joined the channel [01:40] mattly has joined the channel [02:04] Yuffster has joined the channel [02:04] CIA-77: node: 03Ryan Dahl 07master * r39b63df 10/ (AUTHORS ChangeLog doc/api.txt doc/index.html wscript): bump version - http://bit.ly/94Qkju [02:05] tmpvar: _ry, 2 week iterations, nice [02:16] Tim_Smart has joined the channel [02:17] creationix has joined the channel [02:18] creationix_ has joined the channel [02:24] _ry: tmpvar: it should be a bit faster [02:24] _ry: this one got pushed back though [02:25] _ry: okay. so i'm going to try to make some progress towards 0.2 this weekend [02:25] tmpvar: nice [02:25] tmpvar: 0.2.0 is? [02:26] _ry: Buffers, unix sockets, splitting up process.stdio into process.stdin,err,out [02:26] Tim_Smart: :D [02:30] tmpvar: i like [02:43] ryanmcgrath has joined the channel [02:43] ryanmcgrath: Hey-o [02:43] ryanmcgrath: Is there any way to set fs.rmdirSync to be recursive? [02:43] ryanmcgrath: i.e, the equivalent of rm -rf [02:46] _ry: you have to do it manually [02:46] creationix: does anyone here have much experience with libev, the #schmorp room seems very quiet this time of day [02:46] _ry: creationix: i do [02:47] creationix: do you have a second to help out a c noob? [02:47] _ry: sure [02:47] creationix: I want a simple process that communicates with other processes over tcp and has some time based events [02:48] ryanmcgrath: Bleh, that kinda blows. :\ [02:48] BryanWB has joined the channel [02:48] ryanmcgrath: Alright though [02:48] creationix: from what I can tell libev helps with this [02:48] softdrink has joined the channel [02:48] creationix: _ry: I got this far http://pastie.org/856796 [02:48] _ry: :) [02:49] _ry: you're almost there :) [02:49] creationix: obviously I'm better at JS [02:49] tmpvar: HA [02:49] tmpvar: i'd hope so [02:49] _ry: creationix: libev is pretty low-level - it just gives you notifications of when your fds are readable or writable [02:49] _ry: creationix: maybe you want to use evcom - which is for streaming over libev [02:50] creationix: _ry: that's the one you made right? [02:51] _ry: yeah [02:51] _ry: creationix: http://github.com/ry/evcom/blob/master/evcom.h [02:51] _ry: no docs though :) [02:51] creationix: hmm, seems to require gnutls [02:52] creationix: can I disable that? [02:52] _ry: yeah [02:52] _ry: by default it's disabled [02:52] _ry: what do you want to do though? [02:53] creationix: I just need tcp sockets over a lan [02:53] creationix: and timeouts [02:53] creationix: interprocess protocol stuff [02:53] _ry: to do what? [02:53] dekz has joined the channel [02:54] creationix: a simulation of the Ricart Agrawala protocol [02:54] tmpvar: tcp is slow, udp is like lightning [02:55] tmpvar: ACTION throws wrenches [02:55] creationix: I'm fine with udp if it's easier, the test will be over ethernet [02:55] tmpvar: probably not easier [02:55] _ry: creationix: sounds hard - why not use node? [02:55] creationix: solaris sparc [02:55] _ry: ah [02:55] _ry: twisted? [02:56] creationix: has to be c or java [02:56] _ry: mm [02:56] _ry: ACTION is glad he's not in school [02:56] creationix: tell me about it [02:58] _ry: so you get like, a list of sites? [02:58] creationix: I'll poke around evcom a bit and see what I can figure out. I was taught c 10 years ago, but never used it since [02:58] _ry: you open a connection to all of them? [02:58] creationix: for the simulation? [02:58] _ry: yeah [02:59] brandon_beacher has joined the channel [02:59] creationix: I read a config file that specifies parameters like how long each node is in the critical section and how many nodes there are [02:59] creationix: then I fork up that many nodes, give each one of them a list of all the other nodes and the specs [02:59] creationix: then they trade messages according to the specs and the protocol till they're done [02:59] _ry: oh [03:00] jed has joined the channel [03:00] creationix: all the while outputting log files [03:00] _ry: all on the same computer? [03:00] creationix: It has to work across machines if needed [03:01] creationix: I'm not sure how to launch them all at once though, maybe a bash script with ssh keys [03:02] creationix: yeah, I'll use bash for the test-runner [03:02] _ry: anyway - it's doable - just going to take a bit. use evcom if you want to be non-blocking [03:02] _ry: it'll help with the writes [03:03] creationix: thanks, I'm tweaking the makefile now [03:03] creationix: evcom runs on sparc right? [03:04] _ry: sure [03:04] _ry: you might need to fix an error here or there [03:05] Tim_Smart has joined the channel [03:06] creationix: this will be a long night [03:06] creationix: at least I'll know the innards of node a little better when I'm done [03:12] ryanmcgrath: Might be a stupid question, but whatevs: what's the different between stats/lstat? [03:13] nodejs_v8 has joined the channel [03:14] RayMorgan_ has joined the channel [03:17] creationix: ryanmcgrath: I think one of them dereferences symlinks and the other doesn't [03:18] ryanmcgrath: Hmmmm [03:18] creationix: I think the commit message where it was added explains it [03:18] creationix: I personally have no clue [03:19] dnolen has joined the channel [03:19] nodejs_v8 has joined the channel [03:24] nodejs_v8 has joined the channel [03:25] Tim_Smart: nodejs_v8 has a home now, temporarily... [03:27] creationix: Tim_Smart: how does it work? [03:27] Tim_Smart: nodejs_v8: Object.getOwnPropertyNames(this) [03:27] nodejs_v8: Tim_Smart: ["TypeError", "decodeURI", "String", "Function", "Number", "undefined", "parseFloat", "encodeURI", "encodeURIComponent", "ReferenceError", "RegExp", "escape", "Array", "isNaN", "URIError", "unescape", "RangeError", "Date", "Infinity", "decodeURIComponent", "EvalError", "Math", "Boolean", "Error", "SyntaxError", "Object", "NaN", "eval", "parseInt", "execScript", "JSON", "isFinite"] [03:27] Tim_Smart: I just found a server for it, thats all [03:28] creationix: nodejs_v8: Object.getOwnPropertyNames(Object) [03:28] nodejs_v8: creationix: ["getOwnPropertyNames", "arguments", "length", "create", "name", "keys", "prototype", "getOwnPropertyDescriptor", "caller", "getPrototypeOf", "defineProperty", "defineProperties"] [03:28] creationix: sweet, latest v8 [03:28] Tim_Smart: whats new in the latest v8? [03:29] creationix: 2.1.0 added Object.getOwnPropertyNames and 2.1.1 added Object.defineProperty [03:29] creationix: though 2.1.2 was just bugfixes [03:30] Tim_Smart: right [03:30] Tim_Smart: creationix: Btw, I added you to biggie, and biggie-orm [03:30] creationix: I saw [03:30] Tim_Smart: I'm going to start work on biggie-orm first, as that is the biggest road-block for now [03:30] konobi: what does "persistent" mean in the fs.watchFile options? [03:31] creationix: Tim_Smart: I'll look at it after this weekend, I'm totally swamped [03:31] ryanmcgrath: is fs.stat always async? [03:31] Tim_Smart: creationix: Yeah, de-swamp yourself first [03:32] creationix: Tim_Smart: then ry has dibs on my time, I'm doing the new docs for node, so it will be a while [03:33] creationix: ryanmcgrath: fs.statSync is sync [03:33] creationix: most the fs functions have a sync version [03:33] ryanmcgrath: Mmmm thanks [03:33] ryanmcgrath: Yeah, I just somehow missed that. [03:34] creationix: just don't use sync stuff inside event loops, but you probably knew that [03:35] ryanmcgrath: Huh [03:35] ryanmcgrath: I get an error when I try to use statSync [03:36] ryanmcgrath: Oooh [03:36] ryanmcgrath: I bet I see why [03:36] ryanmcgrath: Yeeaaahhh [03:36] creationix: nodejs_v8: require('fs').statSync(__dirname) [03:36] nodejs_v8: creationix: Exception: ReferenceError: require is not defined [03:37] ryanmcgrath: Got what I needed now [03:37] dnolen_ has joined the channel [03:38] Tim_Smart: creationix: I don't think I'll add node.js stuff to the sandbox. Some smart kid would: createChildProcess('rm', ['-Rf', '/']); or something [03:38] creationix: true [03:38] Tim_Smart: It's not running as root though, so it should be fine mostly [03:39] creationix: you could run it in a chroot and have it auto-restart if it kills itself [03:39] creationix: of course it could still do stuff like form bombs [03:39] creationix: *fork bombs [03:40] Tim_Smart: creationix: Yeah a clean sandbox is fine for now, otherwise I would spend a lot of time patching a custom node install or something [03:40] Tim_Smart: or overwriting a whole lot of stuff [03:41] creationix: well, I'd better close irc or I'll never get my work done [03:41] creationix: goodnight everyone [03:42] ryanmcgrath: Huh [03:43] ryanmcgrath: How does one go about removing a file in Node? [03:43] ryanmcgrath: I see ways to remove directories/symlinks/etc; maybe I've missed something? [03:50] _ry: Tim_Smart: more deps/v8/ChangeLog [03:50] dandean has joined the channel [03:51] Tim_Smart: _ry: ? [03:51] Tim_Smart: _ry: Ah gotcha [03:58] ryanmcgrath: I feel like I must be missing something here. :\ [03:59] Tim_Smart: ryanmcgrath: I think there a function for unlink-ing files [03:59] ryanmcgrath: Is that the same as deleting, though? I may just be oblivious to the terminology. [03:59] ryanmcgrath: ACTION shrugs [03:59] inimino: ryanmcgrath: yes. [04:00] ryanmcgrath: Oh wow [04:00] ryanmcgrath: Yeah, that's what I need. [04:00] ryanmcgrath: Thanks [04:00] morgan has joined the channel [04:04] stepheneb has joined the channel [04:08] jed has joined the channel [04:10] softdrink has joined the channel [04:14] konobi: _ry: ping [04:19] konobi: _ry: could you rebase/merge master into net2 plz [04:23] BryanWB has joined the channel [04:37] morgan has joined the channel [04:43] PyroPeter has joined the channel [04:48] isaacs has joined the channel [04:50] tmpvar: hey isaacs [04:50] isaacs: hiya, tmpvar [04:51] _ry: konobi: ok [04:52] CIA-77: node: 03Ryan Dahl 07master * ra258992 10/ src/node.cc : Depreciation process.unloop() - http://bit.ly/bN3EBi [04:52] _ry: konobi:done [04:53] dandean: hello! I just did: git pull, then make, and it blew up with this message: "The project was not configured: run "waf configure" first!". I didn't have to do that the first time I installed node. Any pointers? [04:53] tmpvar: ./configure [04:53] dandean: ahhh! duh. thanks [04:53] tmpvar: make && sudo make install [04:55] konobi: _ry: I'm also getting a weird error with node... where the only info I get is "node.js:758:9" [04:56] tmpvar: sounds like you are throwing a non new Error() [04:56] tmpvar: (could be wrong though) [04:56] _ry: konobi: yes throwing a non Error [04:57] _ry: konobi: that use to still give a nice error message though [04:57] _ry: i wonder what changed [04:57] _ry: i should add a test for that.. [04:57] konobi: yup, that fixed it [04:57] tmpvar: dunno, i experienced that a couple days ago [04:58] mattly has joined the channel [04:59] konobi: hhhmmm... now to work out how up update a submodule [04:59] tmpvar: konobi, what are you working on? [05:00] steadicat has joined the channel [05:00] konobi: tmpvar: some internal-ish tools [05:00] konobi: amqp, etc. [05:00] tmpvar: ah [05:00] BryanWB has joined the channel [05:00] _ry: konobi: just like normal - git pull; git checkout net2 [05:01] tmpvar: net2 is deprecated, no? [05:01] _ry: well - it never was [05:01] _ry: :) [05:01] konobi: _ry: submodules are headless, so there's nothing to pull against, iirc [05:01] tmpvar: ha, i thought about that after i said it.. [05:02] _ry: konobi: within the submodule dir it's a normal git repo [05:02] _ry: konobi: but from outside it's just a commit reference [05:03] _ry: i think [05:03] _ry: :) [05:03] tmpvar: man, logs would be great if they were searchable [05:03] siong1987_ has joined the channel [05:04] _ry: ACTION away [05:15] kennethkalmer has joined the channel [05:19] konobi: sys is gone too? [05:23] mattly has joined the channel [05:25] RayMorgan has joined the channel [05:26] bpot has joined the channel [05:31] siong1987_ has joined the channel [05:31] ryanmcgrath: Anybody know what an ideal way to get the equivalent of ~ in Node would be? [05:31] ryanmcgrath: i.e, I'm trying to generically target the home directory [05:41] _ry: konobi: no, it's there [05:41] _ry: ryanmcgrath: $HOME ? [05:42] _ry: ryanmcgrath: process.env.HOME [05:42] ryanmcgrath: Mmm, thanks [05:50] dmpk2k: Is there a way to set a timeout on an http.ClientRequest? [05:52] ryanmcgrath: What's an optimal way to check the permissions of a file in Node? [05:54] tmpvar: fs.stat i believe [05:54] tmpvar: ryanmcgrath, ^ [05:54] tmpvar: dmpk2k, what do you mean? [05:55] ryanmcgrath: Eh, I'm somewhat confused, I'll admit - the "mode" that's reported by fs.stat, what exactly is that? [05:56] ryanmcgrath: Like, how does it relate to something like 755, 666, etc? [05:56] ryanmcgrath: And I apologize if I'm polluting the room with useless questions. XD [05:56] konobi: _ry: yeah... just having some trouble updating the submodule (from within the top level git repo) [05:57] brainproxy: how's the biggie coming? [05:57] tmpvar: design stages [05:58] tmpvar: konobi, if you drop into the sub modules dir, you should be able to run git pull, no? [05:58] dmpk2k: ryanmcgrath: take a look at man 2 stat, or check out some of the number attributes in the process object. [05:59] dmpk2k: tmpvar: I'm trying to make an HTTP connection from node.js. I'd like to change the default timeout from 60s to 10s. [05:59] brainproxy: will it be something lightweight along the lines of sinatra, or even gunning for something with a ton of plugins like rails? [05:59] ryanmcgrath: dmpk2k: Thanks [06:00] konobi: tmpvar: yes... but as soon as you run git submodule init; and git submodule update; it reverts back to the commit where it was added [06:00] konobi: btw... when I watchFile with an interval, it fires after that interval... even though the file hasn't changed... that seem odd? [06:01] tmpvar: damn, honestly im in over my head :P [06:03] dmpk2k: Man, node.js makes a great anti-proxy scanner. [06:07] ryanmcgrath: Does fs.chmod act recursively? I'm guess not, but I figured I'd ask. [06:11] konobi: ah... think i worked it out [06:16] extgreen has joined the channel [06:17] Tim_Smart: brainproxy: Currently I'm look at the ORM design [06:17] Tim_Smart: *looking [06:17] Tim_Smart: for biggie-orm [06:20] konobi: ah... for some reason fs.Stat(mtime) is giving me "Fri Mar 05 2010 18:00:56 GMT-0800 (PST)" instead of "2009-06-29T11:11:40Z" [06:30] mattly has joined the channel [06:36] brainproxy: Tim_Smart: cool [06:37] brainproxy: I wish I could help, but I'm more a user of web frameworks (likes RoR and Sinatra), but wouldn't know how to go about building one, at least not yet [06:37] brainproxy: I am using node.js for a project though [06:37] brainproxy: in fact it's a central piece [06:37] brainproxy: coupled to redis [06:38] brainproxy: but I'm not doing a lot of fancy, high level stuff w/ node; it's basically acting as a broker for a lot of xhr [06:38] brainproxy: as bibbie develops, I'll definitely be intereted in taking it for a spin to see if I can use it to replace other stuff [06:39] brainproxy: *biggie [06:40] siong1987_ has joined the channel [06:49] binary42 has joined the channel [06:51] _ry: it's so quiet on friday night :) [06:55] joshbuddy has joined the channel [06:55] Tim_Smart: _ry: Saturday night here :p [06:56] Tim_Smart: brainproxy: Well, there is bound to be some more trivial work to be done [06:56] isaacs has joined the channel [07:01] konobi: _ry: any luck on the execname stuff or still pondering? [07:04] jed has joined the channel [07:08] extgreen has left the channel [07:09] steadicat has joined the channel [07:32] rauchg has joined the channel [07:32] sveisvei has joined the channel [07:37] dekz has joined the channel [07:43] Tim_Smart has joined the channel [07:43] qFox has joined the channel [07:52] _ry: konobi: no - haven't thought about it yet [07:53] _ry: i'm coding the piece of code that will solve all of my problems [07:53] _ry: (a better tcp.Connection object) [07:59] geoffreyd has joined the channel [08:05] bpot has joined the channel [08:07] codeswing has joined the channel [08:09] tlrobinson_ has joined the channel [08:19] markwubben has joined the channel [08:21] brandon_beacher_ has joined the channel [08:30] Cainus has joined the channel [08:42] piranha has joined the channel [08:45] codeswing has joined the channel [09:04] konobi: _ry: a relocatable node would be a major boon i would think [09:24] rictic has joined the channel [09:37] lifo has joined the channel [09:42] keeto has joined the channel [09:45] sveisvei has joined the channel [09:49] kriskowal has joined the channel [10:09] felixge has joined the channel [10:09] felixge has joined the channel [10:21] pdelgallego has joined the channel [10:40] MattJ has joined the channel [10:45] felixge has joined the channel [10:45] felixge has joined the channel [11:04] charlenopires has joined the channel [11:09] unomi: relocatable in what sense? [11:09] unomi: konobi: [11:10] piranha_ has joined the channel [11:32] bpot has joined the channel [11:33] wetefh has joined the channel [11:43] piranha_: http://paste.in.ua/416/ any ideas why? [11:43] kkaefer has joined the channel [11:49] charlenopires has joined the channel [12:01] piranha has joined the channel [12:11] eikke has joined the channel [12:15] pdelgallego has joined the channel [12:21] Tim_Smart has joined the channel [12:34] geoffreyd has joined the channel [12:40] markwubben has joined the channel [12:49] tisba has joined the channel [12:54] malkomalko has joined the channel [12:56] unomi: anyone have a line to doug engelbart? [12:56] blastbyte has joined the channel [13:08] pdelgallego has joined the channel [13:38] MattJ has joined the channel [13:41] maritz has joined the channel [13:50] christkv has joined the channel [14:01] piranha has joined the channel [14:20] voodootikigod_ has joined the channel [14:21] wetefh has left the channel [14:22] micheil_mbp has joined the channel [14:22] pdelgallego has joined the channel [14:26] micheil has joined the channel [14:32] voodootikigod_ has joined the channel [14:37] alex-desktop has joined the channel [14:42] stepheneb has joined the channel [14:48] felixge has joined the channel [15:27] joshbuddy has joined the channel [15:27] joshbuddy has joined the channel [15:30] mjr_ has joined the channel [15:32] steadicat has joined the channel [15:43] joshbuddy has joined the channel [15:43] joshbuddy has joined the channel [15:46] maushu has joined the channel [15:47] maushu: Woah, weird. Since yesterday 136 unique persons visit my website, and I did nothing. [15:47] maushu: Maybe because I placed it on github? Probably. [15:47] maushu: Makes me wonder where people get so much free time to visit random websites. [15:52] maushu: Who the heck is 173.208.34.253 and why does he keep ident'ing me. [15:56] inimino: 253.34.208.173.in-addr.arpa. 14400 inimino PTRbuilding7.us.afternet.org. [15:57] inimino: wtf [15:57] inimino: that's "IN" not "inimino" [15:57] ashb: tab :) [15:58] inimino: tab-complete + tab-separated values = paste fail [16:02] tisba: tab completion ftw ;) [16:09] softdrink has joined the channel [16:11] embwbam has joined the channel [16:11] embwbam: Is there an easy way to read a file a line at a time without coding it myself? [16:11] embwbam: I can't read the whole file because it's huge [16:13] inimino: embwbam: I have an API that returns files line by line in fileIO [16:13] inimino: http://inimino.org/~inimino/blog/fileio_v0.2 [16:13] embwbam: thanks [16:15] inimino: streamLines is the function, the documentation is here: http://boshi.inimino.org/3box/asof/1267132336815/fileIO/doc/streams [16:15] jashkenas has joined the channel [16:16] inimino: and it's probably a little unfamiliar of an API style, probably not to everyone's taste, and could be unstable... [16:17] embwbam: haha... nice [16:19] kennethkalmer has joined the channel [16:20] jashkenas: If I'm getting a "Bad file descriptor" error, (which doesn't include a callstack) is there some good way to debug it, other than adding print() all over? [16:20] inimino: jashkenas: why isn't there a stack trace? [16:20] jashkenas: Error: Bad file descriptor [16:20] jashkenas: at node.js:758:9 [16:20] jashkenas: I think because it's at the top of the event loop [16:21] jashkenas: Right as node comes back from attempting to read or write a file. [16:21] inimino: oh, interesting [16:21] jashkenas: It would be lovely if the error message contained the name of the file in question, though. [16:23] jashkenas: inimino: it gets better -- if I add a "puts(source)" right before the loop that goes and works on all the files in parallel, it fixes the bug. [16:23] jashkenas: There must be some race condition with a shared variable. [16:23] inimino: that line is process.loop() [16:24] inimino: that definitely shouldn't be crashing, maybe you can put together a test case [16:27] voodootikigod_ has joined the channel [16:28] jashkenas: inimino: I'm having a hard time reproducing it reliably, because of the print statement weirdness and the fact that all though most of the time I get that error, some of the time it succeeds. [16:28] jashkenas: Here's the main method that gets called for each source file: [16:28] jashkenas: http://gist.github.com/323781 [16:28] jashkenas: If I uncomment that "p source", the error never happens, and all is well. [16:30] inimino: coffeescript? [16:30] jashkenas: yep [16:32] jashkenas: printing out the exception object itself adds: "close failed in file object destructor: [16:32] jashkenas: Error in sys.excepthook:" [16:34] inimino: hm, maybe you can make something reproducable if you open a bunch of files in parallel in a loop and then close them all [16:34] inimino: or call readFile [16:37] jashkenas: think I might have found it. Does process.stdio.write() only take strings of a certain length? [16:38] inimino: it shouldn't [16:43] chakrit has joined the channel [16:44] charlenopires has joined the channel [17:05] steadicat has joined the channel [17:06] dnolen has joined the channel [17:10] embwbam has left the channel [17:11] aho has joined the channel [17:16] r11t_ has joined the channel [17:16] sztanpet has joined the channel [17:18] tisba_ has joined the channel [17:30] creationix has joined the channel [17:32] _ry: hello [17:36] christkv has joined the channel [17:42] creationix: _ry: hello [17:42] creationix: I'm starting to get the hang of this c stuff [17:43] creationix: the initial learning curve is rough, but it's a lot like any other language after that, just lower level [17:50] softdrink has joined the channel [17:59] embwbam has joined the channel [18:00] embwbam: how can I get the current directory of the file itself? Like ruby's File.join(File.dirname(__FILE__)) [18:00] creationix: embwbam: __dirname [18:00] creationix: and __filename for the current file [18:00] embwbam: if the executing code is in a library file, does that point to the library file or the file that included it? [18:01] creationix: the library file I think [18:01] embwbam: great [18:01] creationix: argv[0] should be the executing file [18:01] creationix: process.argv [18:02] kriszyp has joined the channel [18:04] jviereck has joined the channel [18:04] creationix: actually it's process.argv[1], I forget that [0] is the node binary [18:05] embwbam: hmm…. http://gist.github.com/323832 - works great if I run it [18:06] embwbam: but if I include it, this.DataDir just has "../../../data" [18:06] jashkenas has left the channel [18:06] embwbam: var info = require("./info") [18:07] embwbam: sys.puts(info.DataDir) [18:07] embwbam: any ideas? [18:07] jviereck: hello [18:08] embwbam has left the channel [18:08] jviereck: could someone tell me where the path() function is defined used in node_file.cc? [18:08] jviereck: like in String::Utf8Value path(args[0]->ToString()); [18:10] embwbam has joined the channel [18:10] embwbam: Ah, but the ../ are correct according to the including file… that will work then [18:11] creationix: embwbam: I guess __dirname isn't always absolute then [18:11] embwbam: no, but it does resolve to the right directory [18:11] embwbam: sys.puts(__dirname) in the lib file resolves to the relative path to the lib file [18:11] embwbam: good enough [18:12] embwbam: I don't suppose there is an expand_path function built in [18:12] creationix: noclue [18:12] embwbam: thanks for your help [18:14] creationix: you're welcome [18:36] _ry: making software fast is hard :/ [18:37] softdrink has joined the channel [18:40] dnolen has joined the channel [18:46] codeswing has joined the channel [19:06] embwbam: _ry: not with node! [19:11] unomi has joined the channel [19:23] mikeal has joined the channel [19:24] Cainus has joined the channel [19:27] pavelz has joined the channel [19:29] kriskowal has joined the channel [19:35] jviereck: _ry: can you help me with my problem? [19:41] rictic has joined the channel [19:46] codeswing has left the channel [19:57] softdrink has joined the channel [20:02] siong1987 has joined the channel [20:06] sztanphet has joined the channel [20:08] ashb: jviereck: not if you dont say what it is [20:08] ashb: f you have a question just ask it, don't ask to ask. [20:08] jviereck: ashb: I've posted it earlier [20:08] jviereck: String::Utf8Value path(args[0]->ToString()); [20:08] jviereck: I wonder where the path function comes from [20:08] ashb: tried grepping? [20:09] jviereck: you mean if I have looked for the declaration? [20:09] ashb: yes [20:09] jviereck: I did :( [20:09] jviereck: included the whole node project to textmate, search for it, but couldn't find it [20:10] ashb: what file is that in? [20:10] jviereck: also, I looked through the header files included in node_file.cc [20:10] jviereck: node_file.cc [20:11] ashb: oh its not a fn call [20:11] ashb: its a variable. [20:11] ashb: called with the default ctor [20:11] ashb: C++ [20:11] ashb: *non-default [20:12] jviereck: is there a certain name for this so I can look it up? [20:12] ashb: a C++ reference [20:12] ashb: its sort of like doing: [20:12] ashb: String::Utf8Value path = String::Utf8Value(args[0]->ToString()); [20:12] ashb: except that would create twop and call the assignment operator [20:12] ashb: *two [20:13] jviereck: ahh, I see! [20:14] jviereck: so, you just initialize the variable path with that line? [20:14] ashb: yup [20:14] maushu has joined the channel [20:14] jviereck: arg, it's that simple if you know the answer [20:14] jviereck: thanks a lot ashb [20:14] ashb: i should have noticed when you asked before [20:14] ashb: but well I was inbetween games :D [20:14] jviereck: :D [20:15] maushu: gf3, your bot doesn't work correctly with some servers. I think it sends its channel command too soon. I had that problem too. [20:18] drostie has joined the channel [20:34] Tim_Smart has joined the channel [20:40] rictic has joined the channel [20:42] nodejs_v8 has joined the channel [20:52] voodootikigod_ has joined the channel [20:54] RayMorgan has joined the channel [20:54] cloudhead has joined the channel [21:01] sveisvei: ACTION off playing bfbc2 [21:02] bpot has joined the channel [21:03] drostie has joined the channel [21:06] jviereck_ has joined the channel [21:06] siculars has joined the channel [21:10] markwubben has joined the channel [21:15] maushu has joined the channel [21:16] eelco has joined the channel [21:20] michaelk^ has joined the channel [21:20] michaelk^ has left the channel [21:22] blastbyte: is forEach() async? [21:22] blastbyte: Array.forEach() [21:22] blastbyte: can't be [21:22] michaelk^ has joined the channel [21:23] Tim_Smart: blastbyte: Nope [21:23] Tim_Smart: Async is only need for things like IO and timers [21:24] Tim_Smart: *things [21:24] drostie: blastbyte: technically nothing in javascript is truly asynchronous. Although that's a de facto convention and not written in any spec that I know of. [21:25] drostie: blastbyte: that's why there's no need for a synchronized keyword. :D [21:25] blastbyte: drostie: yeah :-) [21:26] embwbam: I just want to say - if the contributors to node and V8 are in here - you guys rock! [21:26] drostie: they do. srsly. [21:27] embwbam: I wrote a pattern-matching file-splitting script… It matches the speed of split -p, and beats awk and csplit by about a factor of 5-6 [21:28] alexiskander has joined the channel [21:32] tlrobinson_ has joined the channel [21:35] felixge has joined the channel [21:35] felixge has joined the channel [22:04] BBB has joined the channel [22:06] bpot has joined the channel [22:07] konobi: _ry: ping [22:09] christkv_ has joined the channel [22:13] tisba has joined the channel [22:17] _ry: konobi: pong [22:17] qFox has joined the channel [22:19] konobi: _ry: is there an easy way to add a reconnect interval to amqp? [22:19] _ry: konobi: like wait a few seconds and then reconnect? [22:19] konobi: _ry: btw... I'm working today... quite a bit of it on node stuff, so I might have a few questions [22:19] konobi: _ry: yup... otherwise it just goes as quickly as it can... which is sub-optimal [22:20] konobi: also have a few other feature requests =0) [22:20] _ry: konobi: if you look at emitter.js it does that [22:20] _ry: from gzone_heartbeat [22:21] _ry: konobi: i'm around - trying to merge binary stuff into master [22:22] konobi: hhhmmm... no emitter.js in my checkout [22:22] konobi: _ry: feature requests... daemonizing and a core getopt_long library =0) [22:23] _ry: konobi: yeah those are good requests [22:23] _ry: konobi: sorry heartbeater.js [22:24] _ry: konobi: basically set a timeout in the 'close' event - the call connection.connect() [22:24] _ry: er connection.reconnect() [22:25] konobi: oh... i see... i'm doing it a _little_ differently here [22:25] konobi: hhhhmmm... [22:28] voodootikigod_: hey _ry [22:28] voodootikigod_: dont stress the hacker news trolls [22:28] _ry: voodootikigod_: hey [22:29] voodootikigod_: they hate everything [22:29] konobi: k... that's working [22:29] _ry: voodootikigod_: thanks :) [22:29] voodootikigod_: its hard i know [22:29] voodootikigod_: but its best to never respond [22:29] konobi: eh? [22:29] voodootikigod_: and let them just sit there [22:30] voodootikigod_: advice I wish I actually abided by [22:30] voodootikigod_: :) [22:30] joshbuddy has joined the channel [22:30] joshbuddy has joined the channel [22:30] voodootikigod_: birfday dinner [22:30] voodootikigod_: adios [22:30] _ry: ciao [22:30] _ry: konobi: http://news.ycombinator.com/item?id=1171053 [22:30] konobi: _ry: can I confirm what "persistent" means in watchFile and what watchFile does in the scenario where the file doesn't exist? [22:31] _ry: persistent? [22:31] bpot has joined the channel [22:31] _ry: oh i se [22:32] _ry: yeah, i guess the docs don't say at all what that means :) [22:33] Tim_Smart has joined the channel [22:33] _ry: so - persistent=false means that if no other i/o is happening the process will exit [22:33] _ry: i.e. that 'watchFile' shouldn't count as i/o [22:34] _ry: if a file doesn't exist, i think it returns an empty stat struct [22:34] _ry: s/struct/object/ [22:34] konobi: gd gd [22:35] _ry: hm. [22:35] _ry: well you'll have to test it [22:35] _ry: i'm not sure [22:35] konobi: i testing seems to suggest that's what happens [22:35] konobi: _ry: http://paste.scsys.co.uk/40389 [22:35] konobi: all look sensible? [22:36] konobi: quite pleased with how it all goes together [22:36] konobi: (this is a hacked version of robs code) [22:37] konobi: if there's no config file, it'll wait around until there is one... if the config file appears, it'll use that to connect... if the config file changes, it'll shutdown the connection and reconnect [22:38] konobi: though I'm not sure if just setting the connection to null is sufficient to make it disconnect [22:39] konobi: also, if it gets disconnected for any reason, it'll reconnect [22:39] pjb3 has joined the channel [22:40] _ry: konobi: nice [22:40] _ry: style nic: var connectionReadyHandle = function(connection) { [22:40] _ry: function connectionReadyHandle (connection) { [22:40] _ry: ^-- same [22:42] konobi: that was rob's code [22:42] Booster has joined the channel [22:43] konobi: would be nice if you could close() without emitting a "close" event [22:43] _ry: hm [22:43] _ry: yeah- i think so too [22:44] _ry: getting the symmantics correct for how these streams should work is difficult [22:44] konobi: maybe a disconnect() [22:44] _ry: http://wiki.github.com/ry/node/streams [22:45] konobi: can you remove a listener? [22:45] _ry: konobi: i think forceClose() will work [22:45] konobi: nah, bailed horrifically for me [22:46] siong1987_ has joined the channel [22:46] _ry: yes, removeListener [22:46] siong1987__ has joined the channel [22:47] konobi: that may be sufficient [22:49] konobi: yeah... that worked nicely [22:50] embwbam: Is it just me, or do none of the web frameworks work [22:50] embwbam: ? [22:51] kriskowal has joined the channel [22:52] embwbam: I'm hacking on both picard and express, and needing to change both [22:58] maushu: embwbam, node is rapidly changing. Some frameworks can't keep up. [22:58] embwbam: yeah :) it's a good thing to complain about [22:58] embwbam: I think I got picard running [23:00] tmpvar: hrm, I'm finding myself in a weird position with this fbp stuff [23:04] tmpvar: its working, but i have a feeling thats only because of the simplicity of my tests heh [23:06] embwbam: 2606 requests per second… I'm sure it's old news to everybody else, but I continue to be impressed [23:07] tmpvar: not terrible :) [23:08] embwbam: yeah, I've seen worse [23:08] siong1987_ has joined the channel [23:09] atmos has joined the channel [23:09] atmos: anyone using Mu successfully ? [23:13] markwubben_ has joined the channel [23:20] steadicat has joined the channel [23:20] ashb: _ry: var x = fun and fun x aren't always the same [23:21] ashb: the later is hoisted [23:23] atmos has joined the channel [23:23] mikeal has joined the channel [23:25] creationix has joined the channel [23:37] tisba has joined the channel [23:38] creationix has left the channel [23:42] alexiskander has joined the channel [23:42] _ry: ashb: var is hoisted too - or? [23:43] _ry: oh i guess not [23:43] ashb: var x = funciton(){}; is not hoisted [23:43] ashb: the defn of the var is [23:43] ashb: but the assignment happens on the line [23:43] _ry: okay good to know [23:44] jashkenas has joined the channel [23:44] ashb: most of the time it doens't make any difference [23:44] ashb: but some times it might [23:46] ako has joined the channel [23:50] steadicat has joined the channel [23:51] creationix has joined the channel [23:52] creationix: _ry: evcom is having build issues on sparc [23:52] creationix: evcom.c:1300: error: `PF_LOCAL' undeclared (first use in this function) [23:54] creationix: I think I can just replace PF_LOCAL with PF_UNIX and be good right? [23:54] jashkenas has left the channel [23:54] creationix: also it's saying [23:54] creationix: evcom.c:143: warning: implicit declaration of function `bzero' [23:56] kriskowal: _ry in both cases, the declarations are hoisted. in function statements, the assignment is also hoisted. for var, the assignment occurs in place. [23:56] kriskowal: oh, ashb covered it [23:57] kriskowal: meanwhile, vimeo is almost done processing your ssjs talk [23:58] sveisvei has joined the channel