[16:39] nodelog has joined the channel [16:40] plutoniix has joined the channel [16:40] lzskiss has joined the channel [16:40] lzskiss: hey [16:40] felixge has joined the channel [16:40] felixge has joined the channel [16:40] dmwuw has joined the channel [16:41] Xano has joined the channel [16:41] sirdancealot has joined the channel [16:42] Destos has joined the channel [16:42] bnoordhuis: braddunbar: user land - or increase `ulimit -n` [16:43] n8ji has joined the channel [16:43] mmalecki: what happened with child.killed? [16:43] mmalecki: and bnoordhuis: fixed tls [16:43] pagameba has joined the channel [16:44] braddunbar: bnoordhuis: I see. Given that there could be a variable number or files, how can one keep track of the current amount of file descriptors open? [16:44] braddunbar: Is that something node keeps track of? [16:44] lzskiss: what is the best way to integrate php with node.js? [16:44] hipsterslapfight: not to [16:44] ceej has joined the channel [16:44] bnoordhuis: braddunbar: no, it's a system limit [16:45] pixel131 has left the channel [16:45] fzzzy has joined the channel [16:45] pagameba1 has joined the channel [16:45] CoverSlide: ls [16:45] CoverSlide: fucking A [16:45] braddunbar: bnoordhuis: So how do I know how many open file descriptors my process currently has? [16:46] jetienne_ has joined the channel [16:46] augustl: lzskiss: what do you mean with "integrate"? [16:46] augustl: lzskiss: language agnostic APIs are always good, even if all your stuff is using the same language, I guess. [16:46] mmalecki: bnoordhuis: when child process is alive, it has no 'killed' property, but this property appears when you kill it (and is set to false). is it a bug? [16:46] augustl: HTTP, etc [16:46] mmalecki: dnode-php [16:46] CoverSlide: That's not my dad! My dad's not a phone! [16:47] patcito has joined the channel [16:47] pagameba1 has left the channel [16:47] lzskiss: augustl, i want to write to the phpBB3 database from node.js with using the phpBB3 own php functions [16:47] lzskiss: mmalecki, thx i dont rememerber that name [16:48] augustl: is there any sort of API for phpbb3? [16:48] fangel has joined the channel [16:48] augustl: if so I guess your best bet is to write php code that exposes this API via http, and use http from node to do stuffs. [16:48] mmalecki: augustl: querying the DB, haha [16:48] te-brian has joined the channel [16:49] CoverSlide: or use node-mysql [16:49] augustl: if there's no stable API anywhere then writing directly to the db works too I guess [16:49] lzskiss: i dont want write to the phpbb3 database tables [16:50] CoverSlide: < lzskiss> augustl, i want to write to the phpBB3 database from node.js [16:50] lzskiss: this is the last chance [16:50] CoverSlide: make up your mind, woman! [16:50] cognominal has joined the channel [16:51] augustl: lzskiss: so, is there a PHP API? [16:51] braddunbar: bnoordhuis: Thanks for the info! [16:52] felixge has joined the channel [16:52] felixge has joined the channel [16:52] lzskiss: augustl, http://wiki.phpbb.com/Using_the_phpBB3.0_Basic_Functions#example-api-generate-text-insert-post [16:52] lzskiss: :) [16:52] lzskiss: its empty [16:53] augustl: cool, so doing a php to http wrapper that node can talk to makes sense [16:53] augustl: oh [16:53] ixti: paul_uk: have you solved your problem yet? [16:53] paul_uk: ixti: nope, everytime I try to, i write spagetti crappy code [16:54] paul_uk: my problem is that i can't get it to block and then finish what it's doing and then for following code to execute [16:54] lzskiss: augustl, http://sourceforge.net/projects/phpbb3api/ [16:54] lzskiss: not more find [16:54] joshthecoder has joined the channel [16:54] paul_uk: i had a full head of hair this morning ! [16:54] zmbmartin has left the channel [16:55] lzskiss: ok if i finidshed this work i will be put to the github [16:57] matyr has joined the channel [16:57] ixti: paul_uk: first of all can you explain (for yourself) what are you trying to do in that particular snippet [16:58] ixti: paul_uk: second importnt thing, take closer look on which `callback` you are using and what you actually mean [16:58] ixti: it seems to me like you are using one callback in place where you were going to use another one [16:58] fread228_ has joined the channel [16:59] ixti: paul_uk: and third thing you need to take a look is the scope of your friends_dict [16:59] paul_uk: i've got a redis store which is holding userid's and information. i've got a friends_list which is just a bunch of user_id's and what I need to do is iterate through that and then enquire on redis whether they are online or not. the issue is that the session_store never blocks the process. [16:59] jomoho has joined the channel [17:00] ixti: paul_uk: can you show the real code then (probably i'll be able to better understand it) [17:01] fread2281 has joined the channel [17:01] ppcano has joined the channel [17:01] trotter has joined the channel [17:02] paul_uk: http://www.pastie.org/2799118 is the real code. i just need to figure away for the session_store.get('user_hash' segment to block the process, complete and then carry on the for loop and when that;s done, carry on. [17:02] bnoordhuis: mmalecki: yes, that's probably a bug - it's not how it used to work in 0.4 [17:02] paul_uk: except the session_store code takes it's sweet time and by then the forlopp has finished and the other code has already executed! X( [17:02] Carter has joined the channel [17:02] jomoho2 has joined the channel [17:03] michaeldeol has joined the channel [17:03] Isaiah has joined the channel [17:03] brion has joined the channel [17:03] ayaz` has joined the channel [17:03] mmalecki: bnoordhuis: it was defined right after it was created [17:03] mmalecki: bnoordhuis: pull requesting :) [17:03] mmalecki: bnoordhuis: also, funny, on 0.5.9 it isn't defined at all [17:04] ayaz has joined the channel [17:04] fread228_ has joined the channel [17:05] dreamdust has joined the channel [17:05] chrislorenz has joined the channel [17:05] mmalecki: hm, I think I accidentally 500'ed github. [17:06] mmalecki: but it worked, so it's ok [17:06] heavysixer has joined the channel [17:06] bnoordhuis: github's been a lot like piscisaureus's girlfriend the last few days [17:06] mmalecki: bnoordhuis: https://github.com/joyent/node/pull/1991 [17:06] bnoordhuis: going down all the time [17:06] mmalecki: haha [17:07] mmalecki: I'm glad someone else noticed it as well [17:07] bnoordhuis: mmalecki: This pull request cannot be automatically merged. [17:07] mmalecki: not that part about girlfriend, I mean [17:07] mmalecki: bnoordhuis: huh? that's weid [17:07] piscisaureus_: muhahahaha [17:07] mmalecki: *weird [17:07] bnoordhuis has joined the channel [17:08] chrixian has joined the channel [17:08] mmalecki: haha [17:08] bnoordhuis: kicked by a trillian user - the indignity of it all! [17:08] smathy: :) [17:08] Alex_R_ has joined the channel [17:09] mmalecki: bnoordhuis: it rebased cleanly [17:09] enos_feedler has joined the channel [17:09] mmalecki: bnoordhuis: pushed, check it out now [17:09] toomus has joined the channel [17:10] toomus: hi [17:10] bnoordhuis: mmalecki: i think github is borked, the patch applies cleanly [17:11] jbrokc has joined the channel [17:11] mmalecki: bnoordhuis: very likely, it 500 when I submitted it. something might've gone terribly wrong. [17:12] langworthy has joined the channel [17:12] mmalecki: OMG MY PULL REQUEST KILLED GITHUB. [17:12] jpdery has joined the channel [17:12] CIA-109: node: 03Ryan Dahl 07master * r60818b9 10/ (15 files in 2 dirs): Add missing copyright headers - http://git.io/J1H_Iw [17:13] jpdery: hi [17:13] zipR4ND has left the channel [17:14] lzskiss has joined the channel [17:14] saesh has joined the channel [17:15] CarterL has joined the channel [17:18] xy has joined the channel [17:19] simenbrekken has joined the channel [17:19] JaKWaC has joined the channel [17:20] JasonJS: I'm having issues trying to get my dnode client to use websocket - can anyone point me at an example? [17:21] mmalecki: JasonJS: server <-> browser? [17:21] JasonJS: mmalecki: Yes [17:21] mmalecki: JasonJS: if your browser is fairly up to date, it won't work [17:21] mmalecki: JasonJS: socket.io version is too old [17:21] JaKWaC has joined the channel [17:21] JasonJS: mmalecki: Ah - that's... annoying [17:22] mmalecki: JasonJS: use socket.io [17:22] mmalecki: JasonJS: and it should be resolved quickly [17:22] JasonJS: mmalecki: Why does dnode run with a pre-packaged socket.io? [17:22] JasonJS: I was using socket.io - thought I'd see how dnode worked also [17:23] fread2281 has joined the channel [17:23] mmalecki: JasonJS: it's connected with browserify. I didn't really have time to look into it [17:23] mmalecki: SubStack: yo, you there? [17:24] rhymes has joined the channel [17:25] JasonJS: I asked this over in #socket.io yesterday but I'll throw it out here too. I've also got several servers that are communicating with each other. Should I consider using socket.io-client and socket.io for the comms or stick with something like dnode for that? [17:25] mmalecki: JasonJS: hook.io [17:25] boltR has joined the channel [17:26] JasonJS: Hook.io scares me :P [17:26] TooTallNate has joined the channel [17:26] JasonJS: Plus, several of the servers are not Node [17:26] tjholowaychuk: JasonJS zmq if you're talking to multiple languages [17:26] tjholowaychuk: pretty much every language has a binding [17:26] tjholowaychuk: they're pretty thin [17:27] TheJH: JasonJS, whether you should take socket.io or dnode depends on what you want to do [17:27] daneroo has joined the channel [17:27] nils_r has joined the channel [17:27] JasonJS: That's why I was leaning towards socket.io or dnode - they had bindings for all languages I require. I'll take a look at zmq [17:27] SubStack: beep boop [17:27] TheJH: JasonJS, however, you should know that dnode slowly leaks callback RAM that only gets freed when you close the connection at the moment [17:27] SubStack: yep dnode and socket.io do different stuff [17:28] SubStack: TheJH: only for certain types of usage [17:28] TheJH: JasonJS, especially for cross-language stuff, that might be hard to fix [17:28] TheJH: SubStack, true [17:28] mandric has joined the channel [17:28] TheJH: SubStack, e.g. if you often use callbacks [17:28] mmalecki: SubStack: when will dnode use newer socket.io? [17:29] SubStack: JasonJS: socket.io doesn't work well with browserify is why dnode bundles its own version [17:29] broofa has joined the channel [17:29] JasonJS: Ah - good to know [17:30] mmalecki: SubStack: wasn't there a pull request or something? [17:30] jbpros has joined the channel [17:30] liar has joined the channel [17:30] captain_morgan has joined the channel [17:30] isaacs has joined the channel [17:31] icebox has joined the channel [17:31] isaacs: xsyn: no, npm still installs locally; [17:31] isaacs: there are no plans to change that [17:31] JasonJS: Has anyone else used socket.io-client and socket.io in a server-server usage? [17:31] captain_morgan has joined the channel [17:31] gr-eg has joined the channel [17:31] SubStack: mmalecki: there was but it unfortunately had a lot of other unrelated changes [17:32] Aikar: JasonJS: are you looking for 'channels' kind of feature? [17:32] JasonJS: Aikar: No - just inter-server communications [17:32] mmalecki: SubStack: rejected? shit. [17:32] Aikar: JasonJS: http://github.com/aikar/wormhole may do what you need, be alot lighter than socket.io, but youll need to handle reconnections/connecting etc yourself. this just handles the transport of messages [17:33] trupppOFF has joined the channel [17:33] simenbrekken has joined the channel [17:33] Wa has joined the channel [17:33] JasonJS: I'll take a look. I was already using socket.io for client->server so I figured I see what it could do on the server-server side of things [17:33] CIA-109: node: 03Maciej Małecki 07master * r6bd0bcd 10/ lib/child_process.js : [17:33] CIA-109: node: child_process: in a new `ChildProcess` set `killed` to false [17:33] CIA-109: node: This behavior is consistent with what v0.4 does. - http://git.io/0CjB8w [17:34] franciscallo has joined the channel [17:34] jbrokc: is there any documentation available for what fs.watchFiles is going to look like? [17:34] mmalecki: bnoordhuis: thanks [17:35] knifed has joined the channel [17:35] bnoordhuis: jbrokc: fs.watch() [17:35] jbrokc: yeah that [17:35] broofa has joined the channel [17:35] bengrue has joined the channel [17:35] bnoordhuis: it is (should be) documented [17:36] ayaz has joined the channel [17:36] distrus has joined the channel [17:36] fread2281 has joined the channel [17:37] knifed_ has joined the channel [17:37] jbrokc: i thought it was being deprecated for something different in 0.6 [17:37] zilch_ has joined the channel [17:38] CIA-109: node: 03Ben Noordhuis 07master * rc8646e0 10/ test/simple/test-child-process-kill.js : test: add ChildProcess.prototype.killed test case - http://git.io/6mtaew [17:38] bnoordhuis: jbrokc: it is - .watchFile() is out, .watch() is in [17:38] briancra_ has joined the channel [17:39] mmalecki: GTA V trailer is out (just saying) [17:39] DTrejo has joined the channel [17:40] agnat_ has joined the channel [17:40] Squeese has joined the channel [17:42] pointlessjon has joined the channel [17:42] TheJH: JasonJS, oh, if I remember correctly, socket.io-client is not really designed for usage apart from testing [17:43] captain_morgan has joined the channel [17:43] DTrejo: captain_morgan: working on getting tap parsing working [17:43] TheJH: JasonJS, I think that for node-node-connections, you should just pipe json lines over TCP or so [17:43] Venom_X has joined the channel [17:45] ryanrolds_w has joined the channel [17:45] sdudenhofer has joined the channel [17:46] jonrohan has joined the channel [17:47] devdazed has joined the channel [17:48] katharinairrgang has joined the channel [17:49] katharinairrgang: hello eveybody. [17:49] devdazed: hi all, with regards to "net" and sockets. I noticed that when calling "socket.write" it buffers data before sending it over the wire. is it possible for part of the data in one of the write calls to be received in a different data event? [17:49] eignerchris_ has joined the channel [17:49] katharinairrgang: can anybody help me to find official source to node.js?? [17:49] ryanrolds_w: https://github.com/joyent/node [17:50] devdazed: meaning that the receiver will get part of one write call in one data event and the other part in a second data emit? [17:51] dgathright has joined the channel [17:52] robhawkes has joined the channel [17:52] blup has joined the channel [17:53] cognominal_ has joined the channel [17:56] broofa has joined the channel [17:57] Draggor: devdazed: certainly possible I think [17:58] daneroo has joined the channel [17:58] Draggor: don't assume a data event directly correlates to a write [17:59] devdazed: i know a data event can correlate to multiple wriites [17:59] mandric_ has joined the channel [17:59] devdazed: but can it correlate to half a write [17:59] luke` has joined the channel [17:59] devdazed: meaning half the data in one write [17:59] Draggor: sure [17:59] sharkbird has joined the channel [17:59] devdazed: so how does one put data together [17:59] katharinairrgang: hello can anybody help me? [17:59] Twisol has joined the channel [18:00] JmZ: when using net.createConnection, then the 'data' event, will the entire chunk of data be read into memory at that point? [18:00] stephank has joined the channel [18:00] JmZ: im trying to write it so when data is received, it writes it out into a file [18:00] devdazed: JmZ: its a stream [18:00] jerrysv: katharinairrgang: ryanrolds_w already pointed to it: https://github.com/joyent/node [18:00] JmZ: i thought so devdazed [18:01] JmZ: but im getting some error about piping it, which i can't read since it tries dumping the binary in the error message [18:01] broofa_ has joined the channel [18:01] DTrejo has joined the channel [18:01] katharinairrgang: no i mean books or official articals about nodejs and this characteristics [18:01] CoverSlide: JmZ: gist your code [18:01] heavysixer has joined the channel [18:02] katharinairrgang: i have to write a skilled work about nodejs [18:02] devdazed: Draggor: is then possible for data to be out of order then? [18:02] Draggor: devdazed: http://pastie.org/2800168 [18:02] Draggor: devdazed: it won't be out of order [18:02] Draggor: you collect your info in buffer or whatever var you want. [18:03] Draggor: you can do your parsing on what you've collected so far, clear it out, etc. [18:03] devdazed: what if the socket has multiple connections. how can i tell what part of a message goes with the other part? [18:03] JmZ: CoverSlide: https://gist.github.com/1334387 [18:03] Draggor: if it's on the server side then you attach it to each connection, not the socket itself [18:03] CoverSlide: JmZ: you're trying to create multiple write streams to the same file [18:03] devdazed: ah, that makes much more sense [18:03] JmZ: CoverSlide: ignore that [18:04] JmZ: the filename changes per connection, i just did that to test [18:04] JmZ: since i only had one connection [18:04] devdazed: Draggor: thanks for your help [18:04] ryanrolds_w: katharinairrgang: http://nodejs.org/ [18:04] sproates has joined the channel [18:04] CoverSlide: ok, but the fact is each 'data' event is emitted when a chunk of data gets recieved, not per new connection [18:04] hydrozen has joined the channel [18:04] JmZ: yeah that's what I figured [18:05] CoverSlide: also d is a buffer, and you can't pipe a buffer [18:05] simenbrekken has joined the channel [18:05] JmZ: which is what i was asking about initially [18:05] JmZ: but someone said it was a stream [18:05] CoverSlide: `req` is a stream [18:05] JmZ: yeah i know that [18:05] CoverSlide: `d` is just a collection of bits [18:05] knifed_ has joined the channel [18:06] langworthy has joined the channel [18:06] JmZ: i see now [18:06] JmZ: can get that down to a couple of lines then [18:07] AvianFlu has joined the channel [18:07] CoverSlide: var fname = 'sometestname'; [18:07] ohtogo has joined the channel [18:08] CoverSlide: req.pipe(fs.createWriteStream('./' + fname)); [18:08] CoverSlide: is all you need [18:08] JmZ: yeah just did that now [18:08] tlocalhos has joined the channel [18:08] JohnBeales has joined the channel [18:08] JmZ: simple misunderstanding [18:09] sharkbird has joined the channel [18:09] rootslab has left the channel [18:09] diogogmt has joined the channel [18:09] pandeiro has joined the channel [18:11] braoru has joined the channel [18:11] daneroo has joined the channel [18:13] mandric has joined the channel [18:13] daneroo has joined the channel [18:13] caolanm has joined the channel [18:13] amiller has joined the channel [18:14] deedubs has joined the channel [18:16] neurodrone has joined the channel [18:17] koo6 has joined the channel [18:18] relative has joined the channel [18:18] berasa has joined the channel [18:19] TheJH: mikeal, is there a way to disable the agent in request for node 0.4.x? [18:19] isaacs: mikeal: ok, so... i should probably not have been programming with a fever, but i'm sorta coming around to your way of thinking on the multistream stuff. [18:19] isaacs: the thing that sucks is that i'll end up emitting end multiple times, which is stupid, or having one long stream of data that corresponds to multiple files, which is also stupid. [18:20] mikeal: TheJH: not really, you can disable pooling but the Agent logic is still there [18:20] mikeal: http.request({agent:false}) [18:20] mikeal: in 0.5 it actually opts out of the agent entirely [18:20] isaacs: so the tar reader needs to not be just a ReadStream/filter thing, but i'm not sure how best to handle that on the receiving end. [18:20] TheJH: mikeal, mhm, ok [18:21] mikeal: isaacs: so, as long as you can pause() it, and it'll actually stop emitting data, you the reader can listen for events that tell it about new files or whatever and, when it needs to do a non-blocking operation like stat, it can pause() the readstream [18:22] isufy has joined the channel [18:22] tiagobutzke has joined the channel [18:22] polotek has joined the channel [18:22] tiagobutzke has left the channel [18:23] isaacs: mikeal: you can pause the reader, and that works. the tar reader has an underlying BlockStream, which has to do buffering and stuff anyway, so pausing is easy [18:23] polotek: sorry I just go here [18:23] polotek: are we all about buffering now? [18:24] isaacs: polotek: i'm trying to figure out an api that will allow me to have polymorphism between directories and tarballs, for reading and writing, and pipe them to one another. [18:24] tomh has joined the channel [18:24] polotek: isaacs: that sounds awesome [18:24] isaacs: yeah [18:24] mikeal: polotek: i caved entirely on buffering [18:24] mikeal: .pause(size) [18:24] polotek: mikeal: +1 [18:24] mikeal: get rid of that .buffer() method proposal i had [18:25] isaacs: mikeal: is size in bytes or chunk counts or what? [18:25] mikeal: let pause take a size argument to prevent it from always pausing the input fd [18:25] polotek: strategic buffering makes a ton of things way more palletable [18:25] mikeal: bytes [18:25] mikeal: actually, it's the .length of chunks [18:25] isaacs: right [18:25] isaacs: generally that's bytes [18:25] mikeal: because if the stream had setEncoding called it could be strings [18:25] isaacs: blockstream does that sort of. [18:26] isaacs: ie, it returns true if it has less than in it's buffer [18:26] mikeal: yup [18:26] polotek: so the default behavior is still no size and it'll propagate back to the fd stream? [18:26] isaacs: since tarballs are always guaranteed to be a round number of 512 byte blocks, that was just way easier. [18:26] mikeal: yeah [18:26] polotek: I like it [18:27] mikeal: because if the final writer calls pause() it'll do it with no arguments, and you need to pause the input fd [18:27] `3rdEden has joined the channel [18:27] mikeal: ok, i'm heading to the city for lunch [18:27] mike5w3c has joined the channel [18:27] mikeal: isaacs: you in SF? [18:27] polotek: so I actually came here to ask a question about socket.io. since nobody hangs out in their channel [18:27] jxson has joined the channel [18:27] isaacs: mikeal: no, i'm in oakland. sick at home. [18:28] polotek: anybody had issues with high latency on connect? [18:28] mikeal: damn [18:28] polotek: I already fixed one problem where many times it waits on window load to fire connect [18:28] mikeal: polotek: yes, but i don't have a fix [18:28] isaacs: stay away. you don't want none of this nasal shit. [18:28] polotek: mikeal: I would meet up with you but I just got to work [18:28] _sorensen_: isaacs: does https://github.com/isaacs/multipart-js work at all? [18:28] isaacs: _sorensen_: no. [18:28] mikeal: i'm heading to 5th and Minna [18:28] _sorensen_: roger that [18:28] isaacs: _sorensen_: you probably want felixge's formidable [18:29] isaacs: _sorensen_: it's on the todo list :) [18:29] capttwinky has joined the channel [18:29] _sorensen_: i want to mock / proxy a form post to a django server from node [18:29] mikeal: chairman bao bun truck for lunch :) [18:29] _sorensen_: not use node to handle the actual upload [18:30] orospakr has joined the channel [18:30] mikeal: _sorensen_: npm install request [18:30] isaacs: _sorensen_: yeah, request can do this. [18:30] mikeal: http.createServer(function (req, resp) { req.pipe(request(urlToDjango).pipe(resp) }) [18:31] mikeal: with node 0.5 [18:31] mikeal: the pipe looks a little different in 0.4 [18:32] _sorensen_: :O [18:32] _sorensen_: does that save me from messing with all the content-disposition / content-type stuff? [18:32] _sorensen_: TIL i suck at this stuff [18:32] mikeal: it proxies all the headers, method and body [18:32] _sorensen_: >.< [18:33] polotek: _sorensen_: you probably want to upload some fixture data right? [18:33] _sorensen_: the node server is requesting from 2 endpoints, one delivers the file, the other json, combines them, and tries to mock a form post multipart to django [18:33] harthur has joined the channel [18:33] jesusabdullah: req.pipe(request().pipe(resp))? or, req.pipe(request()).pipe(resp) ? [18:34] mandric has joined the channel [18:34] jesusabdullah: I'm guessing the latter :E [18:34] polotek: request( { url: urlToDjango, body: fs.createReadStream(someFixtureFile) }) [18:34] mikeal: jesusabdullah: the latter, my mistake [18:34] mikeal: lazy typing :( [18:34] _sorensen_: so far the file is being read into node from a stream [18:35] skunkape has joined the channel [18:35] PeteDaGuru1 has joined the channel [18:35] _sorensen_: its not reading it from the directory directly [18:35] remysharp has joined the channel [18:36] njoubert has joined the channel [18:36] mikeal: if it's in a file you just do [18:36] njoubert has left the channel [18:36] domino14 has joined the channel [18:36] mikeal: fs..createReadStream(filename).pipe(request.put(urlToDjango)).pipe(resp) [18:37] polotek: mikeal: I think that's wicked. But something has always bothered me about it [18:37] jhurliman has joined the channel [18:37] jesusabdullah: That you can't stop a pipe? [18:37] jesusabdullah: or, unpipe a pipe? [18:37] polotek: no, nothing like that [18:37] polotek: just something about the way it reads isn't intuitive [18:38] polotek: passing a stream as the body has always felt better to me. more explicit [18:38] polotek: and it could still turn into a pipe underneath [18:38] polotek: not sure if it actually does right now [18:38] jnbek has joined the channel [18:39] githogori has joined the channel [18:39] ryan_stevens has joined the channel [18:40] devdazed: is there a way to make JSON.parse not throw an error when if fails? maybe just return null? i want to avoid the try..catch [18:40] zeade has joined the channel [18:41] cognominal___ has joined the channel [18:41] daneroo has joined the channel [18:41] jsurfer has joined the channel [18:42] _sorensen_: hmm, thanks guys, i'll give this a try [18:42] distrus: i'm having problems installing npm under windows [18:42] polotek: devdazed: nope [18:42] polotek: :) [18:42] devdazed: ok, thanks [18:44] aheckmann has joined the channel [18:44] isaacs: distrus: what problems? [18:44] polotek: has anyone had much experience with using the "authorization" method with socket.io? [18:44] isaacs: devdazed: function jsonParse (str) { try { return JSON.parse(str) } catch (e) { return null } } [18:44] distrus: i'm doing everything on the list here http://npmjs.org/doc/README.html#Installing-on-Windows-Experimental and i don't get any errors, i've modified the path, updated git ( i had an older version), downloaded the node.exe [18:45] isaacs: distrus: what output are you seeing? can you gist it, along with the npm-debug.log file that's created? [18:45] CarterL has joined the channel [18:45] domino14: hey guys, i have a server with SSL and django. our users will go to beta.example.com, but i want to set up a node.js server at node.example.com. Some of our requests will go to node.example.com. I want that one to be SSL as well. is there a cross domain problem? [18:45] devdazed: isaacs: thanks, i was doing that, but i wanted to avoid the try…catch, i understand it isn't possible [18:45] distrus: yep i can, at the last line there's no output it seems like everything works [18:45] simenbrekken has joined the channel [18:46] distrus: let me check the log, be back with a gist shortly [18:46] shykes_ has joined the channel [18:46] levi501d has joined the channel [18:46] isaacs: k [18:46] polotek: domino14: in general yes. subdomains are still cross domain. [18:46] polotek: you can do some tricky stuff with document.domain [18:47] isaacs: distrus: i've gotta run, if no one here knows what's up, post an issue on the npm github page. [18:47] polotek: but that usually ends up being just as much trouble as using some cross domain request solution [18:47] isaacs: distrus: if it's tar barfing (likely) then it's a known issue and will be dealt with in the next few weeks. [18:47] Guest42546 has left the channel [18:48] bradleymeck has joined the channel [18:48] polotek: Some alternate options are to have a load balancer front that will proxy to node, e.g. beta.example.com/node [18:48] polotek: that has it's own issues and limitations [18:48] polotek: if you're trying to use websockets, forget about it [18:48] domino14: what type of issues ? [18:48] domino14: hmm [18:48] `3rdEden has joined the channel [18:48] domino14: what if i have django talk to node internally [18:49] polotek: but if you're using socket.io and you don't mind using the other transports, xhr-polling, jsonp-polling [18:49] polotek: you can go that route [18:49] polotek: we're doing something similar [18:49] polotek: domino14: I wouldn't recommend that. the latency will kill you [18:50] polotek: you've got nginx or something in front of django right? [18:50] distrus_ has joined the channel [18:50] polotek: put it in front of node as well. and try the proxy thing [18:50] domino14: polotek: yes nginx proxies to gunicorn [18:50] gut4 has joined the channel [18:50] polotek: as I said, you'll lose actual websocket support, but the other socket.io transports work fine [18:50] polotek: and since it'll be same domain as far as the browser is concerned, it'll use simple xhr long-polling [18:51] polotek: which works fine [18:51] cgfuh has joined the channel [18:52] polotek: domino14: also be careful with mixing secure and insecure endpoints. [18:53] daneroo has joined the channel [18:53] polotek: there are some oddities in IE when going from SSL pages to insecure remote urls. [18:53] domino14: mm [18:53] polotek: that will likely become a headache locally when you're trying to test and your local paths aren't https :) [18:53] domino14: if i wasnt using SSL, could i have a separate node box ? [18:53] polotek: <- experienced and bitter [18:53] devongovett has joined the channel [18:54] domino14: i never test. i code straight on production [18:54] cn22: polotek, very useful advice thanks [18:54] TheJH: domino14, https://bitly.com/n5pVWV [18:54] `3rdEden has joined the channel [18:55] polotek: you can have a separate node box even with SSL. you can nginx handle SSL and then proxy to node [18:55] polotek: or you can use node's https module [18:55] polotek: haven't used that in production so I don't know what people's experience is [18:55] domino14: hmm [18:55] domino14: how would i set up the proxy with another box? and with nginx i can't do websockets, right [18:56] distrus: weirdly enough i don't have any log file afterwards or any ouput of any kind when running node cli.js install npm -gf [18:56] Me1000 has joined the channel [18:56] jbrokc: is it possible to have semi-colon-less named functions that are self executing? for instance: https://gist.github.com/0154c6d592e3669b518e [18:57] jacobolu_ has joined the channel [18:59] CoverSlide: jbrokc: if you prefix it with something other than a ( you should be ok [18:59] mikedeboer has joined the channel [18:59] CoverSlide: you can do !function(){}() [18:59] eignerchris has joined the channel [19:00] jetienne_ has joined the channel [19:00] jbrokc: CoverSlide: that returns false for Foo and undefined for Foo() [19:00] polotek: jbrokc: you're getting bitten by hoisting [19:00] polotek: when you "return Foo;" it is undefined [19:00] jbrokc: but it's inside of itself... [19:01] polotek: jbroke, no it's not. you're defining a variable foo [19:01] noderjs has left the channel [19:01] polotek: then you're executing an anonymous function [19:01] CoverSlide: put a function Foo(){} inside that closure [19:01] polotek: then you're returning that variable [19:01] polotek: which is still undefined [19:01] jbrokc: oh.. [19:01] polotek: yeah you could name the anonymous function Foo [19:01] polotek: but why do you need to do things this way? [19:01] polotek: why not just create a constructor function Foo() [19:02] jbrokc: polotek: could you gist an interpretation? [19:03] vguerra has joined the channel [19:03] polotek: jbrokc: well what are you doing with the User function? [19:04] colinclark has joined the channel [19:04] jbrokc: polotek: create an object with props being a augmented private property in a module pattern [19:04] descipher has joined the channel [19:05] jbrokc: polotek: this is the pattern coffeescript uses for its classes [19:06] mehlah has joined the channel [19:06] jtrudeau has joined the channel [19:06] CoverSlide: ok seriously, fuck the module pattern, this may be a pythonism, but it should apply to JS too: `We're all consenting adults here` [19:06] polotek: jbrokc: yeah but you're not using User anywhere [19:06] polotek: Is Foo supposed to be a subclass of User [19:06] polotek: or vice versa [19:06] jbrokc: polotek: err, should just be Foo [19:07] daneroo has joined the channel [19:07] jbrokc: sorry, that's completely off, function Foo(properties) {… } [19:07] polotek: jbrokc: ah, gotcha [19:07] jbrokc: but it's still the same issue, I just didn't give the right code (dumb) [19:08] polotek: so my next question is, is there a reason you want props to be a closure var? [19:08] polotek: oh sorry, I see what you're trying to achieve here [19:09] jbrokc: polotek: i just want it available on instantiation, everything else is through the public interface [19:10] polotek: https://gist.github.com/7ab5c5dd8f7f7d8855c9 [19:10] polotek: you can't mix instance vars like props and prototype functions [19:11] polotek: once you want a per-instance version of props, you need per instance functions to access it [19:11] jbpros has joined the channel [19:12] jbrokc: polotek: what's the difference between using this. in this case and Foo.prototype. ? [19:12] jtsnow has joined the channel [19:12] sh1mmer has joined the channel [19:12] polotek: or [19:12] polotek: https://gist.github.com/7ab5c5dd8f7f7d8855c9 [19:12] zeade has joined the channel [19:13] polotek: does that make more sense? [19:13] gregpascale has joined the channel [19:14] storrgie has joined the channel [19:14] jbrokc: yeah, i guess. so in my first example if you type Foo it would just return back the anonymous function Foo() since, weirdly, wrapping that whole thing and then putting a () after it executes the inner function [19:15] jbrokc: that's something I still don't quite get [19:15] jbrokc: polotek: ^^ [19:15] gregpascale has joined the channel [19:15] polotek: your anonymous function execution works fine, that's not the problem [19:16] jbrokc: polotek: no, i'm asking a different question really quickly [19:17] toopay has joined the channel [19:17] ixti has joined the channel [19:20] jimmysparkle has joined the channel [19:21] ej_ has joined the channel [19:23] boltR has joined the channel [19:25] tomlion has joined the channel [19:26] tomlion_ has joined the channel [19:26] sfoster has joined the channel [19:27] AvianFlu_ has joined the channel [19:29] vguerra has joined the channel [19:29] jetienne_ has joined the channel [19:29] n8ji has joined the channel [19:30] captain_morgan has joined the channel [19:31] dharmesh has joined the channel [19:32] daneroo has joined the channel [19:32] piscisaureus_ has joined the channel [19:33] unlink: :qa [19:34] daneroo has joined the channel [19:35] albertosh has joined the channel [19:36] jsurfer has joined the channel [19:39] atourino has joined the channel [19:40] parshap has joined the channel [19:41] enos_feedler has joined the channel [19:42] jldbasa has joined the channel [19:43] bob__ has joined the channel [19:44] daneroo has joined the channel [19:45] p1d has joined the channel [19:45] harth has joined the channel [19:45] fzzzy has joined the channel [19:47] quackquack has joined the channel [19:47] zmbmartin has joined the channel [19:47] saesh has joined the channel [19:48] dgathright has joined the channel [19:49] npa has joined the channel [19:50] zmbmartin: I am trying to pull files from one db and insert into another with mongolian and am getting pipe(): too many files open? [19:50] maletor has joined the channel [19:55] ph^_ has joined the channel [19:57] kuebk^ has joined the channel [19:58] technoweenie has joined the channel [19:59] devdazed: zmbmartin: linux or windows? [19:59] zmbmartin: devdazed: ubuntu linux [19:59] devdazed: try increasing the number of open file handles [20:00] devdazed: s/handles/descriptors [20:00] zmbmartin: devdazed: how do I do that? [20:00] devdazed: to display the max: cat /proc/sys/fs/file-max [20:01] devdazed: http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/ [20:01] kitt has joined the channel [20:01] mikeal has joined the channel [20:01] Mokona has joined the channel [20:01] devdazed: well thats for cents. I'm not sure if it's different for ubuntu [20:02] zmbmartin: devdazed: do I increase it for my user or ? [20:02] captain__ has joined the channel [20:03] devdazed: zmbmartin: increase for the user that is running the node process. or do a system wide increase [20:03] k1ttty has joined the channel [20:03] knifed has joined the channel [20:04] remysharp has joined the channel [20:04] quackquack: tjholowaychuk: im getting "Error: ECONNREFUSED, Connection refused" when I try to `browser.post` with Tobi [20:05] daneroo has joined the channel [20:06] quackquack: oops, fixed it my bad >< [20:06] djcoin has joined the channel [20:06] quackquack: double scratch, its back [20:07] isaiah_ has joined the channel [20:07] Me1000 has joined the channel [20:08] mmalecki: quackquack: node 0.5.10? [20:08] npa has joined the channel [20:08] quackquack: mmalecki: im still using 0.4.1, should i upgrade & see if it fixes? [20:09] mandric has joined the channel [20:09] zmbmartin has left the channel [20:09] mmalecki: quackquack: yeah, try that [20:10] quackquack: mmalecki: k, give me a few mins [20:10] quackquack: mmalecki: is there any rvm like solution so that I can keep using .4 for some old code of mine? [20:11] Squeese has joined the channel [20:12] grampajoe has joined the channel [20:13] devdazed: quackquack: nvm [20:13] mike5w3c has joined the channel [20:13] quackquack: devdazed: ty [20:13] devdazed: https://github.com/creationix/nvm [20:13] devdazed: np [20:13] knifed has joined the channel [20:15] JmZ: nice [20:15] JmZ: most self explanatory error ever: [20:15] JmZ: events.js:48 [20:15] JmZ: throw arguments[1]; // Unhandled 'error' event [20:15] JmZ: Error: UNKNOWN, Unknown error [20:16] jajajajaj has joined the channel [20:16] jbrokc has joined the channel [20:16] i42n has joined the channel [20:17] quackquack: you gotta love node's cryptic errors [20:17] JmZ: indeed, and there's no point me looking at line 48 of events because any number of things could be getting there [20:17] grekko has joined the channel [20:18] devdazed: it just says that the first argument sent to "emit" was an error [20:18] AvianFlu: an error that nothing was listening for, more specifically [20:19] saesh has joined the channel [20:19] JmZ: there is a chunk of hacky looking code im using but thats because the logic is just ugh [20:19] remysharp: if I've got a process intensive task (in a web site), should I be shooting this off to a child process and communicating via a socket? Or is there a more sensible approach? [20:19] devdazed: JmZ: put a listener on error and inspect the error object [20:20] JmZ: im receiving data from n hosts, saving them all then, when all are complete, processing them as a group [20:20] JasonJS: Question - where do people put their node servers on the filesystem? /var? /usr/local? Elsewhere? [20:20] JmZ: but it involves calling an external program to 'process' them [20:20] devdazed: if you put a listener on error, it won't crash the process [20:20] JmZ: yeah ok [20:21] devdazed: JasonJS: i always run my node apps under a user and put the files in the home directory [20:21] magnetik has joined the channel [20:21] JmZ: devdazed: the error event of what though? [20:21] JmZ: i have multiple things which could throw errors [20:22] felixge has joined the channel [20:22] felixge has joined the channel [20:22] franciscallo has joined the channel [20:22] devdazed: whatever event emitter you have [20:22] mmalecki: tjholowaychuk: yo, you there? [20:22] devdazed: its probably your instance of server, or it could be the coket [20:22] devdazed: *socket [20:22] caolanm has joined the channel [20:23] N0va` has joined the channel [20:23] MrNko has joined the channel [20:24] quackquack: mmalecki: k, i dont get the error any more -- but it doesnt run the test, it just hangs.... i dont think expresso (or tobi? dunno...) is 0.5.10 ready [20:24] burningdog has joined the channel [20:24] mmalecki: quackquack: actually, use 0.5.9 or 0.4.12 [20:24] whitman has joined the channel [20:25] mmalecki: 0.5.10 is fucked, doesn't resolve localhost [20:26] devdazed: mmalecki: 0.5.10 is resolving localhost for me. However, I have it explicitly set in my host file [20:26] JmZ: also, can i stop a net.Server listening.. inside it? [20:26] JmZ: specifically inside the connection callback/event [20:26] devdazed: JmZ: call close() on the server object [20:26] mmalecki: devdazed: yeah, well, that's not the way really [20:26] jasong_at_apache has joined the channel [20:26] quackquack: mmalecki: k, trying 0.5.9... btw, how do i get nvm to use npm? it was giving me a 'no such module' error [20:26] devdazed: mmalecki: agreed :) [20:26] matyr has joined the channel [20:26] JmZ: well, i see that but [20:27] devdazed: quackquack: nvm should automatically install npm [20:27] JmZ: i need to accept 'n' connections, then close [20:27] quackquack: devdazed: even doing 'npm help [20:27] quackquack: was giving me an error [20:27] ph^ has joined the channel [20:27] devdazed: JmZ: put a listen on 'connection' and increment a counter then do something when that counter reaches something [20:27] JmZ: devdazed: do something where? [20:28] JmZ: if not inside that [20:28] martin_sunset has joined the channel [20:28] Isaiah has joined the channel [20:28] mmalecki: quackquack: what do you mean? npm should use version selected by nvm [20:29] saesh has joined the channel [20:29] devdazed: JmZ: do you want to limit the number of connections? or shut down the server after N connections? [20:29] quackquack: mmalecki: npm was crashing.. ill try again after this compile finished. maybe i otta update npm, also [20:29] mmalecki: oh, I think yes [20:30] JmZ: devdazed: i want to shut it down [20:30] mmalecki: there's a problem with process.binding('stdio') or whatevs [20:30] cjm has joined the channel [20:30] mike5w3c has joined the channel [20:31] quackquack: mmalecki: k, using 0.5.9 npm works again, but same problem w/ expresso+tobi [20:32] burningdog has left the channel [20:32] daneroo has joined the channel [20:33] devdazed: JmZ: http://pastie.org/2800902 [20:33] devdazed: that what you're lookingfor? [20:33] stisti has joined the channel [20:34] chjj_ has joined the channel [20:34] maushu has joined the channel [20:35] paul_uk: hey all, with redis, if i have a hash sessions with json and i have a hash clients with a string. if I am doing hdel on both sessions and clients, why does it work for clients but sessions it's not deleting successfully? I have the most inane issues with node + redis... X( [20:37] LifterAH_ has joined the channel [20:37] FIQ|screen has joined the channel [20:38] real_mjr has joined the channel [20:38] JmZ: yeah devdazed, thats what i ended up doing [20:38] zilch_ has joined the channel [20:38] mmalecki: quackquack: can you run tests on tobi? [20:39] quackquack: mmalecki: no, it just hangs.. no errors [20:39] saesh has joined the channel [20:39] captain_morgan has joined the channel [20:39] mmalecki: quackquack: I mean, tobi's unit tests [20:41] quackquack: ah.. [20:41] quackquack: i had uninstalled it.. just tried to reinstall.. looks like the package.json only declares compatibility w/ 0.4.x [20:42] JumpMast3r has joined the channel [20:42] tjholowaychuk: quackquack i havent tried it with 0.5.x yet [20:43] quackquack: tjholowaychuk: that would explain some of the trouble :) [20:43] kkszysiu_ has joined the channel [20:44] alessioalex has joined the channel [20:44] saesh has joined the channel [20:45] alessioalex: ACTION hello everyone [20:45] neilk_ has joined the channel [20:46] Layke has joined the channel [20:46] ej__ has joined the channel [20:46] Layke: Anyone use the mysql package. How do you check to see if the connection was successful? [20:46] Layke: client.ping()? [20:47] other_mjr has joined the channel [20:47] dotan has joined the channel [20:47] real_mjr has left the channel [20:47] matyr has joined the channel [20:47] alessioalex: I think the connect method has a callback probably [20:47] pquerna: Marak: hey [20:47] soFarAslant has joined the channel [20:47] dotan: hi guys, i'm wondering if there is any generic module to include in express/connect app that will expose req/s from the server's side.. or what do typically people do? [20:48] Layke: alessioalex, the connect method is deprecated now. It doesn't exist. [20:48] Layke: alessioalex, The connect happens automatically when you use a query. [20:48] tjholowaychuk: dotan http://senchalabs.github.com/connect/middleware-responseTime.html ? [20:49] tjholowaychuk: dotan there's nothing to collect stats like that though [20:49] tjholowaychuk: that i've seen at least [20:49] tjholowaychuk: but it would be pretty simple [20:49] dotan: tjholowaychuk, yep. I thought of asking around before rolling my own or using statsd/the sorts [20:51] alessioalex: Layke If a connection cannot be established, the error is delegated to the query callback, rather than the client's 'error' event. [20:51] alessioalex: https://github.com/felixge/node-mysql/wiki/Upgrading-to-0.9.2+ [20:51] alessioalex: that means you can have: client.query('SELECT 1', function(err) { ... if (err) do something ... [20:51] alessioalex: I think [20:51] Layke: Yeah that's what I thought. [20:51] Layke: *in evvvery* query. [20:51] Layke: Kind of a pig. [20:52] alessioalex: Seems kind of odd to me too, but I think you should just try to connect with a wrong pass and see the message [20:52] Layke: Currently I am using client.ping(). But I don't know how hackish that it. [20:52] Layke: If I use the wrong password. I get an object. [20:52] Layke: If I get the right password, I get a "null". [20:52] alessioalex: Find unique things about that object [20:52] nebiros has joined the channel [20:52] piscisaureus_ has joined the channel [20:52] alessioalex: Such as object.message = "Cannot connect" [20:52] alessioalex: or something [20:52] Layke: Yup. That's all I've done. [20:52] dotan: tjholowaychuk, thanks for the pointer, though! [20:52] briancra_ has joined the channel [20:53] Layke: I just wanted to ask in case there is an "official" way. :) Since I feel a bit hacky doing that solution. [20:53] alessioalex: Then write a helper method for that specific message (when the conn cannot be established) and use that helper everywhere. [20:53] Layke: Ok cheers for the pointer. [20:53] kuebk has joined the channel [20:53] chris_ has joined the channel [20:53] alessioalex: np [20:53] sh1mmer has joined the channel [20:53] chris_ has left the channel [20:54] alessioalex: sh1mmer hey [20:54] saesh has joined the channel [20:55] AvianFlu: v8: true [20:55] fly-away has joined the channel [20:55] AvianFlu: bah, where's my IRC repl! [20:55] AvianFlu: ACTION storms off [20:55] daneroo has joined the channel [20:56] enmand has joined the channel [20:56] harthur has joined the channel [20:56] chrischris_ has joined the channel [20:57] vguerra has joined the channel [20:59] chrisumbel has joined the channel [21:00] chrisumbel has joined the channel [21:01] sh1mmer: alessioalex: hi [21:01] sh1mmer: brb [21:03] daneroo has joined the channel [21:04] chrisumbel has joined the channel [21:05] Vova has joined the channel [21:05] l0st1 has joined the channel [21:06] CIA-109: libuv: 03Igor Zinkovsky 07uv_kill * r31f94db 10/ (5 files in 4 dirs): uv_kill - http://git.io/BZ1FZA [21:07] sh1mmer: by 2pm lunch is delicious [21:08] SixView has joined the channel [21:09] SixView: What is the "right" way to determine temporary directory on nodejs windows? [21:09] chrischris_: hi. maybe somebody could help me out in understanding a node.js issue? [21:09] errordeveloper: mikeal: ping ... ... [21:11] ej_ has joined the channel [21:12] JaKWaC has joined the channel [21:13] fzzzy has joined the channel [21:15] heavysixer has joined the channel [21:15] Bediako has joined the channel [21:16] mikeal: heya [21:16] daneroo has joined the channel [21:16] miccolis has joined the channel [21:21] broofa has joined the channel [21:22] tomyan has joined the channel [21:22] ppcano has joined the channel [21:24] materialdesigner has joined the channel [21:25] verdoc has joined the channel [21:26] skunkape has joined the channel [21:26] CIA-109: libuv: 03Igor Zinkovsky 07uv_kill * r15c4253 10/ (7 files in 4 dirs): review feedback fixes - http://git.io/Hh-t1A [21:28] cliffano has joined the channel [21:28] verdoc_ has joined the channel [21:28] Marko_ has joined the channel [21:29] ecin_ has joined the channel [21:30] madhums has joined the channel [21:30] Marko_ has joined the channel [21:31] Marko_: anyone hobot hacker around? [21:33] CarterL has joined the channel [21:34] Dulak: is $75/hour expensive for node programming? I just had a guy pitch a fit at that rate when it looks like its about $50/hour lower than what most others are charging... [21:35] learningnode has joined the channel [21:35] learningnode: hi there can someone help me please [21:35] CIA-109: libuv: 03Igor Zinkovsky 07master * r74b49e8 10/ (10 files in 5 dirs): uv_kill - http://git.io/bmrNdw [21:35] learningnode: i just setup node and cloud9 [21:35] learningnode: and i m getting this error [21:35] learningnode: throw e; // process.nextTick error, or 'error' event on first tick ^ Error: Cannot find module '/Users/farrukh/nodeprojects' at Function._resolveFilename (module.js:326:11) at Function._load (module.js:271:25) at Array. (module.js:430:10) at EventEmitter._tickCallback (node.js:126:26) [21:36] DanoManion has joined the channel [21:36] pokoli has joined the channel [21:36] chrisumbel has joined the channel [21:37] chrisumbel_ has joined the channel [21:37] learningnode: any one [21:37] Vova: hello [21:37] learningnode: hello [21:38] Bediako: hello [21:38] learningnode: looks like all node gurus are busy [21:39] Vova: I am not guru :( [21:39] learningnode: :( [21:39] chilts: anyone know what the old 'npm bundle' command did? I've just seen it in a project but my new npm doesn't know that command anymore [21:39] learningnode: but u might be better han me [21:39] Vova: maybe module file was not copied to server? [21:40] learningnode: vova u know much about cloud9 [21:40] Vova: nodeprojects was NPM module, or simple JS file? [21:40] stride: chilts: it put a project + dependencies into a folder iirc [21:41] learningnode: vova r u asking me ? [21:41] chilts: stride: ah ok, thanks [21:41] chilts: I might take that bit out seeing as it doesn't look like it's supported any more :) [21:41] jsurfer has joined the channel [21:42] Bonuspunk has joined the channel [21:42] Vova: learningnode, yes asking [21:43] learningnode: it can find module.js [21:43] Vova: and 'nodeprojects' ? [21:44] learningnode: thats the folder where hello.js file is [21:44] Vova: because looks like code try to include module with name "nodeprojects" [21:44] Vova: it can be JS file in same dir: nodeprojects.js [21:45] learningnode: but question is if i just write the same code in node console it works fine [21:45] zackattack has joined the channel [21:45] Vova: Can you please paste this code here to view? [21:46] learningnode: sure [21:46] mehtryx has joined the channel [21:47] learningnode: var http = require('http'); [21:47] learningnode: var server = http.createServer(function (request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.end("Hello World\n"); }); [21:47] learningnode: var server = http.createServer(function (request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.end("Hello World\n"); }); [21:47] learningnode: console.log("Server running at http://127.0.0.1:8000/"); [21:47] Bonuspunkt: you missed the server.listen(port) stuff? [21:48] kkszysiu_ has joined the channel [21:48] learningnode: server.listen(8000); [21:49] learningnode: let me try and pas the whole code in one go [21:49] learningnode: var http = require('http'); var server = http.createServer(function (request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.end("Hello World\n"); }); server.listen(8000); console.log("Server running at http://127.0.0.1:8000/"); [21:52] mehtryx has joined the channel [21:52] joshgillies has joined the channel [21:52] Bwen has joined the channel [21:52] chilts: learningnode: use gist.github.com or pastie.org to paste code (ie. don't paste it into the channel) :) [21:52] chilts: thanks :D [21:52] chilts: or a similar service [21:52] JmZ: mmm [21:52] learningnode: ok [21:53] chilts: then just paste the link to it from here [21:53] cn22: there should be a bot that we can trigger to say that each time [21:53] JmZ: im executing a command ('child_process' module), then in its callback, unlinking/deleting files which it used [21:54] JmZ: this seems to cause unexplained errors sometimes, but not everytime. as if the file is being removed while the process is still executing maybe? [21:54] eldios has joined the channel [21:54] jackbean has joined the channel [21:54] Bonuspunkt: learningnode just a wild guess - you did not set a start file at cloud9 / it works when the filename is index.js? [21:55] piscisaureus_ has joined the channel [21:55] zeade has joined the channel [21:55] learningnode: no i did [21:55] mike5w3c has joined the channel [21:55] learningnode: i just set the folder [21:55] PatF has joined the channel [21:55] Morkel has joined the channel [21:56] learningnode: here is the guys https://gist.github.com/1335050 [21:56] hellp has joined the channel [21:56] Bwen: i'm trying to find more info on the object that is passed to the following callback: tls.createServer(options, function (socket){}); anyone? doesnt it have a unique id? [21:56] TooTallNate: can anyone think of a way to access the "global" object inside vm.runInNewContext? [21:56] TooTallNate: and by "global" I mean the passed in ctx object [21:57] reid has joined the channel [21:58] braoru has joined the channel [21:58] learningnode: bonuspunkt ur were right [21:58] Bonuspunkt: learningnode check your run configuration [21:58] maushu: So, callbacks in vm. [21:58] maushu: Yup, I'm doomed. [22:01] maushu: If I run the callback in the vm again, it should lose the closure. Thats bad. [22:01] jsurfer has joined the channel [22:01] andrewfff has joined the channel [22:02] topaxi_ has joined the channel [22:03] cn22 has left the channel [22:04] tomlion has joined the channel [22:04] TooTallNate: ryah: can you think of a way to access the "global" object inside vm.runInNewContext? [22:05] ryah: TooTallNate: this? [22:05] mikeal has joined the channel [22:05] TooTallNate: nope, that *seems* to be just some random empty Object [22:05] TooTallNate: might be a bug [22:05] tjholowaychuk: ryah would you expect vm.runInNewContext('foo = "bar"; this').foo [22:05] tjholowaychuk: to work? [22:05] tjholowaychuk: actually in this case I can just return the one thing I need [22:05] tjholowaychuk: but it does seem to be off [22:06] ryah: tjholowaychuk: hmm. i dont use this API often so im not sure [22:06] tjholowaychuk: me either [22:06] zemanel has joined the channel [22:07] boltR has joined the channel [22:07] fread2281 has joined the channel [22:08] FearOfMusic has joined the channel [22:09] maushu: Any of you had luck with callbacks in vm? The only way I see is to put the whole api into the code that will be run. [22:10] xtianw has joined the channel [22:10] kawaz_home has joined the channel [22:12] torm3nt has joined the channel [22:13] blup has joined the channel [22:13] daneroo has joined the channel [22:14] pikaj00 has joined the channel [22:14] McMAGIC--Copy has joined the channel [22:14] diogogmt has joined the channel [22:15] polotek has joined the channel [22:16] franciscallo1 has joined the channel [22:16] ecin_ has joined the channel [22:20] joshgillies has joined the channel [22:24] davidbanham has joined the channel [22:24] mike5w3c has joined the channel [22:24] davidban_ has joined the channel [22:25] CarterL has joined the channel [22:26] paul_uk has left the channel [22:27] jldbasa has joined the channel [22:30] technoweenie has left the channel [22:30] polotek has joined the channel [22:30] _ink_ has joined the channel [22:31] verdoc has joined the channel [22:31] _ink_ has left the channel [22:31] daneroo has joined the channel [22:32] knifed has joined the channel [22:36] jsurfer has joined the channel [22:36] Wizek has joined the channel [22:36] metellus has joined the channel [22:36] daneroo has joined the channel [22:37] sdwrage has joined the channel [22:38] sh1m has joined the channel [22:38] sh1m has joined the channel [22:40] davemo has joined the channel [22:40] daneroo has joined the channel [22:42] mehtryx has left the channel [22:42] philippkueng has joined the channel [22:42] Bonuspunkt: fs.mkdirSync(path, mode) <-- will this be changed in node 0.6? what should mode be set to at windows? [22:42] daneroo has joined the channel [22:44] smtlaissezfaire_ has joined the channel [22:45] zmbmartin has joined the channel [22:45] AphelionZ has joined the channel [22:46] bnoordhuis: Bonuspunkt: doesn't matter, it's ignored [22:46] cha0s has joined the channel [22:46] cha0s has joined the channel [22:46] bnoordhuis: but for portability's sake you should probably set it to 0777 [22:47] Bonuspunkt: bnoordhuis should this be a default value? [22:48] bnoordhuis: Bonuspunkt: i suppose it could be [22:48] zackattack has joined the channel [22:48] bnoordhuis: i think it defaults to 0 now, which is probably not what you want [22:49] Bonuspunkt: no it throws if mode is not supplied [22:51] davemo has joined the channel [22:53] gut4 has joined the channel [22:53] Xano has joined the channel [22:54] akihito_s has joined the channel [22:57] CIA-109: node: 03Fedor Indutny 07master * r9ad27f7 10/ (doc/api/repl.markdown lib/_debugger.js lib/repl.js): [22:57] CIA-109: node: ignore undefined messages in the debugger repl [22:57] CIA-109: node: fixes #1995 - http://git.io/5x3t4A [22:58] te-brian has joined the channel [22:59] andrewfff has joined the channel [22:59] perezd has joined the channel [23:01] Jippi has joined the channel [23:03] lyte has joined the channel [23:03] lyte has joined the channel [23:04] daneroo has joined the channel [23:04] jacobolus has joined the channel [23:05] _unary has joined the channel [23:05] superstructor has joined the channel [23:06] charlenopires has joined the channel [23:07] efbenson has joined the channel [23:08] jimt has joined the channel [23:08] jsurfer has joined the channel [23:08] joshkehn has joined the channel [23:09] Wizek has joined the channel [23:10] joshkehn has left the channel [23:10] aeo has joined the channel [23:11] paul_k has joined the channel [23:13] IanCormac84 has joined the channel [23:13] skm has joined the channel [23:15] ej__ has joined the channel [23:17] lyte has joined the channel [23:17] lyte has joined the channel [23:20] justinf has joined the channel [23:21] jdpacker has joined the channel [23:21] reid has joined the channel [23:22] CIA-109: node: 03Ben Noordhuis 07master * r1ba834b 10/ doc/api/http.markdown : docs: http: link to relevant net.Socket methods - http://git.io/5c-hrQ [23:26] daneroo has joined the channel [23:27] davidbanham has joined the channel [23:28] secoif has joined the channel [23:28] secoif has joined the channel [23:28] aslant has joined the channel [23:29] Wizek has joined the channel [23:30] Sami_ZzZ has joined the channel [23:30] Rosa has joined the channel [23:32] enmand has joined the channel [23:34] neurodrone has joined the channel [23:34] Rosa: holaa [23:35] bnoordhuis: haloo! [23:35] simenbrekken has joined the channel [23:35] bnoordhuis: Bonuspunkt: right, feel like opening an issue for that? [23:35] Rosa has left the channel [23:36] supsup has left the channel [23:36] okuryu has joined the channel [23:36] JaKWaC has joined the channel [23:39] Tuller has joined the channel [23:40] adrianmg has joined the channel [23:41] daneroo has joined the channel [23:42] secoif has joined the channel [23:43] CIA-109: node: 03Ryan Dahl 07master * r850609e 10/ (110 files in 6 dirs): Remove separation of libuv tests - http://git.io/eUr7MA [23:45] daneroo has joined the channel [23:46] daneroo has joined the channel [23:46] cody-- has joined the channel [23:47] CIA-109: libuv: 03Ryan Dahl 07master * re1bee05 10/ (src/unix/stream.c src/unix/tty.c): [23:47] CIA-109: libuv: UNIX: Loop on blocking streams [23:47] CIA-109: libuv: Also removes a superfluous syscall during uv_tty_init for writable TTY [23:47] CIA-109: libuv: streams. - http://git.io/StRy_w [23:47] AvianFlu_ has joined the channel [23:51] reid has joined the channel [23:52] storrgie has joined the channel [23:52] CIA-109: node: 03Igor Zinkovsky 07master * r143aeb9 10/ (14 files in 5 dirs): upgrade libuv to e1bee05ecdbffbe9de37830530ad2ae2f1fb41c8 - http://git.io/LwA3lw [23:53] amiller has joined the channel [23:54] cody-- has joined the channel [23:55] boltR has joined the channel [23:55] daneroo has joined the channel [23:56] Kage has joined the channel [23:56] Kage: hey [23:57] yhahn has left the channel [23:57] akujin has joined the channel [23:59] sh1mmer: Kage: hi [23:59] matyr has joined the channel