[00:01] ralphholzmann: ckknight mscdex my memory issue totally went away when I started setting my buffers = null [00:01] dguttman_ has joined the channel [00:01] ralphholzmann: thank you! [00:01] ckknight: ralphholzmann: nice. What was probably happening is that a closure was keeping a reference to it. [00:01] ckknight: thus the garbage collector was playing safe and not cleaning it [00:01] zakabird: that might help. I have the a sickening feeling that the 'correct' solution wont be simple. [00:02] zakabird: always wish js was lua (nice sandboxing, debugging hooks etc) [00:03] eee_c has joined the channel [00:04] jesusabdullah: Can a listener remove itself? [00:04] ralphholzmann: is there a way to output the current memory usage in node? [00:05] zakabird: process.memoryUsage() i believe [00:05] jesusabdullah: For a second I thought you were answering *my* question, and I was *really* confused XD [00:06] zakabird: :) [00:06] jesusabdullah: XD [00:06] ckknight: zakabird: I'm a lua guy, too. I don't mind JS so much :P [00:06] jesusabdullah: I haven't had a chance to try lua, but I kinda wanna give it a shot [00:07] jesusabdullah: problem is, none of the fields I want to work on use lua to any appreciable amount [00:07] deepthawtz has joined the channel [00:07] ckknight: lua's great in an embedded environment, and that's pretty much all it's used in. [00:07] jacobolus has joined the channel [00:07] zakabird: oh I love it. the many dark years before I knew how cool closures, anonymous functions were! all wasted. CURSE YOU C++ [00:08] zakabird: lol [00:08] jesusabdullah: haha XD [00:08] duncanbeevers: See the Lua in JavaScript via Emscripten? [00:08] jesusabdullah: Yeah, exactly ckknight. It looks cool, but I hardly do anything in an embedded environment like that! [00:09] ckknight: jesusabdullah: you can design some action bars in WoW [00:09] ckknight: <.< [00:09] ckknight: >.> [00:09] tbranyen: ckknight: it's used in awesomewm as well [00:09] zakabird: well games... [00:09] ckknight: <-- WoW addon developer [00:09] tbranyen: as its general scripting environment [00:09] tbranyen: which i think is pretty baller [00:09] tbranyen: although i've yet to write anything baller with it [00:09] ckknight: tbranyen: neat [00:09] tbranyen: ... :( [00:10] tbranyen: http://tabdeveloper.com/content/article/lua-code-complete-to-identify-tor-exit-nodes/ [00:10] tbranyen: my only published lua code [00:10] zakabird: I think luajit2 is still faster than v8 for what thats worth [00:10] tbranyen: doesn't even do much [00:10] tbranyen: zakabird: lua-llvm might be even faster [00:10] tbranyen: i dunno [00:10] zomgbie has joined the channel [00:10] jesusabdullah: ckknight: I don't play WoW XD [00:10] ckknight: I don't anymore. [00:10] jesusabdullah: If anything, I'd be working on AIs for Wesnoth [00:10] jesusabdullah: That and Minecraft are kinda my games [00:10] tbranyen: i played 6 months worth of WoW [00:10] tbranyen: straight [00:10] jesusabdullah: lol [00:10] tbranyen: got my fix [00:11] ckknight: jesusabdullah: minecraft is sweet. [00:11] jesusabdullah: Isn't it? XD [00:11] ckknight: WTB minecraft server built on node.js [00:11] ckknight: the Java server code is really, really bad [00:11] tbranyen: minecraft is passe [00:11] ckknight: lies. [00:11] zakabird: had to delete my pc games. not sure it helped my productivity much though. [00:11] ckknight: when you play minecraft with friends, it's super-fun [00:11] tbranyen: zakabird: ... switch to linux broi [00:12] ZJ has joined the channel [00:12] zakabird: oh I have. never going back. (except for the games) [00:12] sh1mmer has joined the channel [00:12] tbranyen: I kind of want to get otheros on my ps3 and run node on all 6 cores with cluster [00:12] tbranyen: as an experiment [00:12] steveklabnik: portal 2 later this week. [00:12] tbranyen: but i'm afraid i'll have to flee to south america if sony reads about my experiment [00:13] ckknight: steveklabnik: portal 2 in 6 hours [00:13] jesusabdullah: Minecraft is a great game, but poorly coded [00:13] jesusabdullah: Unfortunately! [00:13] steveklabnik: ckknight: oh yeah! i keep foregetting i read something wrong [00:13] ckknight: jesusabdullah: true [00:14] jesusabdullah: It won't run on my netbook [00:14] jesusabdullah: :C [00:14] jmhnilbog_ has joined the channel [00:14] jesusabdullah: THOUGH, I bet Wesnoth would! I should look into that [00:14] halfhalo: fail [00:15] halfhalo: portal 2 ftw [00:15] Jckf: 6 hours 'til launch [00:15] Aria: Mmm, wesnoth [00:15] eb4890 has joined the channel [00:16] halfhalo: I'm betting when kl finishes it launches [00:16] steveklabnik: i was kinda hoping that it wouldn't be on the mac, so i could ignore it. [00:18] Jckf: Doh. Accidentaly made my code big endian [00:18] Jckf: That's what I get for not paying attention [00:18] mscdex: shoot, i totally forgot about portal 2 [00:19] halfhalo: ... [00:19] mscdex: i preordered it :D [00:19] halfhalo: I saw it in action last e3, was awesome even then [00:19] Draggor: wait portal 2 is available at midnight tonight? [00:19] mscdex: it comes out sometime in april is all i remember hah [00:20] Draggor: I need to know if I'm not sleeping before work tomorrow >_> [00:20] steveklabnik: Draggor: 7am pst [00:20] Draggor: Oh, boo [00:20] halfhalo: google glados@home [00:20] Draggor: and I run a D&D game that night [00:20] Draggor: no portals for me until wednesday :( [00:20] halfhalo: I'm betting its tonight [00:21] halfhalo: official release is 9am tomorrow, but the potato took care of that [00:21] tbranyen: portal 2 is the first game to be pressed with the new npdrm key too [00:21] tjholowaychuk has joined the channel [00:21] tbranyen: so you can't even pirate it! damn you corporate america/japan [00:21] Draggor: npdrm? [00:21] tbranyen: although thats a game i don't mind paying for [00:22] mscdex: well, if it's anything like the original, it's well worth the money imho [00:22] tbranyen: ya i've paid for all the valve games i've played so far [00:22] mscdex: valve makes good games [00:22] tbranyen: Draggor: new playstation encryption key [00:22] mscdex: when does hl ep3 come out? [00:22] halfhalo: oh... well fuck that. pc all the way [00:22] tbranyen: mscdex: when its done heh [00:23] halfhalo: ep3 comes out after gabe eats all the potatos [00:23] Draggor: mcantelon: never [00:23] Draggor: mscdex: never [00:23] Draggor: mcantelon: sorry, typing + tab fail [00:24] johnnywengluu: tjholowaychuk: https://github.com/fat/stache/blob/master/lib/stache.js [00:24] johnnywengluu: it works i have heard =) [00:28] tylerstalder has joined the channel [00:29] mikeluby has joined the channel [00:30] captain_morgan has joined the channel [00:31] mscdex: i thought they had a date set for release .... [00:31] themiddleman_itv has joined the channel [00:32] jesusabdullah: Yessch, I just realized that node-irc doesn't have a disconnect method [00:32] jesusabdullah: Is there a good way to "force" stuff like that? [00:33] Aria: git clone, vi, git add, git commit? [00:33] systemfault: You disconnect by pulling out the plug :( [00:33] JojoBoss has joined the channel [00:33] Aria: Send a quit and let the server disconnect you? [00:33] systemfault: Or that :) [00:33] Jckf: jesusabdullah: I don't know the module, but can you send raw data on the socket? [00:33] cognominal has joined the channel [00:34] neorab has joined the channel [00:34] postwait has joined the channel [00:34] devdazed has joined the channel [00:36] dguttman has joined the channel [00:37] zakabird: ok. want debug of js in browser? run code on node debug (but then if it's supposed to be altering the page?) then [00:37] robmason has joined the channel [00:37] zakabird: http://code.google.com/p/v8/wiki/DebuggerProtocol [00:37] zakabird: arrrg. not super simple [00:38] daleharvey: does anyone know if http://www.berryreview.com/2011/04/15/hot-webkit-web-inspector-on-the-blackberry-playbook-for-web-developers is coming to any android phones / tablets any time soon [00:38] daleharvey: its the ability to connect the webkit inspector to your device and debug remotely [00:38] febits has joined the channel [00:38] daleharvey: lol, sorry totally the wrong room :) [00:39] bwinton has joined the channel [00:39] tbranyen: u better be sorries [00:39] Opaque has joined the channel [00:40] tekky has joined the channel [00:40] bwinton` has joined the channel [00:40] deedubs has joined the channel [00:41] mscdex: jesusabdullah: it does have a disconnect method... [00:41] jesusabdullah: Aria: The quit is what I had in mind, I think. How does that work? [00:41] jesusabdullah: It does? [00:41] jesusabdullah: Where? I checked the api and the client object [00:41] secoif: Ok, so I can't run a debugger over my expresso tests, what else are you guys using for TDD [00:41] secoif: ? [00:41] jesusabdullah: Maybe I'm just being dumb [00:41] secoif: that will support debugging [00:41] mscdex: jesusabdullah: https://github.com/martynsmith/node-irc/blob/master/lib/irc.js#L860 [00:42] jashkenas has joined the channel [00:42] Aria: jesusabdullah: I don't know the API, just IRC protocol [00:42] jesusabdullah: mscdex: Thanks. :S [00:42] jesusabdullah: Oh, I see what you mean Aria [00:42] jesusabdullah: /quit [00:42] jesusabdullah: derp [00:46] jesusabdullah: mscdex: It doesn't look like that change has made it to npm :C [00:46] mscdex: jesusabdullah: i always use github repos [00:46] mscdex: :S [00:46] jesusabdullah: Ah [00:46] jesusabdullah: npm over here :/ [00:46] jesusabdullah: I guess I'll just pull and, umm, yeah [00:47] jesusabdullah: I wonder, though, how I can get its npm updated [00:47] isaacs: jesusabdullah: http://blog.nodejs.org/2011/04/06/npm-1-0-link/ [00:47] mscdex: although, the version of node-irc i use is modified [00:47] isaacs: jesusabdullah: npm owner ls <-- then email that person [00:47] kmwallio has joined the channel [00:47] Corren has joined the channel [00:48] jesusabdullah: *nod* [00:48] dizzdiamonds has joined the channel [00:49] edude03 has joined the channel [00:53] mscdex: looks like he's incorporated some stuff from forks recently [00:53] c4milo1 has joined the channel [00:54] saikat has joined the channel [00:55] gtramont1na has joined the channel [00:55] abraxas has joined the channel [00:56] Twelve-60` has joined the channel [00:57] gtramont1na: Yo.. I've asked this before, but couldn't make it work. How do I run Vows from inside node. I mean, I'm writing a Jakefile and want to trigger Vows tests but without creating new child processes. [00:59] ChrisPartridge: SubStack: ping [01:00] mbrevoort has joined the channel [01:00] jesusabdullah: Just did both of those things! [01:01] jesusabdullah: Sweet! Martyn said that he's been taking lots of other peoples' pull requests and hasn't done any actual development on it himself in a while, and so forgot to publish a new version. [01:01] jesusabdullah: He will get around to it! [01:02] jesusabdullah: cloudhead: Can you run Vows tests from inside node? gtramont1na wants to know how! [01:03] atmos has joined the channel [01:04] jtsnow has joined the channel [01:04] gtramont1na: jesusabdullah: You said you did both of those things... Is this from another discussion or is it related to running Vows/Jakefile? [01:05] devrim has joined the channel [01:06] bwinton has joined the channel [01:06] c4milo1 has left the channel [01:07] c4milo1 has joined the channel [01:10] tonymilne has joined the channel [01:12] mikeluby has left the channel [01:12] SubStack: ChrisPartridge: pong! [01:13] eyesUnclouded has joined the channel [01:14] errorhandler has joined the channel [01:15] ChrisPartridge: SubStack: Can i poke your brain on some browserify related stuff? [01:15] dguttman_ has joined the channel [01:15] jesusabdullah: gtramont1na: What things did I say I did? o__o [01:16] jesusabdullah: gtramont1na: Oh, no, I meant npm linking node-irc and emailing Martyn Smith about updating the npm version of it [01:16] gtramont1na: Just did both of those things! [01:16] gtramont1na: :-P [01:16] gtramont1na: Cool... [01:16] pyrony has joined the channel [01:16] zachsmith has joined the channel [01:16] gtramont1na: Thanks for pinging cloudhead [01:16] SubStack: ChrisPartridge: or you could just ask [01:16] SubStack: asking to ask is pesky [01:16] ChrisPartridge: ACTION is pesky [01:19] mscdex: heh [01:21] jga023 has joined the channel [01:21] ChrisPartridge: I've created a command line app to generate JSON configs for some client side components, and was hoping to use browserify to make these all available on the client side. Would wrapping the stringifyied JSON in something like module.exports = JSON.parse(""); be the best approach in your opinion? (obviously along with a generated package.json) [01:22] jga023: anybody recommend a good logging library for node? [01:23] zentoooo has joined the channel [01:23] cloudhead_: gtramont1na: you can require() the test file and call the exported object with `run(options, callback)` [01:23] ckknight: ChrisPartridge: why not just stick it in the code directly? If you can assume that the JSON is valid, there'd be no harm [01:23] cloudhead_: gtramont1na: so like `requite('./test.js').run({},callback);` [01:24] cloudhead_: require* [01:25] JulioBarros has joined the channel [01:25] NuckingFuts has joined the channel [01:25] cloudhead_: gtramont1na: https://github.com/cloudhead/vows/blob/master/bin/vows#L338 [01:26] gtramont1na: cloudhead_: Cool! Thanks a lot! This was the way I was going to. Just need to iterate over all files under '/test' [01:26] cloudhead_: gtramont1na: yea, just remember it's async [01:27] gtramont1na: yep. [01:27] jtsnow has joined the channel [01:27] gtramont1na: cloudhead_: Thx! [01:28] cloudhead_: np [01:29] ChrisPartridge: ckknight: How would you handle writing the object to the file wrapped with module.exports? [01:29] gtramont1na: cloudhead_: Aikar pointed me his way of doing it (https://github.com/aikar/wormhole/blob/master/runTest.js) but this didn't work for me. [01:30] ckknight: module.exports = (/* huge JSON blob */); [01:30] jesusabdullah: I just made a potentially interesting thing: https://github.com/jesusabdullah/ircrpc [01:30] jesusabdullah: :) [01:30] jesusabdullah: ckknight: Why are you exporting a json blob >_< [01:30] ckknight: jesusabdullah: not me, it's ChrisPartridge [01:30] gtramont1na: cloudhead_: I couldn't figure why. Any idea? [01:31] pyrony has joined the channel [01:31] SubStack: ChrisPartridge: you can wrap it up however you like [01:31] gtramont1na: jesusabdullah: Dude. That's cool! I've seen this before in the Scala channel. [01:32] perezd_ has joined the channel [01:32] zakabird: jga023: im using https://github.com/dylang/logging - it's working fine for me. havn't tried any of the others though. [01:33] SubStack: ChrisPartridge: the big benefit of browserify is you can write it the node way and it works in the browser as-is ideally [01:33] jga023: zakabird: does that save to a file? [01:33] jga023: I want to log server events and be able to go back and view them [01:34] eb4890 has joined the channel [01:35] zakabird: jga023: havnt tried logging to file [01:35] jesusabdullah: gtramont1na: Really? [01:35] jesusabdullah: gtramont1na: Tell me more. I'm actually pretty interested! [01:36] sleeplessinc has joined the channel [01:37] aguynamedben has joined the channel [01:37] gtramont1na: jesusabdullah: I can't actually remember the bot name, but it works pretty simple. You can just mention its name and then the command you want to run; just like an interactive console. E.g.: nodebot: console.log('something'); [01:37] gtramont1na: jesusabdullah: And it would reply: something [01:39] JulioBarros has joined the channel [01:39] zakabird: jga023: https://github.com/andrewvc/node-streamlogger looks much more fully featured [01:40] gtramont1na: jesusabdullah: Just did it in #scala [01:40] tbranyen: tjholowaychuk: did you ever release your three.js cluster visualization thingy? [01:40] gtramont1na: jesusabdullah: 22:39 scalabot: println("Hello, world!") / 22:39 Hello, world! [01:40] tjholowaychuk: jga023: there is visionmedia/log.js as well [01:40] tjholowaychuk: tbranyen: not the 3d one nope [01:41] cloudhead_: graysky: probably cause it chdirs in test/ [01:41] jga023: tjholowaychuk: I just stumbled on that one, thanks [01:41] cloudhead_: oops [01:41] cloudhead_: gtramont1na: probably cause it chdirs in test/ [01:41] cloudhead_: gtramont1na: so to make it work you'd have to specify the files to run, like *-test.js [01:42] cloudhead_: gtramont1na: for vows to auto-discover the test files, it has to be in the project root [01:43] jesusabdullah: gtramont1na: Oh, you mean bots in general [01:43] jesusabdullah: gtramont1na: Yeah, they're handy [01:44] gtramont1na: cloudhead_: I see. But disregarding the chdir, just changing "file_system.readdirSync '.'" for "file_system.readdirSync '*.test.js'" would do the trick? [01:44] jesusabdullah: v8> console.log('hello gtramont1na!'); [01:44] v8bot: jesusabdullah: "hello gtramont1na!" [01:44] micheil: hm... no v1.. [01:44] jga023: are any of these better or worse than the others? no.de/nodester/nodejitsu? [01:45] gtramont1na: jesusabdullah: Isn't this the purpose of your app? (I didn't actually read it all) [01:45] gtramont1na: jesusabdullah: :-P Didn't know about the v8 bot. My bad... [01:45] cloudhead_: gtramont1na: oh right I see [01:46] cloudhead_: gtramont1na: hmm yea actually I'm not sure why that doesn't work [01:46] cloudhead_: gtramont1na: you should try running it without touch process.argv/process.chdir [01:46] cloudhead_: touching* [01:47] gtramont1na: cloudhead_: And I can't find a way to debug it. Will try your suggestion. BRB [01:47] A_Nub has joined the channel [01:48] gazumps has joined the channel [01:48] A_Nub has left the channel [01:48] abraxas: Does anyone know if there are any plans to improve node-inspector? [01:48] boccato has joined the channel [01:48] jesusabdullah: gtramont1na: Naw, it treats bots as though they are online APIs, so you can use them similarly to RPC servers or restful APIs and crap like that [01:50] ChrisPartridge: SubStack: Yeah, browserify is great - certainly can see the value if I can get this stuff working [01:50] gtramont1na: jesusabdullah: Oh got it! I'm sorry if I gave you misleading info. But your app is really promissing. We could add something like embedded consoles in our webapps to try out something... [01:51] hij1nx has joined the channel [01:51] jesusabdullah: Oh, alright! [01:52] jesusabdullah: Yeah, at this point it's just a toy, and idk if it has any actual value, but whatever! [01:52] tbranyen: mscdex: dude awesome node ncurses [01:52] tbranyen: i was just about to venture into writing that myself [01:52] mscdex: heh [01:52] Phyllio has joined the channel [01:53] tbranyen: mscdex: wonder how hard it would be to use node-irc and node-ncurses to get a basic irc client working [01:53] tylerstalder has joined the channel [01:53] mscdex: tbranyen: there's a basic irc client included in node-ncurses ;) [01:53] mscdex: and it uses node-irc too ;) [01:53] tbranyen: dooope [01:53] tbranyen: :D [01:54] mscdex: also some widget examples in there [01:54] rchavik has joined the channel [01:55] jesusabdullah: I still want to see a node-based web-irc [01:56] tbranyen: jesusabdullah: aren't there a million? [01:56] jesusabdullah: there are crappy chat rooms [01:56] BenNadel has joined the channel [01:56] jesusabdullah: and a few half-assed web-irc's [01:56] jesusabdullah: in node [01:56] jesusabdullah: but nothing actually nice [01:56] jesusabdullah: Nothing I'd actually want to use [01:56] tbranyen: sup BenNadel [01:56] vladikoff has joined the channel [01:56] tsesame has joined the channel [01:57] tbranyen: met you at the last boston jqcon you complimented my thinkpad :D [01:57] vladikoff: hey BenNadel! [01:57] BenNadel: tbranyen: ha ha ha, awesome :) [01:57] BenNadel: vladikoff: Hey Vlad :) [01:57] tbranyen: BenNadel: do you have a pastebin of that net code? [01:58] tbranyen: I'm just curious to see what you're doing [01:58] BenNadel: I am *stuck* - trying to connet to a Socket server (*not* creating a server) and cannot figure out how to listen for data coming back [01:58] andi5 has joined the channel [01:58] JacobSingh has joined the channel [01:58] BenNadel: Let me get a pastebin [01:58] springmeyer_ has joined the channel [01:58] vipaca has joined the channel [01:58] vipaca has joined the channel [01:58] mscdex: i don't think i'd ever actually want to use a web-based irc client but that's just me [01:59] mscdex: :P [01:59] jtsnow has joined the channel [01:59] tbranyen: mscdex: could probably make some neat node.js module builders/installers with ncurses [01:59] BenNadel: tbranyen: http://pastebin.com/VRFU4yaL [01:59] sivy has joined the channel [02:00] BenNadel: tbranyen: I'm just trying to connect to the socket, and then write the URL of any incoming request (for testing). [02:00] BenNadel: tbranyen: The socket server then echos back the url [02:00] CIA-72: node: 03Ryan Dahl 07master * rcbdd92e 10/ doc/index.html : Add community link on homepage - http://bit.ly/fSnjSU [02:00] CIA-72: node: 03Ryan Dahl 07master * rd3d35ec 10/ (4 files): add docs for console object - http://bit.ly/ghBwxD [02:00] CIA-72: node: 03Ryan Dahl 07master * r9e6498d 10/ (13 files in 5 dirs): [02:00] CIA-72: node: Merge branch 'v0.4' [02:00] CIA-72: node: Conflicts: [02:00] CIA-72: node: src/node_version.h - http://bit.ly/gNTugL [02:01] tbranyen: BenNadel: doesn't the connect event emit a socket you then bind to for data? [02:01] mscdex: nah, you use the same socket object [02:01] BenNadel: tbranyen: No idea - you might be right - let me check the docs [02:01] mscdex: s.on('data') is right [02:01] ralphholzmann: whoa BenNadel on IRC [02:01] ralphholzmann: wat [02:01] BenNadel: ralphholzmann: :D [02:01] tbranyen: mscdex: okay i'm thinking of socket.io then [02:02] BenNadel: ralphholzmann: I got stuck [02:02] johnnywengluu: should i do testing for websocket https://github.com/LearnBoost/Socket.IO-node [02:02] ralphholzmann: :) [02:02] johnnywengluu: maybe its already done =) [02:02] ralphholzmann: BenNadel: irc is cool even if you're not stuck ;) [02:02] crodas has joined the channel [02:02] mscdex: BenNadel: what's the problem you're having? that code looks fine to me [02:03] BenNadel: ralphholzmann: ha ha :) I've never really used it before. I like that that it beeps when I have activity - it makes me feel special :) [02:03] BenNadel: mscdex: let me take a quick video [02:03] seivan has joined the channel [02:03] slickplaid: quick video? snazzy :D [02:03] micheil: johnnywengluu: socket.io isn't just websockets. [02:03] slickplaid: usually we just get broken english and a pastebin or gist [02:04] tbranyen: heh [02:04] johnnywengluu: micheil: what more is it? [02:04] micheil: it's got it's own protocol on top [02:04] micheil: it adds in things that WebSockets does not have [02:04] slickplaid: like jazz hands [02:04] micheil: it also provides other fallbacks. [02:04] neorab has joined the channel [02:05] jetienne has joined the channel [02:05] peol has joined the channel [02:06] zum has joined the channel [02:06] timmywil_ has joined the channel [02:06] cyraxx has joined the channel [02:07] gtramont1na: cloudhead_: Couldn't make it work... Moving forward to the publish task. [02:07] BenNadel: mscdex: tbranyen: Quick video - been staring at this for **2** hours :( http://screencast.com/t/Mn2f5NYrIy [02:07] gtramont1na: Does anyone know any lib that makes file handling easy? I.e. copying/moving files around. [02:07] Emmanuel__ has joined the channel [02:08] gtramont1na: even better if we could use ant-like file filters... [02:09] johnnywengluu: micheil: yeah right [02:10] mscdex: BenNadel: have you tried adding a \n or \r\n to the end when your write to the socket? [02:10] BenNadel: mscdex: No - let me try that [02:10] tbranyen: heh thats what i was thinking when i saw that too [02:11] micheil: BenNadel: you may also need to be sending a keep-alive ping/pong and may also want to turn off the nagel algorithm [02:11] micheil: but definitely the issue is at the \r\n endings [02:11] mscdex: shouldn't need to disable the nagel algorithm [02:11] BenNadel: mscdex: Just tried adding Chr 13 + 10, didn't seem to make a difference [02:12] BenNadel: micheil: Hmmm, not sure what that means. As a test, can I try to write directly within the on(connect) event - that should be held open at that point, right? [02:13] micheil: BenNadel: as in write data every N seconds [02:13] BenNadel: micheil: Right - but I can't even get the first "write" to result in data :( [02:13] micheil: hmm.. [02:13] cwang has joined the channel [02:14] tbranyen: BenNadel: i got something working [02:14] tbranyen: that might be able to help you [02:14] BenNadel: tbranyen: lay it on me, my man :D [02:15] FM has joined the channel [02:15] tbranyen: http://pastie.org/1809936 << works for me [02:15] FM: hi [02:15] tbranyen: probably isn't the best idea to create a socket connection on every single request [02:15] FM: i had this problem [02:15] tbranyen: but you shouldn't have to do that [02:15] FM: can anyone guide me thru installing node [02:15] tbranyen: just break that out of createServer shiz since you already have a server running [02:15] skm has joined the channel [02:15] tbranyen: line 36 is what i'm referring to [02:16] mscdex: FM: ./configure && make && sudo make install [02:16] tbranyen: but if you run that code, you should see it sending the proper data to the server, although you'll want to concatenate data and then read it out with the end event [02:16] matthijs has joined the channel [02:16] tbranyen: also BenNadel don't forget that favicon.ico requests will come to the server too [02:17] bingomanatee has joined the channel [02:17] BenNadel: tbranyen: Let me try this - brb [02:17] tbranyen: BenNadel: http://sharefilewith.me/u/8ef21f.png is what i saw when i hit 8080 with a url [02:17] FM: yep.. successful installing node but when node -v, it show v0.3.1-pre, i think that's the reason i can't install npm... [02:17] briznad has joined the channel [02:17] devdazed has left the channel [02:17] mscdex: FM: upgrade to 0.4.6 [02:17] FM: how to upgrade... please assist [02:17] evilhackerdude has joined the channel [02:17] mscdex: FM: same process [02:18] FM: i'd already pull latest git and make install [02:18] mscdex: FM: are you installing from the taball or from a cloned git repo? [02:18] FM: still it show 0.3.1 [02:18] mscdex: FM: do `make distclean` first [02:18] FM: owh... i'll try that... thanks [02:20] zkirill has joined the channel [02:20] BenNadel: tbranyen: Ok, I see that that is working a bit better - however, the "Data" event in your code is on the "Sever" side - I am trying to get it on the "client" side (in my situation, Node.js is the client and ColdFusion is the server). [02:21] tbranyen: BenNadel: can you verify that your server is getting the data correctly tho? [02:21] BenNadel: tbranyen: It doesn't.... not exactly. After force-closing the Node.js instance a few times, I'll see a whole bunch of stuff get flushed to the Socket all at once [02:22] BenNadel: tbranyen: I';ll get something that looks like: /hey%20there%20kido/blam/test/test/test/test/test/test [02:22] johnnywengluu: so this is the file i should include in script tag? https://github.com/LearnBoost/Socket.IO/blob/master/socket.io.min.js [02:22] BenNadel: tbranyen: That's like 8 writes all concatenated [02:22] mscdex: BenNadel: try a manual s.flush() after your write [02:24] cognominal has joined the channel [02:24] unomi has joined the channel [02:25] BenNadel: tbranyen: Wooooot!!! I got it! I needed to add a "\n" to my write!!! [02:25] mscdex: heh [02:25] tbranyen: lol [02:25] mscdex: i told you :P [02:25] davidwalsh has joined the channel [02:25] johnnywengluu: why do i get: Uncaught SyntaxError: Unexpected token < [02:25] johnnywengluu: when i include https://github.com/LearnBoost/Socket.IO/blob/master/socket.io.min.js [02:25] BenNadel: mscdex: I had added it to the Socket reponse - need to add it to the Socket WRITE at well :D [02:26] mscdex: yeah that's what i meant originally [02:26] tbranyen: mscdex: is flush an undocumented method? [02:26] BenNadel: mscdex: Sorry - this is new to me :D [02:26] devrim has joined the channel [02:26] FM: mscdex: I'd already make distclean, git pull, ./configure and make install... but it still show -v 0.3.1 [02:26] mscdex: tbranyen: yes, you shouldn't need to ever call it manually though.... [02:26] micheil: tbranyen: flush is a very old method [02:26] tbranyen: ah okay and its used internally and only exposed for backwards compat? [02:27] mscdex: tbranyen: it's used in a few parts in the net module [02:27] johnnywengluu: ah now i get it [02:27] johnnywengluu: had to use https://github.com/LearnBoost/Socket.IO/raw/master/socket.io.min.js [02:27] johnnywengluu: is it smart to link directly from github? [02:27] matschaffer has joined the channel [02:27] tbranyen: johnnywengluu: uhhh socket.io serves that file for you iirc [02:27] johnnywengluu: what do you mean? [02:27] tbranyen: i mean if you read the docs you'll know what i mean [02:28] mscdex: tbranyen: like for making sure any queued data is sent upon 'connect' and to make sure queued data is sent out when .end()ing a connection [02:28] mscdex: etc [02:28] johnnywengluu: "The client-side files are served automatically by Socket.IO-node." [02:28] tbranyen: if you install socket.io it comes with the client side script automagically [02:28] BenNadel: mscdex: tbranyen Thanks a lot for your help!! [02:28] johnnywengluu: but i dont get it [02:28] BenNadel: mscdex: Thank you so much :D [02:28] mscdex: BenNadel: it's why we're here :) [02:28] johnnywengluu: tbranyen: you mean node version? [02:28] BenNadel: mscdex: who are you ? (for a blog post shout-out later)? [02:29] FM: mscdex: I'd already make distclean, git pull, ./configure and make install... but it still show -v 0.3.1.. please assist how to upgrade this version [02:29] johnnywengluu: npm install socket.io? [02:29] mscdex: BenNadel: https://github.com/mscdex [02:29] mscdex: :P [02:29] Corren has joined the channel [02:29] mscdex: FM: not sure, try building and installing from a tarball instead [02:29] k1ttty has joined the channel [02:29] johnnywengluu: tbranyen: you mean npm install socket.io ? that is the node version .. but i still dont get it. how can it serve the client version? [02:30] mscdex: FM: http://nodejs.org/dist/node-v0.4.6.tar.gz [02:30] BenNadel: mscdex: Awesome. ..... Later fellas. Thanks again! Been staring at this for 3 hours (no joke) [02:30] micheil: johnnywengluu: it doesn't. [02:30] tbranyen: micheil: it does [02:30] tbranyen: [02:30] tbranyen: it even says it does in the docs [02:30] micheil: tbranyen: actually, that's changed [02:30] micheil: it didn't. [02:30] FM: how to make complete uninstall node? [02:31] johnnywengluu: confused [02:31] tbranyen: micheil: o rly? that must be a very recent change. since i npm'd installed less than a month ago and that was still true [02:31] johnnywengluu: even if it was served from the node version .. how did it serve it? [02:31] bbttxu has joined the channel [02:32] micheil: tbranyen: they used to recommend using a version being served up by their servers [02:32] mscdex: FM: `make uninstall` [02:32] tekky has joined the channel [02:32] tbranyen: micheil: oh i see what you're saying [02:32] mscdex: FM: er: `sudo make uninstall` [02:32] micheil: johnnywengluu: by listening for http requests and checking if it was a request for /socket.io/socket.io.js [02:32] micheil: and then it serves a file using fs.createReadStream and such [02:33] johnnywengluu: but how can the client use the library if it hasn't got the file [02:34] johnnywengluu: it has to make an ajax request to get it first? [02:34] micheil: no. [02:34] FM: mscdex: do i need to remove manually /usr/local/bin/node? [02:34] mscdex: FM: you shouldn't have to uninstall, it should overwrite all the old stuff [02:35] FM: yeah, but i'd already tried that a few times... still no luck to update to 0.4... it still showing 0.3.1 pre [02:35] johnnywengluu: oh i get it now [02:35] johnnywengluu: i have this on the client [02:36] johnnywengluu: [02:36] johnnywengluu: but that is kinda the same as me linking from github directly [02:36] johnnywengluu: so should i use the github version? [02:36] micheil: no. [02:36] micheil: socket.io serves that file up for you. [02:36] johnnywengluu: socket.io-node! [02:36] johnnywengluu: you have to be specific =) [02:36] micheil: curl SERVER_HOST/socket.io/socket.io.js [02:37] johnnywengluu: yeah i know .. the socket.io-node is serving it [02:37] micheil: you should get back a javascript file. [02:37] johnnywengluu: yeah [02:37] johnnywengluu: but since you said this was removed [02:37] micheil: no, I didn't. [02:37] johnnywengluu: i guess i should use : [02:37] johnnywengluu: its the same i guess+ [02:38] micheil: I said it was a new thing. Originally they told you to get it from their servers, which was like [02:39] johnnywengluu: and the node version will serve the correct version [02:39] FM: mscdex: /usr/local/bin/node [02:39] johnnywengluu: thanks for clearing up [02:40] mscdex: FM: what if you run that directly?: /usr/local/bin/node -v [02:40] mscdex: ? [02:40] FM: mscdex: v0.3.1-pre [02:40] mscdex: huh... [02:40] gtramont1na: Does any1 knows if there is a publish lib out there? Copying/moving files around? [02:41] unknown_had has joined the channel [02:41] mscdex: FM: so you downloaded the 0.4.6 tarball, did ./configure && make && sudo make install ? [02:41] mscdex: and it still says that? [02:42] FM: i didnt make with tarball yet, that's from github [02:42] JusticeFries has joined the channel [02:42] mscdex: FM: i'd try the tarball [02:42] FM: ok [02:42] mscdex: http://nodejs.org/dist/node-v0.4.6.tar.gz [02:42] FM: did i need to remove /usr/local/bin/node first? or just go with tarball? [02:43] mscdex: i always use those release tarballs from nodejs.org and never have a problem upgrading [02:43] mscdex: FM: just download the tarball, unpack, ./configure && make && sudo make install [02:43] FM: ok.. thanks man... will update you later [02:43] mscdex: if that doesn't work, then something very funky is going on [02:43] mscdex: :) [02:47] davidascher has joined the channel [02:48] JulioBarros has joined the channel [02:48] ryan_a has joined the channel [02:49] ji0n has joined the channel [02:50] isaacs has joined the channel [02:51] jacter has joined the channel [02:55] hasenj has joined the channel [02:58] pyrony has joined the channel [03:02] devrim has joined the channel [03:03] hij1nx has joined the channel [03:06] seivan has joined the channel [03:06] ckknight has joined the channel [03:07] sechrist has joined the channel [03:11] deepthawtz has joined the channel [03:12] FM: mscdex: thanks man, it works.. now using npm -v 1.0.1 [03:12] FM: thanks a lot [03:13] sendark has joined the channel [03:13] harth has joined the channel [03:14] Tsesame has joined the channel [03:15] Tsesame has joined the channel [03:19] beawesomeinstead has joined the channel [03:19] beawesomeinstead has joined the channel [03:20] fangel has joined the channel [03:22] jjmalina has joined the channel [03:23] randallagordon has joined the channel [03:25] uclinux has joined the channel [03:26] captain_morgan has joined the channel [03:27] jtsnow has joined the channel [03:27] uclinux has joined the channel [03:28] cloudhead_ has joined the channel [03:30] Tsesame has joined the channel [03:32] iFire has joined the channel [03:34] aconran__ has joined the channel [03:34] jacobolus has joined the channel [03:37] shachaf has joined the channel [03:37] sys16384 has joined the channel [03:39] johnnywengluu: micheil: im running the frontend from another server on local port 4020 [03:39] johnnywengluu: and the node.js is running on 3000 .. so it cant find GET http://localhost:4020/socket.io/socket.io.js 404 (Not Found) [03:40] johnnywengluu: do you know how i should resolve this? [03:40] zkirill has joined the channel [03:42] stonecobra has joined the channel [03:43] mike5w3c has joined the channel [03:45] jacobolus has joined the channel [03:48] indutny has joined the channel [03:51] mscdex: FM: cool! [03:51] FM: thanks man... but now have other problem [03:51] FM: seem npm install express cannot go through [03:51] FM: when sudo npm install [03:51] jacter has joined the channel [03:52] sechrist has joined the channel [03:52] FM: express installed but when try to trigger express -v > permission denied [03:52] FM: i've already set unsafe-perm = true [03:52] mscdex: hmm, shouldn't need to use sudo with npm 1.x i don't think [03:53] mscdex: it should install in node_modules as a subdir iirc [03:53] mscdex: i don't use npm much except to update my modules on there, so i'm not of much help there [03:53] FM: but without sudo.. it can't access particular dir to create express [03:53] FM: owh ic.. thanks anyway... you're a great helper [03:54] tsesame has joined the channel [03:54] losing has joined the channel [03:55] ako has joined the channel [03:55] tekky has joined the channel [03:56] mdwright_laptop has joined the channel [03:56] mdwright_laptop: Is there a built in function for url encoding a string? [03:57] ckknight: encodeURIComponent [03:57] micheil: johnnywengluu: read the Socket.io site, it tells you about this. [03:58] micheil: --out. [03:58] mdwright_laptop: ckknight: thanks! [03:58] ckknight: ;-) [03:58] mdwright_laptop: is that a node.js thing? [03:59] ckknight: it's implemented in the browser as well [03:59] ckknight: I'm not sure if it's a standard thing or just implemented in both [04:00] mdwright_laptop: gotcha. thanks! looked through the node.js documentation. wish there was a single place to look these things up. ah well [04:01] tim_smart has joined the channel [04:01] secoif has joined the channel [04:02] uclinux: is there a way to use url variables with express? [04:02] davidascher has joined the channel [04:03] seivan has joined the channel [04:03] secoif has joined the channel [04:09] mscdex: mdwright_laptop: it's a v8 (javascript) thing, not node [04:10] mdwright_laptop: mscdex: gotcha! [04:10] mdwright_laptop: thanks! [04:11] secoif has joined the channel [04:11] johnnywengluu: could anyone get why node isn't receiving the message from the client : http://pastie.org/1810192 [04:12] captain_morgan has joined the channel [04:12] johnnywengluu: and another question: from the github page it says that the event for message is clientMessage(message, client) ... but in the example they are listening to "message" not "clientMessage". What is it? [04:14] michael has joined the channel [04:15] Yuffster has joined the channel [04:18] __sorin__ has joined the channel [04:19] warz has joined the channel [04:20] Astro has joined the channel [04:21] AntelopeSalad has joined the channel [04:24] sechrist has joined the channel [04:24] davidascher has joined the channel [04:25] jacter has joined the channel [04:26] johnnywengluu: anyone? [04:26] sechrist_ has joined the channel [04:30] johnnywengluu: anyone: http://pastie.org/1810192 [04:30] hermanjunge has joined the channel [04:31] hermanjunge: hi [04:31] hermanjunge: I'm looking for a library to connect to virtuoso database [04:32] dnolen has joined the channel [04:35] sivy has joined the channel [04:35] captain_morgan has joined the channel [04:36] warz has left the channel [04:36] bingomanatee has joined the channel [04:45] ovnicraft has joined the channel [04:51] Me1000 has joined the channel [04:52] jdalton has joined the channel [04:59] devrim has joined the channel [05:01] vpamulap has joined the channel [05:04] seivan has joined the channel [05:04] stagas_ has joined the channel [05:06] F1LT3R has joined the channel [05:11] mikl has joined the channel [05:15] amerine has joined the channel [05:15] mendel_ has joined the channel [05:16] orospakr has joined the channel [05:17] gazumps has joined the channel [05:20] devrim has joined the channel [05:21] cloudhead2 has joined the channel [05:22] mynyml has joined the channel [05:22] cloudhead_ has joined the channel [05:22] jjmalina has joined the channel [05:24] Spion__ has joined the channel [05:25] mdwright_laptop has left the channel [05:26] JacobSingh: Are there any MVC frameworks which do scaffolding and ActiveRecord stuff for you ala rails? [05:27] konobi: JacobSingh: node-howToRoyallyScrewYourselfLaterORM [05:28] JacobSingh: konobi: lol [05:28] JacobSingh: konobi: There's a lot of value though in keeping DRY. Doesn't need to be the whole-hog hibernate style ORM [05:28] tjgillies: what is the best domain to domain message passing protocol? [05:29] JacobSingh: 90% of apps out there take a JSON structure, build a few forms, add some validation and then build an ActiveRecord for it anyway [05:29] JacobSingh: What about something that just handles the form generation and validation piece? [05:29] ChrisPartridge: JacobSingh: I'm just tying together Mongoose (mongo orm), Express using express-resource - last couple days i've been working on some "scaffolding" cli's [05:29] konobi: sure, but scaffoling isn't exactly DRY [05:30] JacobSingh: ChrisPartridge: cool, what's your github? I'll follow it [05:30] JacobSingh: konobi: yah, I know there is a lot of grey there :) [05:30] ChrisPartridge: JacobSingh: not on github at the moment, internal, but hoping to have something working soon [05:31] JacobSingh: konobi: I'm just getting my feet wet and I love node and express so far, but seeing most examples it seems like there is donkey work here which a lot of frameworks don't do anymore. Hoping "there's a module for that", but I haven't found it yet :) [05:31] JacobSingh: Getty seems to be an attempt, but looks unmaintained [05:31] jacter has joined the channel [05:31] ChrisPartridge: Geddy? [05:31] JacobSingh: ChrisPartridge: yeah, sorry that's what I meant [05:31] isaacs has joined the channel [05:32] Lef has joined the channel [05:33] ChrisPartridge: JacobSingh: Yeah, I think the best idea is to stick with express [05:35] mraleph has joined the channel [05:35] losing has joined the channel [05:36] Lef1 has joined the channel [05:39] EasyLogic has joined the channel [05:39] EasyLogic: Hello [05:40] Corren: Goodbye [05:40] tk has joined the channel [05:40] jacter has joined the channel [05:41] Emmanuel__ has joined the channel [05:44] Emmanuel__ has joined the channel [05:45] xSmurf has joined the channel [05:46] mscdex: node.js rules! [05:48] Lef has joined the channel [05:49] devrim has joined the channel [05:50] mikl has joined the channel [05:50] blueadept has joined the channel [05:50] Lef has joined the channel [05:51] bartt has joined the channel [05:52] jacter has joined the channel [05:53] iFire has joined the channel [05:54] bojicas has joined the channel [05:54] indutny has joined the channel [05:55] mikl_ has joined the channel [05:58] Casperin has joined the channel [06:00] Lef has joined the channel [06:00] samcday_away has joined the channel [06:02] micheil has joined the channel [06:05] pyrotechnick has joined the channel [06:05] pyrotechnick: how does one ping in node.js? [06:05] mjr_: you mean generate raw packets filled with ICMP ECHO requests? [06:05] pyrotechnick: yes [06:06] antimatter has joined the channel [06:06] mjr_: you don't, at least not with the standard bindings. [06:06] mjr_: raw sockets are not exposed [06:06] mjr_: shell out to ping, or perhaps write a binding. [06:06] pyrotechnick: dammit [06:06] mjr_: I know, sucks [06:06] Fuu` has joined the channel [06:07] dguttman has joined the channel [06:07] mjr_: Every month or so, I think I want raw socket support enough that I'll write it. [06:07] mjr_: Then I start, and it's too hard. [06:07] pyrotechnick: hahaha you make me laugh [06:08] mscdex: too hard? [06:08] mjr_: mscdex: too hard for me. I'm sure you could handle it though. [06:08] mscdex: there's examples all over the net [06:08] mscdex: :S [06:09] mscdex: for icmp echo [06:09] mjr_: While you are at it, my fence needs to be whitewashed. [06:09] mscdex: ! [06:09] mscdex: <-- not tom sawyer [06:09] mjr_: reference noted, and credited to your account. [06:10] apoc has joined the channel [06:11] mscdex: http://www.linuxforums.org/forum/networking/60389-implementing-ping-c.html [06:11] mscdex: ^ [06:11] mscdex: :-D [06:11] mjr_: sure, it's fine, but then you have to do Linux, BSD, Solaris, and sort of Windows. [06:12] mjr_: And they are all different. [06:12] mscdex: i'd think all *nix would be the same [06:12] mscdex: for something like that [06:12] mscdex: all posix oses [06:13] JianMeng has left the channel [06:13] kjeldahl has joined the channel [06:13] mjr_: I'm probably wrong, please implement. [06:13] SamuraiJack has joined the channel [06:13] harth has joined the channel [06:14] mscdex: meh [06:14] mscdex: it's 2:15am [06:14] mjr_: Only 8:15 here. [06:14] jspiros has joined the channel [06:16] gozala has joined the channel [06:18] zkirill has joined the channel [06:20] hackband has joined the channel [06:22] angerman has joined the channel [06:22] micheil_mbp has joined the channel [06:25] tonymilne: Anyone used npm programatically before? I'm trying to supress it's output. [06:27] tonymilne: w00t! If you need to do the above ... you can run configure outfd to null, e.g. [06:27] tonymilne: npm.load({ outfd: null }, function(err) { [06:27] AAA_awright: tonymilne: npm sucks massively in using as a library [06:27] tonymilne: AAA_awright: no way man. [06:27] AAA_awright: Believe it! [06:28] AAA_awright: In any event I use Git [06:28] tonymilne: On app init() i am checking an array of dependencies (with versions), activating or installing them. [06:28] tonymilne: Means my code can be checked in and a library upgrade is a commit [06:28] tonymilne: team mates get the latest dependencies automagically. [06:29] ivanfi has joined the channel [06:29] matjas has joined the channel [06:29] tonymilne: And the final task was to suppress the default output (which i just did)... so in my eyes, it's good! [06:29] AAA_awright: tonymilne: I learned the hard way you don't want to be npm-specific [06:29] tonymilne: why's that? When i develop locally, i only really run one app at a time. [06:29] AAA_awright: Also, require()ing npm is going to set your process.title for you, which shows up on top, isn't that lovely [06:29] cha0s has joined the channel [06:30] tonymilne: process title to what? I am assuming i'd see this if i "ps aux" [06:30] AAA_awright: top [06:30] AAA_awright: ps aux too [06:31] tonymilne: And i'm not seeing it. I see node server.js [06:31] tonymilne: Hmm, I will investimagate more, and hopefully write a blog post. [06:31] AAA_awright: I wonder if I'm even loading the right file... [06:31] robmason has joined the channel [06:31] tonymilne: I'd be interested in getting your feedback / opinion when you see what i've done and how it works. [06:32] mikeal has joined the channel [06:32] Lef has joined the channel [06:33] jdalton has joined the channel [06:33] pyrotechnick: mjr_: i've done it! [06:33] pyrotechnick: aptly named [06:33] pyrotechnick: Pinger [06:33] mjr_: awesome [06:34] AAA_awright: tonymilne: My point is don't lock people into npm, like I said I maintain Git repositories by hand, that's where all the development happens [06:34] pyrotechnick: yeah man npm sucks [06:35] jesusabdullah: wat [06:35] tonymilne: Point noted. However, stable releases are also important for stable production standard software. [06:35] mjr_: When will people stop maintaining their git repositories with these automated tools? [06:35] jesusabdullah: I personally disagree with AAA_awright. I prefer npm. [06:35] jesusabdullah: Like, vastly. [06:35] jesusabdullah: But, to each his own. [06:36] pyrotechnick: JOKES [06:38] AAA_awright: jesusabdullah: Huh? There's nothing to disagree on, npm isn't for development [06:39] AAA_awright: jesusabdullah: I do development, Git is for that. [06:39] AAA_awright: Now I wouldn't use npm even without Git but that's another matter [06:41] mytrile has joined the channel [06:44] jacter has joined the channel [06:45] V1 has joined the channel [06:45] jonaslund has joined the channel [06:45] JacobSingh has joined the channel [06:45] bernied has joined the channel [06:46] sleeplessinc: WHAT is more gentle than a wind in summer? Silent entangler of a beauty’s tresses! What, but thee Sleep? Soft closer of our eyes! [06:47] zylo has joined the channel [06:47] zomgbie has joined the channel [06:48] AndyJ has joined the channel [06:49] ryankirkman has joined the channel [06:51] jdalton has joined the channel [06:53] siong1987 has joined the channel [06:54] muhqu has joined the channel [06:55] shaunau: mscdex your 215am is my 415pm [06:58] __tosh has joined the channel [07:00] jesusabdullah: AAA_awright: I use git + npm. npm link ./, yo [07:00] jdalton has joined the channel [07:05] llkazu has joined the channel [07:06] raphdg has joined the channel [07:07] Ond has joined the channel [07:08] _jdalton has joined the channel [07:08] ChrisPartridge: AAA_awright: I thought npm IS a "development" tool? [07:09] AAA_awright: jesusabdullah ChrisPartridge: Does it do that? [07:09] Ond: I'd call it a deployment tool [07:10] AAA_awright: But if you're going to deploy, just use submodules [07:10] jesusabdullah: but submodules suck [07:10] jesusabdullah: and npm link ./ is really slick [07:10] fangel has joined the channel [07:10] AAA_awright: (1) No they don't, and (2) Are you sure you're using npm? [07:10] Druide_ has joined the channel [07:10] tylerstalder has joined the channel [07:10] AAA_awright: I don't mean to sound like I'm bashing the thing but I really don't have anything nice to say about the paradigm [07:11] AAA_awright: That's not just npm that's most all package managers [07:11] liar has joined the channel [07:12] AAA_awright: But it doesn't help adopting the traditional package format doesn't work for Node.js which is application-used, library-focused, as opposed to system-used, application-focused [07:12] SamuraiJack has joined the channel [07:12] troessner has joined the channel [07:13] jesusabdullah: (1) submodules are so terrible even the git developers don't like them. (2) Yeah I use npm. It rocks! [07:14] jesusabdullah: npm is honestly the best package manager I've used so far [07:14] dsirijus has joined the channel [07:14] asabil has joined the channel [07:15] antimatter has joined the channel [07:15] Ond: Why doesn't it work for Node.js AAA_awright? Or, why not use a package manager for libraries [07:16] ryah: jesusabdullah: :) [07:16] jesusabdullah: The one thing I can see is different library versions for different projects, but npm has that baked in too [07:16] ryah: jesusabdullah: isaacs++ [07:16] jesusabdullah: ^__^ [07:17] AAA_awright: jesusabdullah: That's exactly the problem, it's system wide [07:17] ryah: are you using 1.0 ? [07:17] AAA_awright: Ond: ^ [07:17] ChrisPartridge: obviously not [07:17] jesusabdullah: Yeah, check out the versioning. It saw that problem coming [07:17] AAA_awright: Me? [07:17] stonebranch has joined the channel [07:17] mAritz has joined the channel [07:17] AAA_awright: And there's a single global namespace [07:18] AAA_awright: Here's my elevator speech on the issue, Look at what Git did to revision control, it completely revolutionized it [07:18] AAA_awright: It shifted away from the notion of tracking files, to tracking content [07:19] AAA_awright: Why haven't we had that revolution for packages and building [07:19] AAA_awright: http://69.72.216.27/guru/ is my take on what a package system ought to look like [07:19] AAA_awright: And so far Portage has come the closest, even with the namespaces [07:20] jesusabdullah: I think https://github.com/substack/sandman could end up being awesome for packages, assuming SubStizzy makes it work [07:21] jesusabdullah: like "modules" but less pesky [07:21] tfe_ has joined the channel [07:21] qFox has joined the channel [07:22] SubStack: assuming I ever finish it [07:22] jesusabdullah: Indeed! [07:22] jesusabdullah: Some might call it ambitious ;) [07:24] SubStack: it's just the "modules" idea [07:24] SubStack: worst name for a project ever [07:24] SubStack: except not in tcl [07:24] msucan has joined the channel [07:25] SubStack: and modifying symlink environments pointing to canonical versioned installs instead of appending dozens of directories to $PATH, $LD_LIBRARY_PATH, and $MANPATH [07:25] jesusabdullah: Right! [07:25] jesusabdullah: Must be pretty old if it's in tcl [07:25] jesusabdullah: I wonder if tcl is even on a stock install these days [07:25] jesusabdullah: ope, there it is! [07:26] SubStack: hahaha [07:26] jesusabdullah: I guess I should've known [07:26] SubStack: Erich Whitney, Mark Sprague, "Drag Your Design Environment Kicking and Screaming into the 90's With Modules!", Synopsys Users' Group, Boston 2001 [07:26] jesusabdullah: ahahahaha [07:27] thalll has joined the channel [07:27] jesusabdullah: What kinda music is associated with the mid-nineties? Like, retro is associated with the 80s right? Like, "I Ran" and stuff. What about the 90s? [07:28] jesusabdullah: Vanilla Ice? :( [07:28] llkazu: ice ice baby [07:28] jesusabdullah: >_< [07:28] ChrisPartridge: MJ? [07:28] jesusabdullah: ice ice babby [07:28] SubStack: enya? [07:28] jesusabdullah: MJ was 80s [07:28] Ond: Pavement for me [07:28] llkazu: so, my hosting service is ending up being language-agnostic. to a point. [07:28] SubStack: and sting [07:28] jesusabdullah: SubStack: ogawd >_< [07:28] llkazu: is that a bad thing? [07:28] jesusabdullah: What kinda hosting service is it? [07:29] jesusabdullah: Language-agnostic isn't bad imo, it just depends on what you're trying to do [07:29] SubStack: llkazu: obviously there is only one true language [07:29] indutny has joined the channel [07:29] SubStack: ACTION is a language atheist [07:29] jesusabdullah: In fact, language-agnostic could be a good thing. I'm always leery of the idea of having to use only one language for a project. [07:29] llkazu: I'm building something that essentially does what heroku does, just… better, cheaper, faster… and not ruby-specific? [07:29] llkazu: and not git-specific [07:29] jesusabdullah: Interesting! [07:29] jesusabdullah: Will it deploy as-expected no matter the language? [07:30] llkazu: well, i do have to build in SOME minor support for each language that i want to deploy. but its super simple. [07:30] jesusabdullah: I see [07:30] jesusabdullah: That'd be sweet, I think. :D [07:30] llkazu: I'm looking at supporting nodejs, ruby, and python as supported languages upfront [07:30] jesusabdullah: Support some more exotic ones >:P [07:30] ChrisPartridge: LOLCode [07:31] llkazu: I'm also considering go, erlang, and scala. [07:31] jesusabdullah: R, GNU Octave and Common Lisp! [07:31] llkazu: rofl [07:31] cognominal has joined the channel [07:31] jesusabdullah: (Only take that last one half-seriously) [07:31] llkazu: XD [07:31] jesusabdullah: (I think the CL people would love it actually, if they could easily deploy some hunchentoot projects like that) [07:31] jesusabdullah: but R and Octave? Well [07:31] jesusabdullah: You'd be hard-pressed to find any server running on those :P [07:32] llkazu: I'm trying to decide how i want to bill. heroku charges per "dyno" which essentially means you're paying for concurrency. [07:32] llkazu: app engine on the other hand charges for cpu usage. [07:33] jesusabdullah: hmm [07:33] indexzero has joined the channel [07:33] forzan has joined the channel [07:33] jesusabdullah: Which one's easier for you? Which one do people seem to prefer? [07:33] llkazu: I'm honestly not sure which one people prefer, but the app engine method seems easier. [07:33] llkazu: my clustering strategy is as follows: [07:34] llkazu: each app is assigned to a shard, each shard has a limited # of slots. as the shard utilization increases the amount of hardware assigned to the shard increases. [07:34] llkazu: each machine in the shard runs every app in that shard and serves requests for every app in that shard [07:34] indexzero: jesusabdullah: Good work. This is really cool https://github.com/jesusabdullah/ircrpc [07:35] gozala has joined the channel [07:35] [AD]Turbo has joined the channel [07:36] [AD]Turbo: hi there [07:37] McMAGIC--Copy has joined the channel [07:37] jesusabdullah: indexzero: Thanks! [07:37] jesusabdullah: Funny thing is, I thought most people would roll their eyes, but people seem to be thinking it's kinda cool :) [07:38] jesusabdullah: I kinda like the idea of a bunch of bots in one chat room pubsubbing each other [07:38] jesusabdullah: but I don't know what you would do with that :P [07:38] pastak_ has joined the channel [07:38] jesusabdullah: Also, not implemented. XD [07:38] ajnasz has joined the channel [07:38] mavin|gone has joined the channel [07:39] llkazu: lol [07:39] jesusabdullah: indexzero: If you liked it, upvote! http://news.ycombinator.com/item?id=2461453 [07:40] jimt_ has joined the channel [07:40] mikegerw1tz has joined the channel [07:40] indexzero: jesusabdullah It would be really cool if you could somehow extrapolate the bot commands into a REST API [07:40] mxrhd_ has joined the channel [07:41] stagas_ has joined the channel [07:41] jesusabdullah: indexzero: That *would* be cool. [07:41] jesusabdullah: I bet a lot of times you could. [07:41] indexzero: definitely, it's just a matter of a specification for the commands [07:41] jesusabdullah: Doesn't Marak have a webservice thing? [07:42] jesusabdullah: turns a module into a webservice? [07:42] indexzero: yeah, webservice.js [07:43] c4milo1 has joined the channel [07:43] JustCute has joined the channel [07:43] robhawkes has joined the channel [07:44] jesusabdullah: It'd be cool to mix that with an ircrpc to gamesurge's main bot [07:44] jesusabdullah: I forget its name [07:44] jesusabdullah: chanserv [07:44] llkazu: jesusabdullah, I'm timing how long it takes to go from shard creation to application deployment using a 7 line script :-p [07:44] jesusabdullah: that's right [07:44] llkazu: (did i mention I'm huge into automation?) [07:44] jesusabdullah: Unlike most networks, gamesurge has a very strong, ever-present chanserv [07:44] jesusabdullah: llkazu: Sweet :D automation rocks. [07:44] fangel_ has joined the channel [07:45] sth_ has joined the channel [07:45] llkazu: "nodescape.py SHARDNAME create" creates a new shard. lol [07:45] tomatogator has joined the channel [07:45] svenlito has joined the channel [07:45] jesusabdullah: nodescape.py? [07:46] micheil has joined the channel [07:46] llkazu: most of my hosting service's stuff is currently written in python, since i know it better. :-p [07:46] llkazu: (that and nodejs doesn't have a decent aws client lib) [07:46] jesusabdullah: I thought it had one [07:47] jesusabdullah: idk if it's decent, but I'm pretty sure there *is* one [07:47] jesusabdullah: but yeah, rock on :) [07:47] llkazu: there's several, and they all kinda suck :-/ [07:47] jesusabdullah: Bummer [07:48] jesusabdullah: Yeah, say what you will about python, but it has some pretty solid libs if you look in the right places [07:48] llkazu: boto = woot [07:48] hojberg has joined the channel [07:49] shaunau: does anyone know if mongolia's update even works.. [07:49] shaunau: driving me nutz [07:50] jesusabdullah: What's mongolia? [07:50] jesusabdullah: Sorry :( [07:51] tschundeee has joined the channel [07:51] shaunau: :) its a mongodb driver thing [07:51] Nexxy has joined the channel [07:51] jesusabdullah: Ah [07:51] shaunau: i used to like it, but its really pissing me off right now [07:51] jesusabdullah: Cute name [07:51] jesusabdullah: I see! [07:52] shaunau: might be time to call it a day before i heav this computer out the window [07:52] msucan has joined the channel [07:53] jdalton has joined the channel [07:53] shaunau: i must be missing somethign really obvious.. [07:55] teemow has joined the channel [07:57] adamholt has joined the channel [07:59] eschnou has joined the channel [08:00] dizzdiamonds has joined the channel [08:01] kjeldahl has joined the channel [08:02] shaunau: there comes a time when you override so much of the framework you need to say that's enough, fork and go your own way.. that time has come i think [08:02] TomY_ has joined the channel [08:02] Ond: I don't mean to delight in your misfortune shaunau but that was one of the funniest things I've read in quite a while [heaving computer out window] [08:02] coreb has joined the channel [08:02] jesusabdullah: Godspeed, sir (and/or madame) [08:03] shaunau: Ond: no probs at all. :) [08:03] Ond: Forking Mongolia? [08:03] shaunau: yeah i think so.. [08:03] Ond: Go for it [08:03] shaunau: i'm going against the grain now.. [08:03] shaunau: when i first looked at it it seemed less pushy.. [08:04] shaunau: Pau has done a fine job on it. and i thank him sincerly for the work he's done. [08:06] llkazu: shaunau, or go with a microframework [08:07] llkazu: or in the case of mongolia [08:07] llkazu: just use the native driver? [08:07] llkazu: (isn't mongolia a mongodb thing?) [08:08] jimt has joined the channel [08:09] k1ttty has joined the channel [08:09] eldios has joined the channel [08:11] jdalton has joined the channel [08:11] FireFly has joined the channel [08:12] tokumine has joined the channel [08:13] shaunau: llkazu: yeah it is [08:14] llkazu: just use the native driver then :-p [08:14] shaunau: i think i'm just coming at it from a diff angle than the author [08:15] emattias has joined the channel [08:15] shaunau: llkazu: hm well it provides some conveniece i like but other stuff is getting in the way.. i might just be looking at it wrong. [08:15] pdelgallego has joined the channel [08:15] shaunau: i will persist for a bit [08:15] pdelgallego_ has joined the channel [08:15] herbySk has joined the channel [08:16] L_star has joined the channel [08:16] DoNaLd`: all: exist some solution for this case ? http://imgur.com/iQqCH [08:16] gbot2: DoNaLd`: spidermonkey: Error: SyntaxError: missing ; before statement: exist some solution for this case ? http://imgur.com/iQqCH ......^ [08:17] kuya_ has joined the channel [08:17] Lorentz has joined the channel [08:21] Samot has joined the channel [08:21] jonathantaylor has joined the channel [08:22] jonathantaylor has joined the channel [08:22] jdalton has joined the channel [08:23] hwinkel has joined the channel [08:23] littke has joined the channel [08:23] Sami_ZzZ___ has joined the channel [08:23] samcday_away has joined the channel [08:23] llkazu: mwa ha ha [08:23] llkazu: jesusabdullah, 2m37.415s [08:24] llkazu: helloworld.alexandria.nodescape.org [08:25] ph^ has joined the channel [08:25] tschundeee has joined the channel [08:25] llkazu: thats going from no DNS records in place, no machines online, no load balancers up, to having a load-balancer, DNS, and a small hello-world app running. [08:26] jesusabdullah: Word [08:27] llkazu: takes 3 commands [08:27] llkazu: http://paste.pocoo.org/show/374322/ [08:28] markwubben has joined the channel [08:28] V1 has joined the channel [08:30] tschundeee has joined the channel [08:31] g4 has joined the channel [08:31] meso_ has joined the channel [08:32] dcelix has joined the channel [08:37] Throlkim has joined the channel [08:37] hellp has joined the channel [08:38] kieftrav has joined the channel [08:39] zomgbie_ has joined the channel [08:49] RusAlex has joined the channel [08:52] pomodoro has joined the channel [08:57] hojberg has joined the channel [08:58] bzinger has joined the channel [08:58] markwubben has joined the channel [08:59] bzinger has joined the channel [08:59] skm has joined the channel [08:59] jacter has joined the channel [09:00] click_click has joined the channel [09:07] skm has joined the channel [09:13] Fenda has joined the channel [09:13] rchavik has joined the channel [09:14] Fenda: where to find nodejs freelancers? :) [09:14] nmtmason has joined the channel [09:14] micheil: Fenda: jobs.nodejs.org [09:15] Fenda: micheil: for 1 off jobs, is there no irc channel for consultants? [09:15] micheil: not really. [09:15] jonathantaylor has joined the channel [09:16] zendfan has joined the channel [09:17] highermath_away has joined the channel [09:17] roidrage has joined the channel [09:19] sendark: is it possible to pass a callback to socket.io's disconnect? [09:19] V1: nop [09:20] seivan has joined the channel [09:20] V1: but you can hack around that by adding a 'disconnect' listener sendark [09:21] sendark: ok [09:22] Fenda: my node socket.io server is dropping when IE clients connect with htmlfile. is this likely a JSON issue? [09:22] sendark: because obviously this doesn't work [09:22] sendark: http://pastebin.com/3t3uKgap [09:22] Samot has joined the channel [09:23] SamuraiJack has joined the channel [09:23] V1: sendark: why doesn't that work :p [09:23] sendark: because javascript is synchronous! [09:23] sendark: i think [09:24] V1: I see no reason why it shouldn't work tbh [09:24] sendark: sometimes, if it is disconnected, it'll connect but the top bit (the if clause) will fire after [09:24] sendark: adding setTimeout works [09:25] V1: odd [09:25] boehm has joined the channel [09:26] sendark: really? i JS is synch by nature so you can't depend on things firing sequentially [09:26] sendark: thats why we gotta use callbacks and events right? [09:27] AAA_awright: What does the function call for [09:27] stagas: Fenda: also nodejobs.com [09:27] V1: JS is sync, so you can depend on thing beeing fired sequentially [09:28] xla has joined the channel [09:28] V1: but it can take a while before a transport is fully disconnected as existing connections need to be aborted, which can happen async [09:29] MrTopf has joined the channel [09:31] xla has joined the channel [09:37] McMAGIC--Copy has joined the channel [09:39] mc_greeny has joined the channel [09:39] muz1 has joined the channel [09:39] abraxas: Speaking of socket IO. Is there no way to gracefully stop socket IO? [09:40] abraxas: If not, that would mean there is no graceful way to close my application and know that there are no connected clients. [09:41] eventi has joined the channel [09:43] mike5w3c_ has joined the channel [09:45] bojicas has joined the channel [09:45] gaYak has joined the channel [09:47] qFox has joined the channel [09:51] mc_greeny has joined the channel [09:51] jonathantaylor1 has joined the channel [09:51] Fenda: http://nodejobs.com/chat-system-bug-fixes-at-joe-fender/5550 :) [09:55] zomgbie has joined the channel [09:56] jakehow has joined the channel [09:59] Shrink has joined the channel [09:59] Shrink has joined the channel [10:04] apoc has joined the channel [10:08] Jonasbn_ has joined the channel [10:10] apoc has joined the channel [10:11] qFxo has joined the channel [10:12] edude03 has joined the channel [10:15] littke has joined the channel [10:15] qFox has joined the channel [10:23] xla_ has joined the channel [10:27] seivan has joined the channel [10:29] omarooh has joined the channel [10:30] bergie has joined the channel [10:31] sppericat has joined the channel [10:33] deedubs has joined the channel [10:34] __tosh has joined the channel [10:34] herbySk has joined the channel [10:37] apoc has joined the channel [10:38] hwinkel has joined the channel [10:39] roidrage has joined the channel [10:39] xla has joined the channel [10:40] jarek has joined the channel [10:40] jarek has joined the channel [10:41] kjeldahl has joined the channel [10:41] jarek: Hi [10:41] jarek: is there a CommonJS standard that would describe how directories and files should be named? [10:42] jarek: I can see that some packages are using underscores (e.g. node_modules) and some hyphens to separate file/directory names [10:45] MattJ has joined the channel [10:45] SubStack: jarek: https://gist.github.com/927116 [10:45] saschagehlich has joined the channel [10:45] SubStack: dashes win [10:45] SubStack: 482 to 25 [10:45] sppericat has left the channel [10:45] muz1 has left the channel [10:45] jarek: SubStack: I see, so '-' is an unwritten standard [10:45] Gruni has joined the channel [10:46] eb4890 has joined the channel [10:46] SubStack: wherever standard starts and popularity contest begins [10:46] jarek: it's strange that node.js devs decided to use node_modules instead of node-modules [10:46] SubStack: wait [10:46] jarek: http://nodejs.org/docs/v0.4.1/api/modules.html#loading_from_node_modules_Folders [10:46] SubStack: wherever standard ends and popularity contest begins [10:47] jarek: SubStack: btw, are you the author of browserify module? [10:47] SubStack: they can't start at the same point in hypothetical continuum space! [10:47] SubStack: jarek: affirmative [10:47] jarek: SubStack: thanks for publishing it, Browserify is awesome [10:47] SubStack: I should work on the minifier part of it [10:48] SubStack: an asynchronous version of filter so you can use google closure compiler with it [10:48] jarek: SubStack: it's already very easy to use minifiers with it [10:48] SubStack: the code is actually amazingly fragile and messy [10:48] jarek: SubStack: yeah, I know :) [10:49] SubStack: on account of how hard it is to pull off that crazy stunt in the first place [10:49] jarek: SubStack: I have rewritten you module so that it takes around 100 lines of code :) [10:49] jarek: SubStack: as I don't need extra features such as JSON or ECMSScript 5 shims [10:49] SubStack: the shims aren't where the complexity is [10:49] jarek: SubStack: it looks like you have included entire JSON.js script inside it [10:50] SubStack: yes for browsers that don't have the JSON object [10:50] jarek: SubStack have you thought about adding support for full packages? [10:51] jarek: SubStack: I mean like in node.js/npm [10:51] SubStack: full packages? [10:51] jarek: SubStack: where you can split modules into separate directories and specify the main module in directory inside package.json file [10:51] jarek: SubStack: sorry, "package" was probably a wrong term [10:52] SubStack: you can already do that [10:52] jarek: SubStack: I mean full module support as in node.js [10:52] SubStack: with the browserify field [10:52] jarek: SubStack: yeah, but this means that I have to keep client and server side scripts in the same package [10:52] SubStack: https://github.com/substack/dnode/blob/master/package.json [10:53] SubStack: jarek: oh you can already do that [10:54] V1: abraxas: nope this is no way to "gracefully" stop the socket.io server, what you could do is create a start up a new server, redirect your users there, and than kill your server [10:54] jarek: SubStack: afaik you can't do "require('dnode') insdie client-side script [10:54] SubStack: yes you can [10:54] jarek: :) [10:54] mc_greeny has joined the channel [10:54] jarek: awesome, I will have to try it [10:54] fly-away has joined the channel [10:54] abraxas: V1: do you work on socket.io? If you do, could you tell me if there may be a way to gracefully close the server in the future? [10:55] zilch has joined the channel [10:55] SubStack: jarek: https://github.com/substack/dnode/tree/master/examples/web-browserify [10:56] SubStack: jarek: and you can use npm modules directly like here: https://github.com/substack/node-browserify/blob/master/examples/npm-seq/index.html [10:56] SubStack: that is what all those other lines are doing in browserify [10:56] SubStack: making shit like that work [10:56] jarek: SubStack: this example demonstrates server side code [10:56] zilch: Hi Nodders [10:57] SubStack: jarek: there is an html file with javascript in it [10:57] jarek: SubStack: you are doing "require('dnode')" in server-side code in order to use it in index.html [10:57] zilch: I just started a project to sitdown and explore node.js. It is at https://github.com/samyakbhuta/pool.js. Your expert feedback is needed [10:57] zilch: ! [10:58] jarek: SubStack: no, wait... [10:58] jarek: SubStack: I'm wrong... [10:58] jarek: I have just noticed require('dnode') in index.html [10:59] seemann has joined the channel [10:59] pyrotechnick1 has joined the channel [10:59] seemann has left the channel [10:59] V1: abraxas: yup, I work on Socket.IO together with rauchg, and we don't have `gracefully restarting` on our todo list atm. But feel free to create an issue in the github repository so we can consider it. :) [10:59] V1: as there might be more people who want this feature. [10:59] __tosh has joined the channel [11:01] g4 has joined the channel [11:02] eldar has joined the channel [11:03] kioopii has joined the channel [11:03] deedubs has joined the channel [11:03] g4 has left the channel [11:03] piscisaureus has joined the channel [11:04] V1: abraxas: as it might be something we could sneak in to the new architecture that is build for the 0.7 release. [11:04] abraxas has joined the channel [11:04] abraxas: That would be awesome. [11:05] littke has joined the channel [11:06] nephics has joined the channel [11:06] MrSmurf has joined the channel [11:07] Gelegrodan: V1: is 0.6.3 the stable one? [11:08] Gelegrodan: its what http://socket.io links too [11:11] V1: Gelegrodan: depends what version you referring to , both Socket.IO and Socket.IO-node have different versions. The latest stable release for Socket.IO-node is 0.6.17, this is the current NPM version. Which also ships with the latest client [11:11] V1: But Socket.IO v6 banner lists to 0.6.3.. idk why.. I'll give rauchg a poke when he wakes up [11:12] Gelegrodan: V1: i meant the banner yes [11:13] V1: Yeah that isn't really the latest version anymore, I would just advice to the release in NPM as these are always `stable` [11:13] Gelegrodan: I use npm so no prob for me, for others it might be tho [11:17] DoNaLd`: exist some solution for this case ? http://imgur.com/iQqCH [11:17] arian has joined the channel [11:20] mc_greeny has joined the channel [11:23] eee_c has joined the channel [11:24] Shrink has joined the channel [11:25] hwinkel has joined the channel [11:27] hebz0rl has joined the channel [11:27] sourcode has joined the channel [11:28] fairwinds has joined the channel [11:28] tbassetto has joined the channel [11:33] unknown_had: hey friends i find out something interesting hope this may interest you too. [11:33] unknown_had: http://www.virustotal.com/file-scan/report.html?id=0f07823f1eb32a51351739763a73a66e2b8c80ed6e3e787a1f68eec255b481f6-1303152501 [11:34] systemfault: Oh noes, an EXPLOIT! [11:34] saschagehlich_ has joined the channel [11:34] unknown_had: i believe this is this is a #fail [11:35] systemfault: Antiviruses often have false positives [11:36] mermeladas has joined the channel [11:36] unknown_had: true. [11:37] skm has joined the channel [11:37] pyrotechnick1: how the shit is source code meant to be a virus? [11:37] pyrotechnick1: are you trolling unknown_had? [11:38] unknown_had: nope. [11:38] unknown_had: just wanted to show you guys what i find out. [11:38] pyrotechnick1: well it says it's a "script" [11:38] pyrotechnick1: which is outrageously true [11:39] unknown_had: ACTION didn't got nay reason for trolling. [11:39] pyrotechnick1: all in all i would say it's done a pretty good job [11:39] pyrotechnick1: if you want to troll -> https://github.com/rails/rails/commit/9f09aeb8273177fc2d09ebdafcc76ee8eb56fe33 [11:39] pyrotechnick1: go nuts [11:40] tiagoa has joined the channel [11:40] tiemonster has joined the channel [11:46] eyesUnclouded has joined the channel [11:47] mAritz has joined the channel [11:54] graysky has left the channel [11:54] jacobolus has joined the channel [11:55] moondust has joined the channel [11:55] Emmanuel__ has joined the channel [11:57] matjas has joined the channel [11:57] hebz0rl has joined the channel [11:58] g4 has joined the channel [11:59] jacobolus has joined the channel [11:59] phiggins has left the channel [12:00] kjeldahl has joined the channel [12:00] zomgbie has joined the channel [12:00] unknown_had has joined the channel [12:00] matthijs has joined the channel [12:00] newy has joined the channel [12:00] tdmackey has joined the channel [12:00] monokrome has joined the channel [12:00] Adman65 has joined the channel [12:00] hoax__ has joined the channel [12:00] narf_ has joined the channel [12:00] whoops has joined the channel [12:00] bengl has joined the channel [12:00] drudge has joined the channel [12:00] ivan has joined the channel [12:00] Schuyler has joined the channel [12:00] carsonm has joined the channel [12:00] sugyan has joined the channel [12:00] framlin has joined the channel [12:00] kjeldahl has joined the channel [12:02] matschaffer has joined the channel [12:03] bbttxu has joined the channel [12:03] MrTopf has joined the channel [12:04] ph^ has joined the channel [12:06] jaket has joined the channel [12:07] zendfan has joined the channel [12:08] Rob- has joined the channel [12:10] jarek_ has joined the channel [12:10] muhqu_ has joined the channel [12:12] qFox has joined the channel [12:17] mytrile has joined the channel [12:18] jtrudeau has joined the channel [12:21] hwinkel has joined the channel [12:22] jscheel has joined the channel [12:22] jscheel has joined the channel [12:22] perlmonkey2 has joined the channel [12:22] pdelgallego has joined the channel [12:22] pdelgallego_ has joined the channel [12:22] matjas has joined the channel [12:23] matjas_ has joined the channel [12:23] pyrotechnick1 has left the channel [12:31] kal-EL_ has joined the channel [12:32] mermeladas_ has joined the channel [12:33] mytrile has joined the channel [12:35] mikegerwitz has joined the channel [12:35] kriszyp has joined the channel [12:35] xastey has joined the channel [12:36] shaunau_ has joined the channel [12:36] mikedeboer has joined the channel [12:37] fumanchu182 has joined the channel [12:37] sirkitree has joined the channel [12:39] roidrage_ has joined the channel [12:40] claudio has joined the channel [12:40] Lef has joined the channel [12:44] nook has joined the channel [12:45] jdalton has left the channel [12:46] jlecker has joined the channel [12:47] hwinkel has joined the channel [12:48] TheFuzzball has joined the channel [12:50] kioopii: hey, if i have npm'ed a package that requires another package and i want to patch/alter the second one. how would i go about getting the first one to use my version without changing the first? [12:50] mikedeboer: I'm developing on jsDAV ( https://github.com/mikedeboer/jsDAV ) and noticed that NodeJS 0.4.x doesn't support WebDAV HTTP requests from litmus (neon-library: http://www.webdav.org/neon/ ) anymore [12:50] mikedeboer: does anyone have a clue why NodeJS cannot read the body of those HTTP requests? [12:50] mikedeboer: or where I can look to investigate? [12:52] zilch has joined the channel [12:53] liquidproof has joined the channel [12:53] xandrews has joined the channel [12:54] broofa has joined the channel [12:55] kioopii: npm link saves the day [12:57] glimpsenirvana has joined the channel [12:58] dnolen has joined the channel [12:58] mAritz: does .bind() have any serious performance consequences? [12:59] fermion has joined the channel [12:59] littke has joined the channel [12:59] malkomalko has joined the channel [13:00] fyskij has joined the channel [13:00] V1: mikedeboer: node 0.2.x to 0.4.x had some big changes, but I would start digging at the http parser that Ry has developed. [13:04] Poetro has joined the channel [13:04] jayfresh has joined the channel [13:04] jayfresh has left the channel [13:05] hij1nx has joined the channel [13:09] seivan has joined the channel [13:09] eventi has joined the channel [13:09] wink_: mAritz: it shouldnt, its a pretty lightweight wrapper around your os's bind() [13:10] wink_: if you're speaking of the net bind()s that is [13:14] Gelegrodan: V1: will socket.io support "channels" in the future? [13:15] V1: Gelegrodan: yes, we plan to add that in 0.7 [13:15] Gelegrodan: oh nice [13:15] Gelegrodan: and some auth..thinhy? [13:15] Gelegrodan: thingy* [13:16] mAritz: wink_: nope, i meant Function.bind(), sorry. :D [13:16] wink_: yeah after i read it, i thought you might be ;> [13:16] V1: Gelegrodan: but you can do channels already.. on the client: socket.send({channel:'mychannel', message:'pewpew'}); on server client.on('message', function(data){ console.log(data.channel, data.message)}) :) [13:16] V1: Gelegrodan: what kind of auth? [13:16] V1: For using the Socket.IO connection? [13:17] jga023 has joined the channel [13:17] Gelegrodan: V1: well, yes [13:17] Gelegrodan: and for channels [13:18] lessthanzero has joined the channel [13:18] V1: We don't have anything planned for that, I don't think that should belong in the core of Socket.IO [13:19] Gelegrodan: V1: didnt see anything about channel in the readme [13:20] V1: Gelegrodan: That's because 0.7 isn't released yet [13:20] cbibler_ has joined the channel [13:20] Gelegrodan: V1: ah.. my bad.. you just said that. [13:20] V1: :D [13:22] saschagehlich has joined the channel [13:23] Gelegrodan: V1: is some "alfred" with you guys? found this: http://stackoverflow.com/questions/4753957/socket-io-authentication [13:24] http402 has joined the channel [13:24] Stan____ has joined the channel [13:24] jga023 has joined the channel [13:24] Stan____ has left the channel [13:25] brianloveswords has joined the channel [13:26] aelaguizy has joined the channel [13:26] bx2 has joined the channel [13:26] gattuso has joined the channel [13:28] thomblake has joined the channel [13:29] themiddleman has joined the channel [13:34] rfay has joined the channel [13:35] stonecobra_ has joined the channel [13:35] azeroth_ has joined the channel [13:35] V1: Gelegrodan: nope [13:35] Gelegrodan: V1: 0.7 code in some other git? [13:36] jetienne has joined the channel [13:36] V1: Gelegrodan: 0.7 isn't in the repo yet, and will be placed under "develop" untill all bugs are ironed out :p [13:37] Gelegrodan: OK :) haha no more highligting now ;) [13:37] Gelegrodan: gotta work [13:37] jetienne: V1: btw i got issues with long running socket.io server. after a long while the connection establishement is much longer... from 120ms usually to 500ms after a week [13:37] timmywil_ has joined the channel [13:37] jetienne: V1: have you seen other cases like that ? [13:38] jetienne: connection == websocket here [13:38] sunblush has joined the channel [13:39] V1: jetienne: I haven't personally experienced issues like that, but than again I don't monitor that either [13:39] colinclark has joined the channel [13:39] V1: What I would suggest it to post it on the Socket.IO forum, as there might be some others that might experience the same behavior [13:39] amacleod has joined the channel [13:39] jetienne: V1: ok just to know, it may be my code [13:40] jetienne: currently the workaround is to kill the process once per day :) [13:40] tsesame_ has joined the channel [13:41] jetienne: this._minimapRender && this._minimapRender.update({ <- the this._foobar at the begining [13:42] jetienne: would you consirder that dirty ? this is for a pool [13:42] V1: jetienne: Killing your app is rather "filty" do your other connections suffer from the same lagg? Or is it a Socket.IO only thing [13:43] jetienne: V1: oh ya this is not a good thing... but i dont have much time to investigate [13:43] fangel has joined the channel [13:43] jetienne: V1: so killing at 3am is the workaround [13:44] colinclark has joined the channel [13:45] mscdex: mAritz: .bind() is slower, yes [13:45] mAritz: mscdex: slower than ?? :) [13:46] mscdex: slower than using a closure or whatever else [13:46] mscdex: :p [13:46] mAritz: okay, thanks :) [13:47] mattmcmanus has joined the channel [13:47] jetienne: but it make hte source more readable [13:47] jetienne: and avoid all the this/self confusion. i like function.bind() :) [13:48] zomgbie_ has joined the channel [13:49] wink_: mscdex: whats a good way to get some test code to ya? [13:49] mscdex: i dunno, gist? [13:49] mscdex: heh [13:50] jetienne: q. what do you use for testing ? a framework ? directly your own stuff with console.assert() and co ? [13:50] hij1nx has joined the channel [13:51] mscdex: nothing :-D [13:51] mscdex: but that's because most of my modules aren't really testable, unless someone writes server counterparts for them [13:51] mscdex: :P [13:51] wink_: mscdex: i'll throw up a temp github repo, its a little too much for a gist, i had to write a binding to handle using recvmsg/sendmsg [13:51] mscdex: wink_: ok [13:52] trotter has joined the channel [13:52] wink_: i dont think its going to work outside of linux, but i cant find any clear documentation as to whether or not the bsds support the IP_PKTINFO sockopt [13:53] zomgbie has joined the channel [13:54] wink_: it doesnt seem like they do though, it seems they skirt the issue by hooking into bpf [13:55] dylang has joined the channel [13:55] nephics has joined the channel [13:55] davidvanleeuwen has joined the channel [13:56] shiawuen has joined the channel [13:56] tschundeee has joined the channel [13:57] fyskij has joined the channel [13:57] mscdex: where there's a will, there's a way ;-) [13:57] mscdex: i must now prepare with some coffee [13:57] eldios: http://www.ndpsoftware.com/git-cheatsheet.html [13:58] eee_c has joined the channel [13:59] davidwalsh has joined the channel [14:00] d0k has joined the channel [14:00] fljitovak has joined the channel [14:00] kuebk has joined the channel [14:00] kuebk: hi [14:01] kuebk: has anyone tried to share things across spawned child processes in node? [14:02] Know1edge1 has joined the channel [14:03] ph^ has joined the channel [14:04] bingomanatee has joined the channel [14:05] ngs has joined the channel [14:05] eresair has joined the channel [14:05] Me1000 has joined the channel [14:06] phiggins has joined the channel [14:06] losing has joined the channel [14:08] demastrie has joined the channel [14:08] mc_greeny has joined the channel [14:09] flippyhead has joined the channel [14:10] wink_: mscdex: https://github.com/w1nk/udpbroadcast clone that , node-waf configure build, then run test.js as root [14:11] wink_: or you can change the ports from 67 in test.js to something over 1024 and run as whomever [14:11] [1]kuebk has joined the channel [14:12] mc_greeny1 has joined the channel [14:12] ph^ has joined the channel [14:12] mischief__ has joined the channel [14:12] sunblush has joined the channel [14:13] mnbvasd has joined the channel [14:13] drudge- has joined the channel [14:13] unknown_had_ has joined the channel [14:14] Schuyler_ has joined the channel [14:14] narf__ has joined the channel [14:14] framlin_ has joined the channel [14:14] tdmackey_ has joined the channel [14:14] bengl_ has joined the channel [14:15] mbrevoort has joined the channel [14:15] matthijs_ has joined the channel [14:15] hoax___ has joined the channel [14:15] JulioBarros has joined the channel [14:16] fyskij has joined the channel [14:17] sivy_ has joined the channel [14:18] SSgtSpoon|work has joined the channel [14:18] Venom_X has joined the channel [14:19] whoops has joined the channel [14:19] aheckmann has joined the channel [14:19] http402 has joined the channel [14:19] bzinger has joined the channel [14:20] JojoBoss has joined the channel [14:22] ivan has joined the channel [14:23] timmywil_ has joined the channel [14:23] jasong_at_apache has joined the channel [14:24] akahn has joined the channel [14:24] akahn has left the channel [14:25] mscdex: kuebk: yes, have you looked at node-webworker ? [14:25] icebox has joined the channel [14:26] kioopii: struggling a bit with npm: i npm link'ed my fork of connect. which is properly loaded when i require it from the node-shell. but if i start a express-app with "node app.js" connect@1.3.0 is used. any pointers very welcome. [14:27] __sorin__ has joined the channel [14:28] eldios: :O http://hakim.se/experiments/html5/blob/03/ [14:28] ryanfitz has joined the channel [14:29] wink_: eldios: nice [14:29] wink_: the gravity seems unusually strong :p [14:31] wink_: are the physics handrolled or are you using a lib for them? [14:31] nefD has joined the channel [14:32] eldios: me? that's not a project of mine :) I would (or at least I should) be insanely rich and speaking from my millionair couch if so [14:33] fyskij has joined the channel [14:33] wink_: lol [14:33] tbranyen: i got a sweet book on physics for game devs [14:33] LukeGalea has joined the channel [14:33] tbranyen: thats very applicable to some neat canvas stuff i want to do at some point [14:34] LukeGalea: grrrrr... Javascript date functions suck!! [14:34] mscdex: strftime! [14:34] jetienne: date is crap in all language [14:34] LukeGalea: I'm in EST and (new Date()).getTimezoneOffset() is returning a postive number.. but we are UTC - 5:00 !! [14:34] wink_: dates always suck :p [14:34] LukeGalea: It seemed fine in OSX... [14:34] LukeGalea: I need to confirm that. [14:35] LukeGalea: but.. has anyone ever had timezone offset returned positive instead of negative? [14:35] a|i has joined the channel [14:35] a|i has joined the channel [14:35] mscdex: LukeGalea: well, the number returned by that function is the difference between GMT and local time in minutes [14:35] jonathantaylor has joined the channel [14:36] mscdex: so if you want hours.... -(new Date()).getTimezoneOffset()/60 [14:36] LukeGalea: mscdex: that's what I though. But it's the absolute difference.. so Toronto and Pakistan return the same value it seems. [14:37] LukeGalea: Anyone east of GMT around here who can test that for me? [14:37] LukeGalea: Rather than me changing my system around? [14:37] LukeGalea: It could just be returning the opposite of what it should be. [14:37] eldios: me [14:37] eldios: LukeGalea, link? [14:37] mscdex: getTimezoneOffset will return a positive number for behind UTC [14:37] unomi has joined the channel [14:37] mscdex: and negative if ahead [14:38] LukeGalea: eldios: aah. mscdex has confirmed it so no need. Thanks for the offer. [14:38] eldios: ;) [14:38] LukeGalea: mscdex: thanks. Jeez.. That's really counter intuitive eh? [14:38] LukeGalea: While it's true that time/date sucks in most languages there's about an order of magnitude difference in suckage between Ruby and JS I'd say. [14:38] eldios: well that's how actual timezones work [14:39] eldios: or am I missing anything here? [14:39] LukeGalea: eldios: Really? EST is defined in wikipedia as UTC minus 5 hours. [14:39] LukeGalea: so shouldn't the UTC offset be: -5hrs? [14:39] LukeGalea: not +5 hrs? [14:40] SSgtSpoon|work has joined the channel [14:40] BillyBreen has joined the channel [14:40] eldios: aaaaah [14:40] eldios: I read it again and now I get it [14:40] eldios: strange [14:40] mscdex: well, EST + 5 is UTC right? [14:40] mscdex: ;) [14:41] wink_: well its returning the offset relative to you -> gmt not gmt -> you [14:41] mscdex: yeah [14:41] LukeGalea: hmm.. I guess I can break my brain to work that way. [14:41] galaxywatcher has joined the channel [14:41] wink_: just invert it and move along :p [14:41] LukeGalea: hehe. Ya.. I still have so more pain to deal with re DST. [14:42] wink_: unending pain no less [14:42] Gelegrodan: all countries should have same time, just different definitions of what time is day/ night ;) [14:42] sendark: when using Socket.io inside an object, where is the best place to put the on events? [14:42] wink_: dst is a real pain in the ass :p [14:42] LukeGalea: it should be metric time. :) [14:42] hij1nx has joined the channel [14:42] LukeGalea: there will still be 12 months and X days in a month, but we can go base 10 from there. [14:43] LukeGalea: :) [14:43] sendark: i mean client-side [14:43] __tosh has joined the channel [14:44] dmcquay has joined the channel [14:44] aroop has joined the channel [14:44] jacobolus has joined the channel [14:44] aku has joined the channel [14:45] eyesUnclouded has joined the channel [14:45] vpamulap has joined the channel [14:49] Corren has joined the channel [14:50] fyskij has joined the channel [14:52] aku: bla bla [14:53] febits has joined the channel [14:53] brolin has joined the channel [14:53] aku has left the channel [14:54] aku has joined the channel [14:54] Lef has joined the channel [14:55] zakabird has joined the channel [14:55] aku has left the channel [14:55] bentruyman has joined the channel [14:55] ovnicraft has joined the channel [14:57] F1LT3R has joined the channel [15:00] a|i: what's the differentce between using EventEmitter and using callbacks in dnode? [15:00] a|i: they both do the same thing? [15:03] JusticeFries has joined the channel [15:05] stonebra_ has joined the channel [15:07] liar__ has joined the channel [15:09] dguttman has joined the channel [15:09] mscdex: wink_: did you see about IP_SENDSRCADDR on bsd? [15:09] fyskij has joined the channel [15:09] kioopii has left the channel [15:10] mscdex: i guess that would do the same thing, except you'd be specifying the ip instead of the iface index [15:10] wink_: mscdex: i did, the problem is there is no ip at play [15:10] mscdex: oh [15:10] kjeldahl has joined the channel [15:10] wink_: all the communication takes place over 0.0.0.0 with source as 255.255.255.255 [15:11] isaacs has joined the channel [15:11] wink_: i didnt dig through their dhcpd implementation, but they have to be isolating it to an interface somehow [15:12] wink_: there is a lazy way to do it, but its kinda broken and stands to randomly screw things up [15:12] mscdex: ok [15:12] wink_: specifically, if you know the subnet you're serving, you can just use the kernel to sort routing the broadcast packet by using the subnet's broadcast specifically [15:12] wink_: but you'll still recieve broadcasts across all interfaces [15:13] wink_: and answer them over a single subnet [15:13] wink_: you'd end up answering requests into the wrong subnet, which wouldnt necessarily break anything [15:13] wink_: just extra traffic, with an outside chance of a transaction id collision [15:13] wink_: which would cause weird shit to happen [15:15] steph021 has joined the channel [15:15] wink_: i found a couple of mailing list posts where they discussed using bpf to handle the interface isolation, but ive got no exposure to those apis [15:15] Levi has joined the channel [15:16] saschagehlich has joined the channel [15:17] davidlt has joined the channel [15:17] wink_: IP_RECVIF might exist in the bsds too [15:17] davidlt: wow, didn't expect that big community [15:17] jano has joined the channel [15:17] halfhalo: thats what she said [15:18] davidlt: Q: Is it possible to use .NET assemblies or WinAPI on Node? [15:18] galaxywatcher has joined the channel [15:18] mbrevoor_ has joined the channel [15:18] wink_: davidlt: by some definition of the word 'possible', probably ;> [15:19] postwait has joined the channel [15:19] jtsnow has joined the channel [15:20] davidlt: wink_: :) Are there any examples of doing it? [15:21] wink_: davidwalsh: i doubt it, node is still actively being ported to windows [15:21] wink_: erm [15:21] wink_: although i believe people have it running under cygwin [15:22] wink_: in which case you could write a binding to bind up whatever api you want [15:22] tbranyen: node works "fine" under windows heh [15:22] wink_: but it'd turn nasty with a quickness [15:22] tbranyen: its a pain in the butt to get native extensions to work if they have shared/static deps [15:23] mscdex: davidlt: what windows api are you trying to get at? [15:23] asdfsafdsa: is there a node module that makes form verification from both client/server side easy? [15:23] davidlt: mscdex: just explorer Node capabilities. [15:23] elarson has joined the channel [15:24] wink_: mscdex: with some serious ifdef hackery that binding may be able to work under the bsds, it looks like you'd have to use IP_RECVIF to figure out which interface the packet arrived on and then work some magic to make sure the broadcasted response went out over the same interface [15:24] mscdex: asdfsafdsa: you might look at https://github.com/caolan/forms for server side at least [15:24] mscdex: asdfsafdsa: for client side, you could probably use a jquery plugin [15:25] galaxywatcher_ has joined the channel [15:25] asdfsafdsa: mscdex: yes. but I would like to keep verification code all in one place. using 2 modules would mean duplicating code [15:26] wink_: oh balls, i just found it in isc's implementation, ughhhh :p [15:26] aelaguizy has joined the channel [15:27] EyePulp has joined the channel [15:28] wink_: who would've thought a dhcpd would turn into such a trainwreck :p [15:29] davidlt: How to take desktop screen shot from Node.JS, or control a mouse ? [15:30] eyesUnclouded_ has joined the channel [15:31] fyskij has joined the channel [15:31] necromancer has joined the channel [15:31] Swizec has joined the channel [15:31] ckknight has joined the channel [15:32] ckknight has joined the channel [15:33] stonecobra has joined the channel [15:33] gattuso has joined the channel [15:33] mscdex: asdfsafdsa: how about: https://github.com/akidee/schema.js [15:33] aroop has joined the channel [15:36] Spion_ has joined the channel [15:36] mscdex: wink_: yeah, i've never delved into bpf on bsd [15:37] mscdex: wink_: but ip_pktinfo is definitely missing on bsd [15:37] wink_: yeah, it looks like every platform has its own way of doing this [15:37] aroop has joined the channel [15:37] wink_: which is a real shame :< [15:37] matjas has joined the channel [15:38] wink_: im not sure i have the constitution to deal with bpf after sorting through the ip_pktinfo sludge :p [15:38] wink_: i'll let someone send a patch in ;> [15:38] norviller has joined the channel [15:39] mscdex: heh [15:40] Druide_ has joined the channel [15:40] wink_: can you try to get that test running on a linux box, just to confirm i've not hit a lucky patch on my dev machine? [15:40] wink_: once thats done, i can get back to the actual dhcpd part.. [15:41] samdk has joined the channel [15:41] samdk has left the channel [15:43] Know1edge1 has joined the channel [15:45] indutny has joined the channel [15:45] mscdex: wink_: seems to work on linux, although it says "sent: null" [15:46] mscdex: but it receives some bytes [15:46] mscdex: each time [15:46] wink_: perfect [15:46] wink_: the sent: line prints err then the number of bytes [15:46] pHcF has joined the channel [15:47] wink_: what interfaces do you have on that machine ? lo and eth0? [15:47] mscdex: yep [15:47] wink_: ok sweet [15:47] dcampano has joined the channel [15:47] wink_: now to just implement the backend api, it'll be done [15:48] wink_: im gonna make the backends pluggable, and start with 2, postgres and a simple memory version [15:48] mynyml has joined the channel [15:48] datapimp has joined the channel [15:48] zomgbie_ has joined the channel [15:49] fairwinds: hi. am getting ready to deploy a node project. Am doing a npm bundle but interested in what folks are doing to daemonize as a user [15:49] dcampano: I am getting this occasionally using an http request: Error: ETIMEOUT, Timeout while contacting DNS servers, is there a way to set a timeout on the http request if it takes to long to finish? [15:49] vipaca has joined the channel [15:49] vipaca has joined the channel [15:49] dcampano: fairwinds: what distro are you on? [15:49] wadey has joined the channel [15:49] fairwinds: dcampano: am on centos [15:50] datapimp has joined the channel [15:50] dcampano: fairwinds: i'm using an upstart script, but i don't think that will help on centos [15:51] fairwinds: dcampano: Am currently running monit on the system so that'll be an option [15:52] fairwinds: am running nginx as well so putting this on front end to proxy to node [15:53] seivan has joined the channel [15:53] TheFuzzball has joined the channel [15:53] zomgbie has joined the channel [15:53] fairwinds: was looking at node cluster but it seems a bit much for the site. Will likely look to use that for app deployment for my next thing [15:54] mattp_ has joined the channel [15:54] fairwinds: just putting up a dynamic express site as first thing [15:54] TheFuzzball has joined the channel [15:55] fairwinds: but have a serious app that is almost ready [15:55] mhausenblas has joined the channel [15:56] mscdex: dcampano: you could just do a setTimeout and store the timer on the http request object [15:56] ukev has joined the channel [15:57] Yuffster_work has joined the channel [15:58] mscdex: have the setTimeout callback check if req.socket.readyState === 'open' [15:58] deedubs: fairwinds: I quite like cluster and don't find it to be that much extra work [15:58] mscdex: or however [15:58] a|i: SubStack: how is it possible to have distinct chat rooms in dnode, so that event emitter only emits events to a specified room? [15:58] demastrie has joined the channel [15:58] dcampano: mscdex: thanks, i'll give that a try [15:59] deedubs: fairwinds: use this in my cap deploy for zero-downtime restarts https://gist.github.com/928588 [15:59] estrathmeyer has joined the channel [15:59] fairwinds: deedubs: cool will take a look. Was thinking daemonize in an init.d and let monit monitor [15:59] estrathmeyer has left the channel [16:00] indutny has joined the channel [16:01] deedubs: fairwinds: That's what I had before as well. I came for the multi-core stayed for the easy restarts. and cluster-live is pretty hot [16:02] indutny: ryah: around? [16:02] yhahn has joined the channel [16:02] fairwinds: deedubs: sounds good. How have you found your deployment in general. What sort of issues? [16:03] deedubs: fairwinds haven't really noticed any atm. deploying to an ec2 micro [16:03] mc_greeny has joined the channel [16:03] leedo has joined the channel [16:04] deedubs: fairwinds: using capistrano obviously [16:04] eventi: fairwinds: do cluster - the restarting of workers alone is worth it [16:05] Phyllio has joined the channel [16:05] losing has joined the channel [16:07] fairwinds: deedubs, eventi: k, well will work through cluster today to get it up. Have read through it a couple of times but probably better to put this in place to get some experience with cluster before my bigger app is ready. [16:07] tjholowaychuk has joined the channel [16:08] fairwinds: deedubs: have used buildout for many deployments in python [16:08] carsonm has joined the channel [16:08] fairwinds: deedubs: has a recipe paradigm for things [16:08] deepthawtz has joined the channel [16:09] ryanfitz has joined the channel [16:10] sreeix has joined the channel [16:10] captain_morgan has joined the channel [16:10] chrislorenz has joined the channel [16:12] indiefan2a has joined the channel [16:13] davidlt: Are there roadmap for native Windows support? [16:14] bojicas has joined the channel [16:14] pyrony has joined the channel [16:14] Aikar: library for simple post request? [16:14] [algo] has joined the channel [16:14] [algo]: How can I split a module into multiple files ? [16:15] amerine has joined the channel [16:15] [algo]: I've made a folder, put index.js in there [16:15] [algo]: what next? [16:15] baudehlo: davidlt: the plan is to get this working first: https://github.com/joyent/liboio [16:16] estrathmeyer has joined the channel [16:17] davidlt: baudehlo: how far is the progress? [16:18] tazz has joined the channel [16:18] dguttman has joined the channel [16:18] qbert_ has joined the channel [16:18] baudehlo: no idea. I don't do windows. [16:19] tazz: waite... so http://chat.nodejs.org/ dosnt connect back to here? [16:19] qbert_: is it possible to use dnode from another host ? I want to expose an API that we host on our site, and they can use it from there site [16:20] perezd has joined the channel [16:20] mikedeboer_ has joined the channel [16:21] springmeyer has joined the channel [16:21] springmeyer has left the channel [16:22] deedubs: tazz: no [16:22] tazz: deedubs, thanks. [16:22] tylerstalder has joined the channel [16:23] k1ttty has joined the channel [16:23] tylerstalder has joined the channel [16:23] moneal has joined the channel [16:24] Kingdutch has joined the channel [16:26] steffkes has joined the channel [16:26] davidlt: Q: Can I use JAVA classes from Node.JS? Like hosting JVM runtime? [16:27] matjas has joined the channel [16:28] drudge-: wow cloud9 is so freaking buggy, i don't even know how they could charge for it [16:28] baudehlo: davidlt: no. [16:28] hij1nx has joined the channel [16:28] stephank has joined the channel [16:28] [algo]: can a module use any variable outside of it ? [16:28] tjholowaychuk: drudge-: told you they dont test their code [16:28] tjholowaychuk: haha [16:28] lukegalea has joined the channel [16:29] tjholowaychuk: their canvas test suite, was one file with one example [16:29] qbert_: drudge-, really ? we were thinking about using them [16:29] tjholowaychuk: smart guys with very sloppy untested code [16:29] dyer has joined the channel [16:30] drudge-: qbert_: you can try them for free for 30 days [16:30] broofa has joined the channel [16:30] drudge-: it's a really neat idea, the UI seems okay but it's too buggy to even use [16:30] baudehlo: [algo]: no. [16:30] norville_ has joined the channel [16:30] sh1mmer has joined the channel [16:31] drudge-: tjholowaychuk: yeah, i just couldn't imagine charging $50/mo for something that breaks and spits raw node.js stacktraces at me [16:31] tjholowaychuk: $50/month?? [16:31] wink_: mmm delicious stacktraces [16:31] tjholowaychuk: I thought it was free [16:31] tbranyen: free as in $50 a month free [16:31] tbranyen: no charge to pay them [16:31] ukev has joined the channel [16:31] tjholowaychuk: yikes [16:32] drudge-: tjholowaychuk: they went with some paid model now - cloud9ide.com [16:32] tjholowaychuk: that's extremely lame [16:32] drudge-: i'd understand if it worked well, but i haven't even been able to clone a private repo successfully yet [16:33] drudge-: the organization context stuff they have similar to github is horrible buggy, doesn't work [16:33] tjholowaychuk: barely though, chat == irc, github == ... github, debugger == nodes debugger, editor == lame [16:33] tjholowaychuk: it can all be replaced [16:33] tjholowaychuk: with better tools [16:33] tjholowaychuk: that dont segfault [16:33] qbert_: I'm trying to test wether I can connect to a dnode instance running on server x.com from y.com, if I use my hosts file to create dummy instances, will it see that they resolve to the same host ? Or it will spit an error at me [16:33] tjholowaychuk: haha [16:34] sunblush has joined the channel [16:34] tbranyen: tjholowaychuk: i never saw a response to my question about the three.js visualization thing [16:34] tbranyen: did you end up releasing it? [16:34] swaj: hmm, $50/month is a lot for an IDE... [16:35] tjholowaychuk: tbranyen: oh weird I did reply, no I didnt [16:35] stagas_ has joined the channel [16:35] tbranyen: oh okay [16:35] LukeGalea_ has joined the channel [16:35] tbranyen: lastlog fail [16:35] jtsnow has joined the channel [16:35] wink_: $50/month is insane for a stripped down ide [16:35] mike5w3c has joined the channel [16:36] swaj: is the IDE still open source? [16:36] robmason has joined the channel [16:38] [algo]: what is '.' inside module ? [16:38] [algo]: is it module dir? [16:38] norviller has joined the channel [16:38] eee_c has joined the channel [16:39] swaj: looks like their IDE is gpl'ed, so you could just run your own copy on a VPS or something. [16:39] drudge-: tjholowaychuk: it's great, i have a private "commercial" report that only i have access to, it lets me edit the files but it says guest@cloud9 and doesn't see it's actually me [16:39] Me1000 has joined the channel [16:40] qbert_: [algo], yes, current directory [16:40] drudge-: swaj: i'm curious how up to date it is, npm says 0.3.0 - their site says 1.2.4 [16:40] swaj: the commits on that repo are fairly recent, but yeah who knojws [16:42] javaanse_jongens has joined the channel [16:42] zomgbie has joined the channel [16:42] colinclark has joined the channel [16:42] perezd_ has joined the channel [16:44] malkomalko has joined the channel [16:45] Phyllio has joined the channel [16:49] _algo_ has joined the channel [16:51] F1LT3R has joined the channel [16:52] dahankzter has joined the channel [16:52] jakehow has joined the channel [16:53] ckknight: I'm so glad that node.js isn't saddled with a legacy, a la ASP.NET 4 having to keep all the old ASP.NET 1 methods around which no longer make sense. [16:53] stephank has joined the channel [16:55] zylo has joined the channel [16:55] duncanbeevers has joined the channel [16:56] broofa has joined the channel [16:57] prettyrobots: Microsoft is all about the legacy. [16:58] gozala has joined the channel [16:59] maushu has joined the channel [17:00] puffpio has joined the channel [17:00] mbrevoort has joined the channel [17:01] dmcquay_ has joined the channel [17:02] Hyper-Core has joined the channel [17:02] EM03 has left the channel [17:03] aheckmann has joined the channel [17:04] pdelgallego has joined the channel [17:04] aguynamedben has joined the channel [17:04] __sorin__ has joined the channel [17:05] javaanse_jongens has joined the channel [17:06] mjr_ has joined the channel [17:06] ckknight: prettyrobots: I mean, I can see the argument to support legacy, but it's so nice when you don't have to [17:07] dmcquay has joined the channel [17:08] indexzero has joined the channel [17:10] harth has joined the channel [17:11] dguttman has joined the channel [17:11] ovnicraft has joined the channel [17:12] softdrink has joined the channel [17:12] xandrews has joined the channel [17:13] http402 has joined the channel [17:14] febits has joined the channel [17:14] taf2 has joined the channel [17:14] taf2: hi i'm having a compile issue that I believe is related to #include < vs #include " -> https://gist.github.com/927883 and https://github.com/joyent/node/issues/952#issuecomment-1027973 [17:16] taf2: on my system platform.h is in my INCLUDE_PATH [17:16] taf2: in my platform.h a comment: See tidy.h for the copyright notice. [17:17] saikat has joined the channel [17:18] Aikar: tjholowaychuk / others - the cloud9 pay service is if they host it for you. you can check out the code and run it yourself np. [17:18] reid has joined the channel [17:18] tjholowaychuk: Aikar: meh [17:18] Typh has joined the channel [17:19] moneal: Aikar: Do you know if vim keybindings are coming soon to the pay version? [17:19] Aikar: i dunno, i dont follow it really [17:20] moneal: bummer. I have not been able to find a answer [17:21] pdelgallego_ has joined the channel [17:21] AntelopeSalad: i'm running the local version of cloud9, it's pretty decent [17:22] moneal: I have been using the hosted version and it worked great for me on a cr48. [17:22] moneal: I just vim keybindings [17:22] taf2: so, this patch: https://gist.github.com/928901 fixes header include issues when platform.h is in the system include path, but now i have linker errors against libev: https://gist.github.com/928902 with libev 3.9 [17:22] trotter_ has joined the channel [17:23] tbranyen: vim bindings in cloud9? [17:23] moneal: yeah I heard it was coming just don't know when [17:23] tbranyen: thats slick [17:23] AntelopeSalad: moneal: the hosted version is running off the same source as the open source version for the ide itself right? [17:23] pyrony has joined the channel [17:23] tbranyen: hope its not half assed like the visual studio bindings [17:24] moneal: AntelopeSalad: I'm not sure. I bet they have some tweeks on the hosted version [17:25] moneal: RE: vim keybindings http://groups.google.com/group/cloud9-ide/msg/5b7d1595f0aaf8ad?pli=1 [17:25] captain_morgan has joined the channel [17:27] Aikar: anyone know how to route http requests using http.request with a proxy? [17:27] broofa_ has joined the channel [17:28] bsstoner has joined the channel [17:29] mikeal has joined the channel [17:29] mikeal1 has joined the channel [17:29] skm has joined the channel [17:31] tyfighter has joined the channel [17:32] brolin has joined the channel [17:33] TooTallNate has joined the channel [17:36] defstream has joined the channel [17:36] pedrobelo has joined the channel [17:37] mbrevoort has joined the channel [17:37] kmwallio has joined the channel [17:38] arpegius has joined the channel [17:40] tilgovi has joined the channel [17:41] arpegius has joined the channel [17:43] tmpvar has joined the channel [17:43] isaacs has joined the channel [17:44] Aikar: SubStack: Prox package.json is busted :( [17:44] SamuraiJack_ has joined the channel [17:45] V1 has joined the channel [17:46] V1: Pling! [17:46] maodun has joined the channel [17:46] defstream: pong [17:46] Aikar: oh hey SamuraiJack_ any chance of getting a config option for Joose that says "dont check if the class exists already, just create it" :3? Im using an Autoloader with ES5 Harmony Proxies, and Joose complains that the object exists already due to the proxy code. [17:47] Billbad has joined the channel [17:47] sh1mmer has joined the channel [17:47] V1: bleh, brb Mail and Google Chromium won't start up :9 [17:47] stephank has joined the channel [17:48] mscdex has joined the channel [17:48] pquerna: anyone have a consistent hashing lib just sitting around, that doesn't pull in a c++ dep? [17:49] SamuraiJack_: Aikar: hey, show the code? [17:49] Aikar: SamuraiJack_: um, hold on ill have to ssh home and commit it [17:49] SamuraiJack_: k [17:50] jjmalina has joined the channel [17:50] V1 has joined the channel [17:51] Aikar: SamuraiJack_: https://github.com/aikar/cosmos/blob/master/node_modules/autoloader/autoloader.js is the autoloader code [17:52] mscdex: pquerna: https://github.com/michaelsbradleyjr/Hash ? [17:52] Aikar: the idea is Cosmos will be converted into an ES5 proxy [17:52] dabailey has joined the channel [17:52] Aikar: so if you do new Cosmos.Foo() itll autoload lib/classes/Foo.js and then Cosmos.Foo() will exists also [17:52] mikeal has joined the channel [17:52] Aikar: i got some code i was playing with in that commit to rename the class, but id like to do it w/o that [17:53] pquerna: mscdex: hmm, not so much pure hash libs, I was thinking of breaking out https://github.com/3rd-Eden/node-memcached/blob/master/lib/hashring.js into a separate npm dep [17:53] Aikar: https://github.com/aikar/cosmos/blob/master/test.js [17:53] SamuraiJack_: Aikar: you can use anonymous class [17:53] SamuraiJack_: sec [17:53] V1: pquerna: feel free to rip it out of my memcached driver ;) [17:53] nibblebot has joined the channel [17:53] Aikar: yeah thats what i was about to do [17:53] SamuraiJack_: Aikar: I guess your code is supposed to run only in node? [17:53] Aikar: yep [17:54] Aikar: its basically the "does this object exists" code that bites me. if Joose would simply try to set Cosmos.Foo to the class anyways, the proxy will set the value [17:55] [algo] has joined the channel [17:55] pquerna: V1: that crc32 impl blew my mind a little [17:55] [algo]: express: if I'm throwing inside app.get function, app.error would handle that ? [17:55] V1: pquerna: but if you are gonna rip it, steal it from my v0.0.1 branch as it contains "caching" of the hashed key, which produces a 14x faster lookup [17:55] pquerna: ah [17:55] SamuraiJack_: Aikar: https://gist.github.com/929022 [17:55] tjholowaychuk: [algo]: only if it's within the same stack [17:56] tjholowaychuk: [algo]: typically it's best to next(err) [17:56] pquerna: oh wow, didn't see v0.0.1 branch [17:56] [algo]: tjholowaychuk: you mean I shouldn't use app.error ? [17:56] pquerna: why not master? [17:56] tjholowaychuk: [algo]: no that is fine, im just saying it cannot catch async stuff [17:56] jpick has joined the channel [17:57] tjholowaychuk: [algo]: User.get(function(err){ throw err }) etc will not be caught [17:57] V1: pquerna: I'm refactoring the driver atm, adding JSDoc better test suite and 100% compliance with Memcached, Membase and the upcoming MySQL 5.6 innodb memcached api interface [17:57] sivy has joined the channel [17:57] nibblebot: trying to use connect-redis (redis as session store), but I need to catch the error that's thrown when no redis server exists and a call to 'new RedisStore' is made? where can i specify my callback? I've already tried 'new RedisStore(function(err){console.log(err)}' to no avail [17:57] [algo]: tjholowaychuk: ah, then it has little use ? [17:57] pquerna: V1: sweet [17:57] [algo]: most stuff is async [17:57] Aikar: SamuraiJack_: yeah thats what i was starting to do. just went to bed last night before finishing that lol [17:57] tjholowaychuk: [algo]: no... it still works but you next(err) [17:57] tjholowaychuk: instead of throwing [17:57] [algo]: I'm writing authentication middleware and want to process 403 [17:57] [algo]: ah ok [17:57] Aikar: just think a "dont check for duplicate, overwrite if exists" may be a useful config option [17:57] [algo]: then app.error should work.. strange it doesn't [17:58] [algo]: 2.2.2 [17:58] Aikar: the JOOSE_CFG stuff [17:59] catshirt has joined the channel [17:59] maodun has left the channel [18:00] dylang_ has joined the channel [18:00] SamuraiJack_: Aikar: its very specific.. actually I added this check after users were copy-pasting the code (with the same class name) and then complained they can't find their class [18:00] [algo]: I do next(new error.NotFound('ouch')) inside app.get [18:00] Aikar: lol [18:00] binaryjohn has joined the channel [18:00] [algo]: app.error(function() { util.log("TEST!!!!!!!!!!!!!!!!!!!!!!!!") }); does nothing [18:00] [algo]: no sign of working [18:00] SamuraiJack_: Aikar: so you are trying to implement auto-loader, like refering to Some.Class will fetch it? [18:00] [algo]: is there anything I miss ? [18:01] Aikar: SamuraiJack_: yea [18:01] SamuraiJack_: Aikar: cool [18:01] joshthecoder has joined the channel [18:01] Aikar: SamuraiJack_: like PHP's autoloader basically [18:01] Aikar: it does require() on first use, then it will be loaded [18:02] mbrevoort has joined the channel [18:02] zomgbie_ has joined the channel [18:03] puffpio has joined the channel [18:03] sleeplessinc has joined the channel [18:03] sleeplessinc: ... [18:03] sechrist has joined the channel [18:05] [algo]: is there a way to debug why app.error doesn't work ? [18:05] javaanse_jongens has joined the channel [18:06] Aikar: so, im having trouble finding an http client proxy lib for node... SubStack do you know how to use your prox lib with http.request ? [18:06] tjholowaychuk: [algo]: the app.error() callbacks are just regular connect error handling middleware (arity of 4 to accept the error) [18:06] tjholowaychuk: however they are "registered" when the server is listening [18:06] robmason has joined the channel [18:07] tjholowaychuk: [algo]: this is the exact code "this.on('listening', this.registerErrorHandlers.bind(this));" [18:07] tjholowaychuk: so they are essentially middleware, added to the bottom of your "stack" [18:07] zomgbie has joined the channel [18:08] patcito has joined the channel [18:08] phluffy has joined the channel [18:08] phluffy has joined the channel [18:09] [[zz]] has joined the channel [18:09] langworthy has joined the channel [18:11] onar has joined the channel [18:11] TereskaPL has joined the channel [18:12] arpegius has joined the channel [18:12] [algo]: tjholowaychuk: do I get it right that *everything* is middleware? [18:12] [algo]: inside app.get [18:12] TereskaPL: hello i have a qustion about streams. after for example steam.end() is there a possibility to reopen that stream? [18:12] tjholowaychuk: [algo]: more or less. I try to unify everything as much as possible [18:12] [algo]: tjholowaychuk: still doesn't work [18:12] [algo]: how can I debug that stuff? [18:13] Corren has joined the channel [18:13] tjholowaychuk: [algo]: with node's debugger [18:13] [algo]: I just call next(new Error), and default error handler kicks in [18:13] [algo]: app.error doesn't log anything [18:13] tjholowaychuk: if you are using express.errorHandler() [18:13] tjholowaychuk: then dont [18:13] [algo]: ah [18:13] tjholowaychuk: because it will take precedence if it's above those, which it will be [18:13] [algo]: that's the reason? [18:13] [algo]: hah [18:13] tjholowaychuk: yeah [18:13] tjholowaychuk: its just a list [18:13] tjholowaychuk: of functions [18:13] willwhite has joined the channel [18:13] c4milo has joined the channel [18:13] tjholowaychuk: executed in sequence [18:14] [algo]: can I still use it but make least precedence? [18:14] eldios has joined the channel [18:14] [algo]: not strictly needed, just interesting [18:14] fhemberger has joined the channel [18:15] rubydiam- has joined the channel [18:16] javaanse_jongens has joined the channel [18:16] DoNaLd`: plz.. help ... exist some solution for this case ? http://imgur.com/iQqCH [18:16] TereskaPL: i don't want to close stream but i must know somehow then it will end sending data [18:16] TereskaPL: i want to call .end() and then somethink like reopen() [18:16] brolin_ has joined the channel [18:16] TereskaPL: i'm talkin about stdout and stdin [18:17] willwhite has joined the channel [18:17] TereskaPL: ? [18:17] TereskaPL: any help? [18:17] phluffy: has anyone had problems getting node-mysql to connect on Ubuntu 10.10 server? I have no problem with it working on my 10.04 desktop. [18:20] RusAlex has joined the channel [18:20] mraleph has joined the channel [18:21] nodenewb has joined the channel [18:21] nodenewb: hi [18:22] nodenewb: im having a hard time following the instructions to install. whenever i type git clone it keeps downloading a different repo [18:22] [algo]: app.use adds a generic middleware which every request passes through ? [18:22] nodenewb: ? [18:22] tjholowaychuk: [algo]: yeah [18:22] captain_morgan has joined the channel [18:23] tjholowaychuk: [algo]: until one of those middleware responds, and does not invoke next() [18:23] TereskaPL: anyone can help me with Streams? [18:23] [algo]: tjholowaychuk: thanks [18:23] fhemberger: nodenewb: tried the tgz package instead? [18:23] [algo]: is there an "actions" concept in express ? [18:24] A_Nub has joined the channel [18:24] [algo]: usually in a framework I use route to connect URL --> action [18:24] phluffy: wow - is github down? [18:24] nodenewb: not yet, but im confused as to why im not able to clone it [18:24] A_Nub: github is fine [18:24] nodenewb: im getting another repository (from another project) [18:24] [algo]: currently I wrote a piece of code of my own which autoloads actions from files, so I can app.get('/url', actions.url) [18:24] [algo]: but maybe I missed something [18:25] tjholowaychuk: [algo]: its just a function [18:25] tjholowaychuk: you can place it anywhere you want [18:25] [algo]: tjholowaychuk: so no framework for that [18:25] tjholowaychuk: but no express is not bound to a specific file structure [18:25] kjeldahl has joined the channel [18:25] [algo]: ;) [18:25] nodenewb: im not quite sure why git is using whats in "origin" [18:25] fhemberger: nodenewb: hmm. cloning should be fine. but for the start, maybe it's easier to just grab the tgz and do a configure/make/make install [18:26] BillyBreen has joined the channel [18:26] zpao has joined the channel [18:26] fhemberger: nodenewb: if you're on a mac, you manybe want to have a look at homebrew, so you can always update the package easily. [18:27] Aikar: noone know of a way to do http socks5 proxy with node? [18:27] [algo]: is it possible to get current environment in express ? [18:27] [algo]: I see docs about how to configure it [18:27] [algo]: but I need that environment in my error handler [18:28] nodenewb: im on a mac yeah [18:28] tjholowaychuk: [algo]: you should always use settings, not the env directly [18:28] [algo]: or I should setup error handler inside .configure somehow? [18:28] fhemberger: nodenewb: just try "git clone https://github.com/joyent/node.git" - that should work just fine. [18:28] tjholowaychuk: [algo]: you can yeah [18:28] nodenewb: i typed git clone https://github.com/joyent/node.git . what i get instead is the repository in my remote.origin.url [18:28] nodenewb: in git config [18:29] fhemberger: nodenewb: uhm. that's really strange. maybe you should check your git config, [18:29] TereskaPL: anyone can help me with Streams? [18:29] flippyhead_ has joined the channel [18:29] nodenewb: yeah, the repo thats getting downloaded is in my remote.origin.url in git global config [18:30] bartt has joined the channel [18:30] Country has joined the channel [18:30] marcab has joined the channel [18:30] fhemberger: nodenewb: have you tried deleting that key from your gitconfig? [18:31] [algo]: tjholowaychuk: is app.configure(env..) just an "if" check which calls a function iff the env matches ? [18:31] tjholowaychuk: [algo]: yes [18:32] nodenewb: trying [18:33] hij1nx has joined the channel [18:34] fairwinds: tjholowaychuk: hey. just playing with cluster on mac. when I shutdown or stop it does not seem to remove pidfiles [18:35] tjholowaychuk: fairwinds: I think I just have them being replaced right now, not removed [18:35] robmason has joined the channel [18:35] tjholowaychuk: could easily remove them [18:35] tjholowaychuk: but of course if you SIGKILL they will remain [18:35] mikedeboer has joined the channel [18:35] tjholowaychuk: might as well perform some cleanup though [18:35] http402 has joined the channel [18:36] fairwinds: yeah, expected have it clean up pids [18:36] DoNaLd`: tjholowaychuk: hi .. maybe you will have some idea .. exist some solution for this case ? http://imgur.com/iQqCH [18:37] [algo]: tjholowaychuk: thanks a lot for the answers [18:37] tjholowaychuk: DoNaLd`: I dont get it [18:37] tjholowaychuk: DoNaLd`: you want to share a SSJS function with the CS? [18:37] DoNaLd`: tjholowaychuk: yes [18:38] tjholowaychuk: DoNaLd`: maybe take a look at https://github.com/visionmedia/express-expose [18:38] tjholowaychuk: it only works within reason of course [18:39] newy_ has joined the channel [18:39] DoNaLd`: tjholowaychuk: i try it .. thnx [18:39] stonebranch has joined the channel [18:40] WhenRaptors has joined the channel [18:40] broofa has joined the channel [18:40] WhenRaptors: heyo, keep getting Build failed: -> task failed (err #1): {task: cxx node_crypto.cc -> node_crypto_4.o} when compiling node [18:40] nodenewb: hmm deleting the key seemed to have worked, but it messed up my existing repository. lol [18:40] nodenewb: o well shall go ponder some more [18:40] WhenRaptors: looks like libssl took something out that node relied on [18:41] A_Nub: Whats a good html renderer? [18:41] A_Nub: jade? [18:41] WhenRaptors: just html renderer or also javascript? [18:41] dyer has joined the channel [18:41] A_Nub: mostly just html [18:41] WhenRaptors: webkit [18:41] A_Nub: heh [18:41] Swizec has joined the channel [18:42] jeffreyt has joined the channel [18:42] WhenRaptors: hey, it does what you want ;) [18:42] A_Nub: html rendering as in generating html markup. [18:42] arpegius has joined the channel [18:42] WhenRaptors: OH [18:42] tjholowaychuk: WhenRaptors: he means a template engine :p [18:42] A_Nub: lol [18:42] insin has joined the channel [18:42] WhenRaptors: dunno, I stopped generating HTML a year ago. [18:42] WhenRaptors: (oh snaps) [18:42] fairwinds: tjholowaychuk: so for production you are firing up cluster with sudo -u someuser [18:43] A_Nub: jade reminds me of zencoding [18:43] blueadept has joined the channel [18:44] fairwinds: ie nobody, node, or www etc [18:44] tjholowaychuk: fairwinds: we have a init.d script, monitoring etc, but no we use the 'user' option [18:44] WhenRaptors: What are you generating the HTML for tbw? [18:44] A_Nub: idk [18:44] A_Nub: i was going to move from html [18:44] WhenRaptors: I've mostly switched to making web applications (aka they usually have a client side javascript UI lib for rendering) [18:44] A_Nub: then again [18:45] A_Nub: yeah [18:45] fairwinds: tjholowaychuk: sure I can write one, np [18:45] A_Nub: I want to use cappuccino [18:45] A_Nub: but i couldnt get it to work [18:45] fairwinds: tjholowaychuk: I am on centos, what about you? [18:45] tjholowaychuk: fairwinds: just depends how important your app is, sometimes nohup is enough haha [18:46] WhenRaptors: @A_Nub: for out of the box I recommend extjs (Sencha) [18:46] saschagehlich has joined the channel [18:46] WhenRaptors: but they got a silly GPL license so for commercial apps I recommend rolling your own [18:46] fairwinds: heh, this is just a simple site. Am putting up something more serious in a week or so [18:47] A_Nub: Yeah [18:47] A_Nub: this is commercial [18:47] fairwinds: tjholowaychuk: so thought I'd get some cluster experience [18:47] fairwinds: ahead of time [18:48] WhenRaptors: there are some open source LGPL/MIT ones [18:48] WhenRaptors: but having used them, they all kinda have their own flaws [18:48] A_Nub: yea [18:48] A_Nub: cappuccino [18:48] A_Nub: LGPL [18:49] sh1mmer has joined the channel [18:49] A_Nub: plus I love OBJ-C [18:49] fangel has joined the channel [18:49] mikeal has joined the channel [18:49] ckknight: A_Nub: I use Jade for my HTML rendering, btw [18:49] A_Nub: so OBJ-J will be fun :D [18:49] swaj: egad, obj-c is an abomination [18:49] systemfault: Indeed. [18:49] A_Nub: I quite enjoy it [18:49] WhenRaptors: I've been using mootools [18:49] WhenRaptors: (but wait thats not a UI system), no but it makes it super easy [18:49] A_Nub: Hmm [18:50] A_Nub: Well the big problem im having is [18:50] A_Nub: im not JUST making a web app [18:50] A_Nub: but I suppose [18:50] A_Nub: it could be. [18:50] A_Nub: but styled like a site [18:50] A_Nub: hmm [18:50] A_Nub: I just dont know [18:50] A_Nub: what to do with this project [18:50] WhenRaptors: depends on scope really [18:50] A_Nub: Its going to be a social network site [18:51] Bonuspunkt has joined the channel [18:51] WhenRaptors: social network site = web application in my mind [18:51] tjholowaychuk: not really [18:51] A_Nub: thats what I was thnking [18:51] tjholowaychuk: facebook does not force rendering on the client [18:51] A_Nub: But facebook isnt [18:52] tjholowaychuk: make the servers do the work, instead of losing visitors [18:52] tjholowaychuk: with shitty computers [18:52] A_Nub: I am just not sure where to go [18:53] A_Nub: Web app [18:53] A_Nub: or website [18:53] A_Nub: or a fusion [18:53] A_Nub: of the two [18:53] tjholowaychuk: usually a combination [18:53] tjholowaychuk: IMO you dont gain much from pushing everything to the client [18:53] WhenRaptors: @tj: thats flawed logic [18:53] tjholowaychuk: WhenRaptors: not really [18:54] tjholowaychuk: to "real" sites like FB, Yahoo etc it's more important to retain visitors [18:54] tjholowaychuk: not to offload computing [18:54] WhenRaptors: the clients really aren't doing any work with the web application model vs the static rendering infact they aredoing LESS work [18:54] WhenRaptors: you' [18:54] WhenRaptors: you're not rerendering the whole page every click [18:54] WhenRaptors: only the sections that have to be updated [18:54] A_Nub: that is true [18:54] no-gooder has joined the channel [18:54] swaj: yet facebook is a horrible kludge of unreliable ajax calls that seem not to work most of the time. [18:54] WhenRaptors: and facebook is a web application [18:54] A_Nub: I did plan on a ajax model [18:55] WhenRaptors: @swaj: truth. [18:55] WhenRaptors: facebook wasn't originally a web application [18:55] WhenRaptors: they kinda just shoved ajax into it [18:55] A_Nub: Facebook is a hax of web app and website. [18:55] A_Nub: its neither [18:55] A_Nub: and both [18:56] tjholowaychuk: I think you need to carefully consider what you are doing [18:56] tjholowaychuk: in terms of performance, seo, etc [18:56] tjholowaychuk: there is no single answer [18:56] tjholowaychuk: 100% clientside is most likely a bad idea, 100% SS is also most likely a bad idea [18:56] mbrevoort: swaj: what??? "facebook is a horrible kludge of unreliable ajax calls that seem not to work most of the time" [18:56] tjholowaychuk: you just need to evaluate each "section" of the site/app/whatever you want to call it [18:56] WhenRaptors: there is never 100% on either side bth [18:56] WhenRaptors: *tbh [18:57] A_Nub: Hmm [18:57] WhenRaptors: even with serving HTML you're still having the client retrieve resources and rendering the [18:57] WhenRaptors: *HTML [18:57] tjholowaychuk: yes [18:57] ckknight: my only real qualm with 100% client-side is SEO issues. [18:57] tjholowaychuk: i know [18:57] swaj: mbrevoort: have you ever tried to actually "use" facebook? 90% of the time simply clicking on a link is some sort of rediculous ajax call that doesn't work. [18:57] A_Nub: Well we don't have much content to be searched. [18:57] WhenRaptors: SEO issues are easily overcame [18:57] A_Nub: and thats not really our goal. [18:57] WhenRaptors: provide dynamic sitemaps to the parts you want searchable [18:57] A_Nub: yea that too [18:57] tjholowaychuk: ACTION leaves [18:57] A_Nub: data mapping. [18:58] mbrevoort: swaj: yes, works 99% of the time for me. As a FB app developer their APIs have been traditionally unstable but overall the service availability has been above average. [18:58] __sorin__ has joined the channel [18:59] gzmask has joined the channel [18:59] mbrevoort: swaj: anyway, not the place to debate Facebook stability [18:59] swaj: mbrevoort: I'd have to disagree... from a user perspective, their site is a kludgey pile of garbage. I click on a thumbnail and up pops some sort of modal dialog that has no content in it... [18:59] gzmask: hello folks, https://github.com/gzmask/rlatern/blob/master/app.js at line 21, how do I insert pre-defined JS array into the json structure? [18:59] dyer_ has joined the channel [19:00] gzmask: line 20* [19:00] maushu_ has joined the channel [19:00] swaj: they try to offload too much on the client. I understand that they have immense load to contend with, but Google seemed to figure out a happy mix of client-side javascript and server-side processing... why can't a company like Facebook? [19:00] A_Nub: Im tempted to make this a serverside site. [19:00] aho has joined the channel [19:01] maushu__ has joined the channel [19:01] WhenRaptors: @swag: really you just want the client to be maintaining state and rendering [19:02] WhenRaptors: so you can leave the backend stateless and do all the business logic [19:02] A_Nub: yea [19:02] A_Nub: makes more sense. [19:02] A_Nub: But the only argument against [19:02] A_Nub: is old [19:02] AntelopeSalad: are clients even ready for that yet? [19:02] A_Nub: browsers [19:02] A_Nub: Yea [19:02] WhenRaptors: what old browsers [19:02] AntelopeSalad: i mean, look at cloud9ide. you could say this is a web app yeah? [19:02] A_Nub: AntelopeSalad: it totally is [19:02] michaellehmkuhl has joined the channel [19:02] A_Nub: its all client side, then server just manages data. [19:02] AntelopeSalad: i'm running a somewhat recent machine but it's also fairly slow for me [19:03] AntelopeSalad: slow enough that it bothers me [19:03] Prism has joined the channel [19:03] knuuby has joined the channel [19:03] WhenRaptors: @Antelop: we're talking about implementation though [19:03] A_Nub: My machine is quite good too. [19:03] swaj: AntelopeSalad: what browser? [19:03] WhenRaptors: look at grooveshark [19:03] WhenRaptors: its a web application [19:03] AntelopeSalad: swaj: chrome [19:03] WhenRaptors: and its fast. [19:03] swaj: grooveshark is flash [19:03] WhenRaptors: grooveshark is flash and html [19:03] knuuby: short question: how can i close socket.io connections on the sever-side? [19:03] WhenRaptors: *javascript [19:03] WhenRaptors: *cough [19:03] swaj: it's mostly flash [19:03] swaj: and it's illegal :/ [19:04] swaj: but that's another debate [19:04] WhenRaptors: are you discounting flash as a client technology? [19:04] wdperson has joined the channel [19:04] perezd: anyone know how to specify a NODE_PATH or loadpath type situation with a Forever script from a nodeJS file (not command line usage) [19:04] V1: knuuby: Send a kill message and handle it by the client :) [19:04] A_Nub: I discount flash :) [19:04] swaj: no. But flash is a much more consistent experience. JavaScript implementations vary wildly. [19:04] swaj: Flash is almost always consistently bad :) [19:04] A_Nub: haha [19:05] captain_morgan has joined the channel [19:05] johnnywengluu: flash is shit =) [19:05] WhenRaptors: anyhow, what I'm getting at is there are ways of making a reliable/performant client [19:05] johnnywengluu: oops [19:05] WhenRaptors: I've done it a bajillion times [19:05] A_Nub: Yes there are [19:05] WhenRaptors: follow best practices [19:05] A_Nub: But im asking which is better [19:05] WhenRaptors: there is no better [19:05] knuuby: V1: thx, do you know why there is no close() method? [19:05] A_Nub: Maybe I need to explain the project more [19:05] A_Nub: There will be lots of graphs [19:05] swaj: better is completely subjective. You need to decide what works best for your application. [19:06] WhenRaptors: I charge 120$/hr for consultation work ANub;) [19:06] A_Nub: not too much user interaction [19:06] A_Nub: other than observing data [19:06] A_Nub: WhenRaptors: tehehe [19:06] A_Nub: Understood. [19:06] swaj: another consideration is the end user's browser. Do you need to maintain compatibility with ancient browsers? [19:07] A_Nub: I have just never tried to tackle anything that might have a substantial amount of users [19:07] V1: knuuby: Polling transports will just create a new connection when you close a connection on the server side, as they will just see it as a "response" from the server [19:07] swaj: if so, server side certainly makes that easier. [19:07] A_Nub: Well, I have been considering that and thank god node has a canvas implementation. [19:07] swaj: node? [19:08] A_Nub: But I don't think im going to support anything too old [19:08] swaj: do you want to render your charts server side? [19:08] A_Nub: only if the browser doesnt support it. [19:08] robhawkes has joined the channel [19:08] swaj: sounds like a pain in the rear :) [19:08] A_Nub: Or [19:08] A_Nub: there is googles Direct X thing huh [19:08] A_Nub: so I could keep it client side [19:09] swaj: are you only writing for IE? [19:09] A_Nub: Ew god no [19:09] A_Nub: I would write for webkit only if I could [19:09] A_Nub: ;) [19:09] swaj: god I wish everyone would just switch to webkit [19:09] swaj: and V8 [19:09] lintaba has joined the channel [19:09] A_Nub: ya [19:09] ckknight: eh, IE9+ isn't _that_ bad [19:10] lintaba: hy [19:10] A_Nub: apples javascript is just as good as v8 nowadays isnt it? [19:10] swaj: IE9 still lacks proper CSS3 support. It makes me sad. [19:10] swaj: and the font rendering is awful [19:10] A_Nub: does IE9 have canvas? [19:10] A_Nub: Ya Windows confuses me [19:10] swaj: yeah... IE8 did too [19:10] lintaba: does any1 remember the name of that technique, that generated full html page from a css/xpath like syntax? [19:10] A_Nub: why does win7 have worse font rendering than XP? [19:10] dylang has joined the channel [19:11] A_Nub: why are all their fonts aliased sooo terribly? [19:11] A_Nub: I DONT GET IT [19:11] swaj: I don't understand IE9 completely ignoring cleartype. [19:11] swaj: it looks awful [19:11] steveklabnik: conspiracy. [19:11] ckknight: lintaba: Jade [19:11] TomsB has joined the channel [19:11] swaj: phantomJS looks neat [19:11] lintaba: does any1 remember the name of that technique, that generated full html page from a css/xpath like syntax? :D [19:11] swaj: I need to tinker with it [19:12] eee_c1 has joined the channel [19:12] swaj: http://www.phantomjs.org/ <-- it's a javascript-based headless webkit frontend. really sexy. [19:12] arpegius has joined the channel [19:13] blueadept: cool logo [19:13] newy has joined the channel [19:13] ckknight: swaj: that is shiny [19:13] blueadept: wait what, rasterize and save as a gif?! [19:14] lintaba: does any1 remember the name of that technique, that generated full html page from a css/xpath like syntax? :D [19:14] blueadept: does phantomjs curl pages and save them as gives?! [19:14] blueadept: er gifs* [19:14] ckknight: lintaba: either Jade or Haml [19:14] briancray has joined the channel [19:14] duncanbeevers: Zen Coding? [19:14] tsesame_: what gives [19:14] duncanbeevers: http://zen-coding.ru/demo/ [19:14] aho: i'd guess zen, too [19:15] TheFuzzball has joined the channel [19:15] aho: foo.bar>baz+bla = [19:16] saschagehlich has joined the channel [19:16] aho: those are css selectors though [19:18] swaj: blueadept: yes [19:18] swaj: blueadept: check out phantom.render [19:18] swaj: Renders the web page to an image buffer and save it as the specified file. [19:18] swaj: Currently the output format is automatically set based on the file extension. Supported formats are PNG, JPEG, and PDF. [19:18] swaj: and it's headless :) [19:18] blueadept: woah this is awesome [19:19] swaj: yeah [19:19] blueadept: weird i was just trying to do this the other day i swear [19:19] swaj: it's a one-liner in phantom it appears [19:19] blueadept: the javascript gods have answered my calls [19:19] JusticeFries has joined the channel [19:19] qbert_: Is this page http://notes.sencha.com/post/677410473/connect-middleware-for-nodejs the connect that installs with npm ? [19:20] tjholowaychuk: qbert_: yeah [19:21] qbert_: ok, I'm playing around with using Ext Model's and a mongo db layer, anyone know of work along those lines ? Mongo serves up Ext Model's, passes them directly to the client etc ? [19:24] fhemberger has left the channel [19:24] bernied has joined the channel [19:25] Me1000 has joined the channel [19:25] Prism: hi! doc says that node on cygwin is unstable. Is that true? (i'm during the setup process) [19:26] sdecastelberg has joined the channel [19:26] lintaba: does any1 remember the name of that technique, that generated full html page from a css/xpath like syntax? [19:26] lintaba has left the channel [19:26] swaj: lintaba: ckknight has answered your question about 15 times [19:26] swaj: sigh [19:28] ckknight: twice, but still [19:28] ckknight: and also, no response [19:29] swaj: 2... 15... same difference :P [19:29] teemow has joined the channel [19:29] jjmalina has joined the channel [19:29] ckknight: 2 is almost 13 in the grand scheme of things [19:29] ckknight: 15* [19:29] swaj: exactly [19:30] apucacao has joined the channel [19:31] tsesame_: Prism: A window-native version is in the works [19:32] ckknight: it'll be cool to see how fast Node screams once I/O completion ports are used [19:33] mbrevoort has joined the channel [19:33] swaj: I think I saw ryan say that he actually likes winsock recently :) [19:33] Prism: tsesame i know and thats cool but it's not there yet :) [19:33] tsesame_: seems that iocp is better suited for node than whatever linux uses [19:34] robhawkes has joined the channel [19:34] jjmalina has joined the channel [19:35] jpld has joined the channel [19:36] rook2pawn has joined the channel [19:36] robmason has joined the channel [19:37] roidrage has joined the channel [19:38] bkozal has joined the channel [19:40] mikl has joined the channel [19:41] devrim has joined the channel [19:42] arpegius has joined the channel [19:43] mattly has joined the channel [19:44] johnnywengluu: i have big times difficulties knowing how to write correct tests [19:46] ckknight: johnnywengluu: it can be hard at times. What you having trouble with? [19:46] reid has joined the channel [19:47] johnnywengluu: ckknight: to get what i should test .. im writing a framework and its lot of files in folders .. i dont know what/how to test [19:47] johnnywengluu: small libraries are quite simple to test .. i just require it and test all the methods [19:48] johnnywengluu: but i dont get bigger tests like testing framework (with folders/files) .. my framework is generating a project folder (kinda like express) so there is a framework folder and a project folder .. which adds complexity for me =) [19:48] tjholowaychuk: johnnywengluu: yeah frameworks with a specific structure is annoying [19:48] tjholowaychuk: but then again having frameworks bound to a specific structure, are annoying [19:49] johnnywengluu: hmm [19:49] johnnywengluu: so you mean express (the framework folder not the project folder) doesn't have a specific structure? [19:50] tjholowaychuk: well express has directories yeah [19:50] tjholowaychuk: but anything public is exported [19:50] markwubben has joined the channel [19:50] xSmurf: what would people recommend to route a bunch of post calls to different controllers? [19:50] xSmurf: all the router classes seem to be url based [19:51] johnnywengluu: maybe i should read a book about TDD/BDD [19:51] ckknight: xSmurf: how do you want to differentiate which action your requests get mapped to? [19:51] xSmurf: I don't really care, either an hash map definition, regexp, etc [19:52] nmtmason has joined the channel [19:52] ckknight: xSmurf: I mean, if you don't want to map based on URL, what do you want to map based on? [19:52] xSmurf: POST vars [19:52] ckknight: I see [19:52] nphase has joined the channel [19:52] ckknight: I would use one action and then parse your POST, then just have a dictionary of name to callback that you call [19:52] ckknight: e.g. actions[request.form.blah](request, response); [19:53] prettyrobots: xSmurf: Do you have a strong use case? Because that doesn't sound like a good idea to me? [19:53] xSmurf: except I need to match many vars not just one [19:53] ckknight: if I were you, I'd really define a RESTful interface. [19:53] mikeal: SubStack: are you coming to NodeConf? [19:53] xSmurf: prettyrobots: yeah, talking to FreeSwitch mod_xml_curl [19:54] ckknight: xSmurf: you'll have to roll your own custom thing where you just listen on a single URL and then do the routing yourself, which admittedly shouldn't be hard. [19:54] xSmurf: it's not hard, it's harder to do properly [19:54] xSmurf: keep everything modular etc [19:55] xSmurf: anyway, I was just wonder if something might exist already, I suppose not [19:55] prettyrobots: xSmurf: Nope. [19:55] bsstoner has left the channel [19:55] prettyrobots: xSmurf: You are best off rolling your own branch logic there. [19:56] prettyrobots: You can put functions in an object keyed on the data variables. [19:56] prettyrobots: If that made sense. [19:56] prettyrobots: handler["FROBINDATE"] = function (request, response) { [19:57] jetienne: node.js rocks [19:57] prettyrobots: jetienne: I second. [19:57] xSmurf: prettyrobots: I wished it was that easy... but I need to match multiple vars [19:57] nmtmason has joined the channel [19:58] prettyrobots: Put them in a string and match against regular expressions. [19:58] prettyrobots: That's easy. [19:58] prettyrobots: If your decisions are not based on a tree, because the FROBINATE handler can have another function map. [19:59] prettyrobots: My thoughts. [19:59] prettyrobots: I was looking for Felix but he's not here. [19:59] prettyrobots: felixge [19:59] marcus___ has joined the channel [20:00] marcus___ has joined the channel [20:00] azend has joined the channel [20:00] wink_: any of you javascript wizards familiar with lua? is there anyway to emulate lua's metatable stuff for property assignments? eg: given an object, hook property accesses/assignments? [20:00] Xeoncross has joined the channel [20:01] gkatsev: wink_: there's Object.defineProperty and __defineGetter__ and __defineSetter__ and also the get/set properties. [20:02] Xeoncross: If a node.js instance introduces two user-agents - could they talk directly to each other? [20:02] mraleph: wink_: you can't imititate __newindex/__index fully in vanilla javascript. you need proxies — v8 does not support them, but there are some "emulation" packages for node [20:02] puffpio has joined the channel [20:03] ckknight: Xeoncross: short answer: no, long answer: yes, but extremely painfully. [20:03] arianrock has joined the channel [20:03] ckknight: wink_: I've done a lot of Lua. JavaScript sadly can't replicate the blanket __index and __newindex functions, but if you know the keys ahead-of-time, that works fine. [20:03] arianrock: hi guys [20:03] arianrock: <3 [20:03] ckknight: howdy, arianrock [20:04] captain_morgan has joined the channel [20:04] wink_: yeah it looks like the getter/setter stuff will do if i know the keys ahead of time [20:04] tjholowaychuk: wink_: what are you trying to do? [20:04] Xeoncross: ckknight, I found something about it: http://stackoverflow.com/questions/1032006/will-html5-allow-web-apps-to-make-peer-to-peer-http-connections [20:05] arianrock: howdy how! [20:05] wink_: just cleanup a whole bunch of setFieldname functions i have for building wire messages for dhcp [20:06] wink_: seems a little cleaner to allow dhcpmessage.xid = xid than dhcpmessage.setXid(xid) [20:06] wink_: looks more like javascript to me ;> [20:06] arianrock: js has no real data encapsulation anyhow [20:06] arianrock: so dont use getters and setters [20:06] arianrock: unless you really want to validate the input [20:06] arianrock: for example, throw an error when the wrong data type is entered [20:07] wink_: and i really do, in fact i dont just want to validate it, i have to munge it [20:07] wink_: right now my message requires buffers for each of the fields it represents, hooking getters/setters onto the properties will allow me to use a single buffer and just slice out the bits for that field [20:07] arianrock: alright [20:08] arianrock: Programming is addicting [20:08] arianrock: I started 1.5 years ago [20:08] arianrock: got in touch with java, it was okay [20:08] arianrock: then this dude introduced me to C and assembly [20:08] arianrock: I thought: this shit is hardcore, fuck this [20:08] arianrock: but then I fell in love [20:08] qbert_: with a man ? [20:08] arianrock: no, with the intel architecture manual [20:09] steveklabnik: ugh [20:09] steveklabnik: once you find some typos, you wont [20:09] arianrock: xD [20:09] steveklabnik: ACTION was working on an operating system once... [20:09] arianrock: then I dived into epoll / found out about libev [20:09] arianrock: then I stumbled upon node.js [20:09] gde33 has joined the channel [20:09] arianrock: instant love [20:09] wink_: arianrock: get yourself a nice ARM dev board, you'll dump that dirty intel whore like a bad habit ;> [20:10] arianrock: It all happend so quickly since I switched to linux [20:10] ckknight: going from assembly to JavaScript, arianrock. Big step. [20:10] arianrock: nonono [20:10] arianrock: java > c/assembly/c++ < hated writing evented I/O> > found out article on node.js > learned js in 3 hours > started writing [20:11] Venom_X has joined the channel [20:11] arianrock: It all started with java. and java to javascript isn't a big step, just gotta get used to the prototypial model [20:11] wink_: tjholo: you're one of the js wizards, does that seem a sane thing to do? re: using getters/setters to front a single buffer as opposed to each property being it's own buffer and then combining them at the end of it all? [20:12] wink_: well shit, that was bad timing.. [20:13] johnnywengluu: are there libraries for Given When Then tests on node.js and browser? [20:14] tschundeee has joined the channel [20:14] baudehlo: given a list of parameters in an array, is there a way to call a method with those items as parameters? [20:14] Xeoncross: I love the syntax of JavaScript. Make everything else look so ugly [20:14] baudehlo: e.g. given a=[1,2,3] and b=function(a,b,c) {...}; how can I call b(1,2,3) given a? [20:15] mikegerwitz: baudehlo: b.apply( context, a ); [20:15] baudehlo: ah neat. Thanks. [20:15] tjholowaychuk has joined the channel [20:16] jjmalina has joined the channel [20:17] constantx has joined the channel [20:17] Gelegrodan: isaacs: ? [20:17] isaacs: yo [20:18] Gelegrodan: hi [20:18] A_Nub has left the channel [20:18] Gelegrodan: got a error when i uninstalled, said i should email..and i did [20:18] Gelegrodan: but i got a mail from google-groups [20:18] Gelegrodan: saying the mail is not valid [20:18] Gelegrodan: or the group.. [20:18] Gelegrodan: " [20:18] Gelegrodan: We're writing to let you know that the group you tried to contact (npm-) may not exist" [20:19] isaacs: yeah, it's just cuz you got moderated, probably [20:19] isaacs: or google groups is being an idiot [20:19] isaacs: i dunno [20:19] Gelegrodan: its npm-@googlegroups.com> [20:19] Gelegrodan: or npm@ ? [20:19] isaacs: with the dash [20:19] isaacs: npm- [20:19] Gelegrodan: ok [20:19] Gelegrodan: hm.. [20:19] isaacs: doesn't allow 3 letter group names [20:20] Gelegrodan: ah [20:20] isaacs: but i got emails from the list today, so i know it's workin [20:20] Gelegrodan: well it says that the group might not be open [20:20] Gelegrodan: or the owner might removed it [20:20] Gelegrodan: or i dont have permissions.. [20:20] isaacs: it's not open to all. it's moderated. [20:20] isaacs: i get to filter out the spam by hand [20:21] hellp has joined the channel [20:21] brianc: wink_: are you asking about buffers for your odbc library? [20:21] wink_: so im assuming v8 supports the Object.defineProperty stuff? [20:22] tmpvar: wink_, yes [20:22] wink_: brianc: not yet ;>, im screwing around writing a dhcpd [20:22] brianc: wink_: oh okay [20:22] tmpvar: v8:Object.defineProperty [20:22] v8bot: tmpvar: function defineProperty() { [nat… [20:22] wink_: and at this point it's way more in depth than i would've guessed at a glance, so i need to finish it [20:22] wink_: since the hard part is over [20:22] brianc: wink_: i used a single buffer per open connection in node-postgres which gets constantly updated & rewritten for each outgoing packet. that way I don't have to make a bunch of separate buffers and memcpy them all together at the end [20:23] mbrevoort has joined the channel [20:23] wink_: brianc: yeah thats definitely the technique im looking to use for the wire messages [20:23] wink_: my odbc binding relies on the odbc libs to handle that mess though [20:24] brianc: wink_: yeah, node-postgres does native libpq bindings, but the pure javascript version has no such luxury. [20:24] baudehlo: woot, added ability to have cluster plugins/modules loaded in Haraka. [20:24] wink_: right now the dhcp message is a bunch of buffers per field in the protocol, once i hook the get/sets though i can just slice a single buffer around [20:24] wink_: because concat'ing them at the end is a big ugly mess :p [20:24] brianc: wink_: this might help you out, though it's kinda specific to build postgres client protocol packets https://github.com/brianc/node-postgres/blob/master/lib/writer.js [20:25] mraleph has joined the channel [20:25] brianc: wink_: or it might be no help at all. :) [20:25] wink_: yeah thats pretty, far more so than my current message layout ;> [20:26] wink_: i'll steal a little of it for the variable parts of the message [20:27] wink_: it's the static fields that are a little bit of a pain in the ass, since there are a ton of them [20:27] wink_: 2 bytes here, 1 byte there, repeat 50 times :p [20:28] wink_: mraleph: let me throw my hat in the ring for the js equivalent of __newindex / __index from lua, that'd be awesome to have <3 [20:29] jtrudeau has joined the channel [20:29] wink_: im sure the ecma guys have decades of committees to go through though [20:29] tjholowaychuk: personally I dont want that stuff [20:30] ckknight: wink_: actually the Proxy system is part of ES5.1, I believe, but that's not finalized. [20:30] ckknight: tjholowaychuk: why's that? [20:30] jesusabdullah: I've never used lua, therefore it doesnt have any features I'd like ever. >:I [20:30] jesusabdullah: ;) [20:30] robmason has joined the channel [20:31] tjholowaychuk: ckknight: that's the reason I left ruby, if I want some lame language with way to much magic I wouldn't use js [20:31] ckknight: jesusabdullah: one thing that's nice in Lua: for i = 1, 10 do local func = function() print(i) end end -- it retains the proper value of i [20:31] tjholowaychuk: there are of course times it is useful [20:31] tjholowaychuk: but 99% of the time [20:31] wink_: the magic only sucks when you have to use it though [20:31] tjholowaychuk: its just people being stupid [20:32] arpegius has joined the channel [20:32] augustl: is it "safe" to use var req = http.request(...); req.connection? Need to listen to the connect and close events. [20:33] jesusabdullah: ckknight: Oh yeah? That's kinda cool---I mean, that it properly closes or whatevs [20:33] augustl: or will req.connection likely change in a future version? [20:33] magickid has joined the channel [20:33] jesusabdullah: I may have mentioned before, but I'd probably play with lua if I had anything I thought I could actually use it for [20:33] ckknight: jesusabdullah: yeah. It uses block scoping for all its locals. Javascript has it with "let", but that's non-standard [20:33] pdelgallego has joined the channel [20:33] zylo has joined the channel [20:33] pdelgallego_ has joined the channel [20:34] ckknight: augustl: it might change, but you don't have to upgrade node.js when it does, and if it does change, it probably won't be drastic. [20:34] bkozal has joined the channel [20:35] augustl: cool :) [20:35] wink_: anyone know the name of any of the proxy 'emulators' mraleph referenced? [20:35] tjholowaychuk: wink_: node-proxy [20:35] augustl: and hai ckknight! you might remember me as "leethal" back in #wowuidev ;) [20:35] niftylettuce has joined the channel [20:35] wink_: ACTION headdesks [20:35] ckknight: augustl: oh yeah [20:35] robmason has joined the channel [20:35] niftylettuce: how would I get the images in the CSS to load on this custom request? http://pastie.org/private/ft6v1gv9hhauzywwe9nsra [20:35] jdp has joined the channel [20:36] ckknight: wink_: I'd seriously just not use them until V8 has it in its core. [20:36] wink_: yeah im not going to use it, the getters/setters will do perfect for me since i know the fields i need to hook [20:36] wink_: i just wanted to have a look [20:36] captain_morgan has joined the channel [20:37] newy_ has joined the channel [20:37] ckknight: wink_: I'd look at the Proxy spec. [20:37] RusAlex has left the channel [20:38] wink_: ckknight: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Proxy ? [20:38] ckknight: yep, Mozilla's Firefox 4 offers a full implementation of Proxies. [20:38] robmason has joined the channel [20:38] tbranyen: proxy objects look so dope [20:38] ckknight: yes, they are rather "dope", as the kids say [20:39] wink_: lets add 'dope' as a tag to that page [20:39] tbranyen: dope is hardened in my vernacular [20:39] Xeoncross: you might want to add a txt translation also [20:40] wink_: i wasnt poking fun, i was serious, it'd be awesome [20:40] niftylettuce: i guess just put images in the /images folder.. even though they are in js/libs/mylibs [20:40] ckknight: var p = Proxy.create({ get: function(proxy, name) { return "Hello, " + name; } }); p.wink_ === "Hello, wink_"; [20:42] tbranyen: ckknight: reminds me of metatables [20:42] ckknight: tbranyen: very much. [20:42] ckknight: it's really just a full trap system [20:42] tbranyen: i bugged eich on twitter, and he was like bam bitch check this shit out [20:42] ckknight: so it's more powerful than metatables in some ways [20:43] tjholowaychuk: now our js can be full of ambiguity and stupid apis [20:43] tjholowaychuk: yay [20:43] ckknight: thus the importance of documented public interfaces [20:43] tbranyen: grandma stop whining about the future [20:43] tjholowaychuk: haha [20:43] tjholowaychuk: ill just go back to ruby :p [20:43] tbranyen: bs [20:43] tbranyen: you got the hunger, you can never go back [20:44] tjholowaychuk: with minimal exceptions, I think it's a terrible feature [20:44] wink_: right, but in those exceptions, it really is the proper fit [20:44] ckknight: I think that it could be abused and should be recommended not to use for general-purpose things, but some things could be really cool in it. [20:44] tjholowaychuk: certainly, but "cool" !== good [20:44] tjholowaychuk: in most cases [20:45] kass has joined the channel [20:45] ckknight: you'll be able to represent anything the DOM or other external APIs can do with pure JS objects [20:45] ckknight: that's the power I see [20:45] tjholowaychuk: sure [20:46] tbranyen: ckknight: ya $("a").attr(...) $("a").setAttribute(...) [20:46] tbranyen: transparently [20:46] wink_: hamstringing the language to prevent foolish people doing foolish things isnt the way to go :p [20:47] ckknight: I don't agree with preventing people from blowing off their own feet [20:47] tjholowaychuk: it's just opening a whole new box of retardation, I can see it already [20:47] ckknight: tbranyen: or imagine a key-value store that you just treat as a JS object [20:47] tjholowaychuk: ruby is absolutely terrible with this stuff, js will be no different [20:47] wink_: sure, as will almost any signifigant language feature [20:47] tjholowaychuk: ckknight: yeah, and how itwont work [20:47] tbranyen: tjholowaychuk: but rubists swear by it [20:47] tjholowaychuk: becaues its async :p [20:48] Gelegrodan: is it safe to remove all files in /usr/local/lib/node? (yes i want to delete all modules) [20:48] ckknight: tjholowaychuk: yeah, it was just an example, though. [20:48] zomgbie_ has joined the channel [20:48] tjholowaychuk: thats the kind of magic i dont want [20:48] ckknight: or how about store[key] returns a Promise? [20:48] ckknight: tada, async [20:48] xastey` has joined the channel [20:49] tjholowaychuk: lame [20:50] xastey has joined the channel [20:51] newy_ has joined the channel [20:51] varioust has joined the channel [20:53] JusticeFries has joined the channel [20:54] ph^ has joined the channel [20:59] xastey` has joined the channel [21:00] hackband has joined the channel [21:02] kass has joined the channel [21:02] arpegius has joined the channel [21:03] Lagnus has joined the channel [21:03] blueadept has joined the channel [21:05] xastey has joined the channel [21:06] tylerstalder has joined the channel [21:09] Casperin has joined the channel [21:10] SubStack: Aikar: I kind of ran out of steam with that prox project and only really got anywhere with the socks5 stuff but there are other http proxy modules on npm [21:11] perezd: anyone from the socket.io team here? [21:11] Liam has joined the channel [21:11] gattuso has joined the channel [21:11] http402 has joined the channel [21:12] Liam: hello! [21:16] hussamal has joined the channel [21:17] F1LT3R has joined the channel [21:17] robotarmy has joined the channel [21:19] thomblake has left the channel [21:20] llkazu: any thoughts on getting the size of an object in memory? [21:20] xastey` has joined the channel [21:22] BillyBreen has joined the channel [21:22] pdelgallego has joined the channel [21:22] pdelgallego_ has joined the channel [21:22] ceej has joined the channel [21:23] perezd: isaacs: is it a bad idea to link to a tarball from github? [21:24] xastey has joined the channel [21:24] augustl: is it possible to do concurrent requests with http.request? Seems not [21:25] augustl: http://pastie.org/1813225 logs "request object ....", undefined, undefined, undefined [21:25] Xeoncross: perezd, depends on how heavy it is [21:25] augustl: err, "connection object" [21:26] JusticeFries has joined the channel [21:27] augustl: for the record, I need the connection object to listen to the "connected" and "close" events. [21:30] mraleph: llkazu: why do you want that? [21:30] augustl: is there an API to directly issue HTTP requests, for testing/debugging? [21:30] augustl: without having node maintain connections for me [21:30] ph^_ has joined the channel [21:30] llkazu: mraleph, its a secret ;-) but basically i need to maintain memory usage quotas on certain objects in memory [21:31] marcuswestin: sync node require statement in the browser: https://github.com/marcuswestin/require [21:31] varioust has joined the channel [21:31] mraleph: llkazu: size of object is an implementation detail. [21:32] marcuswestin: (obviously with compiler for creating production version of code) [21:32] Me1000 has joined the channel [21:32] nphase: preferred methods for deploying node.js servers? [21:32] augustl: nphase: I just "node foo.js" them via monit [21:32] nphase: okay [21:33] nphase: do you have any sort of logging or monitoring in place? munin et al [21:33] mraleph: llkazu: your best shot is to use conservative estimate [21:33] augustl: nphase: I have munin on the box, and I also use a logger library to writ eto files [21:33] mc_greeny has joined the channel [21:33] augustl: nphase: I also wrote my own simple lib to manage pidfiles etc [21:33] nphase: augustl: did you write node munin plugins? [21:33] tylerstalder has joined the channel [21:34] augustl: nphase: not yet [21:34] augustl: it's not in full production yet tho [21:34] nphase: ah [21:34] nphase: i wonder if theres a node package that counts statistics [21:34] nphase: http requests etc [21:34] ianfarrell has joined the channel [21:34] nphase: req length, blah blah [21:35] sechrist_ has joined the channel [21:35] augustl: odd. Can't find anything in node.js to do a plain HTTP request :S [21:35] pt_tr has joined the channel [21:36] tjholowaychuk: augustl: require('http').request()? [21:36] tjholowaychuk: or https://github.com/visionmedia/superagent or https://github.com/mikeal/request [21:36] augustl: tjholowaychuk: that maintains a queue and only uses one connection for the same server ETC [21:37] augustl: tjholowaychuk: http://pastie.org/1813225 will log a connection object, then undefined 3 times [21:37] augustl: because of the queuing and reusing [21:38] tjholowaychuk: gotcha [21:38] eldios: soooo... if I want to render an array in jade.. [21:38] augustl: tjholowaychuk: is superagent a http.request wrapper? [21:38] eldios: is it better to iterate or use partial? [21:38] tjholowaychuk: augustl: yeah just started it, still missing tons [21:39] tjholowaychuk: eldios: not always [21:39] tjholowaychuk: eldios: for small snippets, or ones that you know you will not re-use just do "- each val in obj" or "- each val, key in obj" [21:39] tjholowaychuk: works for arrays / objects [21:40] eldios: tjholowaychuk, perfect .. as I suspected :) [21:41] eldios: now I only need to understand how to pass objects in express + jade [21:41] eldios: =) [21:41] a|i has joined the channel [21:41] a|i has joined the channel [21:43] sirkitree has joined the channel [21:44] varioust has joined the channel [21:44] eldios: okok.. found it =) [21:46] puffpio has joined the channel [21:49] Metapony has joined the channel [21:50] themiddleman_itv has joined the channel [21:50] techwraith has joined the channel [21:51] Corren has joined the channel [21:53] ardcore has joined the channel [21:53] ardcore has left the channel [21:56] ph^ has joined the channel [21:59] jaket has joined the channel [22:00] secoif has joined the channel [22:00] CIA-72: node: 03Fedor Indutny 07master * rc9b40da 10/ (6 files in 3 dirs): [22:00] CIA-72: node: OpenSSL NPN in node.js [22:00] CIA-72: node: closes #926. - http://bit.ly/fnNGnc [22:02] jlecker has joined the channel [22:02] jjmalina has joined the channel [22:05] pekim has joined the channel [22:05] hussamal has left the channel [22:07] Charuru has joined the channel [22:07] [algo] has joined the channel [22:07] MatthewS has joined the channel [22:08] [algo]: express: what's the difference app.configure(func) or func() ? [22:08] [algo]: I thought app.configure is kind of "if" check, but here is not the case.. [22:08] tjholowaychuk: [algo]: nothing really, it's just deferred until it's listening [22:08] tjholowaychuk: without an env that one applies to all envs [22:09] tjholowaychuk: however in the next release they will be invoked in order of definition [22:09] tjholowaychuk: which provides some additional flexibility [22:09] demastrie has joined the channel [22:09] [algo]: should I delay app.use until listening? [22:09] tjholowaychuk: nope [22:09] tjholowaychuk: doesnt matter [22:09] tjholowaychuk: to be honest [22:09] tjholowaychuk: but generally no [22:11] tjholowaychuk: [algo]: if you wanted you could basically replace configure() with switch (app.settings.env){ case 'production': } [22:11] tjholowaychuk: etc [22:12] pHcF has joined the channel [22:13] [algo]: tjholowaychuk: that would be same, but without deferring? [22:13] mikeal has joined the channel [22:13] tjholowaychuk: [algo]: sorry I lied, the others do not defer (for now) [22:13] tjholowaychuk: they will in the next version though [22:13] saikat has joined the channel [22:13] [algo]: in 0.3 ? [22:13] tjholowaychuk: actually [22:13] tjholowaychuk: maybe not [22:14] zakabird has joined the channel [22:14] leedo has joined the channel [22:15] Twelve-60`: anyone know of a queue system module to solve this problem? http://pastebin.com/ReNPtuBN [22:16] leedo has joined the channel [22:17] puffpio has joined the channel [22:17] dmcquay has joined the channel [22:17] ianfarrell has joined the channel [22:17] jjmalina has joined the channel [22:18] techwraith: Twelve-60: look into this lib - https://github.com/caolan/async [22:18] cloudhead2 has joined the channel [22:18] techwraith: Might have some things that you can use for that [22:18] catshirt has joined the channel [22:18] galaxywatcher has joined the channel [22:18] Twelve-60: true [22:19] techwraith: You could do a for loop that builds an array of functions to do and then use async.parallel() to get a callback when they're all done. [22:22] ghost has joined the channel [22:23] pyrotechnick has left the channel [22:26] stagas: Twelve-60: cnt = number_of_jobs, when doSomething() completes: --cnt || done() [22:28] newToRoR has joined the channel [22:28] [algo]: anyone used fibers ? [22:28] newToRoR has left the channel [22:29] [algo]: are they heavy ? [22:29] EyePulp: like, for staying regular? [22:29] [algo]: I thought about processing requests in fibers, each req -- fiber [22:29] [algo]: does that sound sane? [22:29] EyePulp: have you talked to your doctor? [22:30] cloudhead_: is there a way to get socket.io-node to use redis as the session-store? [22:31] bkozal has joined the channel [22:31] [algo]: cloudhead: yes [22:31] ckknight: [algo]: fibers or greenlets are just contexts that act as separate threads but run in a single-threaded manner. [22:32] [algo]: ckknight: true [22:32] ckknight: [algo]: these tend to be much faster than threads due to lack of context switching, but lack the ability to use multiple cores or CPUs. [22:32] [algo]: but do they incur much overhead? [22:32] [algo]: ckknight: I heard that fibers are implemented on top of real threads [22:32] ckknight: they also lack the ability to do work concurrently [22:32] ckknight: [algo]: false [22:32] [algo]: so they are not green threads [22:32] ckknight: yeah, that's false [22:33] ckknight: fibers are run in a single-threaded environment and can do its own context-switching in the VM rather than on the operating system [22:33] [algo]: ckknight: you mean, they actually don't use OS threads? [22:33] [algo]: I mean node.js fibers [22:33] ckknight: they use a single OS thread in a single process [22:33] ckknight: node.js doesn't use fibers, node.js uses an event pump. [22:33] mikeal has joined the channel [22:33] [algo]: I mean https://github.com/laverdet/node-fibers [22:33] ckknight: semantically, they act similarly, but there isn't context switching. [22:34] ckknight: ah [22:34] ckknight: that's C-level [22:34] ckknight: I don't ever plan on using anything like that [22:34] rpflo has joined the channel [22:34] [algo]: why not [22:34] [algo]: syntax is sweet [22:34] rpflo has joined the channel [22:34] ckknight: because I find it easier to stick to a standard async protocol and if you need to break execution, use process.nextTick [22:34] [algo]: fibers allow to write async code without callbacks [22:35] ckknight: feel free to use it in your code, I'm not gonna stop you [22:35] ckknight: but it's not for me [22:35] gzmask has left the channel [22:36] [algo]: ckknight ;) [22:36] ckknight: as far as efficiency is concerned, you should talk to laverdet [22:36] techwraith: [algo]: At the risk of sounding like someone in the python community - that's not really the node way of doing things [22:36] dshaw_ has joined the channel [22:36] EyePulp: heh [22:36] EyePulp: it's not nodeonic? [22:37] ckknight: nodesque [22:37] techwraith: lol [22:37] EyePulp: nodeish [22:37] tobias has joined the channel [22:37] tobias: erm [22:37] [algo]: techwraith: things chane [22:37] [algo]: techwraith: things change [22:37] dshaw_: tjholowaychuk: Any reason JSON is not UTF-8 if charset is not defined like html? https://github.com/visionmedia/express/blob/master/lib/response.js#L77 [22:37] tobias: npm update -> node.js:178 throws error [22:38] Guest87394: isaacs, what the heck? ;) [22:38] [algo]: techwraith: I didn't use fibers before either [22:38] tjholowaychuk: dshaw_: just not the default [22:38] isaacs: huh? [22:38] Tobsn: ill paste [22:38] isaacs: yes, please do [22:39] tschundeee has joined the channel [22:39] cloudhead_: [algo]: how? [22:39] [algo]: 75 meg for 1000 fibers [22:39] [algo]: hmm [22:39] Tobsn: isaacs, http://pastebin.com/X3LXX9Cy [22:39] [algo]: cloudhead_ [22:39] dshaw_: tjholowaychuk: Looking for a good way to set at the app level, rather than on every JSON response. [22:39] Tobsn: btw. it doesnt matter which command - it always shows that errpr [22:39] Tobsn: error [22:40] [algo]: var RedisStore = require('connect-redis'); [22:40] [algo]: var sessionStore = new RedisStore [22:40] [algo]: app.use(express.session({ store: sessionStore, secret: "v4gfkj4lkvjwkld" })) // must be before router [22:40] [algo]: cloudhead_: that was answer on your question [22:40] techwraith: [algo]: That works for express, but does that work for socket.io? [22:40] isaacs: Tobsn: ok... that's odd [22:40] cloudhead_: [algo]: I don't use connect or express though [22:40] tjholowaychuk: dshaw_: yeah that would be nice, no easy way to know I guess before the send() though [22:40] isaacs: Tobsn: npm -v [22:40] [algo]: I'm using express with socket.io [22:40] Tobsn: well guess what that returns [22:40] Tobsn: ;) [22:41] Tobsn: it was latest [22:41] Tobsn: installed it like two weeks ago [22:41] isaacs: once upon a time, i'm sure it was. [22:41] Tobsn: nah that box is fresh [22:41] isaacs: and 10 years ago, i was in my 20s. [22:41] dshaw_: tjholowaychuk: OK, thanks. [22:41] Tobsn: not older than 2 weeks [22:41] isaacs: what does npm -v say? [22:41] Tobsn: the same error [22:41] Tobsn: it doesnt matter what command, its always that node.js error [22:41] [algo]: and if you mean socket.io sessions [22:41] [algo]: internal ones [22:41] [algo]: then no, you can't store them in redis [22:41] Tobsn: does it has some sort of package.json? [22:42] [algo]: but you shouldn't need it [22:42] tjholowaychuk: dshaw_: we could just make it the default, doesn't really matter to me [22:42] [algo]: they are active connections [22:42] Tobsn: isaacs, "version" : "1.0.1rc1" [22:42] dshaw_: tjholowaychuk: OK, I'll patch. [22:42] isaacs: Tobsn: ok, that version is pretty old. [22:42] Tobsn: wtf? its too weeks old lol [22:42] isaacs: Tobsn: also, that's happening when it's loading nopt, which is super odd... [22:43] isaacs: Tobsn: yeah, if that was still latest, i'd be fired :) [22:43] isaacs: it would mean i wasn't working for the last 2 weeks :) [22:43] dshaw_: tjholowaychuk: Or you could. It's a one liner. It would be a world of win for me. [22:43] Tobsn: so how do i get rid of npm and update? [22:43] Tobsn: (never done that manually) [22:43] Tobsn: do i just delete the node_module? [22:43] isaacs: curl http://npmjs.org/install.sh | npm_install=rc sh [22:43] cloudhead_: [algo]: well I'm running multiple processes, that's why I need to [22:43] isaacs: nah, just clobber it. [22:43] tjholowaychuk: dshaw_: feel free to open an issue ill try and get to it soon [22:43] isaacs: it'll install over itself just fine [22:43] perezd: Kami_: u around? [22:43] [algo]: cloudhead_: and so what? a user connects to one of them [22:44] Kami_: perezd: yeah [22:44] Tobsn: node.js:333 [22:44] Tobsn: var cwd = process.cwd(); [22:44] Tobsn: ? [22:44] dshaw_: tjholowaychuk: K, great. [22:44] [algo]: you have multiple node.js with many socket.io session packs [22:44] Tobsn: thats npm * on the one i just installed [22:44] cloudhead_: [algo]: yea but there are times, especially with xhr that it'll reconnect to a different one, then socket.io will raise an error cause the sessid isn't found [22:44] isaacs: Tobsn: what node do you have? [22:44] perezd: Kami_: wondering if u have any insights on how to test something like SocketIO from within whiskey? It seems that whiskey hangs and timesout even when I kill the server, however maybe I am not killing it right [22:44] Tobsn: v0.5.0-pre [22:44] isaacs: Tobsn: oh! heh. cd into a dir that still exists. [22:44] Tobsn: dont tell me thats old now too [22:44] isaacs: Tobsn: well, that's undefined :) 0.5.0-pre is the dev version [22:44] [algo]: cloudhead_: make it sticky ? [22:45] isaacs: it's between 0 seconds and 4 weeks old [22:45] cloudhead_: [algo]: can't [22:45] Tobsn: so is it fixable? [22:45] isaacs: Tobsn: yes. cd ~ [22:45] Kami_: perezd: hm, how do you start & kill it? do you have any example code? [22:45] Tobsn: which folder? root? [22:45] cloudhead_: it's the load balancer [22:45] isaacs: Tobsn: it's failing to get the current working dir. usually that means you're in a dir that no longer exists. [22:45] Tobsn: aaah [22:45] Clooth has left the channel [22:45] Tobsn: oh yes [22:45] [algo]: cloudhead_ can't give cookie to client ? [22:45] Tobsn: youre right [22:45] Tobsn: lol [22:45] isaacs: can happen if you rm a dir that you're sitting in [22:45] Tobsn: i was in npm while reinstall [22:45] Tobsn: that probably removed it [22:45] Tobsn: and recreated [22:45] isaacs: yep [22:45] isaacs: new inode [22:45] Tobsn: yep [22:45] Tobsn: well [22:45] Tobsn: works now [22:46] isaacs: awesome :) [22:46] Tobsn: for next time, fix your shit [22:46] Tobsn: :P [22:46] [algo]: actually, cookie may not help [22:46] Tobsn: haha i guess [22:46] isaacs: a LOT of programs wll fail if the cwd is invalid [22:46] Tobsn: or something [22:46] Tobsn: ;) [22:46] [algo]: because of flashsocket [22:46] [algo]: flashsocket doesn't send cookies [22:46] Tobsn: man... npm is moving way to fast [22:46] isaacs: Tobsn: you can update, install, etc now? [22:46] Tobsn: that box is literally from not even two weeks ago [22:46] cloudhead_: [algo]: I can't pick what node instance you hit [22:46] isaacs: :) [22:46] SubStack: up to 1717 packages! [22:46] isaacs: after living in the node world for a while, this sort of feels normal. [22:46] gazumps has joined the channel [22:47] Tobsn: well -v returns version, update returns nothing (probably nothing to update) and ill install something random now [22:47] azend: great things happen when we put our minds together [22:47] isaacs: i don't know how other projects manage with such slow turnarounds [22:47] isaacs: you remove friction, and things go fast. [22:47] Tobsn: oh thats funny [22:47] Tobsn: npm ERR! Not compatible with your version of node/npm: memcache@0.1.1 [22:47] Tobsn: npm ERR! Required: {"node":">= 0.3"} [22:48] isaacs: Tobsn: yeah, that's odd. [22:48] isaacs: what version of node do you have? [22:48] Tobsn: well search and install works i guess [22:48] isaacs: oh, right 0.5.0-pre [22:48] Tobsn: yep [22:48] jtrudeau has joined the channel [22:48] Tobsn: npm ERR! Required: {"node":">= 0.3"} [22:48] Tobsn: npm ERR! Actual: {"npm":"1.0.1rc9","node":"v0.5.0-pre"} [22:48] boogyman has joined the channel [22:48] Gelegrodan: isaacs: maybe because of the string "-pre" in the version? [22:48] Tobsn: i bet there is an issue with the "-pre" [22:48] Tobsn: yep i bet [22:48] Tobsn: its a float check, wanna bet? :P [22:48] [algo]: cloudhead_: need to think out something [22:49] [algo]: there is really no way to use redis for internal socket.io sessions [22:49] isaacs: Tobsn: d'oh, it's the space. [22:49] Tobsn: hehe Gelegrodan, isaacs is now parsing his source like a barcode scanner [22:49] Tobsn: hehe [22:49] isaacs: >=0.3 works, >= 0.3 doesn't [22:49] [algo]: cloudhead_: how about to set a cookie when client first connects ? [22:49] Tobsn: ha funny [22:49] isaacs: semver bin ftw :) [22:49] [algo]: cloudhead_: load balancer would check it and send to right backend [22:49] Tobsn: is it a memcache bundle problem or npm? [22:50] Tobsn: if its the memcache guy ill report an issue cause i feel generious today :D [22:50] Tobsn: engines: { node: '>= 0.3' }, [22:50] cloudhead_: [algo]: it's an idea, but that would complicate the load balancer a lot [22:51] [algo]: maybe other guys give better advice :/ [22:51] cloudhead_: [algo]: I'd rather not touch it, and figure out a solution at the socket.io level [22:51] Tobsn: isaacs, engines: { node: '>= 0.3' }, should be engines: { node: ' >= 0.3' }, ? [22:51] [algo]: by the way, what's the point of keeping session ? [22:51] cloudhead_: [algo]: is the session-store synchronous in socket.io? [22:52] [algo]: can you reconnect and make a new session [22:52] isaacs: Tobsn: the space between = and 0 is throwing it off [22:52] isaacs: fixing now [22:52] Tobsn: ah okay [22:52] Gelegrodan: Tobsn: now u have to update again :) [22:52] murz has joined the channel [22:52] Tobsn: FUCK. [22:52] Tobsn: haha. [22:52] cloudhead_: [algo]: yea you can, but socket.io has to know what you're doing [22:52] [algo]: cloudhead_: sessions is array [22:52] [algo]: JS object [22:52] [algo]: of course it's sync [22:53] cloudhead_: [algo]: not sure how it works internally.. the issue is when a client think it's connected, but socket.io doesn't have the session [22:53] cloudhead_: [algo]: well that's bad design [22:53] [algo]: cloudhead_: I'd like to know the solution too [22:53] [algo]: how this is intended to work [22:53] cardona507 has joined the channel [22:53] Tobsn: you probably need to do an egrep on =\s on all packages infos [22:53] Tobsn: ;) [22:53] [algo]: cookie-based sticky sessions are usual solution [22:53] cloudhead_: [algo]: but depending on an in-process store is bad design in the first place [22:53] [algo]: but flashsockets don't send cookie! [22:54] [algo]: cloudhead_ actually, socket.io sessions is not a store [22:54] [algo]: they are connections [22:54] cloudhead_: [algo]: yea I know, but they are stored somewhere [22:54] [algo]: it is ok to store them in JS, they are JS objects [22:54] [algo]: they can't be serialized [22:54] timmywil_ has joined the channel [22:54] [algo]: it's not data [22:55] [algo]: open descriptors are bound to it [22:55] rauchg_ has joined the channel [22:55] timmywil has joined the channel [22:55] cloudhead_: [algo]: well then why are they refered to by ID, and passed by the client [22:55] Tobsn: wait a minute, is NODE_PATH /node or /node/lib/node_modules ? [22:55] cloudhead_: it doesn't make sense [22:55] [algo]: cloudhead_ ok you need to refer them somehow [22:56] rauchg_: hi [22:56] cloudhead_: rauchg_: ! [22:56] [algo]: I guess, reconnecting inside socket.io is a hidden process? [22:56] cloudhead_: help [22:56] cloudhead_: : D [22:56] [algo]: no [22:56] [algo]: sorry 3 am here [22:56] sivy has joined the channel [22:56] [algo]: I'm sleepy [22:56] [algo]: the task is interesting I'd talk about it tomorrow [22:56] cloudhead_: [algo]: was talking to rauchg_ [22:57] rauchg_: what's up [22:57] Tobsn: btw. is anyone here that uses zappa? [22:57] cloudhead_: rauchg_: trying to figure out how I can use socket.io accross multiple processes with no hiccups [22:57] bud has joined the channel [22:57] cloudhead_: seems like a problem especially with xhr-polling [22:58] rauchg_: cloudhead_: that's one of the 2 main feature planned for 0.7, what i'm announcing at nodeconf [22:58] rauchg_: however [22:58] cloudhead_: getting "sessionid not found" I presume because the processes are switching [22:58] rauchg_: if you want to scale it horizontally [22:58] rauchg_: you probably want to stickyloadbalancing [22:58] cloudhead_: ah sweet [22:58] cloudhead_: yea, that's ideal, but not always possible [22:58] [algo]: rauchg_: you mean cookies ? [22:58] rauchg_: so that sessions end up in the same boxes [22:58] cloudhead_: like, what if I have to restart a worker [22:58] sechrist has joined the channel [22:59] themiddleman_itv has joined the channel [22:59] rauchg_: cloudhead_: still, nodes should never persist data in memory associated with the client [22:59] rauchg_: so in that case [22:59] rauchg_: socket.io would re-negotiate the session id [23:00] rauchg_: and re-establish a connection [23:00] rauchg_: but obviously this is what i'm making 10x easier with 0.7 [23:00] cloudhead_: cool cool [23:00] [algo]: rauchg_: should we use 0.6.17 or go git ? [23:00] rauchg_: cloudhead_: regardless, many people have scaled it to multiple computers already [23:00] rauchg_: the biggest deployment that i heard of having 30 nodes [23:00] cloudhead_: rauchg_: how do you deal with the sessions though? [23:00] rauchg_: [algo]: for now 0.6.17 [23:00] cloudhead_: it's fine with websocket [23:00] brianmario has joined the channel [23:01] cloudhead_: but xhr seems to be unstable on multiple nodes [23:01] rauchg_: again, for right now you would need to either use sticky load balancing, or just one node [23:01] cloudhead_: ok [23:01] rauchg_: you can inspect the headers [23:01] Gelegrodan: rauchg_: any ETA? for pre 0.7 or something? put it in the developer branch? [23:01] rauchg_: potentially this week [23:02] Gelegrodan: nice [23:02] techwraith: rauchg_++ [23:02] v8bot: techwraith has given a beer to rauchg_. rauchg_ now has 1 beers. [23:02] [algo]: rauchg_: I have another minor problem right now. I solved it, but hope you saw it [23:02] [algo]: about flashsocket [23:02] rauchg_: [algo]: yep [23:02] rauchg_: i saw that [23:02] [algo]: I'm using express and socket.io [23:02] rauchg_: oh [23:02] mikeal has joined the channel [23:02] cloudhead_: rauchg_: ok gotcha [23:02] cloudhead_: thanks [23:02] rauchg_: i also have a module in the works [23:02] rauchg_: for great express socket.io integration [23:02] isaacs: Tobsn: ah, i'm splitting on \s before parsing incomplete version ranges, that's why [23:02] [algo]: flashsocket doesn't send cookies [23:02] [algo]: so actually I have to send sid in custom handshake [23:03] Tobsn: so you lose the actual number ha [23:03] isaacs: Tobsn: so ">= 0.3" gets turned into "0.3" which is ">=0.3.0 <0.4.0" [23:03] Tobsn: yeah that would do it [23:03] rauchg_: so hopefully people won't have to deal with any messaging backends explicitly [23:03] isaacs: no, i lose the >= [23:03] Tobsn: ha [23:03] rauchg_: and just connect a socket.io session to their express session [23:03] rauchg_: and do RPC or custom events from there [23:03] Tobsn: well, glad i fixed your problem while you fixed mine [23:03] Tobsn: ;) [23:03] [algo]: rauchg_: heh [23:03] [algo]: bright future [23:03] rauchg_: cloudhead_: [algo] the other big feature that took some of my time for 0.7 is multi-plexing [23:04] tjholowaychuk: rauchg_: nedis! [23:04] tjholowaychuk: haha [23:04] rauchg_: so that your apps can have "multiple sockets" going on [23:04] rauchg_: which is key for having people distribute socket.io enabled plugins [23:04] captain_morgan has joined the channel [23:04] [algo]: oh [23:04] cloudhead_: rauchg_: sounds good [23:05] Gelegrodan: rauchg_: any encyption? :) [23:07] eldios: https://gist.github.com/929937 [23:07] eldios: what's wrong in here? [23:07] Tobsn: hey tjholowaychuk, is there a express tutorial that actually explains real life usage of express? like loading classes dynamically, using templates, sessions and auth etc. [23:07] Tobsn: cause all i can find are useless tiny examples which are basically just javascript syntax in short [23:07] eldios: (topic: express+jade+partials used wrong) =) [23:07] harth has joined the channel [23:08] rauchg_: cloudhead_: will keep you posted [23:08] [algo]: g'night [23:08] cloudhead_: rauchg_: cool, thanks [23:08] tjholowaychuk: Tobsn: the examples in the repo are designed to be focused [23:09] Tobsn: hmm [23:10] stagas: eldios: you need to put res.render in the readdir callback [23:10] eldios: mm [23:10] Tobsn: i wish someone would open source something like e-resistable just to see how its done [23:10] eldios: why couldn't I assign the files_array to an "external" array of the callback [23:11] davidcoallier has joined the channel [23:11] eldios: (bear with the fact it's useless.. just to understand the mechanism beyond this) [23:11] dyer has joined the channel [23:11] newy_ has joined the channel [23:11] stagas: eldios: and use this syntax: res.render('root', { locals: { filesArray: filesArray } }) [23:11] Tobsn: its now 7 month ago since i "worked" with node/express and i literally forgot everything [23:12] techwraith: eidos: because the code doesn't execute from top to bottom. The callback gets executed after the render in this case [23:12] tjholowaychuk: stagas: "locals" is optional now [23:12] tjholowaychuk: stagas: res.render('root', { files: files }) [23:14] stagas: eldios: you can do that, but it's not going to fill out the var until it actually goes and reads the dir, which is going to happen in X ticks from then [23:14] Twelve-60: possible to print whats in the event loop? just want to debug and see whats still running... [23:14] eee_c has joined the channel [23:14] eldios: ah sure.. async timing.. :) sorry still have to get used to it :) [23:15] Tobsn: tjholowaychuk, would you run cluster over forever? [23:15] tjholowaychuk: Tobsn: monit [23:15] Tobsn: normally i would say monit too but i kinda start liking forever [23:15] tjholowaychuk: ideally it should just not die [23:16] rauchg_: yeah [23:16] rauchg_: it'd be pretty rare [23:16] rauchg_: for cluster to die [23:16] Tobsn: k [23:16] tjholowaychuk: Tobsn: it's just kinda flawed to check node with node haha [23:16] rauchg_: i could ask [23:16] tjholowaychuk: but [23:16] Tobsn: whats the best way to monitor it? port/pid? [23:16] rauchg_: then how are you gonna monitor monit [23:16] tjholowaychuk: whatever works [23:16] tjholowaychuk: yeah haha [23:16] rauchg_: ./monit ./monit ./monit ./cluster [23:16] rauchg_: but WAIT [23:16] tjholowaychuk: actually monit has it's own monitor i think [23:16] rauchg_: let's add another monit [23:16] Tobsn: well you monitor monit with upstart [23:16] Tobsn: da'h! [23:16] Tobsn: ;) [23:17] rauchg_: but yeah [23:17] tjholowaychuk: i still haevnt tried clusters of clusters [23:17] tjholowaychuk: im sure it will explode [23:17] rauchg_: a non-node monitor would be my choice in that case [23:17] rauchg_: so monit over cluster. [23:17] rauchg_: or simply `init` since the odds of cluster dying are low [23:18] Tobsn: i dont trust node.js enough [23:18] Tobsn: yet [23:18] tjholowaychuk: dont [23:18] tjholowaychuk: haha [23:18] Tobsn: yeah [23:18] demastrie has joined the channel [23:18] Twelve-60: possible to print whats in the event loop? just want to debug and see whats still running... [23:18] tjholowaychuk: the more plugins you use the more likely it is to break [23:18] tjholowaychuk: but cluster core is pretty solid now [23:18] stagas: tjholowaychuk: also found out res.render accepts a callback, really useful, didn't find it in the docs though [23:18] tjholowaychuk: stagas: yup! [23:18] tjholowaychuk: hmm [23:19] tjholowaychuk: might have to update that [23:19] tjholowaychuk: res.partial() as well [23:19] Tobsn: btw. about trusting things... whats with mongodb - since node.js basically runs _forever_ how do you make sure mongodb is still connected if you connect it on startup? do the generic libs have some sort of reconnect on query built inß [23:19] Tobsn: ? [23:19] rauchg_: Tobsn: [23:19] rauchg_: the -native driver has reconnection support [23:19] rauchg_: with buffering [23:19] jacobolus has joined the channel [23:19] Tobsn: perfect, thanks :) [23:19] rauchg_: i've never seen it disconnect though [23:19] Tobsn: never ever? [23:20] Tobsn: what if you kill mongodb and restart [23:20] Tobsn: should reconnect ha? [23:20] rauchg_: nop [23:20] rauchg_: if you run it in a cluster (replica set) [23:20] rauchg_: yes [23:20] rauchg_: that's how we run it [23:20] rauchg_: so if a node dies [23:20] rauchg_: it connects to a replicated one which becomes the master [23:20] Tobsn: cause you connect over the config server [23:20] Tobsn: or do you have a fallback? [23:21] rauchg_: the fallback logic is built into the driver [23:21] rauchg_: when it prepares a command [23:21] rauchg_: basically two things can happen [23:21] rauchg_: mongo returns a "not master" message [23:21] rauchg_: which happens if a master downgrades to slave [23:21] rauchg_: or [23:21] rauchg_: if the node is not responsive [23:21] Tobsn: but you still just put in one or many config servers [23:22] rauchg_: ie: network partitions [23:22] Tobsn: hmm [23:22] rauchg_: i don't know what you mean by config servers [23:22] Tobsn: well a replica pair has a config server? [23:22] Tobsn: or was that sharding [23:22] Tobsn: nevermind, its sharding [23:23] mike5w3c has joined the channel [23:23] rauchg_: yeah [23:23] rauchg_: replica pairs are obsolete [23:23] rauchg_: master/slave discouraged [23:23] rauchg_: replica sets are the way to go [23:23] Tobsn: yeah, when they started on that i was still at 1.4 or something [23:24] mike5w3c has joined the channel [23:24] Tobsn: and still translating stuff in the docu for 1.2 stuff [23:24] Tobsn: the docu becomes a mess slowly [23:24] reid has joined the channel [23:24] rauchg_: documentation is not great, agreed [23:24] Tobsn: only the english one is up to date [23:24] rauchg_: i'm going to write a blog post about how we set up our infrastructure [23:24] Tobsn: and not even all of it [23:24] rauchg_: because most of the examples on the net for replica sets are process-based [23:24] rauchg_: and there're some "gotchas" [23:25] Tobsn: yeah, if its latest how mongodb handles stuff, thats a good idea [23:25] stagas: tjholowaychuk: also another issue I had, there's an app.locals setter but I couldn't do var foo = app.local('foo') and it wasn't in res.local('foo') either [23:25] rauchg_: stagas: as a getter ? [23:25] tjholowaychuk: stagas: hmm let me check [23:25] stagas: tjholowaychuk: so I ended up inserting a middleware with a res.locals() setter [23:25] stagas: rauchg_: yes [23:25] Tobsn: i just hope they changed a lot... when i tried out replica sets and sharding in dec. 2009 it sucked a lot. like mysql was faster looking up INT's than mongodb with sharding [23:26] tjholowaychuk: stagas: oh wait, nvm, I get it, no it wont "get" any local [23:26] tjholowaychuk: only res._locals [23:26] tjholowaychuk: specifically [23:26] tjholowaychuk: for now at least [23:26] tjholowaychuk: they are not merged until the view is rendered [23:27] xandrews has joined the channel [23:27] tjholowaychuk: and a bunch of union/clone/merge crap goes on to make sure we do not mutate them for subsequent reqs etc [23:27] stagas: that's ok, but there isn't an app.local() getter [23:27] tjholowaychuk: maybe not, ill have to look [23:27] tjholowaychuk: nope only app.locals() [23:28] tjholowaychuk: easy to add though [23:28] ManishMaheshwari has joined the channel [23:28] rauchg_: Tobsn: mongodb is completely different now from 09 [23:28] stagas: :) [23:29] rauchg_: Tobsn: a DBA from facebook recently run benchmarks against mysql [23:29] rauchg_: mongodb winning [23:29] duncanbeevers: rauchg_: link? [23:29] rauchg_: but again, direct comparisons with mysql are not fair [23:29] azeroth_ has joined the channel [23:29] stagas: I did a quite complex express app this weekend and ran into a lot of stuff [23:29] rauchg_: http://mysqlha.blogspot.com/2010/09/mysql-versus-mongodb-yet-another-silly.html [23:29] rauchg_: and follow up [23:29] rauchg_: http://mysqlha.blogspot.com/2010/09/oh-no-mongodb-can-be-fast-for-key-value.html [23:30] duncanbeevers: Danke [23:30] tjholowaychuk: stagas: no worries just let me know if you have suggestions, we can discuss feature requests in the issue queue [23:31] TomsB: I'm writing to stream.write() [23:31] TomsB: and gettign this error: [23:31] TomsB: Error: Socket.end() called already; cannot write. [23:31] TomsB: Before wrrite I'm checking for stream.writable and readyState (which is open) [23:32] TomsB: Latest node version. Why I am getting this error and how to fix it? [23:32] daskog has joined the channel [23:32] stagas: tjholowaychuk: one particular was app.use(route, middleware), where route can't be other than a literal string, so the only workaround is to app.use(express.router(...)) to get req.params in there [23:32] ManishMaheshwari has joined the channel [23:32] tjholowaychuk: stagas: yeah, it's not really a "route" [23:32] isaacs: Tobsn: pushed a more recent semver. you can wait for another npm release, or hot fix it like this: npm explore npm -g; npm install semver; exit [23:32] tjholowaychuk: in the same sense of app.get() etc at least [23:33] ManishMaheshwari: anyone a fan of HBase ? [23:33] tjholowaychuk: stagas: think of it more as a "mount point" [23:33] mike5w3c has joined the channel [23:35] constantx_ has joined the channel [23:35] llkazu has joined the channel [23:35] llkazu: SubStack, why did you remove dnode.sync? [23:36] SubStack: because I never used it [23:36] briancray has left the channel [23:36] matschaffer has joined the channel [23:36] SubStack: and it's easy to hack up yourself if you want something like it [23:37] node has joined the channel [23:37] ManishMaheshwari has joined the channel [23:37] llkazu: hmm, alright. [23:37] llkazu: sooo how does one hack it up? :-p [23:37] llkazu: (basically on the client i want to do: v = remote.get(something);) [23:38] SubStack: you can't do that [23:38] Tobsn: isaacs, k - fixed ;) [23:38] alessio_alexAFK has joined the channel [23:38] llkazu: SubStack, any way to get something close to that? [23:38] SubStack: llkazu: remote calls are fundamentally asynchronous so you've got to get the result in a callback [23:39] SubStack: remote.get(something, function (v) { /* use v in here */ }) [23:39] llkazu: right [23:39] stagas: tjholowaychuk: I've found myself in quite a few cases where I wanted to use app.use like app.get, what's the difference anyway? :) I end up using .router though it's ok I'd really like that feature! [23:39] Tobsn: isaacs, yep - that fixed it [23:39] robmason has joined the channel [23:39] stagas: tjholowaychuk: should I open an issue? [23:39] tjholowaychuk: stagas: the difference is that app.use() re-writes the url, so the server "mounted" at that position, is in its own little world [23:40] SubStack: llkazu: sync() just turned synchronous functions into asynchronous ones [23:40] SubStack: going the other way requires some very nefarious hackery [23:41] llkazu: blergh. [23:41] stagas: tjholowaychuk: I don't understand what you're saying :) [23:41] tjholowaychuk: nvm :p [23:41] llkazu: I'm trying to implement a cache server in node, and wanted to use dnode for the communication between server and client. [23:41] llkazu: doing remote.get(someval) then getting it returned very much later, unfortunately isn't very helpful :-( [23:41] SubStack: all the standard flow control tricks apply nicely to dnode apps [23:42] mike5w3c_ has joined the channel [23:43] SubStack: llkazu: you've got to write everything in continuation passing style that bridges the network gap [23:43] SubStack: takes some getting used to [23:43] SubStack: but it is the node way™ [23:43] llkazu: that just seems… overly complex for something as simple as "I'm a web app, and i want this value from the cache for me to use over in this template" [23:43] seivan has joined the channel [23:44] Tobsn: is there an activerecord lib for mongo? [23:44] techwraith: Tobsn: you mean an ORM? [23:44] techwraith: Look into mongoose [23:45] Tobsn: k, thx [23:45] techwraith: http://mongoosejs.com [23:45] sako has joined the channel [23:45] Tobsn: oh that is mongoose [23:45] sako: hey guys so it seems socket.io is a must with node.js right? [23:45] Tobsn: for some reason i always think its that http interface [23:46] SubStack: llkazu: I don't think it's necessarily more complex, it just changes how you need to structure your program [23:46] sako: i'm trying to understand the need for socket.io... looks like it makes it easier to send to different browsers all the same [23:46] techwraith: sako: It allows for real time communication (both ways) between the server and the clients [23:46] Opaque has joined the channel [23:47] techwraith: sako: So you can push things down to the client(s) without having to write polling into them [23:47] Tobsn: techwraith, is there a way to put in a validation in save's? like validateField() [23:47] ManishMaheshwari has joined the channel [23:47] llkazu: SubStack, you should provide a way to set a response timeout for dnode calls. "if response doesn't come back in 100ms, execute this function" or something [23:47] sako: oh nice [23:47] techwraith: Tobsn: Yep [23:47] SubStack: sako: with standard ajax you need to poll the server all the time for updates or else engage in other hackery [23:47] Tobsn: to check before saves on specific collections [23:47] sako: techwraith: would i use socket.io alongside something like express.js? [23:47] dmcquay has joined the channel [23:47] techwraith: Tobsn: http://mongoosejs.com/docs/validation.html [23:47] llkazu: sako, you /could. [23:47] zivester has joined the channel [23:48] Tobsn: thanks! :) [23:48] sako: they have nothing to do with each other do they? i guess connect.js and socket.io are similar right? [23:48] techwraith: sako, you could :) [23:48] malkomalko has joined the channel [23:48] llkazu: sako, the way i use socket.io is by way of dnode. [23:48] llkazu: sakdo, https://github.com/substack/dnode [23:48] llkazu: *sako [23:48] techwraith: sako, nope, connect is a middleware framework [23:48] NuckingFuts has joined the channel [23:48] SubStack: llkazu: I had something like that in the previous dnode release [23:48] SubStack: but now socket.io has a heartbeat baked in [23:48] Tobsn: techwraith, one last question: DBRef? [23:48] SubStack: so I plan to hook into socket.io's thing however it works [23:48] techwraith: Tobsn: What do you mean? [23:48] Tobsn: if DBRef is supported [23:49] NuckingFuts: ... Mongo has no case-insensitive search :| [23:49] llkazu: SubStack, hmm, ok. [23:49] NuckingFuts: Goddamnit. [23:49] Tobsn: you know collection blog posts -> DBRef -> comments [23:49] techwraith: Tobsn: I yes [23:49] sako: hmmm so where does node.js shine over otherr languages/frameworks? [23:49] llkazu: NuckingFuts, http://stackoverflow.com/questions/1863399/mongodb-is-it-possible-to-make-a-case-insensitive-query [23:49] sako: in what situation.. [23:49] llkazu: :-p [23:49] techwraith: Tobsn: I'm pretty sure [23:49] SubStack: llkazu: in the meantime you can setTimeout and then clearTimeout in the response [23:49] eb4890 has joined the channel [23:49] SubStack: for some specific cases where you want timeouts [23:49] coreb: anyone tried out faye? [23:50] llkazu: SubStack, true. not a bad idea. [23:50] NuckingFuts: llkazu: Aye, but I don't want any huge performance hits :/ [23:50] matschaffer has joined the channel [23:50] NuckingFuts: This looks promising: https://jira.mongodb.org/browse/SERVER-90 [23:50] llkazu: NuckingFuts, then i'd suggest storing a lowercase version of your field and doing a query against that. :-p [23:50] rburhum has joined the channel [23:51] azeroth_ has joined the channel [23:51] NuckingFuts: llkazu: I'm gonna see if I can work the thing they say "you cal always use" in that feature request :/ [23:51] tsesame has joined the channel [23:51] llkazu: lol [23:51] pifantastic has joined the channel [23:52] sako: any really good getting started type resource out htere? [23:52] sako: i found howtonode.org looks ok... anything better i am missing? [23:52] techwraith: Tobsn: Looks like it doesn't support it out of the box, but you could always do {user: user._id} [23:52] Tobsn: and than fetch it manually? [23:53] Tobsn: could i extend class comments to do a after query event and add the data? [23:53] techwraith: Tobsn: Yeah, or you could embed the object instead of putting it in it's own collection [23:53] Tobsn: hmm... [23:53] Tobsn: yeah, its just an example what im using, how i use it i actually need DBRef or at least a reference [23:54] techwraith: Tobsn: Then yeah, use an after method to save it and keep them in sync [23:55] techwraith: Tobsn: http://mongoosejs.com/docs/middleware.html [23:55] baudehlo1 has joined the channel [23:55] deepthawtz has joined the channel [23:55] Tobsn: but its only .pre hmm [23:56] techwraith: But you have all the data at that point [23:56] NuckingFuts: lol @ Mongoose [23:56] Tobsn: oh yeah, right cause its a query at that point [23:56] captain_morgan has joined the channel [23:56] Tobsn: NuckingFuts? [23:57] NuckingFuts: Tobsn: I tried Mongoose, then ditched it after a week of constant errors and extreme hardship lol [23:57] NuckingFuts: No I just use Mongo-native [23:57] NuckingFuts: *now [23:57] Tobsn: hmm [23:57] techwraith: NuckingFuts: What issues were you having? [23:57] techwraith: It was pretty simple for me :) [23:58] NuckingFuts: techwraith: God I don't remember any more. I got a schema together, but could not handle writing to the database or querying or anything, and I just gave up after a week of being unable to find help XD [23:58] techwraith: Tobsn: Also, if you need an after, just do it in .save()'s callback [23:58] techwraith: NuckingFuts: When was this? It's gotten 100% better in the past few months [23:58] NuckingFuts: techwraith: This was like... a month and a half ago? [23:59] duncanbeevers: Should only take you half a week now. [23:59] puffpio has joined the channel [23:59] Tobsn: even for a query? [23:59] dguttman_ has joined the channel [23:59] Emmanuel__ has joined the channel [23:59] techwraith: This is confusing to me, I've never had an issue with Mongoose >= 1.0