[00:00] sveimac has joined the channel [00:00] dgathright has joined the channel [00:02] AndroUser has joined the channel [00:02] edude03 has joined the channel [00:03] coreb: EM03: I have a pretty modest vpc with ubuntu server here. with node.js and "hello world" I get around 1150 req/s, "hello world" with express.js gives me around 650 [00:03] coreb: with a pretty simple jade template I get about 90 req/s [00:04] aaronblohowiak: coreb: that does sound like a modest box [00:04] coreb: it's a vpc running on a netbook [00:04] aaronblohowiak: vpc is a virtual machine? [00:04] coreb: so yeah, but the scale is the same [00:04] steveklabnik: heh. [00:04] coreb: virtual pc, yeah [00:05] hvgotcodes has joined the channel [00:05] aaronblohowiak: i dont know much about jade, sorry. [00:05] systemfault: Anyone uses emacs with js2-mode using comma-first style? [00:05] davidwalsh has joined the channel [00:05] coreb: aaronblohowiak: do you use any template engine with node.js at all? [00:06] aaronblohowiak: coreb: yes [00:06] aaronblohowiak: i use haml-js but i am thinking about switching to underscore templates [00:08] broofa has joined the channel [00:14] springmeyer has left the channel [00:14] kriszyp has joined the channel [00:15] flippyhead has joined the channel [00:16] brianloveswords has joined the channel [00:22] Bwen: I have problems grasping non-blocking concept in the following snippet still: http://pastie.org/1826913 I am trying NOT to execute the line server.listen(...) [00:23] mtsl has joined the channel [00:24] sveimac has joined the channel [00:24] indexzero has joined the channel [00:28] codeisforevea has joined the channel [00:30] Gigawattz: Heya guys, i need some advise ? [00:30] Gigawattz: advice* [00:30] Bwen: dont go to the bathroom for the next 3 days, thats my advice [00:30] Gigawattz: hehe [00:31] gtramont1na: hey has any1 ever used nodemock? is it good? alternatives? [00:32] sirkitree has joined the channel [00:34] AAA_awright: coreb: Make sure you've enabled Jade caching [00:37] avalanche123 has joined the channel [00:38] zivester: anyone have a recommendation for a templating system that has the ability to "wrap" / include other templates from within a template [00:39] sveimac has joined the channel [00:42] dgathright has joined the channel [00:43] AAA_awright: coreb: Take a look at the documentation if you're using plain old render() you have to specify some sort of name it can cache with [00:44] djcoin: damn node.js is awesome [00:44] djcoin: I made a quick enhanced chat [00:45] saikat has joined the channel [00:45] djcoin: There are some good thing on earth that is worth living, node, vim, git, linux ;b [00:45] djcoin: etc [00:46] sh1mmer has joined the channel [00:47] gtramont1na: Does anyone know a good node mocking framework? [00:50] tedsuo: Anyone know what version of JS node is running? [00:51] mscdex: djcoin: s/vim// [00:51] mscdex: :P [00:52] mscdex: tedsuo: https://github.com/joyent/node/wiki/ECMA-5-Mozilla-Features-Implemented-in-V8 [00:52] kmiyashiro: gtramont1na: What do you mean by "mocking"? [00:52] mikeal has joined the channel [00:52] kmiyashiro: like prototyping? [00:52] mscdex: like "nyah nyah nyah nyah i'm an http server!" [00:52] mscdex: :P [00:52] jesusabdullah: "ooh look at me I have nested callbacks" [00:53] kmiyashiro: just watch monty python [00:53] tedsuo: mscdex: thanks! [00:54] djcoin: mscdex: :) what do you use as an editor ? [00:55] cryptix has joined the channel [00:55] mscdex: djcoin: for quick edits in the console -- nano; for editing in gui -- notepad++/gedit [00:56] djcoin: mscdex: Honestly, you should consider tying Vim :] It s powerfull/fun to code [00:56] djcoin: Im enjoying programming just being in Vim [00:57] jesusabdullah: I've used vim and gedit and all kinds of stuff [00:57] djcoin: s/tying/trying/ [00:57] jesusabdullah: I'm fairly comfortable in vim, but still find myself using mostly gedit [00:57] jesusabdullah: strangely enough [00:57] djcoin: Well, i do not know much gedit, but it does not appeal to me [00:58] jesusabdullah: It's your typical easy-peasy gui editor [00:58] jesusabdullah: Has syntax hilighting, not much else [00:58] djcoin: On the other hand, i tried emacs for real, like writing a few lisp stuff, configuring it etc. Its a great soft, the way it handles custom "mode" is awesome and lacks in Vim. yet, it s not as friendly as Vim I think. Even with Vimpulse in it ! (Bring vim bindings to emacs) [00:59] djcoin: I use emacs for latex [00:59] Bwen: I use IntelliJ, the EAP version has a debugger for Node.js :) [00:59] gtramont1na: kmiyashiro: Mocks, on which I can spy function calls... [00:59] djcoin: :) [00:59] kmiyashiro: oh, I don't know that stuff [00:59] kmiyashiro: I'm just a designer [01:00] okuryu has joined the channel [01:00] davidcoallier has joined the channel [01:00] djcoin: gtramont1na: googled it https://github.com/arunoda/nodemock [01:01] djcoin: Cant guaranty anything :) [01:01] LukeGalea has joined the channel [01:01] mscdex: djcoin: i've tried vim over the years, it's just not as straight forward to me as nano [01:01] LukeGalea: hey all. Jeez, I'm having yet another Date issue with node/js. [01:02] mscdex: LukeGalea: shoo [01:02] mscdex: t [01:02] mscdex: lol [01:02] mscdex: LukeGalea: what's the problem? [01:02] marcello3d: bwen: intellij has a node.js debugger? when was this added? [01:02] gtramont1na: djcoin: I've found this one and posted a question here... If any1 has ever used it... or know any other tool [01:03] LukeGalea: mscdex: Thanks. Going nuts here ;) On ubuntu linux the unix date command returns the date in EDT. In node: new Date() shows me the UTC date, *but* new Date().getTimezoneOffset() returns 240!! [01:03] chrislorenz has joined the channel [01:04] LukeGalea: mscdex: I can't figure out how to convert from my server time to UTC in a way that doesn't require hard coding the actual offset from UTC (in this case 0 since despite being in EDT dates in node are being created in UTC).. [01:04] sechrist: Are there any canonical examples of handling chunked file uploads in node? [01:04] mscdex: LukeGalea: gettimezoneoffset() returns minutes relative to your local time zone [01:04] indexzero: anyone know how to get the list of all node.js core modules programatically? [01:04] mscdex: sechrist: formidable? [01:04] sechrist: mscdex: is that compatible with express? [01:05] mscdex: can't say, i've never used express yet [01:05] gouch has joined the channel [01:05] LukeGalea: mscdex: shouldn't new Date() return dates in my local time zone as well? [01:05] perezd has joined the channel [01:06] indexzero: jesusabdullah: wassup. the nodejitsu team is relaxing tonight after our training session today. [01:07] indexzero: except for me of course; must not sleep, must write javascript [01:07] marcello3d: Bwen: how do you use it? [01:07] lalithmaddali has left the channel [01:07] Bwen: marcello3d: its in the plugin, there is a NodeJS one [01:07] mike5w3c has joined the channel [01:08] okuryu has joined the channel [01:08] marcello3d: only on 10.5 EAP? [01:08] Bwen: yep [01:08] marcello3d: will check it out [01:08] Bwen: works pretty good :J [01:08] LukeGalea: mscdex: I feel like this is a pretty simple/common case. I just want to know what time it is right now in UTC.. but doing new Date() then adjusting based on timezoneOffset doesn't work because on this ubuntu machine it's returning dates already adjusted for UTC rather than in the local timezone. [01:08] coreb: AAA_awright: caching didn't make much of a difference. I suspect the layout isn't cached [01:09] mscdex: LukeGalea: there are UTC methods for Date objects [01:09] marcello3d: I've been using node-inspector, but if I can remove one tool from my toolchain, that's an improvement :) [01:09] Bwen: *shrug* dont know node-inspector [01:09] sveimac has joined the channel [01:09] marcello3d: it's pretty cool [01:10] marcello3d: basically the webkit debugger [01:10] marcello3d: but for node [01:10] andy_dawson has joined the channel [01:11] gouch has left the channel [01:11] mscdex: LukeGalea: when you're doing new Date() in ubuntu, are you doing this on the repl or in code? [01:12] sechrist: indexzero: is that house of air thing still going on? [01:12] indexzero: sechrist: yup. JimBastard is heading back to SF early next week [01:12] indexzero: I won't be there. Not heading to SF until after JSConf / NodeConf [01:12] sechrist: I emailed the email but don't think I got a response :\ [01:13] sechrist: ah [01:13] LukeGalea: mscdex: I've done both. [01:13] indexzero: sechrist: We had a lot of responses; hopefully there is still space. We've been busy preparing for the node.js training we gave today here in NYC [01:13] sechrist: awesome [01:14] sub_pop has joined the channel [01:15] LukeGalea: mscdex: I'm trying the UTC functions you mentioned. Awkward because you can't just get UTC ms.. have to get UTCDate, UTCMonth, etc, etc.. [01:15] LukeGalea: so to construct an actual Date object is tedious.. but should work. [01:15] LukeGalea: I still don't grok why new Date() isn't in local timezone.. [01:19] marcello3d: Bwen: is it possible to have intellij connect to an existing node instance? [01:19] fairwinds: kkaefer: was reading a bit of the bones code. Is there a sample app anywhere to examine? [01:19] mscdex: LukeGalea: it should be: (new Date()).toString() shows local time [01:19] seangaffney has joined the channel [01:20] marcello3d: this plugin kinda sucks :( [01:20] Bwen: pfftt :p [01:20] marcello3d: there's no way to pass arguments to your executable [01:20] marcello3d: and the console doesn't show colors like terminal [01:21] marcello3d: so I get fun stuff like [01:21] marcello3d: [2011-04-23 21:18:20.307] [ERROR] launcher - usage: %s %s [01:21] marcello3d: [2011-04-23 21:18:20.307] [ERROR] launcher - Error: '/usr/local/bin/node' [01:21] LukeGalea: mscdex: aargh.. yes!! Thanks. I was using console.dir... and that was obscuring it! Thanks!! [01:21] Bwen: marcello3d: well I dont know any better so, its fine with me :P [01:21] springmeyer has joined the channel [01:23] replore has joined the channel [01:23] marcello3d: bwen: go up-vote http://youtrack.jetbrains.net/issue/IDEA-68678 :D [01:24] constantx has joined the channel [01:25] LukeGalea: mscdex: thanks for your help. I [01:26] mscdex: np [01:26] Bwen: marcello3d: guests cant vote :D [01:26] LukeGalea: I'm embarrased at how much this timezone stuff has kicked my ass. I'm just so used to the railsy way of having the interpreter shift timezones to the client for each request that I keep floundering about as I try and manually convert to and fro.. [01:26] marcello3d: Bwen: that's easily solved ;) [01:27] Bwen: not if you are as lazy as me [01:27] marcello3d: it uses openid I think [01:27] marcello3d: just click the goog [01:28] marcello3d: http://youtrack.jetbrains.net/issue/IDEA-68679 [01:28] davidcoallier has joined the channel [01:28] stagas: LukeGalea: https://github.com/TomoUniversalis/DateZ [01:29] LukeGalea: stagas: Woah! [01:29] LukeGalea: That's nice. I tried Date.js but found it buggy as hell. [01:29] LukeGalea: This looks really nice! [01:29] LukeGalea: I wish I had found about it earlier in my project.. now I have so much shitty date handling code.. [01:30] kmwallio has joined the channel [01:30] marcello3d: why the hell are they working with timezone offsets [01:30] marcello3d: that's the worst way to work with timezones [01:31] marcello3d: http://youtrack.jetbrains.net/issue/IDEA-68680 [01:31] marcello3d: ok, that should do it :) [01:32] jdp has joined the channel [01:33] markstory has joined the channel [01:33] jmazzi has joined the channel [01:33] softdrink has joined the channel [01:34] jmazzi: I'm new to node. I've been listening for events until I hear them. When i do, i execute removeAllListeners 'event'. is that a good way to handle it? [01:35] perezd has joined the channel [01:36] gazumps has joined the channel [01:37] micheil has joined the channel [01:37] tk has joined the channel [01:38] dmojoryder_ has joined the channel [01:38] mscdex: jmazzi: why are you needing to remove them? [01:40] marcello3d: jmazzi: you can use ee.once() if you only care about the event once [01:40] AAA_awright: jmazzi: Just use the .once method [01:40] rpj8 has joined the channel [01:40] AAA_awright: And read the documentation on event handlers [01:42] softdrink has joined the channel [01:43] losing has joined the channel [01:46] SubStack: once <3 [01:47] SubStack: jmazzi: another trick is you can use an inline named function to ee.removeListener(evName, fn) [01:47] kmiyashiro: wait [01:47] perezd has joined the channel [01:47] SubStack: if you need to listen over several events before removing the listener [01:47] kmiyashiro: what if you do something like add a listener for 'end' on a response [01:47] kmiyashiro: do you really have to remove that? [01:48] SubStack: jmazzi: like this: ee.on('moo', function fn (x) { if (x > 5) ee.removeListener('moo', fn) }) [01:48] SubStack: but .once() works best for the usual case [01:50] devrim has joined the channel [01:50] kmiyashiro: once you end a response, don't all the listeners go away anyway? [01:51] c4milo1 has joined the channel [01:52] hassox has joined the channel [01:54] ChrisPartridge has joined the channel [01:54] cryptix has joined the channel [01:55] tmpvar: fr0stbyte, nice nick [01:55] tmpvar: kmiyashiro, pretty sure, yes [01:55] aguynamedben has joined the channel [01:56] softdrink has joined the channel [01:56] click_click has joined the channel [01:58] tedsuo: mikeal: you around? [01:58] indexzero: tmpvar: You know how to find all native node.js modules? Trying to list them programatically for this thing [01:59] indexzero: and by "native" I mean these: https://github.com/joyent/node/tree/master/lib [01:59] tmpvar: indexzero, sec [01:59] indexzero: tmpvar: k [02:03] davidcoallier has joined the channel [02:04] tmpvar: indexzero, i was hoping you could get at the NativeModule [02:04] indexzero: tmpvar: isaacs helped me [02:04] tmpvar: oh? [02:04] indexzero: Object.keys(process.binding("natives")) [02:04] tmpvar: nice [02:07] Gigawattz: anyone help me track down this issue, for some reason the response does not send, it just laod's in the browser ? http://pastebin.com/g5RnbKxY [02:07] Gigawattz: loads* [02:08] steveklabnik has left the channel [02:08] gm__: heya [02:09] gm__: anyone using zeromq with pub/sub ? [02:11] stagas: Gigawattz: ln 86 it's spelled wrong: handleReqeust [02:14] Bwen: how do I cast a string to an integer within node? [02:14] Gigawattz: @stagas, thankyou very much, i would of expected an error for something like that [02:15] rmustacc: Bwen: parseInt(string, base); [02:15] coreb: even though I enable "view cache" in development, I'm seeing ~6 times better performance on jade template rendering in express.js in production mode - any clues? [02:15] marcello3d: anyone here running node on production? [02:15] gm__: marcello3d: I do [02:15] marcello3d: what do you use to deploy/run your node apps? [02:16] Bwen: does anyone know why I have to wait a minute or 2 before the address/port is freed after it crashed ? keeps saying address is already in use but if I wait 2-3 minutes then its fine when I run it again. [02:16] rmustacc: Bwen: What OS? [02:16] gm__: marcello3d: to run and keep running I use supervisord [02:16] dhasenan has joined the channel [02:16] Bwen: rmustacc: kubuntu natty [02:16] gm__: to deploy I either make a debian pkg or use git itself depending on which component I'm deploying [02:17] rmustacc: That's a little surprising. [02:17] rmustacc: When the program crashes, it should appropriately close the Socket. [02:17] gm__: supervisord has been way better than god to take care of the processes [02:17] marcello3d: Bwen: is it really exited? [02:17] mscdex: marcello3d: i use upstart [02:17] rmustacc: It sounds like you're hitting the timeout for a tcp retransmit, etc. [02:17] marcello3d: mscdex&gm__: do you run multiple nodes or single instances? [02:18] rmustacc: So the kernel hasn't detected that the socket should actually be closed. [02:18] Bwen: marcello3d: yes it threw an exception and sent me back to prompt and its not in the netstat [02:18] gm__: marcello3d: both scenarios [02:18] mscdex: marcello3d: only one per program so far [02:18] gm__: marcello3d: for multiple http server instances I use nginx with backend proxy [02:18] marcello3d: and just round robin it? [02:18] ckknight: anyone know of an XML parser that properly preserves whitespace in CDATA blocks? [02:19] gm__: marcello3d: round robin & weight. I'm testing varnish to make some probes to check for open ports and other ideas [02:19] rmustacc: Bwen: An interesting test would be to see if that happens outside of Upstart. [02:20] marcello3d: gm__&mscdex: cheers :) [02:20] gm__: np [02:21] Gigawattz: What's the best way to send static content to the web-browser, [02:21] gm__: Gigawattz: a http server [02:21] mscdex: heh [02:21] davidcoallier has joined the channel [02:21] Gigawattz: gm__ lol, you know what I mean, images, icons, css, videos etc [02:22] mscdex: fs.readFile? [02:22] mscdex: :) [02:22] Gigawattz: i mean i know i can read a file in chunks and send a chunk per tick, but what about piping it down the socket ? [02:22] mscdex: you can do that [02:23] Bwen: anyone can help me understand netstat? O.o my node/server (http port 9000) is started but "netstat --tcp -n -p" does not list it... [02:23] mscdex: fs.createReadStream('foo.js').pipe(res) [02:23] Gigawattz: what would be more beneficial ? [02:23] mscdex: it's a one-liner [02:23] mscdex: :) [02:23] gm__: does anyone care to review some very early draft test code using zeromq to make a distributed event emitter ? [02:23] gm__: bear in mind that I'm pretty green to js and node [02:23] gm__: https://gist.github.com/939247 [02:23] Gigawattz: but is it C that handle;s the piping outside the event loop or .. [02:24] mscdex: Gigawattz: plus pipe handles everything for you [02:24] mscdex: no, it's in js [02:24] gm__: currently it is blocking so events received to be sent locally are not being broadcasted [02:24] Gigawattz: so regardless what method i use it's still requires the tick [02:24] mscdex: not necessarily, it just depends on when the chunks come in [02:25] mscdex: pipe() writes to the WritableStream as 'data' events are emitted [02:25] Gigawattz: so it's exactly the same as fs readfile then, just a one liner [02:25] mscdex: while paying attention to write's return value, etc [02:25] Bwen: ahh interresting it requires atleast 1 request to the port for netstat to show it. [02:26] rfay_ has joined the channel [02:26] mscdex: Gigawattz: kind of, but it handles a lot of other stuff too, like pausing and resuming and stuff [02:26] mickaelz has joined the channel [02:27] gm__: Gigawattz: I'm doing it using the browser and node only for the dynamic stuff - no templating. [02:27] Gigawattz: kool, so pipe is hte way to go :) [02:28] Gigawattz: gm__ what you mean, in the browser ? [02:29] gm__: I send all static stuff thru the http server [02:29] gm__: node only deals with dynamic stuff sending json around [02:29] whozman has joined the channel [02:30] Gigawattz: ooh you mean like apache [02:30] gm__: y or nginx as in my case [02:30] Gigawattz: yea yea [02:30] gm__: a;; assets and static stuff outside the app, no templating around [02:31] Gigawattz: well im trying to build a fully fledged system, i know node is not ready to be run on it's own but why not plan for it xD [02:32] gtramont1na has joined the channel [02:32] gm__: I think it's pretty ready to do that, I just make things separated for my convenience [02:33] hassox has joined the channel [02:33] EM03: express users around? [02:33] EM03: need some guidance [02:36] sechrist: EM03: i'm learning it [02:36] sechrist: trying to do some stuff with jade now [02:37] sechrist: Anybody know how to do conditionals in jade? [02:37] sechrist: I found the example conditional.jade and conditional.js [02:37] sechrist: but that makes it look like it isn't built into the language [02:39] jmazzi: thanks guys [02:39] sorens3n has joined the channel [02:40] EM03: sechrist: i have not checked into the template language but they are usually fairly simple and it looks like a haml thing [02:40] Bwen: going thru the File System methods and I cant figure what to use to see if a file exists... fs.stat(...) ? [02:40] jmazzi: AAA_awright, marcello3d use once instead of on? [02:42] mscdex: Bwen: path.exists() [02:42] Bwen: ahhh HA! Ty very much :) [02:45] gouch has joined the channel [02:45] sh1mmer has joined the channel [02:46] brianloveswords has joined the channel [02:46] sechrist: So does anybody know if I can put conditionals in jade templates? [02:46] sechrist: if not that seems kind of like a dealbreaker [02:47] Bwen: is Jade the one where there is no html tags? [02:47] sechrist: yea [02:47] Bwen: I found that a deal breaker [02:47] Bwen: :P [02:47] marcello3d: jade is like haml [02:48] Bwen: dont know haml [02:48] sechrist: looks like I want ejs [02:48] brweber2 has joined the channel [02:48] stagas: sechrist: - if (something)\n\tfoo [02:48] sechrist: oooh [02:48] jjmalina has joined the channel [02:48] sechrist: man [02:48] sechrist: see how am I supposed to find that [02:48] marcello3d: anything after - is just executed as javascript [02:49] marcello3d: it's on the front page [02:49] marcello3d: http://jade-lang.com/ [02:49] marcello3d: :) [02:49] marcello3d: (not what I said, but a demonstration of if) [02:49] sechrist: ACTION hurf durfs [02:49] Bwen: but I know that if i'm doing an html template there better be html in it... I cant imagine why you would want to markers for html tags... and then.. replacing them... O.o overhead... tyv [02:49] marcello3d: it's also on the docs under "Code" https://github.com/visionmedia/jade [02:50] stagas: now there's an html2jade thing https://github.com/donpark/html2jade [02:50] marcello3d: Bwen: it has html, it's just formatted as a tree rather than text [02:50] stagas: looks pretty cool [02:50] marcello3d: the advantage is it often looks cleaner when you have highly dynamic content [02:50] marcello3d: and it compresses more easily :) [02:51] marcello3d: and you can do fun stuff like custom tags [02:51] marcello3d: that generate html [02:51] Bwen: marcelo3d: you still have to use cpu time to convert it to proper html for the browser... I dont see why you would want to do that... [02:51] marcello3d: it compiles it [02:51] marcello3d: to something no different than ejs would compile to [02:52] Bwen: why compile it... just put html in the first place O.o [02:52] marcello3d: because you need to stick the dynamic data in? [02:52] stagas: Bwen: because you'd want dynamic content? [02:52] marcello3d: if your html is static, don't use jade, use html [02:53] Bwen: oh common. you are not going to put html tags in your Html template system because you want dynamic content? [02:53] Bwen: pretty sure there is better ways to do it [02:53] stagas: Bwen: html tags are there you just don't need to type < > and close them [02:53] marcello3d: who said there aren't html tags in it? [02:54] stagas: Bwen: have you even looked at it? [02:54] Bwen: I have to say no -.- [02:54] stagas: Bwen: say you want a
bar
in jade it's: #foo bar [02:55] Bwen: why? [02:55] click_ has joined the channel [02:55] marcello3d: jade is for when you're creating layout from scratch [02:55] marcello3d: not when you're working with existing html [02:55] marcello3d: although stagas' link kinda blurs that line [02:56] Bwen: why in the world would I ever want "#foo bar" instead of "
bar
" ? [02:56] siculars has joined the channel [02:56] Bwen: why create another language then the one you want to be doing... [02:56] Bwen: O.o [02:56] marcello3d: bwen: it's not something that can be explained :) [02:57] matt444 has joined the channel [02:57] stagas: because it's less typing = more work done in less time [02:57] marcello3d: you either understand or your don't [02:57] stagas: plus it's dynamic [02:57] matt444: how do I call an exports method from within the same file? [02:57] stagas: and you can stick js in it [02:57] marcello3d: matt444: exports.foo()? [02:57] matt444: ok [02:58] indutny has joined the channel [02:58] matt444: thanks [02:58] Bwen: i'm sorry I just find it hilarious... :P [02:58] pHcF has joined the channel [02:58] stagas: and it helps writing more semantic html, where in vanilla html you'd do all kinds of weird tag combinations [02:59] marcello3d: bwen: do you find coffeescript hilarious? [02:59] Bwen: you actualy have to ask yourself.. okay now I want to put a
.. hmmm how do I do it in jade... just the fact that I have to ask myself is a deal breaker... its html... [03:00] stagas: coffeescript is different, in that it's already layering a dynamic language [03:00] marcello3d: Bwen: no you don't, you just write: section [03:00] Bwen: I dont know coffeescript, but from what I could glimps its a pretty javascript syntax... [03:00] marcello3d: any html tag you just write as the tag name [03:00] stagas: Bwen: you just type 'section' it's a 1-1 link to tags [03:00] marcello3d: there's just a shorthand for div [03:00] gouch has left the channel [03:00] chrislorenz has joined the channel [03:00] marcello3d: you can also write div(id="foo") bar [03:01] SubStack: ACTION writes a language that compiles to coffeescript [03:01] Bwen: marcello3d: yeah I do cuz I really didnt know O.o [03:01] SubStack: called turtles [03:01] marcello3d: as the equivalent of
bar
[03:01] hassox has joined the channel [03:01] jamescarr__ has joined the channel [03:01] marcello3d: SubStack: you know what'd be awesome? [03:01] marcello3d: SubStack: write something that compiles javascript to coffeescript ;D [03:02] marcello3d: guess it's been done ... http://mindynamics.github.com/js2cs/ [03:02] Bwen: do you guys understand the overhead to have to switch to real html? or it just doesnt comput... :P [03:03] marcello3d: conceptual overhead or processing overhead? [03:03] Bwen: doing something to be pretty has a cost [03:03] marcello3d: not at all [03:03] marcello3d: it's compiled to html [03:03] tmpvar: lol, Bwen what are you saying? [03:03] stagas: Bwen: if you use html to style your documents you're already doing it wrong, css is for that [03:03] Bwen: tmpvar: I guess i'm tired xD [03:04] marcello3d: there's no cost over using any other dynamic html system [03:04] marcello3d: and if I can code twice as fast [03:04] tmpvar: Bwen, all good, i was honestly curious though [03:04] tmpvar: marcello3d, what if you were to use semantic markup? [03:05] marcello3d: tmpvar: meaning? [03:05] tmpvar: and just throw data at it [03:05] tmpvar: meaning.. unobtrusive templating [03:05] tmpvar: pure.js weld.js minimal.js [03:05] tmpvar: im actually curious if anyone here has gone down this road [03:06] marcello3d: at the end of the day, templating languages are doing "" + dynamicContent + "</head><body>blah blah blah" + dynamicContent + "</body></html>" [03:06] tmpvar: marcello3d, not entirely true [03:06] neorab has joined the channel [03:06] tmpvar: weld.js and minimal.js do not [03:06] marcello3d: tmpvar: that's harder to optimize, since you're manipulating the AST and generating html on the fly [03:06] marcello3d: but those aren't really templating languages [03:06] zylo has joined the channel [03:06] stagas: tmpvar: I tried weld, found it too feature-lacking when I wanted to do a bit more complex stuff [03:06] tmpvar: marcello3d, i see your point [03:07] tmpvar: stagas, as a developer of weld, i'd love your feed back :) [03:07] marcello3d: you can use them to get the same affect as templating languages [03:07] marcello3d: but they're not templating [03:08] Bwen: they are not templating unless they have to compile their template because its so slow :P [03:08] tmpvar: haha [03:08] shiawuen has joined the channel [03:08] marcello3d: for example, with AST I could go in and, for example, dynamically add style="background:"+randomcolor to every node [03:08] stagas: tmpvar: I mean it's ok if you're just populating a list, but what if you want conditionals, different class names etc [03:08] tmpvar: so doing it right is actually doing it wrong? [03:08] shiawuen has joined the channel [03:08] tmpvar: stagas, `alias` is really powerful [03:08] tmpvar: and keeping logic out of the template is pretty important (to me atleast) [03:09] tmpvar: and vice versa (logic out of the template) [03:09] tmpvar: bah, template out of the logic [03:09] secoif_ has joined the channel [03:10] Bwen: tmpvar: you dont want to be generating html on the fly in the code thought [03:10] Bwen: I understand the need for condition and loops [03:10] Bwen: within templates [03:10] tmpvar: Bwen, you are absolutely correct [03:10] Bwen: just not the need to invent a whole new language on top of it and having to compile your template and then cache them [03:11] mjmitche has joined the channel [03:11] tmpvar: Bwen, have you looked at weld? (https://github.com/hij1nx/weld) im sorry to plug it.. but i think it solves an idealistic argument [03:11] MikhX has joined the channel [03:11] tmpvar: disclaimer: it is slow [03:11] marcello3d: Bwen: go read http://haml-lang.com/ [03:11] Gigawattz: can i gzip data when using fs.createReadableStream(file).pipe(res) ?? [03:11] mjmitche: trying to install node.js but not working. can anyone help? [03:12] mjmitche: I'm on Mac 10.6.6 but this line doesn't work: git clone https://github.com/joyent/node.git [03:12] Gigawattz: mjmitche: what seem's to be the problem [03:12] marcello3d: tmpvar: I read the weld post on the nodejitsu blog, I think it's a cute idea, but I'm not sure if it actually simplifies the regular case [03:12] marcello3d: mjmitche: do you have git installed? [03:12] mjmitche: o, i need to install Git to use that? [03:12] Gigawattz: sudo port install git-core [03:12] marcello3d: http://help.github.com/mac-set-up-git/ [03:13] tmpvar: marcello3d, haha [03:13] tmpvar: marcello3d, i suppose it should be sold in a different way [03:13] marcello3d: I'd like to see the comparison to something like haml/jade on there, too [03:13] saikat has joined the channel [03:13] EM03: is there any channel for the express web framework? [03:13] tmpvar: its yet another language [03:13] marcello3d: because that's attempting to solve a similar problem [03:13] tmpvar: EM03, this is it [03:13] EM03: oh [03:14] mjmitche: this is strange. I tried sudo port install git-core but it said: -bash: sudo: command not found [03:14] EM03: well I really from here on out would love to do everything exclusively in it tmpvar [03:14] marcello3d: mjmitche: you probably don't have portage installed [03:14] Gigawattz: run the bash as root, and then run port install git-core [03:14] stagas: tmpvar: so the template is cleaner and the app is obfuscated with map and alias functions. no thanks I'm sticking with jade :) I don't mind a few conditionals and js in the template as long as it's clean and readable [03:14] marcello3d: but don't bother installing portage just to install git [03:14] devdazed has joined the channel [03:14] marcello3d: mjmitche: check my link [03:14] Gigawattz: can i gzip data when using fs.createReadableStream(file).pipe(res) ?? [03:15] tmpvar: EM03, awesome [03:15] tmpvar: stagas, fair enough [03:15] EM03: do you use it? tmpvar [03:15] tmpvar: i do not [03:15] Bwen: marcello3d: which part? Just the front page? [03:15] marcello3d: tmpvar: I'm not a huge fan of jquery, so that turned me off, a bit, as well [03:15] mjmitche: @marcello3d will look at it. [03:16] marcello3d: Bwen: yea [03:16] tmpvar: marcello3d, jquery dependency has been removed [03:16] tmpvar: we're now at ~3.6k [03:16] tmpvar: uglified [03:16] marcello3d: tmpvar: I didn't realize there was a dependency on jquery :) [03:16] Bwen: I prefer ERB in the lil "showdown" at the bottom [03:16] tmpvar: its rough, which is why i shamelessly insert myself into conversations :P [03:16] tmpvar: trying to get feedback [03:16] marcello3d: tmpvar: I think adobe did something like this [03:16] marcello3d: spry maybe? [03:17] tmpvar: dunno [03:17] tmpvar: anyhow, this is why i started jsdom.. so its a big deal that we land as many crutial features as possible [03:17] marcello3d: the idea of using templates in html [03:17] tylerstalder has joined the channel [03:18] tmpvar: balance it out.. ya know? [03:18] marcello3d: yep [03:18] mjmitche: @marcello should I use git-1.7.4.4-i386-leopard.dmg or git-1.7.4.4-x86_64-leopard.dmg if I'm on Mac 10.6.6. [03:18] sechrist: are the part and data events when handling a form post always guaranteed to be in the right order? [03:18] marcello3d: mjmitche: depends if you're on 64bit mac os x or not [03:18] sechrist: there's a 32bit Mac OSX? [03:18] mjmitche: I think I'm 64 bit [03:18] sechrist: that runs on intel? [03:19] marcello3d: sechrist: not sure [03:19] unomi has joined the channel [03:19] tykelewis has joined the channel [03:19] mjmitche: @marcello 64 bit should use which one? [03:19] marcello3d: mjmitche: see if you can guess [03:20] mjmitche: @marcello3d sorry for the stupid questions, I'm a newbie but I'd guess this one git-1.7.4.4-x86_64-leopard.dmg [03:20] marcello3d: :) [03:20] mjmitche: @marcello3d thanks, I just don't wnat to eff things up [03:20] marcello3d: doesn't really matter, anyway, you probably won't notice the difference [03:20] marcello3d: unless of course you're on a 32bit processor and the 64bit one doesn't even start :) [03:21] marcello3d: heh, google chrome is the only 32bit app running on my computer it looks like [03:21] marcello3d: no, adium and itunes, also [03:22] JusticeFries has joined the channel [03:22] secoif_ has left the channel [03:24] random123: What DB is most popular for Node --- mongodb? [03:25] marcello3d: who knows :) [03:25] stagas: tmpvar: my advice for weld I think it can really take off, and in the app I was making I firstly thought it was ideal, but you need to land in some easier solutions for some common use cases [03:25] mjmitche: @marcello3d when I did step three on your link (i.e. ssh-keygen -t rsa -C "your_email@youremail.com") it said "-bash: ssh-keygen: command not found " can you help? [03:26] marcello3d: really? [03:26] mjmitche: yup [03:26] pcardune has joined the channel [03:27] stagas: tmpvar: alias is a bit too low level for the common user [03:27] deepthawtz has joined the channel [03:27] marcello3d: mjmitche: no clue. but you don't need to do that step to check out code, only if you want to submit stuff to github [03:28] marcello3d: just installing the dmg should be enough [03:28] fr0stbyte: SubStack: window is undefined (from within a node module) when using browserify? as is the global object of course.. [03:29] mscdex: random123: nosql dbs have the most support [03:30] mjmitche: @marcello3d so my next step to install node.js would be to try this? git clone https://github.com/joyent/node.git [03:30] mjmitche: I'm looking at the instructions here: https://github.com/joyent/node/wiki/Installation [03:30] marcello3d: yup [03:30] brianc has joined the channel [03:30] marcello3d: do you have xcode/development tools installed? [03:31] mjmitche: it said, -bash: git: command not found [03:31] mjmitche: @marcello3d - i have never installed xcode/development tools myself... [03:31] marcello3d: mjmitche: you might need to open a new terminal after installing the git dmg [03:32] mjmitche: I closed terminal and then opened it again but same result [03:32] Aria has joined the channel [03:32] marcello3d: mjmitche: dunno then, sorry :( [03:32] marcello3d: that should work [03:32] marcello3d: unless your computer is setup funky [03:33] Corren has joined the channel [03:33] random123: mscdex: Yes, would you recommend MongoDB or something else? I don't have time to try them all now and would rather not pick blind [03:34] SubStack: fr0stbyte: can you gist the stack trace and the bundled browserify.js? [03:34] marcello3d: random123: it really depends on the project [03:35] marcello3d: random123: and what you're familiar with/needs are [03:35] mjmitche: I tried another installation method that begins with mkdir ~/local but it said -bash: mkdir: command not found Does this make sense to anyone? [03:35] fr0stbyte: SubStack: nvm, thanks, document object works. now it's still the same issue with it not finding modules as before, but its 15k lines, i can debug it most likely [03:36] marcello3d: mjmitche: your path is broken somehow [03:36] newy_ has joined the channel [03:36] marcello3d: mjmitche: do you have a ~/.profile or ~/.bashrc or something where you're setting the PATH? [03:36] SubStack: fr0stbyte: that bug is probably in the module expansion code [03:36] SubStack: very likely to have bugs [03:36] SubStack: I need to refactor that whole thing [03:37] fr0stbyte: oh.. any workaround? [03:37] fr0stbyte: i could add a bunch of paths to my package.json if it helps [03:37] mjmitche: @marcello3d yesterday I was trying to install pear.php at cd ~ then pico .bash_profile ... could that be the reason? [03:37] SubStack: well you can use the browserify field in package.json [03:38] marcello3d: mjmitche: open up ~/.bash_profile in a text editor and paste whatever PATH type lines you have in there [03:38] tmpvar: stagas, i appreciate that! [03:38] marcello3d: copy/paste to here [03:38] random123: marcello3d: The question was which is more popular, someone else answered for me, MongoDB is the leader [03:39] mjmitche: @marcello3d how do I open up bash profile in a text editor? [03:39] perezd has joined the channel [03:39] Spion__ has joined the channel [03:39] marcello3d: random123: well, if you use mongodb, I'll plug my mongodb driver ;) https://github.com/marcello3d/node-mongolian [03:39] marcello3d: mjmitche: you can run open ~/.bash_profile from the commandline [03:39] marcello3d: that may or may not work [03:39] marcello3d: :) [03:39] marcello3d: if you have textmate [03:39] mscdex: random123: sorry, i've never used a nosql db yet [03:40] marcello3d: I think you can do: mate ~/.bash_profile [03:40] mscdex: someone had a decent writeup comparing the more popular nosql dbs though [03:40] mscdex: somewhere [03:40] mscdex: :/ [03:40] tmpvar: mscdex, you havent? [03:40] marcello3d: mongodb is probably the easiest to get started with [03:40] mscdex: tmpvar: nope [03:40] marcello3d: if you're coming from sql land [03:40] tmpvar: mscdex, damn [03:41] mjmitche: @marcello it said command not found [03:41] random123: marcello3d: Yes, but I've also heard mongodb has the best performance [03:41] marcello3d: mjmitche: of course, cause your path is broken. hah [03:41] mscdex: tmpvar: i use mysql at work and i haven't done any website stuff with node yet [03:41] mjmitche: I tried both mate and sudo [03:41] marcello3d: random123: performance depends on what you're doing :) [03:41] rchavik has joined the channel [03:42] marcello3d: mjmitche: do you have hidden files visible on finder? [03:42] tmpvar: mscdex, do you use a caching layer? [03:42] mjmitche: I don't think so [03:42] mscdex: tmpvar: for? [03:42] marcello3d: mjmitche: try this: http://www.macupdate.com/app/mac/15585/show/hide-files [03:42] tmpvar: mscdex, caching stuff? (memcache/redis_ [03:42] random123: marcello3d: No, I've heard it actually has flatly better performance due to being in C++ and using BSON (Binary) instead of Erlang which #2 CouchDB uses [03:42] mscdex: tmpvar: oh, no, haven't done that either [03:43] sechrist: Are there any examples of doing a multipart post with node? [03:43] sechrist: i'm drawing a blank on how to do this [03:43] marcello3d: random123: couchdb is a completely different animal from mongodb [03:43] marcello3d: you can't really compare them :) [03:43] sechrist: you can't compare them at all [03:44] sechrist: mongodb is fast because it cares less about your data [03:44] mscdex: sechrist: node-formidable? [03:44] sechrist: couchdb has an emphasis on offline access and re-synchronization [03:44] sechrist: mscdex: outgoing not incoming [03:44] mscdex: oh [03:44] perezd has joined the channel [03:44] sechrist: it's not an "erlang vs c" argument [03:44] sechrist: they have different design goals [03:44] constantx has joined the channel [03:45] pcardune has joined the channel [03:45] sechrist: riak and couchdb are comparable to some degree [03:45] random123: marcello3d: What do you mean MongoDB is good from an SQL database specifically, CouchDB doesn't look more difficult at all, which ones are you suggesting are more difficult? [03:45] micheil has joined the channel [03:45] marcello3d: random123: mongodb has SQL-like querying functions [03:45] marcello3d: and sorting and whatnot [03:45] sechrist: riak really needs to get more attention [03:45] sechrist: they should start advertising [03:45] marcello3d: whereas something like riak is just a simple key-value store [03:45] sechrist: I think a lot of people deploy couch when they should deploy riak [03:46] sechrist: cough what? [03:46] mscdex: i thought someone had something for doing client-side multipart, but can't seem to find it [03:46] sechrist: riak is not just a k/v store [03:46] sechrist: memcached is a k/v store [03:46] sechrist: well ok all of these things are k/v stores [03:46] mjmitche: @marcello3d thnks I installed Show_HIde, now can you tell me where to find the bash profile? [03:46] marcello3d: is riak a document store? [03:46] sechrist: riak, couch, and mongo all have implementations of mapreduce [03:46] sechrist: yes [03:46] marcello3d: mjmitche: in your home dir [03:47] marcello3d: sechrist: can you search/filter/sort on child values in the documents? [03:47] sechrist: that's what riak search does [03:47] sechrist: well no [03:47] sechrist: I believe riak search is for fulltext searching [03:47] mscdex: sechrist: here's one: https://github.com/isaacs/multipart-js/ [03:47] marcello3d: last I heard riak search is buggy and incomplete [03:49] marcello3d: I'm not against riak, I haven't used it :) [03:49] marcello3d: but when comparing nosql dbs it's useful to see the differences [03:49] bentruyman has joined the channel [03:50] micheil_mbp has joined the channel [03:51] boaz has joined the channel [03:51] dmojoryder has joined the channel [03:51] mjmitche: @marcello3d here's my bash profile. Note that I added the last line with pear yesterday - # Setting PATH for MacPython 2.6 # The orginal version is saved in .bash_profile.pysave PATH="/Library/Frameworks/Python.framework/Versions/2.6/bin:${PATH}" export PATH # Setting PATH for MacPython 2.5 # The orginal version is saved in .bash_profile.pysave PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}" export PA [03:52] mjmitche: @marcello3d wait, it didn't show the whole profile [03:52] [[zz]] has joined the channel [03:52] marcello3d: http://pastebin.com/ please [03:52] blaenk has joined the channel [03:53] mscdex: gist.github.com please [03:53] sechrist: all no-sql searching is buggy and incomplete [03:53] mscdex: :P [03:53] mjmitche: @marcello3d here it is, thanks http://pastebin.com/vY1kKXRJ [03:54] sechrist: i'm of the opinion that all of these nosql datastores are a waste of people's time [03:54] sechrist: and the engineers writing them should be focusing on how to scale SQL [03:54] marcello3d: sechrist: mongo's works fine [03:54] sechrist: and deal with CAP [03:54] Sami_ZzZ___ has joined the channel [03:54] sechrist: when write latencies become next to nothing [03:54] marcello3d: mjmitche: do you need pear/that other stuff? that file is completely messed up [03:54] marcello3d: I would just delete all of that [03:54] sechrist: the advantages of this stuff is going to diminish [03:54] marcello3d: or rename the file [03:54] marcello3d: to something else [03:55] e6nian has joined the channel [03:55] sechrist: also, we're approaching 50-100 core intel chips [03:55] marcello3d: sechrist: CAP? [03:55] sechrist: so vertically scaling isn't out of the question [03:55] mjmitche: @marcello3d I never got pear to work so I don't need it. so I should just delete everything? [03:55] e6nian: could I use express without tpl engine? [03:55] marcello3d: mjmitche: yes, you're setting your path to blank, which is screwing up your terminal [03:55] sechrist: marcello3d: yes, the whole reason these NOSQL stores exist [03:56] mjmitche: @marcello3d I deleted it all and saved it. it's just a blank page now [03:56] marcello3d: mjmitche: now restart terminal [03:56] marcello3d: and the git command should work [03:56] marcello3d: (as well every other command) [03:56] dhasenan: sechrist, it takes bloody ages to write a decent SQL db and only a couple months to get a reasonable document store. [03:57] dhasenan: That's why you get more nosql databases. [03:57] sechrist: that doesn't mean the focus is in the right area [03:57] mjmitche: @marcello3d you're a genius. it says "cloning into node now..." [03:57] marcello3d: nosql is a misnomer [03:57] sechrist: drizzle and voltdb seem to be going in the right direction [03:59] mjmitche: @marcello3d in this line, export JOBS=2 # optional, sets number of parallel commands., do I only do $export JOBS=2 ? i.e. after # it is comment? [04:00] dgathright has joined the channel [04:00] sveimac has joined the channel [04:01] mjmitche: Anyone, does the hash symbol indicate a comment in this line--- export JOBS=2 # optional, sets number of parallel commands. [04:02] marcello3d: mjmitche: # switches to the english compiler, and interprets the following text as english [04:02] mjmitche: @marcello3d, so I put that whole line into the terminal then? [04:02] marcello3d: that's not actually true [04:02] marcello3d: # can handle pretty much any language, not just english [04:02] inimino: ACTION is disappointed [04:03] inimino: ACTION is intrigued [04:03] marcello3d: but the fuzzy matching is sometimes off, so it'll interpret some things as english that aren't [04:03] mjmitche: @marcello3d sorry for asking so many questions but as you see from my Path problem, i'm dangerous with a computer. [04:03] marcello3d: mjmitche: you're not going to get very far unless you figure out things on your own :) [04:03] micheil: sechrist: noSQL is just a buzzword, better to call them by their types: document, key/value, graph, structured table, etc [04:04] sechrist: micheil: but they're all just stop-gaps because RDBMSes, with the current state of hard drives and network latency, can't meet demands [04:04] sechrist: once those limitations are gone [04:04] sechrist: these things will be useless [04:04] sechrist: well not gone, minimized [04:04] mjmitche: @marcello3d i know... [04:04] micheil: sechrist: not really. [04:04] micheil: for some stuff you honestly don't need an RDBMS [04:04] micheil: not all data is relational in that sense [04:05] sechrist: most real-world applications have relational data [04:05] Charuru has joined the channel [04:05] micheil: I beg to differ. [04:05] mjmitche: new problem. this line --./configure --prefix=$HOME/local/node -- output Checking for program g++ or c++ : not found /Users/michaelmitchell/node/wscript:232: error: could not configure a cxx compiler! [04:07] micheil: mjmitche: you need some form of c compiler, by the looks [04:07] micheil: say, clang, or gcc [04:07] micheil: or g++ [04:10] mjmitche: i'm just trying a package installation now [04:13] llkazu has joined the channel [04:14] brownies has joined the channel [04:16] a2800276_ has joined the channel [04:17] krunkosaurus1 has joined the channel [04:21] Opaque has joined the channel [04:23] devdazed has joined the channel [04:24] kmiyashiro has joined the channel [04:29] marcello3d: v8: var x; x|=5; x [04:29] v8bot: marcello3d: 5 [04:29] marcello3d: v8: var x=1; x|=5; x [04:29] v8bot: marcello3d: 5 [04:30] slickplaid has joined the channel [04:34] wormphlegm has joined the channel [04:34] avalanche123 has joined the channel [04:35] F1LT3R has joined the channel [04:46] bentruyman has joined the channel [04:46] hugeh has joined the channel [04:47] hugeh has left the channel [04:53] kmiyashiro has joined the channel [04:53] timmywil has joined the channel [04:53] DTrejo has joined the channel [04:53] DTrejo: hey everyone [04:53] marcello3d: https://forums.aws.amazon.com/thread.jspa?threadID=65649&tstart=0 [04:55] DTrejo: I'm installing node on the machines at my school, with the goal of having one compiled node work for multiple people, as well as npm working for each of them but only modifying their own home directories. I installed node in a globally accessible place — is there any way to make a globally accessable npm that only writes to each person's home dir? I'm guessing there's an equivalent to node's ./configure prefix==~/local [04:56] marcello3d: DTrejo: npm 1.0 installs locally by default [04:56] SubStack: npm config set root ~/moo [04:56] DTrejo: will try that, thanks guys [04:57] DTrejo: should I install 1.0 for people? I suppose that makes sense [04:58] SubStack: probably not [04:58] DTrejo: mk [04:59] litropy has joined the channel [05:00] litropy: Super newb question: can I tell zombie to do things from bash? [05:00] hugeh_ has joined the channel [05:01] aguynamedben has joined the channel [05:03] tylerstalder has joined the channel [05:04] litropy: Whoa. I just wen $ node and started a guid. this is nice ... [05:04] litropy: guide* [05:05] litropy: went* [05:05] mcantelon_ has joined the channel [05:06] marcello3d: SubStack: browserling is cool. Is there a way to make it not scale the image? [05:07] JimBastard has joined the channel [05:09] SubStack: marcello3d: use the display widget on the sidebar [05:09] SubStack: put it into 1:1 mode [05:09] DTrejo: SubStack: question: I see that npm config list uses absolute paths, if I change them to relative paths, you think npm will break? [05:09] marcello3d: I got it in some confused state where there were two spinners [05:10] marcello3d: does IE9 crash a lot? [05:10] marcello3d: it closed out randomly twice. also no forward/back buttons ? [05:11] newy_ has joined the channel [05:12] SubStack: DTrejo: try it and see! [05:12] DTrejo: just did, no problems yet :) [05:17] MikhX has joined the channel [05:17] marcello3d: night all [05:19] mtsl has joined the channel [05:24] openpercept has joined the channel [05:25] dgathright has joined the channel [05:26] DTrejo: SubStack: tried it, it kinda worked. when i tried to install express it asked for sudo priveliges (not available for regular users) [05:27] loob2 has joined the channel [05:29] samsonjs has joined the channel [05:32] krunkosaurus1 has left the channel [05:40] DTrejo: yeah I think ppl are going to have to install npm themselves [05:46] mikeal has joined the channel [05:47] kmiyashiro has joined the channel [05:51] deepthawtz has joined the channel [05:51] DTrejo: yessss https://gist.github.com/579814#file_yet_another_option.sh is so handy [05:52] test117522 has joined the channel [05:54] dmojoryder has joined the channel [05:56] koz has joined the channel [05:58] Lorentz has joined the channel [05:59] liar has joined the channel [06:04] Opaque has joined the channel [06:08] newy_ has joined the channel [06:09] no-gooder has joined the channel [06:09] newy__ has joined the channel [06:09] onre_ has joined the channel [06:11] pHcF has joined the channel [06:14] onre_ has joined the channel [06:16] fangel has joined the channel [06:17] gazumps has joined the channel [06:18] zjong has joined the channel [06:19] zjong has joined the channel [06:20] Remoun has joined the channel [06:20] onre_ has joined the channel [06:22] jiggliemon has joined the channel [06:22] jiggliemon: How do you use fs.stat()? [06:23] jiggliemon: fs.stat(path,callback); or stat = fs.stat(); stat.isDirectory(path); [06:23] skm has joined the channel [06:23] Aria: fs.stat(path, function(stat) { stat.isDirectory() }) [06:24] SubStack: or fs.statSync [06:24] jiggliemon: Aria: thanks [06:24] no-gooder: hey guys [06:24] SubStack: which blocks [06:24] jiggliemon: blocking sucks. [06:24] no-gooder: anybody used ape wtih node.js ?? [06:25] SubStack: blocking is super useful for setup and teardown [06:26] onre_ has joined the channel [06:26] DTrejo: i hate it when i get blocked [06:26] SubStack: hehe [06:28] coreb has joined the channel [06:29] sveimac has joined the channel [06:29] coreb: even though I enable "view cache" in development, I'm seeing ~6 times better performance on jade template rendering in express.js in production mode - any clues? [06:30] autotron has joined the channel [06:31] sreeix has joined the channel [06:32] jiggliemon: Aria: Im getting a whole lotta "null" on that stat varible. [06:33] Aria: Pardon me. [06:33] _rain has joined the channel [06:33] onre_ has joined the channel [06:33] Aria: fs.stat(path, function(err, stat) { stat.isDirectory() }) [06:33] Aria: It's error-first, as most node things are. [06:33] Aria: Harder to ignore then [06:34] jiggliemon: Woops. [06:34] jiggliemon: I shoulda known that [06:34] sourcode has joined the channel [06:38] onre_ has joined the channel [06:40] andi5 has joined the channel [06:42] amerine has joined the channel [06:44] Guest94022 has joined the channel [06:47] bojicas has joined the channel [06:49] __tosh has joined the channel [06:49] sveimac has joined the channel [06:51] mikeal has joined the channel [06:51] SamuraiJack has joined the channel [06:52] onre_ has joined the channel [06:53] mcantelon_ has joined the channel [06:56] zjong has joined the channel [06:57] jetienne has joined the channel [07:02] PhatBoyG has joined the channel [07:03] onre_ has joined the channel [07:03] saschagehlich has joined the channel [07:07] [[zz]]: ACTION is away: หนีห่างจากคีบอด [07:08] [[zz]]: ACTION is back (gone 00:00:24) [07:09] puffpio has joined the channel [07:13] coreb1 has joined the channel [07:15] matjas has joined the channel [07:17] micheil_mbp has joined the channel [07:17] avalanche123 has joined the channel [07:22] sub_pop has joined the channel [07:23] onre_ has joined the channel [07:23] Druide_ has joined the channel [07:23] Lorentz has joined the channel [07:28] onre_ has joined the channel [07:28] rmustacc has left the channel [07:29] openpercept has joined the channel [07:31] chapel: hmm [07:32] shiawuen has joined the channel [07:32] shiawuen_ has joined the channel [07:36] onre_ has joined the channel [07:37] a2800276_ has joined the channel [07:39] MikhX has joined the channel [07:41] onre_ has joined the channel [07:41] random123: are there any good quick ref/cheat sheet type things for node.js? itd be nice to see node.js in a glance at all possible objects/func/etc? [07:42] tjgillies: random123: the docs are the best place [07:43] tjgillies: random123: http://nodejs.org/docs/v0.4.7/api/ [07:43] random123: tjgillies: I don't really like the docs very much, its not very consistent, it'd be nice if they redo the docs more like jQuery [07:44] tjgillies: random123: so write them :) [07:44] tjgillies: 'they' is 'us' ;) [07:45] random123: tjgillies: Maybe I will, I'll have to talk to the right people first to make sure its not in vain [07:45] tjgillies: why would it be in vain? [07:45] tjgillies: there plenty of space on the internet [07:45] tjgillies: theres* [07:45] random123: tjgillies: very true :) [07:46] tjgillies: blog articles have saved my ass a lot more than 'official' sites [07:46] msucan has joined the channel [07:47] onre has joined the channel [07:53] EM03: i wish express had a much bigger user base [07:54] kmiyashiro: why? [07:55] axeljohnsson has joined the channel [07:56] axeljohnsson: Hi, is there any way to require a file without execute it, only get the exports in an object hash? [07:57] axeljohnsson: With node version 0.4.x and the require() function. [07:57] chapel: you just want an object hash? [07:58] random123: What is common practice to do node web development without restarting the server constently while debugging? [07:58] chapel: so like a config thing? [07:58] chapel: random123: well you usually have to restart it [07:58] chapel: but you can use scripts that watch for file changes and restart the server for you [08:00] Opaque has joined the channel [08:01] axeljohnsson: chapel: Actually I want to load the "views" for Mustache. At first the require() function looked good, but it don't like undefined variables. [08:01] mej2 has joined the channel [08:01] chapel: have a gist? [08:02] railsguynyc has joined the channel [08:04] jwl: i cant get npm to link! [08:05] whozman has joined the channel [08:06] patto has joined the channel [08:06] mattikus has joined the channel [08:06] chapel: jwl: got a gist? [08:06] chapel: what are you trying to link? [08:06] jwl: chapel: thanks it works now! [08:06] chapel: that was fast [08:06] jwl: yeah =) [08:07] robhawkes has joined the channel [08:07] sveimac_ has joined the channel [08:09] jwl: trying to make the module working on both ends [08:09] jwl: frontend and backend [08:09] jwl: http://pastie.org/1827669 [08:09] axeljohnsson: chapel: https://gist.github.com/939396 [08:09] jwl: this seems pretty nice [08:10] jwl: what do you think and how have you resolved this? [08:10] chapel: jwl: you should checkout browserify [08:10] chapel: it handles the browser side of things [08:10] chapel: just do module.exports as expected, and it will bundle it and you can do var module = require('module'); in the browser [08:11] jwl: hm [08:11] jwl: but it requires a running node server i guess [08:11] chapel: sure [08:11] jwl: i dont know if i want to have a server running to serve files like that [08:11] chapel: wouldn't be useful if you weren't running a node server [08:12] jwl: hm aha [08:12] chapel: well it can bundle all kinds of browser stuff [08:12] chapel: like all your browser code [08:12] chapel: and you can minify it as well [08:12] jwl: okay [08:12] jwl: sounds kinda cool [08:13] chapel: axeljohnsson: well require has a specific function, and it executes any code within if it is valid code and not just a string [08:13] chapel: and jwl it is very cool [08:17] jwl: but isnt that slow [08:17] sshaginyan has joined the channel [08:17] jwl: it has to fetch the function from the sever [08:17] jwl: server [08:18] chapel: what function? [08:18] jwl: the function i require from the browser [08:18] chapel: it bundles the module, or whatever into the browsers js file [08:18] axeljohnsson: chapel: ok, thanks [08:18] jwl: ah ok [08:19] chapel: if you want rpc for browser<->server use dnode [08:19] chapel: same author [08:19] jwl: okay [08:19] jwl: there was another lib for this [08:19] jwl: but it was not using require [08:20] saikat has joined the channel [08:21] newy_ has joined the channel [08:25] openpercept1 has joined the channel [08:26] tjgillies: random123: https://github.com/remy/nodemon [08:27] sshaginyan: Hey guys I'm using jsdom with jquery and trying to extract some data from a large website (http://us2.php.net/quickref.php). Here is my code and the error I'm getting http://pastie.org/1827697. I have tried the same code on a smaller website and it worked fine. [08:28] sshaginyan: Anyone? [08:28] random123: tjgillies: Thanks, will try that [08:29] chapel: random123: check out restartr as well [08:29] chapel: I prefer that [08:29] pdelgallego has joined the channel [08:29] chapel: well that and I am currently refactoring it :P [08:29] chapel: `v commands [08:29] v8bot: chapel: Commands: Type `v <command>. Optionally, type `v <command> @ <nick> to send to a specific user. `v Commands are: about, beers, commands, git, google, help, macro. Other commands: v8, `re, `pcre, `ref. Type `v help <command> for more information. Join #v8bot for more support. [08:30] chapel: `v git restartr [08:30] v8bot: chapel: aaronblohowiak/restartr - GitHub - https://github.com/aaronblohowiak/restartr [08:30] sshaginyan: If a website uses jquery and I include it with jsdom, would node.js give me problems? [08:31] chapel: did you inspect window? [08:31] chapel: doing that same code and using another page works without issue? [08:31] sshaginyan: yes [08:33] arkx has joined the channel [08:34] chapel: its been a while since Ive messed with jsdom [08:35] sshaginyan: np [08:35] sshaginyan: it's horrible [08:36] sshaginyan: I took 4 days to learn node.js so I can easily crawl pages just to find out it might not work :( [08:36] tjgillies: im trying to run it, but it hangs for awhile before giving output [08:36] sshaginyan: it gives me the error I got in pastie [08:36] sshaginyan: you get results? [08:36] tjgillies: tweaked it, waiting for new results [08:36] tjgillies: sshaginyan: you see http://www.phantomjs.org/ ? [08:38] EM03: would any of you guys use node.js for web programming? [08:38] sshaginyan: EM03: it has potential but not now. [08:38] sshaginyan: ruby or python [08:39] themiddleman has joined the channel [08:39] sshaginyan: tjgillies: is this with v8? [08:39] csanz has joined the channel [08:39] chapel: tjgillies: sshaginyan's code? [08:40] sshaginyan: EM03: maybe for a personal project but not for a customer [08:40] chapel: EM03: yeah, it is great for web programming [08:40] chapel: sshaginyan: you are in the minority [08:40] sshaginyan: sorry :) [08:40] loob2 has joined the channel [08:40] chapel: just because you aren't have a good experience doesn't diminish node and its potential [08:41] EM03: chapel: care to explain how you go about it ? [08:41] chapel: lots of people are making awesome stuff [08:41] adambeynon has joined the channel [08:41] chapel: well depends on what you are trying to do [08:41] sshaginyan: didn't say that. It's all an interpretation [08:41] sshaginyan: yup [08:41] chapel: yeah sshaginyan, wasn't discounting you [08:41] sshaginyan: I never like this conversation of "what's better" [08:41] chapel: just saying of people that use node, I would say it is a minority that thinks its not worth using for web stuff [08:42] sshaginyan: I see [08:42] chapel: every tech has its best case, its worse case [08:42] chapel: I think node can do a hell of a lot, and I haven't found much it cant do [08:42] chapel: probably the biggest thing against node is that it is new [08:43] chapel: but it has matured tremendously [08:43] sshaginyan: agreed [08:43] SubStack: I should add some more fanciness to grave like inline versioned views [08:45] chapel: :) [08:45] chapel: I still haven't touched grave yet [08:45] chapel: been too busy with other stuff [08:45] NiTr0 has joined the channel [08:46] openpercept has joined the channel [08:48] azeroth_ has joined the channel [08:49] sshaginyan: Thanks chapel & tjgillies [08:51] zilch has joined the channel [08:52] zilch: hallelujah !! [08:52] tylerstalder has joined the channel [08:52] varunsrin has joined the channel [08:53] tjgillies: did sshaginayan solve his problem? [08:53] varunsrin: hey, i have a question about embedded documents in mogoose [08:53] varunsrin: is this the right channel? [08:54] varunsrin: anyone on? [08:54] tjgillies: mongoose? [08:54] zilch: varunsrin, atleast ask [08:54] varunsrin: yeah the ORM [08:54] tjgillies: oh mongo lib [08:54] tjgillies: ACTION is a couch guy [08:55] varunsrin: yeah mongodb, its about embedded documents [08:55] chapel: tjgillies: cheers [08:55] zilch: tjgillies, with which command of IRC you can do this ? [08:55] zilch: varunsrin, what' the question [08:55] varunsrin: i have the array of documents, and im trying to find a document based on a specific property [08:55] tjgillies: do what? [08:55] chapel: zilch: the tjgillies is a couch guy? [08:55] chapel: ACTION is a couch guy [08:55] tjgillies: /me [08:55] varunsrin: mongoose has a .findOne () method that does it [08:56] varunsrin: for the original model, but that doesnt apply to embedded documents [08:56] zilch: ACTION enjoys sunday on IRC [08:56] zilch: ACTION you do it using //me !! [08:57] justinTNT has joined the channel [08:57] justinTNT: G'day [08:58] coreb1: EM03: just test it out [08:58] justinTNT: anyone come across with this 'socket hang up ' error in the server object? I've seen it discussed on a few sites but can't pin down a solution ... [09:00] saschagehlich: V1|idle: looks like that bugfix finally fixed all connection issues [09:01] zilch: varunsrin, could you paste the code ? gist.github.con [09:01] tjgillies: chapel: http://couchcamp.couchone.com/profiles/1643684c68d03fb70bc98d88a889e482 [09:03] zilch: are there any free code reviewers for node.js ? I think I don't write that good code :p [09:04] tjgillies: zilch: use coffeescript [09:04] tjgillies: it makes all your code jslint strict mode valid [09:04] tjgillies: plus it looks a hell of a lot better [09:04] tjgillies: ACTION can't even write normal JS anymore heh [09:06] tjgillies: in case anyone was wondering, this what an irc server based on amqp looks like ;) https://github.com/tjgillies/amqp-irc/blob/master/server.coffee [09:06] christophsturm has joined the channel [09:06] zilch: tjgillies, this is second day in a raw, I have been asked to do that, I am sure up for it ... just want to complete some things at hand [09:07] chapel: tjgillies: well I always recommend coffeescript, but only if you don't give up on js [09:07] zilch: tjgillies, I just wonder you still have to alteast read others code. [09:07] chapel: I mean, to write good cs, you should know js, for me, learning cs helped my cs [09:07] zilch: chapel, yeah that's the point [09:07] chapel: because to even grep cs, I had to figure out what it would translate into [09:08] chapel: but I have found for myself, I have no issues going between cs to js or back [09:08] tjgillies: i can program javascipt just fine [09:08] tjgillies: its just bad muscle memory [09:08] tjgillies: i always like console.log 'foo' [09:08] tjgillies: instead of console.log('foo'); [09:08] random123: Anyway to get response.write to not slow down transfer 200ms if you don't set a Content Length? [09:09] d0k has joined the channel [09:09] justinTNT: socket hang up : anyone seen that error? [09:09] tjgillies: why not set content length? [09:10] tjgillies: justinTNT: http://comments.gmane.org/gmane.comp.lang.javascript.nodejs/19987 [09:11] random123: tjgillies: For using .write and flushing out some of it early when you don't know how long it goes to be yet, isn't it impossible to calculate the content length in bytes and send the headers, then .write, .write, .end ? [09:11] djcoin has joined the channel [09:11] random123: You don't really know how many bytes its going to be at the point you send the headers [09:11] justinTNT: yeah TJG: that's my issue. I tried the alt api and got the same failure. [09:11] Nexxy has joined the channel [09:11] tjgillies: random123: what if you lied in the header? [09:12] random123: tjgillies, if you tell them an ammount too small, it will terminate the connection early, if its too long, the connection stalls [09:12] random123: And it never renders page [09:12] tjgillies: bloody hell [09:12] tjgillies: http is so annoying sometimes [09:13] tjgillies: thats why i serve static content, and anything i need variable size on i use socket.io heh [09:14] random123: I notice, time curl a page, that uses default chunked encoding, then call .write() anywhere without sending content length the request takes about 200ms longer [09:14] tjgillies: random123: you could make a temp var that holds the amount of bytes you've sent with write [09:14] random123: but if you just send one .end("XXX") no .writes its like a 10ms response time [09:15] tjgillies: then use the size of that var for the content header [09:16] tjgillies: except.. you set header before you write hrm heh [09:16] random123: tjgillies: I have to send the headers before I do any .writes to send the chunks [09:16] tjgillies: yeah [09:16] tjgillies: you might just have to eat the 200ms [09:16] random123: I think I am just going to not use chunks then [09:17] random123: Because its faster for 99% of stuff [09:18] random123: I don't really understand why it even does that though, .end should tell the browser everything done, its sent, but its like it sits around for 200ms more for some reason [09:18] EM03: coreb1: hmmm [09:20] random123: before rendering the page [09:21] random123: Well, I guess its not the browser [09:21] random123: considering curl does the same thing [09:22] sveimac has joined the channel [09:23] chapel: are you sure that its not chunked issue and not just node? [09:24] coreb1: EM03: only way to know is to try [09:25] EM03: yea i know .....this would be for a business project though and not sure how server side javascript would fit [09:26] random123: It seems to be a browser issue [09:27] random123: Curl actually works fine, but using chunked wiithout content length is about 200ms slower [09:27] ph^ has joined the channel [09:27] justinTNT: hmmm, got my node webserver reverse tunneling, but it's dying on this 'sock hang up [09:27] chapel: maybe the browser just waits, and if it doesn't receive anything after 200ms it renders [09:27] random123: just try to send with any .write, in Chrome for instance, then use developer tools Network tab [09:28] random123: without setting content length [09:28] random123: Then, if you just use a .end, no .writes, its about 200ms faster [09:28] justinTNT: 'think its from the handshake ... I'm surprised by the discussion on the list that there's till net issues in node. [09:28] random123: You can see same thing in different browsers [09:31] random123: I guess really the lesson is never use Chunked Encoding to deliver initial page loads, just use it for persistent long polling [09:31] random123: If they fixed the issue it would be nice though, but I think its an issue with the browsers [09:32] mraleph has joined the channel [09:33] zilch: Is there node.js or for that matter js documentation tool ? like javadoc in java ? [09:34] zilch: how should I document my code, inside code ? [09:34] zilch: what are the best practices ? [09:35] random123: zilch, I think javadoc generates everything from comments write? [09:36] random123: wright*** [09:36] random123: lol [09:36] random123: right** [09:36] zilch: right [09:36] random123: So can't you technically have javadoc evaluate the sourc of your JavaScript files? [09:36] zilch: and thats what I like [09:36] zilch: you can see them while reading the code [09:37] random123: Since javadoc doesn't care about syntax.. you can make comments to these standards [09:37] random123: http://agile.csc.ncsu.edu/SEMaterials/tutorials/javadoc/ [09:37] zilch: I found and those API doc as very slick to read and explore [09:37] zilch: random123, I have not tried [09:37] zilch: guess java and javascipt are two different thing [09:37] random123: Then run javadoc on your .js files? Dunno [09:37] openpercept1 has joined the channel [09:38] openpercept has joined the channel [09:38] astropirate: Does Mongoose take type Boolean? [09:38] random123: Yes, ofcourse they are different [09:39] herbySk has joined the channel [09:39] zilch: I want to know what community in general is using [09:39] zilch: for their node.js code [09:39] random123: http://zerokspot.com/weblog/2010/07/11/javadoc-for-javascript/ [09:40] random123: "javascript javadoc" into Google shows some results [09:41] saschagehlich has joined the channel [09:41] astropirate: i use natural docs but i'm open to anything better if there is any. "better" being subjective, I still haven't found anything yet [09:46] saikat has joined the channel [09:46] djcoin: Hi all [09:47] djcoin: I have a question, I want to have some listeners for an object, I do not know i i should use inheritance/composition, and if there is a library/class that can be usefull for the task [09:47] djcoin: I was looking at extending EventEmitter [09:47] zilch: astropirate, what you mean by natural docs ? [09:47] djcoin: But maybe it's a special kind of class that relates to node.js [09:47] Country has joined the channel [09:48] astropirate: zilch, http://www.naturaldocs.org/ [09:51] chapel: util.inherit maybe [09:51] chapel: http://nodejs.org/docs/v0.4.7/api/util.html#util.inherits [09:51] chapel: even gives you the example you are looking for djcoin [09:53] djcoin: chapel: hey, it s great ! I saw it yesterday, did not remember where the idea of extending EventEmitter where [09:53] djcoin: It was here [09:53] djcoin: chapel: thanks chapel [09:53] djcoin: Do you use yourself, another inheritance mecanism than those provided by utils ? [09:53] djcoin: like joose ? [09:54] djcoin: And do you think EventEmitter is "ok" to be used as a very simple Observer pattern ? [09:54] djcoin: Cause maybe its overkill [09:54] djcoin: Thanks a lot though [09:54] chapel: nope, well when I use coffeescript, sometimes I use class which uses its own extend [09:54] chapel: observer pattern? [09:55] SubStack: bah I hate that crap [09:55] SubStack: ACTION shakes a fist at design patterns [09:55] djcoin: Patterns rulez (well in oop at last) [09:55] chapel: lol [09:55] zilch: ACTION need to learn coffescript and look for JS documentation  [09:55] SubStack: workarounds for missing features of c++ and java are now "patterns" unto themselves [09:55] SubStack: that will take ages to fix [09:55] djcoin: lol :) [09:56] zilch: SubStack, is it the name 'pattern' or entire concept ? :) [09:56] djcoin: SubStack: no patterns does not "fix" language. It references good way to efectively communicate between objects to solve a specific problem [09:56] SubStack: the concepts already have much more appropriate names [09:56] djcoin: nothing to do with the "flaws" of the language itself, imho [09:56] SubStack: traversals, continuations [09:57] rsms has joined the channel [09:57] SubStack: djcoin: wrong [09:57] djcoin: :) [09:57] SubStack: patterns reference features that can't be abstracted in a lightweight reusable way [09:58] SubStack: it's entirely an artefact of poor language design [09:58] SubStack: s/tef/tif/ [09:58] djcoin: chapel: by observer pattern i meant: a class that emit events (ie: is observable) and object that receives the event (ie: observeres). Like the on('event', fucntion(){}) stuff [09:59] djcoin: A language can not forseen all the specific "problems" that come while your coding [09:59] jdub has joined the channel [09:59] djcoin: you are * [09:59] djcoin: Like how should you parse something [10:00] zilch: let' use all what we can and don't what we need not to to get things done ... how easy this statment could be :p [10:00] djcoin: And create the approriate objects [10:00] djcoin: That s what patterns are for, for example [10:00] SubStack: djcoin: that's only one way of approaching the problem [10:00] SubStack: that's usually the hard way [10:01] SubStack: or you could define parser combinators and register the appropriate callbacks [10:01] SubStack: parsec-style [10:01] Gruni has joined the channel [10:01] SubStack: then the problem solves itself without shuffling state around [10:01] djcoin: Yeah, but doing so, you will realize this may be the appropriate way to do _parsing_ (a specific problem) each time. Thus, you have a pattern : element of reusable design [10:02] SubStack: no, you should go and write a library and throw it up on github ande npm [10:02] SubStack: so that other people don't have to reimplement what you've just written [10:03] SubStack: so they can actually, you know, reuse it [10:03] djcoin: In oop or functional programming. Well, whatever I see your point but I think language and patterns are different stuf [10:03] djcoin: f [10:03] djcoin: Yeah, but you may have many implementations, or maybe it can not be astracted as a lib, or i dont know [10:04] djcoin: What is sure, is that I have not your skill in functionnal programming [10:04] djcoin: so :) [10:04] SubStack: here's the epic SO thread about this: http://stackoverflow.com/questions/327955/does-functional-programming-replace-gof-design-patterns [10:04] djcoin: lol omg, troll post [10:05] djcoin: i like the first comment o the first response [10:05] djcoin: Well i dont know [10:06] djcoin: But in poorly designed oop, patterns are handy [10:06] djcoin: :) [10:08] zkirill has joined the channel [10:08] samcday_away has joined the channel [10:09] SubStack: but javascript has enough FP features to take you a long way [10:11] pt_tr has joined the channel [10:12] djcoin: yeah I guess so [10:12] insin has joined the channel [10:12] djcoin: I do not like much javascript, but programming in node.js is just awesome [10:12] djcoin: this events based beast with no thread problems [10:13] astropirate: then you prollly just don't like the DOM [10:13] astropirate: not javascript it self [10:13] astropirate: :) [10:13] djcoin: I like all functionnal stuff [10:13] djcoin: it s just that javascript has kind o a weird syntax, with many stuff missing [10:13] djcoin: Proof: CoffeScript [10:14] djcoin: But it s not so much cons [10:14] rfay_afk has joined the channel [10:14] zilch: astropirate, going through the naturaldocs. Would like to if there is anything you want to do with ND but can't, in context of documenting javascript ? [10:14] zilch: otherwise it looks fine to me !! [10:15] zilch: ACTION don't like alert() in javascript [10:15] mikl has joined the channel [10:15] astropirate: zilch, yah i like it too somethings i haven't figured out. but then again i haven't looked hard enough or deep enough in its docs [10:16] pt_tr has joined the channel [10:16] zilch: astropirate, I would love to see some markdown enabled coding tool, as I now know markdown syntax [10:17] astropirate: Anyone know how to add a document to a collection using mongoose? its docs show: var document = mongoose.model('model_name'); var doc = new document; but how do I add stuff into it? i have to make 2 db calls? with regular mongo i just do save() [10:17] zilch: sorry, documentation tool :P [10:18] astropirate: zilch, make one if you have the time :D [10:18] zilch: astropirate, that cannot be discounted !!! [10:18] zilch: :D [10:22] chapel: zilch: look up node-doc [10:22] zilch: ACTION loolking up node-doc [10:24] Hans_ has joined the channel [10:24] pastak has joined the channel [10:24] zilch: chapel, googling it mixed results .. could you share a direct link ? [10:25] chapel: `v git node-doc [10:25] v8bot: chapel: networkimprov/node-doc - GitHub - https://github.com/networkimprov/node-doc [10:25] chapel: hmm not sure if thats the one [10:25] zilch: googling it gave mixed results* [10:26] jonathantaylor has joined the channel [10:26] chapel: `v git node-docs [10:26] v8bot: chapel: node docs and google - Issues - joyent/node - GitHub - https://github.com/joyent/node/issues/941 [10:26] chapel: hmm [10:26] chapel: hold on [10:26] chapel: `v git coffeescript [10:26] v8bot: chapel: CoffeeScript - http://jashkenas.github.com/coffee-script/ [10:27] zilch: `v how smart are you ? [10:27] v8bot: zilch: No such command. [10:27] zilch: `v git documentation markdown [10:27] v8bot: zilch: developer-documentation.markdown at master from michael-e/core ... - https://github.com/michael-e/core-email-api-docs/blob/master/developer-documentation.markdown [10:28] chapel: `v git docco [10:28] v8bot: chapel: docco.coffee - http://jashkenas.github.com/docco/ [10:28] chapel: thats it [10:30] zilch: chapel, docco is great !! loving it [10:30] zilch: thanks a lot [10:31] chapel: np [10:31] zilch: it could be really good for code walkthrough for noobs in node.js [10:34] zilch: chapel, will it support .js files [10:34] zilch: ? [10:34] Hans_ has joined the channel [10:35] zilch: astropirate, did you having a look at http://jashkenas.github.com/docco/ ? [10:35] djcoin: God damn, It s been two hours now and I still do not understand how to inherits from a class, calling the constructor parent from within the child (as super in oop)... [10:36] Bwen has joined the channel [10:36] astropirate: zilch, no i haven't but it seems like its cofeescript. for me cofeescript is down there with ruby and apple products :p [10:36] astropirate: (no offense to ruby and apple fans) [10:37] zilch: astropirate, I gaaat it !!! [10:37] astropirate: djcoin, sec, i'll make you a test case [10:38] zilch: djcoin, have you gone through the douglas crockfords articles ? [10:38] Rob- has joined the channel [10:38] djcoin: yeah, I tried one or two months ago, yet do not remember clearly the stuff with __proto__ binded etc [10:39] djcoin: I tried to use the inherits from utils [10:39] djcoin: super_.call(this, id); [10:39] djcoin: MyParentClass.super_.call(this, id) <= should populate with the function of the parent class no ? this is still {} [10:40] djcoin: astropirate: please do not bother [10:40] djcoin: Its very kind, but as Im too stupid/tired to take the time to dig into the many articles on inheritance with prototype language like js [10:40] djcoin: :) [10:41] zilch: djcoin, I think you should try Java Script The Good Parts [10:41] dve_ has joined the channel [10:41] zilch: the book should be a good guide [10:41] patto has joined the channel [10:42] zilch: and they call it psedo classes not classes in javascript !! [10:42] astropirate: djcoin, too late i allready typed it up [10:42] astropirate: http://pastie.org/1827948 [10:43] astropirate: djcoin, I remember you found a way with proto, but proto is not standard [10:43] astropirate: and deprecated [10:43] chapel: zilch: docco supports other languages than just cs [10:43] Wizek has joined the channel [10:43] chapel: and astropirate it is written in cs, but that shouldn't bother you [10:43] djcoin: astropirate: in fact I switched to using util.inherits [10:43] astropirate: hahah it does :p [10:44] zilch: chapel, yeah looling them now [10:44] djcoin: thanks a lot for taking the time [10:44] zilch: could see something on the issue list on github [10:44] djcoin: I will make a pastie my self, and maybe we will figure out how dumb i am :) [10:44] pootietang has joined the channel [10:44] pootietang has joined the channel [10:45] astropirate: ACTION is frustrated with mongoose :( [10:45] zilch: astropirate, what happened ? hope you are not using the old version !!! [10:46] djcoin: astropirate: http://pastie.org/1827956 [10:46] astropirate: no its a new verison. i think i got it now. its te constant change from having to use save() and sometimes not [10:46] djcoin: kinda of what i was trying to do [10:46] zilch: astropirate, mongonow have findAndModify(), guess you are aware of it !!1 [10:47] djcoin: Game get called from within IceGame [10:47] djcoin: but this is {} [10:47] djcoin: and stay {} after the super returned [10:48] djcoin: well i alread this var _current_handler is out of scope for IceGame so it does not refer the same variable I guess, but that does not explain the pain with inheritance [10:48] astropirate: djcoin, i ran into a similar issue when starting out with node. so I dont' use util.inherits anymore [10:48] Ond has joined the channel [10:48] c4milo1 has joined the channel [10:48] djcoin: the code is super simple yet [10:49] astropirate: i still think its a better idea to use foo.prototype = bar.prototype dead simple :) and works in browser too [10:49] astropirate: ohh and no idea why your code doesn't work [10:50] djcoin: https://github.com/joyent/node/blob/master/lib/util.js#L423 [10:51] bjfletcher has joined the channel [10:52] zilch: ACTION enjoying it-almost-going-to-rain and the scent of the soil, sitting in some part of India [10:54] bjfletcher: hmm, wondering if there's a nice command line that uses node.js instead of sed for basic text replacement works :) [10:55] Ond: Doesn't sound like it would be optimal [10:56] bjfletcher: in my early experiment, it seems node js is blazing fast... good enough for me when used as a tool as a developer [10:57] bjfletcher: like, replace this.foo.bar with this.baz across all files [10:57] FireFly has joined the channel [10:57] sveimac has joined the channel [11:01] chapel: why not make one [11:02] bjfletcher: chapel: i'm pretty sure someone's got something going for this... [11:03] chapel: you sure? [11:04] chapel: `v google node.js sed [11:04] v8bot: chapel: Install node.js 0.2.4 - WebFaction Community - http://community.webfaction.com/questions/404/install-nodejs-024 [11:04] hellp has joined the channel [11:05] Ond: I was wondering if you began working on any DNode middleware chapel [11:06] chapel: umm, not yet, got a few things to do first [11:06] chapel: I am about done refactoring restartr [11:06] Ond: One of the proposed middlewares last night was grouping right? [11:06] Ond: Thinking how that might work [11:07] SubStack: just some bookkeeping for managing subscriptions to event emitters [11:08] SubStack: it wouldn't need to be a middleware either, it could just be a regular lib [11:09] jdavenport has joined the channel [11:12] boghog: I have a question about reading data from a socket in a line-oriented protocol; on the data socket event, I have so far just been splitting the data using the newline characters, but I'm finding that when large amounts of data are being sent I sometimes get data broken up and so I can't really split it like that it seems, how can I deal with this? [11:12] boghog: should I detect unterminated lines, and keep that data around somewhere and prepend it to the data I get in the next data event? [11:13] bjfletcher: chapel: ok i'll see what i can do with stdin/stdout and nodejs... are you on github? i'll put it up there if i get somewhere... [11:18] chapel: :) [11:18] chapel: boghog: there is a module I believe that works as a buffer but allows you to search for a character and splits based on that [11:18] chapel: SubStack: do you know what I am talking about? [11:18] okuryu has joined the channel [11:18] SubStack: lazy [11:19] jacobolus has joined the channel [11:19] boghog: chapel, well, I'm already doing the splitting, I'm just not sure how to deal with lines being split in the middle over separate socket data events [11:19] SubStack: require('lazy')(stream).lines.forEach(function (buf) { ... }) [11:19] SubStack: buf will be line-buffered [11:19] boghog: hm [11:19] chapel: there you go [11:19] chapel: :) [11:19] chapel: `v git node lazy [11:19] v8bot: chapel: pkrumins/node-lazy - GitHub - https://github.com/pkrumins/node-lazy [11:20] zilch: chapel, please see my comment .. https://github.com/Flotype/now/issues/50#issuecomment-1049479 [11:20] zilch: Guess it is applicable to dnode as well [11:20] boghog: not really sure how that helps me [11:21] zilch: Its just not grouping ... hell lot more [11:21] SubStack: boghog: buf will be line-buffered properly [11:21] SubStack: so you don't have to care about it [11:21] Bwen: when I run the following script http://pastie.org/1828036 everything works as intended for the exception that I have 3 "undefined" that are being sent to console and I cant figure why [11:21] boghog: ah okay [11:21] boghog: thanks SubStack/chapel [11:21] zilch: SubStack, you too ! https://github.com/Flotype/now/issues/50#issuecomment-1049479 [11:21] chapel: boghog: np [11:22] chapel: Node.js, there's a module for that [11:23] autotron has joined the channel [11:23] zilch: chapel, SubStack , guess jQuery'sque syntax for selection would be applicable to dnode or anything on top of it!! [11:23] SubStack: zilch: I think selectors is something that could be more cleanly added to EventEmitters first [11:23] SubStack: abstractly with some kind of subscribe module [11:24] SubStack: then dnode could just wrap that [11:24] zilch: SubStack, but that would make entire node.js a little slower, woun't it ? [11:24] SubStack: not sure where to start [11:24] zilch: btw, you liked the concept ? [11:25] SubStack: selectors seem useful [11:25] SubStack: they just need to live at the right level of abstraction [11:25] chapel: I agree, events seem to be a better place [11:25] chapel: since in reality, they are very similar [11:26] chapel: might be an abstraction of EE tbh [11:26] zilch: Shall I open a feature request there as well ? [11:27] zilch: But, I a not sure if all usecases of node.js would benifit from such additional feature. For them what we introduce will be bloatware [11:27] zilch: But if it is a seperate module, guess there should be no problem !! [11:27] SubStack: yes [11:28] zilch: SubStack, yes for bloatware peception of mine ? [11:28] chapel: thats why I said it would be an abstraction of EE, something to be built separately on top [11:29] zilch: chapel, what it would be named ... I super excited to create a repo !!! :p [11:29] markwubben has joined the channel [11:29] zilch: ACTION super excited for any damn new idea 1 [11:29] chapel: I I supert excited [11:29] e6nian has joined the channel [11:29] chapel: I super excited [11:29] zilch: ACTION is sucker that way :p [11:29] chapel: idk, group-events [11:30] Jarppa has left the channel [11:30] zilch: EventFilter ? [11:30] Bwen: djcoin: http://pastie.org/1828064 try that :) [11:30] zilch: group event doen't say that it is good for #anIndividualListener [11:31] zilch: we have #id,.class, and :pseuodclass support [11:31] azeroth__ has joined the channel [11:31] zilch: so something that is lucid a name !! [11:31] zilch: "eventrr" [11:31] zilch: ? [11:32] SubStack: party [11:32] zilch: as is in restarterr ? [11:32] zilch: SubStack, we have not yet completed :P [11:32] SubStack: a party is like an event where lots of people show up [11:33] SubStack: seems entirely apropos [11:33] SubStack: for a selector abstraction for grouped event emitters [11:33] zilch: SubStack, yeah super wicked cool !!! :D [11:33] zilch: so who is going to open a repo ? [11:33] zilch: Shall I ? [11:33] SubStack: yes [11:34] zilch: ACTION is creating a new repo called party.js [11:34] SubStack: zilch: and once you get something that works it's pretty easy to put it up on npm [11:34] zilch: SubStack, I do have one npm package already ;) [11:34] SubStack: great! [11:36] SubStack: hacking stuff up is great fun [11:36] axeljohnsson has left the channel [11:36] zilch: SubStack, indeed, that is what have been my experince since childhood ... [11:37] kia2011 has joined the channel [11:37] zilch: ACTION learnt 10 gwbasic  [11:37] zilch: ACTION 20 print it was fun [11:38] zilch: ACTION remembers dad telling F3 to load programm :') [11:39] zilch: ACTION is way too nostalgic today [11:40] dve_: Morning all! [11:40] dve_: SubStack, have you seen now.js (most probably), what are your thoughts in comparison to dnode? [11:41] antimatter__ has joined the channel [11:44] zilch: dve_, now.js, arguably, is little simplistic in approach with their shared space called everyone.now and now [11:44] zilch: dve_, they also have concept of group !! [11:45] dve_: zilch: that sounds like a good idea ;) [11:45] djcoin: SubStack: lol, I was looking for a lib to make parsing easy for RPC. I saw DNode, you are awesome ! :) + Lovely graphics on your web site :) [11:45] boghog: what is the http://nodejs.org/docs/v0.4.7/api/string_decoder.html API going to be useful for? [11:45] boghog: just ran into that page and it made me curious [11:47] dve_: dammit... lost my nick! :( [11:47] zilch: SubStack, what's you website ? link please !! [11:47] SubStack: djcoin: awww glad you like it [11:47] SubStack: http://substack.net/ [11:48] SubStack: boghog: that is quite mysterious [11:48] djcoin: I love the graphics :) Original and fun [11:49] boghog: yes I thought so too :p [11:49] dve__ has joined the channel [11:51] Remoun has joined the channel [11:51] SubStack: dve__: dnode works on both the browser and between node.js processes for one [11:51] Gruni has joined the channel [11:52] SubStack: and in dnode you can pass callbacks to callbacks to callbacks [11:52] SubStack: not sure if nowjs supports that yet [11:52] zilch: SubStack, you are an illustrator as well ? just curious .. what you use inkscape ? [11:52] SubStack: replication is kind of neat, I'd like to have a lib to make that easy with dnode [11:52] SubStack: yep inkscape [11:53] zilch: you have repo for those svg ? [11:53] gmanika has joined the channel [11:53] zilch: do share !!! [11:54] SubStack: zilch: you can just get the svgs from here: http://substack.net/images/ [11:54] zilch: I am already inspired !! [11:54] djcoin: Inkscape is such a great tool ! I love it [11:54] djcoin: Could not say the same about Gimp :b [11:54] zilch: ACTION Yay !! for inkscape !! [11:54] dve__: SubStack: hmm, not having to cb to cb to cb functionality would be a bit of a pain [11:56] SubStack: dnode does a recursive traversal on every json object passing over the wire to pick out the functions [11:56] dve__: still loving dnode though! in process of trying to push my little dnode powered app to no.de [11:56] zilch: SubStack, they are so good !! [11:56] SubStack: then it passes along metadata alongside the argument data to shim out functions for each of the wrapped functions [11:57] SubStack: which is very tricky to do correctly [11:57] SubStack: which is why I suggested that the nowjs folks just use dnode-protocol [11:57] dve__: to which they said??? [11:57] SubStack: already abstracted out and easy to use! [11:57] zilch: Created https://github.com/samyakbhuta/Party.js [11:58] zilch: Party.js is all about managing events well !! [11:58] SubStack: dve__: http://news.ycombinator.com/item?id=2316005 [11:58] zilch: SubStack, what now.js people said ? [11:59] SubStack: and the nowjs interfaced changed to what I recommended already so that was cool [11:59] dve__: SubStack: yea thats the article I spotted, that prompted my question [11:59] SubStack: also this: http://stackoverflow.com/questions/5317282/what-is-the-difference-between-dnode-and-nowjs [12:01] SubStack: oh except dnode doesn't use harmony proxies anywhere [12:04] PhilK has joined the channel [12:05] djcoin: SubStack: lol sorry to have made you angry about design patterns :) [12:06] jarek has joined the channel [12:06] jarek has joined the channel [12:07] liar has joined the channel [12:08] zilch: SubStack, So they are not using dnode a module but buying the concept !! [12:08] zilch: how ethical of them !!! [12:08] SubStack: djcoin: I'm just angry at design patterns at the GoF for popularizing them, not you [12:08] SubStack: s/at the/and the/ [12:09] SubStack: zilch: they're good folks [12:09] djcoin: oomg [12:09] SubStack: they just hacked something up and hadn't used dnode before [12:10] SubStack: or heard of it [12:10] replore_ has joined the channel [12:10] bjfletcher: i've just put up initial demo of "sed-like" node.js... https://github.com/bjfletcher/node-js-sed ... any feedback welcome [12:10] SubStack: asynchronous rpc is nothing new [12:10] dcampano has joined the channel [12:11] zilch: SubStack, also, when there is deep traversal in dnode for finding out function, how much overhead it cauese ? when you have hundred of clients ? Should rgument list better kept only 1to 3 level deep ? [12:12] dgathright has joined the channel [12:12] SubStack: it seems to not be much of an issue in practice [12:12] SubStack: since the network is the bottleneck, not the cpu processing [12:14] zilch: SubStack, also can't there be naming convention as how the argument is composed/assembled so that only part of the argument structure in the argument list ? Just my two cents [12:15] SubStack: zilch: I'm not sure what you mean there [12:15] chapel: hey SubStack [12:16] chapel: do npm search optimist [12:16] SubStack: as in intelligent diffing? [12:16] chapel: do you get a bunch of json parse errors/ [12:16] SubStack: chapel: nope, works fine [12:16] chapel: hmm [12:17] chapel: was there a change api wise between 0.0.3 and the newest? [12:17] zilch: SubStack, you have to travel the argument list to find out the function if any ... if the arguments are named say e.g funcAbc, then only you go inside ! ... or something which makes you not travel the entire deep structure !! [12:17] djcoin: Node.js rap omg :) [12:18] zilch: djcoin, marek is awsome [12:18] EM03: can express web framework do layouts? [12:18] djcoin: I am beginning to like this whole new world lol [12:18] Ond: Mhm [12:18] zilch: EM03, certainly [12:18] EM03: I don't see any docs for it [12:18] zilch: EM03, use jade with Express [12:19] Ond: http://expressjs.com/guide.html#template-engines [12:19] EM03: I am but I didn't see anything about layouts [12:19] SubStack: zilch: true, but javascript is all about being dynamic and schemaless [12:20] zilch: EM03, if you are using jade engine, you can create layout.jade file ... google around you shall ! [12:20] EM03: I did notice that but my site requires many layouts [12:20] EM03: 10+ [12:20] zilch: SubStack, but aren't rule meant for breaking :p [12:20] gmanika: I can't image dnode's traversal being a problem in practice [12:20] Ond: https://github.com/visionmedia/express/tree/master/examples [12:20] Ond: You can do as many layouts as you want [12:20] djcoin: did you heard the remix: http://soundcloud.com/marak/the-node-js-rap-txustice-remix [12:21] djcoin: Not bad [12:21] zilch: there is nobody from nodejitsu here ? [12:21] zilch: I want to get early access there !! [12:24] zilch: SubStack, I one of the server using dnode has thousand of client , then in scuh scenario lot of CPU cycle will be saved ! Guess that would have enviromenta impact !! [12:24] zilch: Proabably a tree or two !! [12:24] zilch: If one of the server ... typo [12:24] djcoin: time for a UrbanTerror [12:25] zilch: SubStack, if you guide me I will be ready to take up how much CPU cycle it saves !! Not that good with system level programming [12:26] zilch: yet !!! [12:26] hackband has joined the channel [12:31] geochap has joined the channel [12:32] febits has joined the channel [12:32] geochap: any good links on getting linux-tick-processor to work? I'm trying to profile but can't process my v8.log file [12:34] shiawuen has joined the channel [12:34] eb4890 has joined the channel [12:35] skm has joined the channel [12:39] zilch: SubStack, did i overwhelmed you or am I too lame ? [12:41] rfay has joined the channel [12:41] bjfletcher has joined the channel [12:41] gmanika: zilch: you are expecting dnode to have performance issues that in practice it does not have [12:43] zilch: gmanika, nope I am not saying dnode have performance issue , that part I already understood !!! [12:43] zilch: gmanika, what i am saying is thought network is bottleneck, CPU things could still improve, that too in special cases, and improvement will not yeild any results from users experience point of view [12:43] jarek has joined the channel [12:43] jarek has joined the channel [12:44] zilch: but will save CPU cycles [12:44] zilch: kinda pushing the limits !!1 [12:44] gmanika: well, premature optimization is the root of all evil [12:44] gmanika: you shouldn't worry about that until it's a real-world problem [12:44] dmojoryder has joined the channel [12:45] zilch: gmanika, saving CPU cycle will help save energy ? [12:45] zilch: electricity to be precise .. [12:45] m64253 has joined the channel [12:52] pt_tr has joined the channel [12:55] Bwen: gmanika: and when you have a real-world problem its too late [12:56] fdenbow has joined the channel [12:57] Billbad has joined the channel [12:57] robhawkes has joined the channel [12:57] dhasenan: gmanika, on the other hand, designing for scalability is usually easier than retrofitting scalability. [12:58] dhasenan: Though it's nice if you can come up with a design that lets you retrofit scalability cheaply and doesn't cost you much now. [12:58] McMAGIC--Copy has joined the channel [13:02] steffkes has joined the channel [13:10] Xano has joined the channel [13:11] Bwen: http://nodejs.org/docs/v0.4.7/api/fs.html#fs.readFile so if I understand correctly the callback is only called once with the COMPLETE content of the file? it will not callback more than once right? [13:11] fayce_ has joined the channel [13:11] Ond: Yeah [13:13] kriszyp has joined the channel [13:16] Xano has joined the channel [13:18] Xano: I am thinking of using nodejs to build a small app and sell it commercially. Legally speaking, I believe this is possible. However, if the source code is still open, I don't believe it's of much use. Is there a way to convert the original JS source to something that is not readable for humans, but can still be executed by node? [13:20] stagas: Xano: just because the source code is readable doesn't make it open source, you can still sell something [13:21] Xano: stagas: I know, but considering the nature of the product I believe it's too easy for others to just go ahead and use it without paying. I would just like t have a bit more control [13:21] beawesomeinstead has joined the channel [13:21] Xano: I have found some *.node files in existing projects that are pretty much unreadable. Not sure how they fit into a module, but it makes me think what I want is possible [13:22] fson: Xano: just provide it as a service instead of distributing the source? :P [13:22] Ond: You're trying to make your code unreadable? [13:23] Xano: fson: That's my backup plan :P [13:23] davidwalsh has joined the channel [13:26] fson: Xano: obfuscation is what you are looking for and there are many tools to do that, for example YUI Comressor and Google Closure Compiler [13:30] Xano: fson: Ah, I couldn't remember that term. THanks! [13:31] brianc has joined the channel [13:33] mape: Or UglifyJS [13:34] Bwen: anyone know how I can close a socket in linux. When I run my node.js server and then ctrl+c the socket seems to stay there for about a good 2 minutes and its annoying for development since I have to wait before running it again. [13:35] geochap has left the channel [13:35] brianc has joined the channel [13:37] bojicas has joined the channel [13:38] djcoin: Bwen: its weird, if you ctrl-c you node app, that has opened a socket, I guess it should close immediatly [13:39] djcoin: if not, try to sysout your pid (process.getpid or something like that), or using the port: lsof -i localhost:<your_port> [13:39] djcoin: get the pid, and kill it [13:39] djcoin: o_O [13:41] Bwen: checkin [13:42] matyr has joined the channel [13:42] djcoin: It may not be the best advice, but at least you could try that :) [13:42] djcoin: Dont know what happens if you have pending callback with socket reading somefile etc [13:44] Bwen: you sure about that lsof command... :p [13:44] djcoin: i try [13:44] djcoin: lsof -i :<yourport> [13:44] V1 has joined the channel [13:44] piranha has joined the channel [13:45] djcoin: Bwen: did not remember if there was a localhost stuff [13:45] Bwen: aight that works lets see >:D [13:45] siculars has joined the channel [13:46] Bwen: hehe oups closed my browser O.o [13:46] antimatter__ has joined the channel [13:46] djcoin: lol [13:47] Bwen: when I killed the pid [13:48] djcoin: your browser has a socket that never closes then [13:49] boghog: djcoin, not entirely sure about this but maybe you can kill your socket in the 'exit' event of process [13:49] boghog: not sure if that gets fired when ctrl+c-ing though [13:50] djcoin: Yeah maybe, im pretty new to node.js (2 days :)) so... [13:50] boghog: actually it seems kind of weird, I'd expect the os the clean up a process' socket/file handles when it exits [13:50] wao has joined the channel [13:51] sveimac has joined the channel [13:52] Bwen: interresting, thx boghog :) [13:52] djcoin: I don't know the behaviour of the os, maybe catching signals and closing gently all sockets if the way to go, yet I dont see why you will have to do this by hand [13:52] djcoin: yep [13:52] codefu_warrior has joined the channel [13:53] boghog: if it was a C app I would add a signal handler to clean up everything on ctrl+c [13:53] boghog: not sure what the node.js equivalent is [13:54] V1: ok, this automatic idling is annoying. [13:54] Bwen: V1: takes getting used to it... you talking about the non-blocking thing? [13:55] V1: Bwen I was talking about my IRC client :$ it keeps changing my nick to idle, even if i'm behind the keyboard -_-' [13:55] boghog: djcoin, http://nodejs.org/docs/v0.4.7/api/process.html#signal_Events [13:55] boghog: use that to intercept the ctrl+c, kill your socket etc [13:56] V1: I see what you did there ond [13:56] mike5w3c has joined the channel [13:56] pt_tr has joined the channel [13:56] djcoin: yep yeeep [13:56] Ond: You can version me if you want to know what the best IRC client is. [13:57] djcoin: But as you said, it's weird some socket are still open after the soft exit [13:57] Ond: Oh I don't respond to CTCP's sorry [13:57] V1: Ond: I'm using linkinus atm, :p [13:57] Ond: -V1- VERSION Linkinus (Agent build 24225) [13:57] V1: It seems to be good.. kinda [13:58] V1: atleast it's better than Colloquy that I have been using for ages, [13:58] V1: But what I really miss is mIRC script support -_-' [13:58] edude03 has joined the channel [13:59] PhilK has joined the channel [13:59] Bwen: djcoin: if I catch the process.on('SIGINT'... how do I make it exit when I am done closing sockets [14:00] djcoin: I guess you have a process.exit() stuff or something [14:00] djcoin: process.exit(1); [14:00] djcoin: bingo [14:00] djcoin: I love node :) [14:01] V1: You can definitly tell it's easter.. I can actually see what people did 5 hours a go in on github.. My dashhboard usually goes back on hour [14:01] Bwen: not 1... 0 :P [14:01] djcoin: exit 0 means it exited normally [14:01] Ond: V1 you spoke a while back about improving Opera support in socket.io [14:01] djcoin: if you hit ctrl-c i guess its not your case [14:01] Ond: Has anything been improved? [14:01] Ond: Or is that in consideration [14:01] V1: Ond: I added EventStream support in to Socket.IO [14:02] sveimac has joined the channel [14:02] V1: Ond: *crosses fingers* I think rauchg is gonna land it with the release of 0.7 *crosses fingers* [14:02] Ond: *crosses fingers* [14:03] Bwen: djcoin: its weird though. if I start the node server and no client hits it and I do ctrl-c then I can start it again no problem. but if a browser hits it then I have to wait 2 minutes before restarting it again... and the process.on('SIGINT' did not help.. looped thru all my servers and called close() on em.. and still had the problem [14:04] V1: Ond: That would mean propper Opera support starting with Opera 8+ , it's not 100% optimal but it beats all other polling methods when Flash is disabled. [14:05] Ond: Websockets are disabled by default in current versions of Opera correct [14:05] Ond: But they are available [14:05] V1: Also, the Flash fallback would re-enabled in Opera as the Flashfallback is now using External Interface instead of FLABridge which seems to be more stable [14:05] djcoin: does hitting ctrl-c bring up SIGINT in any case ? [14:05] djcoin: Do you properly close all sockets [14:05] djcoin: You are using socket.IO i guess [14:06] djcoin: not standard socket [14:06] djcoin: check [14:06] Bwen: djcoin: ctrl-c does trigger SIGINT in all cases, I put a console.log. how does one properly close all sockets? server.close() ? [14:06] Bwen: I dont use socket.IO... yet [14:07] Ond: Oh sorry that was a question, V1 [14:07] Ond: <Ond> Websockets are disabled by default in current versions of Opera correct *? [14:07] V1: Ond: Yes they are disabled by default [14:07] flippyhead has joined the channel [14:07] Ond: I see [14:08] Ond: But they are available? [14:08] Ond: (obviously, forget that question) [14:08] V1: Ond: Yes you can just enabled it [14:08] V1: ;D [14:09] V1: Ond: about:config search for websocket and you can enable it there :) [14:09] Ond: I'm on it [14:10] djcoin: Bwen: socket.close() [14:10] Bwen: djcoin: we are talking about what http.createServer() returns right? [14:11] whozman has joined the channel [14:12] djcoin: ah yeah, you are using an http server with data chunked I guess [14:12] djcoin: you can do a: req.end() [14:13] djcoin: You need to do [14:13] djcoin: this [14:13] djcoin: on('exit', req.end()) [14:13] djcoin: or something like that [14:13] djcoin: Im sure this is it [14:13] djcoin: Still weird you have to do this yourself [14:14] fawek has joined the channel [14:14] Corren has joined the channel [14:15] bradleymeck has joined the channel [14:17] brianloveswords has joined the channel [14:17] bwinton has joined the channel [14:18] djcoin: or res.end() o_O [14:19] Bwen: djcoin: i'm confused here... process.on('exit', function () {}); I dont have access to the "req" or "res" unless its within what http.createServer() returns [14:19] febits has joined the channel [14:20] Bwen: and all request that goes to the callback for each http.createServer() have a res.end(); [14:21] Gigawattz has joined the channel [14:22] djcoin: Maybe copy/pasting your code should be easier [14:22] omni5cience has joined the channel [14:22] Bwen: at this point I might as well make a github thingy O.o [14:22] zivester has joined the channel [14:24] devdazed has joined the channel [14:24] tsesame has joined the channel [14:25] djcoin: http://pastie.org/ [14:25] DennisRasmussen has joined the channel [14:26] Gruni has joined the channel [14:26] mbrevoort has joined the channel [14:27] fyskij has joined the channel [14:28] Bwen: http://pastie.org/1828377 [14:29] zilch has joined the channel [14:29] Gigawattz: Guy's does thi's look ok? [14:30] pHcF has joined the channel [14:30] Gigawattz: http://pastebin.com/raw.php?i=EQPEnBXV [14:33] Bwen: djcoin: i gotta go, i'll try to narrow it down to a pastie that can run on its own. Thx for the help [14:33] EyePulp has joined the channel [14:34] Lorentz has joined the channel [14:38] boghog: does net.createConnection(host, port) try to connect over ipv6 first? [14:41] dnolen has joined the channel [14:42] Billbad has joined the channel [14:43] marcello3d has joined the channel [14:44] pootietang: hi guys, has anyone tried installing npm on archlinux? I'm getting error messages [14:45] mscdex: boghog: what do you mean? [14:45] mscdex: boghog: it just connects using the address you give [14:46] boghog: if I give it a hostname, say example.com, will it ask for an A or AAAA record? [14:46] mscdex: pootietang: what are the error messages? [14:48] brolin has joined the channel [14:48] cryptix has joined the channel [14:50] Xano: Are globals allowed to store common configuration settings for different packages? [14:50] Xano: Allowed -> good practice [14:52] whozman has joined the channel [14:52] mikegerwitz: Xano: The same general "best practices" apply to most languages, including JS. Globals are rarely/never a good thing. [14:53] zilch: Xano, why not a json.config file ? [14:53] zilch: See example https://github.com/samyakbhuta/rightNow [14:53] Xano: mikegerwitz: zilch I'm trying to figure out a way to share config settings across modules [14:53] zilch: any many more [14:54] Xano: And I'm no die-hard/educated coder, so it's mostly trying, failing and learning [14:54] zilch: Xano, could you ellaborate [14:54] indutny has joined the channel [14:54] Xano: zilch: I have a number of modules that together provide a service. There is one ini configuration file and the settings it contains need to be accessible by all those modules [14:54] zilch: Xano, failing is another name for experince [14:54] mikegerwitz: Xano: The problem is, by using globals, you're very tightly coupling your modules with your software, making reuse very difficult. Which may or may not be an issue for you, but isn't the best idea. If you want configuration values in one place, store them in a single object and pass that object into the module [14:55] Xano: zilch: I wanted to sound modest :P [14:55] mikegerwitz: Xano: But it'd be best to pass to the module only the information it requires. Again, for reuse [14:56] mikegerwitz: Xano: (e.g. module.setHost( 'value' ).setPort( 2222 ) rather than module.setConfig( obj ) ); [14:56] zilch: Xano, just check out having config.json file and having it loaded [14:56] zilch: you can use fs module to load them [14:57] mscdex: boghog: ipv4 first then ipv6 [14:57] zilch: or alternatively you can declare those config as .js file and use require to load them [14:57] zilch: e.g require("./config.js"); [14:57] boghog: mscdex, ah okay thanks, I was looking at the net.js source and it does refer to an 'addressType' variable, but not sure where that comes from [14:57] mscdex: boghog: https://github.com/joyent/node/blob/master/lib/dns.js#L189 [14:58] mikegerwitz: zilch: If he does that require from inside each of the modules, that's no different than a global var [14:58] brweber2 has joined the channel [14:58] Gigawattz: mikegerwitz: Do you have any idea how to compress the pipe in this: http://pastebin.com/raw.php?i=EQPEnBXV [14:58] Xano: zilch: But it's stupid to parse a config file every time you need a setting. [14:58] Gigawattz: mikegerwitz: gzip compression [14:58] zilch: mikegerwitz, he has to have different config.json file, true [14:58] Xano: Is there a way to split up a module in multiple files, or are modules the only way of splitting things up? [14:59] Xano: Split up a module in multiple files while retaining the same scope [14:59] Gigawattz: modules are the way of splitting up things! [14:59] dhasenan: Xano, you could add all exported symbols from another module to your own module's. [14:59] mikegerwitz: Gigawattz: https://github.com/joyent/node/wiki/modules#compression [14:59] mikegerwitz: Gigawattz: I haven't personally delt with gzip from within node [14:59] zilch: xano, you load those files only once it the life time serve or application, that is when it is started ..!!! [14:59] mikegerwitz: dealt* [14:59] zakabird has joined the channel [15:00] dhasenan: var blah = require('foo'); for (var name in blah) exports[name] = blah[name]; [15:00] dmojoryder has joined the channel [15:00] ashb has joined the channel [15:00] zzak has joined the channel [15:00] mikegerwitz: Gigawattz: Just make sure you also specify in the response header that it's gzip compressed, in addition to compressing the actual data, unless the module you choose does that for you [15:00] Xano: zilch: My whole config problem actually stems from the way I set up my project: include files are actually separate modules, and those get a new scope [15:01] zilch: could you please share the code ?! [15:01] mikegerwitz: Xano: You're looking for the PHP-style include()? ;) [15:01] Xano: mikegerwitz: bingo [15:01] mikegerwitz: Xano: That reintroduces the global scope problem. There's no difference. [15:01] Xano: mikegerwitz: Yeah, you're right [15:02] dhasenan: Hrm. I want to execute a function, but bound the amount of time it can take to execute. Recommendations? [15:02] Xano: ACTION shouldn't be coding in the sun. Everything I do know isn't accessible due to increased laziness :P [15:02] zilch: For module X you have x.config.json file and you use it wherever it is required .. [15:03] dhasenan: I can easily check the execution time and blacklist stuff that fails SLA too often... [15:03] Gigawattz: i do not wan't a module, everything is nuilt by myself, im ju'st not sure how to compress the output on this line: require('fs').createReadStream(self.staticPath + Request.url).pipe(Response); [15:03] zilch: dhasenan, you put it under settimeout event ? [15:03] mscdex: dhasenan: if it's a blocking function, you're out of luck [15:03] Gigawattz: i need like a callback between the read event and the send event ! [15:04] bartt has joined the channel [15:04] dhasenan: zilch, I want to *stop* the function after 10ms, not *start* it :) [15:04] mikegerwitz: Gigawattz: I don't believe node.js is packaged with support gzip compression [15:04] mscdex: dhasenan: otherwise yes, just use a setTimeout() [15:05] mscdex: dhasenan: have a boolean variable that indicates whether the function is done or not and act on that inside the timeout [15:05] mikegerwitz: dhasenan: they mean use setTimeout() from within the function itself, then set a flag [15:05] Gigawattz: no i would spawn a gzip process [15:05] Gigawattz: can i do: [15:05] Gigawattz: var rS = require('fs').createReadStream(self.staticPath + Request.url); [15:06] Gigawattz: rS.on('read',function(chunk){}) [15:06] dhasenan: I don't actually see how that would work, though. I would need to return from the function to the event loop for the callback to run. [15:06] zilch: dhasenan, if you have child process run the function inside and kill it if the time is over !! [15:06] mscdex: that's dangerous [15:06] mscdex: :P [15:07] mscdex: dhasenan: that's why i said if it's a blocking function, you're out of luck [15:07] mikegerwitz: dhasenan: use process.nextTick() every once in a while. You need to structure your function to support it. Otherwise, use a child process like zilch suggested, which can get messy [15:07] dguttman has joined the channel [15:07] mikegerwitz: Gigawattz: http://nodejs.org/docs/v0.4.7/api/child_processes.html#child_process.exec [15:07] zilch: I thin it better to penalize then to stop function [15:07] mscdex: dhasenan: if it's something computationally intensive, use a thread pool [15:08] mscdex: dhasenan: or use a separate process [15:08] mikegerwitz: Gigawattz: Same concept as the example. Send the response int he callback [15:08] zilch: dhasenan, it could be really helpful if you can explain what is your usecase [15:08] Gigawattz: hmmm [15:08] mikegerwitz: Gigawattz: It would be much better to use a module, though. There's unnecsesary overhead with exec()ing processes [15:09] dhasenan: My use case is a MUD. Potentially thousands of scripts written by people who could very easily be idiots. [15:09] replore has joined the channel [15:09] dhasenan: Or at least not sufficiently appreciative of the nature of node and the structure of the mud. [15:09] zilch: mscdex, I am curious to know how it would go messy, already accepted your response just curious to know [15:09] Gigawattz: yea that's what im worried about, but as a gzip library does not come with the nodes C libraries i don't want my client's to have to compile with a custom library [15:09] mscdex: zilch: huh? [15:10] zilch: mscdex, how it will be messay to kill the process if it don't do it work within time .. [15:11] zilch: mscdex, oopp it was for mikegerwitz [15:11] mscdex: zilch: oh that, i was referring to Gigawattz's createReadStream code there wrt "that's dangerous" ;) [15:11] zilch: mscdex, lol ! [15:12] zilch: ACTION is feeling hungry but would wait for a friend !! [15:12] mikegerwitz: zilch: Depends on the use case. dhasenan just mentioned it may be used to execute a number of scripts, so it may be a good idea to use that method, then. It sounded like dhasenan was talking about running a single function [15:13] mikegerwitz: zilch: Which, spawning a separate process for, unless it's very intensive, seems unnecessary. It'd be better to design the function around terminating itself. Child processes are better suited for situations where you have no control over how the operation works [15:13] zcopley has joined the channel [15:13] dahankzter has joined the channel [15:14] zilch: mikegerwitz, I guess in those case, the data integrity of the data which was suppose to be operated by that process/function will be at stack [15:14] mikegerwitz: (in this context, at least) [15:14] dhasenan: Also useful would be a javascript interpreter that allows me to insert callbacks in other functions. Maybe something like pypy for javascript. [15:15] Gruni has joined the channel [15:15] zilch: dhasenan, interesting !!!! [15:16] dhasenan: Hells, if I'm doing this, I could hack up the coffeescript compiler to insert a callback between every function call. [15:17] zilch: dhasenan, sounds *even* more interesting !!! [15:17] a2800276 has joined the channel [15:18] dhasenan: zilch, it's pretty straightforward, I think, as long as I have a cheap enough timer. [15:19] zilch: dhasenan, straight and powerful ... not a bad combo at al [15:21] marcello3d: anyone here use findAndModify on mongodb? [15:21] marcello3d: or mapreduce [15:21] Mrfloyd has joined the channel [15:23] Hello71 has joined the channel [15:23] Hello71 has joined the channel [15:23] Hello71 has left the channel [15:24] antimatter__: Is there any REPL tool for jade... [15:24] marcello3d: not that I know of [15:25] marcello3d: what would that even mean? [15:25] JacobSingh has joined the channel [15:26] JacobSingh: I've got an existing set of ejs views, I want to move to jade. Are there any tools to convert? Or is it possible to use both in one express app? [15:26] mape: JacobSingh: just set the extension [15:26] Charuru: jacob yeah [15:26] Charuru: there is a tool [15:26] ncb000gt has joined the channel [15:27] Charuru: https://github.com/visionmedia/jade/issues/178#issuecomment-1039042 [15:27] Charuru: some bugs in it [15:27] JacobSingh: app.register('.html', require('ejs')); [15:27] JacobSingh: app.register('.jade', require('jade')) ?; [15:27] ncb000gt: Anyone here using regex's in their C/C++ modules? [15:27] JacobSingh: mape: ^^ [15:27] JacobSingh: Charuru: thanks! [15:27] mape: JacobSingh: don't think you need to do any of that [15:27] mape: just do render('index.ejs') [15:27] antimatter__: marcello3d repl tool which parses input and converts it into html [15:27] fljitovak has joined the channel [15:28] geochap has joined the channel [15:29] Wizek has joined the channel [15:29] JacobSingh: mape: okay, the views are currently .html, but I suppose I can rename them [15:29] nmtmason has joined the channel [15:29] Charuru: hmm i can probably write a converter in javascript [15:29] Charuru: but not bored enough :S [15:30] marcello3d: antimatter__: doesn't really make sense with a templating language, you're better off just using express, editing your template, and reloading your web browser [15:31] jacobolus has joined the channel [15:31] djcoin: Node.js is so amazing im flabbergasted [15:31] marcello3d: djcoin: like really flabbergasted? or just kinda sorta flabbergasted [15:31] djcoin: oreally ! [15:32] djcoin: orly [15:32] marcello3d: naisu :D [15:32] djcoin: yeah, i brought back my memories on this one (im french :b) [15:32] djcoin: (well not english is sufficient) [15:33] zilch: JacobSingh, Balle Balle !!! [15:33] JacobSingh: hah [15:33] zilch: How is Delhi doing ? [15:33] siculars has joined the channel [15:33] djcoin: SubStack: damn just managed to use part of your dnode plugin, its awesome [15:33] zilch: and you github account id ? [15:33] djcoin: thanks for that [15:37] tmpvar has joined the channel [15:38] bjfletcher has joined the channel [15:39] sveimac_ has joined the channel [15:39] Spion_ has joined the channel [15:40] AntelopeSalad: JacobSingh: is there any reason why you're switching from ejs to jade? [15:40] Corren has joined the channel [15:44] cryptix has joined the channel [15:44] tedsuo has joined the channel [15:45] halfhalo has joined the channel [15:45] halfhalo has joined the channel [15:47] Mrfloyd_ has joined the channel [15:47] tedsuo has left the channel [15:48] marcello3d: is there a way to require a file in node.js such that it's magically wrapped in module.exports = ( <file contents> ) ? [15:49] marcello3d: (or possibly module.exports = (function() { .... })() ) [15:50] mape: then you still have to change the file to return [15:50] marcello3d: right [15:51] marcello3d: actually, maybe this isn't required [15:51] marcello3d: have another idea :) [15:52] mscdex: why require when you could just fs.readFileSync ? [15:53] dguttman has joined the channel [15:53] marcello3d: with eval? seems grody :D [15:53] marcello3d: I want to be able to use it like a require [15:55] marcello3d: alternatively [15:56] jakehow has joined the channel [15:56] marcello3d: v8: ({test:function(){ return this.x }, x:5}).toSource() [15:56] v8bot: marcello3d: TypeError: Object #<Object> has no method 'toSource' [15:56] marcello3d: is there a way to convert code to text? [15:56] marcello3d: I know rhino has that toSource method [15:56] mape: toString on a function= [15:56] marcello3d: v8: (function(){return this.x}).toString() [15:56] v8bot: marcello3d: "function (){return this.x}" [15:57] marcello3d: hmmm [15:57] djcoin: toString [15:57] djcoin: ye [15:57] flippyhead has joined the channel [15:57] marcello3d: so I'd have to do the recursion mahself [15:57] marcello3d: not too bad I suppose [15:57] marcello3d: has anyone done that? [15:57] marcello3d: a toString method for arbitrary objects [15:57] coreb has joined the channel [15:58] replore_ has joined the channel [15:58] no-gooder has joined the channel [16:00] marcello3d: is there any way to access the closure of a javascript function on v8? [16:00] Xano has joined the channel [16:01] antimatter__ has joined the channel [16:01] markstory has joined the channel [16:02] brez__ has joined the channel [16:03] deepthawtz has joined the channel [16:04] Swimming_bird has joined the channel [16:04] marcello3d: new module time :) [16:05] JacobSingh: Charuru: cool tool, unfortuantely, only works with standard HTML, not ejs templates [16:06] blueadept has joined the channel [16:06] Charuru: JacobSingh: shouldn't be hard to use find and replace to change your placeholders into something acceptable [16:07] JacobSingh: Charuru: yeah, I'll poke at that later and maybe write up something about it. thx for the link [16:07] Charuru: ok [16:07] JacobSingh: I gotta say, as a newb to node, this IRC channel is really friendly, thanks guys! [16:08] febits has joined the channel [16:13] mynyml has joined the channel [16:17] dguttman has joined the channel [16:19] djcoin: Does any one know a good tool to draw state machine diagram ? [16:20] jesusabdullah: pencil and paper, yo [16:20] jesusabdullah: For diagramming, I'd suggest trying to get inkscape to do what you want [16:20] jesusabdullah: That, in my experience, has been easiest [16:21] jesusabdullah: If you want pre-templated shapes, look into Dia [16:21] liar has joined the channel [16:21] hij1nx has joined the channel [16:21] cwang has joined the channel [16:22] djcoin: jesusabdullah: i just saw TCM [16:22] djcoin: seems cool [16:22] djcoin: I know dia, its ok [16:22] djcoin: And inkscape is great yeah :) [16:28] fly-away has joined the channel [16:28] robhawkes has joined the channel [16:30] zivester has joined the channel [16:31] marcello3d: SubStack: ever get uglify working? [16:31] antimatter__: showoff.io is uber cool..!! [16:31] boaz has joined the channel [16:32] ditesh|cassini has joined the channel [16:33] saikat has joined the channel [16:35] steffkes: because of eh .. which feature? dyndns hm? [16:36] synkro has joined the channel [16:36] flippyhead has joined the channel [16:37] pdelgallego has joined the channel [16:37] antimatter__: steffkes ...it is a neat service for sharing stuff on cloud [16:37] harth has joined the channel [16:38] eirikur has joined the channel [16:38] febits has joined the channel [16:39] liquidproof has joined the channel [16:42] cryptix has joined the channel [16:47] marcello3d: anyone have a regexp for legal javascript variable names? [16:49] liar has joined the channel [16:51] djcoin: marcello3d: you may find one in the emcma script spec i guess [16:51] djcoin: ecma * [16:51] marcello3d: alright, cheers [16:52] timmywil has joined the channel [16:52] antimatter__: marcello3d : [a-zA-Z_$][0-9a-zA-Z_$]* [16:53] djcoin: that seems correct ! [16:53] sveimac has joined the channel [16:53] davidwalsh has joined the channel [16:53] marcello3d has joined the channel [16:54] djcoin: antimatter__ | marcello3d : [a-zA-Z_$][0-9a-zA-Z_$]* [16:54] antimatter__: marcello3d : try this -- [a-zA-Z_$][0-9a-zA-Z_$]* [16:54] marcello3d: but how about things like if, do, while, etc [16:54] antimatter__: you said variable names right? [16:54] djcoin: if|do|while ;) [16:54] antimatter__: :) [16:54] djcoin: etc is not valid [16:56] davidwalsh has joined the channel [16:56] antimatter__: was playing around with express and out of nowhere this string gets printed on my screen "more testmore test" [16:56] antimatter__: is it a bug [16:56] marcello3d: djcoin: thanks. guess I'll just write one myself :) [16:57] thalll has joined the channel [16:57] djcoin: marcello3d: I think you would be better off with the ecma script spec, you would have all of the keywords registered [16:57] marcello3d: yea [16:57] djcoin: kk [16:58] marcello3d: I'm wondering if uglifyjs has anything [16:58] djcoin: im sure that is has already be done many times [16:58] marcello3d: https://github.com/mishoo/UglifyJS/blob/master/lib/process.js#L1593 [16:58] djcoin: you could check dnode [16:59] djcoin: as it serializes stuff [16:59] djcoin: nice [17:04] marcello3d: sweet :) [17:04] Wizek has joined the channel [17:04] marcello3d: function legalKey(string) { [17:04] marcello3d: return /^[a-z_$][0-9a-z_$]*$/gi.test(string) && [17:04] marcello3d: !/^(abstract|boolean|break|byte|case|catch|char|class|const|continue|debugger|default|delete|do|double|else|enum|export|extends|false|final|finally|float|for|function|goto|if|implements|import|in|instanceof|int|interface|long|native|new|null|package|private|protected|public|return|short|static|super|switch|synchronized|this|throw|throws|transient|true|try|typeof|undefined|var|void|volatile|while|with)$/.test(string) [17:04] marcello3d: } [17:06] rauchg has joined the channel [17:07] jacter has joined the channel [17:08] jetienne has joined the channel [17:13] dre has joined the channel [17:14] chiyam has joined the channel [17:14] losing has joined the channel [17:15] dre: anybody up for helping a noob? [17:15] cryptix has joined the channel [17:16] tbranyen: dre: nope [17:19] __sorin__ has joined the channel [17:20] dre: apparently so [17:21] siculars has joined the channel [17:21] antimatter__: dre go ahead and shoot ...this framework is gonna die soon anyways [17:22] boghog: why [17:22] dre: I see no future either <s>. [17:22] cryptix1 has joined the channel [17:22] antimatter__: callbacks are real hell [17:22] antimatter__: it is a fancy thing though!! [17:23] jetienne: q. http.createClient is not in http://nodejs.org/docs/v0.4.7/api/http.html anybody know why ? [17:25] dre: anyway, i'm trying to setup something simple. I'm tryign to get socket io to respond. Trying basic things. I've written console.log("here") in the socket.on and its not showing up. I htink it wold without even a client if logic serves me. [17:26] JusticeFries has joined the channel [17:27] dre: I'd think it would show up in the same console as I initiate it? Is that not correct? [17:27] krunkosaurus has joined the channel [17:28] antimatter__: yes you would have to put a require('socket.io') and then use that variable for doing rest of the stuff [17:29] antimatter__: you can do something like this socket.on("connection", function(){console.log('here')}); [17:30] no-gooder: anybody used node.js with subdomains? i mean are you using on different ports or is there any different approach ? [17:30] jetienne: This type of response MUST NOT have a body. Ignoring write() calls. <- got this enigmatic message :) [17:30] no-gooder: multiple subdomains [17:30] dre: yup. theres like 3 tutorials that show most. I'm tryign to see how far I get with the console.log but not even that. [17:30] fairwinds has joined the channel [17:31] dre: is it customary to post a snippet here? or should I got the groups? [17:31] antimatter__: you can give a pastebin link over here [17:32] aguynamedben has joined the channel [17:33] JmZ has left the channel [17:34] newy_ has joined the channel [17:34] dre: thats a cool service. http://pastebin.com/jXP55PdK. Really right now, I'm trying to figure out why line 15 is not firing. [17:37] kmiyashiro has joined the channel [17:37] antimatter__: dre : instead of <script src="http://localhost:8000/socket.io/socket.io.js"></script> try this <script src="/socket.io/socket.io.js"></script> [17:37] antimatter__: and let me know [17:38] dhasenan: dre, did you try telneting to localhost:8000? [17:39] dre: Well, I'm trying to replicate what I will do with my site which is already in php on 80 by apache. So, i was going to setup whatever oddness on 8000 with node.js. [17:39] dre: Havent telneted to 8000 bu tI have confirmed that the socket.io is serving the javascript. [17:40] dre: dhasenan: so by telnetting, I can simulate the socket? I suppose it is a socket of some sort. Let me try. [17:41] fljitovak has joined the channel [17:41] antimatter__: dre ...just confirming ...did you check the console on server or on browser ? [17:42] dre: I've interpreted that where I type node nodetest.js on the server in the console, messages would show after that? [17:42] antimatter__: yes that is right [17:43] langworthy has joined the channel [17:43] dre: Hmm, telnet gives some sort of error. telnet http://localhost:8000/ [17:43] dre: telnet: could not resolve http://localhost:8000//telnet: Name or service not known [17:43] jetienne: q. how to get a proxy with a websocket ? i need to access websocket on port 80... [17:44] antimatter__: dre ...do this ... var socket = new io.Socket(null, {port: 8000, rememberTransport: false}); [17:44] antimatter__: on client side [17:44] softdrink has joined the channel [17:44] antimatter__: i just saw that you did not specify the port and other stuff while initiating the socket [17:45] stagas: jetienne: https://github.com/nodejitsu/node-http-proxy/blob/master/examples/web-socket-proxy.js [17:45] Mrfloyd has joined the channel [17:46] blueadept has joined the channel [17:46] jetienne: stagas: nice. but this requires to get node on this port 80 no ? [17:46] drudge: http://rubbernetapp.com/ [17:47] stagas: jetienne: well, yeah you need to create a server on port 80 also, how else :) [17:47] jetienne: stagas: :) [17:47] jetienne: stagas: btw im tried to fight with same origin stuff [17:47] jetienne: just sharing :) [17:47] dre: AHA! thanks antimatter__, I had tried slightly similar but too different to work. I 've now got messages showing up and a viable socket obj on the client! [17:48] antimatter__: you are welcome :) [17:49] neorab has joined the channel [17:50] stagas: jetienne: have a crossdomain.xml in root or port 443 iirc [17:51] mikl has joined the channel [17:51] mikl has joined the channel [17:54] dre: am : so the first parameter is null so that it can just use the same domain, port is obvious enough(I had thought it might use the same as the js include but obviously not a good assumption. so, why do I want to forget the transport? [17:54] F1LT3R has joined the channel [17:56] jetienne: stagas: this is about putting image from a site on a webgl texture and then to a .toDataUrl()... [17:56] pdelgallego has joined the channel [17:56] jetienne: stagas: crossdomain.xml isnt the flash stuff ? [17:56] jetienne: or is it a cors part i dunno ? [17:56] some1else has joined the channel [17:57] dre: on improving and speeding my dev process server side, currently, I make a change in gedit, go to open terminal, ctrl c, killall-9 node, then node sockettest.js. This seems a bit wonky, any tips on making that easier? [17:57] dies_el has joined the channel [17:57] matjas has joined the channel [17:57] dre: should I script something in my editor? [17:57] kmwallio has joined the channel [17:58] jetienne: dre: watch the dir containing the source and relaunch node automatically [17:58] jetienne: dre: stagas did something for that [17:58] jetienne: stagas: is my memory ok ? [17:59] dre: Hmm, thats a good idea. Any write up or link on doing it? [18:00] mtsl has joined the channel [18:00] jetienne: dre: several tools are doing it. i got one with inotify tools in a corner [18:00] jetienne: but thinking about it, i could use a node version of it [18:00] jetienne: stagas: ping!!! :) [18:00] stagas: jetienne: not for dev stuff I have a deployment tool that does that but it kinda sucks it was my first node project :P [18:00] Druide_ has joined the channel [18:00] saikat has joined the channel [18:00] stagas: dre: use supervisor or something like that there are a couple [18:00] jetienne: stagas: ah ok [18:02] Xano has joined the channel [18:02] btipling: is it safe to have a circular require? a.js requires b.js and b.js require a.js ? [18:02] stagas: dre: https://github.com/joyent/node/wiki/modules#build-and-deployment [18:02] btipling: I don't see any errors, just wondering what it's doing [18:03] btipling: actually doesn't seem to printing any of the log messages I have in the file after the first require [18:03] pquerna: btipling: it abspaths the name [18:03] btipling: I guess it's cashing them [18:03] antimatter__: dre i think remembertransport param indicates that the type of transport (ajax longpoll, websocket etc) to be remembered by the server [18:03] btipling: caching* [18:03] pquerna: btipling: and then only loads them once [18:03] pquerna: right [18:03] bjfletcher has joined the channel [18:03] pquerna: it stores them in a cache more or less [18:03] drefined has joined the channel [18:04] pquerna: for that path [18:04] jetienne: btipling: yes [18:04] btipling: ah cool thanks [18:04] pquerna: its like require_once in php, not like include in php [18:04] tahu has joined the channel [18:04] dre: antimatter : yup, i was wondering why to tell it to forget. I'll experiment. [18:04] jetienne: antimatter__: by the client. it is stored in a cookie [18:05] pquerna: dre: http://cast-project.org/ [18:05] dre: Gents, thanks for the help. have a great day! [18:05] pquerna: (its written in node.js, they are working on the first release) [18:06] antimatter__: jetienne : thanks for pointing that...my fault [18:07] tahu has joined the channel [18:07] dre: \exit [18:07] dre: oops sorry [18:08] dre: \quit [18:08] dre: ohh, goodness. how embarassing. [18:08] sveimac has joined the channel [18:08] Gigawattz: heya guy's, you know if i do >> if(method in object), what's the bast way to validate that that method is what I created [18:08] Gigawattz: so it's not a function like call or w.e [18:09] neebz has joined the channel [18:09] pyrotechnick1 has joined the channel [18:09] pyrotechnick1: SubStack: shit bro [18:09] pyrotechnick1: nowjs beat me to it [18:09] pyrotechnick1: syncing primitives [18:10] pyrotechnick1: the bastards [18:10] rsms has joined the channel [18:11] saschagehlich has joined the channel [18:11] gazumps has joined the channel [18:12] dve__ has joined the channel [18:12] Yuffster has joined the channel [18:13] hackband has joined the channel [18:13] jeromegn: anybody know how to use xAuth with the node-oauth lib? [18:16] Gruni has joined the channel [18:18] k_89 has joined the channel [18:19] k_89: hi... can you guys suggest a nice tutorial or something to learn web-dev in nodejs, i have been through all the "hello world"s and all, want to move ahead, url reading, handling get, post, etc [18:20] AAA_awright_ has joined the channel [18:20] Aria has joined the channel [18:21] sh1mmer has joined the channel [18:22] marcello3d has joined the channel [18:22] coreb: k_89: check out express.js [18:22] stagas: k_89: http://expressjs.com/screencasts.html [18:22] mscdex: k_89: http://nodetuts.com/ http://nodeguide.com/ http://howtonode.org/ http://nodebeginner.org/ [18:23] k_89: thnx guys [18:23] saschagehlich: (omg this is the most awesome channel I've ever seen on irc. you will not get support like this anywhere else.) [18:23] mscdex: k_89: also, don't forget the modules list: https://github.com/joyent/node/wiki/modules [18:23] sveimac has joined the channel [18:24] V1 has joined the channel [18:24] k_89: saschagehlich, if u r not being sarcastic, then try out javascript, jquery, php channels, all are pretty 'supportive' [18:24] saschagehlich: that was not sarcastic [18:25] saschagehlich: that's actually the reason why I switched to node.js from python or rails or whatever [18:25] sh1m has joined the channel [18:25] ji0n has joined the channel [18:25] k_89: then, ask around whatever u want in these channels, the javascript guys seem to know a lot [18:25] saschagehlich: javascript folks are cool, all the rails and php people mostly go like "screw you, read the docs" [18:26] V1: that probably becauase we don't have any docs yet :$ we mostly code and are to lazy to document it ;) [18:26] stagas: niall: node.js rulez! [18:26] niall: stagas: node/lib/http.js [18:27] saschagehlich: :D [18:27] stagas: niall: whatever [18:27] niall: exoprts.whatever = {"f":"getPrograms"} [18:27] saschagehlich: wtf? [18:27] stagas: :P [18:27] saschagehlich: node.js source code crawler? [18:27] stagas: learning ai fed with #node.js logs [18:27] saschagehlich: ah nice [18:28] V1: theres some nice typos in tht [18:28] no-gooder has joined the channel [18:29] sechrist_ has joined the channel [18:29] newy_ has joined the channel [18:29] gazumps has joined the channel [18:29] mscdex: niall: lol [18:29] niall: or (lol) [18:30] stagas: niall: mscdex [18:30] niall: anyone using ObjectWrap stuff in that if you see now actually incrementally like that graham (but not yet. mscdex said, pathbody.push hasnt been committed to get fucknut frustrated right to visual scan, but do you pass stuff working -- he made it [18:30] stagas: niall: yeah [18:30] niall: yeah, that's clearly /home/node/local/bin is on node.js, pronounced like that was to 'util' while I start distilling [18:31] V1: niall: \o/ [18:31] niall: !log [18:31] V1: ;( [18:31] mscdex: heh [18:31] mscdex: niall: V1 [18:31] niall: mscdex: the h[v1] adds to say the little faster, it last time [18:31] V1: ._.' wtf [18:32] stagas: niall: you're talking gibberish [18:32] niall: talking in parallel, then format ), [18:32] mscdex: niall: sparta [18:32] sechrist has joined the channel [18:32] niall: mscdex: yeah i wonder if you can get it will do you in my i7 a spartan [18:32] mscdex: heh [18:33] stagas: niall: php [18:33] niall: stagas: PHP into the 2 each instance in our app to use it was due to read it.. [18:35] saschagehlich: niall: porn [18:35] niall: (If you got to the best to the porn site a first of where it easier to uncompress and done it exactly? [18:36] saschagehlich: cool story, bro. [18:37] saschagehlich: what could be the reason for many hundreds of connections to stay in FIN_WAIT2? o_O [18:38] saschagehlich: jdub: ping [18:38] omni5cience has joined the channel [18:39] sveimac_ has joined the channel [18:40] eldios has joined the channel [18:41] sechrist: var ebunny = new require('easter-bunny'); ebunny.hideEggs(); [18:41] eldios: lol [18:42] marcello3d: ACTION is close to releasing a new lib :) [18:43] mscdex: doesn't ebunny have to emit 'egg' events first ? [18:43] mscdex: ;) [18:44] sveimac has joined the channel [18:44] V1: mscdex: Doesn't the bunny emit that after hideEggs? [18:44] mscdex: he can't hide what hasn't been emitted yet [18:44] mscdex: lol [18:45] V1: it can if hideEggs() starts the egg hiding process [18:45] Bj_o_rn has joined the channel [18:45] bartt has joined the channel [18:46] ryah: marcello3d: lib for what? [18:46] marcello3d: toSource method [18:47] marcello3d: https://github.com/marcello3d/node-tosource [18:48] marcello3d: basically a cheap version of util.inspect, slightly different usecase than JSON.stringify [18:48] marcello3d: (cheap as in not as advanced ;-)) [18:48] marcello3d: I intend to use it for code sharing with the browser [18:49] marcello3d: ryah: you might know the answer to this, is it possible to get the closure object of a function instance? [18:49] fairwinds: hi. is there a lib similar to Jammit for ruby for node? [18:50] coreb: has anyone tried client side rendering with express.js? [18:51] tilgovi has joined the channel [18:52] brolin has joined the channel [18:52] saschagehlich: ryah: ping! did you have a further look at this one here? https://github.com/joyent/node/issues/664 [18:53] fairwinds: coreb: am working on this with backbone and express over next few days [18:53] fairwinds: will see how it goes [18:54] Gigawattz: ryah, is there a simple way to run JavaScript files that have been wrapped like your NativeModule.wrapper [18:54] Druide_ has joined the channel [18:54] Gigawattz: i have an MVC Architecture and i want to pre-prepare the controller files so the user does not have to extend base controller's [18:55] marcello3d: ryah: let's all ask you questions simultaneously! [18:55] coreb: fairwinds: tried any benchmarks yet? [18:56] ryah: saschagehlich: oh great - i've heard a similar report elsewhere [18:56] V1: marcello3d: ryah already handles questions async, we can just flood him and he will callback() when needed [18:56] ryah: saschagehlich: if that twitter test can reproduce than that's a long way towards figuring out what's going on [18:56] arunagw has joined the channel [18:56] ryah: marcello3d: the closure of a function instance? [18:56] fairwinds: coreb: I will see what happens. I believe it should be good since server side is only json. Think it will be fast and slick [18:56] ryah: Gigawattz: requrie() ? [18:57] saschagehlich: ryah: okay, I'll take a closer look at this. I'm just experiencing that some of my servers are running into a "too many open files" error due to many many WAIT2 connections [18:57] fairwinds: coreb: not completely but almost [18:57] marcello3d: ryah: yea, like if I have var x=5; function foo() { console.log(x) }, is there anyway to get `x` from `foo`? [18:57] ryah: saschagehlich: a localhost test will help a lot [18:57] ryah: saschagehlich: i can't look at it immediately though - it may be a few days or a week [18:57] saschagehlich: ryah: I'll try to create one [18:57] Gigawattz: i mean like eval, (function(Request,Response,Server,Model, View,Libraries){ /*Eval Controller Here*/ }); [18:58] ryah: saschagehlich: thanks [18:58] ryah: marcello3d: no [18:58] marcello3d: ryah: through native code? [18:58] ryah: marcello3d: i'm sure if you're inside V8 you can do it [18:58] ryah: but not from their C++ api [18:58] marcello3d: ah ok [18:59] marcello3d: seems like that'd be useful for introspection/meta programming stuff :) [18:59] ryah: yep - but js doesn't have it :) [19:00] Gigawattz: also ryah, is there plan's for a native gzip module in node's http client ? [19:00] Gigawattz: would be nice [19:01] ryah: Gigawattz: not a concrete plan, but i want to do it [19:01] marcello3d: zlib :D [19:01] ryah: at the moment we're saturated with work though [19:01] ryah: between liboio nodeconf and bugs :) [19:01] marcello3d: write a zlib module and I'm sure the rest of us can finish it :) [19:01] Gigawattz: would be a ++, it's highly used with webservers [19:02] marcello3d: Gigawattz: I wrote a gzip middleware for express 2.x [19:02] marcello3d: using compress-ds [19:02] marcello3d: it's a little hacky, but I could probably release it if people are interested [19:02] Gigawattz: marcello3d,ryah, see http://stackoverflow.com/questions/5771140/how-to-gzip-content-thats-passed-threw-a-piped-readstream for why i would like a native module [19:03] V1: marcello3d, gigawattz there are already a cazillion zlib / gzip modules for node [19:03] marcello3d: Gigawattz: it looks unprofessional to leave out apostrophes [19:03] marcello3d: v1: and they all suck :( [19:04] Gigawattz: this is only in the build stages, all little things like that would be done at the end. [19:04] btipling: looks like you can't do a circular reference [19:04] [AD]Turbo has joined the channel [19:04] btipling: there's no error but the first circle require returns undefined [19:04] V1: marcello3d: https://github.com/kkaefer/node-zlib is a pretty decent zlib module [19:04] marcello3d: btipling: on node-tosource? [19:04] ryah: ACTION disappears [19:04] btipling: marcello3d: didn't get that [19:05] marcello3d: V1: I'll check it out [19:05] btipling: marcello3d: not sure what you meant? [19:05] marcello3d: btipling: node-tosource should support circular references [19:05] Gigawattz: anyone have any ideas on how to get around http://stackoverflow.com/questions/5771140/how-to-gzip-content-thats-passed-threw-a-piped-readstream [19:05] btipling: what is node-tosource [19:06] Gigawattz: without having to compile a node library [19:06] marcello3d: V1: doesn't look like it supports Z_FLUSH types? [19:06] Bwen has joined the channel [19:06] marcello3d: oh right [19:06] marcello3d: it says right there [19:06] marcello3d: not intended for streams [19:06] indexzero has joined the channel [19:06] V1: ;D [19:07] marcello3d: so yea, that's no good for my use case [19:07] btipling: I'll create a test case here [19:07] marcello3d: V1: I didn't write a compression library, just adapted an existing one for compression outgoing HTTP responses [19:07] marcello3d: but it uses gzip compression as opposed to deflate (extra headers means more overhead when files are small) [19:08] V1: ah okay [19:08] marcello3d: how do you check if something is NaN or Infinity? [19:09] no-gooder has joined the channel [19:09] marcello3d: infinity is easy, how about NaN? [19:09] marcello3d: v8: NaN === NaN [19:09] v8bot: marcello3d: false [19:09] marcello3d: v8: NaN == NaN [19:09] v8bot: marcello3d: false [19:09] marcello3d: v8: NaN = NaN [19:09] v8bot: marcello3d: NaN [19:09] marcello3d: :D [19:09] wereHamster has joined the channel [19:09] siculars has joined the channel [19:09] V1: v8bot: isNaN(NaN) [19:09] v8bot: V1: Use v8: <code> to evaluate code or "`v commands" for a list of v8bot commands. [19:09] no-gooder: hey guys [19:09] V1: v8: isNaN(NaN) [19:09] v8bot: V1: true [19:09] wereHams1er has joined the channel [19:10] marcello3d: V1: just a global function? crazy [19:10] no-gooder: is it possible to save "response" object to database? [19:10] V1: marcello3d: yup [19:10] no-gooder: and when it's needed get and use? [19:10] marcello3d: v8: [NaN.toString(), "" + NaN] [19:10] v8bot: marcello3d: ["NaN","NaN"] [19:10] marcello3d: v8: NaN === null [19:10] v8bot: marcello3d: false [19:10] EM03 has joined the channel [19:10] EM03 has joined the channel [19:10] marcello3d: weird [19:11] V1: just use isNaN, theres a reason they add that function ;) [19:11] Bwen: v8: console.log(NaN); [19:11] v8bot: Bwen: NaN [19:11] marcello3d: V1: I just want to convert it to a string, so toString is fine [19:11] Bwen: v8: console.log("NaN"); [19:11] v8bot: Bwen: "NaN" [19:11] V1: k [19:11] marcello3d: the bug was elsewhere [19:11] Bwen: hm [19:11] ckknight: v8: var x = NaN; x !== x; [19:12] v8bot: ckknight: true [19:12] marcello3d: v8: JSON.stringify(NaN) [19:12] v8bot: marcello3d: "null" [19:12] marcello3d: there [19:12] marcello3d: that was my problem :) [19:12] marcello3d: JSON.stringify chokes on it [19:15] throughnothing has joined the channel [19:15] no-gooder: i think the solution is serialization [19:15] no-gooder: is there any module [19:15] F1LT3R has joined the channel [19:16] wereHams1er has joined the channel [19:17] btipling: here I made an example: https://github.com/apphacker/circular_node_bug [19:17] btipling: circular references don't work [19:17] pdelgallego has joined the channel [19:18] V1 has joined the channel [19:18] marcello3d: btipling: instead of what you're doing [19:18] marcello3d: try storing the module itself [19:18] marcello3d: then accessing .A and .B at runtime [19:18] ZeroCoder has joined the channel [19:19] marcello3d: what you're trying to do should be mathematically impossible [19:20] btipling: hrm [19:20] marcello3d: but if you do var b = require('./b') [19:20] btipling: trying it [19:20] marcello3d: then further down say b.B instead of B [19:20] marcello3d: then b should be legit at that point [19:21] btipling: that works [19:21] btipling: thanks! [19:22] marcello3d: sure thing [19:23] btipling: I just spent a lot of time on this [19:23] btipling: :\ [19:24] btipling: about 1.5 hours [19:25] saschagehlich: is there a way to do a http request without fetching all the data but just the headers? [19:25] mbrevoort has joined the channel [19:25] marcello3d: btipling: it happens :) [19:25] perezd has joined the channel [19:25] marcello3d: most of the time spent programming is on stuff like that, not the actual programming [19:25] saschagehlich: at the moment I'm just doing http.createClient, do client.request and on the "response" event I close the connection by doing response.connection.end() [19:25] wereHams1er has joined the channel [19:26] marcello3d: ok, released version 0.1.1: https://github.com/marcello3d/node-tosource :) [19:27] liar has joined the channel [19:28] ph^ has joined the channel [19:28] Gigawattz: hmm that's odd, google chrome output's there generic 404 page when it get's a 404 header on http, but on https it displays the content sent from the server instead [19:28] Gigawattz: does anyone know whay that would be ? [19:30] marcello3d: Gigawattz: might be a security thing [19:31] marcello3d: you can swithc it on and off in preferences [19:32] Gigawattz: possibly, seems odd [19:32] marcello3d: check the chromium buglist [19:32] herenowcoder has joined the channel [19:34] itsTodd has joined the channel [19:34] strmpnk has joined the channel [19:34] V1: saschagehlich: a head request? [19:35] V1: instead of a get / post /put bla bla [19:35] Gigawattz: I think the 404 generic page is part of the usage statistics and because it's a secure connection it obviously a security feature I think [19:35] saschagehlich: V1: yea. that one just came to my mind [19:35] saschagehlich: but those are kinda untrusty [19:36] Juan_Camilo has joined the channel [19:36] saschagehlich: what if one of the services I'm contacting does not respond to the HEAD request correctly? [19:36] V1: untrusty? Y [19:36] rsms has joined the channel [19:36] Juan_Camilo: hi.. I need help with express! [19:36] V1: saschagehlich you can ask the same question for get requests.. [19:36] bradleymeck has joined the channel [19:36] saschagehlich: hmm sure? [19:36] Bwen: Juan_Camilo: whats express? [19:37] Juan_Camilo: oh, the nodejs module [19:37] Bwen: oh ic, never used it... sorry [19:37] Juan_Camilo: so I meant expressjs [19:37] Juan_Camilo: ok. thx for ask [19:38] Juan_Camilo: I installed using npm [19:38] V1: I just had my biggest wtf moment of the day: http://vimeo.com/22101861 [19:39] jacobolus has joined the channel [19:39] snearch has joined the channel [19:40] Juan_Camilo: but the expressjs executable is not find [19:40] pyrotechnick1: V1: i hate you [19:40] V1: pyrotechnick1: Now you will dream about it [19:40] marcello3d: V1: bizarre to watch without audio [19:40] pyrotechnick1: V1: not if i never sleep again [19:41] marcello3d: hah! [19:41] V1: marcello3d: it's even bizarre to watch it with audo :p [19:41] V1: audio* [19:41] pyrotechnick1: i like the part where the bearded guy dances to techno in a skintight lycra suit [19:42] pyrotechnick1: reminds me of when i work out [19:43] pyrotechnick1: i cant believe i paused the tron soundtrack for that [19:44] saschagehlich: V1: why do you upload your private videos to vimeo? nobody wants to see that! [19:44] V1: pyrotechnick1: ;D the album is much better than the soundtrack [19:44] samsonjs_ has joined the channel [19:44] astropirate has joined the channel [19:44] ckknight: V1: wtf was that [19:44] V1: ckknight: beer ;D [19:44] patcito has joined the channel [19:44] pyrotechnick1: the album? [19:44] pyrotechnick1: i dunno what i have [19:45] ckknight: V1: yes, I can see. [19:45] pyrotechnick1: i think its both [19:46] V1: pyrotechnick1: Ah okay [19:46] rburhum has joined the channel [19:47] pyrotechnick1: who wants to play some webglcraft? [19:47] V1: saschagehlich: it's you came out for you furry fetchis as well in the video [19:49] Gandalfar has joined the channel [19:50] marcello3d: anyone here use node cluster or similar? how do you deal with inter-node communication? [19:51] Gandalfar: I'm trying to run capt .. and it fails with error 'Error: Cannot find module 'coffee-script'', I have 'coffee-script' installed via npm and node 0.4.7 [19:52] V1: marcello3d: cluster has build in methods for IPC [19:52] pyrotechnick1: marcello3d: im not sure if cluster packs it out of the box but you could always use socket.io or dnode or something [19:52] pyrotechnick1: ^^ disregard [19:52] pyrotechnick1: much better [19:52] rburhum has left the channel [19:52] pyrotechnick1: be careful though [19:52] marcello3d: v1: where are the docs on that? [19:53] V1: Gandalfar: isn't it coffeescript instead os coffee-script? [19:53] pyrotechnick1: if it's "app" communication i'd avoid that since it would then tie your app to cluster rather than a more generic network stack like socket.io [19:53] pyrotechnick1: its CoffeeScript [19:53] pyrotechnick1: the room is #coffeescript [19:53] marcello3d: is socket.io intended for inter-process communication? [19:53] marcello3d: I'm actually wondering how to support socket.io with multiple nodes [19:53] hellp has joined the channel [19:53] pyrotechnick1: oh the module is coffee-script yes [19:53] V1: no [19:54] Gandalfar: hmm [19:54] pyrotechnick1: yeah i think it has an IPC driver now [19:54] Gandalfar: I have 'coffee' binary, I wonder why the require doesn't work [19:54] marcello3d: if a user sends a message to socket.io on node worker #1, I'd want to be able to tell worker #2 to broadcast [19:54] pyrotechnick1: if it's not built in then it's 3rd party ive seen it [19:54] V1: marcello3d: socket.io 0.6 does not scale acrosss multiple processes it will just fail [19:54] V1: marcello3d: 0.7 how ever will have multiple processes support [19:54] pyrotechnick1: someone should make a badass lib [19:54] pyrotechnick1: and call it [19:54] pyrotechnick1: internode [19:54] pyrotechnick1: HA [19:54] marcello3d: V1: do you work on it? [19:55] marcello3d: socket.io has felt a bit bloated/clunky to me [19:55] V1: marcello3d: rauchg is working on it, [19:55] V1: it's not bloated it's just well done ;) [19:55] rauchg: marcello3d [19:55] siculars has joined the channel [19:56] rauchg: bloated: we'll soon have a builder to filter out transports [19:56] rauchg: it's really minimal, aside from flash [19:56] marcello3d: nice [19:56] V1: yeah flash is a peice of shit that needs to be done by someone with a propper understanding of actionscript [19:56] rauchg: marcello3d, so say you select websocket and xhr-polling, you got it down to 3kb? [19:57] marcello3d: nice [19:57] rauchg: technically you can do that today in 5 min, but not through a web interface [19:57] V1: rauchg: even with all transports you wont top 8k [19:57] JimBastard has joined the channel [19:57] marcello3d: I had some weird problems where it kept switching from websocket to jsonp or whatever [19:57] rauchg: yeah [19:57] marcello3d: on chrome [19:57] sechrist: Can I abruptly end file uploads? I'm trying to do res.end and res.close, but the data still flows on [19:57] V1: it's just the swf dependency that fucks it all up [19:57] rauchg: marcello3d bad connection ? [19:57] marcello3d: rauchg: I was developing/restarting the server [19:57] rauchg: oh [19:57] rauchg: yeah [19:57] rauchg: :D [19:58] marcello3d: also [19:58] rauchg: you were introducing what the client would interpret as a flaky connection [19:58] rauchg: so it would try more than one transport [19:58] marcello3d: I was trying to access cookies in socket.io connections [19:58] V1: marcello3d: that's already fixed, i added reconnection support ;) [19:58] marcello3d: so I could authenticate the connection [19:58] rauchg: yep, that's a priority [19:58] marcello3d: but that only seemed to work on websockets [19:58] rauchg: if you look at the new spec [19:58] marcello3d: how is 0.7 dealing with multi-node? [19:58] rauchg: we have a step during which we can perform authentication [19:59] rauchg: and since the handshake is normal HTTP 1.1 [19:59] rauchg: you can get stuff like user agent [19:59] rauchg: which wouldn't be possible with a websocket-only handshake for example [19:59] djcoin: sechrist: I guess you cant [19:59] rauchg: or other headers [19:59] marcello3d: rauchg: does that work on all transports socket.io supports? [19:59] V1: marcello3d: oh, and a small note, cluster workers and master have a `call` method that you can give a name of the method that needs to be called [19:59] marcello3d: even with httpOnly cookies? [19:59] djcoin: sechrist: someone told me with http if you load some data you can't cancel it [19:59] djcoin: or something like that [19:59] V1: marcello3d: see https://github.com/LearnBoost/cluster/blob/master/lib/worker.js#L219-224 [19:59] rauchg: marcello3d yep [19:59] rauchg: :) [20:00] marcello3d: rauchg: sweet, is 0.7 something I can start hacking with now, or is it far from ready? [20:00] newy_ has joined the channel [20:00] rauchg: it's very very close [20:00] rauchg: i'm working on it right this second [20:00] V1: (no code no proof) [20:00] marcello3d: V1: can the workers call that? [20:01] sechrist: djcoin: well there doesn't seem to be a content-length to use to block huge file uploads [20:01] V1: marcello3d: yes [20:01] sechrist: so *shrug* [20:01] rauchg: we use a version that has many of the features of 0.7 internally [20:01] rauchg: so it should also be production-ready [20:01] marcello3d: v1: I'll have to play with that more, then [20:01] herbySk has joined the channel [20:02] astropirate has joined the channel [20:04] rauchg: back to work [20:04] no-gooder has joined the channel [20:04] marcello3d: ganbatte [20:05] no-gooder: i'm trying to serialize response object but i ge "Converting circular structure to JSON" error. [20:05] no-gooder: get* ge [20:05] timmywil has joined the channel [20:05] noob has joined the channel [20:06] marcello3d: no-gooder: why are you trying to serialize the response object? [20:06] jiggliemon has joined the channel [20:06] no-gooder: marcello3d, i'm trying to implement long polling. [20:07] bingomanatee has joined the channel [20:07] marcello3d: response is something you're going to have to keep in memory, cause it has pointers to live sockets and whatnot [20:08] marcello3d: you won't be able to serialize those [20:08] no-gooder: so keeping response object in array doesn't suit my case. there are going to be lots of client [20:08] djcoin: lol :) [20:08] no-gooder: djcoin, ? [20:09] marcello3d: no-gooder: you don't have much choice [20:09] bingomanatee: greets all [20:09] tedsuo has joined the channel [20:09] noob: Hey guys, I'm trying to build node . js on windows using cygwin and I'm following the instructions here: https://github.com/joyent/node/wiki/Building-node.js-on-Cygwin-(Windows). When enter the command '$ git fetch --all' it tells me 'fatal - not a git repository' I was just wondering if someone here could enlighten me on what I'm doing wrong [20:09] bingomanatee: My express app is throwing ECONNREFUSED all of a sudden [20:09] bingomanatee: any diagnostic help? [20:09] djcoin: It seems premature optimizations, did you see benchmarks with node.js ? Do you think it will fail ? [20:09] djcoin: Otherwise just add more node.js [20:09] stagas: noob: did you cd node ? [20:09] noob: yeah [20:10] marcello3d: no-gooder: have you looked at libraries like socket.io or dnode? [20:10] stagas: noob: did you get the tar or git cloned? [20:10] djcoin: noob: git fetch ? should not that be git clone ? [20:11] Juan_Camilo: I installed expressjs in archlinux but cannot find express executable [20:11] noob: no it said git fetch [20:11] no-gooder: marcello3d, actually i used nowjs.it uses socket.io.but i didn't like it. [20:11] Juan_Camilo: I run npm ls and the module is installed [20:12] noob: it said destination path node already exists [20:12] zcopley has joined the channel [20:12] marcello3d: bingomanatee: mongo app? [20:12] no-gooder: djcoin, an array with 50000 thousand objects. don't you think it would fail? [20:12] cwang has joined the channel [20:12] bingomanatee: yes - mongo is up [20:13] bingomanatee: o ho maybe not! [20:13] marcello3d: no-gooder: that's nothing [20:14] dve_ has joined the channel [20:14] no-gooder: marcello3d, really ? =) [20:14] djcoin: no-gooder: dont know, you could proxy cache and make multiple node.js server [20:14] febits[0] has joined the channel [20:15] Juan_Camilo: Hey Im trying to use now.js [20:15] pyrotechnick1: #nowjs [20:15] pyrotechnick1: if you're quick there's a dev in there atm [20:15] Juan_Camilo: but I cannot include an external js [20:16] MikhX has joined the channel [20:16] bingomanatee: marcello3D - thanks that was it - bad mongo start [20:16] no-gooder: djcoin, marcello3d i use process.openStdin().addListener("data", ... is it good way to build long polling ? [20:17] marcello3d: no-gooder: what do you mean by long polling, what is your app doing? [20:17] djcoin: im kinda new to node.js, but I wonder why you want to create long polling yourself [20:17] djcoin: i dont know about your solution btw [20:17] Gigawattz: guys if i had: [20:18] Gigawattz: var Obj = function(){} [20:18] djcoin: and why long polling specifically [20:18] no-gooder: marcello3d, it is a chat application.it listens stdin. [20:18] Gigawattz: Obj.prototype.test = function(){} [20:18] djcoin: no-gooder: there are several simple chat example, you should check them out [20:18] Gigawattz: Object.hasOwnProperty.call(Obj,'test'); [20:18] Gigawattz: should that not yield true ? [20:18] sarenji has joined the channel [20:18] pyrotechnick1: v8: var Obj = function(){}; Obj.prototype.test = function(){} ; Object.hasOwnProperty.call(Obj,'test'); [20:18] v8bot: pyrotechnick1: false [20:19] Darshan-NowJS has joined the channel [20:19] a2800276 has joined the channel [20:19] marcello3d: no-gooder: that looks reasonable, then, I think [20:19] no-gooder: djcoin, most of them use simple text file. applicaiton get signals from os. [20:19] marcello3d: Gigawattz: test is on Obj.prototype, not Obj itself [20:20] no-gooder: djcoin, i tried most of them :) [20:20] djcoin: alright [20:20] marcello3d: Gigawattz: furthermore, even if you instantiated an instance of Obj, technically test is on its prototype, not the instance itself [20:21] pyrotechnick1: ^^ what he said [20:21] djcoin: v8: var Obj = function(){}; Obj.prototype.test = function(){} ; Object.hasOwnProperty.call(Obj.prototype,'test'); [20:21] v8bot: djcoin: true [20:21] Gigawattz: so what's the best way to check if an instantiated object has a method directly within the prototype and not an inherited function such as __proto__ [20:21] marcello3d: v8: var Obj = function(){}; Obj.prototype.test = function(){} ; Object.hasOwnProperty.call(new Obj,'test'); [20:21] v8bot: marcello3d: false [20:21] marcello3d: v8: var Obj = function(){}; Obj.prototype.test = function(){} ; (new Obj).test [20:21] v8bot: marcello3d: function (){} [20:22] marcello3d: test IS an inherited function [20:22] marcello3d: it's inherited from the Obj prototype [20:22] djcoin: v8: var str = "aaaa"; for(i=0;i<10;i++) str += str; print str [20:22] v8bot: djcoin: SyntaxError: Unexpected identifier [20:22] djcoin: :b [20:22] Gigawattz: ahh right [20:22] marcello3d: you could do obj.test === Obj.prototype.test [20:22] marcello3d: v8: var Obj = function(){}; Obj.prototype.test = function(){} ; (new Obj).test === Obj.prototype.test [20:22] v8bot: marcello3d: true [20:23] djcoin: v8: var str = "aaaa"; for(i=0;i<10;i++) str += str; str [20:23] v8bot: djcoin: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [Output truncated...] [20:23] djcoin: lol [20:23] djcoin: ok that does work [20:23] marcello3d: although that's not strictly what you're asking [20:23] djcoin: Next time I will make a unicorn [20:23] djcoin: :x [20:23] brez__ has joined the channel [20:24] Gandalfar has left the channel [20:24] Gigawattz: v8: var Obj = function(){}; Obj.prototype.test = function(){} ; (new Obj).test === Obj.prototype.test [20:24] v8bot: Gigawattz: true [20:24] Gigawattz: v8: var Obj = function(){}; Obj.prototype.test = function(){} ; Obj.test === Obj.prototype.test [20:24] v8bot: Gigawattz: false [20:24] JimBastard: var str = "͛"; for(i=0;i<10;i++) str += str; str [20:25] JimBastard: v8: var str = "͛"; for(i=0;i<10;i++) str += str; str [20:25] v8bot: JimBastard: "͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛͛� [20:25] marcello3d: v8: var Obj = function(){}; Obj.prototype.test = function(){} ; Obj.test // should be undefined [20:25] v8bot: marcello3d: undefined [20:25] Gigawattz: v8: var Obj = function(){}; Obj.prototype.test = function(){} ; Obj.hasOwnProperty(Obj,'__proto__') [20:25] v8bot: Gigawattz: false [20:25] Gigawattz: v8: var Obj = function(){}; Obj.prototype.test = function(){} ; (new Obj).hasOwnProperty(Obj,'__proto__') [20:25] v8bot: Gigawattz: false [20:25] JimBastard: v8: var str = "f͖̹̦̭̱̺̪͓̜̹͉͉͎͒̿͒ͥ̈̆ͤͭͫͮ̽̈ͬ͊ͥ̅̈̌ͪͅa͕̞̮̟̜̟͈̙͈̥̥͕̘͚͔̜̟̬͇̬͖̖͇͍̬̗̹̪̟̬͍̲̜̜̯͕̫͎͍̲̜̱̲͓̰̱̽̏́̋ͦ͌̾̋ͪ̈̈̍̏̏̑̄ͭͤ͂ͥͬ̎̽̚̚̚ͅi͖̖̺̳͕̠̜̥̳̓́͋̃ͣͦ̐̅̽͊̚ͅl̲̩̥͖͙̦̬̩̗̱̹͔̱͔̰̭͎̩̠̣̳̘̰̮͙̲̯̥͆ͩ̎͌̇̿ͯͥ̆ͫ̀͐̽ͅͅ "; for(i=0;i<10;i++) str += str; str [20:25] v8bot: JimBastard: "f͖̹̦̭̱̺̪͓̜̹͉͉͎͒̿͒ͥ̈̆ͤͭͫͮ̽̈ͬ͊ͥ̅̈̌ͪͅa͕̞̮̟̜̟͈̙͈̥̥͕̘͚͔̜̟̬͇̬͖̖͇͍̬̗̹̪̟̬͍̲̜̜̯͕̫͎͍̲̜̱̲͓̰̱̽̏́̋ͦ͌̾̋ͪ̈̈̍̏̏̑̄ͭͤ͂ͥͬ̎̽̚̚̚ͅi͖̖̺̳͕̠̜̥̳̓́͋̃ͣͦ̐̅̽͊̚ͅl̲̩̥͖͙̦̬̩̗̱̹͔̱͔̰̭͎̩̠̣̳̘̰̮͙̲̯̥͆ͩ̎͌̇̿ͯͥ̆ͫ̀͐̽ͅͅ f͖̹̦̭̱̺̪͓̜̹͉͉͎͒̿͒ͥ̈̆ͤͭͫͮ̽̈ͬ͊ͥ̅̈̌ͪͅa͕̞̮̟̜̟͈̙͈̥̥͕̘͚͔̜̟ [20:26] djcoin: v8: var str = "\o\ I \o/ Love /o/ Node.js \o/"; for(i=0;i<10;i++) str += str; str [20:26] v8bot: djcoin: "o I o/ Love /o/ Node.js o/o I o/ Love /o/ Node.js o/o I o/ Love /o/ Node.js o/o I o/ Love /o/ Node.js o/o I o/ Love /o/ Node.js o/o I o/ Love /o/ Node.js o/o I o/ Love /o/ Node.js o/o I o/ Love /o/ Node.js o/o I o/ Love /o/ Node.js o/o I o/ Love /o/ Node.js o/o I o/ Love /o/ Node.js o/o I o/ Love /o/ Node.js o/o I o/ Love /o/ Node.js o/o I o/ Love /o/ Node.js o/o I o/ Love /o/ Node [Output truncated...] [20:26] markwubben has joined the channel [20:26] Gigawattz: v8: var Obj = function(){}; Obj.prototype.test = function(){} ; (new Obj).hasOwnProperty(Obj,'test') [20:26] v8bot: Gigawattz: false [20:26] pyrotechnick1: v8bot is so naughty [20:26] djcoin: this was my last one [20:26] djcoin: promise [20:26] JimBastard: v8: var str = "f͖̹̦̭̱̺̪͓̜̹͉͉͎͒̿͒ͥ̈̆ͤͭͫͮ̽̈ͬ͊ͥ̅̈̌ͪa͕̞̮̟̜̟͈̙͈̥̥͕̘͚͔̜̟̬͇i͖̖̺̳͕̠̜̥̳̓́͋̃ͣͦ̐̅̽͊̚ͅl̲̩̥͖͙̦̬̩̗̱̹͔̱͔̰̭͎̩̠̣̳̘̰̮͙̲̯̥͆ͩ̎͌̇̿ͯͥ̆ͫ̀͐̽ͅͅ "; for(i=0;i<10;i++) str += str; str [20:26] v8bot: JimBastard: "f͖̹̦̭̱̺̪͓̜̹͉͉͎͒̿͒ͥ̈̆ͤͭͫͮ̽̈ͬ͊ͥ̅̈̌ͪa͕̞̮̟̜̟͈̙͈̥̥͕̘͚͔̜̟̬͇i͖̖̺̳͕̠̜̥̳̓́͋̃ͣͦ̐̅̽͊̚ͅl̲̩̥͖͙̦̬̩̗̱̹͔̱͔̰̭͎̩̠̣̳̘̰̮͙̲̯̥͆ͩ̎͌̇̿ͯͥ̆ͫ̀͐̽ͅͅ f͖̹̦̭̱̺̪͓̜̹͉͉͎͒̿͒ͥ̈̆ͤͭͫͮ̽̈ͬ͊ͥ̅̈̌ͪa͕̞̮̟̜̟͈̙͈̥̥͕̘͚͔̜̟̬͇i͖̖̺̳͕̠̜̥̳̓́͋̃ͣͦ̐̅̽͊̚ͅl̲̩̥͖͙̦̬̩̗̱̹͔̱͔̰̭͎̩̠̣̳̘̰̮͙̲̯̥͆ͩ̎͌ [20:26] Gigawattz: v8: var Obj = function(){}; Obj.prototype.test = function(){} ; Obj.hasOwnProperty(Obj,'test') [20:26] JimBastard: fu [20:26] v8bot: Gigawattz: false [20:27] djcoin: you maybe make him loop infinitely ? :b [20:27] djcoin: v8bot: while (1){} [20:27] v8bot: djcoin: Use v8: <code> to evaluate code or "`v commands" for a list of v8bot commands. [20:27] antimatter__: v8 : console.log('wtf') [20:27] pyrotechnick1: it times out [20:27] djcoin: v8: while (1){} [20:27] djcoin: omg [20:27] Gigawattz: v8: console.log('hehe') [20:27] v8bot: djcoin: Error: Timeout [20:27] v8bot: Gigawattz: "hehe" [20:27] djcoin: :) [20:27] pyrotechnick1: v8: setTimeout(function() {}, 10000000000) [20:27] v8bot: pyrotechnick1: ReferenceError: setTimeout is not defined [20:28] djcoin: lol [20:28] pyrotechnick1: ffff [20:28] pyrotechnick1: v8: while(true){} [20:28] v8bot: pyrotechnick1: Error: Timeout [20:28] pyrotechnick1: see [20:28] pyrotechnick1: too smart for you bro [20:28] pyrotechnick1: if u wanna screw with one [20:28] pyrotechnick1: go into #coffeescript [20:28] pyrotechnick1: there's still a bug that will make it crash [20:28] pyrotechnick1: go nuts [20:29] marcello3d: oh wow, #coffeescript irc log page is awesome [20:29] djcoin: v8: process.cwd() [20:29] v8bot: djcoin: ReferenceError: process is not defined [20:29] marcello3d: http://irclogger.com/.coffeescript/2011-04-24 [20:29] marcello3d: why can't we get that on here? [20:29] EM03: does js framework do you use on the server side? [20:29] Gigawattz: v8: global [20:29] v8bot: Gigawattz: ReferenceError: global is not defined [20:29] djcoin: :) [20:29] pyrotechnick1: are you jealous marcello3d? [20:30] Gigawattz: v8: __dirname [20:30] v8bot: Gigawattz: ReferenceError: __dirname is not defined [20:30] djcoin: v8: process.reboot() [20:30] v8bot: djcoin: ReferenceError: process is not defined [20:30] djcoin: ;) [20:30] marcello3d: pyrotechnick1: not sure if that's the right word [20:30] Xano has joined the channel [20:30] pyrotechnick1: none of that stuff works man shh [20:30] EM03: I'm super nervous aboit doing server side javascript for web dev ......js doesn't even have hashes [20:30] marcello3d: perhaps disappointed in the node.js crew [20:30] pyrotechnick1: he bans you from freenode if you dont stop [20:30] Juan_Camilo: hey .. somebody know how to solve the Resource interpreted as Image but transferred with MIME type text/html issue [20:30] cbiscardi has joined the channel [20:30] Juan_Camilo: ??? [20:30] pyrotechnick1: EM03: ruby-lang.org [20:30] pyrotechnick1: have fun [20:30] EM03: I know ruby quite well [20:31] pyrotechnick1: yet [20:31] pyrotechnick1: yet something's not quite right is it? [20:31] pyrotechnick1: you seek something more [20:31] pyrotechnick1: you know that fancy hash class you guys have? [20:31] EM03: ? [20:31] pyrotechnick1: turns out it's unnecessary [20:31] marcello3d: face it. ruby isn't cool anymore. it's just too popular [20:31] jiggliemon: *Ruby's still cool. [20:31] marcello3d: all the hipsters are using programming languages you haven't even heard of [20:31] jiggliemon: Rails is dead. [20:32] pyrotechnick1: i use sumatrascript [20:32] pyrotechnick1: you probably havent heard of it [20:32] EM03: rails is dead [20:32] marcello3d: there needs to be a shirt [20:32] jiggliemon: pyrotechnick1: When I hear of it is it time to switch? [20:32] pyrotechnick1: depends how tight your jeans are [20:32] marcello3d: "I code in COBAL, you probably haven't heard of it, though" [20:33] Gruni has joined the channel [20:33] marcello3d: (not to be confused with COBOL) [20:33] pyrotechnick1: i code in 128bit asm [20:33] pyrotechnick1: you probably havent heard of it [20:33] SubStack: `/sb end [20:33] Gigawattz: v8: globals [20:33] v8bot: Gigawattz: ReferenceError: globals is not defined [20:33] EM03: cobol actually is not that bad :\ [20:33] Gigawattz: v8: Error [20:33] v8bot: Gigawattz: function Error() { [native code]… [20:34] pyrotechnick1: SubStack: nowjs can sync prims [20:34] EM03: if you know if you can just set a price of 350 an hour [20:34] SubStack: curse you irssi [20:34] pyrotechnick1: what do you think of this [20:34] Gigawattz: v8: require('.') [20:34] v8bot: Gigawattz: ReferenceError: require is not defined [20:34] pyrotechnick1: i think it's blasphemy [20:34] marcello3d: I code on my ipod nano using the clickwheelscript [20:34] SubStack: pyrotechnick1: oh I already knew that [20:34] Gigawattz: v8: _ [20:34] v8bot: Gigawattz: ReferenceError: _ is not defined [20:34] marcello3d: you probably haven't heard of it [20:34] SubStack: pyrotechnick1: but how does that even work on the browser? [20:34] EM03: hmmm will js ever have a hash data type? [20:34] SubStack: nobody supports harmony proxies browser-side yet [20:34] SubStack: interval polling? [20:34] pyrotechnick1: i code on the shuffle using togglescript [20:34] Gigawattz: v8: (new Error()).stack [20:34] v8bot: Gigawattz: "Error\n at eval at <anonymous> (evalmachine.<anonymous>:26:5)\n at evalmachine.<anonymous>:26:9\n at evalmachine.<anonymous>:30:2\n at Socket.run (/home/inimino/v8bot/lib/sandbox/shovel.js:76:19)\n at Socket.emit (events.js:39:17)\n at Socket._onReadable (net.js:629:51)\n at IOWatcher.onReadable [as callback] (net.js:156:10)" [20:34] SubStack: stm-style blocks? [20:35] pyrotechnick1: SubStack: theyre using get/set [20:35] Gigawattz: xD [20:35] pyrotechnick1: on the client [20:35] SubStack: recursively? [20:35] Gigawattz: v8 [20:35] v8bot: Gigawattz: undefined [20:35] pyrotechnick1: jump in nowjs and ask em [20:35] Gigawattz: v8: Socket [20:35] v8bot: Gigawattz: ReferenceError: Socket is not defined [20:35] pyrotechnick1: #nowjs [20:35] pyrotechnick1: the dev is on [20:35] pyrotechnick1: hes a cool dude [20:35] pyrotechnick1: just ask [20:36] Gigawattz: v8: evalmachine [20:36] v8bot: Gigawattz: ReferenceError: evalmachine is not defined [20:36] jiggliemon: in node, why do yall shun constructors? [20:36] pyrotechnick1: js doesn't have constructors [20:36] pyrotechnick1: that's why [20:36] pyrotechnick1: if someone says they do, theyre saying they use a constructor convention [20:36] pyrotechnick1: nothing more [20:36] jiggliemon: fn Something (){}, new Something(); [20:37] jiggliemon: That's what I mean. [20:37] pyrotechnick1: ^^ [20:37] pyrotechnick1: anyway what API are you talking about? [20:37] jiggliemon: I haven't seen a new operator in any package I've downloaded. [20:37] pyrotechnick1: SubStack: my bad he not a dev lol [20:37] eb4890 has joined the channel [20:38] pyrotechnick1: i was mislead [20:38] Gigawattz: javascript is not designed for OOP, there for objects's are not highly used [20:38] Juan_Camilo: hey .. somebody know how to solve the Resource interpreted as Image but transferred with MIME type text/html issue??? [20:39] Gigawattz: v8: IOWatche [20:39] v8bot: Gigawattz: ReferenceError: IOWatche is not defined [20:39] Gigawattz: v8: IOWatcher [20:39] v8bot: Gigawattz: ReferenceError: IOWatcher is not defined [20:39] jiggliemon: Gigawattz: Did you just say js isn't OO? [20:39] Gigawattz: yea [20:40] Juan_Camilo: he where is de expressjs irc?? [20:40] pyrotechnick1: Juan_Camilo: here kinda [20:40] pyrotechnick1: only when tj's around [20:40] Juan_Camilo: mm [20:40] Juan_Camilo: ok [20:40] pyrotechnick1: unless you're lucky enough for someone to answer your Q [20:40] pyrotechnick1: i know his q anyway [20:40] pyrotechnick1: he's serving js from express [20:40] pyrotechnick1: but its transferring with a html mimetype [20:40] pyrotechnick1: how does he fix that? [20:41] pyrotechnick1: is there middlewear? [20:41] tykelewis has joined the channel [20:42] btipling: https://gist.github.com/939863 [20:42] btipling: I wonder why that is ^^ [20:42] Juan_Camilo: i did the same.. changed text/html to just html but it didnt work [20:42] btipling: The placement of the A.a; Obviously something to do with run time versus parse time [20:42] btipling: er a.A [20:43] marcello3d: btipling: which file are you running first? [20:43] btipling: a [20:43] btipling: it's what we talked about a minute ago [20:43] btipling: well an hour ago [20:43] dmojoryder has joined the channel [20:43] btipling: was just looking into it more [20:44] marcello3d: what's the main file, where do you call the entry point? [20:44] marcello3d: you basically have to understand how the modules are loaded/how require works [20:44] Yuffster has joined the channel [20:44] btipling: marcello3d: oh I just run a = require('a'); on the node command line [20:44] eldios: dudes how do I check if an npm-module is installed? [20:44] Juan_Camilo: npm ls [20:45] btipling: well require('./a'); [20:45] eldios: mmm :/ doesn't look like that [20:45] marcello3d: eldios: what version of npm? [20:45] eldios: I need it to check it from bash, btipling [20:45] marcello3d: I think it's npm ls installed on the older versions [20:45] eldios: marcello3d, 1.x [20:45] btipling: eldios: huh? [20:45] Juan_Camilo: npm ls shows the hierarchy of all installed modules [20:46] eldios: btipling, sorry.. I thought your message was for me =) [20:46] marcello3d: eldios: npm ls will only show the local installed modules [20:46] btipling: oh, no [20:46] btipling: :P [20:46] marcello3d: eldios: npm -g ls will give ou globals [20:46] skm has joined the channel [20:46] eldios: mm.. I suppose it doesn't check in the whole PATH then [20:46] btipling: I guess it just have to be careful about not use the require().X format [20:46] eldios: looks like a hemi-bug [20:46] btipling: because it wasn't immediately obvious to me that I was doing anything circular [20:47] btipling: it was through a bunch of different requires that the circle formed [20:47] Juan_Camilo: eldios: do you have express installed? [20:47] btipling: not using* [20:47] eldios: yes [20:47] Juan_Camilo: eldios: can you run the express executable?? [20:47] eldios: Juan_Camilo, yes [20:47] btipling: in fact I think this convinces me that require().X is bad [20:47] kmiyashiro: anyone know how to serve a robots.txt with express aside from defining it explicitly as a path? [20:47] eldios: everything just works fine [20:48] eldios: looks like npm -g ls only looks up in /usr/lib/node_modules [20:48] eldios: and not in /usr/lib/npm/node_modules [20:48] Juan_Camilo: eldios: because I installed using npm.. but when I type express.. console says that cannot recognize the order [20:48] kmiyashiro: oh it just works [20:49] eldios: Juan_Camilo, the order? [20:49] kevwil has joined the channel [20:49] eldios: did you use -g to install it? [20:49] Juan_Camilo: eldios: well.. the command [20:50] Juan_Camilo: no [20:50] Juan_Camilo: eldios:no [20:50] eldios: you should if you want it to be available system-wide [20:50] _tilgovi has joined the channel [20:50] eldios: on npm 1.x + you need to use -g to install it globally [20:50] eldios: npm -g install express [20:50] eldios: otherwise it will install it locally (in the directory you run the command) [20:51] Juan_Camilo: eldios: wow.. probably I coul reintall it [20:51] eldios: ;) [20:52] Juan_Camilo: eldios: thx [20:52] eldios: you're welcome [20:57] drefined has joined the channel [20:58] some1else has joined the channel [21:01] wormphlegm has joined the channel [21:03] Juan_Camilo: eldios? [21:04] eldios: yes? [21:04] mikl has joined the channel [21:04] cloudhead: is there a way to keep a child_process open, while sending data to its stdin, and getting data out of stdout? [21:04] Juan_Camilo: can I have an html file in express? [21:05] cloudhead: seems like I have to stdin.end() to write the data, but then the process ends too [21:05] pyrotechnick1: yes Juan_Camilo [21:05] marcello3d: cloudhead: it should stay open? [21:05] cloudhead: marcello3d: well, I'd like it to [21:05] m64253 has joined the channel [21:05] pyrotechnick1: look for the static middlewear [21:05] pyrotechnick1: its on the express docs [21:05] marcello3d: cloudhead: are you sure that's what's happening? [21:05] pyrotechnick1: then just make a public folder, add the middleware and put your index.html in there [21:05] nick2323 has joined the channel [21:05] marcello3d: cloudhead: gist it [21:05] davidwalsh has joined the channel [21:06] cloudhead: marcello3d: well, if I use ctrl+d in the terminal, it exits too, so it's expected behavior I guess [21:06] cloudhead: marcello3d: was just wondering if I could somehow keep it open while sending it input [21:06] cloudhead: and getting data back [21:07] sh1mmer has joined the channel [21:07] javaanse_jongens has joined the channel [21:07] cloudhead: marcello3d: https://gist.github.com/294b251024359387cf58 [21:07] eb4890 has joined the channel [21:07] wormphlegm has joined the channel [21:08] binaryjohn has joined the channel [21:08] marcello3d: cloudhead: the end won't happen until all the data is written [21:09] marcello3d: that code looks fine [21:09] Juan_Camilo: pyrotechnick1: ok [21:09] cloudhead: marcello3d: but it seems like it also makes the process exit [21:09] cloudhead: cause it thinks there's nothing else to read [21:09] marcello3d: cloudhead: but it should? if you end it, there IS nothing else to read [21:10] marcello3d: if you want to send more data, just don't end it [21:10] nvardar has joined the channel [21:10] cloudhead: marcello3d: yes but I'd like to get output back, and simply using write() won't make it send me data back [21:10] nick2323: Hi all, is there anyway to change text color in the node REPL? If I type '1+2' I get a blue '3' on black background, practically invisible. [21:10] marcello3d: cloudhead: sure it will, depending what the app does [21:10] maeldur has joined the channel [21:11] marcello3d: write streams it straight to the app [21:11] marcello3d: if the app doesn't do anything until it hits EOF or newlines, that's a separate issue [21:11] cloudhead: marcello3d: yea, it waits for EOF from what I gather [21:11] marcello3d: that's not node's fault though [21:12] cloudhead: I know [21:12] marcello3d: ok :) [21:12] cloudhead: but is there no way I can keep the process alive? [21:12] marcello3d: why? [21:12] cloudhead: it's expensive to start [21:12] marcello3d: aha [21:12] cloudhead: well, 30ms or so [21:12] marcello3d: there's not much you can do [21:12] cloudhead: but that's way too much, cause I have to start several of em [21:12] marcello3d: the app would need a streaming interface [21:12] perezd has joined the channel [21:13] newy has joined the channel [21:13] cloudhead: ok [21:13] marcello3d: alternatively, if you can somehow separate the output [21:13] marcello3d: you could buffer them all together in one process, then end it [21:13] maeldur: hi, is there a standard convention for commenting with node projects? like python docstrings [21:13] cloudhead: no way I can somehow send an EOF without closing the stream [21:13] cloudhead: marcello3d: yea I thought of that, might be the way to go [21:13] marcello3d: cloudhead: that wouldn't be an EOF then, would it? :) [21:13] cloudhead: yea : / [21:13] bradleymeck has joined the channel [21:15] Squeese has joined the channel [21:15] marcello3d: man, node-waiter is great [21:15] marcello3d: makes my parallel code so much simpler [21:17] Bwen: anyone benchmarking (with ab or siege) their nodejs server? is there a better way to handling the ports staying open or running out of em... [21:18] pHcF has joined the channel [21:18] cloudhead: Bwen: you can use keep-alive with -k [21:19] Hans_ has joined the channel [21:20] easter_bunny has joined the channel [21:23] Bwen: cloudhead: ports are still pilling up :P [21:24] aho has joined the channel [21:24] Hexmare has joined the channel [21:24] Hexmare: ello all [21:25] Bwen: hullo [21:27] easter_bunny: Git newbie here, just forked and cloned dmajda/pegjs. But can't run npm install on the dir ('Invalid version: @VERSION'), package.json seems messed up. Running npm install pegjs works, but I want to run my clone. Am I missing something stupid? [21:28] Bwen: I think they are unrelated [21:28] Bwen: extra work have to be done for npm package [21:28] pyrotechnick1:  "version": "@VERSION", [21:28] Bwen: but i'm a bigger newb than you when it comes to git... [21:28] pyrotechnick1: thats in the package.json [21:28] pyrotechnick1: never EVER seen that [21:28] pyrotechnick1: dont think it means anything [21:28] pyrotechnick1: i think that's supposed to be pre-processed [21:29] pyrotechnick1: https://github.com/dmajda/pegjs/blob/master/Jakefile [21:29] easter_bunny: Yeah, there's a Jakefile in the folder. [21:29] easter_bunny: :) [21:30] pyrotechnick1: thats cool [21:30] pyrotechnick1: i made courier for coffeescript package.json [21:30] JimBastard: its easter? [21:30] JimBastard: i should go outside more [21:30] pyrotechnick1: can do similar things [21:30] pyrotechnick1: yesterday was [21:31] easter_bunny: googling courier coffescript ... [21:31] pdelgallego has joined the channel [21:36] wormphlegm has joined the channel [21:37] insin has joined the channel [21:40] mscdex: eggscelent [21:42] Me1000 has joined the channel [21:45] dies_el has joined the channel [21:49] rpj8 has joined the channel [21:53] tilgovi has joined the channel [21:53] m64253 has joined the channel [21:53] nailer has joined the channel [21:54] Draggor: ANyone here done any google account auth stuff? [21:54] jakehow has joined the channel [21:55] nailer: Just oauth, and more for Chrome Ext than node apps. [21:55] Draggor: I'm writing a server in nodejs, and a multiplayer game that talks to said server in android, and want to auth it all correctly, and am kind of at a loss for where to start [21:56] koz has joined the channel [21:57] Gigawattz: guys, is there any way for me to inherit a class without overwriting it's methods ? [21:58] nailer: Draggor: oauth is what you want then. There's a bunch of npm modules to do it, I'm yet to play with them. [21:59] PhatBoyG has joined the channel [22:04] jakewins has joined the channel [22:05] eldios: if I have a code commit which I want to send to a project on github (and I have no rw-priv on that project).. do I have to do a pull req right? [22:06] tjgillies: eldios: yes [22:06] eldios: tnx [22:06] tjgillies: even for projects i'm a core comitter on i still usemy own account [22:06] tjgillies: and send pull requests [22:07] tjgillies: git is meant to be decentralized [22:08] eldios: geez that's long =) [22:08] eldios: ok [22:08] tjgillies: thats what she said [22:08] eldios: you wish [22:09] tjgillies: Gigawattz: afaik, if you inherit a class you won't overwrite its methods unless you explicitly declare new ones [22:10] tahu has joined the channel [22:13] nailer has joined the channel [22:18] dnunes has joined the channel [22:19] dnunes has left the channel [22:19] dnunes has joined the channel [22:21] Dreamer3_ has joined the channel [22:22] piranha has joined the channel [22:23] m64253 has joined the channel [22:23] dipser has joined the channel [22:24] mattikus has joined the channel [22:24] eldios: n8 =) [22:24] bjfletcher has joined the channel [22:25] Draggor: So, if I have an oauth token, I probably shouldn't be sending that unsecure across the web? [22:25] ezmobius has joined the channel [22:26] newy_ has joined the channel [22:26] beejeebus has joined the channel [22:26] jeromegn: Draggor, you should use https for that specific request [22:27] jeromegn: if available obviously [22:29] eee_c has joined the channel [22:30] rburhum has joined the channel [22:30] saschagehlich has joined the channel [22:32] zakabird has joined the channel [22:33] febits[0] has joined the channel [22:35] McConnell has joined the channel [22:35] McConnell: hey guys, I have some questions about node and using it as a server.. [22:36] mtsl has joined the channel [22:36] astropirate has joined the channel [22:36] McConnell: 1) are there any dedicated server solutions for node.js? Is it possible to replace my LAMP setup with a node.js/javascript server bundle of some sort? [22:38] systemfault: Take a look at express [22:38] McConnell: or, is it possible to use node.js in conjunction with my PHP/MySQL setup to allow for more real-time actions? [22:38] McConnell: thanks systemfault :) [22:38] Ond has joined the channel [22:39] Draggor: jeromegn: So I'm a newb, once I get the token, then what? [22:41] rook2pawn has joined the channel [22:42] nailer has joined the channel [22:45] dguttman has joined the channel [22:46] {Ond} has joined the channel [22:48] a2800276 has joined the channel [22:51] {Ond} has left the channel [22:51] Ond has joined the channel [22:51] jakehow has joined the channel [22:53] dilvie has joined the channel [22:54] FireFly|n900 has joined the channel [22:55] tilgovi has joined the channel [22:56] ejardim has joined the channel [22:56] moshe has joined the channel [22:58] newy_ has joined the channel [22:59] mikeal has joined the channel [23:00] boaz has joined the channel [23:01] mikeal has joined the channel [23:01] c4milo1 has joined the channel [23:03] newy_ has joined the channel [23:04] iFire has joined the channel [23:05] liar has joined the channel [23:10] tfe_ has joined the channel [23:10] mscdex: McConnell: you could also use node-http-proxy to hand off certain requests to your LAMP stack and others to a node server during transition [23:11] jpld has joined the channel [23:14] JimBastard: mscdex: i feel like we need to document how to use node-http-proxy with other stacks, so people understand how easy it is [23:14] JimBastard: lots of people been asking me this in the past week or so [23:15] mscdex: JimBastard: you need to get a Billy Mays impersonator to explain how easy it is [23:17] McConnell: mscdex: sounds like the exact solution I'm looking for ;) [23:18] strmpnk has joined the channel [23:20] therrg has joined the channel [23:20] Xano has joined the channel [23:20] Xano: If this recursive function calls itself, the value of key changes between the two console.log() calls: http://drupalbin.com/18438 [23:21] therrg has joined the channel [23:21] Xano: I cannot figure out why [23:21] paolodedios has joined the channel [23:24] edude03 has left the channel [23:24] Bwen: Xano: makes sense.. whats the problem? [23:24] Tobsn has joined the channel [23:24] gmci has joined the channel [23:25] Xano: Bwen: 1) I don't want this to happen (pretty obvious :P ) 2) but mostly I just don't get *why* it happens [23:25] Bwen: then you dont want recursion then [23:25] Bwen: its actualy not going to the second console.log().. what you see its twice the first one [23:25] Bwen: because thats recursion [23:26] blaenk has joined the channel [23:27] matyr has joined the channel [23:27] Bwen: Xano: you get it now? :P [23:28] iFire has joined the channel [23:28] newy_ has joined the channel [23:28] Xano: Bwen: It's definitely going to the second one (the XML proves it) [23:28] maeldur: hey xano [23:29] maeldur: put a var in front of key [23:29] Bwen: Xano: add the JSON object to the pastebin so I can test locally [23:29] maeldur: it might be being overwritten in the global scope [23:30] Xano: Bwen: got it. It's the key variable. The solution was to use "for (var key in..." instead of "for (key in..." [23:30] Xano: maeldur: Exactly (I was helped somewhere else already, but thanks!) [23:31] maeldur: cool [23:31] Xano: I keep having trouble switching from PHP's way of thinking to JS's [23:32] Bwen: Xano: you could use data.forEach( function (value){....}); then you get closure and i'm sure it'll fix the problem too :) [23:32] saikat has joined the channel [23:32] iFire has joined the channel [23:32] Xano: Bwen: Is that a JS or a nodejs thingy? [23:32] Damien___ has joined the channel [23:32] Bwen: both I think... O.o [23:32] Bwen: i'm new too xD [23:32] Xano: lol [23:37] mikeal has joined the channel [23:37] abraham has joined the channel [23:37] tykelewis has joined the channel [23:37] sub_pop has joined the channel [23:37] shiawuen has joined the channel [23:41] eee_c has joined the channel [23:43] ako has joined the channel [23:44] iFire has joined the channel [23:47] rpj8 has joined the channel [23:47] wormphlegm has joined the channel [23:49] _rain has joined the channel [23:50] febits has joined the channel [23:51] Aria has joined the channel [23:56] mscdex: Bwen: it's a V8 thing, not node [23:56] Bwen: oh, well I like it :) [23:56] mscdex: Bwen: https://github.com/joyent/node/wiki/ECMA-5-Mozilla-Features-Implemented-in-V8 [23:57] Corren has joined the channel [23:58] daekano has joined the channel