[00:00] itissid has joined the channel [00:00] _mql: SubStack: sure :) [00:00] rauchg_: Aikar speaks the truth. [00:00] Aikar: fly_: http://socket.io you should use this [00:00] itissid: bhahahahaha I am back :P [00:00] fly_: thx [00:01] _mql: Aikar: Sure :) I just like to have control over what's being updated. (that was my conclusion regarding rubygems at least) ;) [00:01] tj: fly_: node/js fits my mental model far more than php ever did, php is awkward even for regular sites I find [00:01] tj: so thats another yes from me [00:02] SubStack: javascript was my first language so that helps [00:02] Aikar: well for someone like me who owns 15+ domains that uses big php scripts, throwing them all behind apache is alot easier than trying to rewrite them all and combine everything into a node server lol [00:02] sudoer has joined the channel [00:02] _mql: Aikar: In the past it seemed like I'm affected by every single regression bug introduced in an updated library ;) [00:02] SubStack: back in 1999 or so [00:02] Throlkim has joined the channel [00:02] Aikar: but my project im working on now is pretty specific and perfect use ofr node [00:02] Aikar: for* [00:02] SubStack: in the dark days of netscape 4.7 and IE4/5 [00:03] Aikar: i would still prefer php over apache for basic websites, node for the more technical and in depth projects [00:04] itissid: I have a node server talking to a backend service via UNIX domain sockets. The Service receives a bunch of web-documents crawled by the node.js server and sent to it. I use stream.connect() for each document. Beyond 1024 the socket connections crap saying too many open connections. From a robust design point of view how can I "regulate" this traffic from node? [00:04] mscdex: wha? php over apache? [00:04] mscdex: :p [00:04] davida has joined the channel [00:05] ryah: itissid: you should just keep track manually [00:05] ryah: itissid: also you can probably increase your "ulimit -n" [00:06] itissid: ryah: I know that last solution... Is that really a good thing? [00:06] mking has left the channel [00:06] richcollins: Aikar: Turns out that I wasn't scheduling any new callbacks from within the jQuerify callback in some cases ... [00:06] itissid: By manually what exactly do you mean? [00:06] ryah: itissid: depending on how active those connections are, node may be able to handle many more [00:07] ryah: itissid: keep a counter. [00:07] _mql: jashkenas: regarding Backbone Issue #78, after all, you're probably right with your assumption I'm dealing with a fetch scenario. However for Substance, I no longer use Backbone.Model for syncing models, as a switched to DNode RMI calls. However, just let me know, in case you want to discuss Model#get anyway. [00:07] jashkenas: sure -- will do. [00:08] itissid: ryah [00:08] itissid: node is actually too fast [00:08] Ond: Get real. [00:09] itissid: I will try the manual solution.. Thanks [00:11] Aikar: mscdex: i meant php running under apache [00:11] DanielSim has joined the channel [00:12] pedrobelo has joined the channel [00:12] fallander has joined the channel [00:12] naturalethic has joined the channel [00:14] isaacs has joined the channel [00:16] _mql: SubStack: can i actually disable socket.io fallbacks, when using the DNode interface on the client? [00:17] airhorns: anyone know why socket.io might use the websocket transport when testing locally but when the same code is deployed to a server and accessed over the internet (using the same browser) it uses xhr-polling? [00:17] airhorns: browser is chrome dev channel [00:17] yozlet: a colleague just pointed out the problem with https://github.com/broofa/perf-lite/blob/master/test.js [00:18] rkieffer: yozlet: ? [00:18] yozlet: namely, that a good optimising compiler/JIT would spot that var res is thrown away and possibly just optimise out the mergesort() call to begin with [00:18] thebigbad: Aikar: you are passing i into spawnWorker, but that function doesn't take any arguments [00:18] yozlet: is a possible problem, anyway [00:18] yozlet: no idea if V8 is actually doing that [00:18] SubStack: _mql: yes, set a list of transports in the options hash [00:18] rkieffer: yozlet: good point - I'll test. [00:19] SubStack: dnode passes those arguments straight along to socket.io [00:19] SubStack: DNode({}).listen(server, { transports : [ 'websocket' ] }) I think will do the trick [00:19] yozlet: rkieffer: "it may also end up being a test of memory management, since the C++ example will be freeing memory (required by the standard) whereas the JS example may just never run a GC step and exit the app" [00:20] davidascher has joined the channel [00:21] rkieffer: yozlet: yeah, I wondered about that. But I think you could say the same for the other interpreted languages in that test, so the difference lies in something other than simple GC laziness (right?) [00:22] yozlet: possibly - it depends on each implementation. And it may significantly handicap C++. [00:22] yozlet: I don't actually know for sure, though :) [00:23] _mql: SubStack: ah, so this needs to be done on the server? not the client? [00:23] SubStack: _mql: oh I forget [00:23] rkieffer: yozlet: well, if I accumulate the results in an array, and print out the array length at the end (i.e. convince the JIT that I need the results), I get pretty much the same result - 0.28 secs. [00:24] SubStack: check the socket.io docs :p [00:24] SubStack: OK SHIT JUST GOT REAL [00:24] SubStack: fixed that stupid lingering bug [00:24] SubStack: we are go [00:24] SubStack: http://www.browserling.com/ [00:25] davidascher has joined the channel [00:25] yozlet: rkieffer: nice. thanks. :) [00:25] _mql: SubStack: aii ;) [00:26] SubStack: oh adding the video link first [00:27] yozlet: SubStack: Do you have ssh tunnels on the ideas backlog? [00:27] pkrumins: launching. [00:27] yozlet: (like what Sauce Labs does) [00:27] pkrumins: ssh tunnels? [00:27] SubStack: yozlet: I have no idea what you are on about [00:28] SubStack: oh, as a feature [00:28] SubStack: ah got it [00:28] yozlet: so that you can test stuff on an internal dev server [00:28] yozlet: yep [00:28] SubStack: yes, heard from people that they'd like that feature [00:28] yozlet: take a look at how Sauce does it, it's pretty nifty [00:28] SubStack: easy to implement I think [00:29] rauchg_: you can use localtunnel for now [00:29] rauchg_: https://github.com/progrium/localtunnel [00:29] itissid: Pastebin is down! [00:30] tapwater has joined the channel [00:30] jchris1 has joined the channel [00:31] davidc_ has joined the channel [00:31] tanepiper: gist.github.com is better anyway [00:31] itissid: ryah: Sorry for being a bit of a noob here... But with the counter solution you gave... If the number of connections to the backend process from node goes over a preset limit I suppose you meant just dropping that connection...? But i want to say postpone that, then what? Cause I do want to process every document fetched by my node server... [00:31] itissid: here is what the code looks like https://gist.github.com/712859 [00:32] jpick has joined the channel [00:32] ryah: you need to have a queue [00:32] itissid: Yeah [00:33] mikeal has joined the channel [00:33] ryah: once a slot opens grab from the queue [00:33] itissid: Hmm [00:36] itissid: Ahh! in the s.on('data') handler is where i should move the s.connect() right? [00:36] itissid: rather than outside [00:37] itissid: There I can put in the slot open guard like you suggested.. [00:38] derferman has joined the channel [00:41] mraleph1 has joined the channel [00:42] mikeal has joined the channel [00:43] boaz has joined the channel [00:45] isaacs has joined the channel [00:45] MikhX has joined the channel [00:45] unomi has joined the channel [00:46] itissid: I am doing work on scalable machine learning projects and recently i made http://mnesia.wikispaces.com/Organixe project that uses node... It uses node a lot and i am pleasantly surprised to say that I am having to throttle node sometimes to let the system catch up :) [00:47] zentoooo has joined the channel [00:49] jpick has joined the channel [00:51] springmeyer has joined the channel [00:53] nooder has joined the channel [00:55] pedrobelo has joined the channel [00:57] sveisvei has joined the channel [00:58] pkrumins: hey guys, help us to get our project to hacker news front page: [00:58] pkrumins: http://news.ycombinator.com/item?id=1936033 [00:58] pkrumins: upvotes appreciated :) [00:58] pkrumins: for those who don't know, our product is browserling: www.browserling.com [00:58] eee_c has joined the channel [00:59] jashkenas: "Nexus is down. Try again shortly." [00:59] SubStack: pow restarted [00:59] eml_ has joined the channel [01:00] jashkenas: did you draw it? The illustrations are fantastic. [01:00] jashkenas: doesn't seem to be working for me, however ... even with the Nexus up. [01:00] davidascher has joined the channel [01:01] jashkenas: SyntaxError: Unable to parse JSON string [01:01] SubStack: yep, I drew all the illustrations [01:01] jashkenas: lovely work. [01:01] SubStack: jashkenas: which browser? [01:01] jashkenas: Safari. [01:01] SubStack: rauchg_ got that error too in safari [01:01] SubStack: thought escape() would fix it [01:01] jashkenas: http://cl.ly/3MxY [01:02] itissid: pkrumins: Same for me too :) http://mnesia.wikispaces.com/Organixe [01:02] SubStack: oh noes! [01:02] SubStack: I tried to fix that with an unescape(), didn't work [01:02] pkrumins: thanks guys [01:03] SubStack: oh hmm maybe in safari location.hash doesn't have the # [01:03] jashkenas: yes -- you have to normalize cross-browser for location.hash. [01:04] itissid: http://news.ycombinator.com/item?id=1936068 [01:04] pkrumins: itissid: what's that? [01:04] SubStack: fixing... [01:05] itissid: pkrumins: Its a scalable web service to find similarity between documents using models made through machine learning [01:05] pkrumins: itissid: for some reason that page is down [01:05] pkrumins: i mean it's empty [01:05] itissid: uses node.js to load the model and run docs throgh them... [01:05] pkrumins: doesnt have anything in it [01:06] jashkenas: itissid: link? [01:06] jashkenas: oh, itissid might be soft-banned. [01:06] SubStack: pushed a hotfix for the JSON thing [01:07] SubStack: have no idea whether it will work [01:07] itissid: jashkenas: What does that mean? [01:07] jashkenas: SubStack: still broken here. [01:07] SubStack: :( [01:07] jashkenas: Anything I can type in the JS console to help you debug? [01:08] SubStack: can you type location.hash and location.search? [01:08] jashkenas: itissid: it means we can't see it -- got a direct link? [01:08] itissid: http://mnesia.wikispaces.com/Organixe [01:09] jashkenas: substack: http://cl.ly/3Mpw [01:09] itissid: I need to get that onto hacker news... whats going on!? [01:09] SubStack: hmm that is super odd! [01:09] SubStack: jashkenas: escape(location.hash.slice(1)) ? [01:10] SubStack: jashkenas: JSON.parse(escape(location.hash.slice(1))) too [01:10] SubStack: puzzling! [01:10] jashkenas: substack: http://cl.ly/3MgQ [01:11] jashkenas: it looks like location.hash is including your String interpolation code. [01:11] SubStack: oh whoops I mean unescape! [01:11] jashkenas: unescape(location.hash) [01:11] jashkenas: "#{"uri":"documentcloud.org","browser":"chrome","version":"7.0"}" [01:11] jashkenas: unescape, strip the leading hash, and you're good to go. [01:12] SubStack: that's what I did I thought! [01:12] SubStack: with .slice(1) the way it was before! [01:12] jashkenas: yes, the previous bit with *un*escape works. [01:13] SubStack: ok putting it back the way I thought it was [01:13] SubStack: but perhaps it wasn't that way! [01:13] jashkenas: You probably want location.hash.replace(/^#+/, '') [01:13] SubStack: oh possibly [01:14] SubStack: why #+? [01:14] mikew3c has joined the channel [01:14] jashkenas: just to be paranoid ... no reason. [01:14] jashkenas: I've seen some bogus /## urls in IE before... [01:14] SubStack: ah k [01:15] SubStack: aww crap fixing it requires a restart of the api servers [01:15] isaacs has joined the channel [01:15] agilandfast has joined the channel [01:15] SubStack: ok everybody restarting everything [01:16] SubStack: aha! [01:16] SubStack: don't have to restart after all [01:16] SubStack: should just work™ [01:16] SubStack: one moment [01:17] SubStack: jashkenas: pkrumins says it's fixed now [01:17] jashkenas: yes, nice work. [01:18] SubStack: :D [01:18] hoffa_ has joined the channel [01:18] jashkenas: however ... you've got some other problems... clicking "go" yields: http://cl.ly/3NW8 [01:19] SubStack: jashkenas: try starting from the main page [01:19] jashkenas: "No API resources availble for null group" [01:19] SubStack: :( [01:20] jashkenas: full picture from a fresh refresh: http://cl.ly/3NXD [01:20] pkrumins: it has crashed! [01:20] SubStack: dnode stuff is breaking now, hacking [01:23] mscdex: T-Co: I've pushed to github now. Let me know if you run into any issues. I've tested and adding and deleting of flags should properly work now. [01:23] SubStack: vnc crashed >_< [01:23] SubStack: trying to get everything back up [01:25] mjr_: SubStack: is it OK to tell people about browserling now? [01:27] SubStack: mjr_: yes although it's really getting hammered and services are dying left and right [01:27] mjr_: uh oh [01:27] SubStack: ok sweet might have stuff back and slightly running [01:27] mjr_: That's.. good? [01:27] SubStack: expected! [01:28] jashkenas: SubStack: do you illustrate as well as program? [01:28] SubStack: jashkenas: yep [01:28] mjr_: I love the queue illustration. [01:28] mjr_: Although I hate waiting in a queue [01:29] jashkenas: A t-rex is behind me in the queue ... and two morbid-looking Edgar Allan Poeses... [01:29] SubStack: easter egg: http://browserling.com/queue [01:30] jashkenas: SubStack: It's also doing "Time's Up" before you ever make it out of the queue. [01:30] joemccann_ has joined the channel [01:30] mjr_: oh man, that queue is awesome [01:30] jashkenas: http://cl.ly/3NV5 [01:30] SubStack: when the api server dies you get a "time's up" message [01:30] jashkenas: ah. [01:30] SubStack: I'll fix that later [01:30] mscdex: SubStack: who does the artwork? ;-) [01:30] SubStack: mscdex: I do [01:30] SubStack: all of it [01:30] jakehow has joined the channel [01:31] justin_ has joined the channel [01:31] MikhX has joined the channel [01:32] tim_smart has joined the channel [01:32] mjr_: I have now unleashed the awesome power of my social graph on your server. Probably one of my cousins will click on it because they want to see a robot. [01:32] mjr_: Gonna have to turn on those paid plans pretty soon. [01:33] joemccann has joined the channel [01:36] eml_ has joined the channel [01:39] jvolkman_ has joined the channel [01:45] softdrink has joined the channel [01:48] davidc_ has joined the channel [01:50] luke` has joined the channel [01:50] sudoer has joined the channel [01:52] luke`_ has joined the channel [01:59] erlnoob has joined the channel [02:03] davidascher has joined the channel [02:05] aubergine has joined the channel [02:10] nbqx has joined the channel [02:11] isaacs has joined the channel [02:11] itissid: ryah: I adjusted the counter for managing connections like you suggested, but I still get a max connections exceeded. the code is at https://gist.github.com/712976 . The top one is the new one as compared to the old one below. Can you see a flaw in this? [02:18] evanmeagher has joined the channel [02:19] mattcodes_ has joined the channel [02:21] Nwallins has joined the channel [02:22] ossareh has joined the channel [02:22] Aikar: hmm, i thought fork() did not have resource sharing O.o [02:23] rbranson: ? [02:24] rbranson: you get a copy of the memory at fork() time [02:24] rbranson: but you can't cross the process boundary after that point [02:24] rbranson: you can share FDs [02:24] Aikar: https://gist.github.com/712669 [02:25] Aikar: hmm ok then [02:25] Aikar: that makes sense as to why the 8th child can see 7 entries in workers array [02:25] robotarm_ has joined the channel [02:25] Aikar: still doesnt explain why my workers array is blowing up tho [02:26] rbranson: ugh [02:27] Nwallins has left the channel [02:27] rbranson: honestly, I think every abstraction on top of fork() i've ever seen sucks [02:27] Aikar: i hit the url http://starlis.com:8124/ and in my console i see conn ip 5 503 6 [object Object],[object Object],[object Object],[object Object],[object Object],[object Object] [02:27] rbranson: besides Ruby's Process.fork do [02:27] Aikar: the 6 before [Object] is workers.length [02:27] rbranson: hmm [02:27] Aikar: it randomly returns varying lengths :/ [02:27] Aikar: and as you see thats 6 [02:27] Aikar: theres 8 workers spawned [02:28] Aikar: someones bot in here hit the server, conn 94.17xxxx 1 369 8 [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] [02:28] Aikar: that had 8 [02:28] rbranson: oh [02:28] mikeal has joined the channel [02:28] Aikar: i cant figure out why some request dont see the full array [02:28] rbranson: so it stops at 8 children? [02:29] Aikar: i want it to spawn 8 children, and it is successfully, i see 8 processes in the tree under parent [02:29] rbranson: (the children aren't forking children, etc)? [02:29] rbranson: ok [02:29] Aikar: but on line 4 you see im getting an index based on the IP [02:29] Aikar: 14* [02:30] Aikar: but workers.length is returning varying results [02:30] rbranson: yeah it will [02:30] Aikar: the only code that removes an element from the array is line 31 which has a console.log and isnt being hit [02:30] Aikar: why ? [02:31] rbranson: the child processes wont' be able to communicate or know about the other child processes effectively [02:31] Aikar: this code should be running on the parent [02:31] rbranson: unless you have a separate IPC mechanism that allows them to synchronize state [02:31] Aikar: or is the fact that the code is being duplicated causing problems? [02:32] rbranson: first thing I would do is clean up your code a bit, honestly [02:32] Aikar: well added all the debug trying to figure out wtf was going on [02:32] rbranson: the fact that it's all in one single block is probably hampering your ability to properly model it in your head [02:32] MattJ has joined the channel [02:32] rbranson: separate scopes would probably help clean it up a bit [02:32] Aikar: ive modeled it out fine, its just executing weird. [02:35] murz has joined the channel [02:36] matt_c has joined the channel [02:37] Aikar: http://starlis.com:8124 [02:37] Aikar: i think moving the net.createServer till after the while loop fixed it [02:37] Aikar: the fork() would of been duplicating that server [02:38] rbranson: yeah so the fork() code was continuing outside of the else { } branch? [02:38] rbranson: the child code, rather [02:38] Aikar: im guessing it essentially had every forked process listenining and a random one grabbing it which the other children didnt have a full copy of workers [02:39] Aikar: i had the child return false so the while loop knew to break out of the loop and exit out silently [02:39] rbranson: ah [02:39] Aikar: and the parent return true to keep going on to next worker spawn [02:39] Aikar: but the 'copying of the net server' seems like a logical explanation of what was going on [02:39] Aikar: if worker 3 picked up the connection, its workers array only has 2 entries [02:40] rbranson: hmm [02:40] rbranson: i'm amazed fork works at all [02:40] Aikar: im using the fork on npm, which is a super simple C++ ext that just does fork() and ev_default_fork() [02:41] rbranson: eah [02:41] Aikar: https://github.com/ryantenney/node-fork/blob/master/fork.cc [02:41] rbranson: I guess if it does ev_default_fork [02:41] Aikar: daemonize seems to work fine too [02:41] rbranson: didn't know ev had the ev_default_fork [02:41] rbranson: it would probably go nuts otherwise :D [02:42] Aikar: some 'fugue' module had a comment in its docs saying something bout event loop being screwed up on daemonize, i bet it wasnt using it heh [02:42] Aikar: https://github.com/pgte/fugue/blob/master/lib/fugue.js [02:43] Aikar: looks like fugue did similiar to what i was wanting so i was looking to it for ideas, but it used WebWorkers to pass fd which i think broke in 0.3.0 cause i had to look at the changes/commits to see new way to do it as http://developer.yahoo.com/blogs/ydn/posts/2010/07/multicore_http_server_with_nodejs/#1 no longer worked [02:44] rbranson: jesus christ [02:44] rbranson: that code makes me want to stab mye yes [02:44] Aikar: lol [02:45] itissid: Could some one help me with: here https://gist.github.com/712976 i am making a connection to a backend process using sockets. To limit the # open conns I use a Queue, but i think my implementation may be flaky.. [02:45] eee_c has joined the channel [02:45] rcy has joined the channel [02:45] itissid: Just the node code part... [02:45] itissid: ofcourse [02:46] rbranson: ok :D [02:46] CIA-95: node: 03Ryan Dahl 07master * ra6f6532 10/ (4 files in 2 dirs): Fix test-securepair-server - http://bit.ly/eNOHxZ [02:46] CIA-95: node: 03Ryan Dahl 07master * rb57c1f5 10/ (src/node.cc src/node.h src/node_script.cc): Saner, yet still ugly, fix to displaying syntax errors - http://bit.ly/eQ9D4q [02:48] Aikar: are kids out of school for thanksgiving week. got windows open and i hear kids outside -.- its 10pm [02:48] rbranson: itissid: first of all, self.openConn++; should probably be in the connect callback, no? [02:49] rbranson: or I guess that's your way to limit total # of connections [02:49] rbranson: I could just definitely see openConn getting out of whack [02:49] rbranson: if some of those fail to connect for any reaon [02:49] rbranson: reason [02:49] rbranson: like FD limit reached [02:49] rbranson: etc [02:49] rbranson: I'd also check your FD limit [02:50] itissid: rbranson: FD limit is 1024 [02:50] itissid: on my system [02:50] rbranson: k [02:50] itissid: i can increase it by the ulimit -n hack [02:50] rbranson: yeah [02:50] itissid: but thats ugly [02:50] rbranson: that's not a hack :) [02:50] itissid: Well is it not like just wishing your problems went away? [02:51] rbranson: no, I mean, clearly you want to use a queue [02:51] rbranson: the solution is not to create thousands of connections :) [02:51] rbranson: what's going on? [02:51] rbranson: does it just stop processing the quee? [02:52] itissid: rbranson: The queue is processed but after sometime the connection still craps out saying connection limit exceeded.. [02:52] rbranson: so it empties the full queue out? [02:52] rbranson: or it stops in the middle? [02:52] itissid: Stops in the middle... [02:53] rbranson: you might need to put another loop in there on a setInterval() to process the queue [02:53] itissid: rbranson: Enlighten me... hows that now? Set interval will cause the thread to sleep no? [02:53] rbranson: nah, so [02:53] rbranson: what i'm thinking is happening [02:53] rbranson: is you still have items in your queue [02:53] rbranson: but testServer() isn't getting called [02:55] rbranson: also, 'close' is probably not the event you want to trap [02:55] rbranson: you want to look for 'end' [02:55] derferman has joined the channel [02:55] rbranson: 'close' won't get called on every stream [02:55] rbranson: i would try that first [02:55] rbranson: since it's a simple fix [02:56] ryah: okay. fucking ssl servers can close connections now. [02:56] itissid: rbranson: damn! you might have hit the hammer there i think [02:56] itissid: the connection isnt closed when i open it again! [02:56] itissid: right? [02:56] rbranson: well, if 'close' isn't called on every stream [02:57] rbranson: eventually openConn will always be >300 [02:57] rbranson: and then new docs will only get queued and the queue will never be processed [02:57] itissid: So end is a sure bet here ...? let me check this BRB 2 mins [02:57] rbranson: yeah [02:57] rbranson: end is reliable [02:59] rbranson: I still think it's going to be a little flakey with the way you're processing the queue [02:59] itissid: rbranson: What would be robust here? [02:59] rbranson: I would setup an interval and process the queue in that interval [02:59] hassox has joined the channel [03:00] rbranson: until your queue is empty, then clear it and continue [03:00] sivy: ok, apparently not grokking my second mysql client of the day [03:00] rbranson: I would just pass everything through the queue too [03:00] sivy: trying to use node-mysql [03:01] sivy: and the tests show using require('mysql/client') [03:01] sivy: but i get 'Cannot find module 'mysql/client'' [03:01] rbranson: V8 is going to finish running that entire doc for(;;) loop [03:01] itissid: rbranson: Sort of like th producer consumer model... [03:01] rbranson: before it even runs your socket calls [03:01] rbranson: yeah [03:01] rbranson: so you're going to queue up N - 300 documents every time [03:02] itissid: Hmm [03:02] eee_c has joined the channel [03:03] tylerstalder has joined the channel [03:04] itissid: Let me see what i can do with this.. Thanks for those suggestions.. [03:05] tekky has joined the channel [03:05] twoism has joined the channel [03:06] luke` has joined the channel [03:10] langworthy has joined the channel [03:10] InsDel has joined the channel [03:13] webr3: anybody done an XHR2 w/ followRedirects for node yet? [03:16] jchris1 has joined the channel [03:16] Me1000 has joined the channel [03:21] galaxywatcher has joined the channel [03:21] dguttman_ has joined the channel [03:21] elijah-mbp has joined the channel [03:25] bartt has joined the channel [03:30] Aikar: ryah: any way to 'reinitialize' the process variable on fork()? maybe an official fork? as it stands now process still acts as the parent process so cant catch signals or (easily) get pid [03:31] ryah: no [03:32] ryah: start a new process [03:32] ryah: i'm not going to support fork [03:33] masahiroh has joined the channel [03:33] jimt_ has joined the channel [03:33] unomi has joined the channel [03:35] eml_ has joined the channel [03:36] tylerstalder has joined the channel [03:37] galaxywatcher has joined the channel [03:39] zedas has joined the channel [03:41] evanmeagher has joined the channel [03:42] WRA has joined the channel [03:42] WRA: heyo [03:43] webr3: ryah, are you going to do (or is there already) Worker support? [03:43] webr3: ACTION consults lazy-web first [03:43] WRA: when I instantiate GenericObject it doesn't have the route method... what am I doing wrong? [03:43] WRA: http://pastebin.com/NCs8hTZE [03:43] softdrink1 has joined the channel [03:43] eml-mobile has joined the channel [03:43] WRA: I blame it on the fact I commented it :D [03:44] rcy has joined the channel [03:46] mbrochh has joined the channel [03:46] mbrochh has joined the channel [03:47] luke` has joined the channel [03:47] ryah: webr3: https://github.com/pgriess/node-webworker [03:48] WRA: nevermind, I'm a dick. [03:48] WRA: I was doing everything right actually xD [03:50] micheil: ryah: I think that actually needs a bit of work on it. [03:52] rbranson: http://en.wikipedia.org/wiki/Computational_complexity_theory So much cooler than big-O notation [03:53] mscdex|gtab has joined the channel [03:53] wilmoore has joined the channel [03:53] mscdex|gtab: woot [03:54] bartt has joined the channel [03:54] ryah: micheil: what? [03:54] ryah: the web-worker? [03:54] micheil: yeah [03:54] ryah: micheil: what do you think of this api [03:54] ryah: var creds = crypto.createCredentials({key: key, cert: cert}); [03:54] ryah: var server = tls.createServer(creds, function (socket) { socket.pipe(socket); [03:54] ryah: }); [03:54] micheil: by work, I mean, I think it broke in one of the last releases, not sure thing [03:54] micheil: *though [03:55] micheil: is createCreds likely to block? [03:55] micheil: otherwise it looks good [03:55] ryah: it's just computational [03:56] micheil: so, it's actually quite fast and all. [03:56] micheil: as long as tls presents the same event api, it should be really easy to use [03:57] micheil: (eg emit connect only after it's been made secure and all) [03:58] richcollins has joined the channel [03:58] ryah: should it be [03:58] ryah: require('tls').createServer() [03:58] ryah: require('ssl').createServer() [03:58] ryah: or [03:58] ryah: require('crypto').createServer() [03:58] micheil: not in crypto. [03:58] micheil: and are we doing tls or ssl? [03:59] ryah: tls [03:59] ryah: (but everyone says ssl) [03:59] micheil: remembering that tls supersedes ssl. [03:59] ryah: ssl might be more familiar [04:00] galaxywatcher has joined the channel [04:00] micheil: not at all [04:00] mjr_: I say SSL when I think I mean TLS, but I actually just mean HTTPS. [04:00] Anti-X: everyone says ssl but that doesn't mean it's right [04:00] micheil: I think that's a confusion point [04:00] mjr_: HTTPS takes too long to say [04:00] eml-mobile has left the channel [04:00] Anti-X: i say secure sockets [04:00] micheil: it should be require("tls") if that's the spec we're following. [04:01] robotarm_ has joined the channel [04:02] googol has joined the channel [04:04] ryah: hm [04:04] ryah: i like tls because it's short [04:04] mjr_: I think we should call it tls if what we mean is tls [04:05] micheil: yeah [04:05] ryah: btw look at this awesome lib: [04:05] mjr_: We call it "dgram" even though lots of people think it should be called "UDP" [04:05] ryah: https://gist.github.com/713092 [04:05] elijah-mbp has joined the channel [04:05] mjr_: Because dgram is what we really mean. [04:05] ryah: well, calling it udp would be incorrect since you can also send dgrams over unix domain sockets [04:05] paulwe has joined the channel [04:05] mjr_: exactly [04:05] mjr_: Isn't calling it ssl also incorrect if it is really just TLS? [04:06] ryah: yeah, but i feel that's more acceptable [04:06] ryah: :) [04:06] ryah: but i agree, let's not confuse the matter more [04:06] ryah: ssl is out [04:06] ryah: 'crypto' .. it's just so much to type [04:06] ryah: i feel it will not fit well in my slides [04:06] micheil: also, we already have that crypto module [04:07] micheil: and it's hard as crap to keep clean. [04:07] micheil: with all the root CA's and that. [04:07] ryah: https://gist.github.com/713092 <-- living the dream [04:07] mjr_: I use md5 a lot in my code, but I don't care what the module it comes from is called. [04:07] ryah: fucking pipes [04:08] itissid: Is somehere into libevent.. I am in deep shit here.. [04:08] micheil: wtf? does that actually work ryah ? [04:08] ryah: micheil: yeah [04:08] micheil: woah. [04:09] micheil: do a little compression and you'll fit that in a tweet. [04:09] micheil: :P [04:09] ryah: so the secure stuff will have two layers - three even [04:09] ryah: c bindings, secure pair, and this [04:09] micheil: nice [04:10] micheil: this should make it really easy to also stream to files and dgrams secure data [04:10] micheil: ryah: what about verifying that a connecting peer or similar? [04:11] ryah: so, you do something like this: [04:11] micheil: and for consistency with other code, it's probably best we: require("utils") instead of: require("utils").inherits [04:12] ryah: tls.Server(creds, function (socket, pair) { pair._ssl.verifyPeer() }) [04:12] ryah: so, kind of ugly.. [04:12] ryah: micheil: 'util' [04:12] micheil: maybe proxy that or something? [04:12] micheil: my bad there. [04:13] ryah: yeah, well we can think about it [04:13] ryah: i just want an easy way to setup all the pipes [04:13] ryah: get the securepair.cleartext [04:13] ryah: which is "socket" in this example [04:13] ryah: it actually works.. [04:13] jimt has joined the channel [04:14] micheil: Server() should have no listener argument. [04:15] Guest78040 has joined the channel [04:15] micheil: unless we've added one to net.Server() [04:15] micheil: oh man. fail on my behalf there. [04:15] davidascher has joined the channel [04:15] ryah: tls.Server(function (s) { s.pipe(s); }).listen(8000) [04:16] ryah: ^-- should produce a server with a self-signed cert [04:16] ryah: echo server [04:16] micheil: net.Server and net.Stream need to be documented. [04:16] micheil: hmm [04:18] ryah: we might as well have a require('https').Server(function (req, res) { res.writeHead(200); res.end("blah\n") }); [04:18] ryah: too [04:18] micheil: https://github.com/miksago/node/issues/issue/17 [04:19] micheil: ryah: hmm.. where do I give it my certs? [04:19] ryah: first arg of Server [04:19] ryah: my only point is that we should default to something good [04:19] micheil: k, example didn't show that [04:19] ryah: like a random self-signed cert [04:20] micheil: hmm.. [04:21] micheil: I'd rather document it that: if desired, at time of creating a crypto.createPair(), it is possible for you to have a certificate generated for you, although, it is recommend ed that you generate your own certificate manually and store this somewhere on your filesystem. [04:21] micheil: and then link to say, the linode documentation on creating self-signed certificates [04:21] ryah: oh let's not document that yet [04:21] micheil: rather then having optional arguments [04:22] MikhX has joined the channel [04:23] jimt_ has joined the channel [04:23] micheil: var creds = crypto.createCredentials({generate: true}); [04:23] micheil: brb [04:23] ryah: or maybe default to PSK... [04:24] Aikar: whats best way to clone an object, ie process.env? [04:24] MikhX has joined the channel [04:25] alishah has joined the channel [04:25] Aikar: would new = sys.inherits({}, old); be best? [04:26] micheil: Aikar: util.inherits directly modifies the passed in object. [04:26] micheil: also, Object.clone I think exists [04:26] jchris1 has joined the channel [04:26] micheil: or not. [04:27] wilmoore has joined the channel [04:27] micheil: util.inherits does not return anything (should it?) [04:28] ryah: remember sys.mixin? [04:28] ryah: :) [04:28] ryah: Aikar: you have to loop over the keys and o it [04:28] Aikar: ah figured there would be something cleaner already to do it lol [04:28] micheil: heh, yes, I do ryah [04:28] ryah: for (var x in process.env) { newenv[x] = process.env[x] } [04:29] micheil: ryah: any thoughts on that documentation stuff [04:29] micheil: on the mailing list [04:29] Akufen has joined the channel [04:29] Akufen has joined the channel [04:30] ryah: micheil: ? maybe i missed it [04:30] micheil: you replied to it [04:30] micheil: "Re: website docs for 0.3.1" [04:32] BrianTheCoder has joined the channel [04:32] micheil: he seems to be focusing on the style of the documentation more so then the content; I'm more in favour of getting content right, before we worry about the styles [04:34] ryah: micheil: just tell him that patches are welcome :) [04:34] micheil: hmm.. okay [04:34] micheil: "patches are welcome, but may be refused"? [04:34] micheil: :P [04:35] o_o has joined the channel [04:35] tim_smart: "Patches are welcome." [04:36] tim_smart: He might just be better at style than you are :) [04:36] dnyy has joined the channel [04:36] ajcates has joined the channel [04:37] micheil: heh, well, from every browser I've tested in, the only ones which exhibit very small type are ones were the default font-size is set to soemthing like 10px [04:39] tim_smart: Just don't worry about it :p Someone will always have opinions. [04:40] ctp_ has joined the channel [04:41] irclogbot_ has joined the channel [04:42] tim_smart: <3 http://www.youtube.com/watch?v=yHV04eSGzAA [04:44] bartt1 has joined the channel [04:50] micheil: ryah: quick patch for the documentation: https://gist.github.com/713130 [04:51] dnolen has joined the channel [04:54] micheil: ryah: actually, wait up on that. more changes in a sec. [04:55] postwait has joined the channel [04:56] prettyrobots has joined the channel [04:56] alishah: hi, do i need to install a webserver before installing node.js ? [04:56] Aikar: no [04:57] Aikar: preferably node would listen on port 80, however if you do have another webserver listening on 80 like apache you will need a proxy to get to node or use a diff port or ip/port combo [04:57] yozlet has joined the channel [04:58] Aikar: for example i have my apache listening on X.7:80 and node listenong on X.37:80 [04:58] jimt has joined the channel [04:58] alishah: ok thanx. are there any beginners node.js tutorial online? [04:58] Aikar: howtonode.org [04:58] alishah: I have already install node .. but already had LAMP installed, so just wanted to know. [04:59] alishah: Thank you. [04:59] Aikar: is apache running? [04:59] Aikar: if so, it 'owns' port 80 [04:59] alishah: yes it is. [04:59] Aikar: if you turn apache off then node can take port 80 [04:59] Aikar: well your node serv will need to use a diff port or take up one of the methods i listed above [05:00] alishah: I made a test script which listens on 8000 when i do 127.0.01 I get apache's page. but when i include the port i get the node.js page. [05:00] Aikar: yep thats as expected [05:00] Aikar: if using 8080 is acceptable to you then you can go forward with that [05:01] alishah: ok, 10X [05:01] themiddleman has joined the channel [05:01] Aikar: alishah: some recommended modules/sites to look at, http://expressjs.com, http://socket.io [05:05] micheil: ryah: new patch. https://gist.github.com/713147 (I'll email it across as well) [05:06] hassox has joined the channel [05:06] viirya has joined the channel [05:08] twoism has joined the channel [05:11] hornairs has joined the channel [05:12] prettyrobots has joined the channel [05:17] davidascher has joined the channel [05:18] micheil: ryah: when is that tls stuff likely to land? [05:20] unomi has joined the channel [05:22] indexzero has joined the channel [05:23] saikat: pkrumins: congrats on the browserling launch (i think that's you right?) [05:23] saikat: i've been very curious to see how stackvm ends up looking [05:23] sivy: any mysql-native users in here? [05:28] tekky has joined the channel [05:29] hassox has joined the channel [05:32] mbrochh has joined the channel [05:32] mbrochh has joined the channel [05:33] marshall_law has joined the channel [05:34] tprice: is it NULL or null? [05:35] Fenda has joined the channel [05:35] mjr_: null [05:36] Fenda: if i run a timeout function every 60 seconds on my nodejs server that prints hello world, how much overhead is on a nodejs server? next to none? [05:37] quirkey has joined the channel [05:39] T-Co: mscdex, Awesome, thanks. Will do [05:39] T-Co: And gooood morning :) [05:39] erlnoob has joined the channel [05:41] mjr_: Fenda: a single 60 sec timer itself is completely ignorable. [05:41] mjr_: Of course, you can wake up every 60 seconds and do a bunch of work, but the timer itself is quite cheap at that scale. [05:42] Aikar: im trying to use processes instead of forking, however it doesnt seem to be passing the fd on correctly. https://gist.github.com/713171 i see 'got conn on i x' on parent but nothing on client and connection just hangs. what am i doing wrong [05:43] unomi has joined the channel [05:44] ceej has joined the channel [05:44] Fenda: mjr_: i see. ive basically got a timestamp and status var. when the timestamp var becomes < new Date() - 60 i'd like to change the value of status. can't think up the best nodejs way to code this :> [05:45] Fenda: mjr_: also, this isn't only going to happen once. i have an array full of a dynamic number timestamp variables that all need checking [05:46] Aikar: nvm got it working, needed stdin = new net.Stream(0, 'unix'); stdin.resume() instead of process.openStdin(); [05:46] Fenda: dynamic number of timestamp variables* [05:47] ajpiano has joined the channel [05:48] sivy: ACTION bangs his head on the wall [05:48] sivy: apparently mysql-native only likes basic 'select's [05:48] saschagehlich has joined the channel [05:48] mjr_: Fenda: depending on how many timers you need, you can certainly start a new timer for each one. At some point, this will start to get slow, like all things when you do a lot of them. [05:49] MattJ: Is there no way to output binary data to a file? I'm looking for a "raw" encoding I guess [05:50] rbranson: wait [05:50] rbranson: so win95 didn't really have protected memory [05:50] rbranson: http://everything2.com/title/Windows%25209x%2520does%2520not%2520have%2520true%2520memory%2520protection [05:50] mjr_: MattJ: you can usually use buffers for this [05:51] tekky has joined the channel [05:51] MattJ: Aha, there's a "binary" encoding [05:55] ryah: i need gdb to be able to step though js and c [05:55] Fenda: how many timers could i be running on node before it slows down? :> [05:55] ryah: if i had that... [05:55] ryah: Fenda: it depends more on how many timeout values you have [05:55] T-Co: mscdex, parseFetch fails for "BODY[HEADER.FIELDS (FROM TO SUBJECT DATE)] {162}" doesn't match the regex: "var result = /^BODY\[(.*)\](?:\<[\d]+\>)?$/.exec(key);" where key is "BODY[HEADER.FIELDS" [05:56] ryah: Fenda: and if you are using 0.2 or 0.3 [05:56] ajpiano has joined the channel [05:57] Fenda: ryah: im on 0.3, and i could be running up to 2000 concurrent setTimeout('do something small here', 30000); [05:58] killfill has joined the channel [05:58] MattJ: doh, "This encoding method is depreciated and should be avoided in favor of Buffer objects where possible." [05:58] ryah: Fenda: yeah, should work [05:58] Fenda: ty [05:58] MattJ: what about where not possible? :) [06:00] keyvan has joined the channel [06:00] Fenda: ryah: or i suppose instead of using server load, i could have each client run a timeout on their side [06:00] T-Co: mscdex, Changed to "var result = /^BODY\[(.*)\]?(\{[\d]+\})?$/.exec(key);" and it works. Then it still complains about "this.addFlags(uid, 'Deleted', cb);" -> "TypeError: Object # has no method 'addFlags'" [06:00] cjm has joined the channel [06:00] mscdex: T-Co: hrmm [06:01] ryah: Fenda: that's probably better - but setTimeout is relatively cheap [06:01] sh1mmer has joined the channel [06:01] T-Co: mscdex, Let's see, maybe it's a scope issue... [06:02] T-Co: mscdex, Yeah, it's in move callback and tries to call this. [06:02] mscdex: ah yes [06:03] langworthy has joined the channel [06:03] itissid: rbranson: Hey I was still not able to resolve that issue... moving stuff from end to close dint help, though it seems like the right thing to do.. The problem is basically even though it shows that connections are being closed the server eventually saturates.. [06:03] hornbeck has joined the channel [06:03] itissid: You suggested a timeout strategy [06:04] hornbeck has joined the channel [06:04] itissid: Could you possibly explain a bit more? [06:05] twoism has joined the channel [06:05] mattly has joined the channel [06:05] yozlet has joined the channel [06:07] rbranson: itissid: make sure you're calling .end() instead of .close() when you want to close the connections [06:09] itissid: Well i am closing connections from the process first... And I am completing the process by calling s.end() in the 'end' event handler.... [06:09] T-Co: mscdex, Then there is an issue, which I personally really would like you to find a solution for. When copying message to another box, it's uid changes, so you cannot modify it's flags after that anymore (or anything else for that matter) [06:09] itissid: that brings me into the 'close' event handler [06:10] itissid: as the API suggests thats where I should be when the connection is completely closed... [06:10] RevoOf has joined the channel [06:11] itissid: And here is where the problem starts [06:11] rbranson: itissid: if you know when your connections need to end, just call .end(), the whole close -> end event jump is unnecessary [06:12] rbranson: itissid: calling .end() from the end event isn't going to do anything as well, since 'end' means that the connection is already gone, and .end is going to do anything [06:12] janne has joined the channel [06:13] itissid: Well without it the call flow does not go into the close... But that is just another hop like you suggested... i am more troubled with the code part that should follow that.. [06:13] T-Co: mscdex, Well, that may actually be desired result when copying actually, so the uid still points to the original message. However when moving, the original gets deleted. [06:13] mscdex: T-Co: right [06:14] itissid: I.E. how to deal with the extra N-300 connections on the queue [06:14] T-Co: mscdex, That could be a good thing to mention in the documentation at least. [06:15] T-Co: mscdex, Because there actually is no reason to update the uid in the current connection, because the mailbox changed upon move. So nevermind that :) but mention it in the documentation :) [06:15] rbranson: itissid: I would try to fiugre out what state the connections are in before continuing though [06:15] itissid: This https://gist.github.com/713195 is the code as it stands.. [06:16] itissid: yeah this boundary case is very hard... how do you check the state then? [06:16] rbranson: itissid: you need to move everything from 'close' into 'end' [06:17] T-Co: mscdex, When moving the correct flow of actions (of course) is to first edit flags and then move. [06:18] mscdex: T-Co: huh? [06:19] T-Co: mscdex, In my part. I have to first add/delFlags and after that move the mail (because the uid changes). [06:19] rbranson: itissid: keep the .end() in the 'end' even though, I wasn't thinking straight [06:20] rbranson: event [06:21] T-Co: mscdex, So forget everything I said :D [06:21] T-Co: mscdex, Seems to work fine, after tweaking the regex a bit. [06:22] mscdex: T-Co: i'm still looking into returning the new uid for at least move and maybe copy too [06:22] mscdex: there's an imap extension that allows this, but i'm looking for something that doesn't rely on that [06:24] mape: ryah: Are the dtrace thingys at joyent landing in core? [06:24] T-Co: mscdex, Yeah, that might be a good feature. [06:25] T-Co: mscdex, One might be (not bullet proof, though) to first get the NEXTUID from the target mailbox and return that after copy/move [06:26] MikhX has joined the channel [06:28] micheil: ryah: could EAFNOSUPPORT be thrown by the current http.js when connecting via http:// and using ssl? [06:30] WRA: any decent IDE yet? [06:30] benburkert has joined the channel [06:31] jacobolus has joined the channel [06:31] hassox has joined the channel [06:34] skiz has joined the channel [06:34] skiz has left the channel [06:35] Fullmoon has joined the channel [06:38] jchris1 has joined the channel [06:38] res99 has joined the channel [06:39] cataska_ has left the channel [06:41] mape: Anyone here tried using pgriess node-websocket-client to benchmark socket.io ? [06:43] googol: I am looking for some feedback on http://jsapp.us it is a simple node.js hosting platform designed for the weekend hack type projects, it is still in the early phases, and I know there are some issues with the sandbox still but I am just looking for some feedback [06:44] davidascher: googol: cute! [06:45] davidascher: googol: if you put a twitter or email address in the comment, i'd be happy to tweet it and see who shows up [06:46] davidascher: googol: the q i'd have is what packages do you have installed already, and what persistence layer. [06:46] googol: davidascher: I am trying to make it like what comes with node and avoid adding packages [06:47] googol: davidascher: I have plans for a github like user include of files [06:47] googol: davidascher: but for the time being you can make a new file and require('./name') in [06:48] Aikar: hmm, im getting an EADDRINUSE error but the callstack is very tiny like its erroring on nodes level? https://gist.github.com/713229 [06:48] Aikar: worst part is, only happens 75%~ of the time [06:49] davidascher: googol: signing off, but i think you're onto something. [06:49] googol: davidascher: thx [06:50] davidascher: googol: i told the skywriter folks about it, btw, figured they'd be interested =) [06:50] Aikar: where are the node .js files like net.js node.js at? [06:52] derren13 has joined the channel [06:52] ossareh has joined the channel [06:53] luke` has joined the channel [06:56] unomi has joined the channel [06:57] jimt_ has joined the channel [07:00] mikeal has joined the channel [07:01] peritus_ has joined the channel [07:01] peritus- has joined the channel [07:02] jimt has joined the channel [07:02] tim_smart: Aikar: The js stuff is in lib/. The C++ stuff is in src/ [07:02] tim_smart: Apart from the bootstrap js, which is in src/node.js [07:02] Aikar: so it references the compile folder? those arnt copied? [07:02] CIA-95: node: 03Nikhil Marathe 07master * rfa8ffaf 10/ cmake/libv8.cmake : cmake: Install v8 headers include/node (+5 more commits...) - http://bit.ly/g1nfc5 [07:03] tanepiper has joined the channel [07:05] tekky has joined the channel [07:06] zentoooo has joined the channel [07:07] jimt has joined the channel [07:07] ryah: micheil: *shrug* [07:07] ryah: mape: no [07:07] mikew3c has joined the channel [07:08] ryah: mape: bryan has some probes in https://github.com/bcantrill/node-dtrace [07:08] ryah: which are a bit behind master - but i have patch each version [07:08] mape: ryah: Ok [07:11] ryah: kind of regretting this cmake buisness [07:11] ryah: lots of work for nothing, basically [07:12] ryah: well - hopefully it makes people happy [07:12] tim_smart: Heh just noticed the migration to cmake. What are the advantages over waf? [07:12] ryah: it's not a migration [07:13] ryah: it's an alternatives [07:13] ryah: s/s$// [07:13] tim_smart: Oh right... [07:14] ryah: what's a bit disgusting about cmake is that it actually still generates a makefile [07:14] guybrush: googol: looks good! [07:15] ryah: like - you have this massive system which is totally unusable because no one would ever have it installed [07:15] ryah: and it wont even completely build the system [07:15] ryah: *sigh* [07:15] WRA: yeah, only bad part about waf is the stupid debian distro of nodejs [07:15] tim_smart: So why offer it as an alternative? [07:15] tim_smart: Seems like wasted effort :/ [07:15] tim_smart: Almost... [07:16] ryah: people wnat it. [07:16] ryah: WRA: ? [07:17] tim_smart: Oh right. The autoconf branch seemed to have more promise. [07:17] ryah: tim_smart: yeah... [07:17] ryah: *sigh* [07:17] WRA: the debian distro of nodejs(read ubuntu distro) renames node and nodewaf to nodejs and nodejswaf [07:17] WRA: it also requires the development distro to actually have nodewaf [07:18] ryah: WRA: yeah. that's because debian has nazi-like hive mentality [07:18] ryah: the don't think, they just look in rule books [07:19] mikew3c: anybody here doing an v8 coding and ever used the d8 shell for debugging? I'm wondering if there are docs anywhere explaining what I can do with it. e.g., if I can examine things after setting breakpoints [07:19] ryah: apparently there is a program called 'node' used for HAM radio [07:19] ryah: therefore, this project must change its name [07:19] ryah: (they say) [07:19] benburkert has joined the channel [07:19] fangel has joined the channel [07:20] WRA: it actually doesn't make sense to me why its node and not nodejs [07:20] ryah: because node is the name [07:20] WRA: Is that stipulating that there could be another scripting language for node? [07:21] WRA: and node is the real project. :D [07:21] twoism has joined the channel [07:22] meck has joined the channel [07:22] mikew3c: Debian project should spend more time making sure its own developers don't do asshatted arbitrary changes to packages [07:22] saschagehlich has joined the channel [07:23] mikew3c: like changing cron behavior so that it logs errors and sends notifications every time a process called from cron exits non-zero [07:23] WRA: :3 [07:23] ryah: (that said, the debian maintainer for node is a very charming fellow. i understand his is forced by his overlords) [07:24] ryah: s/his/he [07:24] WRA: WHY IS JUST CALLED NODE [07:24] WRA: *it [07:24] pdelgallego has joined the channel [07:24] ryah: WRA: i answered that [07:24] WRA: But that makes no sense. :( [07:26] WRA: http://nodejs.org/ I mean sure its referred to in text as Node but the URL and banner graphic say NodeJS [07:27] WRA: I think its just that you guys hate the ham radio node, obviously. [07:27] ryah: node.org was taken [07:27] ryah: https://github.com/ry/node/commit/19478ed4b14263c489e872156ca55ff16a07ebe0 [07:27] guybrush: WRA: you call node by `node` [07:28] guybrush: not `node` starts the REPL not `nodejs` [07:28] guybrush: so it would not make sense to install it via `aptitude install nodejs` [07:28] ryah: i don't want to be the author of some shitty 6-character program. [07:28] guybrush: just my opinion [07:29] springify has joined the channel [07:29] mikew3c: ryah: node is definitely a much better name than "server". so good choice there, man :) [07:29] WRA: Twitted ;) [07:29] tisba has joined the channel [07:29] tisba has joined the channel [07:29] ryah: mikew3c: :) [07:30] rcy: there was a similar problem with git/git-core in debian awhile back [07:30] ajcates has joined the channel [07:31] WRA: well I assume as Node gains more popularity they'll eventually budge [07:31] tim_smart: Yeah I have been caught with the `apt-get install git` annoyance a few times. [07:31] rcy: WRA: yes [07:31] guybrush: tim_smart: same here [07:31] WRA: and yeah git-core vs git is just annoying. [07:31] rcy: lesson: take the name you are thinking of for your project, and md5 it to get an official name [07:32] mbrochh has joined the channel [07:32] guybrush: anyway, i am installing node via nvm - so I dont care :p [07:32] rcy: uh, with salt [07:32] tim_smart: rcy: The md5 of `node` vs `node` is the same. [07:32] tim_smart: Yeah, with salt. [07:32] WRA: So, did you think node would get this popular? [07:32] rcy: ;) [07:32] guybrush: WRA: for sure :p [07:33] tim_smart: The problem is, no one knows how popular something is going to get, unless they have devine intervention. [07:33] tim_smart: divine* [07:34] rcy: can we rewrite universe/hamradio node with node.js? [07:34] WRA: I wonder if the hamradio maintainer could actually give you the name [07:35] tanepiper: no [07:35] ryah: the old hello-world.js didn't look as cute [07:35] tanepiper: they have already said no [07:35] ryah: https://github.com/ry/node/blob/19478ed4b14263c489e872156ca55ff16a07ebe0/example.js [07:36] WRA: gah, my eyes. [07:36] nsolsen has joined the channel [07:36] Throlkim has joined the channel [07:38] tim_smart: Hmm verdict of awesome window manager after switch from GNOME: <3 [07:38] ryah: tim_smart: :) [07:39] ryah: tim_smart: does that mean your anti-awesome or pro? [07:39] tim_smart: pro-awesome [07:39] sriley has joined the channel [07:39] ryah: i use 2.3 is better than 2.4 [07:39] tim_smart: I'm still running a few gnome daemons though. gnome-settings-daemon etc [07:40] tim_smart: Oh, I'm running 3.4 I think [07:40] ryah: me too - hard not to have network-manager [07:40] ryah: 23 [07:40] ryah: er [07:40] ryah: yeah, 2.x vs 3.x i guess [07:40] ryah: 3 has lua stuff [07:40] ryah: which i find disgusting [07:40] ryah: 2.x is just a simple config file [07:41] unomi: fluxbox :) [07:41] tim_smart: Ya. I haven't tried 2.x. Would be cool if they used node :p [07:41] unomi: nodeOS [07:41] ryah: tim_smart: a wm in node is totally possible [07:41] ryah: WM aren't super heavy apps [07:41] tim_smart: Yeah, anything is possible, I don't know if it would be a good idea though. [07:41] ryah: just need to organize a few corners here and there [07:41] WRA: any Node multiplayer game frameworks out there? [07:42] ryah: tim_smart: given that there are already pretty good window managers, probably not :) [07:42] tim_smart: I don't mind the lua config though. lua is kinda nice... But I can't really compare to 2.x as I haven't tried it. [07:43] tanepiper: i wanted to like xmonad, but it's config system is horrible [07:47] unomi: I've always preferred blackbox / fluxbox [07:47] unomi: simple config, can remove all chrome, whats not to like? [07:48] WRA: wow, just checked out wordsquare.com [07:48] ivanfi has joined the channel [07:49] tanepiper: Flash intro and ONE page, what's not to like [07:50] unomi: heh [07:50] unomi: the colors are not bad though [07:51] tanepiper: table-tastic layout [07:51] ryah: http://wordsquared.com/ wow [07:52] ryah: seems to have grown a bit [07:52] jed___ has joined the channel [07:52] ryah: (node app) [07:52] unomi: nice with the minimap [07:58] evanmeagher has joined the channel [07:58] derferman has joined the channel [08:00] mape: hah nice [08:00] mape: looking at the minimap you might as well throw Risk into there [08:01] jetienne has joined the channel [08:02] ryah: tim_smart: do you use mocp ? [08:02] ryah: if not you should [08:06] teemow has joined the channel [08:09] ryah: tim_smart: http://farm6.static.flickr.com/5043/5203827308_f10b859021_o.png [08:09] jimt_ has joined the channel [08:10] guybrush: ryah: it is a better screen? [08:10] tanepiper: hhhhmm, music player deamon [08:10] guybrush: ah lol [08:11] tanepiper: you know you can control that via nodejs now :p [08:11] tanepiper: https://github.com/robinduckett/node-mpd [08:11] stagas has joined the channel [08:11] AAA_awright: Nice [08:13] ryah: http://farm5.static.flickr.com/4086/5203235147_a8c72cba07_o.png <-- with two windows [08:13] MikhX has joined the channel [08:13] tanepiper: +htop, ftw! [08:13] ryah: ImI [08:13] ryah: i should have displayed prstat [08:14] maqr has joined the channel [08:16] tim_smart: ryah: That looks pretty nice [08:16] tim_smart: I'm using banshee atm [08:17] tim_smart: Only because I didn't see any cli players that looked decent [08:17] ph^ has joined the channel [08:18] ryah: tanepiper: hey! node-mpd awesome [08:18] ryah: what can i do with that? [08:18] ryah: can i make a web server displaying my last plays ? [08:19] tanepiper: or an irc bot that spams the chan with your song choices! [08:19] ryah: oh :P~ [08:19] jetienne: it is likely broadcasted in dbus already [08:19] ryah: where is the node irc client. just for the plugin possibilities it must be done. [08:20] DoNaLd`: ryah: https://github.com/donaldinos/GitArista [08:21] tanepiper: https://github.com/haxd/scriptable-node-irc-bot seems to be good [08:21] tim_smart: DoNaLd`: Isn't that a bot [08:21] tim_smart: IRC client please, with vim bindings. [08:21] tanepiper: oh irc client [08:22] mape: didn't mscdex work on an irc client? [08:22] tanepiper: NO! Must work today, not be sidetracked by cooler but less profitable projects [08:22] DoNaLd`: tim_smart: i know, but this is one project, which use irc :) and this is demonstrating of possibility also irc bot with nodejs :) [08:22] mape: with ncurses mojo [08:23] [AD]Turbo has joined the channel [08:23] mscdex: mape: it was mostly just a simple example for node-ncurses, but the other week i started working on it to expand it a bit more ;-) [08:23] ryah: it would be cool if vim could attach a tty [08:23] tim_smart: DoNaLd`: IRC bots are the hello world of node.js :) [08:23] mape: Nice [08:23] [AD]Turbo: hi there [08:23] DoNaLd`: tim_smart: ;)) [08:24] tim_smart: Urgh. Time to look into node, ncurses and IRC [08:24] virtuo_ has joined the channel [08:24] ryah: tim_smart: https://github.com/mscdex/node-ncurses [08:25] mscdex: i was starting to implement multiple windows [08:25] tanepiper: sweet [08:25] mscdex: for the irc client example [08:25] mscdex: but currently stuck on trying to find a reliable way of detecting modifier keys [08:25] mscdex: :\ [08:26] mape: ryah: Hehe, is Dungen famous in the US? [08:26] Fenda: using sockets:io in the client.on('disconnect' function. if i put a setTimeout('hello world', 5000); it gets executed immediately. how would i go about implementing my timeout properlly? [08:27] mape: Fenda: You can't use a string in setTimout [08:28] mape: setTimeout(function(){console.log('hello');}, 5000); [08:29] ryah: mape: hm, i dont know [08:30] qFox has joined the channel [08:30] mape: Just seemed random you would listen to them, almost no one in Sweden even knows about them [08:33] mikeal has joined the channel [08:33] Druid_ has joined the channel [08:33] Blink7 has joined the channel [08:34] dguttman has joined the channel [08:36] sudoer has joined the channel [08:36] ryah: mape: i think they were on pitchfork or something [08:36] tanepiper: i just don't get it: https://github.com/mauricemach/zappa [08:37] mape: Ah k [08:37] Fenda: mape: its currently printing hello instantly instead of waiting 5 seconds.. any ideas? http://pastebin.com/5au09bcB [08:37] tanepiper: not to knock the guys work, because he probably worked hard on it, but why? [08:37] mape: Fenda: just foo, not() [08:38] Fenda: ahhh [08:38] tanepiper: Fenda: ^^ [08:38] matjas has joined the channel [08:38] mape: pass the reference not the return value [08:38] Fenda: i see, serves me right for assuming i know js :D [08:39] WRA has joined the channel [08:40] springif` has joined the channel [08:41] SamuraiJack has joined the channel [08:41] daglees has joined the channel [08:41] daglees has joined the channel [08:42] hellp has joined the channel [08:43] quirkey has joined the channel [08:46] mikeal has joined the channel [08:56] slaskis has joined the channel [08:57] mikeal1 has joined the channel [08:58] adambeynon has joined the channel [09:01] sveimac has joined the channel [09:02] peritus_: hey. [09:02] peritus_: can someone look at https://gist.github.com/c51a8d546c70c6280709 ? [09:03] mscdex: peritus_: what about it? [09:03] peritus_: I bind the 'data' event of an incoming http request within a http client callback. [09:03] peritus_: The 'data' event never gets fired. [09:03] CIA-95: node: 03Ryan Dahl 07master * r73318fa 10/ (63 files in 12 dirs): Upgrade V8 to 2.5.8 - http://bit.ly/h0RmDg [09:03] derren13 has joined the channel [09:03] peritus_: if i remove the callback (line 21) however, everything works as expected. [09:04] evanmeagher has joined the channel [09:04] jetienne: peritus_: you dont bind on the proper object [09:04] Throlkim has joined the channel [09:05] jetienne: https://github.com/jeromeetienne/node-neoip/blob/master/contrib/webpeer_http_proxy/webpeer-http-proxy.js#L50 <- liook here [09:05] unomi has joined the channel [09:06] wang has joined the channel [09:06] nooder: anybody compiled node with cmake? [09:06] ryah: ACTION raises his had [09:07] peritus_: jetienne: i don't think i am. I want "curl request comes in" -> "fire request to google" -> "wait for response from google" (don't care about the content) -> "read the post data from curl" -> "respond" [09:08] peritus_: jetienne: it's a artificial test case, sure. [09:08] jetienne: peritus_: ? i just answered why 'data' is not trigger [09:08] mscdex: peritus_: https://gist.github.com/cbada572a7bb9f0025db [09:10] peritus_: mscdex: ja, no. I don't care about the response from google. i care about the post data from the client using curl [09:11] c0nde has joined the channel [09:14] peritus_: i have this problem with my couchdb-auth-layer shadowing post-data. my friend lars has the same problem with his redis-callback http://twitter.com/#!/lstrojny/status/7233572712751104 .. can someone try to reproduce it ? [09:16] mscdex: peritus_: i dunno, maybe req's events are firing before it grab's google's homepage [09:16] mscdex: that's my guess [09:18] mscdex: that's why it's best to listen for events as soon as you can so that you don't miss them [09:20] peritus_: mscdex: so it's a bug ? lars did it that way but i don't want to mix my authentication layer with my backend file serving logic. [09:20] TomY has joined the channel [09:20] mscdex: not a bug [09:20] danslo has joined the channel [09:21] mscdex: it's just that the curl POST is happening before the google fetch is finished [09:21] mscdex: the entire POST request that is [09:21] shirro has joined the channel [09:22] peritus_: mscdex: so if the event isn't bound, it goes to /dev/null [09:23] peritus_: mscdex: now i get it. sorry for being a hardhead, i've just been carrying this thing for a week now. [09:23] peritus_: mscdex: thanks for clarification. [09:23] mscdex: peritus_: yes, if there are no listeners for a particular event when it's fired, then the event is lost [09:25] sriley has joined the channel [09:25] peritus_: mscdex: let's try to .pause req as soon as i get ahold of it and then .resume() it if i want the data. [09:25] peritus_: mscdex: thanks again [09:27] mscdex: pause it? [09:27] delapouite has joined the channel [09:28] jimt has joined the channel [09:28] peritus_: mscdex: http://nodejs.org/api.html#stream-pause-31 [09:28] mscdex: oh, pause the stream [09:29] mscdex: iirc pausing does not queue up events [09:29] mscdex: there was discussion about that some time back [09:31] peritus_: mscdex: ah, ok - http://groups.google.com/group/nodejs/msg/7b6374d5afc381cd explains it. i'll figure it out. [09:32] mbrochh has joined the channel [09:38] Fullmoon has joined the channel [09:40] jimt has joined the channel [09:41] tim_smart: mscdex: "Error opening terminal: xterm." with all the ncurses examples :/ [09:41] mscdex: os? [09:41] tim_smart: ubuntu [09:41] mscdex: tim_smart: did you install from npm or from the master branch? [09:42] tim_smart: master [09:42] mscdex: ok [09:44] mscdex: out of curiousity, what version of ubuntu? [09:44] maqr has joined the channel [09:44] maqr has joined the channel [09:44] tisba has joined the channel [09:44] tisba_ has joined the channel [09:46] mscdex: tim_smart: are you able to use other ncurses programs, like nano? [09:49] bahamas has joined the channel [09:52] caolanm has joined the channel [09:53] jimt_ has joined the channel [09:57] hassox_ has joined the channel [09:58] jimt has joined the channel [10:00] itissid has joined the channel [10:00] tim_smart: mscdex: Ubuntu 10.10 [10:00] tim_smart: mscdex: I'm using irssi... Doesn't that use ncurses? [10:01] mscdex: heh yes [10:01] itissid: Hey i am tryin to adjust the ulimit -n to increase the # of local socket connection between a nodejs and a local processes. But its not working ... Both processes are run by the same user.. [10:01] mscdex: tim_smart: hmm strange... [10:02] itissid: can there be typically an override setting in the process that may stop this? [10:03] mohiam has joined the channel [10:03] jimt_ has joined the channel [10:04] mscdex: tim_smart: i'm using the same terminal type on the same os and version... [10:04] shirro has joined the channel [10:04] shirro has joined the channel [10:06] xla has joined the channel [10:06] erlnoob has joined the channel [10:08] tim_smart: mscdex: gnome-terminal? [10:08] mscdex: tim_smart: no, putty [10:13] cefn has joined the channel [10:15] whack has joined the channel [10:16] ilpoldo has joined the channel [10:18] mscdex: tim_smart: i'm not sure what is causing that.... i just tried on my xubuntu netbook with the graphical terminal and it works fine [10:19] mscdex: :\ [10:20] tim_smart: Hmm I dunno [10:22] aliem has joined the channel [10:22] saschagehlich has joined the channel [10:22] itissid: Hmm looks like FD_SETSIZE needs to be #defined before compiling stuff..... [10:24] whack: itissid: that comes with an #include, usually select.h [10:25] itissid: Yeah but its set to frackin 1024 [10:26] springify has joined the channel [10:26] mscdex: ncurses can be such a strange beast [10:26] mohiam_ has joined the channel [10:27] whack: itissid: I don't know if you can increase it, since select relies on the fd_set type which is generally a fixed buffer size based on whatever the kernel has for the syscall [10:27] itissid: I just increased it to 10000 [10:27] itissid: You can... [10:28] itissid: but you ned to increase that kernel thingy too [10:28] itissid: yeah [10:28] whack: you can use other polling calls that don't have funky limits like that [10:28] whack: epoll, etc [10:29] whack: or just plain old poll [10:29] jed___ has joined the channel [10:38] tisba_ has joined the channel [10:38] qFox has joined the channel [10:38] saschagehlich has joined the channel [10:39] erlnoob has joined the channel [10:44] Twelve-60 has joined the channel [10:44] themiddleman_ has joined the channel [10:45] christophsturm has joined the channel [10:45] saschagehlich has joined the channel [10:48] omarkj has joined the channel [10:51] ewdafa has joined the channel [10:52] PyroPeter has joined the channel [10:52] stagas_ has joined the channel [10:53] okuryu has joined the channel [10:59] siculars_ has joined the channel [11:00] jed____ has joined the channel [11:00] altamic has joined the channel [11:02] spetrea has joined the channel [11:03] spetrea: can I have multiline strings ? [11:05] stride: you can use the accepted answer here http://stackoverflow.com/questions/805107/multiline-strings-in-javascript but it will only insert spaces iirc [11:07] stride: although, if you can live with that extra space, you can terminate lines with \n\ that should work [11:08] mikedeboer has joined the channel [11:11] slaskis has joined the channel [11:12] fermion has joined the channel [11:13] Anti-X: if you have multiline strings in your script then they're most likely not supposed to be there [11:15] SubStack: + them together [11:15] Anti-X: array them up and join them with '\n' [11:15] SubStack: also tht! [11:15] Anti-X: to take the sexy way [11:16] whack has left the channel [11:16] Anti-X: oh and comma first [11:16] Anti-X: gnight [11:16] springify has joined the channel [11:27] jvolkman_ has joined the channel [11:28] agnat has joined the channel [11:29] mif86 has joined the channel [11:30] jed___ has joined the channel [11:32] mbrochh has joined the channel [11:35] wolc has joined the channel [11:42] Locke23rus has joined the channel [11:43] wolc has left the channel [11:49] mape: Anyone had issues using node-websocket-client with socket.io? I have it working but more then 50% of the time I get connection refused [11:50] hellp has joined the channel [11:50] mape: but if I keep trying it works [11:55] cwo has joined the channel [12:00] jed____ has joined the channel [12:01] siong1987 has joined the channel [12:02] _sri has joined the channel [12:06] paulwe has joined the channel [12:06] unomi has joined the channel [12:07] herbySk has joined the channel [12:07] cognominal has joined the channel [12:09] saschagehlich has joined the channel [12:14] pdelgallego has joined the channel [12:17] vdrab has joined the channel [12:17] cefn has joined the channel [12:20] cjm has joined the channel [12:20] Sami_ZzZ has joined the channel [12:22] cheney has joined the channel [12:22] cheney: hello [12:23] cheney: if I execute requite("http"); will node interfere with PHP? [12:24] cjm has joined the channel [12:26] TomY: cheney, should only be a problem if you try to listen on the same port (if you call http.createServer().listen(PORT)) [12:26] TomY: (although it should just fail) [12:28] paulwe has joined the channel [12:29] Anti-X: php does nothing [12:29] Anti-X: apache is the one you need to worry about [12:29] Anti-X: those indians, man... [12:30] jed___ has joined the channel [12:33] eee_c has joined the channel [12:33] cheney: heh, thanks [12:35] shirro has joined the channel [12:35] shirro has joined the channel [12:37] saschagehlich has joined the channel [12:37] cheney: does require("path") return a path or return execution into a path? [12:40] eee_c has joined the channel [12:41] postwait has joined the channel [12:43] SubStack: cheney: it returns the path module [12:47] slaskis: the formatting function used in console.log is that available somewhere? [12:48] slaskis: uhm, i mean accessible, like through utils.format or something [12:50] Sami_ZzZ has joined the channel [12:51] ooooPssss has joined the channel [12:51] cjmFloating has joined the channel [12:53] sclaflin has joined the channel [12:53] eee_c has joined the channel [12:55] SubStack: slaskis: there's util.inspect [12:55] slaskis: SubStack: yeah, i guess i was a bit fuzzy, i meant the console.log("hell %s", name) thing [12:56] slaskis: trying to find the node stuff on my computer but can't find them in my homebrew cellar [12:56] slaskis: strange [12:57] christophsturm: what's the best way to add non-npm dependencies to my project? i want to try node-redis-client as replacement for node-redis [12:57] iszak has joined the channel [12:57] iszak has joined the channel [12:58] christophsturm: on a related note, why does node-redis return binary strings instead of buffers? [12:58] cefn has left the channel [12:59] slaskis: ah, github is trusty, this was what i meant: https://github.com/ry/node/blob/master/src/node.js#L494 [12:59] slaskis: and apparently it's not available [13:00] SubStack: ah [13:01] jed____ has joined the channel [13:01] nsolsen has joined the channel [13:04] eee_c1 has joined the channel [13:05] maushu has joined the channel [13:06] markwubben has joined the channel [13:08] mikew3c_ has joined the channel [13:09] mape: christophsturm: christophsturm have you tried mjrs redis client? [13:09] mape: node_redis [13:10] mape: https://github.com/mranney/node_redis [13:10] drudge: http://en.wikipedia.org/wiki/Christina_Robinson_(actress) [13:10] mape: works great for me, and it is in npm [13:10] drudge: er [13:13] saschagehlich has joined the channel [13:17] christophsturm: mape: did you compare it to node-redis ? [13:17] Booths has joined the channel [13:21] aheckmann has joined the channel [13:21] Athox has joined the channel [13:22] guybrush: to store data like https://gist.github.com/713645 in nstore, is it better to create multiple documents? [13:23] guybrush: i.e. a document for a, another for b and one for c? [13:23] cjm has joined the channel [13:24] tanepiper: drudge: [13:27] mbrochh has joined the channel [13:27] tylerstalder has joined the channel [13:27] d0k has joined the channel [13:28] drudge: tanepiper [13:28] MikhX has joined the channel [13:29] tanepiper: oh didn't mean to hit enter in here, i was calling someone out on another chan seeing if it was you [13:29] tanepiper: i assume you posted that link because Equestrian Sexual Response is doing the link rounds :D [13:30] drudge: nah i didn't mean to post it here, someone asked how old the girl from dexter was [13:30] drudge: because in the last episode she did NOT look 13 [13:31] jed___ has joined the channel [13:31] dnolen has joined the channel [13:32] boaz has joined the channel [13:32] tanepiper: Take care, Lumen “Tick. Tick. Tick. That's the sounds of his life running out.” [13:32] tanepiper: D: [13:33] RevoOf has joined the channel [13:35] ianward has joined the channel [13:36] bartt has joined the channel [13:36] slaskis: could anyone please tell me when to use PUT vs. POST in a rest api? [13:36] bradleymeck has joined the channel [13:38] stonebranch has joined the channel [13:38] jakob__ has joined the channel [13:39] jakob__ has left the channel [13:39] christophsturm: slaskis: POST is for creating a new object and put is to write t an existing object [13:39] slaskis: so, what confuses me then is that couchdb is using PUT for creating a database for instance [13:41] tanepiper: slaskis: the difference is if the item has an ID or not [13:41] christophsturm: right [13:41] Sembiance: morning everyone [13:41] tanepiper: if you pass an object, no ID it's a POST, if you generate the ID it's a PUT [13:41] sveimac_ has joined the channel [13:42] slaskis: ahaa, allright, that makes sense now [13:42] slaskis: thanks [13:42] tanepiper: https://github.com/cloudhead/cradle shows it with the create/update part of the docs [13:44] jacobolus has joined the channel [13:47] bartt has joined the channel [13:48] wattz: good morning [13:49] yumike has joined the channel [13:50] dnolen has joined the channel [13:56] kriszyp has joined the channel [13:57] luke` has joined the channel [13:58] joshskidmore has joined the channel [13:58] jed___ has joined the channel [13:59] joshskidmore: anyone know which stat timestamp fs.watchFile uses? [13:59] joshskidmore: it seems that on linux it uses mtime, but on OS X, it triggers on atime [14:00] sivy has joined the channel [14:00] petercooper has joined the channel [14:00] joshskidmore: or if i could force use of one? [14:02] unomi has joined the channel [14:02] malkomalko has joined the channel [14:03] pdelgallego has joined the channel [14:04] springify has joined the channel [14:04] hellp has joined the channel [14:05] jmar777 has joined the channel [14:07] trotter has joined the channel [14:08] springify has joined the channel [14:08] InsDel has joined the channel [14:08] mape: christophsturm: yes and it was bette [14:08] mape: r [14:12] pifantastic has joined the channel [14:15] wink_ has joined the channel [14:16] Jonasbn_ has joined the channel [14:16] sivy: good am: any mysql-native users around? [14:20] confoocious has joined the channel [14:20] confoocious has joined the channel [14:20] [AD]Turbo: what is the best method (low amount of bytes transmitted) to communicate between client and server (socket.io) ? json? [14:22] rauchg_ has joined the channel [14:24] jetienne: function foo() { mysuperarray.forEach(function(item){return item;}); return "bar";} <- this will return the item ? or "bar"? [14:25] InsDel1 has joined the channel [14:26] jchris1 has joined the channel [14:27] SubStack: forEach returns undefined [14:28] bartt has joined the channel [14:28] jetienne: v8: (function foo() { [1,2].forEach(function(item){return item;}); return "bar";})(); [14:28] v8bot: jetienne: "bar" [14:28] SubStack: so bar, yes [14:28] jetienne: SubStack: ok thanks [14:28] SubStack: oh scoping question anyways tehe [14:28] jetienne: i was wondering if 'return' had some funky scoping like "var" [14:30] frankieshakes has joined the channel [14:31] slaskis: hmm can i inherit the properties of an object (as in {}) with prototype somehow? i'm sure i've seen it somewhere, possible here in this chat [14:32] saschagehlich has joined the channel [14:32] saml has joined the channel [14:33] bartt has joined the channel [14:33] luke`_ has joined the channel [14:36] rajeshsr has joined the channel [14:36] ben_alman has joined the channel [14:38] c4milo has joined the channel [14:39] c4milo has left the channel [14:40] InsDel has joined the channel [14:42] rauchg_ has joined the channel [14:42] peritus_ has joined the channel [14:42] peritus- has joined the channel [14:43] SubStack: slaskis: seems like Object.create() does what you want [14:44] SubStack: you can set the function prototype or there's util.inherits() too [14:44] slaskis: oh great [14:44] jmar777: SubStack++...... function Person() {}; Person.prototype = {...}; [14:44] bartt has joined the channel [14:46] SubStack: yeah lots of people hate on prototypes because they were bolted on to make javascript look more like java but I rather like them [14:47] jmar777: yea - i guess primarily because they expect it to look AND behave like Java [14:48] slaskis: and if i'd like only one instance to inherit from an object, how could i do that? [14:49] jmar777: Hmm... do we encourage the use of __proto__ around here? [14:49] SubStack: hehe, I do [14:49] unomi has joined the channel [14:49] jmar777: ha, good. slaskis: then use __proto__ :) [14:50] jmar777: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/proto [14:50] slaskis: haha [14:50] slaskis: jmar777: thanks, just what i was looking for [14:50] slaskis: tricky to search for that thing [14:50] slaskis: Non-standard [14:50] slaskis: Deprecated sounds promising [14:50] jmar777: when doing JS documentation search, always do "mdc " [14:51] slaskis: nice tip [14:51] jmar777: hmm... I knew it was proprietary (but implemented in V8). didn't realize it had been deprecated [14:52] jmar777: slaskis: if you want to avoid deprecated properties, which is reasonable, you might need to look at more of a mixins pattern then for single-instance inheritance [14:53] rauchg_ has left the channel [14:54] rauchg_ has joined the channel [14:54] rauchg_ has joined the channel [14:54] sriley: anyone know who is maintaining the couchdb npm module? seems like the api is slightly different from felixge version, eg createClient takes an object containing port and host instead of being passed as arguments [14:57] webr3: how do you timeout, cancel or abort an http.ClientRequest? [14:57] peritus_: sriley: see https://github.com/felixge/node-couchdb/issues/closed/#issue/24 [14:57] peritus_: webr3: https://developer.mozilla.org/en/window.setTimeout [14:58] webr3: peritus_? seriously? [14:58] peritus_: webr3: i think that's the (low-level) way [14:58] webr3: http.ClientResponse half way through processing, I want to cancel / terminate it, and you're saying i just call setTimeout [14:58] sriley: peritus_: ah cheers [14:59] peritus_: webr3: let the timeout handler handle the termination [14:59] tanepiper: sriley: the couchdb module in NPM != node-couchdb [14:59] tanepiper: and neither are being maintained [14:59] peritus_: webr3: there also is a _idleTimeout (or similar) property on request.connection iirc [14:59] webr3: .... okay, and it'll call what methods on ClientResponse to terminate it? [14:59] tanepiper: afaik cradle is the only one being maintained, and endtable is the new couchdb ORM that's out [14:59] losing has joined the channel [15:00] peritus_: webr3: .end() ? [15:00] sriley: ill take a look at them cheers [15:00] SubStack: yeah endtable looks really excellent [15:00] slaskis: jmar777: apparently Object.getPrototypeOf is the new __proto__ but that's read only i guess? [15:00] webr3: isn't .end on ClientRequest to finish sending the request..? not to cancel the response [15:00] strixv has joined the channel [15:00] SubStack: the kind of database abstraction I've been waiting for for years [15:00] peritus_: webr3: err, i meant response.end() [15:01] webr3: will check that out, cheers [15:01] SubStack: endtable approaches databases as a synchronization problem, which is really useful [15:01] tanepiper: webr3: is this you jumping the haxe ship? [15:01] dguttman has joined the channel [15:02] webr3: tanepiper, I've always been a js developer, but am paid to be a haxe developer too :) [15:02] SubStack: tanepiper: I'm planning on building an endtable dnode proxy too [15:02] tanepiper: SubStack: nom nom [15:05] rwaldron has joined the channel [15:05] jmar777: slaskis: ya - guess that's useful for testing the inheritance tree, but not so great for modifying it [15:06] springify has joined the channel [15:06] slaskis: well, __proto__ seems to do what i want [15:07] johngbrooks has joined the channel [15:09] springif` has joined the channel [15:09] webr3: peritus_: for future reference, ClientRequest.destroy() [15:09] webr3: lmfao, ClientResponse even [15:10] postwait has joined the channel [15:10] InsDel has joined the channel [15:10] liar has joined the channel [15:11] sixtus42 has joined the channel [15:11] Dreamer3 has joined the channel [15:12] joemccann has joined the channel [15:14] benburkert has joined the channel [15:14] matt_c has joined the channel [15:15] jetienne has joined the channel [15:16] ceej has joined the channel [15:16] Roelven has joined the channel [15:16] rauchg_ has joined the channel [15:18] guybrush: https://gist.github.com/713794 added output at the bottom - why does it say undefined_method ? [15:20] pagameba2 has joined the channel [15:20] losing has joined the channel [15:21] MattDiPasquale has joined the channel [15:21] wilmoore has joined the channel [15:21] Roelven has joined the channel [15:23] s0enke has joined the channel [15:23] mikew3c has joined the channel [15:23] case__ has joined the channel [15:24] masahiroh has joined the channel [15:24] confoocious has joined the channel [15:24] pdelgallego has joined the channel [15:24] joshskidmore has joined the channel [15:24] d0k has joined the channel [15:24] Booths has joined the channel [15:24] qFox has joined the channel [15:24] WRA has joined the channel [15:24] Nevtus has joined the channel [15:24] thebigbad has joined the channel [15:24] 50UAAA8Q3 has joined the channel [15:24] zk has joined the channel [15:24] pquerna has joined the channel [15:24] yatiohi has joined the channel [15:24] rleeds has joined the channel [15:24] Astro has joined the channel [15:24] zum has joined the channel [15:28] softdrink has joined the channel [15:33] jakob has joined the channel [15:37] bartt has joined the channel [15:38] ilpoldo has joined the channel [15:40] robotarm_ has joined the channel [15:41] ilpoldo has joined the channel [15:44] proppy has joined the channel [15:44] aliem has joined the channel [15:45] BrianTheCoder has joined the channel [15:45] cjm has joined the channel [15:47] bartt1 has joined the channel [15:50] proppy: has anyone used express with node.js 0.2.5 ? [15:50] sclaflin has joined the channel [15:51] proppy: I have the following error: http://paste.debian.net/100669/ [15:55] THDBASED has joined the channel [15:55] jetienne: proppy: a funny one if i can say ;) [15:55] proppy: reported the issue in express https://github.com/visionmedia/express/issues/#issue/472 [15:55] THDBASED: Hi, new here, would it be possible to use node.js to write a download/upload internet speed calculation app? [15:56] jetienne: proppy: my wild guess is that v8 now refuse to get a token as property name [15:56] proppy: s/.delete/["delete"] should do the trick then [15:56] mraleph: no it backwards [15:56] mraleph: we implemented this in recent v8 [15:56] jetienne: proppy: yep [15:56] proppy: I'm curious why express test suite didn't catch it earlier thought, [15:56] mraleph: but it was rejected in earlier versions [15:56] jetienne: mraleph: why it crash in 0.2.5 but not in early version then [15:57] mraleph: jetienne: dunno. what version of V8 0.2.5 uses? [15:58] elijah-mbp has joined the channel [15:58] THDBASED: Anybode? [15:58] jetienne: mraleph: good quiestion :) [15:58] proppy: mraleph: checking node.js debian package changelog [15:58] aubergine has joined the channel [15:58] jetienne: http://nodejs.org/changelog.html this one is missing [15:59] mraleph: on v8 2.5.8 code like o.delete = o.if + o.else is perfectly legal [15:59] jetienne: 2010-08-16: Version 2.3.8 [15:59] WRA has joined the channel [15:59] proppy: last v8 upgrade * Upgrade V8 to 2.3.8 [15:59] proppy: with 0.2.0 [15:59] mraleph: yep. that's too old [15:59] proppy: so it seems minor version doesn't upgrade v8 [15:59] jetienne: mraleph: if v8 Changelog is uptodate. 0.2.5 is using v8 2.3.8 [16:00] proppy: mraleph: a.foo = o.delete too ? (ie: read, not write) [16:00] jetienne: maybe expressjs is dev only on nodejs 0.3.x [16:00] mraleph: proppy: yes. [16:01] proppy: jetienne: oh that could be it :) [16:01] jetienne: V8 v2.5.3 is used in nodejs 0.3.1 [16:02] sriley: im using express on node 0.2.3, seems to work fine [16:03] proppy: sriley: npm version ? [16:04] mraleph: strange initial support for keywords as property names were added to 2.3.5, strange that it does not work in 2.3.8 [16:05] cheney has joined the channel [16:05] sriley: wheres it say? [16:05] proppy: Upgrade V8 to 2.5.8 [16:05] proppy: last commit on ry/node :) [16:05] proppy: sriley: npm list | grep express@ | grep installed [16:05] Aikar: express works fine on 0.3.1 [16:07] sriley: seems i didnt install express via npm [16:07] jchris1 has joined the channel [16:08] sriley: im on 1.0.0rc4 though [16:08] elijah-mbp has joined the channel [16:08] jamund has joined the channel [16:09] banjiewen has joined the channel [16:09] Aikar: well .7 works on .3.1 [16:11] codemanki has joined the channel [16:11] Aikar: ugh my wow account is active again damnit, i was letting it stay inactive soi can get coding done lol [16:11] codemanki: Hey! Can someone give me an example of basic auth using node js? i really need to protect root page (not the whole site) [16:12] Aikar: someone i referred paid so i got free time >< [16:12] jetienne: codemanki: use connect or expressjs, they will do it for you [16:12] codemanki: and if i do not use it? i wrote my small framework ) [16:13] codemanki: and i begin to regret about it) [16:13] jetienne: codemanki: you could look at their code. [16:13] codemanki: jetienne: hm..yes..i could... [16:13] caolanm: codemanki: it shouldn't be too tricky to implement [16:14] codemanki: caolanm: yes...but i really need it asap...and do not have time for implementin...maybe i could do it on apache side... [16:14] caolanm: yeah do that if you're short on time [16:14] caolanm: ;) [16:15] jetienne: http://stackoverflow.com/questions/3498005/user-authentication-libraries-for-node-js <- this can do it [16:15] mraleph: proppy: really strange. o.o.o.o.o.o.o.delete = 1 + o.o.o.o.o.o.delete; works like a charm in freshly build v8 2.3.8 shell... something is definetely wrong :-) [16:15] kenbolton has joined the channel [16:15] jetienne: codemanki: if you dont care to sent pw in clear :) [16:15] proppy: mraleph: thanks for testing :) [16:15] Imperion has joined the channel [16:16] jetienne: https://github.com/ciaranj/connect-auth/wiki/creating-a-form-based-strategy <- codemanki the connect version [16:16] proppy: mraleph: there must be something wrong with v8/debian version [16:16] codemanki: jetienne: i saw it. but now i am thinking about server side protection [16:16] codemanki: jetienne: nevertheless, tnx for help! [16:16] jetienne: codemanki: what do you mean "server side protection" ? both are, no ? [16:16] proppy: ii libv8-dev 2.2.24-5 Development files for the V8 JavaScript Engine [16:16] proppy: that might explain the error :) [16:17] codemanki: jetienne: i mean not in node.js app, but in apache config [16:17] jetienne: proppy: you should use my .deb to avoid those issues :) [16:17] Imperion: how can I write a Number to a Buffer as an 32-bit signed integer? [16:17] Imperion: s/an/a/ [16:18] jetienne: sudo add-apt-repository ppa:jerome-etienne/neoip && sudo apt-get update && sudo apt-get install nodejs [16:19] tj has joined the channel [16:19] proppy: jetienne: -bash: add-apt-repository: command not found [16:19] proppy: debian doesn't like it :) [16:20] mraleph: proppy: that's ancient :-) [16:20] rajeshsr has joined the channel [16:20] mraleph: but node has it's own v8 bundled... why would it use this one? [16:21] jetienne: mraleph: debian package policy. "do not duplicate code" aka all in shared lib [16:21] jetienne: ACTION loves static linking :) [16:22] Imperion: jetienne: ew [16:22] proppy: latest version of v8 in debian/experimental is 2.4.7-2 [16:22] jetienne: Imperion: i have seen your stuff. people did some lib to help binary to buffer coding [16:23] jetienne: the vnc in browser people know abou tit [16:23] mraleph: that makes sense. 2.5 is currently developed one, 2.4 is one used by chrome 8 i think... it is considered stable [16:25] boaz has joined the channel [16:25] jpld has joined the channel [16:25] proppy: I guess I should just forget about installing node from debian packages :) [16:25] rajeshsr has joined the channel [16:26] proppy: otherwise I will kept falling in compabitiblity trap between node.js and libv8 :) [16:26] ajsie has joined the channel [16:26] ajsie: is there a validation library for both the frontend and the backend? [16:26] jetienne: ajsie: caolanm is working on it :) [16:26] ajsie: which one? [16:27] SubStack: jetienne: who me? [16:27] SubStack: :p [16:27] unomi: validation of? [16:27] jetienne: SubStack: yep! i had to search for your announcement this morning to remember the name :) [16:27] Imperion: jetienne: I don't suppose you could point me in the right direction? [16:27] Imperion: I'm having a hard time finding anything on Google [16:27] jetienne: Imperion: SubStack will tell you. SubStack give him an url on how to push a 32signed in a buffer [16:28] jetienne: ACTION is playing hub :) [16:28] unomi: ajsie, what kinds of things do you want to be able to validate? [16:28] ajsie: unomi: validation of fields [16:28] SubStack: Imperion: node-put [16:28] SubStack: http://github.com/substack/node-put [16:28] ajsie: eg. i have a variable .. i want to validate its an email [16:28] unomi: ajsie, why not use json-schema? [16:29] ajsie: it could be a string [16:29] ajsie: not a json [16:29] proppy: jetienne: mraleph: thanks for helping me to figure it out [16:29] unomi: http://davidwalsh.name/json-validation [16:29] unomi: ajsie, json-schema is a data format schema [16:29] Imperion: SubStack: thank you [16:29] SubStack: Imperion: oh but it only does be and le, not signed-ness [16:29] Imperion: oh [16:29] SubStack: but patches welcome! [16:29] caolanm: ajsie: https://github.com/caolan/forms [16:29] unomi: you can set min / max as well as regexp [16:30] Imperion: well, then [16:30] caolanm: ajsie: that's currently server side [16:30] Imperion: SubStack: what signedness are things written in anyway? [16:30] caolanm: but the code might be useful [16:30] caolanm: it validates emails etc [16:30] Imperion: and can I retrieve the data after it's written? [16:30] ajsie: atm im using https://github.com/chriso/node-validator .. i want to use it for frontend too .. thats why im looking after some other libraries [16:30] unomi: ajsie, http://www.sitepen.com/blog/2008/10/31/json-schema/ [16:31] SubStack: Imperion: it's all unsigned I think the way it is so: [16:31] SubStack: > require('put')().word32be(-1).buffer() [16:31] SubStack: [16:31] ajsie: caolanm: will it be for frontend soon? [16:31] Imperion: silly me, I forgot how two's complement works [16:31] caolanm: ajsie: I plan to work on frontend and backend validation soon, but have some other things to get out of the way first [16:32] SubStack: yeah and there is another one besides 2's compliment so I didn't implement any signed-ness [16:32] SubStack: also since I didn't need it for what I was writing [16:32] Imperion: it only matters for retrieval [16:32] Imperion: so [16:32] bingomanatee has joined the channel [16:32] Imperion: how can I retrieve the data? [16:32] caolanm: I'm finding the write-once run in multiple environments stuff interesting atm [16:32] Imperion: (from file, that is) [16:32] caolanm: ;) [16:32] SubStack: you can use bufferlist/binary for that [16:32] bingomanatee: h there I have a real noob question. This is not purely nodejs more bash/linux but.... [16:32] jetienne: caolanm: +1^2 [16:32] Imperion: caolanm: cross-platform compatibility? [16:33] bingomanatee: When I fire off node