[00:00] polotek: if you have the source for npm you should be able to run it like this [00:00] polotek: node cli.js ls [00:01] polotek: where the cli.js file is in the root of the source dir [00:02] polotek: actually do this [00:02] polotek: node cli.js config list [00:02] Metapony: polotek: Thanks for the help... I don't think I have cli.js in a path anywhere... I can run node, but can't do a 'where cli.js to find it. (though I see it came with the npm git when I grabbed it...) [00:02] polotek: that will give you lots of info [00:02] polotek: Metapony: yes use the one in the git checkout [00:02] Metapony: ...and node cli.js gives an error [00:03] davidwalsh has joined the channel [00:03] Metapony: cd npm [00:03] Metapony: er... [00:03] polotek: yes you should be in the npm folder :) [00:04] charlenopires has joined the channel [00:07] papandreou: mikeal: Sorry for spooking you, it does work. I had to change noBuffer to onResponse in TWO places, duh :) [00:07] mikeal: hehe [00:08] jacobolus has joined the channel [00:08] MikhX has joined the channel [00:08] papandreou: mikeal: Thx for you fine work, looking forward to the 0.4.x update :) [00:09] mikeal: thanks [00:10] mikeal: ryah_: https://github.com/mikeal/node/commit/4129f8f5dc30ac98e5766b17174717b2891db44b [00:10] mikeal: expose http agent :) [00:12] polotek: mikeal: you always say you don't like testing frameworks [00:12] polotek: what do you do? [00:12] mikeal: just write node scripts [00:12] mikeal: that are self executing and throw on error [00:12] mikeal: i use the assert module [00:13] mikeal: no framework [00:13] polotek: yeah but what about an async harness [00:14] papandreou: mikeal: I used to do the same, but just picked up vows. Very slick. [00:14] polotek: node has it's tests really finely divided so the files are small [00:14] pdelgallego has joined the channel [00:14] polotek: but I've got one file with a bunch of tests that do async stuff [00:14] polotek: I need to corral them, know which ones fail, etc [00:14] polotek: I like vows as an idea [00:14] mikeal: i can't stand vows [00:15] mikeal: so much typing [00:15] mikeal: and dsl craziness [00:15] polotek: but I kind of agree with mikeal that it makes test code harder to read [00:15] mikeal: polotek: i pass and end function to each test function [00:15] mikeal: s/and/an [00:15] mikeal: function test(end) { ….. } [00:15] mikeal: var tests = [test] [00:16] polotek: that's what I'm doing now [00:16] davidascher has joined the channel [00:16] polotek: writing an async harness in my test file [00:16] polotek: * sigh * [00:16] arpegius has joined the channel [00:16] polotek: was hoping there was a better idea [00:16] mikeal: it's not much code [00:16] mikeal: and it make it readable and obvious [00:17] polotek: well it's a little different for me [00:17] polotek: I'm writing tests for evented-twitter [00:17] polotek: so I've got like 40 test calls to make to the api [00:17] polotek: I need to space them out [00:17] polotek: or I get banned :) [00:18] altamic has joined the channel [00:18] mikeal: oh i see [00:18] mikeal: that's easy enough [00:19] darklajid has joined the channel [00:19] mikeal: in the end function that shifts off the next test from the array [00:19] mikeal: stick the call in a setTimeout [00:19] stride: or refactor your library to support throttling.. ;) [00:19] polotek: yeah, I'm almost done [00:19] polotek: not using an end function yet [00:19] russ_nyc has joined the channel [00:19] polotek: not concerned with when they end [00:19] polotek: the harness just takes a batch size and an interval [00:19] darklajid: Hi. This is probably very obvious to others, but I'm just starting and my search words fail me for this: What's a good way to organize code here? All samples (looking at express right now) write everything into one file. How would you break that up? [00:20] Ari-Ugwu has joined the channel [00:20] mikeal: i only do that so that they dont' all run in parallel [00:20] polotek: to space the tests out [00:20] mikeal: if they run in parallel then it's hard to tell which one causes an exception if it off the event system [00:20] stride: darklajid: seperate commonjs module files [00:20] polotek: mikeal: yeah I know. I'm using the function name as an indicator [00:20] mikeal: at least it is until we get EventSource [00:20] darklajid: stride: And then require() them in the central app? [00:20] stride: darklajid: [00:20] stride: yes [00:20] polotek: mikeal: is event source still happening? [00:20] stride: node-faq: show masteringnode to darklajid [00:20] node-faq: darklajid: masteringnode is "http://visionmedia.github.com/masteringnode/" [00:21] polotek: last I heard it was "infeasible" [00:21] stride: there's a chapter on modules in that e-book I think [00:21] polotek: I would loooove to have event source [00:21] polotek: whoa node-faq is a new to me [00:21] polotek: node-faq: help [00:21] darklajid: stride: Thanks, looking at that now [00:21] polotek: ha, opens a private message [00:21] polotek: slick [00:21] stride: it does? [00:22] polotek: it did for me [00:22] polotek: node-faq list [00:22] papandreou: darklajid: I'd create separate Express servers in separate files, then mount them into my "main" server using app.use('/the/mount/point', require("./modulecontainingserver")); [00:22] polotek: hmm, odd [00:23] polotek: all my responses from node-faq are coming in a private message [00:23] stride: polotek: just didn't remember. it doesn't know much stuff yet. and will probably break when someone calls the list command once it learns more than what fits in a single row on irc.. [00:23] mikeal: it's happening eventually, it's just on the back burner behind TLC and HTTPS [00:23] mikeal: er TLS [00:23] papandreou: darklajid: So that the modules on disc mirror your urls [00:23] stride: polotek: yeah, only show,learn and forget have public results iirc [00:23] polotek: mikeal: freudian slip [00:23] mikeal: haha [00:24] polotek: stride: when I send it commands in the pm I get nothing [00:24] stride: polotek: prefix them with the bot's nick, node-faq list [00:24] aklt has joined the channel [00:25] perlmonkey2: How would you do authentication during a dnode call? Read the cookie sessionid and pass it back? [00:25] russ_nyc has joined the channel [00:25] darklajid: papandreou: Now that makes a lot of sense for my case here, thanks. [00:25] papandreou: darklajid: np :) [00:26] o_o has joined the channel [00:27] darklajid: papandreou: You know of any github project that makes use of that? Reading the express docs on app.use looking for this case now, but a sample would be - neat. [00:27] papandreou: darklajid: A nice touch is that "/the/mount/point" has been stripped from the req.url that the mounted server sees, so you repeat yourself less, and it's easy to move subsystems around. [00:27] papandreou: darklajid: Not off the top of my head, but I'm using that scheme at work. [00:28] abraham has joined the channel [00:28] spetrea has joined the channel [00:31] darklajid: papandreou: Ah, so app.use('/user', require('./usermodule.js') would lead to a module that still only needs to handle / and anything _below_ user, ignoring the prefix? Have to try it I guess, cannot find that right away on expressjs.com so far. [00:31] softdrink1: "A woman came up to me and said: 'I'd like to poison your mind with wrong ideas that appeal to you though I am not unkind.'." [00:33] papandreou: darklajid: Yes, exactly. There's a little info about it under "app.mounted(fn)"... Well hidden. [00:34] SubStack: perlmonkey2: you can do conn.stream.socketio.request.headers.cookie to get the session cookie [00:34] shaunau has joined the channel [00:34] polotek: mikeal: so what do you think about the differences between the request api and the new node http api? [00:34] inaseer has joined the channel [00:35] mikeal: i like the new node api [00:35] perlmonkey2: SubStack: so this is happening on top of the express or the server? [00:35] mikeal: it's terser [00:35] stride: there's a new http api? [00:35] mikeal: and it does pooling for you, which is a hard problem to solve [00:35] russ_nyc has joined the channel [00:35] inaseer has left the channel [00:35] mikeal: it's closer to the request API, which makes writing request easier after i redo it for the new api [00:36] mikeal: most of the what request does isn't just providing a nice API [00:36] mikeal: there's a lot of high level logic, like redirect following, error handling, response buffer, etc [00:36] aconbere has joined the channel [00:37] SubStack: perlmonkey2: just set a cookie and read it with that trick [00:37] mikeal: authentication handing, host header setting, support for http proxies [00:37] mikeal: tons of stuff [00:37] mikeal: and that stuff shouldn't be in node core [00:37] mikeal: the more i think about it [00:37] mikeal: you don't *always* want it [00:37] mikeal: just most of the time [00:37] mikeal: and core shouldn't enforce features on you [00:37] perlmonkey2: SubStack: right on, thanks. Guess I need to read a bunch more. [00:38] stephank has joined the channel [00:39] polotek: mikeal: yeah I agree [00:39] tapwater has joined the channel [00:39] polotek: so basically I'm refactoring my twitter lib heavily [00:39] polotek: it's gonna use request by default [00:40] mikeal: that's how my twitter library worked [00:40] boaz has joined the channel [00:40] polotek: but there are instances where you have to do some api adapting [00:40] polotek: the node-oauth likes to do it's own thing [00:40] mikeal: i never got oauth working [00:41] mikeal: because it was such a pain in the ass [00:41] polotek: it's much better now [00:41] polotek: only it wants you to make calls through it's functions [00:41] mikeal: polotek: did you see my library? [00:41] mikeal: it was pretty much only an eventemitter around the streaming api [00:41] polotek: mikeal: yeah I started with it for inspiration [00:42] mikeal: cool, so you have the streaming api still working? [00:42] polotek: mikeal: yeah, the streaming api is easy because it doesn't require oauth [00:42] polotek: just tweak some headers, add keep-alive and go [00:43] polotek: most of the work I'm doing there is abstracting the response parser [00:43] mikeal: nice [00:43] mikeal: you should have forked tweetstream [00:43] mikeal: cause i'm not maintaining it :) [00:43] mikeal: i got lazy [00:43] polotek: I want to make it possible to use any parser you want [00:44] polotek: evented-twitter was my first fully formed module for node [00:44] sh1mmer has joined the channel [00:44] polotek: I wrote it from the bottom up, very educational [00:45] gattuso has joined the channel [00:46] darklajid: papandreou: Right, that kindof, nearly, sortof scratches the feature. By accident.. ;) [00:57] sh1mmer: ryah_: [00:57] sh1mmer: you around? [00:57] darklajid: Seriously? The characters per minute rate in Textmate in most screencasts are impressive, but weird for watching.. [01:00] sh1mmer: oh man [01:00] sh1mmer: I hate stupid mistakes [01:00] Wizek_ has joined the channel [01:00] sh1mmer: I'm so dumb [01:01] [[zz]] has joined the channel [01:04] joshfng has joined the channel [01:06] darklajid: Hrmpf.. npm help list tells me that I can just search for packages, and "helpfully" gives "installed" and "stable" as examples for queries. Fails to list all possible values though.. [01:07] boaz has joined the channel [01:07] darklajid: And it seems it's really just searching the descriptions for that string..? [01:08] sh1mmer: what are you trying to do? [01:08] sonnym has joined the channel [01:08] sh1mmer: isaac isn't around this weekend, so I would just file an issue or send mail to the list [01:09] polotek: darklajid: http://search.npmjs.org/ [01:10] mikeal: dammit [01:10] kuhrt has joined the channel [01:10] jacobolus has joined the channel [01:12] oncenull has joined the channel [01:13] dthompson has joined the channel [01:13] boaz has joined the channel [01:14] Wizek has joined the channel [01:15] darklajid: sh1mmer: I tried to look for a way to grab express 2.0 (beta). Seems like that's not possible so far. But the help page is just - crap. It just lists "You can 'list installed' or 'list stable'". Not more. Trying npm list blaa seems to indicate that the parameter is used as a keyword (or at least most of the time, not sure why installed is special. What's special as well?) [01:15] mikeal: isaacs [01:15] mikeal: damn, he's not around [01:15] sh1mmer: mikeal: told you [01:15] sh1mmer: mikeal: you shouldn't contradict me :P [01:15] mikeal: haha [01:17] polotek: is there any info on how to use the new node debugger? [01:17] sh1mmer: darklajid: did it occur to you that maybe TJ hasn't made available via NPM? [01:17] sh1mmer: darklajid: npm ls express shows all the possible express packages [01:18] polotek: darklajid: npm list is a command that takes search terms [01:18] polotek: and it searches the registry [01:18] polotek: but it also takes status terms like "active" to see all active packages [01:18] polotek: or "installed" to see all installed packages [01:18] darklajid: sh1mmer: I'm sure that's the case. During my search I just noticed that there are "magic" options to ls and wanted to see if there's something like "unstable", "beta" or similar. [01:19] sh1mmer: darklajid: list shows all version [01:19] sh1mmer: the keywords are just shortcuts for particular things [01:19] blueadept2 has joined the channel [01:19] sh1mmer: but you can still install @foo.bar.baz version [01:20] darklajid: sh1mmer: So everything I type is just a file to ls on it's own? Good to know [01:20] darklajid: filter, not file.. [01:21] blueadept has joined the channel [01:21] darklajid: I wasn't sure, thinking of gem for example (having local and remote) and couldn't figure it out so far. [01:25] dekz has joined the channel [01:25] sudoer has joined the channel [01:25] boaz has joined the channel [01:25] altamic has joined the channel [01:26] dekz: Hi, new to node and npm (and coffeescript), I've created a coffeescript file which exports itself like "exports = module.exports = class mpd", I've then created the npm install which installs correctly, but i don't seem to be able to require it and use it [01:26] sudoer has joined the channel [01:26] shaunau has joined the channel [01:26] dekz: it's installed to /usr/local/lib/node/.npm/mpd/0.0.1/package/ [01:27] statim has joined the channel [01:28] djacobs7 has joined the channel [01:28] dekz: anything I might be overlooking? [01:28] jashkenas has joined the channel [01:29] polotek: mikeal: what's the context of the request callbacks? [01:29] mikeal: you mean `this`? [01:30] polotek: yeah [01:30] polotek: dekz: what do you get when you require it? [01:31] dekz: Error: Cannot find module 'mpd' [01:31] polotek: dekz: what does npm say? [01:31] polotek: npm ls mpd [01:31] polotek: ah, dekz it's probably not activated [01:32] dekz: mpd@0.0.1 active installed [01:32] polotek: is there an "active" symlink in the npm folder? [01:32] polotek: hmmm [01:32] polotek: and you can require other stuff that has been installed with npm? [01:32] dekz: yep [01:32] breccan has joined the channel [01:32] dekz: I installed it from npm install . in the folder [01:32] dekz: I don;t think that should be a problem? [01:33] polotek: no that's fine [01:33] polotek: in your example above what is "class mpd" [01:33] polotek: that's not valid [01:33] pyrotechnick has joined the channel [01:33] dekz: hello pyrotechnick [01:33] polotek: can you run your module with node mpd.js [01:34] polotek: obviously put the path to wherever the file actually is [01:34] polotek: or go to that dir [01:35] davidascher has joined the channel [01:35] dekz: it's in coffeescript, but yes it has been functional before attempting to package it [01:37] dekz: http://pastie.org/private/oyxlw40pfhwgaq7qgvdaw [01:37] Tidwell: Anyone know of a way to write this line without using eval? [01:38] Tidwell: var newObject = eval('new '+variableStoringObjectName+'(arg)'); [01:39] aconbere has joined the channel [01:42] boaz has joined the channel [01:44] jacobrelkin has joined the channel [01:46] polotek: dekz: not sure, I don't work with coffee script that much [01:46] polotek: or at all really :) [01:46] polotek: from the error it just looks like it's not finding mdp.coffee [01:46] polotek: which sounds like a problem with the coffeescript stuff [01:46] polotek: node doesn't look for .coffee extensions by default [01:48] Qbix1 has joined the channel [01:48] Wyverald has joined the channel [01:52] dekz: ah it has to be compiled to js first, i see [01:53] tmpvar has joined the channel [02:00] polotek: jashkenas: can you help dekz? [02:01] dekz: polotek: it's all good now :) [02:01] polotek: cheers [02:01] dekz: cheers [02:02] xonecas: does anyone know of a node js driver for ffmpeg? [02:04] Metapony has joined the channel [02:04] Metapony: I'm still having a problem and I've gone over things twice now... I caan get node installed, but I'm not sure if npm is getting installed correctly. (I've tried the one-line install and git...) should I expect to be able to do "npm ls" from my bash shell??? [02:06] dekz: yes [02:06] dekz: it should be installed into the equivalent of /usr/local/bin [02:06] tim_smart: I install npm into my home [02:07] dekz: reload terminal to update the path? [02:09] Metapony: reloading didn't work. I'm using cygwin... I'm pretty sure node's in there ok... I can't do a ./configure --prefix=~/local on the npm package like I did with node... [02:09] dspree has joined the channel [02:11] jashkenas: dekz: yep -- if you're distributing an NPM module, please compile it to JS first ... and even npmignore the "src" directory. [02:11] dspree has joined the channel [02:13] dspree has joined the channel [02:15] dspree has joined the channel [02:16] polotek: Metapony: did you try running the cli.js file as I suggested? [02:16] dspree has joined the channel [02:16] dspree has joined the channel [02:17] bingomanatee: I'm working on a basic MVC extension from the example in express - integrating with mongoDb and my forms library. [02:17] Metapony: polotek: what was the command? [02:17] bingomanatee: Metaphony: cygwin + node is inherently problematic. [02:17] bingomanatee: You are really pushing yourself uphill. [02:18] polotek: if you're in your npm src directory there should be a cli.js file [02:18] polotek: that's the module that powers the npm script [02:18] polotek: so you can run npm by doing this [02:18] polotek: node cli.js [02:19] desaiu has joined the channel [02:19] mike5w3c has joined the channel [02:19] polotek: if that works then try node cli.js config list [02:19] dspree has joined the channel [02:19] sivy has joined the channel [02:19] polotek: that should print out all your npm environment variables [02:19] Metapony: polotek: I've tried "node cli.js ls" and "node cli config list" and a lot more, getting no output... [02:20] dspree has joined the channel [02:20] polotek: Metapony: yeah that probably means it's well borked. sorry, cygwin is complicated [02:21] dspree has joined the channel [02:21] Metapony: thanks, off to google [02:21] skm has joined the channel [02:22] davidascher has joined the channel [02:22] dspree has joined the channel [02:23] skm has joined the channel [02:23] dspree has joined the channel [02:23] sechrist has joined the channel [02:24] tmpvar: happy saturday [02:25] dspree has joined the channel [02:25] temp02 has joined the channel [02:25] russ_nyc has joined the channel [02:25] russ_nyc has left the channel [02:26] dspree has joined the channel [02:26] sechrist has joined the channel [02:26] Figaroo has joined the channel [02:27] dspree has joined the channel [02:27] Figaroo: Where's the official beginners tutorial to express? [02:27] aaronblohowiak: Figaroo: no such thing [02:27] sechrist has joined the channel [02:27] polotek: haha beginners tutorial [02:27] polotek: tha'ts funny [02:28] skm_ has joined the channel [02:28] aaronblohowiak: TJ is fantastic at a lot of things, tutorials and docs are not them [02:28] polotek: Figaroo: checkout the readme and the examples and tests [02:28] dspree has joined the channel [02:28] darklajid: How would I do something like this in jade: !--[if !IE 7]> [02:28] dspree has joined the channel [02:28] aaronblohowiak: Figaroo: if you read the whole page here: http://expressjs.com/guide.html you should have a good understanding [02:28] darklajid: is there a way to include stuff as-is? [02:29] aaronblohowiak: darklajid: you could make a custom filter or do | [02:29] polotek: yeah the pipe is what I was thinking of [02:29] Metapony: My problem - no output using npm on cygwin seems to be cover here https://github.com/isaacs/npm/issues/issue/346 -- basically a problem with node (I used 0.3.5 with the patch...) [02:29] dspree has joined the channel [02:30] clarkfischer has joined the channel [02:30] richcollins has joined the channel [02:30] Figaroo: I'm not sure I understand express fully, all I know is that you can do app.get('/some/path', callback) to "route" requests to callbacks. But there has to be more right? [02:30] dspree has joined the channel [02:31] Figaroo: How do I easily serve HTML, CSS, JS, and image files? [02:31] aaronblohowiak: Figaroo: read that page, it includes templates and static stuff [02:31] bingomanatee: Figaroo - I have a fairly complete example thats an extension of the MVC example at https://github.com/bignomanatee/mvc [02:31] bingomanatee: the examples are fairly thorough - file storage is covered. [02:32] dspree has joined the channel [02:32] bingomanatee: However if robust documentation is a deal breaker for you then Node is not ready yet :D [02:32] Figaroo: How do I do templating on an HTML file, to make it's content dynamic? [02:32] bingomanatee: use EJS. [02:32] bingomanatee: insert <%- my_local %> into the template where you want a local variable to go. [02:33] bingomanatee: Some would steer you towards jade but at this state I think ejs is the way to go. [02:33] dspree has joined the channel [02:33] dspree has joined the channel [02:33] bingomanatee: Figaroo - where are you based? [02:33] darklajid: It seems I can easily deadlock express (stable) with wrong templates? Shouldn't I get errors in that case? Is spark2 eating those? [02:34] dspree has joined the channel [02:34] Figaroo: it seems like express is the most used application framework for Node. [02:34] bingomanatee: Yes. [02:35] polotek: I'm heard geddy is nice [02:35] bingomanatee: However - node is not Ruby. Yet. [02:35] polotek: but both are a little too complex for most stuff I do [02:35] dspree has joined the channel [02:36] bingomanatee: Figaroo - you might consider using Ruby on Rails and build smaller, special purpose sites in Express to take care of tasks where optimization is the key. [02:36] dspree has joined the channel [02:37] bingomanatee: Or just do what I do - make a nuisance of yourself in IRC :D [02:37] braddunbar has joined the channel [02:37] tim_smart: Interesting.... https.request seems to be cutting off the end of a response. [02:37] dspree has joined the channel [02:38] Solsys has joined the channel [02:38] braddunbar: just got a no.de smartmachine and got access to the repo - but not sure what it should look like, anybody have a link to a guide of some sort? [02:39] dspree has joined the channel [02:39] dspree has joined the channel [02:39] braddunbar: main.js? [02:39] tim_smart: server.js [02:39] Figaroo has joined the channel [02:39] braddunbar: tim_smart: how did you know that? I couldn't find any docs on no.de [02:39] tim_smart: There is a joyent wiki with some information [02:39] braddunbar: ah... [02:40] jchris has joined the channel [02:40] Figaroo: Problems with my IRC client agian. Did anyone answer my questions or respond to some of the things I said in any way? [02:40] dspree has joined the channel [02:40] braddunbar: huh, that will be very helpful - thanks tim_smart [02:40] Metapony: No output from NPM using cygwin, one needs to go back and install node with the 'works' tag... now it works for me! [02:40] polotek: Figaroo: haha, what was the last thing you saw? [02:41] polotek: check out the logs http://nodejs.debuggable.com/ [02:41] polotek: Metapony: nice [02:41] dspree has joined the channel [02:41] Figaroo: polotek, I came here and just started speaking and so absolutely no messages from anyone. That's how I knew my IRC was having problems. >.< [02:42] tim_smart: I run irssi on my home server <3 [02:42] dspree has joined the channel [02:42] Figaroo: polotek, thanks, this saves my butt. If only my IRC client had the ability to load history. [02:43] tim_smart: braddunbar: ssh into your no.de instance and run `node-deply-howto` [02:43] dspree has joined the channel [02:43] braddunbar: tim_smart: ok [02:44] tim_smart: braddunbar: Also http://wiki.joyent.com/ja:node:faq#node-smartmachine-faq [02:44] tim_smart: and #joyent is helpful. [02:45] Figaroo: Okay, so I've been reading the guide while I was writting those messages. How do I separate different routes in express into multiple files? [02:45] braddunbar: tim_smart: which url do i ssh with? [02:45] tim_smart: Actually http://wiki.joyent.com/node:gettingstarted seems more helpful. [02:45] cloudhead has joined the channel [02:45] bingomanatee: Figaroo - the logs at http://nodejs.debuggable.com/ are good to look at - they are chock full of good advice including your missing minutes. [02:46] polotek: bingomanatee: already taken care of [02:46] tim_smart: ssh node@*username*.no.de [02:46] bingomanatee: I'm writing a search engine for them (though you can search them at google, I want to return threads) [02:46] bingomanatee: cooo. [02:46] Figaroo: bingomanatee, are you suggesting I go through all the logs in search for my answer? [02:46] polotek: Figaroo: you mean you want to do app.use in different files [02:47] polotek: or you want your handler functions to come from different files [02:47] bingomanatee: no but if you want to see what you missed, it should be there. [02:47] bingomanatee: but they are good for general information on express et all too. [02:47] bingomanatee: And you can use the url to do a context search via google. [02:47] brapse has joined the channel [02:48] Figaroo: polotek, basically I want my handler files to come from different files. I'd assume things will get very messy fast if all the routes for a fairly large site were in one file. :\ [02:48] polotek: indeed [02:48] polotek: but it's easy to do that [02:49] polotek: you separate your components into modules [02:49] polotek: and export your handler functions [02:49] polotek: man I hate writing tests [02:50] Figaroo: bingomanatee: Oh, okay. Yeah, I had a look at the logs to see what I missed -- polotek pointed out the logs to me too. :P [02:50] boaz has joined the channel [02:51] Figaroo: polotek, even then you'd have loads of app.get calls on the main file. [02:51] polotek: I'm not overly familiar with express [02:52] polotek: but I think you can setup and "endpoint" [02:52] Figaroo: polotek: Really, what framework do you use? [02:52] polotek: or something like that [02:52] darklajid: Hmpf. Thousands of stupid questions, I know. But I'm trying to insert something like " / " into a site. Between two mail addresses. a(....)\n/a(.....) doesn't work, the space on the left side is missing. Solutions? [02:52] polotek: app.get('/basepath'/, handler); [02:52] polotek: and then inside handler, you can set more subpath handlers [02:52] polotek: makes the routing more modular [02:53] polotek: with that being said [02:53] Figaroo: polotek: Ah, I see. [02:53] polotek: I have no idea how it actually works [02:53] polotek: :) [02:53] Figaroo: Do you use express or some other framework? [02:53] polotek: darklajid: I don't understand [02:54] polotek: Figaroo: mostly I write my own server handlers [02:54] polotek: but I don't have to do any complex routing [02:54] polotek: I've been mostly building libraries [02:54] polotek: I'm going to be building a site very soon [02:54] polotek: so we'll see [02:54] polotek: I plan to really dig into the frameworks that are available [02:55] peol has joined the channel [02:55] peol has joined the channel [02:55] Figaroo: what libraries have you been working on if I may ask? [02:55] polotek: https://github.com/polotek/evented-twitter/ [02:55] darklajid: polotek: I have a span containing two mailto: links to mail addresses. I want to separate those by " / " and - I'm unable to do so in my jade template. Anything I tried ends up with mail@address/ another@address (note the missing space) [02:55] polotek: https://github.com/polotek/libxmljs [02:56] polotek: darklajid: oh I see [02:56] polotek: why not put them on separate lines [02:56] polotek: html will collapse the whitespace [02:57] darklajid: polotek: Did that. Won't work. [02:57] polotek: I don't use jade either :) [02:57] polotek: I'm no help with the "popular" stuff [02:57] darklajid: polotek: If I do a(href=...) mail@address / on a line, the " /" part is part of the link [02:58] polotek: jade is weird to me, I avoid it [02:58] polotek: why do people like it? is it just because it's integrated with express? [02:58] Fuld: Hmm, this is really slow. 351ms :( [02:58] darklajid: If I move it to different lines, address1 \n / \n address2 then I see the problem above, the leading space is missing. Would be trivial to fix in html, but no clue how to make jade behave. [02:58] polotek: not being snarky, I actually wanna hear people's opinions [02:59] polotek: darklajid: exactly [02:59] darklajid: polotek: Actually I just stumbled upon it when I started with express and I just give it a try. Not sure if it will work out though. Love some things (much more succint), but - well.. [03:01] chrisb has joined the channel [03:04] charlenopires has joined the channel [03:05] wilmoore has joined the channel [03:06] ryah_: https://github.com/ry/node/wiki/Migrating-from-v0.2-to-v0.3 <-- please help [03:06] polotek: ryah_: I'm gonna take a look sometime tomorrow. I've been lax with updating to 0.3 [03:08] yx has joined the channel [03:08] ryah_: good, thanks [03:09] ryah_: v0.4 is just around the corner [03:10] polotek: ryah_: did you end up adding commands to the new http api? [03:10] pkrumins: 0.4!!! [03:10] polotek: the stuff we were discussing on the github commit? [03:10] chrisb has left the channel [03:13] Figaroo: v0.4 wow, development is moving rapidly. [03:13] Aria: ryah's a rockstar. [03:14] polotek: ryah_: what are your thoughts on adding strategic hooks into the node infrastructure [03:14] polotek: to facilitate userland extensions [03:15] Fuld: Is 351ms horrible for an HTTP GET with node? [03:16] Aikar has joined the channel [03:16] Aikar has joined the channel [03:16] softdrink has joined the channel [03:16] polotek: Fuld: depends on what you're doing [03:16] polotek: if you're making a db call or something then no [03:17] warz: hrm. [03:17] Fuld: http://slate.pplscape.com:81/start -- 351ms to do that. Never less than 290ms [03:17] mikeal has joined the channel [03:18] ryah_: polotek: the redirect stuff? i have to think about it... [03:18] polotek: Fuld: that is unreadable [03:18] ryah_: what do you mean strategic hooks? [03:18] polotek: use gist.github.com [03:18] JimBastard has joined the channel [03:18] polotek: well this is random [03:18] polotek: but there's a post on the list about supporting globs and regexes for event emitters [03:19] polotek: emitter.on('foo*', ...) [03:19] polotek: that type of thing [03:19] polotek: which of course shouldn't be in core [03:19] ryah_: no, i don't want that [03:19] polotek: no that's not the point [03:19] polotek: it's hard to implement in userland too [03:19] polotek: because you need to hook into both on functions and the emit function [03:20] ryah_: a hook into event emitter could be possible - it just needs to not slw down current operations [03:20] polotek: of course [03:20] polotek: I haven't put much thought into it yet [03:20] ryah_: that emit() is definitely in the hot path [03:21] Fuld: What's impressive is that Google is handling searches in 300ms or less :o [03:21] polotek: well what I was thinking is you could pass an optional handler function into emit [03:21] polotek: it would take the emitted event name and the _events list [03:21] polotek: and you could do any processing you wanted [03:22] polotek: if you don't use it then the only overhead is an if statement [03:22] Fuld: Bing loses at 516ms vs. Google [03:22] polotek: like I said, it's not something I need [03:23] polotek: it's just something I thought about [03:23] polotek: wanted to gauge your receptiveness [03:25] mikeal: ryah_: you going to mjr's tonight? [03:26] mikeal: i can give you a ride from the BART if you need one [03:28] ryah_: no, im sick [03:29] dnyy has joined the channel [03:29] mikeal: damn [03:29] mikeal: also, what style issues/ [03:29] mikeal: ? [03:31] polotek: I'm assuming he's referring to brackets on if statements and such [03:32] mikeal: ah, one line if statements [03:32] polotek: where are the node style guidelines posted? [03:33] mikeal: i thought it was just jslint [03:33] mikeal: but it flipped out all over both those files in a bunch of other code [03:33] c4milo2 has joined the channel [03:34] polotek: yeah I know it's not strict jslint [03:34] polotek: but i have seen something about the preferred guidelines [03:34] polotek: mikeal: the new request passed my evented-twitter tests [03:35] c4milo2 has joined the channel [03:35] matyr has joined the channel [03:35] mikeal: sweet [03:35] aurynn has joined the channel [03:36] polotek: craps out on 0.3.7 but that's to be expected right? [03:37] richcollins has joined the channel [03:39] aconbere has joined the channel [03:40] polotek: is there a better way to check if an object has any properties [03:40] polotek: than Object.keys(obj).length [03:40] mikeal: yeah [03:40] mikeal: that's expected [03:40] noahcampbell has joined the channel [03:41] isaacs has joined the channel [03:41] temp01 has joined the channel [03:42] ryah_: make lint [03:43] mikeal: make lint spews out a ton of stuff that has nothing to do with my changes [03:44] Rixius has joined the channel [03:44] ryah_: but - just don't put it on one line, and do braces like the other if-else in the file :) [03:45] mikeal: yeah, that's done [03:46] mikeal: it complained about some end of line spaces [03:46] mikeal: fixed those [03:46] mikeal: fixes pushed to the branch [03:47] btipling: formidable form data parser looks pretty good [03:47] btipling: 500MB/s parsing wow [03:48] whyme has joined the channel [03:49] polotek: btipling: it is awesome [03:49] ron_frown has joined the channel [03:49] CarterA has joined the channel [03:49] bmizerany has joined the channel [03:50] CarterA: Is the person who runs the buildbot around? [03:52] jashkenas has joined the channel [03:53] isaacs has joined the channel [03:55] Metapony: Does anyone know if there's a way in NPM to get a listing of the descriptions for each package? [03:55] dekz has joined the channel [03:55] isaacs: Metapony: npm ls [03:56] isaacs: Metapony: if that doens't show descriptions, then do `npm update npm` and then it will [03:56] Metapony: that doesn't really describe them, just list them.,.. [03:56] Metapony: oh, wait, i see, it does... sorry [03:57] Metapony: isaacs: Now that I've got it all working, my head is still swimming with possibility. ()or maybe vodka, not sure at teh moment) [03:58] Metapony: I mean thanks for rpm... [03:58] isaacs: Metapony: vodka and possibility can both have that effect :) [03:58] isaacs: np [03:58] isaacs: glad you're enjoying it :) [03:58] opus_ has joined the channel [03:58] Qbix1 has joined the channel [03:59] CarterA: isaacs: do you know who runs the buildbot? [03:59] isaacs: CarterA: not sure. [04:01] CarterA: Looks like... is ry [at] tinyclouds.org ryah? [04:01] CarterA: If so, it looks like he is the one running the buildbot. [04:03] yozgrahame has joined the channel [04:04] kawaz_air has joined the channel [04:05] bradleymeck has joined the channel [04:07] bsstoner has joined the channel [04:08] jacobolus has joined the channel [04:10] jchris has joined the channel [04:16] mikeal has joined the channel [04:18] eee_c1 has joined the channel [04:20] tim_smart: Hmmm .pipe() is doing something wierd. [04:21] ron_frown: socket-io and node to be crashing from time to time... so I am trying to setup monit... but it lookes like socket.io is expecting traffic on spcial urls and throws errors otherwise? [04:22] ron_frown: what is the initial request to socket-IO srver look like [04:25] desaiu has joined the channel [04:26] desaiu: has anyone ever combined express and sproutcore? i'm guessing it is possible to do that... [04:26] Evet has joined the channel [04:27] jtoy has joined the channel [04:33] matyr_ has joined the channel [04:36] yorick has joined the channel [04:37] jamescarr has joined the channel [04:42] yorick has joined the channel [04:45] matyr has joined the channel [04:50] Skhaz_ has joined the channel [04:51] hij1nx has joined the channel [04:52] saschagehlich_ has joined the channel [04:53] darvvin has joined the channel [04:53] tim_smart: It seems https.request responses are not handling pause() and resume() correctly. [04:54] tim_smart: ryah_: ^ [04:57] jimt_ has joined the channel [04:57] richcollins has joined the channel [05:02] Figaroo has joined the channel [05:03] matyr has joined the channel [05:04] polotek has left the channel [05:07] c4milo1 has joined the channel [05:12] Figaroo: is the guy that created Ni here? [05:12] Aikar: hmm [05:12] Aikar: so just benchmarked my template engine [05:12] Aikar: about 5ms to render [05:12] Aikar: >>> node benchmark.js [05:12] Aikar: rendered 50000 times in 10071ms! [05:13] Aikar: err [05:13] Aikar: did my math backwards >_> [05:13] Aikar: but thats to my advantage lol [05:13] Aikar: .2ms a render... not bad [05:14] ryah_: tim_smart: that's surprising [05:14] ryah_: the pause/resume code didn't change.. [05:14] ryah_: but it could be... [05:14] ryah_: oh https - hm [05:14] tim_smart: ryah_: I can give a gist of my code... [05:16] bruse has joined the channel [05:16] tim_smart: ryah_: https://gist.github.com/844e670ab8a7187e12ee [05:17] xonecas: Aikar: do you support compile first then render, and can we render on the client? [05:18] Aikar: xonecas: nothing on client yet but ill try to work that in eventually [05:18] Aikar: but yes it compiles as much as it can to pure html [05:18] Aikar: i even threw in a lil async test [05:18] Aikar: Blog.getComments: function(cb) {process.nextTick(function(){cb([{title: 'Test1'}, {title: 'test2'}]);}); [05:19] Aikar: so its doing process.nextTick for every render [05:19] Aikar: with 50k renders it still ran in 20 secs (.4s a render) [05:20] Aikar: but still even 5ms would be acceptable imo. so imo this is performing really well [05:21] Figaroo: Aikar, what template engine? [05:21] Aikar: Figaroo: Nova, im about to release it soon :) http://aikar.co/2011/01/21/nova-javascript-based-template-engine-nodejs/ [05:22] Aikar: example output => give me sec to commit this code so the link to the template source is valid http://aikar.co/nova.html [05:23] warz: nice. [05:23] Aikar: ok codes pushed to github, can view the template source now [05:23] jacobrel_ has joined the channel [05:23] Aikar: that template kinda throws some of everything into it just for the sake of testing [05:24] tmpvar: Aikar, that looks like JUP [05:24] Figaroo: Aikar, you have a typo on paragraph 3, first line -- 'JavaScrip' [05:24] Aikar: oops thanks [05:24] Aikar: tmpvar: ive been told theirs others with similar syntax [05:25] Aikar: but this is based on my own vision [05:25] tmpvar: got ya [05:25] tmpvar: looks good, still peeking [05:26] Figaroo: Aikar, np. [05:28] Aikar: i intend to add a css helper so you can write CSS in a JS style and do stuff like #a b.c d.e and #a b.c f as {'#a': {'b.c': {'d.e':{width:'1px'}}, {'f': {width: '2px'}} } } [05:28] tmpvar: Aikar, im surprised its not faster.. it takes 400ms to render? (the big example) [05:28] Aikar: tmpvar: no. .4ms [05:28] Aikar: as in less than 1 [05:28] tmpvar: oh jeez [05:28] tmpvar: right [05:28] Aikar: and that was with the process.nextTick [05:29] bruse has joined the channel [05:29] tmpvar: Aikar, right, and that bumps up your concurrency [05:29] Aikar: keep your templates slim with no/little async and yeah youll be around .1 / .2 area [05:29] tmpvar: cool, looks interesting [05:30] Aikar: if you wanna play with it now the codes looking great, try some things out and lemme know if you find any bugs :) [05:30] desaiu has joined the channel [05:30] Aikar: just clone the repo and require('./nova') theres an index.js in there [05:30] Aikar: then nova('templateFile.js', function(fullhtml) { }); [05:30] tmpvar: i may.. been fighting with xml namespaces all day (aka dom level2/core) [05:30] Aikar: err [05:31] Aikar: ignore what i just said, look at test :P [05:31] tmpvar: heh heh [05:31] Aikar: var template = nova('templateFile.js', {options}); // that compiles/caches it [05:31] tmpvar: i think the only downside to this is: https://github.com/Aikar/node-nova/blob/master/tests/templates/template.js#L51 [05:31] Aikar: then template.rendeR({foo: 'bar'}, function(fullhtml){}); [05:32] Aikar: tmpvar: i was testing deep nesting lol [05:32] tmpvar: lol, well it is a real case [05:32] Aikar: look at the span span span span span span span above it [05:32] Aikar: well indent your nodes properly like i did for rest of file :P [05:32] Aikar: i just did that quick and didnt indent it lol [05:32] Utkarsh_ has joined the channel [05:32] tmpvar: fair enough [05:33] jacobrel_ has joined the channel [05:33] Aikar: same concept of "you can put all of your code on 1 line seperated with semicolons, but you shouldn't :)" [05:34] tmpvar: yup [05:34] tmpvar: ACTION needs beer [05:35] tmpvar: Aikar, i've been thinking of writing something similar [05:35] Aikar: another neat aspect is you can use functions to programmatically 'build' the template on compile time [05:35] tmpvar: but, closer aligned with PURE.js/jquery.noTemplate [05:37] tmpvar: s/closer/more closely/ [05:37] Aikar: ie a static list... would look like {ul:[function() { var lis = []; ['foo','bar','baz'].forEach(function(li){ lis.push({li:li}); }); return lis; }]} [05:37] balaa has joined the channel [05:37] Aikar: of course whitespace would make that look better lol [05:37] Aikar: but that function is executed on compile time, letting you programmatically build it [05:38] warz: i wonder how cpu intensive this distance formula is, heh. [05:38] tmpvar: warz, codez? [05:38] Aikar: warz: 2d or 3d? [05:38] warz: 2d [05:38] Aikar: shouldnt be too bad then lol [05:39] MikhX has joined the channel [05:39] Aikar: i was working with 3d on http://mechwarz.com/serverload.png game and god was 3d math for distance and stuff a pain [05:39] Aikar: so the current game im building im very happy its going to be 2d >< [05:39] isaacs: ircretary: tell CarterA Yes, ry [ at ] tinyclouds.org is Ryan Dahl, aka ryah_, aka @ry [05:39] ircretary: isaacs: I'll be sure to tell cartera [05:40] iMAN_ has joined the channel [05:40] bmizerany has joined the channel [05:40] warz: reminds me of my game programming class, when i made a turret defense game and used A* for pathing on every other screen redraw [05:40] warz: for every object in the game [05:40] warz: =X [05:40] tmpvar: lol [05:40] tmpvar: recalculate _everything_ at the same time [05:40] Fuld: warz, welcome to node.js :) [05:41] Shahid_ has joined the channel [05:41] Aikar: oh -- someone wanna recommend me a place to preview my 'github flavored markdown' for the README files? because their own live preview page does not match whats actually used on the github pages [05:41] Aikar: as it looked good on live preview but messed up on github :( [05:41] tmpvar: markdown showdown is pretty good [05:41] Shahid_: hi is there anyone help me to install the nodejs on windows [05:41] Shahid_: i try with cygwn full installation [05:41] Fuld: Shahid_: colinux? [05:41] Shahid_: i got the the following errors [05:41] Aikar: Shahid_: serious suggestion [05:41] tmpvar: Shahid_, gist them [05:41] Aikar: Shahid_: install a VM with VirtualBox [05:41] Aikar: and run node under it [05:42] Aikar: youll save yourself alot of time, headaches and frustration [05:42] Shahid_: i dont know much about the VM and virtualbox [05:42] Fuld: Shahid_: http://codebetter.com/matthewpodwysocki/2010/09/08/getting-started-with-node-js-on-windows/ [05:42] warz: tmpvar, on my computer itd run fine with a good amount of objects in the viewport. but when i took it to demo day, i had to run it on a much much worse computer. [05:42] Fuld: They got cygwin working there [05:42] Aikar: Shahid_: it just lets you run another OS in a window on your current OS [05:42] warz: that was a pretty sad day [05:42] Aikar: so you have a Linux OS running on windows [05:43] tmpvar: warz, yup, demo/presentation syndrome [05:43] Aikar: Shahid_: everything you need to get it running is free [05:43] Aikar: Shahid_: VB is free, CentOS or Ubuntu or any other random distro is free [05:43] Fuld: tmpvar: My laptop decided to stop having a working keyboard and mouse during a powerpoint at an NYC tech event heh [05:44] tmpvar: Fuld, you are in NYC? [05:44] Shahid_: ok so you suggest me run VM and virtualbox [05:44] Fuld: tmpvar, yeah [05:44] tmpvar: you ever got to NYC.js? [05:44] temp02 has joined the channel [05:44] Shahid_: what is the procedure to install nodejs on it [05:44] tmpvar: s/got/go [05:44] Fuld: tmpvar, no. Where's that? [05:44] tmpvar: ah man, you should.. its good times [05:44] tmpvar: sec [05:44] jacobrel_ has joined the channel [05:44] Shahid_: Flud_ i follow the instruction on the link but still problem [05:45] tmpvar: Fuld, http://groups.google.com/group/nycjs [05:45] Aikar: Shahid_: for a smooth experience, yes [05:45] Aikar: Shahid_: windows will give you problems left and right [05:45] tmpvar: we meet every second thursday [05:45] Aikar: even if you get it working, i assure you the trouble wont be over :/ [05:45] Shahid_: is there any install VM copy avaialable on net with virtualbox [05:46] Aikar: Shahid_: google 'virtualbox', download it, then google 'install ubuntu virtualbox' [05:46] Aikar: thatll get you going [05:46] iMAN_: hello, bin tring to build node.js on my windows 7 machine with cygwin unsuccesfully. I get the python remap issue, but rebaseall is giving me an error "Fix image failed with last error = 13" [05:46] Aikar: you can probally have ubuntu installed within 2 hours [05:46] tmpvar: wow, we really a real win32 port [05:46] iMAN_: I take it the virt box advice pertains to me as well? [05:46] Shahid_: ok i will try now because i waste my 8 hours installing in windows [05:46] Aikar: iMAN_: yep lol [05:47] iMAN_: kewl :) [05:47] Shahid_: virtualbox and VM is same software [05:47] Ond: wat [05:47] tmpvar: virtualbox + ubuntu + nodejs [05:47] Aikar: i personally use centos, but i had to do some special stuff, and im pretty sure there are more guides based on ubuntu than centos [05:47] iMAN_: i just heard about this project a few days ago and I am super excited! [05:47] tmpvar: ubuntu is stupid easy to get rollin [05:48] Aikar: Shahid_: VM stands for Virtual Machine, a technology sort of, and VirtualBox is the software to give you the technology [05:48] iMAN_: been trying to install ever since [05:48] tmpvar: iMAN_, welcome! :) [05:48] tmpvar: iMAN_, for the best experience.. use linux ;) [05:48] iMAN_: Im a big actionscript guy [05:48] tmpvar: whether thats in a vm or dual boot or slicehost or something [05:48] iMAN_: excited to write server code in a language I know [05:49] tmpvar: \o/ [05:49] bradleymeck has joined the channel [05:49] tmpvar: bradleymeck, yo [05:49] Aikar: well, when i looked at some AS the other day there was alot of syntax stuff in that thats not in normal JS :P [05:49] Aikar: but very similiar yeah [05:49] iMAN_: JS beats php [05:49] iMAN_: :) [05:50] jacobrel_ has joined the channel [05:50] Aikar: was trying to recompile WebSocketMain.swf from Socket.IO to make it use the target port for inline XMLSocket policy request instead of trying the default :( [05:50] jchris has joined the channel [05:50] Aikar: iMAN_: language wise yep, but its not a drop in replacement for php [05:50] iMAN_: please elaborate [05:50] Aikar: throwing up a simple website built on node takes alot more effort than a simple php site [05:51] iMAN_: ahh [05:51] Aikar: iMAN_: node is designed to be the HTTP server, you can't run it as a language in apache [05:51] iMAN_: im actually more interested in game servers [05:51] tmpvar: well, there is jspp.. which is kinda like php [05:51] Aikar: but yes, writing networking servers = its strong point [05:51] iMAN_: yeah [05:52] bradleymeck has joined the channel [05:52] iMAN_: i see that [05:52] iMAN_: thanks [05:52] Aikar: im currently starting/building foundation for an MMO game server all in node [05:52] Aikar: read my blog http://aikar.co for some of what im doing atm :) [05:52] iMAN_: wow, i am really interested in that [05:52] iMAN_: ill check it out [05:53] iMAN_: is it open source/ [05:53] Aikar: no lol [05:53] Aikar: im hoping to tackle Zynga >_> [05:53] o_o has joined the channel [05:53] Aikar: but not fully [05:53] iMAN_: where do you work? [05:53] iMAN_: im at playdom [05:53] Aikar: im doing this game on my own free time [05:53] iMAN_: nice [05:53] iMAN_: i respect that [05:53] Aikar: so i expect it to take 1-2 yrs or so [05:54] iMAN_: wow [05:54] Figaroo: "it takes 400ms to render?" ".4....4ms to render" "oh jeez" -- A "The Social Network" moment. lol [05:54] mscdex: does nextTick fire before events in the next tick? [05:54] AAA_awright: I've heard of other two people now thinking about doing an MMO with Node.js... idk how serious they are [05:54] Aikar: i gotta partner with some graphics artist though eventually [05:55] AAA_awright: Aikar: You might wanna look at #bitcoin-gamedev, we've had an idea to use BitCoin as an in-game currency [05:55] Aikar: maybe someone at work will be interested [05:55] davidascher has joined the channel [05:55] SubStack: Aikar: buy a wacom! [05:55] Aikar: AAA_awright: im integrating into facebook, so im going to try to use FB credits [05:55] tmpvar: Figaroo, heh [05:55] AAA_awright: ACTION cringe [05:55] Aikar: SubStack: lol, artistic design is my main weakpoint :( [05:55] tmpvar: lol [05:55] iMAN_: you gonna deploy on the cloud? [05:55] SubStack: it's a learnable skill [05:55] tmpvar: deploy to facebook! [05:55] Aikar: iMAN_: yeah [05:56] iMAN_: awesome [05:56] SubStack: plus if you have compelling gameplay people don't really care what it looks like [05:56] tmzt: git push cloud [05:56] Aikar: iMAN_: except that unlike many businesses, i actually know what 'the cloud' is and will utilize it the way it should be lol [05:56] iMAN_: lol [05:56] tmzt: Aikar: its a term referring to a symbol on a diagram [05:56] Aikar: SubStack: thats the idea really, stage 1 will be a 2d game, get money coming in, then look into hiring people and go 3d [05:57] tmpvar: damn, you guys and your ideas.. i just want to code [05:57] iMAN_: ambitious, I wish you the best [05:57] SubStack: sounds fun [05:58] Aikar: i have some huge ideas, and to me the game is going to be super fun and i wanna play it already lol [05:58] Mike_Rice has joined the channel [05:58] tmpvar: in all reality.. i just want dom level2/core done.. my god what a pain in the ass. [05:58] SubStack: oh right and I need to dedicate a few days to fleshing out hexhack for bingomanatee's node.js drinkup ^_^ [05:58] Aikar: but im also putting in elements for casual/farmville type players, but the main thing im worried about is im not using the 'corny' aspect farmville does, and its a space game [05:58] Ond: Where's that, substack? Nodeconf? [05:58] AAA_awright: Aikar: http://aikar.co/2011/01/21/nova-javascript-based-template-engine-nodejs/ is yours? What's wrong with Jade? [05:58] Aria: And I want error objects from jsdom to be clearer. [05:58] Aikar: so ill prolly lose some people due to 'eww space thats a geek game!' [05:58] Aikar: AAA_awright: yea [05:59] tmpvar: Aria, explain [05:59] SubStack: Ond: nah just some thing in SF on the 3rd [05:59] Ond: Ah [05:59] tmpvar: Aria, and hi [05:59] Aikar: AAA_awright: i wanted something of my own in a full JS way :) [05:59] Aria: Heya ;-) [05:59] iMAN_: sounds fun [05:59] Aikar: AAA_awright: actually the first part of the post explains 'whats wrong with jade' :P [06:00] tmpvar: btw: http://groups.google.com/group/jsdom [06:00] Aria: Well, right now, DOM errors have no message. People keep making bug reports on the html5 library that are actually jsdom exceptions but they're so vague that nobody knows that. [06:00] Aria: Ooh. [06:00] Aikar: "One big annoyance with template engines these days for me is the idea that the syntax has to be some special unique format, in which no IDE or editor will ever support out of the box unless it gets extremely huge like Smarty. That to me is very annoying, as you lose all the benefits syntax highlighting and other features your editor can provide." [06:00] matyr_ has joined the channel [06:00] AAA_awright: Aikar: Of course :p I saw the usage and thought "Gee this looks similar" [06:00] tmpvar: Aria, im waiting to fully announce it.. until 0.1.24.. which should be soon. [06:00] tmpvar: Aria, hrm [06:00] Aikar: well jades nothing like 'javascript syntax' [06:00] Aria: (I wish I'd had more time this month -- dealing with some fugly tax paperwork.) [06:01] Mike_Rice: Hey guys, I'm gonna kill myself over JSDOM, and Google sucks [06:01] Aria: (I'd have sent patches instead of grumbling.) [06:01] tmpvar: Aria, I hear that.. is this still the attribute stuff? or other unknown issues? [06:01] Aria: Oh, that's one of the triggers. [06:01] Aikar: but if you guys could please clone nova and try it out and lemme know if you find any bugs (report to issues on github) id appreciate it :) https://github.com/Aikar/node-nova [06:02] Aikar: i need to hit bed now, ill begin documentation tomorrow. [06:02] tmpvar: we should probably have a day long hack session to get this all finally just _solved) [06:02] Mike_Rice: I'm trying to do a screen scrapper, but I keep getting error about ReferenceErrors [06:02] tmpvar: _solved_* [06:02] tmpvar: Mike_Rice, you are in luck [06:02] tmpvar: what version are you using? [06:02] matyr__ has joined the channel [06:02] Mike_Rice: npm [06:02] tmpvar: ok, so 0.1.23 .. would you mind trying head? [06:03] Mike_Rice: git? [06:03] tmpvar: git clone https://github.com/tmpvar/jsdom.git [06:03] Aria: I'd really love errors to print out something like "b.setAttribute('>', '>') [06:03] Aria: Error: INVALID_CHARACTER_ERR: DOM Exception 5" [06:03] tmpvar: cd jsdom && npm link . [06:03] tmzt: if your going to do a js template engine why not compile something based on jquery [06:03] pkrumins: /2/2 [06:03] tmpvar: Mike_Rice, there have been quite few improvements in the past week [06:03] Aria: And then there's the attribute thing, where the parser allows things that the DOM methods do not. But that's still WiP and so I should probably just find a workaround and raise it with the HTML5 groups. [06:04] tmpvar: Aria, i think that is feasible [06:04] Aikar: tmzt: compile something based on jquery? [06:04] Aikar: jquery has nothing to do with server side js :3 [06:04] Mike_Rice: tmpvar, working on it now [06:05] tmpvar: tagname + op ( arg ) + \n "errorMsg" [06:05] tmpvar: Aikar, i beg to differ, sir. [06:05] micheil has joined the channel [06:05] Mike_Rice: tmpvar, I'm newb to git, should I git in /usr/local/lib/node? [06:05] Aikar: tmpvar: ok yeah you can load a dom tree and do client side type stuff, but that is not the goal of node :p [06:05] tmzt: Aikar: sure, I mean using the selectors if you could use it build a static node tree and cache that [06:06] Aria: Yeah. DOM errors don't have the generic exception "message", but having SOMETHING readable would be awesome. [06:06] micheil: Mike_Rice: no, don't git clone into /usr/local [06:06] tmpvar: Mike_Rice, nah, somewhere in your home folder [06:06] tmpvar: Aikar, says who? [06:06] tmpvar: :P [06:06] Mike_Rice: am I doing, make... [06:06] tmpvar: umm [06:07] Aikar: where does it say on node site 'one of the main reasons to use node is to emulate a client side environment and render a DOM tree with DOM manipulation fuctions etc' :P [06:07] tmpvar: you shouldnt have to make anything ;) [06:07] Aria: Aikar: Considering node's based on a javascript engine used to do just that client side... [06:07] Mike_Rice: sorry, trying to wrap my head around node.js [06:07] tmpvar: Aikar, i was joking.. but seriously, code reuse? [06:08] Mike_Rice: tmpvar, doing git into home directory, how do I push into node.js lib? [06:08] Aikar: tmpvar Aria i think you confused what i meant by what i said lol [06:08] benburkert has joined the channel [06:08] Aikar: i was meaning just cause we are using javascript, doesnt mean we need to still base everything on jQuery [06:08] Qbix1 has joined the channel [06:08] Aikar: since jQuery is rather pointless on the node side [06:08] Aria: ACTION laughs. 'cept it's not. It's a good tool for scraping ;-) [06:08] tmpvar: Mike_Rice, cd jsdom [06:08] tmpvar: Mike_Rice, npm link . [06:09] Mike_Rice: Airkar, I don't think so, I plan on using it for screen scraping [06:09] Aikar: s/pointless/not as useful as it is on client then ;) [06:09] tmpvar: loool [06:09] tmpvar: to each their own i suppose [06:09] Aria: I also intend to use a node based proxy to extend my client ;-) [06:10] Aikar: doesnt Sizzle implement the actual selection process ? [06:10] Aikar: so wouldnt that be what you really need lol [06:10] tmpvar: Aikar, depends on what you are doing [06:11] jimt has joined the channel [06:11] Mike_Rice: after new jsdom git, even more verbose errors. :-) [06:12] Mike_Rice: "ENOENT, No such file or directory 'http://www."... [06:12] Figaroo: what is bitcoin? [06:12] Aikar: anyways, i need to hit bed its 1am :X please checkout nova and report any issues! (see tests/ folder for usage) ill document it tomorrow [06:12] Aria: An 'electronic currency' with some interesting properties. [06:12] tmpvar: Mike, can you post what you are trying to do? [06:12] Mike_Rice: code? [06:12] tmpvar: yeaj [06:12] tmpvar: yeah* [06:12] Aikar: and i heard about that, but isnt transferring it back to real cash a lil harder [06:13] Mike_Rice: will it paste well in IRC? [06:13] Aikar: Mike_Rice: gists.github.com [06:13] Aria: Well, until someone decides to start an exchange ;-) [06:13] tmpvar: Mike_Rice, gist.github.com [06:13] Aikar: Aria: yeah im hoping to make money with my game... bitcoin doesnt seem like a good idea :P [06:13] Mike_Rice: var config = { [06:13] Mike_Rice: "id": 2, [06:13] Mike_Rice: "name": "Joe Lamb, Jr.", [06:13] Mike_Rice: "urlBase": "http://www.joelambjr.com/", [06:13] Mike_Rice: "urlBaseProperties": "http://www.joelambjr.com/rental/numeric.html" [06:13] tmpvar: lol. [06:13] Aikar: 'anyone wanna buy 20k USD worth of bitcoins?!' [06:14] Mike_Rice has joined the channel [06:14] Aria: Could be the person to start that exchange! [06:14] tmpvar: Mike_Rice, paste it up at http://gist.github.com [06:14] Aikar: Mike_Rice: thats why i said gists.github.com ;) [06:14] Mike_Rice: whoops [06:14] Aikar: err gist.* [06:14] Mike_Rice: missed that [06:14] tmpvar: which is a broken link [06:14] Mike_Rice: :-) [06:14] tmpvar: lol [06:15] tmpvar: Aria, what state is html5 in these days? [06:15] Aria: It's being used. [06:15] Aria: I need to give it some seriously hard testing, I'm planning that for february when I'm not buried under paperwork. [06:16] Aria: And then go file off the rough edges, like where it interacts with the attribute handlers in the DOM ;-) [06:16] Mike_Rice: tmpvar, I sent private [06:16] Aria: Lots of test cases that misparse a little bit, though they're all dubious cases pretty much. [06:17] Aria: And then I need to figure out how to interact with jsdom on script nodes, so they can either be executed or not. [06:17] bradleymeck has joined the channel [06:17] Figaroo: wtf are bitcoins? [06:18] dekz has joined the channel [06:18] zikes: Figaroo: p2p digital currency [06:19] Figaroo: is it backed by anything real? [06:19] zikes: Figaroo: not that I'm aware of, nope [06:19] Aria: It's backed by the computational power of its users. [06:19] Aria: And so backed by slightly more than other currencies ;-) [06:20] Figaroo: Wait, if it's P2P, what stops me from just saying I have more money that I really do? [06:20] Figaroo: *than* [06:23] Aria: Your peers sign your transactions, so you can only double-spend your money until the network catches up and sees that it's already been spent. [06:24] Aria: You can dedicate some CPUs to generating new coin for the network though. [06:24] jacobrel_ has joined the channel [06:24] fangel has joined the channel [06:25] zikes: Aria: I thought it had some sort of self-regulation built in to limit the number of coins capable of being generated [06:25] Aria: It does. [06:25] keyvan has joined the channel [06:25] Aria: That said, more cpus = more coins. It's not a cheap process, deliberately. [06:25] zikes: Aria: wouldn't that mean that for every coin you generate, that's one less than someone else could generate? [06:25] Aria: I think there's something kinda like that, but it's a high limit. [06:26] Aria: I only read about it once, though ;-) [06:26] zikes: same here [06:26] Fuld: Aria: Isn't the limitation of bitcoin that there's a limit to the maximum coins in circulation? [06:27] Aria: I think there's something like that, yes [06:28] bradleymeck has joined the channel [06:31] matyr has joined the channel [06:36] hornairs has joined the channel [06:41] micheil: oh, hey zikes [06:41] zikes: hey micheil, how goes? [06:42] micheil: not too bad, yourself? [06:42] zikes: not too bad [06:42] bsstoner has left the channel [06:42] micheil: zikes: working' on anything cool these days? [06:44] zikes: sortof, working on an unofficial openid-style login system for deviantart, planning to implement it on the emotecloud.net site [06:45] Evet has joined the channel [06:45] zikes: pretty much finished with the functionality, just need to clean the code up and give it some design lovin' [06:46] micheil: hmm, cool; did anyone ever take up my challenge of writing a dAmn bot in node? [06:46] zikes: micheil: indeed I did, that's actually a component of this project =D [06:47] micheil: ah, cool [06:47] zikes: micheil: since it's unofficial, it's how I confirm user identity when they register [06:47] micheil: aha, neat [06:47] zikes: not as complete as a typical bot ought to be, but complete enough for my purposes [06:48] dekz: a [06:48] bradleymeck has joined the channel [06:48] zikes: micheil: how about yourself? working on anything interesting lately? [06:49] micheil: yeah, I've just joined a startup last november/december [06:49] micheil: doing some interesting stuff with various apis, node, and political data [06:50] zikes: micheil: oh? I recall hearing someone did something with city of baltimore data in node and couchdb recently, any relation? [06:51] warz: votizen.org?! [06:51] micheil: warz: yeah [06:51] warz: hehe, nice. been on your the mailing list for awhile. :P [06:51] micheil: ha, cool [06:52] skm has joined the channel [06:52] micheil: warz: yeah; for some of the stuff that we're doing, we're using node (we've actually got a few opensource modules up on npm) [06:53] warz: nice [06:54] micheil: zikes: as for that baltimore stuff, I don't think that's us; probably someone else. [06:54] micheil: warz: fwiw, https://github.com/votizen [06:55] djacobs7 has joined the channel [06:55] zikes: micheil: ah, well that votizen is looking pretty nice [06:55] micheil: thanks [06:56] zikes: would anyone know offhand if expressjs-implemented jade supports includes, or a simple facsimile? [06:56] micheil: hmm, not sure [06:57] micheil: you'd have to either read the source code or talk to tjholowaychuk [06:58] dgathright has joined the channel [07:02] beilabs has joined the channel [07:11] vyvea has joined the channel [07:12] jacobrel_ has joined the channel [07:14] mr_daniel has joined the channel [07:19] yumike has joined the channel [07:28] Figaroo: where can I find documentation on the carrier module? [07:34] matyr has joined the channel [07:35] jimt_ has joined the channel [07:36] dekz: quick question, easiest way to find out the number of arguments a function takes? [07:37] bingomanatee: dekz: thats not necessarily a "quick answer" [07:37] bingomanatee: You can render a string version of a function and count its parameters with regex [07:38] bingomanatee: However keep in mind that there's a second way to get arguments inside a function body, the arguments array, so even a function with a limited declaration of argument might actually [07:38] dekz: yeah I know about the latter [07:38] bingomanatee: accept more than the declaration would lead you to beliueve. [07:38] dekz: but is it considered not good form to do that? [07:38] dekz: and it's not an array correct? It's an object? [07:39] dekz: the arguments [07:41] bingomanatee: yeah but it acts much like an array [07:42] bingomanatee: given function f, /\(([^)]*)\)/.exec(f.toString())[1].split(/,/).length returns the declared argument count [07:42] dekz: regex, now I have 2 problems [07:42] bingomanatee: ahahaha [07:42] dekz: ok I'll try that out [07:42] sstephenson: dekz: (function(a, b) {}).length == 2 [07:43] dekz: cheers [07:43] bingomanatee: cool! [07:43] Remoun has joined the channel [07:44] dekz: cheers sstephenson [07:45] clarkfischer has joined the channel [07:46] mscdex: node.js rules! [07:46] mscdex: :-D [07:47] zentoooo has joined the channel [07:51] tim_smart: bingomanatee: someFunction.length also returns the number of arguments [07:51] tim_smart: v8: "test" [07:51] v8bot: tim_smart: "test" [07:51] Figaroo: sstephenson, never knew that. Wonder why it doesn't appear to work on native functions such as alert. [07:51] tim_smart: v8: (function (one, two) {}).length [07:51] v8bot: tim_smart: 2 [07:51] Figaroo: tim_smart: yeah sstephenson pointed that out too. [07:52] Figaroo: v8> alert.length [07:52] v8bot: Figaroo: ReferenceError: alert is not defined [07:52] jacobrel_ has joined the channel [07:52] Figaroo: erm no dom [07:52] Figaroo: v8: [].splice [07:52] v8bot: Figaroo: function splice() { [native code] } [07:52] Figaroo: v8: [].splice.length [07:52] v8bot: Figaroo: 2 [07:53] Figaroo: wonder why alert.length on my browser's console is returning 0. [07:55] Figaroo: Strange. It does this with document.write too. My theorem is that it does this with all DOM functions, possibly, because they really don't have any parameters and just access the arguments from the arguments array-like object. [07:55] tjholowaychuk has joined the channel [07:55] Figaroo: Anyone here heard of the carrier module? [07:56] Ond has joined the channel [07:57] tmpvar: mscdex, yo [07:57] dekz: so if I do fn.call(['a','b']) [07:58] dekz: will that work properly if fn expects a, b and can it use it properly [07:58] dekz: or will there be some implicit this problems? [07:58] tmpvar: damn, i didnt know that [07:58] tim_smart: dekz: fn.call(thisContext, arg1, argn) [07:58] mscdex: tmpvar: yo [07:58] perezd has joined the channel [07:58] tmpvar: how goes man? [07:58] tim_smart: dekz: fn.apply(thisContext, [array, of, args]) [07:59] mscdex: not bad, doing some work on my imap module. you? [07:59] tim_smart: imap :/ [07:59] tmpvar: v8:function a() { console.log(this.length); };a(1,2,3,4) [07:59] v8bot: tmpvar: CONSOLE: [undefined], OUTPUT: undefined [07:59] mscdex: tim_smart: yep :-) [07:59] tim_smart: Have fun :p [07:59] tmpvar: mscdex, fighting with jsdom + level2/core (aka: xml namespaces) [08:00] tmpvar: 65 tests until level2 is complete [08:00] mscdex: it's more or less complete, i'm just modifying it to stream message bodies instead of buffering them [08:00] tmpvar: nice [08:00] mscdex: tmpvar: cool [08:00] tim_smart: tmpvar: function a() { console.log(a.length); }; a(1,2,3,4) [08:00] tmpvar: imap is good .. in use, not so good for implementing im guessing [08:01] tim_smart: or function a() { console.log(arguments.callee.length); }; a(1,2,3,4); [08:01] mscdex: yeah, imap is a pita in some ways [08:01] tmpvar: tim_smart, i dont trust callee ;) [08:01] tim_smart: tmpvar: That is why named functions are cool. [08:01] tmpvar: v8: function a() { console.log(a.length); }; a(1,2,3,4) [08:01] v8bot: tmpvar: CONSOLE: [0], OUTPUT: undefined [08:01] mscdex: why no trust arguments.callee ? [08:02] tim_smart: v8: function a() { console.log(a.length, arguments.length); }; a(1,2,3,4); [08:02] v8bot: tim_smart: CONSOLE: [0, 4], OUTPUT: undefined [08:02] tmpvar: i may be confused, but i thought browser support was bad at best [08:02] tmpvar: tim_smart, yeah.. you could do that :) [08:02] tim_smart: It is on the roadmap to extermination. [08:02] tfe_ has joined the channel [08:02] mscdex: tim_smart: since when? [08:02] tim_smart: Has some security escalation propblems. [08:03] tim_smart: *problems [08:03] mscdex: got a link that goes into detail? [08:03] mscdex: i've never heard about that before [08:03] tim_smart: mscdex: http://stackoverflow.com/questions/103598/why-was-the-arguments-callee-caller-property-deprecated-in-javascript [08:04] tim_smart: Just the first google result I found [08:04] claudiu__ has joined the channel [08:04] tim_smart: Oh wrong question [08:04] tmpvar: v8:function a(b) { console.log(b); b++; nextTick(function() { a(b) }); }; [08:04] v8bot: tmpvar: undefined [08:04] tmpvar: v8:function a(b) { console.log(b); b++; process.nextTick(function() { a(b) }); }; [08:04] v8bot: tmpvar: undefined [08:05] tmpvar: v8: require [08:05] v8bot: tmpvar: ReferenceError: require is not defined [08:06] tmpvar: v8: console.log("a\nb") [08:06] v8bot: tmpvar: CONSOLE: ["a\nb"], OUTPUT: undefined [08:06] tmpvar: ok, im done [08:06] xonecas:  [08:07] pzich has joined the channel [08:08] Figaroo: is the imap module going to be apart of Nodes API natively? [08:08] mscdex: i knew accessing the arguments object was expensive, but didn't know anything over and above that [08:08] mscdex: Figaroo: you mean as a part of core? if so, no [08:09] tim_smart has joined the channel [08:09] Figaroo: Yes. Oh [08:09] Figaroo: Are there already modules for sending emails? [08:09] mscdex: it's not really a protocol that's fundamental to the internet like http or dns [08:10] mscdex: Figaroo: there's an smtp module, but i'm not sure what state it's in [08:10] jspiros has joined the channel [08:10] mscdex: Figaroo: there are also a few modules that are wrappers around command-line clients though [08:10] Figaroo: Anything simple like phps email() function? [08:12] jspiros has joined the channel [08:12] eikke has joined the channel [08:13] mscdex: Figaroo: here's the ones that are out there so far: https://github.com/miksago/node-smtp-client , https://github.com/andris9/Nodemailer , https://github.com/aheckmann/node-email , https://github.com/marak/node_mailer [08:14] Figaroo: Sweet, thanks! [08:16] tim_smart: mscdex: The ES5 spec says the callee will throw an error [08:16] tim_smart: on strict mode [08:16] tim_smart: *that [08:17] mscdex: tim_smart: i could see that, but still callee can be handy for "throwaway" anonymous functions [08:18] w0rse has joined the channel [08:18] tim_smart: mscdex: Not hard to give anonymous function a name [08:18] tim_smart: fs.readFile('config', function name (error, result) {}) [08:18] mscdex: tim_smart: i know, but having to name every function can get tacky [08:19] tmpvar: uh oh.. do i own mongoose on npm? [08:20] tim_smart: mscdex: If you do it that way ---^, it won't even polute the namespace [08:27] sveimac has joined the channel [08:28] void_ has joined the channel [08:28] DracoBlue has joined the channel [08:34] KyleXY has joined the channel [08:34] Qbix1 has joined the channel [08:36] invidious has joined the channel [08:36] gattuso has joined the channel [08:38] shaunau has joined the channel [08:40] rchavik has joined the channel [08:41] ROBOd has joined the channel [08:43] KyleXY has joined the channel [08:44] invidious: Problems installing node.js with cygwin. Build failed: -> task failed (err #2): {task: likv8.a SConstruct -> libv8.a} I ran export SHELL=/bin/bash and ran make again...didn't work. Can anyone out there offer some advice? [08:45] mike5w3c has joined the channel [08:48] Druid_ has joined the channel [08:49] tanepiper has joined the channel [08:50] invidious: is this the right place to ask that question? [08:50] tim_smart: invidious: The latest master? [08:50] invidious: Yup. [08:50] tim_smart: Try 0.3.5 [08:51] tim_smart: And there is some flag you have to use, but I'm not sure what it is [08:51] tim_smart: (I haven't used a windows machine for a year or two [08:53] invidious: Will do, thank you very much. Everything cool seems to be a bit harder with windows. grr... [08:53] vyvea has joined the channel [08:58] ph^ has joined the channel [09:06] Vertice has joined the channel [09:11] SamuraiJack_ has joined the channel [09:11] jimt has joined the channel [09:14] nook has joined the channel [09:15] adambeynon has joined the channel [09:19] herbySk has joined the channel [09:20] Guest84379 has joined the channel [09:21] yozgrahame has joined the channel [09:34] franck34: hi [09:35] franck34: there are many module to log things. Is there any consensus for one in particular ? [09:35] micheil: not really [09:36] franck34: thx [09:38] tanepiper: franck34: depends what you need [09:39] tanepiper: plenty for local, and API based logging [09:39] DracoBlue: if you just need logging for debugging, you may be satisfied with the built in console.log and friends. [09:40] mikeal has joined the channel [09:41] w0rse has joined the channel [09:41] franck34: well, i don't know my need yet, just exploring what i can do with all theses modules [09:41] slaskis: franck34: this one seems promising: https://github.com/indexzero/winston [09:43] franck34: effectivly [09:43] franck34: bookmarked, thx i missed this one [09:44] franck34: have you ever seen a nide project which is using ncurse for some things ? (for admin stuff, or monitoring) [09:46] masahiroh has joined the channel [09:47] franck34: ACTION wana rewrite irssi with node just for fun :) [09:49] tim_smart: franck34: The node-ncurse library comes with a irc example I think. [09:49] franck34: exactly, i just found it at the moment [09:49] franck34: nice [09:50] dahankzter has joined the channel [09:51] tim_smar1 has joined the channel [09:51] sriley has joined the channel [09:51] mischief has joined the channel [09:56] b_erb has joined the channel [09:57] awenkhh has joined the channel [09:58] tim_smart has joined the channel [10:00] awenkhh has joined the channel [10:01] Kingdutch has joined the channel [10:06] d0k has joined the channel [10:15] vyvea has joined the channel [10:15] liar has joined the channel [10:15] hij1nx has joined the channel [10:15] vyvea has joined the channel [10:18] Wizek has joined the channel [10:24] Twelve-60 has joined the channel [10:25] Gruni has joined the channel [10:25] mnbvasd: !v8: "" [10:26] mnbvasd: v8: "" [10:26] v8bot: mnbvasd: "" [10:26] mnbvasd: v8: ("") [10:26] v8bot: mnbvasd: "" [10:26] mnbvasd: v8: !("") [10:26] v8bot: mnbvasd: true [10:26] awenkhh has joined the channel [10:26] mnbvasd: v8: !!("") [10:26] v8bot: mnbvasd: false [10:26] mnbvasd: hm [10:26] chapel: v8: !!("")+"" [10:26] v8bot: chapel: "false" [10:27] chapel: :) [10:27] mnbvasd: I've got a bug trying to parse: [10:27] mnbvasd: away0 [11:53] mape: "Contact Us" in german? [11:54] stride: in what context? the direct translation sounds like gay unicorns [11:54] DracoBlue: usually you just write something like "Kontakt". [11:54] stride: yeah, although that's unusable as a call to action imho [11:55] DracoBlue: (in context of a website head navigation stating a tab where you can contact the company/site owner) [11:55] mape: stride: As in a "Contact Us" link on a menu [11:55] andrzejsliwa has joined the channel [11:55] mape: Takes you to a contact form [11:55] stride: hmkay, in that case.. really just Kontakt :) [11:55] mape: k, thanks :) [11:56] DracoBlue: i have seen "Kontakt-Formular" lately, if there is a different page to contact the company. And another page with imprint and legal stuff. [12:03] gattuso has joined the channel [12:04] MrTopf has joined the channel [12:04] saschagehlich: D [12:04] saschagehlich: just use "Kontakt", that's what we use for contact information or contact forms etc [12:13] femtoo has joined the channel [12:24] Roconda has joined the channel [12:26] bpedro has joined the channel [12:26] awenkhh has joined the channel [12:27] Athox has joined the channel [12:31] mAritz has joined the channel [12:36] franck34: stupid question. Is "var foo=require('./bar.js');" something equivalent to "var foo = new bar();" ? . Notice this question can be incomprehensible .. [12:37] piscisaureus has joined the channel [12:39] franck34: got my answer [12:39] xthsky has joined the channel [12:42] andrzejsliwa has joined the channel [12:44] sWORDs: I'm using a for i++ loop that works, but now I wan't to execute every i with 50 seconds in between, so I added setTimeout(function(){...code...}, 1 + (50*i)); around the command. But it doesn't execute any, does anyone know why? [12:44] sWORDs: 50ms not seconds [12:45] bpedro: sWORDs: inside the loop? [12:45] sWORDs: bpdedro: yes [12:46] sWORDs: no jslint errors and code seems fine [12:46] ron_frown: anyone got recommendations on kinda distributing load across nodes? Eg, I imagine I'll need a "service locator" of sorts that will hand communications off to a free node etc [12:46] sWORDs: I never used the setTimeout() function before, so I'm guessing I did something wrong there. [12:47] stride: sWORDs: mind to put it in a gist? [12:47] bpedro: sWORDs: can I see the code? (pastebin) [12:49] node-faq has joined the channel [12:49] stride: for (var i = 0; i < 10; i++) { setTimeout(function() { console.log(+(new Date)); }, 1 + i*500 ); } [12:49] stride: works fine [12:49] sWORDs: http://pastebin.com/wSJ1DHu1 [12:49] sWORDs: it works without the setTimout arround it [12:52] stride: does i have correct values inside there? (check with console.log(i); inside the timeout callback) [12:52] SubStack: sWORDs: it's a scoping issue, looks like [12:52] SubStack: try Test.Commands.forEach(function (cmd) { /* ... */ }) [12:53] Evet: what is the fastest way to develop a nodejs application? [12:53] sWORDs: So [i] is no longer available inside setTimeout? [12:53] SubStack: because the for loop doesn't introduce a new scope so the i is just === to Test.Commands.length by the time all the setTimeout actions fire [12:54] stride: Evet: echo "process.exit(1);" > foobar.js && node foobar.js [12:54] braddunbar: sWORDs: a self executing function is how i usually handle that [12:54] Evet: stride: it works. thanks! [12:55] piscisaureus has joined the channel [12:55] sWORDs: But how can I increase the delay so that there will be 50ms in between with forEach (the first after 50ms, the second after 100, etc)? [12:55] stride: Evet: no really, what do you want to know? IDEs / process management stuff / ...? [12:55] bpedro: sWORDs: problem is var i isn't known inside the function being timed out [12:56] stride: sWORDs: there are 50ms between them, but it has no command to load I guess [12:56] SubStack: sWORDs: http://pastebin.com/YcDENVZY [12:56] Evet: stride: i have some basic knowledge of server administration, coding in c, js, html, css, php, etc. [12:56] bpedro: sWORDs: here's how to make it work: setTimeout(function(i) { /* code */ }, 1 + (50 * i), i); [12:56] Evet: stride: but, i havent done a web app before [12:57] Evet: everything i can do is really low-level, experimental stuff [12:57] bpedro: sWORDs: See this http://pastebin.com/85bA5aw0 [12:57] stride: have you looked at frameworks like express? they are a bit more high-level to get started [12:58] SubStack: I wish javascript had range() instead of `for` built-in [12:58] braddunbar: stride: i was looking at using express too, have you used it? [12:59] sWORDs: SubStack: That's works perfect, tnx! [13:00] sWORDs: bpedro: Ah, yeah that would work to, passing i to the function. Tnx! [13:00] Evet: stride: it looks even harder than coding in asm [13:00] sWORDs: Damn, after seeying the solutions it makes me feel stupid. :) [13:00] Evet: maybe i have to get familiar with framework abstraction [13:01] stride: braddunbar: nah, I'm only using connect so far, not doing "full" web applications with node right now [13:01] bpedro: sWORDs: the trick is passing parameters inside the function using setTimeout() 3rd and higher parameters [13:01] davidc_ has joined the channel [13:04] franck34: Evet: you got luck and no luck in the same time. For a old school web app developer, switching to node is making some headeck at the beging. You have no bias, it's a luck. But you need at least give you some time to learn basic concept ( like MVC ) to start cleanly (imho) [13:05] stride: anybody here managed to get cloud9 running on centos 5? [13:06] piscisaureus has joined the channel [13:08] franck34: Evet: i make webapp since 10 years. I'm starting to learn node for realtime stuff since ... 2 weeks ? If i have to completely switch to node, for webapp, i'll start with http://expressjs.com/guide.html probably [13:09] Evet: franck34: what were you using for webapps? [13:10] stride: there's an example for an MVC application inside the express repo as well iirc [13:11] peol has joined the channel [13:11] peol has joined the channel [13:12] franck34: Evet: i prefere to not tell you, i want to stay a little bit credible lol. 100% php/mysql since php 2.9. Because of my job (i make more backoffices than public website) i'm using heavy extjs libs (sencha.com). [13:13] awenkhh has joined the channel [13:13] Evet: franck34: which client-side framework youre planning to use with nodejs? [13:14] franck34: mootools [13:14] franck34: and part of js libs from node of course (socket.io by example) [13:14] andrzejsliwa has joined the channel [13:14] Evet: hmm [13:15] franck34: oups, i'm speaking of client side JS framework [13:15] franck34: but sound like jquery is the consensus today [13:18] jstemmer has joined the channel [13:20] franck34: Evet: fill free to /query me. Note that for the question: "i want to make a webapp, what's the way to start ?", you will have one answer per person you ask lol [13:22] chapel: Evet: depends on what you want for clientside [13:22] chapel: you could do backbone [13:22] chapel: sammy [13:23] chapel: those both use jquery [13:24] stride: franck34: haven't we all been down that php/mysql road at least once? :) [13:26] franck34: in general yes :) But php got so many polemics regarding methods development/security that sometimes i prefer to say i don't know php :) [13:27] franck34: ACTION coffeee [13:29] franck34: ACTION forking howtonode [13:30] jashkenas has joined the channel [13:35] stride: I worked for some security consultants once that also did web application vulnerability stuff.. that time thought me that every framework and technology stack can and will be abused to give away your customers data.. :) [13:37] franck34: stride: absolutely (i'm working in this domain) [13:39] eikke has joined the channel [13:41] altamic has joined the channel [13:42] fangel has joined the channel [13:45] q_no has joined the channel [13:46] braddunbar: can i make forever restart when a file changes? [13:48] DracoBlue has left the channel [13:48] franck34: well, i've played with node-hot-reload, but tim_smart warn me about potentiel mem leaks [13:52] braddunbar: franck34: huh, so conventional wisdom is just restart it? [13:55] stride: can you provide the name of the node-executable with forever? in that case you might want to look at node-dev [13:58] ChrisPartridge has joined the channel [13:59] franck34: braddunbar: i think you can use node-hot-reload for some things, but you need to refactor your code to not have problem. Note i'm not sure of what i'm saying. [14:01] braddunbar: those work beautifully, thanks franck34 and stride [14:01] chapel: braddunbar: node-dev [14:01] chapel: bah [14:01] chapel: wasn't paying attention [14:02] stride: :)) [14:02] matjas has joined the channel [14:07] ChrisPartridge has joined the channel [14:08] q_no has joined the channel [14:15] andrzejsliwa has joined the channel [14:17] q_no has joined the channel [14:17] ChrisPartridge has joined the channel [14:17] wakawaka has joined the channel [14:18] wakawaka: hi all, anyone know how to run a shell script via node? [14:18] wakawaka: and also catch the output of that script? can child_process.spawn be used? [14:20] Evet has joined the channel [14:21] pyrotechnick has left the channel [14:22] chapel: child_process would be where to look [14:22] chapel: wakawaka: http://nodejs.org/api/child_processes.html [14:22] tg has joined the channel [14:24] wakawaka: thanks chapel, have you ever used child process to run a shell/bash script? havent been able to get it running as of yet [14:24] chapel: yeah, got a gist of your code? [14:28] ChrisPartridge has joined the channel [14:30] fallsemo has joined the channel [14:32] q_no has joined the channel [14:33] mike5w3c_ has joined the channel [14:35] saschagehlich: franck34: did you already finish your socket.io cli client? [14:38] stride: wakawaka: /bin/sh as the executable, first argument is the name of the script. child_process.exec is a nice helper if you just want the full output [14:39] herbySk has joined the channel [14:39] pdelgallego_ has joined the channel [14:39] ron_frown: any progress on node for windows [14:40] saschagehlich: ron_frown: I guess windows support is the least important issue ry is working on [14:41] saschagehlich: ron_frown: just install a vm with debian or so ;) [14:43] q_no has joined the channel [14:45] mike5w3c_ has joined the channel [14:48] ron_frown: bah [14:48] ron_frown: I understand they can target whatever platforms they want [14:48] ron_frown: just surprised to see the lack of windows platform [14:49] saschagehlich: ron_frown: because linux is the better os :) [14:49] ron_frown: right. [14:51] perlmonkey2 has joined the channel [14:52] bpedro has joined the channel [14:54] EyePulp has joined the channel [14:57] franck34: saschagehlich: yes [14:58] franck34: it's just a poc but it's running [14:58] franck34: ACTION commiting on github [14:59] tapwater has joined the channel [15:02] franck34: saschagehlich: https://github.com/franck34/InnovaChatServer/blob/master/socketio-client-cli.js [15:03] franck34: note that i'm listening stdin so you can send something directly [15:03] franck34: feel free to fork and make it more clean ;) [15:06] nook has joined the channel [15:09] keyvan has joined the channel [15:09] saschagehlich: okay cool [15:11] Christopher_Bisc has joined the channel [15:13] qFox has joined the channel [15:14] adambeynon has joined the channel [15:15] wakawaka: stride: perfect, many thanks [15:18] davidwalsh has joined the channel [15:23] c4milo1 has joined the channel [15:24] noahcampbell has joined the channel [15:24] Ari-Ugwu has joined the channel [15:25] sivy has joined the channel [15:25] Gruni has joined the channel [15:31] bsstoner has joined the channel [15:35] Qbix1 has joined the channel [15:35] davidc_ has joined the channel [15:37] aconbere has joined the channel [15:41] franck34: Evet: here ? you said you are good for low level stuff ? [15:42] stride: want me to help you get started with MIPS assembly? [15:42] Evet: franck34: better than high level [15:43] Evet: heh [15:43] Wizek_ has joined the channel [15:43] franck34: :) [15:44] franck34: i wondering if it was possible to use node to make some low level network stuff like a simple ping by example [15:44] franck34: icmp .. [15:44] mnbvasd: ACTION swears at JSON.parse [15:44] darvvin has joined the channel [15:44] mnbvasd: v8: JSON.parse('{}') [15:44] v8bot: mnbvasd: {} [15:44] mnbvasd: v8: JSON.parse("{'abc':'def'}") [15:44] v8bot: mnbvasd: SyntaxError: Unexpected token ILLEGAL [15:45] mnbvasd: v8: JSON.parse('{"abc":"def"}') [15:45] v8bot: mnbvasd: {"abc": "def"} [15:45] mnbvasd: well that's crap. [15:46] mnbvasd: wonder if that's part of the JSON spec [15:47] chapel: what? [15:47] chapel: you have to use " double quotes [15:47] chapel: in json [15:47] chapel: v8: JSON.stringify({abc: 'def'}); [15:47] v8bot: chapel: "{"abc":"def"}" [15:51] darvvin has joined the channel [15:52] hornairs has joined the channel [15:56] mAritz: mnbvasd: yes, it is. [15:56] mAritz: (part of the spec) [15:56] mAritz: and it's good because json is not supposed to be hand-written. [15:56] mnbvasd: mAritz: yes, I understand... 'cept it could be quite convenient. [15:57] mnbvasd: var data = fs.readFileSync( filename ); var ret = eval ( '('+data+')' ); [15:57] mnbvasd: is really quite horrible as a method of reading a nasty quick config file.... [15:58] mnbvasd: got any better ideas? [15:58] chapel: why use sync? [15:58] mnbvasd: 'tis a config file.. the entire server is waiting for it to load, so it needs to block somehow.. [15:58] stride: look at what npm does / use a module to parse your configs yourself [15:59] chapel: yeah [15:59] mnbvasd: I don't want to fire up the entire server from a callback. [15:59] chapel: just make a module [15:59] chapel: var config = require('./config') [15:59] stride: yeah, that really sucks, I added sync loading to my configparser module yesterday as well. waiting for configs to load was messy [15:59] chapel: and in config module.exports.config = { settings: blah } [15:59] mnbvasd: does var config = require ( pathToConfig ); work? [16:00] chapel: if you use require its always sync [16:00] chapel: require loads before anything happens [16:00] chapel: plus it evaluates whatever is in the required file as js [16:00] chapel: so you can have real js objects [16:00] mnbvasd: I thought there's issues with full paths in requires? [16:00] chapel: not really [16:01] chapel: if you dont add a path, it looks at the global PATH [16:01] chapel: otherwise it looks in relation of the script [16:02] mnbvasd: or the module that calls it? [16:02] jchris has joined the channel [16:03] aurynn has joined the channel [16:03] mnbvasd: requiring a module however is equally as bad as just evaluating a script. [16:03] chapel: yeah whichever [16:03] chapel: how so? [16:03] mnbvasd: it executes the code, rather than putting it into a datastructure. [16:03] chapel: uhh [16:03] chapel: you can make the config module just data [16:03] chapel: an object [16:04] mnbvasd: you can't stop it from executing malicious code though. [16:04] stride: malicious code in your config file? don't give your interns a user account on production servers.. ;) [16:05] stride: mnbvasd: what about the read the file & parse it yourself approach? [16:05] mnbvasd: stride: yes, that's my other option. [16:05] chapel: how is an eval any better? [16:05] Kingdutch has joined the channel [16:06] chapel: or you could just have the config be json [16:06] DracoBlue has joined the channel [16:06] mnbvasd: eval is no better/worse than require in this context imo. [16:06] chapel: sure [16:06] stride: I'm currently using a damn ugly thing that parses ini/propertiy-file like configurations. at least it works. never really got why you would want a config to be JSON formatted [16:06] chapel: I think require is better because its built in, and has a set purpose [16:06] Aikar: hmm.. [16:06] stride: -i [16:06] chapel: evil is eval [16:06] chapel: oh wait, no I got that right [16:06] Aikar: how is google analytics tracking a page that doesnt have analytics code on it >_> [16:06] mnbvasd: JSON is just too difficult to edit... no \n's or other white space. [16:07] stride: Aikar: witchcraft, it's a labs project [16:07] chapel: mnbvasd: I say make your own config format, and dont use evil though [16:07] chapel: :) [16:07] chapel: cause you say require you have to worry about people putting bad stuff in, well evil is the same concern [16:07] mnbvasd: chapel: aye, I will do, in time. [16:07] chapel: :) [16:07] stride: and make sure you give it a nice interface. porting pyton's configparser to node was one of my worse ideas last year [16:08] Aikar: i gotta datawipe my phone and restore :( my 4G is acting up. it auto turns on soon as i turn my phone on, then turns its self off automatically, but gets stuck trying to turn off and cant turn off lol [16:08] mnbvasd: however as I say, there's no reason to move over from what I have to using require, as it gives me no benifiit. [16:08] Aikar: and eats up battery like a mofo [16:08] chapel: mnbvasd: atm sure, other than you are just doing the same thing require does :) [16:09] Aikar: stride: cause its easy to parse lol? [16:09] Aikar: my configs are node modules. var config = module.exports = { foo: 'bar', baz: 'blah' }; [16:09] jimt_ has joined the channel [16:09] chapel: exactly [16:10] chapel: thats what I was saying [16:10] chapel: :) [16:10] mnbvasd: chapel: 'cept I read some individual user configs async. [16:10] nonnikcam has joined the channel [16:10] keyvan has joined the channel [16:10] Aikar: node would cache those [16:10] stride: Aikar: nah, because the idea of typed getters, default values and a bunch of exception-throwing conditions proves to be a big overhead for something that should essentially be config.get('server', 'port', 1234); [16:10] chapel: you can do requires later in the app [16:10] chapel: doesn't have to be at the top [16:10] chapel: of course it will be sync [16:10] chapel: but you can call them anywhere [16:11] Aikar: config.port || 1234 ? [16:11] mnbvasd: chapel: but I'm happy for user stuff to be async ;) [16:11] stride: turned out I didn't really need change events for changing config values, file watchers and some other senseless features I added to get a bit more fluent with the node APIs.. :) [16:11] chapel: mnbvasd: just saying :) [16:11] chapel: you do what you want [16:11] chapel: its your app [16:13] mnbvasd: chapel: I'm gonna just do may own data writer/parser in time. [16:13] chapel: thats cool [16:13] mnbvasd: I was hoping for something nice and safe built into node, but there isn't by the looks :-/ [16:14] chapel: for configs with no executable code? [16:14] chapel: nope [16:14] stride: Aikar: with sections it would be more like config.server && config.server.port ? config.server.port : 1234; which looks uglier than config.get('server', 'port', 1234); imho [16:15] Aikar: well making a get() method for looking it up aint that hard either, but you specifically said 'why put in json format'. can still keep json format and have a get method [16:15] mnbvasd: chapel: they're just meant to be data. [16:15] chapel: :) [16:15] chapel: yeah mnbvasd [16:15] mnbvasd: *meant*.. but you never know. [16:15] mnbvasd: ;) [16:16] mnbvasd: somebody puts in some malicious code as their password.. oops. [16:16] Kingdutch: I do that sometimes :( [16:16] chapel: should always regex against passwords you dont like [16:16] Kingdutch: md5 messes is up though [16:16] chapel: yeah [16:17] chapel: or md5 it before it hits the server [16:17] chapel: :) [16:17] arpegius has joined the channel [16:17] chapel: and salt it on the server [16:17] sveimac_ has joined the channel [16:17] jimt has joined the channel [16:17] slickplaid: i prefer a low sodium diet [16:17] stride: Aikar: true. for personal taste, I still prefer [section]\nkey=value type files [16:18] franck34: does anybody have a really little node+redis+pubsub event sample code ? [16:18] franck34: google show me sample with too many code [16:19] stride: it works okay, only thing I have to think about in the future is automagically casting stuff. using get/getint/getboolean/getJSON where appropriate kind of sucks [16:20] hornairs has joined the channel [16:20] mynyml has joined the channel [16:22] jimt_ has joined the channel [16:24] mynyml: how can i tell if a file is closed? [16:25] mnbvasd: chapel: some stuff you need plain passwords for, such as plain auth... you can md5 passwords in multiple types of hashes for some stuff.. [16:25] chapel: guess it depends on the site [16:25] chapel: :) [16:26] mnbvasd: or the protocol you're implementing. [16:26] sveimac has joined the channel [16:27] jimt has joined the channel [16:29] pdelgallego_ has joined the channel [16:29] pdelgallego has joined the channel [16:29] MattJ has joined the channel [16:31] mfernest has left the channel [16:36] jetheredge has joined the channel [16:36] noder79 has joined the channel [16:39] ttpva has joined the channel [16:39] maushu has joined the channel [16:40] Roconda has joined the channel [16:42] pandark_ has joined the channel [16:43] saschagehlich: aaah that goddamn bad file descriptor bug again... [16:43] bingomanatee: mynyml: the cardboard sign in the door [16:43] franck34: what is the good npm for redis client ? [16:43] franck34: they are: redis, redis-client, redis-node [16:44] jpld has joined the channel [16:44] jpld has joined the channel [16:44] boaz has joined the channel [16:47] hobodave has joined the channel [16:47] Yuffster has joined the channel [16:48] matjas_ has joined the channel [16:48] andrzejsliwa has joined the channel [16:49] boaz has joined the channel [16:49] xla has joined the channel [16:50] franck34: i mean, what is the main redis client people are using with node ? [16:50] noder79 has left the channel [16:54] saschagehlich: franck34: I'm using this one: https://github.com/mranney/node_redis [16:54] saschagehlich: npm install redis [16:56] franck34: thx [16:57] mynyml: bingomanatee: is this a clever metaphore for something obvious i should have noticed? [17:00] sveimac has joined the channel [17:03] garrensmith has joined the channel [17:03] mynyml: guess i can try to read the fd again and see if it throws an error [17:05] oncenull has joined the channel [17:06] bingomanatee: nope [17:06] bingomanatee: just a cheap joke [17:07] bingomanatee: I would say put a try/catch around your actions and if you fail assume the file is locked up. [17:07] franck34: saschagehlich: what about redis server ? did you apt-get / aptitude or compile from src ? [17:07] zemanel has joined the channel [17:07] saschagehlich: compiled from source I guess [17:07] saschagehlich: but can't remember really [17:07] franck34: ok, got problem with subscribe/psubscribe [17:07] franck34: Error: ERR unknown command 'psubscribe' [17:08] Kingdutch: Is my definition of "Advanced Javascript" so much different from other people's that all the search results seem Basic to me? [17:09] tanepiper: Kingdutch: i think the basic definition of "Advanced JS" is understanding events and closures, and that's pretty much it [17:10] Kingdutch: Meh, that feels like basic JS to me, seeing as it's the fundamentals of JS =| [17:10] c4milo1 has joined the channel [17:10] bingomanatee: That being said if you can figure out how to check it in unix you can make a bash call through a child process and encase your file activity in the check. [17:10] bingomanatee: well I'd say "Advanced Javascript" is encrypting your project in coffeescript [17:11] tanepiper: Kingdutch: yea [17:11] Kingdutch: bingomanatee: That's just stupid imo, my definition of JS is code structuring, deciding what goes where I suppose [17:11] bingomanatee: Of course, I generate all my coffeescript in PHP, so I consider myself as a Ultra Advanced Javascript programmer. [17:12] Kingdutch: It's what I have trouble with atm, I know functionality, just don't know the best way to set it up, like use prototype, or just use a big function that returns stuff with this. and put stuff in the constructor or create methods for it etc. [17:12] mynyml: there there, dont be hatin on cs now [17:12] bingomanatee: The PHP is generated by a .NET engine that I reverese engineered in Perl. [17:12] bingomanatee: Which itself is based on a Lisp extension I wrote in college. [17:12] tanepiper: to be, advanced JS is "what's new" - I want to know about map/reduce, proxies, strict mode, etc [17:12] bingomanatee: I'm THIS CLOSE to finishing my "Hello World" thesis [17:12] davidc_ has joined the channel [17:13] bingomanatee: Personally I feel if you are using OOP and callbacks you are already in advanced territory [17:13] Kingdutch: OOP and Callbacks is the basis of Java, C++, C# and imo PHP5 as well. So that's not new for me [17:14] bingomanatee: yearp. [17:14] jashkenas: unfortunately OOP in JavaScript is fraught with needless complexity and FUD. [17:14] Kingdutch: In C++ it's easier imo to make a class though because there's a defined way of doing it [17:14] bingomanatee: Keep in mind its industry standard now - but early Javascript had neither of these features in common use. [17:14] Kingdutch: Javascript feels different since you can do it in a single function or you can use the object ń prototype and gawd knows what else [17:14] bingomanatee: That is coming in JS. I saw a Chrome preview of new features being proposed in JS and a formal class definition is part of the proposed package. [17:15] franck34: Kingdutch: got the same problem, i can make code which is running, but i don't know if it's well written [17:15] jashkenas: bingomanatee: here's the most recent post about what (may) be coming to JS, from Eich: http://brendaneich.com/2011/01/harmony-of-my-dreams/ [17:15] cloudhead has joined the channel [17:16] Kingdutch: franck34: Right, in C++ that's way easier to see [17:16] bingomanatee: I am personally uncomfortable with the idea of multiple isolated modifications of the prototype. Its the only way to go at this point but I feell like if you are going to create a mutable class, the class itself should contain hooks for self mutation; it shouldn't be vulnerable to outside manipulation. If you want to maniplate a class, you should have to extend it. [17:17] Kingdutch: Right, I agree [17:17] Kingdutch: Problem is bingomanatee, people can implement new features but it takes ages before other people copy them [17:18] Kingdutch: See mozilla's signed JS execution, a nice idea, but not copied by other browsers (It would allow you to put a line of say if (url != 'my url') return; //rest of code; and generate a certificate for that) Then if someone would copy your code with certificate it wouldn't run, and if it was modified it wouldn't run with that certificate anymore thus giving a warning to the user [17:18] awenkhh has joined the channel [17:18] stride: copying is just one side. getting people to use the newer versions is the other imho [17:18] tanepiper: The problem I have with prototype modification is if you forget, then it's implemented later with improvements [17:19] stride: I still have to maintain IE6 compatiblity in one project.. [17:19] stride: *compatibility [17:20] Kingdutch: poor you :( [17:20] Kingdutch: I gave up on IE [17:20] brainproxy: bingomanatee: you could always use Joose and compose Roles into a class based on user agent [17:20] Kingdutch: I just tell people to get a real web browser [17:20] Kingdutch: (My target audience doesn't use IE anyway) [17:20] Kingdutch: Or they use IE with Chrome thingy [17:21] Kingdutch: I think we need an android type system for permissions [17:21] stride: Kingdutch: it's a project on my dayjob. don't really get to choose the customer base there.. :) [17:21] Kingdutch: That way we can have closed source scripts [17:21] Kingdutch: :D [17:21] Kingdutch: stride: True, hence poor you [17:21] stride: :) [17:21] jashkenas: (or you can use coffeescript, get a bunch of the features that Eich proposes in that post, and have IE6 support, with full JS speed ... just sayin') [17:22] stepheneb has joined the channel [17:22] philipharrison has joined the channel [17:22] bingomanatee: At this point I am comfortable enough with Foo = function(params){}; Foo.prototype = {a: b, ....} that I can get by [17:23] GasbaKid has joined the channel [17:23] jchris has joined the channel [17:23] jashkenas: bingomanatee: that's great unless you want Foo to inherit from another prototype ... like say, EventEmitter. [17:23] zz_raja has joined the channel [17:24] stride: I use the EventEmitter.call(this); w/ util.inherits(Foo, EventEmitter) pattern for that. that's okay imho [17:24] jashkenas: yep. util.inherits gets around that. [17:24] bingomanatee: There is inheritance in the proposed formal class structure - its single inheritance but its part of the spec. [17:25] jashkenas: bingomanatee: JS already has single inheritance ... that's what the "prototype chain" is. [17:25] bingomanatee: I am fine with a mixins parameter in the constructor - but that allows you to filter and control mixins from inside your constructor code, so you can implement final methods. [17:25] bingomanatee: I'm just old. [17:26] bartt has joined the channel [17:26] abraham has joined the channel [17:26] bingomanatee: I'm hoping that dNode can help us blow past a lot of incompatibility stuff on the browsers. [17:27] stride: huh? the IPC thing substack did? [17:28] eee_c has joined the channel [17:29] arpegius has joined the channel [17:30] bingomanatee: yep [17:31] bingomanatee: The less code that acutally runs on multiple browsers, the fewer chances you have of getting screwed by browser incompatibilty. [17:31] bingomanatee: Of course the DOM is the big dealkiller most of the time but still. [17:31] tokumine has joined the channel [17:31] jchris has joined the channel [17:31] Aikar: hmm [17:31] bingomanatee: If node ran on the browser I would say screw it and just use RoR. [17:31] Aikar: this jsperf template engine thing is odd [17:31] Aikar: how does it determine score [17:32] Aikar: how does it handle async templates :/ [17:32] cronopio has joined the channel [17:33] w0rse has joined the channel [17:35] chapel: Aikar: it just runs the command each individually [17:35] chapel: as far as I know [17:36] Aikar: chapel: yeah but is there a feature to say 'hey this render finished async' ? [17:36] Aikar: i dont think its able to test my engine correctly [17:36] mnbvasd: lol [17:37] chapel: well ejs is async [17:37] chapel: and I put that in there [17:37] Aikar: prolly why it also has a really low score [17:37] chapel: heh [17:37] chapel: possibly [17:37] Aikar: this exact template for the test renders in mine in 0.26 ms [17:37] Aikar: i find it very hard to believe my score is only 5000 down near jQuery [17:39] chapel: hmm [17:40] Aikar: damnit forgot to fill in author details of test. i thought there would be a preview to ensure it works lol... [17:40] markstory has joined the channel [17:41] Aikar: oh i see published box [17:42] jashkenas: tests need to be synchronous, but your template render should be synchronous as well ... so I don't see the issue. [17:42] awenkhh has joined the channel [17:42] jashkenas: Aikar ... are you calling setTimeout within your engine? [17:42] Aikar: well mines not :X [17:42] Aikar: no [17:42] jashkenas: um, buddy ... then yours is synchronous. [17:43] temp02 has joined the channel [17:43] Aikar: templates could have IO in them [17:43] jashkenas: Aikar: want to gist your example / library? [17:43] Aikar: in this case yeah its running sync [17:43] jashkenas: so it's sync then. problem solved. [17:44] Aikar: http://github.com/Aikar/node-nova/ see tests folder [17:45] jashkenas: how is it possibly going to work in the browser, with all the Node stuff you require? [17:46] Aikar: i made a modified version for this test site [17:46] Aikar: this isnt meant for the browser [17:46] GasbaKid has joined the channel [17:46] chapel: yeah [17:46] Aikar: ttps://github.com/Aikar/node-nova/raw/master/benchmark/jsperf.js [17:46] chapel: Im sure for node its fast [17:46] Aikar: https://github.com/Aikar/node-nova/raw/master/benchmark/jsperf.js [17:46] liar has joined the channel [17:46] Aikar: well its exact same code really lol [17:46] Aikar: averages 0.26ms for this jsperf test [17:47] chapel: just saying different use case [17:47] chapel: idk [17:47] jashkenas: forEach, etc aren't cross-browser compatible. [17:47] chapel: ACTION knows very little about optimizations [17:47] Aikar: so if 0.26ms is 'one of the slowest', i guess performance of all of these template engines is great [17:47] chapel: doT :) [17:47] Aikar: jashkenas: like i said, i modified it for the test, i used jquery.each for jsperf.com [17:48] Aikar: wait crap [17:48] Aikar: yeah i do use forEach in alot of other places lol [17:48] Aikar: but im running test on chrome [17:48] Aikar: http://jsperf.com/dom-vs-innerhtml-based-templating/60 [17:49] ROBOd_ has joined the channel [17:49] jashkenas: Aikar ... your test is broken. [17:49] jashkenas: window.novaTemplate.render(window.sharedVariables); [17:49] jashkenas: returns undefined, not the HTML string. [17:50] matjas_ has joined the channel [17:52] Aikar: its not suppose to return the html string [17:52] Aikar: like i said, its designed to be async [17:53] Aikar: template.render(vars, function(html) { }); is the normal use [17:53] jetienne has joined the channel [17:54] Aikar: i just pushed new file to use jQuery.each in place of every .forEach [17:54] mikeal has joined the channel [17:54] jashkenas: Aikar: you need to return the template string, in some fashion, or else it's not a valid test. [17:55] Aikar: is the benchmark even testing the return value for the html? if not i dont see why that matters [17:56] russ_nyc has joined the channel [17:56] russ_nyc has left the channel [17:56] sstephenson: Aikar: you're not actually testing how long a complete render takes [17:56] chapel: the test is just seeing how long it takes to output the test render [17:56] temp01 has joined the channel [17:57] chapel: thats what matters [17:57] sstephenson: you'd get the same effect by putting every other test inside a setTimeout(..., 1) [17:57] yhahn has joined the channel [17:57] jashkenas: Aikar: if you want to make it work both sync and async style, just sniff for the callback: if (callback) callback(html) else return html; [17:57] Aikar: jashkenas: it wont work like that, i guess itll just never rank high on that sites chart :p [17:58] Aikar: my benchmark in the lib accurately reports average render time which is really damn fast so thats all that matters [17:58] Aikar: was just trying to see if i could get it to run in that site and compare [17:58] Max-Might has joined the channel [17:59] jashkenas: If you're not going to try to get it to run properly ... please delete it. [18:00] farhadi has joined the channel [18:00] matjas_ has joined the channel [18:00] yozgrahame has joined the channel [18:00] Aikar: doesnt look like itll let me other than blanking out the boxes [18:01] jashkenas: blanking it out and re-saving it will work. [18:01] jashkenas: thanks. [18:01] bradleymeck has joined the channel [18:01] Shahid_ has joined the channel [18:01] c4milo1 has joined the channel [18:02] softdrink has joined the channel [18:02] Aikar: blanking out testcase box doesnt work [18:03] jashkenas: It's alright ... I'll do it. No worries. [18:04] jashkenas: chapel: are you editing it right now? [18:04] chapel: no [18:04] chapel: well [18:04] chapel: I closed it [18:04] chapel: any way to cancel? [18:05] jashkenas: It's cool. [18:05] chapel: looks like Aikar wanted it removed, so I removed it [18:06] Aikar: well its not published now [18:06] sWORDs has joined the channel [18:07] Aikar: but yeah too much work to try to make it work sync [18:07] Aikar: the callstack could of been like 20 levels deep >_> [18:08] torgeir has joined the channel [18:09] karboh has joined the channel [18:11] vineyard has joined the channel [18:11] Qbix1 has joined the channel [18:12] Shahid_: HI Aikar i am shahid here again. now i install ubuntu in virtual box but i dont know to install nodejs in it because i am using linux first time [18:12] Shahid_: can u help me step by step [18:13] Aikar: Shahid_: im not really too experience with ubuntu, but apt-get install git would be a good first step, then git clone git://github.com/ry/node.git ~/nodesrc [18:13] Aikar: then cd ~/nodesrc and do ./configure && make && sudo make install [18:14] jetheredge has joined the channel [18:15] Aikar: err prolly gonna need 'sudo apt-get install git' [18:15] stride: build essentials and openssl-dev (or whatever that's called there) as well [18:15] Aikar: it was weird on debian [18:15] Aikar: libssl-dev i think [18:16] w0rse: Shahid_: http://www.codediesel.com/linux/installing-node-js-on-ubuntu-10-04/ [18:17] bpedro has joined the channel [18:19] djacobs7 has joined the channel [18:19] jchris has joined the channel [18:20] tfe_ has joined the channel [18:21] mscdex: libssl-dev on debian distros and openssl-devel on centos/rhel [18:21] mscdex: :) [18:22] Aikar: Shahid_: follow that link but make sure you do the git method and not tarball as that tar link is old, and you will be good to go [18:22] Skhaz has joined the channel [18:23] mscdex: you don't even need git [18:23] mscdex: just download a tarball from github [18:26] sugardave has joined the channel [18:28] Aikar: jashkenas: actually looks like test prolly did work. just the others are alot faster, but i guess that means everyone of them perform very well lol. [18:28] Aikar: 1ms is perfectly acceptable (which is about what jquery got as the slowest) [18:28] benburkert has joined the channel [18:29] jashkenas: I don't know if two orders of magnitude slower than a decent implementation is acceptable ... but hey, if it works for you, right? [18:29] Aikar: im reporting 10k renders in 2.67s [18:30] Aikar: i could make a template engine that takes pure html and just outputs it for you, doesnt mean its a decent implementation but it sure will perform well! [18:30] jashkenas: that's pretty horrible, if you have 10k items in a list you want to show, and you need to update it. [18:30] jashkenas: And that's in a fast browser, man, try it in IE. [18:30] beawesomeinstead has joined the channel [18:31] Solsys has joined the channel [18:31] jashkenas: Aikar: all the other engines in that list are doing their job -- rendering a template based on data. None of them are just spitting an HTML string. [18:31] mytrile has joined the channel [18:32] Aikar: what i meant is at this level of performance it doesnt matter at all [18:32] Aikar: i strive for great performance, but when were talking NANOSECONDS difference here.... its kind of pointless to optimize [18:32] brapse has joined the channel [18:33] beawesomeinstead has joined the channel [18:33] Aikar: imo anything under 10-15ms is pointless to try to optimize. so at this point its 'use w/e one you like, they all perform great' [18:34] Aikar: to choose one over the other for performance reasons is beyond retarded [18:34] Shahid_ has left the channel [18:35] Shahid_ has joined the channel [18:35] stride: are you guys talking about serverside or clientside templates right now? [18:35] tmzt: Aikar: would .forEach be faster on a browser that supports that natively? [18:35] beawesomeinstead has joined the channel [18:36] Shahid_: when i am trying sudo apt-get install g++ curl libssl-dev apache2-utils [18:36] Shahid_: its give me this error [18:36] Shahid_: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? [18:36] jashkenas: tmzt: native forEach is still quite slow compared to a regular for loop. [18:36] Aikar: tmzt: prolly so since its native [18:36] Aikar: stride: mine is meant to be server side but i added it to his template benchmark that runs client side [18:37] dnolen has joined the channel [18:38] kippi has joined the channel [18:38] kippi: hey [18:38] stride: Aikar: ah, that json->html thing, right? [18:38] Shahid_: i am fadeup from nodejs installation i waste almost 2 days to make it fuctional :( [18:39] Aikar: yea [18:39] stride: Shahid_: what error are you getting? [18:39] kippi: I have just written a http server in node, its working for all files apart from two js files which it is unable to download [18:39] kippi: there are no errors on node that point me in the right direction [18:40] stride: kippi: mind to put your code on gist/pastebin? [18:40] Shahid_: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? [18:40] stride: Shahid_: are you root for that step? [18:40] Shahid_: when i run this command [18:40] kippi: stride: ok, will do that now [18:40] Shahid_: here is my terminal display [18:41] Shahid_: shahid@shahid-VirtualBox:~/Downloads/node-v0.2.6$ sudo apt-get install git-core E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? [18:42] stride: well, is another process using it? that could be another update manager, that GUI tool for package management that comes with ubuntu or another apt process that's still running elsewhere [18:42] franck34: Shahid_: do you have enought space on your disk ? [18:42] Shahid_: so what i do because in my life i used first linux and ubuntu [18:42] jimt_ has joined the channel [18:42] kippi: stride: my http server can be found at http://pastebin.com/wXG8re9E [18:43] kippi: it's downloading everything else apart from two of my js files [18:43] stride: Shahid_: in that case.. reboot, turn off that update thing in the taskbar and only open a terminal, then run above command again [18:43] stride: kippi: what node version are you using? [18:43] franck34: Shahid_: if you wana use teamViewer i can debug your stuff, but it's now or never [18:44] Shahid_: i have free space 900 MB [18:44] franck34: k [18:44] kippi: stride: 2010.12.30 node-v0.2.6 [18:44] franck34: Shahid_: you are on windows running ubuntu in virtualbox ? [18:44] stride: kippi: isn't the binary encoding stuff deprecated in 0.2.6 already? [18:45] mraleph: are there any known issues with current https implentation in HEAD of node.js? I am trying to make file uploading over https work but it seems that request objects abruptly stops emitting data events in the middle of upload [18:45] Shahid_: yes i have windows 7 and virtualbox and ubunto 10 [18:45] mraleph: uploading over http works just fine. [18:45] kippi: ah ok, so i need to find another way [18:46] franck34: mraleph: how many seconds ? try to know that. And then check timeout ? [18:46] stride: kippi: not sure though. try to just drop that encoding, you can just read& write it as buffers [18:46] franck34: Shahid_: if you want, i take the control of your computer using teamViewer and we can try to setup node together [18:46] Shahid_: ok dear let me download the teamviewer [18:47] codetonowhere has joined the channel [18:47] Shahid_: yes i know [18:47] mraleph: franck34: hmm. timeout. interesting hypothesis. does http and https have different timeout defaults? [18:47] franck34: Shahid_: you don't need. There is a "no install" version so you just have to execute it, give me your conferenceId and the numeral password [18:47] stride: kippi: what does it do for your js files? does it start to send something? (put some console.log()s into your code to see where it gets stuck) [18:47] franck34: mraleph: depending of node implementation. I know in apache there is "timeout" and "ssltimeout" [18:47] aconbere has joined the channel [18:48] franck34: mraleph: if you are using nginx in front of it, check timeout nginx side [18:48] lukegalea has joined the channel [18:48] franck34: mraleph: and finaly, is there a POST size limitation in node ? (like php or apache ..) [18:48] kippi: ok [18:48] stride: franck34: nope [18:48] mraleph: franck34: there is nothing between browser and node instance... and I am testing on a very small files (couple kb at most)... [18:48] admc has joined the channel [18:48] Shahid_: franck34 how i give u id and password here in this window [18:49] mraleph: request does not emit error [18:49] Shahid_: or is there any way to send private in irc [18:49] stride: franck34: for post, you basically get a stream. just like when you're reading a file. and can do anything you want with it [18:49] franck34: Shahid_: i've sent you a private message, can you see it ? [18:49] franck34: stride: ok. mraleph so timeout way or bug .. [18:49] awenkhh has joined the channel [18:49] stride: what timeout? [18:50] stride: the only timeout in node I know about is to detect dead tcp connections or something [18:50] tc77 has joined the channel [18:50] stride: mraleph: was https support in HEAD fixed already? I thought that's still work in progress [18:51] mraleph: stride: well. apparently it is still work in progress :-) [18:51] stride: heh :) [18:52] mraleph: stride: I am just playing around with node... simple dogfooding attempt: I am rewriting simple wiki that is hosted on my personal site from Lua to CoffeeScript+node.js [18:52] adambeynon has joined the channel [18:52] j64 has joined the channel [18:53] perlmonkey2 has joined the channel [18:55] tanepiper: hate upstart [18:55] kippi: ok, the problem is when I enable https [18:55] j64: hi guys. i decided to try out node.js today and started by running the short twitter example at http://www.nakedjavascript.com/going-evented-with-nodejs, but get the following: "node.js: 68: throw e; // process.nextTick error, or 'error' event on first tick". ideas? [18:55] kippi: is I run the server as http it works fine, [18:55] stride: j64: what's the rest of the error/stack trace? [18:56] tfe_ has joined the channel [18:56] stride: kippi: might be https in your node version is broken, maybe try to setup a proxy in front of it that does https for you if you really need it [18:57] skampler: j64: it could be that you're using a version of node that is incopatible with the one used for that tutorial [18:57] kippi: might try the beta [18:57] j64: stride: http://pastebin.com/Su43GK8J [18:57] blueadept has joined the channel [18:57] skampler: j64: indeed that blog post is from 2009 [18:57] j64: skampler: i'm almost certain that i am - the post is more than a year old. nonetheless, i'd like to understand what's wrong [18:57] stride: kippi: might be that it's still broken, my dayjob kept me from following that topic the last weeks :) [18:58] kippi: stride: ah ok, do you have a link to the topic? [18:58] stride: j64: replace that close() line with end() [18:59] stride: kippi: uh, I meant the discussions here in irc. don't know if the node-dev mailing list has anything on that [18:59] kippi: ah [18:59] kippi: going to try 3.6 [18:59] j64: stride: thx. got the following error instead: response.setBodyEncoding("utf8"); [18:59] kippi: and i'll let you know how i get on [18:59] j64: TypeError: Object # has no method 'setBodyEncoding' [19:00] stride: j64: setEncoding instead I guess [19:00] j64: stride: thanks! works [19:00] stride: np [19:01] Jonasbn_ has joined the channel [19:01] j64: i am so incredibly eager to start doing something serious with node, but the lack of documentation and the speed at which the core language changes are pretty off-putting. does anyone know if there's a book in the works or something like that? [19:02] j64: the speed at which node.js changes is of course good as well, but you know what i mean [19:03] clarkfischer has joined the channel [19:03] stride: lack of documentation? [19:03] stride: node-faq: show masteringnode [19:03] Ari-Ugwu has joined the channel [19:03] node-faq: stride: masteringnode is "http://visionmedia.github.com/masteringnode/" [19:04] stride: there's that thing, and some others iirc. but at the current speed of development.. any "book" will be outdated at the time it leaves the printer / the download finishes [19:04] SamuraiJack__ has joined the channel [19:04] j64: true... [19:05] davidascher has joined the channel [19:06] stride: howtonode.org is a good resource for beginners as well I guess [19:06] Aikar: hmm? node is pretty decently documented [19:06] sudoer has joined the channel [19:06] Aikar: https://github.com/ry/node/tree/master/doc/api/ [19:06] Aikar: on the site too but thats 'always the latest' [19:07] stride: Aikar: I think he's referring to resources for beginners. the API docs are certainly a good reference [19:07] wdperson has joined the channel [19:08] Aikar: https://github.com/ry/node/issues#issue/104 [19:08] Aikar: anyone notice something wrong about that post lol [19:08] GasbaKid has joined the channel [19:08] Aikar: "latest version of node" lol [19:09] j64: aikar: stride is right. the api docs are good, but i just want to get up to speed quickly. a walk through for setting up some basic realtime CRUD app would be helpful, for instance [19:10] stride: j64: the material on camp.nodejs.org might have something like that [19:10] j64: thanks. i'll check it out [19:11] Aikar: oh 9mo ago, but its on very top of list >< [19:11] stepheneb has joined the channel [19:11] zzak has joined the channel [19:11] stride: didn't follow it too closely but I think they introduced express js (web framework) and socket.io (realtime data exchange via websockets w/ fallback to other transports) [19:11] hwinkel has joined the channel [19:13] kippi: ok, running node 3.6 now but need to fix my code as it errors no method 'setSecure' [19:13] tokumine has joined the channel [19:13] jimt has joined the channel [19:15] aaronblohowiak has joined the channel [19:17] rot13 has joined the channel [19:18] paulrobinson has joined the channel [19:21] stride: yeah, that was renamed iirc [19:21] rot13 has joined the channel [19:21] margle has joined the channel [19:23] pomodoro has joined the channel [19:27] iFire has joined the channel [19:29] MrTopf has joined the channel [19:30] MrTopf has joined the channel [19:31] philipharrison has joined the channel [19:32] brianleroux has joined the channel [19:33] boogyman has joined the channel [19:33] torgeir has joined the channel [19:35] Lerchmo has joined the channel [19:41] jimt_ has joined the channel [19:41] Lerchmo: I am using Express and attempting to decorate a function, or make some things available to it when it is called out of it's original context [19:41] Lerchmo: I am not able to get it to work right using closures [19:41] Lerchmo: any ideas? [19:42] Fuld: Is there a way to do response.write() from a module? [19:42] Evet_ has joined the channel [19:43] JusticeFries has joined the channel [19:45] pomodoro has left the channel [19:45] franck34: Fuld: pass http object in the module ? [19:45] pomodoro has joined the channel [19:45] Lerchmo: here is an example of my issue http://pastebin.com/VKmuBLTL [19:46] jimt has joined the channel [19:47] stepheneb has joined the channel [19:48] franck34: hu google chrome have a pastebin extension ... ;) [19:48] Shahid_ has left the channel [19:49] franck34: Lerchmo: i don't really have enought knownledge to be a big help, but, is "exports" not usefull in your case ? [19:49] kippi: how can I find out what methods 'setSecure' needs? [19:50] andrzejsliwa has joined the channel [19:50] tc77 has joined the channel [19:50] Lerchmo: franck34 unfortunately no, I am trying to pass data to my route handling functions, but not via a Require() [19:51] jimt has joined the channel [19:51] franck34: waitr [19:52] franck34: wow no sorry, not enought skill to help .. [19:53] heavysixer has joined the channel [19:55] void_ has joined the channel [19:57] vasudeva has left the channel [19:58] joshpeek has joined the channel [19:58] texodus has joined the channel [19:58] kippi: has anyone seen this before? has no method 'setSecure' [19:59] jimt has joined the channel [19:59] FMJag has joined the channel [20:00] mrkurt_ has joined the channel [20:00] mikeal: i don't believe node master has setSecure [20:00] mikeal: i think the API has changed [20:01] kippi: I can't seem to find any docs on this [20:01] tanepiper: not the only one with this issue: http://twitter.com/#!/andris9/status/29187613239812096 [20:02] mikeal: the API is quite different [20:02] adambeynon has joined the channel [20:02] Aikar: kippi: console.dir(server) [20:02] Aikar: and see what method in there may be it :P [20:03] iFire has joined the channel [20:03] maushu: kippi: use https [20:03] maushu: Let me see if I find the docs. [20:04] ezmobius has joined the channel [20:04] maushu: kippi, http://nodejs.org/docs/v0.3.6/api/https.html [20:04] maushu: here ya go [20:04] ayalque: hello all! do any of you use some kind of hot code loading technique? [20:04] jimt has joined the channel [20:04] kippi: ah great! [20:04] mikeal: ayalque: jspp has one built in [20:04] maushu: Don't forget to use the port 443. [20:05] maushu: If you want the default, that is. [20:05] ayalque: maushu: The Japanese Society of Plant Physiologists? [20:05] mikeal: but for the most part, hot code loading in node doesn't work [20:05] maushu: ayalque, why are you talking about pervert tentacle monsters? [20:05] ayalque: maushu: not you, sorry [20:05] CIA-89: node: 03Mikeal Rogers 07master * r8d37f80 10/ (lib/http.js lib/https.js): Expose agent in http and https client. - http://bit.ly/h3AT5q [20:05] mikeal: bringing up and down processes is what you mostly do [20:05] mikeal: sweet! [20:06] ayalque: mikeal: jspp? [20:06] maushu: ayalque, define hot code loading. [20:06] mikeal: http://www.jspp.io/ [20:06] femtoo has joined the channel [20:06] maushu: You mean reloading the process when the code changes? [20:06] Aikar: i like my code to be loaded cold, heat sucks! [20:06] mikeal: jspp files hot reload, but you still can't update your version of jspp without bringing up and down the process [20:07] maushu: Or maybe when the module code changes? Hmm. [20:07] mikeal: it doesn't work [20:08] ayalque: mikeal: wait i need to read what jspp is and then ill ask many other questions [20:08] mikeal: node core doesn't have a facility itself to do reloading [20:08] maushu: ayalque, well, first you need to prevent node.js from caching modules. [20:08] maushu: ^ [20:08] mikeal: we saw a potential facility in v8's "LiveEdit" features [20:09] maushu: then you need to handle the reloading yourself in your main file. [20:09] mikeal: but I'm skeptical it's going to work [20:09] ayalque: maushu: there is an uncachemodule kind of thing isnt there? [20:09] mikeal: no [20:09] mikeal: there is a require.uncached [20:09] mikeal: i think [20:09] Aikar: i tried to do that, but other modules that have included said file will still point to the old cached one [20:09] maushu: ...not, really. By "handle the reloading yourself", i mean overwrite the references. [20:09] mikeal: you can import not from cache, but i don't know of a way to clear a module from cache [20:10] mikeal: jspp can do this because it wraps the require statement [20:10] springify has joined the channel [20:10] mikeal: and the files jspp loads to serve are kept in memory and a file watcher clears them when they change [20:10] mikeal: the files themselves don't keep module references [20:10] mikeal: so it wokrs, but that's structured at a high level to support it [20:10] awenkhh has joined the channel [20:11] o_o has joined the channel [20:11] mikeal: using the filesystem as the API helps [20:11] mikeal: you can structure your own thing to do reloading at a high level, but node internals aren't going to help you :) [20:12] ROBOTARMY has joined the channel [20:12] GasbaKid has joined the channel [20:12] teemow has joined the channel [20:13] dgathright has joined the channel [20:15] Evet_: should i implement http into tcp server? [20:15] Evet_: to parse requests efficiently [20:15] mraleph: ryah_: ping [20:15] ryah_: mraleph: pong [20:16] mraleph: ryah_: is there any known issues with req.pause()/req.resume() for requsts produced for https server? [20:17] jimt_ has joined the channel [20:17] ryah_: mraleph: not that i know of. what are you seeing? [20:18] franck34: Evet_: you are definitivly low level LOL. Feel free to bind scapy into node, or invent an API to play with tcp/udp/icmp/arp stuff lol [20:18] franck34: i'll buy it [20:19] franck34: and vrrp btw [20:20] ayalque: mikeal: oh ok i can't use jspp im already using Jade via Express [20:20] Evet_: franck34: plain-text protocols are easy to implement [20:20] ayalque: .. hmm which is dynamically loaded.. [20:20] mraleph: ryah_: well... I am still trying to understand what I am seeing :-) there is a felixge's module called formidable for uploads handling it goes nuts when I try to use it with https --- it seems that request continues to emit data events even after it was paused. when I wrap request into my own 'fake' request which has internal queue for received data everything goes back to normal... [20:21] mraleph: ryah_: but I am still digging --- too much spaghetti :-) [20:21] ryah_: mraleph: req.pause() does not imply that 'data' events will stop immediately [20:21] ryah_: only that they'll stop very soon [20:22] mraleph: ryah_: huh. lol. docs say nothing like this... so mr. Felix has to fix his module [20:22] ryah_: i think felix knows this [20:24] mraleph: but it seems that he relies on a different behavior in his module. [20:24] mraleph: but ok. thanks for clarifying pause semantics. [20:24] sudoer has joined the channel [20:25] franck34: Evet_: are you saying it's should be easy for you to make a module playing vrrp stuff by example ? [20:26] franck34: Evet_: if yes, plz leave me your email in private ! [20:26] iFire has joined the channel [20:31] philipharrison has joined the channel [20:31] zikes has joined the channel [20:32] jakehow has joined the channel [20:36] davidascher has joined the channel [20:39] mraleph: ryah_: ok. I figured it out. if you do pause/resume on https request after some time it stops emitting data events and does not emit end event... so it stalls somewhere. https://gist.github.com/792420 [20:39] mraleph: Felix apparently has nothing to do with this :-) [20:43] Evet_: franck34: heh. i will take a look at vrrp [20:43] kippi: I am getting 200 OK from the server, but getting a blank page, could someone have a look at http://pastebin.com/YzSxpzSQ [20:44] kippi: seems to work ok on a html page, [20:45] Aikar: Evet_: if you think the http class is ineffecient and you could do better, then fork node, implement changes and send it to ryan :) [20:45] tlrobinson has joined the channel [20:45] mike5w3c_ has joined the channel [20:46] aelaguiz: hrm does socket.io prevent timers from firing when data is pending? My game rendering loop is not firing while incoming data is being read/processed [20:46] Me1000 has joined the channel [20:48] joshpeek has joined the channel [20:48] sstephenson has joined the channel [20:48] svenlito has joined the channel [20:48] tfe_ has joined the channel [20:48] FMJag has joined the channel [20:51] tfe_ has joined the channel [20:52] ezmobius has joined the channel [20:52] bpedro has joined the channel [20:52] sivy has joined the channel [20:52] kunley has joined the channel [20:55] dthompson has joined the channel [20:56] aklt has joined the channel [20:56] philipharrison has joined the channel [20:57] ezmobius_ has joined the channel [20:57] felixge has joined the channel [20:57] felixge has joined the channel [20:58] desaiu: i don't understand addons, i understand modules, can someone try to clarify? [20:58] desaiu: ACTION is reading the api  [20:59] sh1mmer: addons are extensions to v8 written in c [20:59] sh1mmer: modules are written in JS [21:00] sh1mmer: often there is a combination of the two [21:00] sh1mmer: an addon to expose some new low level api and then a module which makes into a real JS api [21:02] mraleph: ryah_: so should I create an issue for this or my code snippet is just broken? [21:02] desaiu: thank you sh1mmer [21:10] CIA-89 has left the channel [21:11] adambeynon has joined the channel [21:13] davidascher has joined the channel [21:13] bpedro has joined the channel [21:14] skm has joined the channel [21:18] theasta has joined the channel [21:18] piscisaureus has joined the channel [21:20] TheEmpath2 has joined the channel [21:21] bmizerany has joined the channel [21:23] tfe_ has joined the channel [21:23] malkomalko has joined the channel [21:24] piscisaureus: ACTION hi [21:24] aconbere has joined the channel [21:24] kjeldahl has joined the channel [21:25] malkomalko: anybody know a good strategy to handle deep objects without worrying about undefined's and TypeError: Cannot read property errors? like if one.two.three to return back a sane default instead of throwing? [21:27] Aria has joined the channel [21:27] charlenopires has joined the channel [21:28] pandark_ has joined the channel [21:29] zemanel: hi [21:32] ossareh has joined the channel [21:32] stephen_mcd has joined the channel [21:32] warz has joined the channel [21:33] desaiu: What are partials and collections? [21:33] desaiu has joined the channel [21:34] allengeorge has joined the channel [21:34] allengeorge has joined the channel [21:34] Mike_Rice has joined the channel [21:34] stride: malkomalko: nothing in JS afaik, I'd suggest to use some custom helper function for that [21:35] malkomalko: figured.. building one right now [21:35] neynenmo has joined the channel [21:35] malkomalko: it's annoying checking hasOwnProperty and undefined's all over the place [21:37] zemanel: i'm trying to brainstorm a bit around node.js async behavior, anyone here aware of jboss seam conversations? [21:37] Mike_Rice: Hey node, has anyone run into this with http-agent [21:37] Mike_Rice: { message: 'ENOTFOUND, Domain name not found', [21:37] Mike_Rice: stack: [Getter/Setter], [21:37] Mike_Rice: errno: 4 } [21:37] Mike_Rice: ? [21:38] Mike_Rice: request works fine [21:38] theasta has left the channel [21:42] jesusabdullah: What's jboss? [21:42] jchris has joined the channel [21:42] zemanel: a company [21:42] zemanel: Seam is a framework [21:42] jesusabdullah: Make a framework! LIKE A JBOSS [21:43] zemanel: facepalm(callback) [21:46] kunley: does spark have any option for code reload or restart on file change? [21:46] tanepiper: jesusabdullah: lol [21:46] bpedro has joined the channel [21:46] tanepiper: reddit reader spotted [21:48] HerrTopf has joined the channel [21:49] mnbvasd: lol [21:50] mnbvasd: ACTION giggles [21:50] mnbvasd: I like how everyone loves to create their own frameworks, but never uses them. [21:51] mnbvasd: ;) [21:52] altamic has joined the channel [21:53] stride: tanepiper: link or it didn't happe [21:53] stride: n [21:56] zemanel: i wasnt thinking about creating a new framework [21:56] skohorn has joined the channel [21:56] zemanel: im just thinking on improving this http://paste.pocoo.org/show/325669/ in a new way [21:59] JimBastard has joined the channel [21:59] JimBastard: 6 hour project, go! http://bugger.nodejitsu.com/ [21:59] kippi has joined the channel [22:00] JimBastard: <3 webservice.js + stack + node-static + resourcer [22:01] pkrumins: zemanel: that has already been solved a dozen of times, see Step or node-seq. [22:02] kippi: can anyone see why this code works fine with html but won't load any page with .js. if i pull the .js files they are loading correctlu [22:02] kippi: http://pastebin.com/YzSxpzSQ [22:03] zemanel: pkrumins: hum i see [22:03] zemanel: still ... [22:04] yozgrahame has joined the channel [22:04] pkrumins: k nothing wrong with solving it yourself to learn better node [22:05] kippi: pkrumins: where would i start? all the requests are coming back 200 ok [22:07] zemanel: pkrumins: i'm just looking at several concepts like mapreduce, pubsub and etc to see if there could be a fit in this [22:08] Me1000 has joined the channel [22:09] Me1000 has joined the channel [22:12] dekz has joined the channel [22:13] unlink: What is the state of the art for packaging modules which have extensions? [22:13] unlink: my library is 1/2 C++, 1/2 JS [22:16] aklt has left the channel [22:18] robtmr has joined the channel [22:18] MrTopf has joined the channel [22:19] bingomanatee: Anyone have a jQuery CDN they prefer ? [22:19] masahiroh has joined the channel [22:20] robtmr has joined the channel [22:21] farhadi: ryah_: are you around? [22:21] kippi has left the channel [22:22] djacobs7 has joined the channel [22:23] masahiroh has joined the channel [22:26] saul_ has joined the channel [22:26] saul_: hola amigos [22:26] tanepiper: my refactor today is either madness, genius or a bit of both :D [22:27] saul_: so i'm trying to create my own kind of http server, 'inheriting' from what's returned by http.createServer [22:28] bingomanatee: tanepiper: of what? [22:28] saul_: so i just want to have myserver.createServer return an object in a similar fashion, that's just like node.js' http server but with my own functionality added on [22:28] saul_: how do i do this properly? [22:28] bingomanatee: saul_ have you looked at express? [22:28] saul_: bingomanatee: only very briefly [22:28] unlink: return new MyServer() from createServer? [22:28] gattuso has joined the channel [22:28] saul_: unlink: yes but then that doesn't have the .listen()/etc functions on it [22:29] unlink: are you sure you're correctly inheriting? [22:29] bingomanatee: If you are still feeling your way around I'd look at express - you can write plugins to augment its functionality but the overal lsystem will save you a lot of time. [22:29] piscisaureus_ has joined the channel [22:29] saul_: unlink: no, i don't know what 'correct' inheritance is in js/node.js, that's what i'm asking [22:29] unlink: saul_: read the source of node's libraries to start [22:29] unlink: lib/*.js [22:29] saul_: that's...underacceptable [22:30] unlink: :-( [22:30] piscisaureus: any posix experts here? [22:30] saul_: i've been looking at example js code all day, i want to read prose, not source, at this point [22:30] bingomanatee: ... [22:31] bingomanatee: Can't give you much help. Most Noders are too busy breaking new frontiers to document their work. [22:31] saul_: i'm getting a little frustrated with the way the js community thinks source code is acceptable documentation [22:31] bingomanatee: Give me some time ... [22:31] piscisaureus: mount /dev/sdc1 /media/hd [22:31] unlink: saul_: saul_ https://github.com/ry/node/blob/master/lib/http.js#L786 [22:31] piscisaureus: stat(/media/d) [22:32] piscisaureus: what does that stat? the /media/hd directory or the root of /dev/sdc1? [22:32] saul_: yeah, that's what i'm talking about, 'util.inherits(Server, net.Server);' does not give me enough information [22:32] saul_: there's so much context required to understand what that means [22:32] saul_: i'll check out express [22:33] saul_: i'm worried that node.js may be a little too "bleeding-edge" to get code actually working [22:34] saul_: i like the concept and i don't want to have to revert to django just to get something done [22:34] saul_: but it kinda sounds like maybe i should wait another year or so to let node.js settle a bit [22:35] tanepiper: bingomanatee: commercial app [22:35] robtmr has joined the channel [22:35] MikhX has joined the channel [22:35] Fuld: http://mailinator.blogspot.com/2008/02/kill-myth-please-nio-is-not-faster-than.html [22:35] tanepiper: you can't see the source - but the refactor was inspired by looking at drty, so it now has a proper command line app [22:39] saul_: unlink and bingomanatee: thanks for the help and pointers, sorry if i'm a little cranky today [22:40] ryah_: Fuld: you should note that that article is explicitly about the JVM [22:41] ryah_: which is miles above the kernel/userspace boundary [22:41] CIA-99 has joined the channel [22:42] felixge: ryah_: https://github.com/felixge/node/commit/8e15bdd8c17ba110a475c52b278e17fffae7bef1 [22:43] felixge: ryah_: no change in functionality, but moves the commonjs module system into lib/module.s [22:43] felixge: * lib/module.js [22:43] ryah_: it would be incorrect to make inferences about kernel non-blocking i/o based on JVM nio. [22:45] ShizWeaK_ has joined the channel [22:45] echosystm has joined the channel [22:46] ryah_: felixge: [22:46] ryah_: Command: build/default/node /home/ryan/projects/node/test/message/undefined_reference_in_new_context.js [22:46] ryah_: [00:33|% 100|+ 163|- 1]: Done [22:46] felixge: hmm [22:46] felixge: is that on test-all ? [22:46] felixge: or just test ? [22:46] ryah_: did you not get that? [22:46] ryah_: just test [22:47] felixge: running again to make sure [22:47] echosystm: SubStack: will dnode work over HTTPS ? [22:47] ryah_: felixge: 'make test-messages' [22:47] piscisaureus: ryah_: that one fails persistently on windows as well. I think I may be something different. [22:47] ryah_: felixge: 'make test-message' [22:47] Me1000 has joined the channel [22:47] felixge: ryah_: weird, didn't get this fail on my first run [22:47] felixge: ryah_: fixing it now [22:48] ryah_: there's an extra frame [22:48] ryah_: at Object. (/home/ryan/projects/node/test/message/undefined_reference_in_new_context.js:10:8) [22:48] ryah_: i'll add it [22:49] desaiu: can you specify what dependencies npm should also download when fetching a module? [22:49] desaiu: when you are creating a module [22:49] SubStack: echosystm: yes [22:50] felixge: ryah_: ok, wow, I didn't even know we had tests like this :) [22:50] kunley has joined the channel [22:52] Fuld: Why does node.js scale better than threadpools that only use non-blocking calls? [22:52] echosystm: uh... [22:52] Fuld: Especially on multicore servers [22:53] randy- has joined the channel [22:53] echosystm: scalability is something you cant make sweeping generalisations about Fuld [22:53] ryah_: felixge: yeah, they're useful when you don't trust $? [22:53] ryah_: felixge: testing that it prints the right error and stuff [22:54] Fuld: Yes, let me be more specific [22:54] felixge: ryah_: yeah, it's a good idea [22:54] echosystm: basically node is about writing scalable systems that are reliable and easy [22:54] echosystm: your average threaded app is going to need a lot of testing etc. its harder to design etc. [22:54] Fuld: By scalability, I mean handling more clients per second without crashing / dropping connections. I don't mean better per-client performance. [22:55] piscisaureus: ryah_: (please don't mind) [22:55] piscisaureus: mount /dev/sdc1 /media/hd ; stat(/media/hd) [22:55] piscisaureus: what gets stat'ed? [22:55] Fuld: Right, node.js has a simpler model [22:55] felixge: saul_: sorry to hear you're having troubles with getting into node. It's still young, but if you want non-blocking i/o it's probably worth the time to figure some things out by yourself [22:56] echosystm: basically, in circumstances where you would use multiple threads with non-blocking IO, in node we would use multiple processes [22:56] Fuld: echosystm: So what's that, multiple node.js instances with a broker? [22:56] ryah_: piscisaureus: ? [22:56] ryah_: piscisaureus: the test/message tests should be easy to fix [22:57] ryah_: piscisaureus: you should run test/message/undefined_reference_in_new_context.js and show me the output [22:57] piscisaureus: ryah_: will look into that, maybe I was too quick ... [22:57] ryah_: they're also good tests to have running - they just show that node is booting up properly [22:58] saul_: felixge: i'm probably just trying to learn too many things at once. i've been writing network code in C/C++ for about 15 years, and i'm fluent in python, but i only recently started playing with javascript [22:58] Fuld: ACTION is relearning computer science. [22:58] piscisaureus: ryah_: https://gist.github.com/792549 [22:59] saul_: so it's frustrating to know that i could code so much 'faster' in C++ or python [22:59] piscisaureus: ryah_: without felix's patch [22:59] ryah_: piscisaureus: oh, that looks good. perhaps the test runner doesn't work on windows... [22:59] TheEmpath2: 654% faster than jQuery selectors: http://jsperf.com/jquery-selector-vs-pre-cached-displayobjects [22:59] saul_: i like the async nature of node.js, and the small things i've gotten working are pretty neat [23:00] ryah_: piscisaureus: test/message/testcfg.py [23:00] ryah_: piscisaureus: that's the code thta runs "make test-message" [23:00] saul_: if i had K&R for javascript i'd be much happier. i just learned about 'arguments' today [23:00] CIA-99: node: 03Felix Geisendörfer 07master * r5a49f96 10/ (3 files in 3 dirs): [23:00] CIA-99: node: Move commonjs module system into lib/module.js [23:00] CIA-99: node: This de-couples NativeModule from the module system and completes the [23:01] piscisaureus: ryah_: checking the test runner [23:01] MikhX has joined the channel [23:01] Mike_Rice has joined the channel [23:01] felixge: saul_: well learning a new language & young platform at the same time must be ultra frustrating :) [23:01] c4milo1 has joined the channel [23:01] piscisaureus: ryah_: if it was the stat question that you didn't understand, what do you get on posix when you stat a mount point? Is it the same as if nothing were mounted, or does it stat the root dir of the mounted device? [23:02] saul_: felixge: heh, yeah, i feel groundless [23:02] felixge: ryah_: thanks for merging [23:02] felixge: ryah_: I'll pick up the discussing with isaacs now about more general module system changes [23:03] felixge: saul_: actually I have a good link for yu [23:04] felixge: saul_: http://eloquentjavascript.net/ [23:04] saul_: felixge: awesome, thank you [23:05] felixge: saul_: it's a pretty concise introduction generally following best practices [23:05] ryah_: felixge: thanks for the patch :) [23:06] felixge: saul_: prototypical inheritance is a bitch, but as far as util.inherits goes: It copies all methods of the class you inherit from, but you still have to call the parent constructor from your constructor [23:06] saul_: got it [23:06] felixge: saul_: which can be done using: ParentClass.call(this) [23:06] cainus: hey all... any express users around? I can't find any docs for multipart file upload support... [23:07] saul_: felixge: thank you for being so helpful [23:07] saul_: you're one of the principal devs on node.js, right? [23:07] ryah_: piscisaureus: i still don't understand the question... [23:07] felixge: saul_: I'm a frequent contributor. There is no official dev team afaik :) [23:07] felixge: cainus: I think there is no multipart client module yet [23:08] felixge: cainus: Initially I was planning on doing it as part of my node-formidable module, but then I realized people would expect a full-blown http client - something I'd rather not burden myself with :) [23:08] cainus: i'm looking for server support though [23:08] unlink: What is the etiquette for packaging modules which depend on libraries which are not hosted by npm? [23:08] piscisaureus: ryah_: ok. [23:08] piscisaureus: 1. result1 = stat (/mnt/a) [23:08] piscisaureus: 2. mount something at /mnt/a [23:08] piscisaureus: 3. result2 = stat(/mnt/a) [23:08] piscisaureus: result1 != result2 ? [23:08] yozgrahame has joined the channel [23:09] felixge: cainus: for server support there is node-formidable, there is an express module [23:09] cainus: ahh nice [23:09] ryah_: piscisaureus: true [23:09] ryah_: piscisaureus: i think... [23:10] cainus: felixge: looks great... thanks... I'll give it a try [23:10] felixge: cainus: https://github.com/visionmedia/connect-form is what you're looking ofr I think [23:10] TheEmpath2: sonotos: JSPerf is not reliable. [23:10] TheEmpath2: ACTION sighs. [23:11] ryah_: piscisaureus: https://gist.github.com/792561 [23:11] cainus: cool...even better [23:11] piscisaureus: ryah_: I need to implement stat on windows because on windows stat does lstat. [23:11] piscisaureus: so I need to get what it should do :-) [23:11] piscisaureus: what you just told me is that I don't also follow symlinks but also mount points [23:11] piscisaureus: which makes my life easy, so thanks :-) [23:12] ryah_: i thought you odn't have symlinks on windows [23:12] dspree has joined the channel [23:12] unlink: Are there suppressions files for using node/v8 under valgrind lying around somewhere? [23:13] Lorentz: ryah_: It's actually there. [23:13] piscisaureus: ryah_: they are there. no worries. I will make them work as good as it gets. [23:13] Lorentz: http://en.wikipedia.org/wiki/NTFS#Symbolic_links [23:14] EyePulp has joined the channel [23:14] Aikar: ugh [23:14] piscisaureus: Lorentz: real symlinks kinda suck because you need elevation to make them. But these don't: http://en.wikipedia.org/wiki/NTFS_junction_point [23:14] Aikar: how do you do a code block inside of a list item on markdown [23:15] farhadi: ryah_: Hi, I found a bug and wrote a test and patch for it: https://github.com/ry/node/pull/578 [23:15] Fuld: Are multiple node.js servers the only way to take advantage of multi cores? [23:15] altamic has joined the channel [23:15] ryah_: Fuld: yes [23:16] piscisaureus: Fuld: file i/o will use multiple threads. but yah, you need multiple processes [23:21] Me1000 has joined the channel [23:22] jameshome has joined the channel [23:23] robtmr has joined the channel [23:23] jameshome: anyone have an ETA for Mongoose 1.0 in npm? [23:24] CIA-99: node: 03Ali Farhadi 07master * rd81afcb 10/ (lib/http.js test/simple/test-http-request-end.js): Fixing bug in http request's end method. - http://bit.ly/e3QiFH [23:24] hornairs has joined the channel [23:25] tim_smart: ryah_: Did you ever find out what was causing the issue with https.request and throttling? [23:26] ryah_: tim_smart: no. but do you understand the semantics of req.pause() ? that it doesn't stop 'data' from being emitted immediately [23:26] tim_smart: ryah_: I mean throttling the response [23:26] ryah_: same with res.pause() [23:27] ryah_: you have to be prepared to handle 'data' events always [23:27] tim_smart: ryah_: That shouldn't be a problem, but it is breaking .pipe() [23:27] ryah_: tim_smart: ah. can you give an example? [23:27] tim_smart: So data is being lost somewhere. [23:28] tim_smart: ryah_: https://gist.github.com/844e670ab8a7187e12ee [23:28] tim_smart: I'm not getting the full response written to the file. [23:28] tim_smart: If I remove the throttling logic, it will work as expected. [23:29] MrWarGames has joined the channel [23:30] piscisaureus: ryah_: test runner is ok, but the .out file has forward slashes that are backslashes on win [23:30] ryah_: tim_smart: hm, seems to work... [23:30] ryah_: piscisaureus: i see [23:30] tim_smart: ryah_: Let me update node and try again. [23:31] ryah_: piscisaureus: let me fix that [23:31] piscisaureus: ryah_: ok. great! [23:32] Mike_Rice: does request support https? [23:32] ryah_: Mike_Rice: yes [23:32] farhadi has left the channel [23:32] Mike_Rice: http-agent relies on request, right? [23:32] CIA-99: node: 03Ryan Dahl 07master * r5551846 10/ test/message/undefined_reference_in_new_context.out : windows compat: undefined_reference_in_new_context test - http://bit.ly/h9iUgO [23:32] ryah_: Mike_Rice: require('https').request() [23:32] Figaroo has joined the channel [23:33] piscisaureus: ryah_: +1 for the lazy solution. verified ok [23:33] ryah_: piscisaureus: good :) [23:33] tim_smart: ryah_: Nope no cigar. https://gist.github.com/b3c40c36f2ab7b8d8205 [23:33] aconbere has joined the channel [23:33] ryah_: tim_smart: oh, i see [23:33] ryah_: tim_smart: yeah, i get that too [23:34] Mike_Rice: ryah, are you Ryan Dahl? [23:35] ryah_: Mike_Rice: yes [23:35] Mike_Rice: congrats on wiki: BDFL [23:35] Figaroo: you the man, Ryan! xP [23:36] ryah_: heh [23:36] mape: hmm [23:36] Mike_Rice: do you have any association with nodejistu? [23:36] Figaroo: Is there a Node team or is it just you ryah_? [23:36] ryah_: Figaroo: lots of people contribute [23:37] Figaroo: Oh cool. But in the end, you decide what goes into the codebase? [23:37] ryah_: yes [23:38] Mike_Rice: ryah, do you work for/with nodejistu? [23:38] tanepiper: anyone familiar with upstart? [23:38] echosystm has joined the channel [23:38] ryah_: Mike_Rice: no [23:38] Mike_Rice: :-( [23:38] ryah_: i work at joyent [23:39] Mike_Rice: do you have Node.js PAAS? [23:39] ryah_: yes, http://no.de [23:40] Mike_Rice: ::nice:: [23:40] jameshome: oooh, it's out of beta? [23:40] Figaroo: what is joyent exactly? A hosting service? [23:40] ryah_: cloud software vendor [23:41] ryah_: they also run their own public cloud, but are increasingly moving towards being the "cloud OS" [23:41] dgathright has joined the channel [23:42] ryah_: tim_smart: strnage problem [23:42] cainus: what would be the advantage of hosting there rather than on some random vm slice? [23:42] ryah_: tim_smart: good though [23:42] jameshome: anyone can signup for No.de now? [23:42] Figaroo: ryah_, I'm not sure I understand. Is it like AS3? [23:43] dspree_ has joined the channel [23:43] dspree_ has joined the channel [23:44] tim_smart: ryah_: Yeah it is a bit strange. If it doesn't happen to http.request you can narrow it down to tls. [23:44] Mike_Rice: is request lib in another hub somewhere? [23:44] tim_smart: Mike_Rice: npm install request [23:45] Mike_Rice: I want to read it [23:45] tim_smart: It is maintained by mikeal [23:45] Mike_Rice: thanks [23:45] tim_smart: Mike_Rice: http://github.com/mikeal/request [23:45] ryah_: tim_smart: it may be that http just comes faster - so you get it all in one packet or something.. [23:46] ryah_: http works... [23:46] ryah_: well it's not the same content [23:47] tim_smart: ryah_: Yeah may be. I'm just concerned it isn't propagating properly throught the tls stream layers. [23:48] ryah_: tim_smart: yes [23:48] ryah_: there seems to be a problem.. [23:48] Mike_Rice: is there a programming standard for node.js somewhere? [23:49] tim_smart: Mike_Rice: I.e. style conventions? [23:49] Mike_Rice: yes [23:49] Mike_Rice: tab = tab, or 4 spaces, etc. [23:49] sudoer has joined the channel [23:50] mraleph: ryah_: tim_smart: can it be the same problem I got today? https://gist.github.com/792420 --- if you do pause/resume on https request it just freezes at some point. (no more data events, no end event) [23:50] Figaroo: Why have style conventions? [23:50] echosystm: i tried to instigate one Mike_Rice and was met with deafening silence :P [23:50] tim_smart: mraleph: Yes [23:50] Mike_Rice: echosystem, lol [23:50] tim_smart: Mike_Rice: https://github.com/ry/node/wiki/Contributing [23:50] echosystm: just look at the standard library and try to copy that [23:50] echosystm: thats what i do [23:51] Mike_Rice: figaroo, because when I refuse to work with a library that doesn't enforce a tab as a tab [23:51] Mike_Rice: :-) [23:51] eee_c has joined the channel [23:51] mraleph: sadness. I had to redefine rq.pause = rq.resume = function () { } to make it work :-) [23:51] Mike_Rice: tim_smart, thanks [23:52] tim_smart: mraleph: Hmm. That doesn't work too well. [23:52] Mike_Rice: Contributing, 2.i - has two space indention = :-( [23:52] tim_smart: 2 space indentation <3 [23:52] Figaroo: Mike_Rice, maybe create a regex script that fixes it to conform to your conventions. I think that would be a really awesome feature in an IDE/editor. [23:53] mraleph: tim_smart: works fine in my case. especially if (as ryah_ says) pause does not imply immediate 'data' stop. [23:53] tim_smart: In vim you can just go :%retab! [23:53] Figaroo: ACTION perfers tabs [23:53] saschagehlich has left the channel [23:53] Mike_Rice: I like tabs, because in most ide's, you can go into options and choose how wide to make it [23:54] unlink: Is it possible to install two root-level modules via npm/package.json? [23:54] Mike_Rice: vs. forced spaces [23:54] Mike_Rice: this may be heresy, but I don't vim [23:54] piscisaureus: I don't like that pause() doesn't make data stop immedately ... [23:54] mraleph: tim_smart: as it does not guarantee that code should be always ready for the case when all remaining data events will be emitted before pause takes effect. [23:54] unlink: like two "main" directives [23:56] Figaroo: Mike_Rice: I like tabs for the same reason. Plus a single tab is one byte less than *two* space characters. [23:56] mraleph: unlink: btw if you are running v8/node under valgrind make sure that you are using the recent one. otherwise you might get a lot of strange crashes because valgrind was not politely notified about code patching v8 does. [23:57] Mike_Rice: figaroo, very true. [23:58] tim_smart: mraleph: I'm just saying making pause a noop will probably cause performance issues due to buffering. [23:58] tim_smart: Well, if it works as intended that is. [23:59] unlink: mraleph: the most recent v8? [23:59] echosystm: Mike_Rice: tabs vs. spaces is a bit of a pointless thing to discuss [23:59] echosystm: at the end of the day, it makes virtually no difference [23:59] mraleph: tim_smart: I am not using node.js in production with 1m users... not even 1k :-) I will be the only one who will be hitting this code path.