[00:00] OneBraveHog: sure - no problem
[00:00] OneBraveHog: sorry about that
[00:00] AvianFlu: does http not check for that?
[00:00] Swizec: apparently not
[00:00] AvianFlu: so what, it hangs silenty?
[00:00] AvianFlu: silently?
[00:00] Swizec: throws one of those ugly uncaught errors
[00:01] AvianFlu: can you paste me the error in a pm?
[00:01] Swizec: sure
[00:01] AvianFlu: I'll show it to someone who may help
[00:01] pcloadletter has joined the channel
[00:02] AvianFlu: OneBraveHog: https://github.com/joyent/node/wiki/Installation has installation instructions
[00:02] AvianFlu: from there, it depends on exactly what you're trying to do
[00:02] AvianFlu: and where you want to go with node
[00:03] hever: AvianFlu, Any clue about jquery documentation for node?
[00:04] syskk has joined the channel
[00:04] syskk has joined the channel
[00:04] syskk: http://pastebin.com/XrNB6Hef spammers are getting better everyday...
[00:04] fmeyer has joined the channel
[00:05] nexxy has joined the channel
[00:06] motu has joined the channel
[00:06] motu: hi
[00:06] OneBraveHog: well Avian - what I'm after is just what I CAN do with it
[00:06] gozala has joined the channel
[00:06] OneBraveHog: I mean, if I get a static IP ? Can I run my own web server/pages with it ?
[00:06] OneBraveHog: Does it serve up files if people want to download them ?
[00:07] OneBraveHog: sounds like it's a web server ?
[00:07] Aria: It can.
[00:07] OneBraveHog: ok
[00:07] Aria: Like C is a web server. Possibly a little more than C is, but...
[00:07] OneBraveHog: er, like a web server can be written in c ?
[00:07] motu: OneBraveHog: yes you can
[00:08] OneBraveHog: I'm just starting php, and it LOOKS like I can get past having to do this server side scripting with php and do what I'd need to do with PHP using node.js
[00:08] aphelion has joined the channel
[00:08] mscdex: syskk: start checking for number of misspellings and bad punctuation
[00:08] OneBraveHog: in other words, it LOOKS like node.js is an alternative to asp.net and php and asp (and JSP for that matteR)
[00:08] mscdex: ;)
[00:08] OneBraveHog: is that close ?
[00:08] motu: nodejs is much simpler then php
[00:08] motu: simpler to learn i think
[00:08] MooGoo: php isnt a webserver
[00:08] gozala has joined the channel
[00:08] MooGoo: generally
[00:09] syskk: eheh\
[00:09] motu: true
[00:09] OneBraveHog: right, I don't look at php as a web server
[00:09] OneBraveHog: but a server side scripting solution for a web server
[00:09] motu: nodejs can be both server and serverside script at same time
[00:09] MooGoo: node has to do the job of apache and php if it is serving web pages
[00:09] OneBraveHog: but sounds like node.js is ALSO A web server ?
[00:09] OneBraveHog: motu - ok
[00:09] OneBraveHog: I'm getting the picture
[00:09] MooGoo: but there's good modules for that
[00:09] motu: yes exactly
[00:09] MooGoo: like express I guess
[00:09] motu: express is nice
[00:10] motu: have not tried many else
[00:10] MooGoo: if you just go with raw node, there's a lot to do to get a decent web hosting + script enviornment
[00:10] mscdex: OneBraveHog: node is an I/O (+ other things) layer on top of the javascript language
[00:10] motu: agree
[00:10] OneBraveHog: does it seem node has enough momentum that it likely won't go away ? I mean, to invest into a new way of doing things.. I'm cautious.
[00:10] motu: its smart to try without any modules first
[00:10] hever: OneBraveHog, you can write your own webserver using node very easy. It's not a common webserver...
[00:10] OneBraveHog: mscdex- oh, that's news to me.
[00:10] OneBraveHog: I get it
[00:10] OneBraveHog: well, get it more.
[00:11] MooGoo: I wonder if there is mod_node out there
[00:11] OneBraveHog: thanks for insights
[00:11] motu: in nodejs its very easy to setup a webserver
[00:11] motu: to or three lines
[00:11] catshirt has joined the channel
[00:11] motu: maybe a little more but not much
[00:11] OneBraveHog: and thanks to anyone that's making node happen - this comes across as very exciting to me. All though I'm far far on the sidelines at the moment.
[00:11] MooGoo: it's not so easy to make it into a file server that can dynamicly load scripts and stay running in face of syntax and runtime errors
[00:11] dget has joined the channel
[00:11] mscdex: OneBraveHog: so that includes things like networking, file system calls, etc. there are also core built-in libraries to make these things easier -- including an http server and client and tcp/udp server and client
[00:12] hever: motu, but really those "webservers" are nothing compared to "real" ones....
[00:12] motu: true
[00:12] motu: usally everyone use a proxy in front of nodejs
[00:12] motu: like nginx or apache
[00:12] AvianFlu: OneBraveHog: I had to leave the room but you can tweet @NodeKohai with any questions, it will pipe them to the #nodesupport room
[00:12] MooGoo: not so sure how a single node process would do serving up a real popular website
[00:12] OneBraveHog: wow- that's neat - thanks for the info avian.
[00:13] mscdex: OneBraveHog: then there are 3rd party modules that create higher level abstractions on top of the core modules, like Express.js
[00:13] motu: MooGoo: should go fine with something like node-cluster
[00:13] niles|iPod has joined the channel
[00:13] MooGoo: something that spawns additional node child processes?
[00:13] motu: to scale you just need to run many nodejs serves in paralell
[00:14] motu: and loadbalance between them, with apache or nginx
[00:14] motu: or your own
[00:14] hever: OneBraveHog, If you're looking for a solution for really special needs and you're going to develope some stuff yourself node is a good way to go
[00:14] MooGoo: I wish there was a better way to share state between seperate node processes
[00:14] motu: unix sockets?
[00:14] OneBraveHog: hever- I see- lets you get low lower level I see.
[00:14] MooGoo: maybe....
[00:14] motu: dnode?
[00:14] hever: OneBraveHog, and it's very "interesting" to write JavaScript serverside. It's very different from PHP, python, perl and so on ;)
[00:15] MooGoo: and that would save me from serializing everything and message passing?
[00:15] MooGoo: whats dnode do exactly
[00:15] mscdex: OneBraveHog: if you're interested in some tutorials/more information, check out these sites: http://nodeguide.com/ http://nodebeginner.org/ http://nodetuts.com/ http://www.youtube.com/watch?v=jo_B4LTHi3I http://howtonode.org/
[00:15] febits has joined the channel
[00:15] OneBraveHog: mscdex- more than I could ask for - thanks - I'm off to check it out right now.
[00:15] motu: DNode: Asynchronous Remote Method Invocation for Node.js and the Browser
[00:16] MooGoo: well that explains everything
[00:16] motu: hehe
[00:16] mandric has joined the channel
[00:16] motu: i have not used it myself
[00:16] hever: OneBraveHog, Just for your interest. Using apache you could write your own apache modules using C/C++ or your can use mod_perl and directly influence the webserver calls. (Not like just using perl)
[00:16] idefine has joined the channel
[00:16] tuhoojabotti: {title.attr("href"): article} How can I make this work? :P
[00:16] motu: i agree it should be easier to communicate between nodejs instances
[00:17] SubStack: it is!
[00:17] tuhoojabotti: Hmm
[00:17] MooGoo: tuhoojabotti obj[title.attr('href')] = article
[00:17] motu: have not been needing it yet so have not tried many solutions
[00:17] tuhoojabotti: I'm not even sure wether I want that or not :D
[00:17] motu: SubStack: i guess its not very difficult
[00:17] SubStack: dnode({ zing : function (x, cb) { cb(x + 1000) }).listen(5000)
[00:17] hever: OneBraveHog, And from nodes sight. It's more like, you can also write a webserver or run it as webserver.
[00:18] motu: cool
[00:18] SubStack: dnode.connect(5000, function (remote) { remote.zing(3, console.log) }) // prints 3000
[00:18] MooGoo: ok
[00:18] MooGoo: so it does message passing
[00:18] hever: OneBraveHog, I'm for example just using it for fast parallel fetching and processing of data. No webserver. anyway have phun!
[00:18] motu: im going to need this very soon
[00:19] rick_h_: eldavojohn writes "Last year Microsoft co-founder Paul Allen filed suit against eleven tech companies citing patent infringement on four of his patents. Groklaw has followed up with some interesting documents that reveal three out of the four have already been granted a reexamination by the USPTO with the fourth still pending."
[00:19] motu: im writing a background queue in redis and nodejs
[00:19] SubStack: MooGoo: it's more general in that you can pass callbacks around
[00:19] motu: using bpop in redis
[00:19] MooGoo: yea
[00:19] gozala has joined the channel
[00:19] MooGoo: I mean
[00:19] motu: works very nice indeed
[00:19] MooGoo: its not passing callbacks
[00:19] SubStack: MooGoo: in that example there was nothing special about cb, it could have been as the first argument or nested arbitrarily deeply
[00:19] MooGoo: its passing a pointer to the callback
[00:19] SubStack: yes
[00:20] MooGoo: you couldnt pass a function from parent to child and expect it to retain access to its closure
[00:20] SubStack: yes you can
[00:20] motu: what i realy need is a way of havinf lots of nodejs process running on different servers and some way of them knowing about eachother
[00:20] SubStack: because the functions execute on the side they were defined on
[00:20] MooGoo: not if you run the function on the child
[00:20] MooGoo: yea...
[00:21] SubStack: it works exactly like if the functions were both in the same node process
[00:21] SubStack: except that you can't explicitly return, you've got to pass in callbacks
[00:21] MooGoo: also true
[00:21] MooGoo: so
[00:21] MooGoo: how do you work with
[00:21] MooGoo: return functions
[00:21] MooGoo: just wrap around it
[00:21] MooGoo: or is there a more convienent way
[00:22] MooGoo: could I just do
[00:22] motu: passing reference can be a bit wierd in node sometimes
[00:22] MooGoo: parent.arbitrary.nested.func(arg1, arg2)
[00:22] motu: i guess at least for people not used to javascript
[00:22] jerrysv has joined the channel
[00:23] MooGoo: I guess dnode does a good job abstracting away all the serializing and message passing
[00:23] MooGoo: I've written code that does the same
[00:23] MooGoo: its a pain
[00:23] MooGoo: wish there was a more direct way
[00:23] MooGoo: is what im saying
[00:23] tuhoojabotti: How can I make the title "point" to the jQuery object like myArticles[title] gives me the jQuery object :3
[00:23] tuhoojabotti: I can't think
[00:23] MooGoo: especily when you have to stringify then parse JS objects between two js interperters
[00:23] MooGoo: seems wasteful
[00:24] Aria: Like shared memory?
[00:24] motu: mm
[00:24] Aria: A limited sort?
[00:24] motu: shared memory is fun!
[00:24] Aria: I, for one, hope that someone hacks shared memory into v8 some time.
[00:24] MooGoo: MAYBE
[00:24] motu: shard over network is even more fun!
[00:24] MooGoo: I dunno
[00:25] motu: you probably going to need some very expensive network technology
[00:25] MooGoo: isnt there some native v8 datatype that can be passed in binary
[00:25] motu: realy
[00:25] MooGoo: its more of a question
[00:25] MooGoo: I dunno shit really
[00:25] motu: hehe dont know
[00:26] Aria: v8 has nothing like that, not with its GC weirdness.
[00:26] tim_smart: rauchg: Yo, around? Quick mongoose quick regarding multple connections.
[00:26] SubStack: MooGoo: yes you can call functions nested wherever with as many functions nested however strangely
[00:26] SubStack: MooGoo: you can even have circular refs
[00:27] tim_smart: mongoose question*
[00:28] malkomalko has joined the channel
[00:28] motu: some discovery protocol and dnode in the same package/module would be nice
[00:28] motu: please make it someone
[00:28] TomsB has joined the channel
[00:29] fermion has joined the channel
[00:29] motu: a decentralized system would be nice
[00:29] motu: no need for a master
[00:31] motu: it could be super cool, just install the node interpreter and start the node, and it could just hook up to the network
[00:31] paul_k has joined the channel
[00:31] motu: download all it needs of packages etc itself
[00:32] motu: could even install npm itself
[00:32] DelvarWorld has left the channel
[00:32] DelvarWorld has joined the channel
[00:40] beriberikix has joined the channel
[00:40] tayy has joined the channel
[00:41] DelvarWorld: if i'm building my own template language > javascript function processor, can I get away with not making a lexer / parser
[00:42] motu: DelvarWorld: why are you doing that?
[00:43] DelvarWorld: working on an application to process templates into executable code, like
{{title}}
into return '' + data[title] + '
'
[00:43] motu: ok
[00:43] DelvarWorld: haven't done much parsing before, it's kind of overwhelming
[00:43] MooGoo: why not just string.replace
[00:44] motu: you could may even use awk
[00:44] DelvarWorld: well, that's the super-simple example, I would also like things like control blocks (if statements) in the code, and sometimes `data` has to be populated async, and you can nest templates, etc...
[00:44] jaket has joined the channel
[00:44] motu: depends of how much logic you are have to do
[00:45] MooGoo: so
[00:45] MooGoo: you want something like PHP
[00:45] MooGoo: or ASP
[00:45] DelvarWorld: moreso django's syntax, closer to that
[00:45] MooGoo: so anything wrapped in {{ }}
[00:45] MooGoo: is evaluated as code
[00:46] DelvarWorld: not 1 to 1 javascript code, but it is interpreted
[00:46] MooGoo: I mean....you might want to use different characters that dont collide with something that could be valid JS
[00:46] ngs has joined the channel
[00:46] DelvarWorld: no, I don't want actual js code in the templates
[00:47] DelvarWorld: i'm basically making my own template syntax
[00:47] MooGoo: oh
[00:47] MooGoo: is it nestable
[00:47] DelvarWorld: yes
[00:47] MooGoo: then you need to parse
[00:47] DelvarWorld: {{include.html}}
will load another template inside it
[00:47] DelvarWorld: I *need* to parse?
[00:48] MooGoo: you might be able to get away without parsing for some basic stuff
[00:48] DelvarWorld: I mean, right now I am just using a regex and recursive function to replace blocks, it's just getting tricky keeping track of state since my output is a string which becomes the function body
[00:49] motu: DelvarWorld: u should check out : https://github.com/visionmedia/jade/tree/master/lib
[00:49] DelvarWorld: haha, I was just looking at that
[00:49] motu: looks good to me
[00:50] motu: i guess u could modify that alot to your need
[00:50] DelvarWorld: I'm just brand new to parsers and it's a little confusing to walk through
[00:50] AvianFlu has joined the channel
[00:50] MooGoo: I really....dont like html templates that dont use html
[00:50] motu: MooGoo: jade is very fast to write
[00:51] MooGoo: but yea....the jade github has a lexer.js and parser.js in the index
[00:51] motu: yepp
[00:51] MooGoo: anything remotly complex needs a parser
[00:51] motu: alot of regexps
[00:51] MooGoo: its a bitch to get going...but once you have your parser running you have a lot more options
[00:51] MooGoo: than relying on pure regex
[00:52] thalll has joined the channel
[00:52] galaxywatcher has joined the channel
[00:52] MooGoo: lexing isnt hard
[00:52] DelvarWorld: do you have any suggested literature on the subject
[00:52] DelvarWorld: do you think I could get away with hacking into jade
[00:53] themiddleman has joined the channel
[00:53] davidbanham has joined the channel
[00:53] MooGoo: maybe just check out its parser and lexer.js files
[00:55] hybsch has left the channel
[00:56] DelvarWorld: once you have a syntax tree from a parser, is a "compiler" the right term for what turns the tree into the final output?
[00:58] _jgr has joined the channel
[00:58] Mrfloyd has joined the channel
[00:58] MooGoo: guess so
[00:59] niles|iPod has joined the channel
[01:02] motu: check jison : http://zaach.github.com/jison
[01:04] bartt1 has joined the channel
[01:07] okuryu has joined the channel
[01:10] AndyDawson has joined the channel
[01:11] mundanity has joined the channel
[01:16] secoif has joined the channel
[01:16] mhordecki has joined the channel
[01:17] lukstr: DelvarWorld: a compiler back-end, yes
[01:17] lukstr: well, actually still a front-end I guess
[01:17] Mrfloyd has joined the channel
[01:18] fostah has joined the channel
[01:18] lukstr: anything that does lexical analysis, parsing, semantic analysis and code generation/optimization is a compiler of sorts :P
[01:20] azeroth__ has joined the channel
[01:21] broofa has joined the channel
[01:22] perezd: what version of SSL/TLS does node 0.4.8 speak natively?
[01:22] galaxywatcher has joined the channel
[01:24] dmojoryder has joined the channel
[01:24] eyesUnclouded has joined the channel
[01:25] cloudhead has joined the channel
[01:27] gavin_huang has joined the channel
[01:30] cloudhead_ has joined the channel
[01:32] akshatj has joined the channel
[01:35] jxck has joined the channel
[01:36] DelvarWorld: am I the only person who hasn't written a parser? sometimes I really regret going for an IT degree over CS
[01:36] mustalac has joined the channel
[01:36] perezd: DelvarWorld: I have not written a parser
[01:36] shachaf: DelvarWorld: You don't need a degree in anything to write a parser.
[01:36] Aria: It's a worthy exercise. You don't need a degree n CS for it.
[01:36] shachaf: If you want to write a parser just do it.
[01:37] perezd: you can pay me to write a parser tho, and I'll give you a diploma
[01:37] Aria: There's some clever things you can learn from the theory, but there's a lot you can do by trying. And you might recognize the theory after that.
[01:38] Aria: The real trick is to learn what sort of parser you're working with, and what its limits are, what things are hard.
[01:39] kmiyashiro has joined the channel
[01:40] ravengraus has joined the channel
[01:40] neoesque has joined the channel
[01:42] prettyrobots: DelvarWorld: Read Mastering Regular Expressions.
[01:43] DelvarWorld: prettyrobots: you're not the first to recommend I read that
[01:43] prettyrobots: After you read it, you have a very colloquial way of thinking about the problem.
[01:43] DelvarWorld: are you suggesting it for the use or regular expressions in parsers, or how languages parse regular expressions?
[01:44] killfill: guys, if i set io.listen(app, {rememberTransport: false}) socket.io still remembers the transport... :S
[01:44] killfill: how do i force it to 'hanshake' everytime?
[01:44] prettyrobots: I'm suggesting it because it gives you a working man's guide to patterning matching, and then parsing is no longer in the realm of CS.
[01:44] prettyrobots: You can read the source code for the Eco templating language.
[01:45] prettyrobots: That's a parser that uses regular expressions to create the token stream. Very simple, and an example of what you can do with Node.js.
[01:45] AvianFlu: regex FTW
[01:46] prettyrobots: After learning about regex, it's easy to understand EBNF.
[01:47] MooGoo: EBNF still confuses me
[01:48] unomi has joined the channel
[01:48] MooGoo: im just lazy
[01:48] mustalac has joined the channel
[01:49] prettyrobots: MooGoo: No. It's just confusing.
[01:49] MooGoo: I almost wish it looked more like regex
[01:49] DelvarWorld: ebnf = ?
[01:49] MooGoo: somehow
[01:50] MooGoo: !w ebnf
[01:50] MooGoo: calvin
[01:50] MooGoo: calvin you're not even in here
[01:50] Calvin has joined the channel
[01:50] MooGoo: !w ebnf
[01:50] Calvin: In computer science, Extended Backus–Naur Form is a family of metasyntax notations used for expressing context-free grammars: that is, a formal way to describe computer programming languages and other formal languages. They are extensions of the basic Backus–Naur Form metasyntax notation.
[01:51] DelvarWorld: ah
[01:51] __sorin__ has joined the channel
[01:51] niles|iPod has joined the channel
[01:51] MooGoo: understand that crap and you can feel like an elitist CS major
[01:54] KellyM has joined the channel
[01:55] DelvarWorld: the boxed is locked the lights are on, it's _____
[01:57] resik72 has joined the channel
[01:59] resik72: anyone knows if http referrer headers are automatically set w/in expressjs between routes?
[01:59] materialdesigner has joined the channel
[01:59] rputikar has joined the channel
[02:02] cloudhea1_ has joined the channel
[02:03] eyesUnclouded has joined the channel
[02:04] AvianFlu: OMG SOMEBODY STOLE MARAK'S HAIR
[02:05] gkatsev: bnfs are easy
[02:05] cloudhead has joined the channel
[02:05] captain_morgan has joined the channel
[02:07] gozala has joined the channel
[02:08] pcloadletter has joined the channel
[02:09] skm has joined the channel
[02:11] akshatj has joined the channel
[02:11] igl1 has joined the channel
[02:14] mustalac has joined the channel
[02:14] cloudhea1 has joined the channel
[02:15] eventualbuddha has joined the channel
[02:17] brownies has joined the channel
[02:29] boehm has joined the channel
[02:30] fairwinds has joined the channel
[02:31] cloudhead has joined the channel
[02:32] cloudhead_ has joined the channel
[02:34] jaket has joined the channel
[02:38] mykul has joined the channel
[02:41] fljitovak has joined the channel
[02:41] lukstr: DelvarWorld: get a copy of the dragon book
[02:43] e6nian has joined the channel
[02:43] e6nian: who use jake here?
[02:44] e6nian: I follow the example in READ.ME https://github.com/mde/jake ,but can't pass params to jake `jake awesome[foo,bar,baz]`
[02:45] e6nian: Task "awesome[foo,bar,baz]" is not defined in the Jakefile.
[02:46] johnm1234 has joined the channel
[02:47] frewsxcv has joined the channel
[02:47] frewsxcv: which is the most solid module for redis support in node
[02:47] frewsxcv: also, is there a good tutorial?
[02:47] AvianFlu: search.npmjs.org for node-redis
[02:47] AvianFlu: or just redis
[02:50] e6nian: so what's your localtime here.
[02:51] davidbanham has joined the channel
[02:51] Aria: 2051
[02:52] e6nian: 10:52
[02:53] _jgr has joined the channel
[02:53] frewsxcv: AvianFlu: node_redis or redis-node
[02:54] AvianFlu: one sec
[02:56] avalanche123 has joined the channel
[02:57] AvianFlu: frewsxcv: node_redis
[02:57] AvianFlu: matt freney or something is the author
[02:57] frewsxcv: AvianFlu: aight thanks
[02:58] frewsxcv: does redis just hold one value?
[02:58] SuperJS has joined the channel
[02:58] frewsxcv: it's just a giant hash table/
[02:58] frewsxcv: ?
[02:58] themiddleman has joined the channel
[02:59] Aria: Kinda. Its main interface is keys, which have values of various (few) types.
[02:59] Aria: So in a way, it's a hash table -- really, it's not a hash, it's a much more sophisticated structure, especially if you're playing with VM stuff where values can get swapped out.
[02:59] SuperJS: hi, i was wondering anyone using mustache.js for nodejs?
[03:00] cha0s has joined the channel
[03:00] cha0s has joined the channel
[03:01] dipser_ has joined the channel
[03:07] SuperJS has joined the channel
[03:08] Spion has joined the channel
[03:14] kmiyashiro has joined the channel
[03:15] caolanm has joined the channel
[03:16] Dinosaurus has joined the channel
[03:17] Dinosaurus: what's a way of seeing mongodb performance in my application (sinatara/unicorn/nginx)
[03:17] johnnywengluu: Is there a way to create a custom event with socket.io?
[03:20] SuperJS has joined the channel
[03:21] SuperJS: hello so no one has use mustache with nodejs eh?
[03:21] Aria: I'm sure lots of people have.
[03:22] SuperJS: oh cool
[03:22] gkatsev: there are even several projects inspi~red by it
[03:23] SuperJS: I have a question about it
[03:23] tbranyen: SuperJS: its in NPM
[03:23] tbranyen: so yeah... people are using it
[03:24] cloudhead has joined the channel
[03:24] SuperJS: i am stuck on how to use it with the server, i am using mu.js, but when I google it, it tells me to use to_html() method, but it was not found in the mu.js
[03:25] tbranyen: no idea what mu.js is, but to_html is a method on the mustache object
[03:26] kriszyp has joined the channel
[03:26] SuperJS: this was linked to here https://github.com/raycmorgan/Mu from the http://mustache.github.com/ (main site)
[03:27] jxck has joined the channel
[03:27] e6nian: who use jake here? can you use params in jake?
[03:27] gkatsev: SuperJS: how are you "using" mu.js?
[03:28] akshatj: woot! installed node on my shiny new ec2 instance
[03:29] SuperJS: i followed the demo using Mu.render, but i am not sure how do I display the output into html format
[03:29] cloudhead_ has joined the channel
[03:31] yhahn has joined the channel
[03:32] __sorin__ has joined the channel
[03:33] tbranyen: wow Mu looks ridic shitty
[03:33] mykul|Home has joined the channel
[03:33] tbranyen: can you not feed it just a template string? all i'm seeing is filename
[03:34] Dinosaurus: you could add that in 9.23 seconds if it doesn't
[03:34] jslatts: anyone know what EV_P_ refers to in libev?
[03:34] jslatts: and likewise, EV_A_?
[03:35] tbranyen: Dinosaurus: prove it
[03:35] Dinosaurus: prove what? that you can edit javascript files? o_O
[03:35] Spion_ has joined the channel
[03:36] tbranyen: Dinosaurus: lol i would never ever edit core 3rd party source
[03:36] SuperJS: yeah the main site of mustache referred me to Mu.js for using nodejs
[03:37] SuperJS: i am confused whether to use this
[03:37] Dinosaurus: use jade
[03:37] johnnywengluu: http://cloud9ide.posterous.com/
[03:37] tbranyen: SuperJS: mustache.js works as well
[03:37] tbranyen: there is a node module for it
[03:37] tbranyen: its probably slower
[03:37] gkatsev: you can also use nun, which isn't mustache itself, but similar. And faster.
[03:37] tbranyen: but doesn't make you do a bunch of bs like Mu does
[03:38] gkatsev: there is also milk
[03:38] gkatsev: which implements mustache in coffeescript
[03:38] gkatsev: and mustachio
[03:38] gkatsev: also, stache
[03:38] SuperJS: ah wow cool
[03:39] mscdex: there ought to be a git command like this: git -r done
[03:39] mscdex: :-D
[03:39] gkatsev: while nun, as I said above, is almost mustache. And has great docs, at least last time I checked. Not sure how well the others are documented
[03:40] gkatsev: SuperJS: search.npmjs.og
[03:40] gkatsev: oops
[03:40] gkatsev: SuperJS: search.npmjs.org
[03:40] Dinosaurus: johnnywengluu do you run cloude9 from home
[03:40] johnnywengluu: Dinosaurus: yeah .. works great .. and you?
[03:40] Dinosaurus: i haven't used it
[03:40] johnnywengluu: i mean i run the offline version
[03:40] Dinosaurus: i see
[03:42] SuperJS: oh cool thanks, so basically avoid using Mu.js right? hehe
[03:42] gkatsev: yeah, it seems to be weird.
[03:43] tbranyen: gkatsev: Nun doesn't seem to allow you to provide it a string template either
[03:43] tbranyen: what is with these guys
[03:43] gkatsev: tbranyen: it doesnt?
[03:43] tbranyen: https://github.com/akaspin/nun/blob/master/index.js
[03:43] tbranyen: none of its public methods indicate it does
[03:44] tbranyen: so useless
[03:44] tbranyen: especially if you aren't storing templates in files
[03:45] gkatsev: tbranyen: yeah, it doesnt. Weird.
[03:45] brownies has joined the channel
[03:45] Dinosaurus: why would you not store template in file tho
[03:46] gkatsev: if they're small, what's the point?
[03:46] jacobolus has joined the channel
[03:46] Dinosaurus: organization :D
[03:46] kmiyashiro has joined the channel
[03:46] tbranyen: Dinosaurus: you may be using git version control, a database, shared memory, etc
[03:46] tbranyen: its closed minded to rely on files
[03:47] Dinosaurus: wut?
[03:47] tbranyen: what part wasn't clear?
[03:47] Dinosaurus: git version control?
[03:48] tbranyen: yeah if you're in a bare repo you can't just point to a file and load it, especially if you've packed your objects dir
[03:49] tbranyen: anything other than the currently checked out head won't be accessible in a non bare repo
[03:49] mykul has joined the channel
[03:49] Dinosaurus: oh
[03:50] tbranyen: so basically if you wanted to use Mu or nun, you'd have to load in your template, write it out to a file, and then load it in
[03:50] tbranyen: which is kind of lame
[03:50] admc has joined the channel
[03:52] liquidproof has joined the channel
[04:05] fljitovak has joined the channel
[04:11] niles|iPod has joined the channel
[04:16] jaket has joined the channel
[04:18] JoshC1 has joined the channel
[04:20] akshatj has joined the channel
[04:20] DelvarWorld has left the channel
[04:20] DelvarWorld has joined the channel
[04:24] febits has joined the channel
[04:24] johnm1234 has joined the channel
[04:27] gtramont1na has joined the channel
[04:28] fairwinds has joined the channel
[04:29] beriberikix: I'm trying to read a JSON file and then parse it
[04:30] akshatj_ has joined the channel
[04:30] beriberikix: In the filereader, console.log prints out fine, but when I return out as a module, its undefined
[04:30] Corren has joined the channel
[04:30] beriberikix: I've tried both async and sync - any ideas?
[04:31] Aria: return it as a module?
[04:31] blueadept: anyone know of a good way to autoload content on scroll?
[04:32] blueadept: sort o flike Aza's site: http://www.azarask.in/blog/
[04:36] beriberikix: any help debugging this filereader code? http://pastebin.com/Gcy4yPWv
[04:36] tbranyen: beriberikix: don't use readFileSync
[04:36] tbranyen: use just readFile
[04:36] tbranyen: readFileSync doesn't take a callback
[04:38] tbranyen: beriberikix: http://pastebin.com/0PCbUcG2
[04:39] tbranyen: line 5 should be console.log(json)
[04:41] mhausenblas has joined the channel
[04:43] eventualbuddha has joined the channel
[04:43] Adman65 has joined the channel
[04:43] febits[0] has joined the channel
[04:44] cpolis has joined the channel
[04:47] Swimming_bird has joined the channel
[04:48] SuperJS: hi can someone link me the correct mustache.js, all i have is this link https://github.com/janl/mustache.js/raw/master/mustache.js? Because I am having this error: TypeError: Object # has no method 'to_html'
[04:51] beriberikix: thanks tbranyen
[04:51] beriberikix: but its still throwing undefined outside the callback
[04:51] gkatsev: SuperJS: post a snippet of what you're trying to do?
[04:52] tbranyen: beriberikix because you can't use anything outside the callback
[04:52] SuperJS: @gkatsev res.write(Mustache.to_html(template, actions[0].view))
[04:52] tbranyen: unless you use a synchronous approach
[04:53] cpolis has joined the channel
[04:53] tbranyen: beriberikix: just move all your code to be inside the callback
[04:53] beriberikix: Hmm
[04:53] beriberikix: I'm trying to do this: http://pastebin.com/rvTfHsBq
[04:54] febits[1] has joined the channel
[04:54] gkatsev: SuperJS: hm.. that should work. Is the file being included correctly?
[04:54] gkatsev: are you requireing the file?
[04:55] SuperJS: @gkatsev yes, var Mustache = require('./mustache'), where mustache.js is in the local directory
[04:55] gkatsev: SuperJS: ah, that's why.
[04:56] gkatsev: because that file just creates a variable called Mustache.
[04:56] SuperJS: ah ic ic
[04:57] gkatsev: not sure how to fix it, lol
[04:57] SuperJS: lol
[04:57] gkatsev: well, you could read the file in and then eval it :)
[04:58] SuperJS: @gkatsev cause alot of website tutorial are using this and claim it works lol
[04:58] gkatsev: are they?
[04:58] SuperJS: yeah lol
[04:59] tbranyen: FAILURES: 12/17 assertions failed (44ms)
[04:59] tbranyen: god damnit
[04:59] pplante: crutex: maybe you ought to try out a persona for a few minutes before switching? ;)
[04:59] gkatsev: tbranyen: ha
[04:59] gkatsev: tbranyen: know how to solve SuperJS's problem, though?
[04:59] tbranyen: gkatsev: whats his problem?
[04:59] crutex: pplante i couldn't talk in a channel with that name
[05:00] gkatsev: tbranyen: he's trying to require mustache.js but then he doesn't get the actual object that is Mustache.
[05:00] tbranyen: right it doesn't export it
[05:00] tbranyen: use the node module
[05:00] tbranyen: npm install mustache
[05:00] gkatsev: oh, right, it exists, for got about it.
[05:00] gkatsev: tbranyen: but is there an easy way to add files like that, do you know?
[05:00] SuperJS: ah
[05:00] tbranyen: or edit the core file and add module.exports = Mustache
[05:01] tbranyen: or create your own wrapper
[05:01] gkatsev: or read the file in and then eval it, as I said :)
[05:01] tbranyen: right thats what i meant by wrapper
[05:01] gkatsev: ok
[05:01] tbranyen: yeah i wish there was an easier way
[05:01] gkatsev: SuperJS: yeah, I guess npm install mustache is what you should try first
[05:01] tbranyen: like have all the globals resolve to the module
[05:01] tbranyen: lua does that
[05:02] gkatsev: ACTION writes a module to include js files. It will read it in via file IO and then eval it.
[05:02] gkatsev: though, it won't eval it in the right env
[05:02] gkatsev: hm...
[05:02] tbranyen: yeah and there isn't a way to capture globals
[05:02] tbranyen: or locals for that matter
[05:03] gkatsev: tbranyen: sure there is. (function(){return this;})()
[05:03] dmojoryder has joined the channel
[05:03] tbranyen: var Mustache; (function() { Mustache = {}; })(); without knowing the name how do you get mustache in another scope?
[05:03] tbranyen: you can't
[05:04] gkatsev: I could say under usage: var loadFile = require("loadfile").(function(){return this;}); heh
[05:04] tbranyen: you could write a native module in node.js to do it
[05:04] tbranyen: and read in the global scope variables
[05:04] tbranyen: and attach them to a local scope
[05:04] tbranyen: object
[05:04] tbranyen: called globals or something
[05:05] tbranyen: var module = require('mustache').globals.Mustache;
[05:05] gkatsev: well, that requires rewriting require, no?
[05:05] tbranyen: actually wonder if you could do that with a for in loop
[05:05] pen has joined the channel
[05:05] tbranyen: gkatsev: o right, it'd be have to be called something else
[05:07] gkatsev: anyway, I'm going to sleep now.
[05:07] gkatsev: night
[05:08] malkomalko has joined the channel
[05:08] febits has joined the channel
[05:09] brownies has joined the channel
[05:10] tbranyen: later
[05:11] ezl has joined the channel
[05:14] mbrochh has joined the channel
[05:15] eventualbuddha has joined the channel
[05:16] CarterA has joined the channel
[05:17] mbrochh: Hey guys. With node.js is it somehow possible to subscribe to timed events? Like when the time turns 2AM then do something?
[05:17] insin has joined the channel
[05:17] Aria: Yes, ish. You can figure out when that is in seconds from now, then setTimeout for then.
[05:18] DelvarWorld: you could use a combination of setTimout and setInterval for...
[05:18] brownies: is this on your server? why not just do a cron job?
[05:18] DelvarWorld: shut up Aria
[05:18] Aria: And cron is a royal pain in the ass to signal something that you've already got persistently running.
[05:18] Aria: It's adding another dependency. And not neccesarily one that's easy to automatically instantiate.
[05:18] Aria: Even if cron is nearly universal.
[05:19] maqr has joined the channel
[05:19] maqr has joined the channel
[05:19] mbrochh: brownies, I want it to be backed by a couchDB where users can schedule their jobs via a web interface.
[05:20] Aria: Basically Cron 2.1
[05:20] brownies: yea, fair, Aria
[05:21] DelvarWorld: settimeout/interval return ids that you can store in couch, and stop them if needed with clearTimeout
[05:22] CarterA has left the channel
[05:23] tobiassjosten has joined the channel
[05:23] SuperJS: yeah thanks guys, npm install rocks
[05:24] ebryn_ has joined the channel
[05:25] simenbrekken has joined the channel
[05:27] KellyM has joined the channel
[05:27] devrim has joined the channel
[05:31] rubydiam_ has joined the channel
[05:35] galaxywatcher has joined the channel
[05:38] pifantastic has joined the channel
[05:42] ShuzRaGe has joined the channel
[05:42] Gurpartap has joined the channel
[05:43] Gurpartap: MongoDB or Redis for a simple learning experience project with user auth etc?
[05:44] blkcat: Gurpartap: they're completely different databases. :)
[05:44] Gurpartap: yeah, trying to figure out what i need.
[05:44] Gurpartap: coming from sql background. :)
[05:45] dan_manges has joined the channel
[05:45] febits[0] has joined the channel
[05:45] blkcat: you're probably looking for mongo.
[05:49] Gurpartap: thanks mate
[05:49] Gurpartap: :)
[05:50] davidcoallier has joined the channel
[05:54] cha0s has joined the channel
[05:54] itissid has joined the channel
[05:55] itissid: hey has someone debugged with nodeinspector on a node server running on a remote machine?
[05:56] itissid: I am able to debug on my machine here but not my server
[05:56] tikva has joined the channel
[05:58] strmpnk has joined the channel
[05:58] mustalac has joined the channel
[06:01] bshumate has joined the channel
[06:04] niftylettuce has joined the channel
[06:06] beawesomeinstead has joined the channel
[06:06] beawesomeinstead has joined the channel
[06:09] fallingmeat has joined the channel
[06:15] jbpros has joined the channel
[06:18] Marak has joined the channel
[06:18] Marak: node.js party time
[06:18] Marak: ryah where you at!
[06:18] Marak: come drink beer with us, the keg is still too full
[06:19] Aria: Man, wish I was in SF right now.
[06:19] Aria: Sounds like fun.
[06:19] Marak: :-D
[06:20] chapel: Marak: you should setup a live cam next time, and have like live chats
[06:21] chapel: so people can interact with party goers without being there
[06:22] itissid: I ll ask again.. has someone debugged with nodeinspector on a node server running on a remote machine?
[06:22] itissid: I am able to debug on my local machine here but not my remote server
[06:24] itissid: anyone?
[06:25] sirdancealot has joined the channel
[06:29] Emmanuel has joined the channel
[06:30] brainproxy: just curious, has anyone seen attempts or attempted to link node.js to a non-js DOM implementation like CplusplusDOM?
[06:31] Aria: I think I saw someone who'd worked on binding it to webkit recently.
[06:32] brainproxy: jsdom is a neat project, but it seems like it would struggle under a heavy load
[06:32] brainproxy: otoh, I've not stress tested it, so i could be wrong
[06:32] Aria: It's not THAT fast for level2 and level3, what with live lists for various outputs.
[06:32] Aria: And various parts could be optimized.
[06:32] Aria: But l1 is much faster.
[06:33] brainproxy: sure
[06:33] itissid: Is Remote debugging with node inspector possible?
[06:33] Aria: I believe so, itissid.
[06:33] skm has joined the channel
[06:33] brainproxy: itissid: yeah, i was doing it some time ago, haven't recently though
[06:34] brainproxy: I remember I had to jump through a few hoops to make it work right
[06:34] itissid: brainproxy, So once you start the debugger you go to someURI:8080/?debug_port=5858 right?
[06:34] itissid: I mean that does not work out of the box
[06:34] itissid: for me
[06:34] brainproxy: itissid: no, I think I used ssh port forwarding
[06:34] itissid: Damn
[06:35] itissid: But if the ports are open why should I need any forwarding
[06:36] brainproxy: not sure, I just remember that being part of what made it work for me, at least I'm pretty sure
[06:36] tim_smart has joined the channel
[06:36] itissid: brainproxy, ok so ssh forwarding of port 8080?
[06:37] brainproxy: itissid: so long as the request seems to be originating from localhost, I don't think the port on the side your web browser will connect to has to be 8080
[06:37] brainproxy: ssh -L 9999:localhost:8080 ...
[06:38] brainproxy: again, I'm working from a foggy memory dating back to Jan of this year, sorry
[06:39] brainproxy: Aria: so for intensive use of server-side DOM, you think a C++ binding to facilities of webkit or chromium DOM lib holds promise?
[06:39] _jgr has joined the channel
[06:40] Aria: I do. But it might take a fair bit of work, since naiive bindings in C++ land can get quite a performance penalty.
[06:40] Aria: But Chromium, of course, has crankshaft optimizations for the bindings specifically.
[06:40] openpercept has joined the channel
[06:41] brainproxy: is it possible for node hackers to leverage some of those same optimization techniques .. I'm at the cusp of investigating these things, sorry if the questions seem naive
[06:42] brownies has joined the channel
[06:42] Aria: Absolutely. But it's gotta be integrated tightly with v8, so it takes some buy-in from them. I don't know the full details, but V8 does some crazy specific things sometimes.
[06:42] brainproxy: up till now I've been all happy w/ pure JS implementations of my stuff, but have some special needs now
[06:42] Aria: So basically, you have to get it to do more crazy specific things.
[06:42] Aria: Yeah. a good fast DOM is gonna be hard to come by. Even Chromium's isn't gonna get hit 1000 times a second.
[06:43] Aria: It's fast, but it's fast for small numbers of pages interacting at user speed.
[06:43] brainproxy: I saw a lib called node-o3-something
[06:43] Aria: Not perhaps the same league as server-side apps chiurning out huge amounts of data.
[06:43] brainproxy: but that's for xml dom
[06:43] Aria: Yeah, XML is much simpler.
[06:43] Aria: strict!
[06:43] brainproxy: :)
[06:44] secoif has joined the channel
[06:45] brainproxy: I'd like for the server-side app to be able to keep a live DOM representation of some resources which are composites of smaller resources, and which trigger updates to the composed representation in an evented manner
[06:45] brainproxy: on the browser side, it's fine
[06:46] brainproxy: getting a symmetric implementation on the server is harder
[06:46] Aria: Yeah.
[06:46] brainproxy: hence, the desire for a high performance server-side DOM :)
[06:47] AvianFlu has joined the channel
[06:48] c4milo1 has joined the channel
[06:48] TomY has joined the channel
[06:49] Bj_o_rn has joined the channel
[06:52] Matias has joined the channel
[06:52] Matias: Hello
[06:52] saschagehlich has joined the channel
[06:53] Matias: I have a script that does http.request(options, myFunc(response) { console.log(response); }). somehow it doesn't work but if I replace "request" and I use "get" instead, it does work
[06:53] chapel: what do your options look like Matias?
[06:53] Matias: it never calls myFunc
[06:54] Matias: just normal, host, port, method, path
[06:54] rubydiam_ has joined the channel
[06:54] chapel: well, you can do function myfunc(response)
[06:54] chapel: or function(response)
[06:55] chapel: or myfunc)
[06:55] Matias: uh?
[06:55] Matias: I can, http.get(...) works well, the problem is using http.request
[06:55] chapel: you can specify a named function you are creating for the callback, or an anonymous function, or a named function called elsewhere
[06:55] chapel: idk
[06:55] chapel: gist the whole code example
[06:56] SuperJS: hi guys, for mustache.js how do you pass the whole variable to the html template. for example, var data = { "persion" : { "name": "Bart", "age": 100}, "school": {"name": "Springfield"} . I want to put the variable data in the template.html, is there a way?
[06:57] __jgr has joined the channel
[06:58] saschagehlich_ has joined the channel
[06:59] mustalac has joined the channel
[07:00] rubydiam_ has left the channel
[07:02] abraham has joined the channel
[07:02] amerine has joined the channel
[07:02] mplabs has joined the channel
[07:02] mplabs has joined the channel
[07:02] coderendezvous has joined the channel
[07:02] mplabs: I'm sorry, I lost my connection
[07:02] mplabs: I said, here is a test case: http://pastebin.com/NVKE6Xym
[07:03] mplabs: if I replace "request" for "get" it works wel
[07:03] mplabs: well*
[07:03] mplabs: what am I missing?
[07:03] SuperJS: hi guys, for mustache.js how do you pass the whole variable to the html template. for example, var data = { "persion" : { "name": "Bart", "age": 100}, "school": {"name": "Springfield"} . I want to put the variable data in the template.html, is there a way?
[07:05] mplabs: in fact I tried using mehotd: 'GET' but it doesn't woek either
[07:05] mplabs: work*
[07:05] mplabs: I think I should sleep, it's 4am and I'm starting to have lot of typos lol
[07:05] jslatts: mplabs: why don't you use express?
[07:06] mplabs: express?
[07:06] mplabs: because I don't know what is express
[07:06] jslatts: express is a nice mvc framework that makes serving pages much nicer
[07:06] chapel: mplabs
[07:07] jslatts: http://expressjs.com/
[07:07] mplabs: interesting
[07:07] chapel: its because you didn't do var req = http.request({})
[07:07] chapel: also http.request is for getting stuff from a server
[07:07] chapel: not for starting a server
[07:07] chapel: http://nodejs.org/docs/v0.4.8/api/http.html#http.request
[07:08] sirdancealot has joined the channel
[07:08] mplabs: I think you didn't get the code
[07:08] mplabs: I have a server running on port 80
[07:08] mplabs: and I want to get its content
[07:08] chapel: okay
[07:09] Shrink has joined the channel
[07:09] mplabs: it's weird because even if I use method: 'GET' it doesn't work, and I bet it's the same as using http.get({...}) which works!
[07:10] chapel: http://pastebin.com/SuLkhW0W
[07:10] chapel: http.get does the req.end call already
[07:10] mplabs: oh
[07:10] chapel: the problem is you aren't actually making the request until you do req.write() then req.end() or just req.end()
[07:10] chapel: read the docs :)
[07:10] chapel: http://nodejs.org/docs/v0.4.8/api/http.html#http.request
[07:11] qFox has joined the channel
[07:11] mplabs: you got it! thank you so much guys :)
[07:12] Shrink has left the channel
[07:16] madsleejensen has joined the channel
[07:16] jslatts: chapel: psh. docs.
[07:16] jslatts: chapel: read the code! :P
[07:17] chapel: rtfc
[07:17] chapel: :)
[07:17] jslatts: everytime I am about to ask a question, i always go "shit, i should go grep the source" and then i answer it
[07:18] CiRlE has joined the channel
[07:18] mplabs: I know it was my fault, the answer was just bellow the code example, I'm sorry :P
[07:19] jslatts: mplabs: no worries. the docs can be hard to navigate at first if you have no context
[07:19] chapel: it happens
[07:19] jslatts: i spent all day looking at the libev docs before they started to make any sense
[07:21] jslatts: why am i getting \r instead of a string??? grrr
[07:22] mbrochh]2 has joined the channel
[07:24] v_y has joined the channel
[07:26] pplante: has anyone setup vows to use growl notifications?
[07:27] chapel: jslatts: what are you trying to do?
[07:28] Druide_ has joined the channel
[07:29] jslatts: chapel: i have a struct returning from an addon I am writing. The struct has a string value and some numbers. The string shows up in node.js javascript-side when I do a winston.info() to log it, but when i stringify it and send it over the socket to my client, it shows up as an empty string
[07:29] jslatts: maybe i have just had too much beer.
[07:29] chapel: probably
[07:30] jslatts: too bad gdb won't tell me that
[07:31] jslatts: it really is making me crazy
[07:31] pplante: ha that would be an awesome error from gdb
[07:32] jslatts: time to bust out nodemon
[07:32] jslatts: err, node-inspector
[07:32] MikhX has joined the channel
[07:33] mplabs: is there any better way to get the content of the page you are .request()ing than to add an event 'data' with a callback to get it?
[07:33] mplabs: it'll be just plain text
[07:33] pplante: its not about the content of the page, its because the call is async
[07:34] jslatts: does anyone know how to make node-inspector auto-break on the first line?
[07:34] pplante: jslatts: cant you use the debugger statement?
[07:35] jslatts: it doesn't break for that
[07:35] pplante: should be able to put that anywhere and pause
[07:35] mplabs: it was --breakl or something like that, let me check
[07:35] pplante: ooh hm
[07:35] jslatts: i'll try it again, but last time i did, it was ignoring it
[07:36] max_dev has joined the channel
[07:36] mplabs: --start-brk
[07:36] mplabs: there it is
[07:37] mplabs: (http://howtonode.org/debugging-with-node-inspector)
[07:37] mplabs: so I always have to add a callback to do the request and another one to get the content?
[07:37] mplabs: pplante
[07:37] daglees has joined the channel
[07:37] jslatts: hrm, thats new
[07:39] jslatts: hah, its crashing the debugger
[07:40] pplante: mplabs: yes you do
[07:40] AvianFlu has joined the channel
[07:40] pplante: however you could use http.get() to shortcut some of it
[07:40] pplante: http://nodejs.org/docs/latest/api/http.html#http.get
[07:43] mplabs: I think I don't get something
[07:44] mplabs: oh, never mind, I was mixing the data event in the request object with the data event in the response object :P
[07:45] adambeynon has joined the channel
[07:46] itissid: Feels like knockout.js is the best thing to happen to webdevelopers
[07:46] itissid: NO more writing tons of jquery boiler plate
[07:46] pplante: what
[07:46] SuperJS: anyone know how to pass a JSON object from nodejs to mustache.js template?
[07:46] v_y: is knockout.js similar to backbone.js?
[07:47] itissid: v_y its backbone on steroids
[07:47] v_y: : |
[07:47] v_y: sounds scary
[07:47] itissid: v_y, it has a templating system..
[07:47] v_y: my templating system or a new one?
[07:47] v_y: lol
[07:47] itissid: jQuey templating system only...
[07:47] v_y: what else does it do that backbone doesn't
[07:47] DelvarWorld has joined the channel
[07:48] pplante: apparently the kitchen sink
[07:48] itissid: v_y, Well one thing is that it is having this incremental change idea
[07:49] itissid: Like if an array in your model changes
[07:49] jslatts: i am a fan of spine now
[07:49] itissid: then only a specific part of the DOM will be rerendered
[07:49] jslatts: instead of backbone
[07:49] v_y: spine?
[07:49] itissid: jslatts, you should look at knockout also
[07:50] jslatts: spin.js
[07:50] v_y: jslatts: and what does that have on backbone?
[07:50] jslatts: http://maccman.github.com/spine/
[07:50] jslatts: v_y: it has less
[07:50] v_y: ok
[07:50] v_y: that's always good
[07:50] jslatts: v_y: which is why i like it.
[07:51] jslatts: v_y: bacbone gets to be a PITA when you stop using it against a restful endpoint
[07:51] itissid: jslatts, MVVC is better than MVC for JS apps
[07:51] jslatts: and instead want to replace sync w/ something over socket.io for instance
[07:51] itissid: which is implemented by knoockout
[07:51] mbrochh]2 has left the channel
[07:51] v_y: ah
[07:52] jslatts: i haven't tried knockout, but backbone can do incremental updates, as can spine
[07:52] v_y: sorry, waht are incremental updates?
[07:52] jslatts: i assume he meant just redrawing one piece of the DOM
[07:52] itissid: v_y, Like if you have a list of elements that is listeneg to an array and you change 1 element of the array...
[07:53] itissid: blah blah..
[07:53] v_y: aah
[07:53] v_y: wow
[07:53] itissid: But the templating system is critical
[07:53] jslatts: itissid: they all do templating
[07:53] v_y: yeah i miss the ability to override get and set as in python
[07:53] itissid: jslatts, DO they have dependent observables?
[07:54] jslatts: i dont know, what are those
[07:54] mplabs: what is the method I should use to send parameters on a POST request? I bet it's not "path"
[07:54] pplante: v_y: well once ecmascript5/harmony takes over you can do just that...but yeah
[07:54] mplabs: (I mean, the path option in the .request() method)
[07:54] itissid: Like if say i am listening to 2 observables and a third observable dependent on some sort of composition of those 2 observables
[07:54] itissid: jslatts, ^
[07:55] itissid: jslatts, Like say First name and last name were 2 text labels that were being listened to and a third label was Full name
[07:56] itissid: was added
[07:56] jslatts: itissid: as in, listen for updates on specific DOM objects?
[07:58] msucan has joined the channel
[07:58] itissid: jslatts, So 2 DOM elements "First name" and "last name" are listening to two variables in your model. When you change the two variables the labels get updated.. Now suppose you want to add a 3rd DOM element that is "Full name" but it should be based on those two model variables alone..
[07:58] jslatts: anyone know the best way to convert a Local to a char*?
[07:59] itissid: So fullname will be a dependent observable
[07:59] v_y: you know what would be great? if node could be run in chrome's debugging framework
[07:59] jslatts: itissid: I _think_ you can do that with your own events in backbone, but it would take some work on the dev's part
[07:59] jslatts: v_y: you can...
[08:00] v_y: jslatts: really? how?
[08:00] itissid: v_y, You mean debug using node inspector..
[08:00] jslatts: v_y: node-inspector
[08:00] openpercept has joined the channel
[08:00] itissid: I mean that is already running the JS
[08:00] jslatts: <3 node-inspector
[08:00] v_y: node-inspector
[08:00] jslatts: except when it crashes, like right now
[08:01] jetienne has joined the channel
[08:01] v_y: wow.. just wow
[08:01] v_y: haha
[08:01] itissid: jslatts, it crashes?
[08:01] itissid: Mine does not
[08:01] jslatts: itissid: not normally
[08:01] jslatts: itissid: but something I am doing to it is making it unhappy
[08:01] itissid: jslatts, do you know how to set up node inspector on a remote server ?
[08:01] mplabs: (definitely, request.write() is not the way, at least not when you have an object :P)
[08:02] jslatts: itissid:no, didn't know you coudl
[08:02] jslatts: well, i guess it makes sense. it just gives you a port/ip
[08:02] skm has joined the channel
[08:03] itissid: jslatts, You can I dont know how to.. I am guessing some sort of port forwarding that brainproxy was talking about..
[08:03] itissid: I could not understand exactly
[08:04] jslatts: you would have to forward incoming requests to localhost;8080 i think
[08:04] SamuraiJack has joined the channel
[08:04] itissid: jslatts, Oh i think I might have gotten it
[08:06] spasquali has joined the channel
[08:07] yozgrahame has joined the channel
[08:09] jslatts: it boggles the mind that programmers have made dealing with strings across platforms so hard
[08:09] itissid: jslatts, you have no idea
[08:09] itissid: :)
[08:10] itissid: jslatts, C++ is the worst
[08:10] itissid: for strings
[08:12] adambeynon has joined the channel
[08:12] jslatts: i figured out that my issue is somewhere here: string goes from js -> c++ as Local -> String::AsciiValue -> char* -> through a message queue -> Local
[08:12] jslatts: after the queue its evaporated
[08:13] itissid: jslatts, What is Local<>? a standard Container clas?
[08:13] jslatts: yes, a handle to the javascript string object
[08:14] jslatts: *sigh* GDB time
[08:14] systemfault: Locale?
[08:15] systemfault: Err
[08:15] systemfault: std::locale is standard..
[08:15] systemfault: If it's something else, it must be node or whatever lib it uses
[08:17] Casperin: I got a question. I use cofffeescript for external files in node (and require to get them). So to access a variable in one such script I do like @foo = 123. But what if I have an external script that needs a variable set in another external file. Is that possible?
[08:20] mplabs: what am I missing? the server dosn't receive any POST variable data, http://pastebin.com/gxctWvbG
[08:21] jslatts: systemfault: it is node
[08:21] mplabs: s/variable//
[08:21] cystbear has joined the channel
[08:22] cystbear has joined the channel
[08:22] kbni has joined the channel
[08:23] nivoc has joined the channel
[08:23] ewdafa has joined the channel
[08:24] mplabs: I read some examples and they do the same
[08:24] gozala has joined the channel
[08:24] mplabs: but it's not sending {foo:'bar'}
[08:27] jslatts: YAY! i got my string
[08:28] azeroth__ has joined the channel
[08:29] Ned_ has joined the channel
[08:30] coreb has joined the channel
[08:30] SuperJS: has anyone worked with mustache.js before?
[08:31] jslatts: now i can sleep soundly tonight knowing that my strings can survive the round trip
[08:31] mplabs: :P
[08:34] v_y has joined the channel
[08:35] v_y: when i invoke `npm install node-inspector`, it creates a node_modules directory. how can i get it to install node-inspector in my path?
[08:35] v_y: i'm following the instructions here: https://github.com/dannycoates/node-inspector#readme
[08:36] jslatts: v_y: install it globally, and add teh global location to your path
[08:37] v_y: how do i install it globally?
[08:37] galaxywatcher has joined the channel
[08:37] chapel: npm install node-inspector -g
[08:37] jslatts: yep
[08:37] jslatts: night all
[08:38] v_y: aah
[08:38] v_y: night
[08:38] v_y: thanks
[08:38] mplabs: yeah! I just found this post: http://www.theroamingcoder.com/node/111, I had the same problem! there are many "wrong" tutorials out there
[08:39] mplabs: at least here I have to send both headers to actually send the post data, otherwise it's ignored
[08:40] d0k has joined the channel
[08:40] mplabs: I think it should be in the documentation I couldn't find it there :|
[08:40] captain_morgan has joined the channel
[08:41] koo6 has joined the channel
[08:42] FND has joined the channel
[08:42] yumike has joined the channel
[08:44] MattJ has joined the channel
[08:46] chapel: eh, that is not so much a node problem
[08:46] chapel: its an http thing
[08:46] chapel: also, content-length isn't always needed, depends on the server
[08:47] JoshC1 has joined the channel
[08:48] mplabs: it's strange there're so many code examples without them, I thing it should work anyway, maybe I'm missing something
[08:48] mplabs: think*
[08:49] TomY has joined the channel
[08:49] mplabs: ...it's working now just with Content-Type
[08:51] FND: I'm having trouble packaging JSLint Reporter for NPM: after creating package.json and running `npm link`, `require("jslint-reporter")` fails as the module can't be found - any advice?
[08:52] kbni has joined the channel
[08:53] FND: package.json is here: https://github.com/FND/jslint-reporter/commit/b5c797f8d2f815a0dd0c877ecbda9fbfefb87fd6
[08:55] pplante has joined the channel
[08:57] Casperin has left the channel
[08:59] abraham has joined the channel
[09:03] ardcore has joined the channel
[09:03] ardcore has left the channel
[09:04] liam has joined the channel
[09:05] saschagehlich has joined the channel
[09:06] Emmanuel has joined the channel
[09:07] kbni has joined the channel
[09:07] selt has joined the channel
[09:08] selt: not much of a question or anything, but node.js is great. working on some mini project with it, quite fun.
[09:09] selt: preaching to the choir, i guess, though.
[09:09] galaxywatcher has joined the channel
[09:09] galaxywatcher has joined the channel
[09:10] jbpros has joined the channel
[09:14] koo7 has joined the channel
[09:14] Gurpartap: can you write a bit of coffeescript in js files?
[09:15] aliem has joined the channel
[09:18] stephank has joined the channel
[09:19] adnam: Gurpartap: i'm not that familiar with coffeescript, but i would guess that you would have to write a preprocessor
[09:19] Gurpartap: ah hmm
[09:20] adnam: but why do you want to? Seems like it could get messy to mix the two
[09:23] kbni has joined the channel
[09:23] skm has joined the channel
[09:24] nivoc has joined the channel
[09:25] Xano has joined the channel
[09:27] jaket has joined the channel
[09:32] JoshC1 has joined the channel
[09:32] thalll has joined the channel
[09:34] dragunov11 has joined the channel
[09:34] stisti has joined the channel
[09:35] dragunov11: how do i see the contents of an object in the console.log ?
[09:36] chjj: console.log(obj)
[09:36] paulmdx has joined the channel
[09:36] kbni has joined the channel
[09:36] dragunov11: chjj: its giving an output of [object Object]
[09:39] dragunov11: somehow it seems to work for other objects, not the one am expecting. thanks
[09:39] hybsch has joined the channel
[09:43] madsleejensen has left the channel
[09:43] Katibe has joined the channel
[09:47] adrianmg has joined the channel
[09:48] quijote has joined the channel
[09:50] niftylettuce has joined the channel
[09:50] herbySk has joined the channel
[09:52] adnam: dragunov11: perhaps it's already been converted to a string, what's typeof obj?
[09:53] kbni has joined the channel
[09:53] adambeynon has joined the channel
[09:54] selt has left the channel
[09:59] kUrld has joined the channel
[10:03] kbni has joined the channel
[10:04] junkee[] has joined the channel
[10:07] galaxywatcher has joined the channel
[10:08] markwubben has joined the channel
[10:09] koo6 has joined the channel
[10:12] jbpros has joined the channel
[10:13] ExsysTech has joined the channel
[10:14] aliem has joined the channel
[10:16] jacter1 has joined the channel
[10:17] Yoric has joined the channel
[10:18] tojochacko has joined the channel
[10:19] xsyn: Is there a mimedetect module ?
[10:19] Yoric has left the channel
[10:23] junkee[]: http://search.npmjs.org/#/mime
[10:24] xsyn: rtfm'd
[10:24] xsyn: thanks
[10:25] xsyn: perfect
[10:25] junkee[]: but it just is a map of mime types and file extensions
[10:27] junkee[]: I just lost my space-bar :s
[10:27] Bonuspunkt: spaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaace
[10:27] chapel: Space is that you?
[10:29] FireFly|n900: space? space!
[10:29] eldar has joined the channel
[10:29] chapel: Space is the new cake :)
[10:31] xsyn: It's perfect, I just need to get the mimetype so as to attach to couch
[10:32] daglees has joined the channel
[10:34] chapel: you want to use the mimetypes in couchdb?
[10:36] xsyn: If I'm adding an image as an attachment to a document
[10:36] xsyn: I need the mime/type
[10:36] xsyn: so yeah
[10:37] chapel: yeah
[10:37] chapel: did you know couchdb supports commonjs modules?
[10:38] xsyn: In what way?
[10:38] chapel: in a lot of different ways
[10:38] xsyn: I'm not sure I'm using couch properly
[10:38] xsyn: I'm just runnning my node.app and then pushing/pulling
[10:39] xsyn: via cradle
[10:39] [[zzz]] has joined the channel
[10:40] junkee[]: mööp, my space-bar is working again. My soldering iron and some plastic made the job.
[10:43] adambeynon has joined the channel
[10:47] DarkLinkXXXX has joined the channel
[10:47] rputikar has joined the channel
[10:47] DarkLinkXXXX: Hello
[10:47] DarkLinkXXXX: Anyone here?
[10:49] liquidproof has joined the channel
[10:51] DarkLinkXXXX has joined the channel
[10:51] stagas_ has joined the channel
[10:51] JoshC1 has joined the channel
[10:51] DarkLinkXXXX: I have a dumb question
[10:52] zeunix: DarkLinkXXXX: you don't need to ask if anyone's here. There usually is several, even this late. Just ask the question straight out and if anyone knows an answer they'll chime in. If you get no responses it's more likely that no one who's online has an answer then wait until a more active time and ask again. :)
[10:54] junkee[]: late? its time for lunch here...
[10:54] zeunix: touché. I guess I was generalizing because most of the people on here are from the states.
[10:54] DarkLinkXXXX: ACTION is submitting code to pastebin
[10:55] stagas has joined the channel
[10:55] zeunix: junkee[]: and when I say "most" I'm just referring to my observation of course, not a real statistic :)
[10:55] DarkLinkXXXX: https://gist.github.com/997647
[10:56] [[zz]] has joined the channel
[10:57] devrim has joined the channel
[10:57] DarkLinkXXXX: Here, I use the express framework to show the files own source code, via res.download
[10:57] DarkLinkXXXX: The problem is, it shows up via attachment, and not in-browser text
[10:58] DarkLinkXXXX: Does anyone have a solution for this?
[10:58] junkee[]: is res.download handling the mime type? just try to set the mime-type to text/javascript
[10:59] DarkLinkXXXX: ACTION looks at documentation
[11:00] migimunz has joined the channel
[11:00] stagas_ has joined the channel
[11:01] DarkLinkXXXX: res.header sounds like it could do something
[11:01] crodas has joined the channel
[11:01] FireFly|n900: junkee[], if you want actual statistics there's always the node users list on the repository wiki :P
[11:01] DarkLinkXXXX: what is the raw tcp response for a plain text file?
[11:02] stagas__ has joined the channel
[11:02] igl1: text/plain
[11:02] igl1: <:
[11:02] torgeir_ has joined the channel
[11:02] zeunix: DarkLinkXXXX: agreed. I can't imagine the issue is anything but mime-type. How your browser handles the particular mime is another story. May want to text/plain
[11:02] zeunix: ah someone beat me to it
[11:03] cm: How do I restart a script from within the script itself?
[11:05] zeunix: cm: AFAIK the best solution is to spawn the same script as a child then have the parent commit suicide
[11:05] cm: okay, and how would I do that? :/
[11:06] junkee[]: FireFly|n900: The UTC+1(+2) list is not that small. (https://github.com/joyent/node/wiki/Node-Users)
[11:06] stride: DarkLinkXXXX: check if a content-disposition header is set
[11:06] mbrochh]2 has joined the channel
[11:06] stride: and if it is, setting it to "inline" should help iirc
[11:08] tdegrunt has joined the channel
[11:08] zeunix: cm: have a look at the supervisor module. may or may not be what you're trying to accomplish. At the very least it's a real world example of using spawn. https://github.com/isaacs/node-supervisor/blob/master/lib/supervisor.js
[11:08] chjj: why is it that every dom library sucks except for prototype?
[11:08] zeunix: cm: otherwise take a look at the node docs section for spawn
[11:08] igl1: cm: child_process.exec(), process.exit()
[11:08] cm: thanks
[11:09] cm: Could I just use supervise, and kill the process and get it to restart it for me?
[11:09] cm: supervisor*
[11:11] zeunix: cm: well what are you really trying to accomplish? :) why does the script need to restart rather then just being inside a function that you call multiple times?
[11:12] cm: It's an IRC bot, and I want to give it the ability to restart
[11:12] cm: not sure what for yet, though XD
[11:12] cm: Code changes and stuff, I guess
[11:12] cm: But just using supervisor for that wouldn't quit the IRC properly
[11:12] chapel: lol
[11:12] chapel: cm http://github.com/chapel/kohai
[11:13] stride: simply use upstart or similar and process.exit when you get the reply to your quit request
[11:13] chapel: if you check lib/kohai.js you can see how I used forever to handle restarting plugin processes
[11:13] cm: chapel: Mine is better :P
[11:13] cm: Oh I see
[11:13] chapel: I doubt that
[11:13] chapel: but feel free to think so
[11:13] chapel: :D
[11:13] zeunix: cm: if it's better, why can't it restart itself ;)
[11:14] cm: humphh :(
[11:14] FireFly|n900: Whoo, I've also rolled my own node IRC bot
[11:14] FireFly|n900: spawn more bots
[11:14] igl1: why would it want to restart?
[11:14] stride: reminds me of the times when irc bots where the hello world of new hip languages, nowadays that's twitter clients.. meh
[11:15] cm: bugs resulting in infinate loops?
[11:15] cm: I found one of them earlier :D
[11:15] stride: s/where/were/
[11:15] FireFly|n900: automagic fetching of new revisions and recompiling/restarting for one thing
[11:15] hever has joined the channel
[11:15] chapel: hmm stride did you do a perl replace?
[11:15] chapel: anyways cm, use forever
[11:16] Country has joined the channel
[11:16] igl1: fighting recursion with recursion?
[11:16] FireFly|n900: I'd do a shell script wrapper and have a special exit code for 'restart'
[11:16] FireFly|n900: as to avoid accidentally restarting the bot when it should quit
[11:17] chapel: forever is smart
[11:17] chapel: use it
[11:17] chapel: can use it programmatically
[11:17] chapel: dont have to use the cli
[11:18] stride: is there a real plugin system already? which doesn't need to restart the main process when a module changes?
[11:18] chapel: stride: check my link
[11:18] chapel: I just built on
[11:18] chapel: one
[11:18] chapel: :)
[11:19] stride: which one? I only see the kohai link
[11:19] chapel: yeah
[11:19] chapel: that
[11:19] akshatj has joined the channel
[11:19] stride: oh, okay :)
[11:20] zeunix: stride: like https://github.com/kriszyp/nodules ? or?
[11:20] stride: I built one months ago that uses rabbitmq to communicate with plugin processes, which just felt wrong
[11:20] brownies has joined the channel
[11:20] chapel: dnode baby
[11:20] chapel: works great
[11:20] zeunix: or are we still talking ircbots ?
[11:20] ezl has joined the channel
[11:21] stride: the commmunication part didn't bother me, rabbitmq was nice for that. it's the spawning of other processes that I didn't like
[11:21] mbrochh has joined the channel
[11:22] DarkLinkXXXX: https://gist.github.com/997647
[11:22] stride: zeunix: my use wasn't for irc bots but that nodules thing looks quite nice
[11:22] DarkLinkXXXX: I'm having some problems
[11:22] FireFly|n900: btw, is there any *good* way to do error handling with async callbacks? try { async_func(function() {accidentalError()}) } catch (err) { handleErr(err)} // won't catch the error, obviously
[11:22] DarkLinkXXXX: I document them in the code,
[11:22] FireFly|n900: and having one try-catch for each nested function seems messy..
[11:23] davidbanham has joined the channel
[11:23] stride: FireFly|n900: try & catch inside your async_func and provide an error argument to the callback in case some error occured + process.on('uncaughtException' to prevent accidents
[11:23] stride: FireFly|n900: also, slap the developer that makes async stuff throw in the first place
[11:23] FireFly|n900: stride, what I mean is if my callback accidentally throws an error
[11:23] FireFly|n900: for one reason or another
[11:24] zeunix: DarkLinkXXXX: just a quick glance..but you're doing http.response.setHeader() when it should be res.setHeader()
[11:24] stride: don't see why it would really
[11:24] stagas has joined the channel
[11:24] FireFly|n900: Hrm
[11:24] maushu has joined the channel
[11:25] stride: zeunix: doesn't he simply send the wrong content-disposition header with express's .download to view it in the browser?
[11:26] stride: FireFly|n900: as for the unexpected part, the uncaughtException handler of process is there to clean your code. if it's unexpected, chances are that you can't recover the current control flow anyway so you might just as well handle it in there
[11:27] viz has joined the channel
[11:27] zeunix: stride: well he just left, but I'm not sure why he's using res.download() if he doesn't want the user to download it as an attachment. I think he just wants it displayed as plain text in the browser?
[11:28] stride: yeah, that's what I understood as well
[11:30] zeunix: stride: yea just tested it, he needs to use just plain old .sendfile() and it works like a charm
[11:30] zeunix: stride: if he comes back, pass that along to him, woulda?
[11:31] zeunix: s/woulda/would ya
[11:31] FireFly|n900: stride, hm, I suppose I'll do something in uncaughtException
[11:31] zeunix: using expresses download() intentionally sends it as an attachment for obvious reasons
[11:34] adambeynon has joined the channel
[11:35] stagas has joined the channel
[11:37] Charuru has joined the channel
[11:40] fairwinds has joined the channel
[11:44] viz: i'm a bit confused about server-side routes (express) and client-side routes (backbone.js). are there advantages in doing one over the other? what are their different purposes? as far as i know, you can do all your routes (get/post/etc) with either, right?
[11:45] skm has joined the channel
[11:45] JoshC1 has joined the channel
[11:48] jbpros has joined the channel
[11:49] s1985 has joined the channel
[11:49] jacter has joined the channel
[11:50] desdur has joined the channel
[11:51] s1985 has left the channel
[11:52] desdur: on my dev machine node.js spawn a lot of 'node' processes that eat 100% of cpu, what might be the problem?
[11:54] Wizek has joined the channel
[11:55] mraleph has joined the channel
[11:56] stagas has joined the channel
[12:04] rputikar has joined the channel
[12:05] openpercept1 has joined the channel
[12:11] eb4890 has joined the channel
[12:12] `3rdEden: desdur how about stop spawning node processes?
[12:13] `3rdEden: Try to make your process run stable before you even consider running more processes
[12:14] cloudhea1_ has joined the channel
[12:14] cloudhead has joined the channel
[12:15] fairwinds has joined the channel
[12:15] unomi has joined the channel
[12:21] cloudhea1 has joined the channel
[12:21] Vertice_ has joined the channel
[12:23] cloudhead_ has joined the channel
[12:23] kriszyp has joined the channel
[12:24] adambeynon has joined the channel
[12:26] cloudhead has joined the channel
[12:29] liar has joined the channel
[12:31] `3rdEden: Any node core ninja's alive here?
[12:32] asabil has joined the channel
[12:33] madsleejensen has joined the channel
[12:34] yhahn has joined the channel
[12:35] ardcore has joined the channel
[12:37] temp01 has joined the channel
[12:38] drudge: https://www.youtube.com/watch?v=Vw4KVoEVcr0&feature=player_embedded
[12:38] hellp has joined the channel
[12:39] ardcore has left the channel
[12:41] OSInet has joined the channel
[12:41] radicality has joined the channel
[12:44] nexxy has joined the channel
[12:44] nexxy has joined the channel
[12:45] FireFly has joined the channel
[12:45] m00p has joined the channel
[12:48] bpierre has joined the channel
[12:49] Bj_o_rn has joined the channel
[12:51] koo7 has joined the channel
[12:54] jxck has joined the channel
[12:55] dmojoryder has joined the channel
[12:55] daglees has joined the channel
[13:00] unomi has joined the channel
[13:10] markwubben has joined the channel
[13:14] adambeynon has joined the channel
[13:17] JoshC1 has joined the channel
[13:18] ack has joined the channel
[13:19] eee_mk has joined the channel
[13:22] unomi has joined the channel
[13:22] Casperin has joined the channel
[13:22] mike5w3c has joined the channel
[13:23] aliem has joined the channel
[13:26] Casperin: Using Express, can I access a variable set in app.js in a file that is "imported" with require()?
[13:26] frodenius: not unless it is global
[13:26] `3rdEden: Casperin sure you can just export a function, call it after you required it and feed it your app
[13:26] `3rdEden: require('./yourmodule').init(app)
[13:27] `3rdEden: where `init` is the function that you esported..
[13:27] `3rdEden: exported*
[13:27] trotter has joined the channel
[13:28] Casperin: I see
[13:28] Bradleymeck has joined the channel
[13:28] Casperin: I'm a bit out of my league here, so I'll have to experiment a bit.. but it sounds easy enough
[13:30] Casperin: so I guess that'll work for a variable set in another external file too
[13:32] fmeyer has joined the channel
[13:33] jacter1 has joined the channel
[13:34] jacter1 has joined the channel
[13:37] fairwinds has joined the channel
[13:42] unomi has joined the channel
[13:47] fmeyer has joined the channel
[13:47] stagas has joined the channel
[13:50] nexxy: esport!
[13:50] nexxy: ACTION esports `3rdEden's modules
[13:55] jacter has joined the channel
[13:56] aliem has joined the channel
[13:58] stagas has joined the channel
[13:59] rfay has joined the channel
[14:02] torgeir__ has joined the channel
[14:04] torgeir__ has joined the channel
[14:05] vitez has joined the channel
[14:06] adambeynon has joined the channel
[14:08] nu- has joined the channel
[14:13] dan_manges has joined the channel
[14:15] fork_you has joined the channel
[14:17] dan_manges: what's the best practice for dependencies in npm packages? should i bundle them with my package in the node_modules directory, or declare them in the package.json file?
[14:17] hunterloftis has joined the channel
[14:17] fork_you has left the channel
[14:18] frodenius: dan_manges㇀ package.json
[14:20] beriberikix has joined the channel
[14:20] dan_manges: frodenius: thanks. just wondering: why not embed them in the node_modules directory?
[14:21] frodenius: that's what every developer should decide
[14:21] frodenius: maybe they share the modules in /usr/lib/...
[14:23] eyesUnclouded has joined the channel
[14:29] neoesque has joined the channel
[14:29] methym has joined the channel
[14:34] thalll has joined the channel
[14:35] unomi has joined the channel
[14:35] dust-- has joined the channel
[14:36] asabil has joined the channel
[14:40] akshatj_ has joined the channel
[14:42] mparodi has joined the channel
[14:42] mparodi: Hello
[14:46] akshatj_: http://www.google.com/trends?q=node.js%2C+Jaxer%2C+ringojs&ctab=0&geo=all&date=all&sort=3
[14:46] akshatj_: pwnage!
[14:46] __sorin__ has joined the channel
[14:46] `3rdEden: lol @ russian federation
[14:47] Corren has joined the channel
[14:48] `3rdEden: Oh, us dutch people are ranked 9 on the languge list for Node.js. ;D Appsterdam == new Silicon Valley
[14:48] Emmanuel has joined the channel
[14:48] rfay has joined the channel
[14:49] viz_ has joined the channel
[14:50] Corren has joined the channel
[14:51] charlieistheman has joined the channel
[14:52] `3rdEden: it's interesting to see the difference in writing node.js or nodejs: http://www.google.com/trends?q=nodejs%2C+node.js&ctab=0&geo=all&date=all&sort=0
[14:54] `3rdEden: Or that node.js actually beats erlang.. http://www.google.com/trends?q=erlang%2C+node.js&ctab=0&geo=all&date=all&sort=0
[14:54] chjj: node.js: 34 million results, nodejs: 446k
[14:55] leandrosansilva has joined the channel
[14:56] chjj: oh man
[14:56] chjj: i just saw that ibm article in the google search
[14:56] chjj: "The initial published version of this article generated a lot of conversation from the community about various points it presented. The author has since revised this article with these ideas in mind. This kind of peer review and discussion is a vital part of the open-source world. Thanks to those who provided constructive input.
[14:56] chjj: Like all open-source projects, Node.js will continue to evolve and developers will discover new resources and techniques to overcome any number of limitations. As always, we encourage our readers to try a technology out for themselves."
[14:56] niles|iPod has joined the channel
[14:56] markwubben has joined the channel
[14:57] TomY has joined the channel
[14:58] mynyml has joined the channel
[14:58] tayy has joined the channel
[14:58] akshatj_: `3rdEden, erlang is too much to handle for people like me
[14:59] mraleph: `3rdEden: bullshit beats erlang as well in search trends. but nobody is uses bullshit to write servers.
[14:59] dmojoryder has joined the channel
[15:00] Gargron has joined the channel
[15:00] akshatj_: mraleph, clearly, you have never seen Java
[15:00] akshatj_: ;)
[15:01] Gargron: hello! excuse me, I need a little help with nodejs installation
[15:01] akshatj_: Gargron, which Distro?
[15:01] charlieistheman: and what kind of trouble are you having?
[15:01] zmbmartin: anyone use forever? how can I user NODE_ENV with forever --> forever start NODE_ENV=production app.js fails
[15:02] Gargron: ubuntu 10.04 lucid; I did install it quite properly, I can run stuff with /opt/node/node test.js etc, but, I can't run it with just 'node test.js'. also, I can't seem to find the npm executable although I installed it as well
[15:02] tojochacko has joined the channel
[15:02] AvianFlu: Gargron: you need to export your path
[15:02] Gargron: how do I do that? more importantly, I think I already did that but does it get reset on each re-login?
[15:03] Gargron: ideally I would need to run nodejs as daemon
[15:03] AvianFlu: a temporary fix is to say `export PATH=$PATH:$HOME/path/to/node/bin/folder
[15:03] AvianFlu: the permanent fix is to put that line in your ~/.bashrc file
[15:04] Gargron: okay, give me a sec
[15:04] AvianFlu: the $HOME part is cause mine got installed under my home folder, obviously whatever path goes there
[15:04] abraham has joined the channel
[15:05] AvianFlu: zmbmartin: you're using a $, right? like $NODE_ENV?
[15:05] junkee[] has joined the channel
[15:05] Gargron: hmm
[15:05] Gargron: so I put "export PATH=$PATH:/opt/node/node " into .bashrc
[15:05] Gargron: it still doesn't work
[15:05] Gargron: oh wait
[15:05] fmeyer has joined the channel
[15:05] Gargron: maybe i don't need the last node
[15:06] AvianFlu: it's usually node/bin
[15:06] AvianFlu: or node/local/bin
[15:06] AvianFlu: the bin folder is what you need to reference
[15:06] zmbmartin: AvianFlu: yes
[15:06] AvianFlu: just had to make sure, lol
[15:07] Gargron: :(
[15:07] Gargron: i don't seem to have node/local or bin or anything in the node folder
[15:07] Gargron: anything like that i mean
[15:07] Gargron: so weird
[15:07] level09 has joined the channel
[15:07] AvianFlu: so what's there
[15:07] AvianFlu: if you installed node you've got a bin folder someplace with node in it
[15:08] Gargron: http://gyazo.com/c5423f9260aa1da730d4a5330af386fc.png this is what is in /opt/node
[15:08] level09: i'm able to start the server, but curl localhost:port is not returning any result
[15:08] level09: what should I check ?
[15:11] AvianFlu: did you run configure Gargron?
[15:12] Gargron: maybe i didn't. would i still be able to execute that one node if i didn't configure?
[15:14] mraleph: akshatj_: Java is not that bad. not fancy pancy but still fine
[15:15] AvianFlu: cause that folder to me looks like you need to do `./configure`, `make`, `make install`
[15:15] AvianFlu: Gargron: those three commands I mentioned compile node
[15:15] AvianFlu: so... there's nothing to run before you do
[15:16] Gargron: hmm, but i could execute it before, so it's strange. maybe i didn't configure and make install, and just make. well anyways, now i run all three of them, and it seems to work. now to the npm problem
[15:16] mparodi: level09, what're you using to start the server?
[15:16] AvianFlu: npm tends to just work based on your node path
[15:17] aho has joined the channel
[15:18] Gargron: okay
[15:19] Gargron: now how do i make node run like a daemon?
[15:19] mparodi: someone told me yesterday it's possible to reload the server using the cluster module, I just red its documentation and I didn't found anything like that. any comment in that matter will be appreciated!
[15:19] mparodi: Gargron, what do you want to do?
[15:19] mparodi: read*
[15:20] Gargron: i run nginx for the main site, and i need node to run as well for socket.io
[15:20] tobiassjosten has joined the channel
[15:21] nexxy has joined the channel
[15:22] level09: mparodi: i got it , it was my fault
[15:22] level09: thanks
[15:23] gtramont1na has joined the channel
[15:23] AvianFlu: leaving node in an accessible path should make it available for everything you need
[15:23] mparodi: done! cluster doesn't reload anything by itself, you have to ask it to use the reload plugin, it works pretty well :)
[15:23] AvianFlu: node isn't the daemon, but you can make a daemon that runs on node
[15:28] markstory has joined the channel
[15:30] tshpaper has joined the channel
[15:32] fille12 has joined the channel
[15:32] brimster has joined the channel
[15:32] fille12: did u read the emilmont post on twitter?
[15:33] Spion has joined the channel
[15:36] Spion_ has joined the channel
[15:36] dragunov11 has left the channel
[15:37] seivan has joined the channel
[15:41] seivan: Has anyone used Amazon load balancer with Node for sockets?
[15:42] mparodi: fille12, url?
[15:43] crutex has joined the channel
[15:44] crutex: can you imagine a situation where you'd use redis AND mongodb?
[15:44] trotter has joined the channel
[15:47] derencius has joined the channel
[15:47] adambeynon has joined the channel
[15:47] xandrews has joined the channel
[15:48] johnnywengluu: anyone here has used fil() in jake?
[15:48] johnnywengluu: https://github.com/mde/jake/issues/38
[15:50] akshatj has joined the channel
[15:55] c4milo1 has joined the channel
[15:55] TomY has joined the channel
[15:57] mandric has joined the channel
[15:58] ewdafa has joined the channel
[15:58] seivan: crutex: Geospatial indexing
[15:58] seivan: crutex: Mongo does that REALLY good.
[15:59] trotter has joined the channel
[16:01] aliem has joined the channel
[16:05] pifantastic has joined the channel
[16:07] hever has joined the channel
[16:07] ezl has joined the channel
[16:07] fille12: mparodi http://blog.nelsonsilva.eu/2010/12/14/go-vs-scala-vs-nodejs
[16:07] dmojoryder has joined the channel
[16:07] fille12: bullshit man...
[16:08] markwubben has joined the channel
[16:09] mparodi: ACTION would like to have a require_withtout_cache('myModule.js')
[16:09] fille12: ops its so old
[16:09] fille12: dident se that
[16:10] d0k has joined the channel
[16:11] fille12: see
[16:13] c4milo1 has joined the channel
[16:13] cognominal has joined the channel
[16:13] xsyn has joined the channel
[16:14] lemma_ has joined the channel
[16:14] OSInet has left the channel
[16:15] Corren has joined the channel
[16:15] derencius has joined the channel
[16:17] fille12: is there a less module for node.js?
[16:17] mustalac has joined the channel
[16:19] tim_smart has joined the channel
[16:21] jtrudeau has joined the channel
[16:22] Swimming_bird has joined the channel
[16:22] crutex has left the channel
[16:22] eee_mk has joined the channel
[16:22] itissid has joined the channel
[16:23] c4milo1 has joined the channel
[16:24] stagas_ has joined the channel
[16:25] boaz has joined the channel
[16:27] MooGoo: less?
[16:27] stagas has joined the channel
[16:29] piscisaureus has joined the channel
[16:30] Rodtusker has joined the channel
[16:32] ack: fille12, yes. npm install less.
[16:32] ack: MooGoo, http://lesscss.org/
[16:32] MooGoo: oh
[16:32] MooGoo: thought you were talking about the unix program
[16:34] harth has joined the channel
[16:36] fille12: whats problem with everyone only me thats need docs? here
[16:37] c4milo1 has joined the channel
[16:37] Renegade001 has joined the channel
[16:39] cloudhea1_ has joined the channel
[16:40] cloudhea1 has joined the channel
[16:40] adambeynon has joined the channel
[16:40] bingomanatee has joined the channel
[16:40] fille12: time to convert a wordpress blogg to node.js then
[16:40] fille12: or why not go for the drupal
[16:41] c4milo1 has joined the channel
[16:44] pita has joined the channel
[16:44] pita: fs.mkdir(path, mode, [callback])
[16:44] pita: anyone know what mode means?
[16:45] mparodi: does anyone know if it's possible to know if the current process was .spawn()ed?
[16:45] MooGoo: isnt that chmod
[16:46] gilesgoatboy has joined the channel
[16:46] pita: MooGoo: means a valid value would be: "644" ?
[16:46] pita: lets try
[16:47] MooGoo: perhaps
[16:47] MooGoo: cant think of anything else
[16:47] mparodi: 4 is not a valid value
[16:47] mparodi: is it?
[16:47] mparodi: try 755
[16:47] pita: mparodi++
[16:47] v8bot: pita has given a beer to mparodi. mparodi now has 1 beers.
[16:47] pita: MooGoo++
[16:48] v8bot: pita has given a beer to MooGoo. MooGoo now has 3 beers.
[16:48] mparodi: I don't drink lol
[16:48] MooGoo: give me ur beer
[16:48] rfay has joined the channel
[16:48] brianseeders has joined the channel
[16:48] jvduf has joined the channel
[16:49] timmywil has joined the channel
[16:49] mparodi: never mind, of course 4 is valid, 2^2 :P
[16:49] mparodi: ACTION gives MooGoo a glass of water
[16:50] jvduf has joined the channel
[16:50] Yoric has joined the channel
[16:51] adambeynon has joined the channel
[16:52] Yoric has left the channel
[16:53] arpegius has joined the channel
[16:55] fille12: jade is really cool
[16:55] fille12: :D
[16:55] Adman65 has joined the channel
[16:56] niles|iPod has joined the channel
[16:56] pita: "755" works, but you have to write as a string, not as a number
[16:56] c4milo1 has joined the channel
[16:56] __sorin__ has joined the channel
[16:57] omni5cience has left the channel
[16:57] chjj: node.js broke 7k watchers on github
[16:57] chjj: might pass up jquery finally
[16:57] mparodi: so you don't know if it's possible to realize if the current process was .spawn()ed?
[16:58] remysharp has joined the channel
[17:00] c4milo1 has joined the channel
[17:00] langworthy has joined the channel
[17:00] lluad has joined the channel
[17:01] tmpvar has joined the channel
[17:01] itissid has joined the channel
[17:01] mscdex: mparodi: no fool-proof method that i know of
[17:02] herbySk has joined the channel
[17:02] McMAGIC--Copy has joined the channel
[17:02] jakehow has joined the channel
[17:03] ako has joined the channel
[17:03] mparodi: it would be useful. you would be able to run an application, spawn() a child using the same code and addListener() on exit in case the child crashes to spawn it again
[17:03] mparodi: there're other ways, of course
[17:04] tmpvar: stagas, yo
[17:04] akshatj_ has joined the channel
[17:04] stagas: tmpvar: hey
[17:04] tmpvar: looking at maga now
[17:05] stagas: tmpvar: cool!
[17:05] frewsxcv: which is the best module for couchdb with node?
[17:05] adnam: frewsxcv: kiokujs is awesoome
[17:06] tmpvar: stagas, you could probably benefit from client side interpolation (re: circles.html)
[17:06] frewsxcv2 has joined the channel
[17:06] c4milo1 has joined the channel
[17:06] gazumps has joined the channel
[17:07] stagas: tmpvar: yeah a lot of stuff are unfinished / broken, was hoping you have some ideas :)
[17:07] frewsxcv2: adnam: which one is hat?
[17:07] frewsxcv2: *that
[17:08] tmpvar: stagas, so motion is an attempt to move away from providing a scene graph (because everyone does that differently)
[17:09] adnam: frewsxcv2: kiokujs-backend-couchdb in npm
[17:09] tmpvar: stagas, which means I can't provide the methods to apply/revert patches to the scene -- which makes interpolation "up to the user"
[17:10] adnam: frewsxcv2: also see http://joose.it/blog/2011/01/13/introducing-kiokujs/
[17:10] dkords has joined the channel
[17:10] itissid: I am making a toy twitter app and in my express code I am looking if the user is Oauthed and if not I am going to a different router to initiate an Oauth. I cant use next but how do I do it. req.redirect(...) seems to be having a problem where in it executes the body of code below the res.redirect(...) statement
[17:10] tmpvar: stagas, since you have baked in game objects you should be able to do this pretty easily. You just need to stay away from immediately merging the values from the server into your scene (do it over time, etc)
[17:11] antics has joined the channel
[17:11] adnam: itissid: return; afterwards
[17:11] ibrahimal-rajhi has joined the channel
[17:12] pita: is there a way to find out if a path is a file or a folder?
[17:12] itissid: adnam, Yeah even with that it seems not to go into the Oauth flow. Where as if I call my Oauth route from my browser localhost/do_oauth it works..
[17:12] zemanel has joined the channel
[17:12] adnam: pita: fs.lstat(path).isDirectory()
[17:13] pita: adnam++
[17:13] v8bot: pita has given a beer to adnam. adnam now has 1 beers.
[17:13] adnam: lstatSync*
[17:13] itissid: adnam, The do_oauth is called by the redirect but the controller does not do what it is suposed to..
[17:13] itissid: And there are no errors
[17:14] Bradleymeck has joined the channel
[17:14] c4milo1 has joined the channel
[17:14] adnam: itissid: what do you mean by that?
[17:15] stagas: tmpvar: right now I'm merging and advancing until it reaches this user's frame number
[17:16] itissid: adnam, So in my do_oath there is the first leg of my oauth which again redirects me to the twitter login page. Even though I can initiate this flow from my browser by doing a localhost/do_oath. From inside express when I do a res.redirect('/do_oauth') It calls the do_oath but it does not go onto twitter..
[17:17] `3rdEden: Pff debugging different benchmarks is a pain in the arse
[17:17] stagas: tmpvar: and syncing only on every input change
[17:18] adnam: itissid: so the redirect succeeds, and the correct handler gets the request?
[17:18] tmpvar: stagas, i see
[17:18] itissid: adnam, yeah... One sec there might be a problem. Its not possible to redirect after an AJAX call right?
[17:18] itissid: That may be the issue here..
[17:19] c4milo1 has joined the channel
[17:19] adnam: well, not on the server side
[17:19] xandrews has joined the channel
[17:20] itissid: adnam, so I made an ajax call to my express controller there is no way my browser can know of a redirect that may happen that controller evne though it gets called on the srver..
[17:21] adnam: you can trigger a redirect from the client instead
[17:21] yhahn has joined the channel
[17:22] stagas: tmpvar: it's decent for ease-in motions, but linear motions are flickering they are rapid
[17:22] stagas: if they
[17:22] itissid: adnam, I guess... tahnks a lot... bouncing off ideas helped..
[17:22] tmpvar: stagas, yeah, im noticing that. groking your codez
[17:23] mscdex: itissid: xhr requests should follow redirects automatically
[17:23] mscdex: although some browsers may have the option of disabling that feature
[17:23] tmpvar: sagas, what is this.game.syncTime ?
[17:24] stagas: tmpvar: interval at which .watch() and 'sync' events are fired
[17:24] tmpvar: sagas, im guessing its a push to the server?
[17:25] tmpvar: ah, you probably want to watch more frequently than the sync interval ;)
[17:25] tmpvar: and send groups of patches
[17:25] tmpvar: that way it doesnt look like stuff is jumping, because you have more samples
[17:25] stagas: tmpvar: you decide what to do, it callbacks a stringified state
[17:27] stagas: tmpvar: I could implement it, or have the user do it? what do you think? I'm not doing any transports with maga
[17:29] tmpvar: stagas, interesting
[17:29] tmpvar: stagas, you are stringify is the entire game?
[17:29] chapel: engrish ftw
[17:29] stagas: tmpvar: yeah everything is strings, you can run the same simulation server side, browser side, anyone who has access to the pub sub
[17:30] chapel: hmm, why not to blending on the client
[17:30] matjas has joined the channel
[17:30] Renegade001 has joined the channel
[17:30] chapel: idk
[17:30] chapel: ACTION shuts up
[17:30] chapel: and goes to bed
[17:30] hybsch has left the channel
[17:30] tmpvar: stagas, i just think you need to sample at a faster rate on the client, but emit to the server at your current interval
[17:31] jacter1 has joined the channel
[17:31] tmpvar: keeps you're watcher from missing critical direction changes and what not
[17:31] itissid: mscdex, Well for some reason they are not
[17:32] mscdex: itissid: which browsers?
[17:34] mykul has joined the channel
[17:35] jacobolus has joined the channel
[17:36] stagas: tmpvar: I'll try that
[17:38] jakehow has joined the channel
[17:38] mandric has joined the channel
[17:39] caolanm has joined the channel
[17:39] tmpvar: stagas, I think the ideal solution is to collect all the user input into a queue while applying it locally. On client tick, send that queue to the server to be validated/applied against the master scene
[17:39] eldar has joined the channel
[17:42] beriberikix: Is there a lib for localStorage on the server?
[17:42] tbranyen: beriberikix: yeah its called fs
[17:42] MooGoo: damn u tbranyen
[17:42] remysharp has joined the channel
[17:42] tbranyen: beriberikix: http://nodejs.org/docs/v0.4.8/api/fs.html
[17:43] tbranyen: MooGoo: :D
[17:43] admc1 has joined the channel
[17:43] adambeynon has joined the channel
[17:46] FireFly|n900 has joined the channel
[17:47] gmanika has joined the channel
[17:47] mparodi: $ node sameScript.js # spawn('node', ['sameScript.js'], { env: {child: true}, customFds: [0, 0, 0] }); if (process.env.child) { console.log('I am a child process :3 !'); }
[17:47] mparodi: isn't it great? mscdex
[17:48] mscdex: mparodi: sure, that works in that case, but not in general
[17:48] mparodi: why not?
[17:49] mscdex: mparodi: if a child process is spawned without that environment variable, then you have no way of knowing
[17:49] mparodi: of course, I wanted a way to know, and there it is
[17:50] beriberikix: tbranyen: of course you could build one on top of fs, but isn't 1:1
[17:50] mscdex: heh i know :)
[17:50] hkjels has joined the channel
[17:50] nightshift has joined the channel
[17:50] beriberikix: I know brianleroux is working on porting over lawnchair
[17:50] tbranyen: if you just want persistent key/val why not use redis
[17:50] mscdex: if you fork() then you can easily know whether you're the parent or child
[17:50] tbranyen: localStorage in itself doesn't make sense on the server
[17:50] caolanm has joined the channel
[17:51] mscdex: but that means you have to use the same script
[17:51] itissid has joined the channel
[17:51] mparodi: by the way, is there any difference between var something = require('./s'); and use something many times rather than to do require('./s') many times?
[17:51] nightshift has joined the channel
[17:51] tbranyen: mparodi: one is more readable
[17:51] fakewaffle has joined the channel
[17:52] mparodi: ok but what about the performance? maybe require() does the same internally, does it?
[17:52] tbranyen: require() every single time is a function call to a cache
[17:52] nightshift has joined the channel
[17:52] tbranyen: the other is a direct reference to the module
[17:52] itissid: tmpvar, Sorry got cut there...
[17:52] itissid: Did I miss somethin?
[17:52] fakewaffle: How do I get the full URL from express? I don't know why I'm having trouble with this... :/
[17:52] mparodi: ok, so it's the same, thank you!
[17:52] tmpvar: stagas, I think the ideal solution is to collect all the user input into a queue while applying it locally. On client tick, send that queue to the server to be validated/applied against the master scene
[17:52] tbranyen: mparodi: how is it the same... i just told you it isn't the same
[17:52] mparodi: the other is a direct reference to the module
[17:53] tbranyen: they are different not only in readability, but also in that require is a function call to a cache every single time while the assignment is a direct reference
[17:53] mparodi: then it's like to have a var called something and use it many times
[17:53] tbranyen: that doesn't sound the same to me
[17:53] mparodi: oh, I misread it, I'm sorry
[17:53] tbranyen: i'd do what everyone does and assign it and use the reference
[17:53] tbranyen: its more readable
[17:54] tbranyen: and "performant"
[17:54] mparodi: I thought "the other" was "the second time you use require to get the same module" :P
[17:54] mparodi: thanks
[17:56] cognominal has joined the channel
[17:56] bingomanatee_ has joined the channel
[17:57] adambeynon_ has joined the channel
[17:58] langworthy has joined the channel
[17:58] ChrisAnn has joined the channel
[17:59] ibrahimal-rajhi has joined the channel
[17:59] c4milo1 has joined the channel
[18:03] jbpros has joined the channel
[18:04] beriberikix_ has joined the channel
[18:04] maushu_ has joined the channel
[18:04] cognominal_ has joined the channel
[18:04] piscisaureus has joined the channel
[18:04] dpritchett` has joined the channel
[18:05] hipe_ has joined the channel
[18:05] torgeir__ has joined the channel
[18:05] monokrom1 has joined the channel
[18:05] sveimac_ has joined the channel
[18:06] drogoh_ has joined the channel
[18:06] fakewaffle: whats the best way to host multiple node apps? apache proxy?
[18:06] c4milo1 has joined the channel
[18:06] jhurlima0 has joined the channel
[18:06] Lorentz_ has joined the channel
[18:06] nail__ has joined the channel
[18:06] boogyman has joined the channel
[18:06] `3rdEden: oh
[18:06] scoates has joined the channel
[18:06] AdmGre has joined the channel
[18:06] madzak has joined the channel
[18:06] markwubben has joined the channel
[18:06] andihit has joined the channel
[18:07] joshontheweb has joined the channel
[18:07] robotblake has joined the channel
[18:07] Corren has joined the channel
[18:07] _ralph has joined the channel
[18:07] fr0stbyte has joined the channel
[18:07] s0enke has joined the channel
[18:07] bentkus has joined the channel
[18:07] riven has joined the channel
[18:07] riven has joined the channel
[18:07] drudge has joined the channel
[18:07] AndyDawson has joined the channel
[18:08] `3rdEden: fakewaffle apache defeats whole purpose of running node... you are just gonna pace it behind a threaded peice of shit
[18:09] fakewaffle: ok, so what do you suggest?
[18:10] CIA-82 has joined the channel
[18:10] bartt has joined the channel
[18:10] ai0n has joined the channel
[18:10] steevel has joined the channel
[18:10] c4milo1 has joined the channel
[18:11] Ezku\ has joined the channel
[18:11] termie has joined the channel
[18:11] TomY has joined the channel
[18:11] mscdex: fakewaffle: node!
[18:11] up_the_irons has joined the channel
[18:12] fakewaffle: mscdex: so glad i asked thanks...
[18:12] mscdex: :-D
[18:12] fakewaffle: awesome suggesting
[18:12] fakewaffle: so i type node in console and it will just work?
[18:12] mscdex: seriously, it wouldn't be that difficult....
[18:12] boehm has joined the channel
[18:13] fakewaffle: in nginx blocking?
[18:13] CiRlE has joined the channel
[18:13] fakewaffle: i have to have apache for some php shit on my server
[18:13] alindeman has joined the channel
[18:13] mscdex: then proxy to apache from node
[18:13] alindeman has joined the channel
[18:13] fakewaffle: ok
[18:14] fille12: i got it att
[18:14] fille12: proxypassreverse
[18:14] fakewaffle: brb
[18:14] mscdex: apache proxying to node = evil
[18:14] Guest62417 has joined the channel
[18:14] alindeman has joined the channel
[18:15] fille12: not recomended?
[18:15] mscdex: correct ;)
[18:15] mscdex: well, if you care about concurrency anyway :)
[18:15] fille12: :D
[18:15] fille12: not yet
[18:16] FireFly has joined the channel
[18:16] c4milo1 has joined the channel
[18:16] hkjels has joined the channel
[18:17] AvianFlu: jdub: you around? I just submitted a fairly simple pull request to node-twitter
[18:18] piscisaureus has joined the channel
[18:18] coleGillespie: link to node twitter
[18:19] AvianFlu: https://github.com/jdub/node-twitter/pull/16
[18:20] fille12: got any ide without using the apache proxypassreverse
[18:21] jslatts: anyone know of any easy, node-friendly way to watch a directory tree for changes?
[18:22] brainproxy_ has joined the channel
[18:22] AvianFlu: jslatts: http://nodejs.org/docs/v0.4.8/api/fs.html
[18:22] Wa has joined the channel
[18:22] AvianFlu: there's a watchfile in there somewhere
[18:22] AvianFlu: and also various directory things
[18:22] jslatts: AvianFlu: there is for a file, but unless i am being thick (quite possible) i can't watch a whole dir
[18:23] jslatts: this guy does it: https://github.com/iliakan/node-dev/blob/master/manager.js
[18:23] jslatts: but he uses inotify
[18:25] piscisaureus_ has joined the channel
[18:26] baudehlo: jslatts: fs.watchFile appears to work on directories.
[18:26] baudehlo: I just did "fs.watchFile('.')" and it called the callback when the dir changed.
[18:26] fille12: so is there away to skip to apache proxypassreverse
[18:26] jslatts: baudehlo: seems so
[18:27] jslatts: baudehlo: thanks, i'll give that a shot
[18:27] baudehlo: only annoying thing is it being a poll.
[18:27] baudehlo: but whatcha gonna do.
[18:27] jslatts: baudehlo: yes... wrap kqueue? :)
[18:27] baudehlo: yeah kqueue works nicely.
[18:27] jslatts has left the channel
[18:27] jslatts has joined the channel
[18:27] baudehlo: well I mean libev already wraps kqueue.
[18:28] ibrahimal-rajhi has joined the channel
[18:28] jslatts: baudehlo: thats what i had assumed, but I can't find any docs about watching a dir
[18:28] jslatts: ev_stat seems file oriented
[18:29] baudehlo: that's what I mean, is that libev doesn't wrap the ability to watch files because it's not emulatable with poll()/select()
[18:29] baudehlo: so it just takes the naive approach of a 1 second poll.
[18:29] Rodtusker has joined the channel
[18:30] jslatts: baudehlo: but if I use the native node.js version, theoretically i'll be compliant when they finally sort that out
[18:30] jslatts: baudehlo: and I can write less c++ :)
[18:30] avalanche123 has joined the channel
[18:32] Corren has joined the channel
[18:32] adambeynon has joined the channel
[18:32] nilcolor has joined the channel
[18:33] fille12: so is there away to skip the apache proxypassreverse
[18:34] mscdex: fille12: what do you mean? while still using apache in front ?
[18:34] pita: https://github.com/Pita/doc.md
[18:34] pita: A simple JSDoc documenation tool that creates markdown for node.js modules
[18:34] fille12: im using my apache on port 80
[18:34] fille12: i got a domain
[18:34] fille12: that i whant to use a domain for my node.js server
[18:35] fille12: right now
[18:35] nightshift has joined the channel
[18:35] fille12: http://www.mynodejs.com/
[18:35] leonh has joined the channel
[18:35] mscdex: fille12: if you put node in front (listening on port 80) then you can proxy any necessary requests to apache
[18:35] fille12: aaa thats cool
[18:35] mscdex: or handle them directly in node with express if you don't require php
[18:36] fille12: i know apache is a beaste
[18:37] fille12: so u mean i will change the port on my apache
[18:38] Bj_o_rn has joined the channel
[18:39] c4milo1 has joined the channel
[18:39] c4milo1 has joined the channel
[18:41] mscdex: fille12: yes
[18:41] Xano has joined the channel
[18:42] level09 has joined the channel
[18:43] fille12: just wondering is anyone here developing for yammer?
[18:43] Yuffster has joined the channel
[18:44] jacter has joined the channel
[18:45] jslatts: I would actually love a chance to ask a yammer dev a question
[18:45] ezl has joined the channel
[18:45] level09: is there any best practices or arrangements regarding security when using node.js ?
[18:45] captain_morgan has joined the channel
[18:45] level09: I'm basically using socket.io to push some breaking news
[18:45] fille12: wondering my company is using yammer.
[18:46] level09: is there any specific things must be done to secure the http server ?
[18:46] AvianFlu: level09: never trust input from a public place, ever, on any platform
[18:46] AvianFlu: sanitize it all and that will be a good start
[18:46] AvianFlu: you know, escape funny characters and stuff
[18:46] level09: AvianFlu: okay that is done, since I'm not accepting input
[18:46] level09: all is coming from the server to the client
[18:46] tauren has joined the channel
[18:47] AvianFlu: so where's the server getting the data
[18:47] level09: AvianFlu: it is watching a file
[18:47] AvianFlu: and how is the client sure the server isn't fake
[18:47] AvianFlu: those are your next two security questions
[18:47] piscisaureus_ has left the channel
[18:47] Corren: 0/
[18:47] level09: the file gets pushed from tv to the server
[18:47] AvianFlu: as long as nobody bad can change the file, that part is cool
[18:47] level09: sure
[18:47] piscisaureus_ has joined the channel
[18:47] level09: that is guranteed as well
[18:47] level09: but what about for example
[18:47] level09: flooding the server
[18:48] level09: or these kind of attacks
[18:48] level09: is that possible ?
[18:48] level09: I'm loading my script from a url like http://ip:port , should I hide the ip as well ?
[18:48] Corren: node isn't hardened like nginx or lighttpd
[18:48] tobiassjosten has joined the channel
[18:49] level09: what do u mean ?
[18:49] level09: i'm only using it to push some breaking news
[18:49] level09: not to serve any other files
[18:49] sorens3n has joined the channel
[18:49] Corren: but it's exposed on the public web?
[18:50] level09: yes
[18:50] level09: is there a way to hide it ?
[18:50] italic has joined the channel
[18:50] Corren: sure
[18:50] level09: how ?
[18:50] Corren: iptables the port node listens on from the outside world?
[18:51] Corren: and only proxy to it via a more hardened web server
[18:51] Corren: for example, nginx on port 80 proxying to node on port 3000, where node is not accessible from the public ip directly
[18:51] cloudhea1 has joined the channel
[18:51] MikhX has joined the channel
[18:51] level09: aha
[18:52] kmwallio has joined the channel
[18:52] level09: that makes sense
[18:52] gozala has joined the channel
[18:52] level09: but what could be the problem if node server is exposed ?
[18:53] fille12: im throwing out my apache server right away
[18:53] c4milo1 has joined the channel
[18:53] level09: yeah apache should be discontinued
[18:53] level09: :D
[18:54] c4milo1 has joined the channel
[18:54] c4milo2 has joined the channel
[18:55] Matias has joined the channel
[18:56] v0idless- has joined the channel
[18:56] cloudhead_ has joined the channel
[18:58] Corren: possibly no problems
[18:58] mscdex: just beware nginx has its own issues
[18:58] materialdesigner has joined the channel
[18:58] mscdex: when proxying to node
[18:58] Corren: I'm not saying node is bad
[18:58] Corren: mscdex: enumerate?
[18:59] mscdex: Corren: http 1.1 issues and draft76 websockets don't forward
[18:59] Corren: ah yes http 1.1 indeed
[18:59] Corren: I'm not doing anything fancy with 1.1 in my app
[18:59] Corren: unaware of draft76 issues
[18:59] Corren: do you have a linky
[18:59] mscdex: there may be others too, but those are the ones i'm aware of
[19:00] admc has joined the channel
[19:01] zomgbie has joined the channel
[19:01] mscdex: Corren: i don't have a link offhand, but it may have to do with draft76's handshake being weird, especially it supplying a body with the upgrade request
[19:02] mscdex: all http proxies have the same issue with that
[19:02] mscdex: thankfully later versions of the protocol do away with that nonsense
[19:02] mscdex: but most browsers still implement draft76
[19:03] piscisaureus_ has joined the channel
[19:05] asabil has joined the channel
[19:06] Corren: I'm not doing websockets either so no biggie for me ;)
[19:06] Zelest has joined the channel
[19:06] Zelest has joined the channel
[19:07] motu: is there any module for file event notifying using fanotify?
[19:07] motu: fanotify is the new replacement for inotify
[19:07] c4milo1 has joined the channel
[19:08] italic: mscdex: hey, i'm having trouble catching a NCursesException, even on process.on - any ideas?
[19:08] rictic has joined the channel
[19:09] fly-away has joined the channel
[19:10] johnnywengluu: anyone using s3 here?
[19:10] akshatj: johnnywengluu, I am
[19:10] fille12: what is s3?
[19:11] johnnywengluu: akshatj: s3 cant host node.js app right?
[19:11] ashb: s3 = simple storage service
[19:11] akshatj: johnnywengluu, no wait, I don't have access currently
[19:11] ashb: so it can't host any app in any langauge
[19:11] ashb: other than as a file you download
[19:11] rictic has joined the channel
[19:12] McMAGIC--Copy has joined the channel
[19:12] catshirt has joined the channel
[19:12] level09: can i proxy to node if I'm using apache ?
[19:12] level09: I'm not running nginx yet
[19:13] mscdex: italic: what's the exception?
[19:13] akshatj_ has joined the channel
[19:13] coleGillespie: go to rackspace, set up a linux box, wget node, ./configure, make, make install
[19:13] coleGillespie: no apache
[19:13] coleGillespie: no nginx
[19:13] coleGillespie: strait nodeJs is all your need
[19:13] mscdex: no lols
[19:13] otaku_coder has joined the channel
[19:13] italic: mscdex: NCursesException, it's given when i draw a window out of bounds
[19:14] coleGillespie: you*
[19:14] mscdex: italic: and try/catch doesn't work?
[19:14] otaku_coder: hi, does anyone know if it's possible to use express-messages with jade templates? The example in the repo only lists ejs template rendering
[19:14] italic: mscdex: doesn't seem to
[19:15] italic: mscdex: is that a c++ error?
[19:15] Matias: what is the default context of any event handler? I think it's not the context of the function that added the handler and I don't know how to change it. I believe it's not documented
[19:17] hever: I'm going to download data from a website, but the data are in an iframe and in there a js renders some data. Because simple get requests can't handle this, I'm asking myself if I could use for example firefox out of node.js to render the html and download it...
[19:17] itissid: mscdex, So it turns out i have to handle the redirect.
[19:17] itissid: Even though the header says I dont.
[19:18] itissid: I guess its intended
[19:18] coleGillespie: Matias: i am not sure i follow you, can you further explain?
[19:18] Yoric has joined the channel
[19:18] otaku_coder has joined the channel
[19:19] fille12: anyone got a goot node.js proxy example?
[19:19] c4milo1 has joined the channel
[19:20] SamuraiJack has joined the channel
[19:21] coleGillespie: fille12: http://www.catonmat.net/http-proxy-in-nodejs
[19:21] fille12: thanks
[19:21] fille12: was looking at exact same site
[19:22] coleGillespie: ^_^
[19:22] Matias: coleGillespie, the question is what is the value of "this" in a event handler, I didn't found neither how to change it nor what it has by default
[19:23] viz_ has joined the channel
[19:25] Matias: an*
[19:25] Matias: does it make sense now?
[19:25] otaku_coder: i've tried using #{messages} in a jade template but i just get the raw js echoed out
[19:25] otaku_coder: ...when using express-messages
[19:27] coleGillespie: Matias: yes, it makes sense...have you tried logging it out when you hit the server?
[19:27] rubydiam_ has joined the channel
[19:28] Matias: yes, I did but it's so big I don't know what it has
[19:29] CiRlE has joined the channel
[19:30] c4milo1 has joined the channel
[19:30] DelvarWorld1 has joined the channel
[19:32] coleGillespie: Matias: with nodeJs still being in dev all of us other developers are kind of on our own when it comes to detailed questions right now. you are just going to have to drill down into that object and try to piece it all together
[19:34] coleGillespie: then document your findings and try to get it published so others who have the same question later will be able to reference your findings
[19:34] tim_smart: Any mongoose experts around?
[19:36] Matias: I just changed the code and I realized that "this" isn't the same outside the handler than inside it, I guess there should be a way to specify what to use
[19:37] coleGillespie: is there a particular event handler you are working with currently?
[19:37] Bradleymeck has joined the channel
[19:40] jslatts: does node-inspector no longer do --start-brk=file.js?
[19:41] Matias: yes, http.request, coleGillespie
[19:41] Matias: I mean, it's not exactly an event but it defines a handler anyway
[19:42] blueadept has joined the channel
[19:42] coleGillespie: ok, and you are logging the request i am guessing
[19:43] Matias: yes
[19:43] jslatts: nm, apparently node does that for your now with node --debug-brk --debug file.js
[19:44] Matias: it does have a "this" but it's not the same context that has the function that is doing the request
[19:44] johnnywengluu: anyone here using jake?
[19:44] Matias: (it's not absolutely necessary but it would be helpful to have a way to set it)
[19:45] JakeSays has left the channel
[19:47] pita has joined the channel
[19:48] adambeynon has joined the channel
[19:48] pita: A simple JSDoc documenation tool that creates markdown for node.js modules https://github.com/Pita/doc.md
[19:50] itissid: So in express If i am to keep an in memory data across sessions, just for testing, how to do it? Just declare a global variable?
[19:51] pixel13 has joined the channel
[19:51] AvianFlu has joined the channel
[19:52] hermanjunge has joined the channel
[19:52] hermanjunge has left the channel
[19:52] hermanjunge has joined the channel
[19:52] hermanjunge: hi, are there any mac user?
[19:53] hermanjunge: I'm looking for the shell console
[19:53] hermanjunge: XD (Win user for years)
[19:54] pixel13: terminal?
[19:54] Matias: lol
[19:54] Matias: you have to put a Linux CD and reboot, it's the way lol
[19:55] pixel13: http://www.iterm2.com/ <--
[19:55] pixel13 has left the channel
[19:55] fson: hermanjunge: you can find Terminal.app under Applications/Utilities :)
[19:55] fmeyer has joined the channel
[19:55] hermanjunge: Right!
[19:56] wbw72 has joined the channel
[19:56] fson: or for the fun of it, press Cmd-Space and type 'terminal' :)
[19:56] hermanjunge: sorry to bother, but, would you recommend me some text editor? with syntax highlighting?
[19:56] bloodsucker has joined the channel
[19:56] hermanjunge: cmd-space. ... THNX!
[19:57] hermanjunge: I am NEWBIE in Mac, so, any thing you throw, I'll take
[19:57] level09: should node.js script be always run by root ?
[19:57] fson: many people use textmate, i like macvim
[19:57] hermanjunge: level09: for security, methinks is better to run nodejs as a user
[19:58] hermanjunge: so, if someone hacks your app, only the app files would be compromised, not the OS or anything
[19:58] level09: hermanjunge: I'm still looking for some guides on securing node.js apps
[19:58] level09: I will deploy a small http server to serve breaking news
[19:58] level09: and I hope it won't be that dangerous
[19:58] hermanjunge: in howtonode, they teach you somewhere how to install node being an user
[19:59] hermanjunge: level09: that'll be my two cents
[19:59] nilcolor has joined the channel
[19:59] level09: thanks !
[20:00] hermanjunge: level09: about security is not a lot yet, the security wizards haven't take an interest on doing testing on nodejs
[20:00] hermanjunge: level09: but that will be change in the following months, once some important player decides to deploy some nodejs app
[20:01] level09: hermanjunge: I hope so
[20:01] level09: so no high profile companies are using this technology yet :D ?
[20:01] hermanjunge: level09: here http://howtonode.org/introduction-to-npm I've found a good guide
[20:02] hermanjunge: level09: they advice you never install nodejs under root to aovid risks in your OS
[20:02] level09: okay thanks
[20:02] hermanjunge: level09: There some dark rumours that Y! will replace PHP with nodejs, but couldn't find the source, so I cannot confirm
[20:03] level09: what is gmail using currently as a push technology ?
[20:03] level09: I know facebook are still relying on long polling
[20:04] harth has joined the channel
[20:04] DelvarWorld1: hermanjunge: that is an old article
[20:04] DelvarWorld1: I thought npm suggests root for installs now
[20:04] mscdex: italic: not sure, i'll take a look at it
[20:04] dget has joined the channel
[20:05] hermanjunge: DelvarWorldI: The article is old, but the advice persists
[20:05] hermanjunge: level09: Don't know
[20:06] DelvarWorld1: As of version 0.3, it is recommended to run npm as root. This allows npm to change the user identifier to the nobody user prior to running any package build or test commands.
[20:06] DelvarWorld1: hermanjunge: https://github.com/isaacs/npm#readme
[20:06] DelvarWorld1: stop lying to people ;)
[20:06] level09: I think my risk is very minimal, just a small http server to push some data
[20:07] charlieistheman has joined the channel
[20:07] Matias: I installed npm today, I didn't read anything about root in its official page but in fact I couldn't install it as a normal user (it has to write in /usr) and actually I had to create a dir in /usr/lib/node_modules, it was returning an error trying to do so :|
[20:07] Matias: on its *
[20:08] DelvarWorld1: on the install page on that link above it says "sudo make install"
[20:08] stagas has left the channel
[20:08] supster has joined the channel
[20:08] niftylettuce has joined the channel
[20:08] Matias: I used # curl http://npmjs.org/install.sh | sh
[20:08] hermanjunge: DelvarWorldI: You caught me lying!!! :D
[20:09] Matias: (taken from http://npmjs.org/)
[20:10] dhasenan: level09: yahoo has posted jobs at nodejs.org.
[20:10] DelvarWorld1: link to the readme says if that fails, try cloning github repo and sudo installing. although, I didn't need to be root to install npm (mac osx), the sh script worked for me
[20:10] MichealBenedict has joined the channel
[20:10] level09: cool
[20:10] hermanjunge: las month I installed nodejs on an ubuntu machine as user. Since I have to install it again in this mac, I will try and blog about it, in order not to blush again!
[20:10] patcito has joined the channel
[20:10] level09: it would be nicer if google adopts this technology
[20:10] level09: since it is based on their v8
[20:11] gmonnerat has joined the channel
[20:11] junkee[] has left the channel
[20:11] gmonnerat has left the channel
[20:11] mr-black has joined the channel
[20:12] mr-black: Would someone be willing to answer a possibly silly question?
[20:12] mscdex: mr-black: just ask
[20:13] mscdex: no need to ask to ask ;)
[20:13] mr-black: haha fair enough
[20:13] MichealBenedict: ?
[20:13] hermanjunge: mr-black: DO IT
[20:13] hermanjunge: lol
[20:14] mscdex: the answer is probably 42
[20:14] mr-black: So, could someone give me an example of why you would want to assign the module.exports object to an object you made as opposed to just using the default object?
[20:15] pita: is there a way to do a console.log without a line break?
[20:15] perlmonkey2 has joined the channel
[20:15] level09: it doesn't line break normally
[20:15] level09: for me
[20:15] mr-black: the "default" object being the one created by the module system
[20:16] ExsysTech has joined the channel
[20:17] mscdex: mr-black: you mean exports?
[20:17] hermanjunge: mr-black: AFAIK (Beginner), you need to export in order to use some object / function in other file
[20:17] mscdex: mr-black: it's useful if you're exporting one thing, usually a "class"
[20:17] MichealBenedict: do you mean .. module.exports.abcModule = func(), can be accessed as "abcModule" everywhere else ?
[20:17] mscdex: mr-black: so you can do: var Foo = require('./foo'); instead of var Foo = require('./foo').Foo;
[20:18] hermanjunge: mr-black: I reckon is the equivalent to say 'public' in Java or C#
[20:18] hermanjunge: mcsdex is right, it helps to write shorter lines, among other things
[20:18] sirdancealot has joined the channel
[20:19] mr-black: hmm
[20:19] mscdex: it helps to remove redundancy in naming
[20:20] mscdex: imho
[20:20] nightshift has joined the channel
[20:20] mr-black: is there some other reason for assigning module.exports to a class that you make versus just adding functions / attributes to the exports object?
[20:20] Opaque has joined the channel
[20:20] mscdex: no
[20:20] mscdex: not really
[20:20] mr-black: I think what I'm confused about is that, to me, the end result seems the same
[20:20] Adman65 has joined the channel
[20:21] mscdex: mr-black: it's easier to work with a single variable when you're replacing module.exports instead of using "module.exports" everywhere when you want to refer to the thing you're exporting
[20:22] mscdex: mr-black: e.g. /* module */ var Foo = module.exports = function() {}; Foo.prototype.bar = function() {}; /* instead of module.exports.prototype.bar */
[20:22] mscdex: other than those two things there really is no difference
[20:22] DoNaLd` has joined the channel
[20:22] mscdex: because either way it's exporting an object of some kind
[20:23] mscdex: whether it's one you defined or you use the one defined for you by node
[20:23] mr-black: so the "kind" object doesn't matter? It's really just semantics"
[20:23] gtramont1na has joined the channel
[20:23] mr-black: /s/"/?/
[20:24] mplabs has joined the channel
[20:25] mscdex: yeah it's just easier to deal with and easier to read (in the module) if you're exporting a single "class" and not using module.exports everywhere in your module code
[20:25] level09: any socket.io users
[20:25] samsonjs: quick express question, anyone know if I can turn of logging for single requests, or a specific path?
[20:25] mr-black: mscdex: cool stuff. I appreciate the help!
[20:26] mscdex: but if you're just exporting a bunch of unrelated functions, then why not just use the provided exports object, e.g.: exports.pow = function(){}; exports.sqrt = function() {};
[20:26] mscdex: well, not unrelated necessarily but not tied to a single instance of something
[20:27] gtramont1na: Hey all, any1 using jade? How do I write meta-tags?
[20:27] gtramont1na: tried doing this, but didn't compile: meta(name='viewport' content='width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;')
[20:28] prettyrobots has joined the channel
[20:28] mr-black: mscdex: Indeed, I think the rule of thumb I'm going to use is if it's a class I want to export I'll assign modules.exports to that but if it's a bunch of unrelated functions I'll just do exports.foo = function() {}
[20:29] mscdex: mr-black: yeah
[20:29] mscdex: a bunch of loose functions or several "classes"
[20:32] hermanjunge: mr-black: Yes, the idea of exports is to give the functions some kind of "namespace"
[20:35] wishpishh has joined the channel
[20:35] Corren has joined the channel
[20:35] gtramont1na: nevermind. missing comma. :-/
[20:37] tdegrunt has joined the channel
[20:38] hermanjunge: gtramontina: it happens
[20:40] jakehow has joined the channel
[20:42] xsyn has joined the channel
[20:43] kriszyp has joined the channel
[20:43] davidcoallier has joined the channel
[20:43] dnyy: anyone know of a telnet library that implements option negotiation?
[20:48] mscdex: dnyy: people still use telnet? ;)
[20:48] dnyy: need it for this MUD client i've been working on :(
[20:50] cardona507 has joined the channel
[20:51] mscdex: dnyy: it should be fairly trivial, this might be useful: http://support.microsoft.com/kb/231866
[20:52] akshatj has joined the channel
[20:53] viz_: i'm a bit confused about server-side routes (express) and client-side routes (backbone.js). are there advantages in doing one over the other? what are their different purposes? as far as i know, you can do all your routes (get/post/etc) with either, right?
[20:58] paulmdx has joined the channel
[20:59] level09: is there a sleep() method in node.js ? does it make it synchronous
[21:00] aho: no. n/a.
[21:00] c4milo1 has joined the channel
[21:00] ashb: http://nodejs.org/docs/v0.4.8/api/timers.html
[21:01] akshatj has joined the channel
[21:01] dnyy: mscdex: yeah, have some docs up already, was just hoping someone had already taken care of it
[21:01] level09: I was wondering because I saw it on phantomjs page
[21:01] dnyy: i'm fine to do it myself if not, though
[21:01] level09: which is a node module
[21:01] level09: or kind of
[21:01] akshatj has joined the channel
[21:02] aho: phantomjs = headless webkit
[21:02] mscdex: dnyy: i'm not aware of any offhand
[21:02] zivester has joined the channel
[21:02] level09: headless ?
[21:03] level09: is that a good term or a bad one :) ?
[21:03] aho: there is no UI, basically
[21:03] level09: aho: I want a way to grab the thumbnail of a website through the url
[21:03] level09: so I think it can help
[21:03] aho: phantomjs can do that, yes
[21:04] ashb: http://code.google.com/p/phantomjs/wiki/QuickStart#Rendering
[21:04] aho: anthing you can view with a webkit based browser can be dumped into a png
[21:04] ashb: wkhtmltopdf will do it too
[21:05] level09: great !
[21:05] level09: thanks
[21:05] eee_mk has joined the channel
[21:07] zomgbie has joined the channel
[21:12] perlmonkey2 has joined the channel
[21:13] patrickjst has joined the channel
[21:13] rauchg has joined the channel
[21:14] hybsch has joined the channel
[21:17] jslatts: if I have a nested callback function: someMethod(function (result) { console.log(result); });
[21:18] jslatts: and I moved the callback to its owned named function: someMethod(myCallBack);
[21:18] jslatts: does myCallBack still have access to someMethods object scope?
[21:18] simenbrekken has joined the channel
[21:18] desdur has joined the channel
[21:18] v0idless- has joined the channel
[21:19] ringomanatee has joined the channel
[21:19] jbpros has joined the channel
[21:20] supster: jslatts: depends on where you define myCallBack. but no, not in the sense that you're getting at
[21:20] supster: jslatts: functions will close on variables that are in scope and used in the function body at the time of the function definition, not at the time of calling
[21:21] supster: jslatts: you need to read more about how closures work in javascript
[21:21] jacter has joined the channel
[21:21] jslatts: supster: i guess i should have known that.
[21:21] jslatts: supster: i can use a generator function to build the function I need bound to the objects at runtime
[21:22] supster: yep
[21:22] pplante has joined the channel
[21:22] supster: someMethod(getMyCallBack(var1, var2, ...))
[21:23] mustalac has joined the channel
[21:24] jslatts: supster: do you prefer to continually nest function callbacks in node? or do flatten them out?
[21:24] jslatts: supster: i haven't really had too deep of nesting until i started doing some file handling stuff
[21:27] mcluskydodallas has joined the channel
[21:28] arpegius has joined the channel
[21:30] supster: depends on what is happening. generally i try to avoid deep nesting but don't go too far out of my way to do it
[21:31] supster: if there's an easy way to avoid it that improves the readability and does not add much complexity, do it
[21:32] supster: libraries like https://github.com/caolan/async help
[21:36] Adman65 has joined the channel
[21:37] Bradleymeck has joined the channel
[21:37] torgeir has joined the channel
[21:37] mplabs has joined the channel
[21:37] mplabs has joined the channel
[21:38] davidbanham has joined the channel
[21:39] kriszyp has joined the channel
[21:39] torgeir_ has joined the channel
[21:41] themiddleman has joined the channel
[21:43] __sorin_1 has joined the channel
[21:45] themiddleman has joined the channel
[21:45] mhordecki has joined the channel
[21:47] ardcore has joined the channel
[21:48] ardcore has left the channel
[21:48] aliem has joined the channel
[21:48] tim_smart: Hmm express's app.error() isn't working for me.
[21:48] tim_smart: Calling next(error) somewhere in my app, but the handler passed to app.error() isn't being called.
[21:50] yozgrahame has joined the channel
[21:55] STUPIDWIFI has joined the channel
[21:56] Bradleymeck has joined the channel
[21:57] TomY has joined the channel
[21:59] pplante has joined the channel
[21:59] mustalac has joined the channel
[22:01] ezmobius has joined the channel
[22:01] italic has left the channel
[22:02] typn has joined the channel
[22:02] mplabs: I have found it's not that good to use Node.js as a webservice server :|
[22:03] mplabs: it's not his fault but once you try you realize you can't use AJAX to request, so you have to use JSONP so you can't send data using POST
[22:03] mplabs: it's not so flexible
[22:04] Raynos has joined the channel
[22:04] nexxy has joined the channel
[22:04] nexxy has joined the channel
[22:04] Raynos: I''ve been reading the connect & express source and have noticed that they have different routers
[22:05] Raynos: Since express re-uses a lot of connects functionality why has the router in express been rewritten?
[22:05] tim_smart: mplabs: What do you mean?
[22:06] mplabs: I mean if you want to use Node.js to implement different webservices you won't be able to send them data using POST
[22:06] zomgbie has joined the channel
[22:06] mplabs: or at least I don't know how (I'm almost sure it's not possible)
[22:06] drachenstern has joined the channel
[22:07] tim_smart: mplabs: Of couse you can
[22:07] Raynos: node.js can send POST requests to other servers over HTTP
[22:07] Raynos: I was reading some code that did just that yesterday
[22:07] tim_smart: request.on('data', function (data) { buffer += data })
[22:07] telemachus: Raynos What differences did you have in mind?
[22:08] Raynos: telemachus: Just wondering why express doesn't use `connect.router`
[22:08] mplabs: how would you create a request? I would say using a JSONP request
[22:08] mplabs: tim_smart, Raynos
[22:08] telemachus: Raynos: I thought it *did*, but it exposes it as express.router
[22:08] febits has joined the channel
[22:08] tim_smart: mplabs: HTTP client request?
[22:08] Raynos: telemachus: I think its custom code that reimplements the router but doesnt use connect.router, I can try and double check the source though
[22:09] brianloveswords has joined the channel
[22:09] tim_smart: Raynos: Because TJ wanted a better DSL I guess
[22:09] mplabs: a request from a JS script running in the browser that wants to get data from your webservice, tim_smart
[22:09] tim_smart: mplabs: jQuery.ajax(...)
[22:09] hybsch has left the channel
[22:09] mplabs: you will have to use JSONP, so you can't use POST, I'm almost sure
[22:10] Raynos: tim_smart: what do you mean with DSL ? The question is also since TJ wrote both connect / express its strange to duplicate all that routing code
[22:10] tim_smart: mplabs: I use POST all the time
[22:10] mplabs: you can use $.ajax() just if the webservice is in the same server you are running the JS script in client side
[22:10] Raynos: tim_smart: hes talking about cross browser restrictions
[22:10] mplabs: it's not the case here :P
[22:10] dget has joined the channel
[22:10] Raynos: Ehm fail. cross site restrictions
[22:10] Raynos: mplabs: just use a standard jsonp GET request.
[22:11] mplabs: well, that's what I was talking about, you're forced to use GET :P
[22:11] coleGillespie has joined the channel
[22:11] tim_smart: mplabs: Or socket.io or something
[22:11] Raynos: Or use a proxy
[22:12] telemachus: Raynos: You're right. Express seems to have different routing code. Definitely spread out over more files - not sure how different the implementation is yet...looking now.
[22:12] Raynos: use ajax to request the correct thing from a middle man server (your own server)
[22:12] tim_smart: Raynos: express has different router syntax than connect right?
[22:12] mplabs: to use a proxy sometimes is not possible
[22:12] mynyml has joined the channel
[22:12] supster: cross-domain xhr restrictions have nothing to do with node.js... not sure how "node is not good to use as a webservice server"
[22:12] Raynos: mplabs: no reason why node.js cant forward a proper HTTP POST on your behalf due to your ajax restrictions
[22:12] mplabs: (for example when you want to do a long polling request and your server is Apache, and it's the case)
[22:13] Raynos: mplabs: supster has a point all servers have the xhr restrictions, theres no reason why node.js would be worse then any other
[22:14] drachenstern: aren't xhr restrictions browserside, not serverside, so it doesn't matter if its lighttpd or apache or iis or node or a tin can?
[22:14] eee_mk_ has joined the channel
[22:14] Raynos: tim_smart: Yes you're right it is different. connect requires you to pass a callback for which it returns the methods (get, post). I just expected that express could reuse it somehow
[22:14] supster: drachenstern: yes. browsers do the restricting
[22:14] Raynos: drachenstern: a tin can is not a valid HTTP server
[22:14] drachenstern: it should be
[22:14] mplabs: so what is the suggestion? I can use GET anyway, it's ok
[22:15] supster: mplabs: why isn't your web service on the same domain as the requesting application?
[22:15] drachenstern: apparently I can't change my nick to any of my usual ones?
[22:15] drachenstern: Nickserv is telling me that's not allowed ..
[22:16] mplabs: because my PHP script is running on Apache on port 80 and my webservices server is listening on other port
[22:16] Raynos: telemachus timstart: I might indeed be because the APIs are so different. I can guess that re-writing the express router is more efficient then tunneling through the connect API but I'd have to ask someone more knowledgable for the real reason to not re-use some of connect.router functionality.
[22:17] tahu has joined the channel
[22:17] mplabs: so I can't create AJAX request, supster
[22:17] mplabs: does it make sense now?
[22:17] Raynos: mplabs: no they are on the same domain but have different ports, of course you can talk to eachother just put node on a subdomain
[22:17] supster: mplabs: yep, i understand. there's different ways of going about this
[22:18] telemachus: Raynos: I'm still not quite seeing how the APIs are so different - http://pastie.org/1990622
[22:18] supster: mplabs: you can use jsonp as you mentioned, or you can use a proxy frontend to make the webservice available on the same domain (and port) as your web application
[22:18] telemachus: Those are all examples from the Connect or Express webpages
[22:18] supster: mplabs: or use allow-origin headers if you are only targetting modern browsers
[22:18] mplabs: I think you can't talk with other subdomain anyway, Raynos
[22:19] mplabs: let me check, I'm not so sure
[22:19] captain_morgan has joined the channel
[22:19] pplante has left the channel
[22:20] pplante has joined the channel
[22:20] Raynos: telemachus: I dont know the details but I can imagine there could be good reasons why calling connect.router immediatly when you call express.createServer is a bad thing
[22:20] Raynos: mplabs: sub domain cross communication over ajax should be valid.
[22:20] level09: what happens if I compile node without ssh support ?
[22:20] telemachus: Raynos: Ok, but what I'm saying is jut that the APIs of those two examples don't look very different at all to me
[22:21] monokrome: Sub-domain cross communication over ajax should be valid?
[22:21] mplabs: https://developer.mozilla.org/en/Same_origin_policy_for_JavaScript, Raynos
[22:21] pluginbaby has joined the channel
[22:21] pluginbaby has left the channel
[22:21] Raynos: telemachus: the actual APIs for app seem the same to me aswell.
[22:21] monokrome: Ignoring the same origin policy, are yo?
[22:21] mplabs: it's not valid
[22:22] piscisaureus has joined the channel
[22:22] Raynos: monokrome: I didnt realise it was that restricted :(
[22:22] mplabs: requesting from "http://store.company.com/dir/page.html", it's not valid: "http://news.company.com/dir/other.html"
[22:22] level09: whats the name of this ssl package that is required for node ?
[22:22] goatslacker has joined the channel
[22:22] mplabs: then there's just one way: JSON + GET :P
[22:22] mplabs: er, I mean, JSONP
[22:23] supster: mplabs: no there's multiple options: jsonp, proxy frontend, allow-origin headers
[22:23] Raynos: mplabs: or a bridge (using your PHP script as a proxy to talk to node)
[22:23] Raynos: That allow-origins is also valid
[22:23] mplabs: Apache will crash if I ask him to handle a long polling request xD
[22:23] supster: use nginx or something else as your proxy
[22:23] Raynos: telemachus: I think I'll settle for asking TJ himself, when I get the chance.
[22:24] Raynos: mplabs: option 4. Drop your PHP script and redevelop your website in node
[22:24] mplabs: hahaha
[22:24] davidbanham has joined the channel
[22:24] Raynos: That's a serious option, node.js can handle anything PHP can.
[22:25] ChrisAnn has joined the channel
[22:25] Raynos: Well anything custom solution you want to write in PHP you can also write in node.js
[22:25] level09: it can, but who's got the time to rewrite all these php frameworks
[22:25] monokrome: mplabs: No, proxies also effectively evade the same-origin policy. People just need to be secure about it.
[22:25] supster: Raynos: https://github.com/visionmedia/express/issues/639
[22:26] monokrome: JSONP also evades it.
[22:26] akshatj_ has joined the channel
[22:26] Raynos: supster: your the man o/
[22:26] mplabs: JSONP works well in this case
[22:26] Raynos: supster++
[22:26] v8bot: Raynos has given a beer to supster. supster now has 1 beers.
[22:26] mplabs: I don't know if I got what you said though
[22:27] supster: mplabs: just use jsonp, looks like it's solving your problem fine
[22:28] mplabs: yes, at least for now. maybe I will change it all soon, but not now
[22:28] Raynos: level09: True, but if your writing a custom solution to something in PHP then you dont use those big frameworks. Give it a year and we'll have a popular node CMS
[22:29] level09: I hope so
[22:29] level09: :)
[22:29] mplabs: hey, I read today about a node CMS!
[22:29] level09: Raynos: still I'm not sure why they dont recommend node for specific projects
[22:29] mplabs: I can't remember its name
[22:29] level09: I personally think it can do anything
[22:29] forzan has joined the channel
[22:30] level09: in some screencasts / articles they say it is mainly for network apps/ realtime etc ..
[22:30] supster: mplabs: http://calip.so/
[22:30] level09: but I saw that company who use it for video transcoding
[22:30] pplante has joined the channel
[22:30] TomY has joined the channel
[22:30] mplabs: no, another one
[22:30] Raynos: level09: It can if you dont mind the downtime of learning node instead of PHP and the loss of huge frameworks that hold your hand
[22:30] supster: ah
[22:31] Raynos: If your writing anything from scratch or something thats custom use node
[22:31] mplabs: ahmn, ok, maybe this one :P
[22:31] Raynos: The only breaker is good debugging tools and windows support
[22:31] skm has joined the channel
[22:31] level09: Raynos: I prefer to use some kind of integration at the moment
[22:31] eyesUnclouded has joined the channel
[22:31] Raynos: integration?
[22:31] level09: but really hoping some big players adopt this technology
[22:31] level09: Raynos: yes, like php/ruby frontend, and use node to do some backend stuff
[22:32] level09: well , its technically wrong to say php on frontend
[22:32] level09: but you know what I mean :D
[22:32] mikeal has joined the channel
[22:32] Raynos: Why do that though?
[22:32] supster: it's not. "frontend" can mean many things
[22:32] level09: Raynos: I'm using node for example to push breaking news
[22:32] level09: by watching files generated from TV
[22:33] Raynos: But your not still using PHP/ruby for new websites are you ;)
[22:33] secoif has joined the channel
[22:33] level09: and also as a backend scrapper/spider
[22:34] caolanm has joined the channel
[22:34] level09: well, I'm still waiting node to evolve more :)
[22:35] level09: just saw calipso today, wanna dig into it
[22:36] Raynos: I need to get round to writing up my own CMS in node.
[22:36] zzak has joined the channel
[22:37] level09: it would be good to get some ideas from existing decent cms's
[22:37] level09: although it is gonna be hard to rewrite syncronous stff into async
[22:37] justinw312 has joined the channel
[22:38] level09: how many concurrent connection can socket io handle on a small ec2 instance
[22:38] caolanm has joined the channel
[22:39] justinw312: I've realized that the web browser is a horrible platform for delivering desktop-like apps.
[22:39] justinw312: Yet, it's the only platform we have.
[22:39] \sega has joined the channel
[22:39] zomgbie has joined the channel
[22:39] justinw312: D:
[22:40] pplante: whys it so horrible?
[22:40] tbranyen: justinw312: not so bad if you use a frame
[22:40] tbranyen: embedded chromium and such
[22:41] supster: level09: many
[22:41] justinw312: Mostly because microsoft has a business interest in making IE act differently from other browsers in subtle ways, and 90% of sheeple use IE.
[22:41] level09: supster: roughly ? how much
[22:41] tbranyen: justinw312: well just like software manufacturers have to deal with cross platform
[22:41] tbranyen: you need to deal with cross browser
[22:41] tbranyen: its no different
[22:41] level09: rough range
[22:41] tbranyen: they all have subtles
[22:41] justinw312: Most recently I've become discouraged with browsers treating the backspace key as a back button
[22:41] tbranyen: subtleties
[22:42] tbranyen: justinw312: why?
[22:42] tbranyen: i hate it when google hijacks shit like that
[22:42] aho: IE doesn't have a 90% market share
[22:42] tbranyen: i want backspace to go back!
[22:42] meatmanek: justinw312: you can probably disable that with event handlers
[22:42] tbranyen: nooooo
[22:42] justinw312: Among sheeple is does.
[22:42] meatmanek: but I get frustrated when people do
[22:42] supster: level09: i have no real answer, but i've tested medium throughput (500 bytes/sec/client) with ~50 clients on a micro instance
[22:42] justinw312: Yeah, I got it disabled and working in safari/chrome/firefox/ie8
[22:43] meatmanek: tbranyen: yeah definitely, I ran into that on google's homepage the other day
[22:43] Aria has joined the channel
[22:43] meatmanek: was so annoying because I wasn't even focused on the input field
[22:43] level09: supster: what do u use for testing it ? ab ?
[22:43] justinw312: Just irritating that I have to.
[22:43] supster: level09: it's going to depend on how much data you're transferring and how much actual cpu-bound logic is in your code
[22:43] level09: yeah that's right
[22:43] justinw312: Yeah, someone accidentally changes focus out of the textarea and hits backspace, book -- app gone.
[22:44] justinw312: *boom
[22:44] duckspeaker has joined the channel
[22:44] supster: level09: ab doesn't really work for testing because the websocket (or whatever) connection would never be established on the page
[22:45] tbranyen: justinw312: sounds like poor app design to me
[22:45] meatmanek: justinw312: the proper way to handle that is probably with an onunload
[22:45] justinw312: I mean -- does anyone even intentionally use backspace/delete for a back press?
[22:45] supster: level09: unless you mean targettign the ws:// url directly? not sure how that would work
[22:45] meatmanek: justinw312: it's a lot faster than clicking the back buton
[22:45] meatmanek: button*
[22:45] tbranyen: if your app is properly designed, backing out of it does no damage and coming back to it is exactly how you left it
[22:45] level09: supster: I have never actually tested websocket itself, just the node http server
[22:46] justinw312: Like I said, I fixed the undesirable behavior in a way I believe to work on all the major browsers... but it's irritating that I have to.
[22:46] tbranyen: "fixed"
[22:46] tbranyen: why does your app break when someone hits back?
[22:46] tbranyen: that sounds like its poorly designed, so you add an extra layer of crap breaking native functionality to cover over it
[22:47] tbranyen: thats what it sounds like
[22:47] supster: level09: yeah, i have no good answer to testing :\
[22:47] meatmanek: tbranyen: be nice
[22:47] tbranyen: meatmanek: sorry these poor practices make the web shitty to use
[22:47] level09: I'm a bit afraid of using this on production, but I think I will still go on
[22:48] justinw312: Sure, with the whole semantic web paradigm, back shouldn't break the app. However, as I said before, I was bemoaning how poor the browser is for desktop-like apps.
[22:48] duckspeaker has joined the channel
[22:48] tbranyen: justinw312: you just need to think differently
[22:48] tbranyen: its not meant to model desktop app design
[22:48] justinw312: Desktop apps don't fit into the semantic web paradigm, and neither does my app. People who choose to use my app are choosing somehting that doesn't act like a website.
[22:48] supster: level09: yeah. i've just monitored it closely during stress testing periods
[22:48] justinw312: There is no cross platform way to do desktop apps. :(
[22:48] meatmanek: sure there is: Java
[22:49] justinw312: ...java.
[22:49] meatmanek: but everyone will hate you if your java app becomes popular
[22:49] meatmanek: also Qt is pretty cross-platform iirc
[22:49] justinw312: The dream that was Java. It failed.
[22:50] level09: supster: I believe using just a simple http server to serve some push notification won't be that risky
[22:51] guybrush: woot? http://twitter.com/#!/izs/statuses/74887934737793024 any comments on that?
[22:51] justinw312: I guess what I'm really complaining about is there's no good cross platform way to deliver desktop-like applications. There's Java, but I think Java penetration is dropping every year. There's Air and Silverlight, but those are proprietary. Grrr.
[22:51] justinw312: Node rocks, though.
[22:51] systemfault: Java failed on the desktop :/
[22:52] justinw312: tbranyen: Maybe you're right.
[22:52] jonaslund: cross-platform desktop stuff is ok with any platform you choose really
[22:52] supster: level09: the real risk comes in adding the complexity to your architecture, imo
[22:52] jonaslund: C#, Java,etc.. as long as you supply the runtime
[22:52] mscdex: ACTION shakes a fist at Java and .NET
[22:53] justinw312: Users are (rightfully) pretty paranoid about native code.
[22:53] level09: supster: do I need to run nodejs server on a standalone machine ? i have 5 web servers , will use one of them to handle nodejs
[22:54] mscdex: you don't need a standalone machine for node
[22:54] supster: level09: are those 5 web severs mostly idle?
[22:54] supster: level09: or are they pegged all the time?
[22:54] level09: well, sometimes we get some traffic
[22:55] level09: so they are not always idle
[22:55] level09: but again, my node.js server will only read a file an broadcast it through socket
[22:55] level09: maybe a few times a day
[22:55] level09: so it is very minimal operation
[22:55] supster: you can probably just throw it on one of them, yeah
[22:56] supster: are the 5 web servers app servers under load balancing?
[22:56] supster: or do they serve different purposes?
[22:56] MikeMakesIt has joined the channel
[22:56] level09: yes , they are using a load balancer
[22:57] level09: and NFS for the website files
[22:57] supster: you can also load balance your node app accross all the app servers
[22:57] justinw312: I guess I could make the app work with the back button, but it would be a large increase in code complexity to handle what is most likely a user error.
[22:58] supster: if the benefits would be desirable
[22:58] supster: (e.g., you can't afford the node service to fail if the single machine hosting it fails)
[22:59] supster: but it sounds like what you are using it isn't critical or used heavily? probably not necessary
[23:00] zomgbie has joined the channel
[23:00] level09: yeah
[23:00] jvduf has joined the channel
[23:00] __jgr has joined the channel
[23:00] level09: not so heavily but hope to use it heavily soon
[23:00] level09: ACTION cant get phantomjs to work :S
[23:01] mscdex: you could use haproxy in front as long as you don't care about websockets
[23:01] mscdex: are you sure phantomjs is really there?
[23:01] mscdex: :p
[23:02] supster: mscdex: he cares about websockets (using socket.io)
[23:03] mscdex: ah
[23:03] mscdex: well then you pretty much have to have node in front then for now
[23:04] mscdex: until websocket is finalized and browsers adopt a newer version :/
[23:04] supster: there's proxies that support ws
[23:04] level09: I'm using socket.io, which I suppose has some fallback mechanism
[23:04] level09: it says it is a cross browser solution
[23:04] mscdex: supster: not in http mode
[23:04] level09: hope that is not a scam :D
[23:05] supster: mscdex: right, but you can just use a simple tcp proxy?
[23:05] supster: level09: no, it works!
[23:05] level09: great
[23:05] mscdex: supster: you can, but if you're hosting multiple sites or proxying requests, you need to determine where to send the websocket connection
[23:06] mscdex: and normal proxies/load balancers can't do that
[23:07] supster: right, yeah
[23:08] supster: still allows for the simple case of load balancing a single app
[23:08] philtor has joined the channel
[23:13] JoshC1 has joined the channel
[23:25] kuhrt has joined the channel
[23:28] level09 has left the channel
[23:28] level09 has joined the channel
[23:28] themiddleman has joined the channel
[23:28] azeroth__ has joined the channel
[23:29] rauchg: level09: what's your question about socket.io ?
[23:29] level09: oh I actually asked a few ones :)
[23:29] level09: I asked about the security, and performance
[23:30] level09: and also
[23:30] level09: if it is possible to call different functions on the client, instead of relying on just the send mehtod
[23:30] level09: *method
[23:31] rauchg: level09
[23:31] rauchg: check this out
[23:31] rauchg: https://github.com/LearnBoost/Socket.IO-node/tree/develop
[23:31] amerine has joined the channel
[23:31] rauchg: read the "recipes"
[23:31] rauchg: this is the upcoming version
[23:31] rauchg: f
[23:31] ChrisPartridge has joined the channel
[23:31] rauchg: for which i'm finalizing the client
[23:31] level09: by the way, how about the fallback thing
[23:31] rauchg: the protocol has been extended
[23:31] rauchg: and also made more lightweight
[23:31] level09: is it automatic ?
[23:32] level09: or should I do something extra
[23:32] rauchg: fallback is automatic
[23:32] level09: for example, it says it falls back to flash socket
[23:32] level09: where is that swf file located?
[23:32] level09: oh in that case that is a genius implementation
[23:34] level09: I noticed it performs better on chrome , there is a noticable delay compared to FF
[23:37] \sega has joined the channel
[23:38] chunhao has joined the channel
[23:38] chunhao has joined the channel
[23:38] chunhao has joined the channel
[23:39] mscdex: level09: what version of firefox?
[23:39] level09: 3.6
[23:39] level09: and even 4
[23:40] level09: i suspect that it falls back to long polling on FF
[23:40] level09: while using websockets on chrome
[23:40] level09: but not sure
[23:40] supster: level09: it should be using flash in ff
[23:40] level09: yeah or probablly long polling
[23:40] level09: according to firebug
[23:40] supster: level09: it's possible the flash file is not being served correctly - check the resources in the browser
[23:40] level09: there is a XHR request every few seconds
[23:41] supster: level09: then the flash fallback is failing for some reason
[23:41] c4milo1 has joined the channel
[23:41] level09: supster: I think it is fine, it works normally, just the chrome is a little bit faster
[23:41] blueadept has left the channel
[23:41] mr-black has joined the channel
[23:42] supster: level09: yep, it is "working", but it could be using a better transport that will give better performance (like chrome does)
[23:42] supster: if the flash transport fails for some reason (like it is for you) it will use xhr streaming or other polling methods (worse than flash)
[23:42] level09: the problem, websoeckts are not as easy to debug
[23:42] level09: as ajax
[23:42] level09: I cant see the sent/received messages
[23:42] level09: and data
[23:43] aho: well, there is always the option to use a sniffer
[23:43] aho: (ew)
[23:43] level09: lol
[23:43] level09: :D
[23:43] level09: never used that since college
[23:43] aho: wireshark is pretty good
[23:44] rauchg: level09
[23:44] rauchg: there's extensions
[23:44] rauchg: to see websocket messages
[23:45] rauchg: also, the new socket.io has `debug` mode
[23:45] level09: on the server side ?
[23:45] level09: aha that's good
[23:45] level09: I'll look for that
[23:45] niles|iPod has joined the channel
[23:47] nilcolor_ has joined the channel
[23:47] Corren has joined the channel
[23:49] Stephen has joined the channel
[23:49] Stephen: hola
[23:50] mscdex: hola
[23:50] mscdex: salutations
[23:50] mscdex: greetings
[23:50] chunhao has joined the channel
[23:50] chunhao has joined the channel
[23:50] chunhao has joined the channel
[23:51] supster: rauchg: is the 0.7 client code available anywhere? or is it not possible to use the develop branch for development?
[23:51] rauchg: supster
[23:51] rauchg: im finishing it right now
[23:51] mscdex: live blog it!
[23:51] rauchg: doing some optimizations
[23:51] rauchg: i decided to make the browser client run on node finally
[23:52] rauchg: for testing
[23:52] supster: awesome! i guess i meant even in a development stage and not as a finished product
[23:52] rauchg: well the server is complete yeah, but useless without a client :P
[23:52] itissid: hey while using express i rendered my plain HTML index page using a simple res.render('index.html'); now when I am doing the same in another router it says Cannot find module 'html'
[23:52] supster: right :) but it sounds like the wait is not long... thanks!
[23:52] rauchg: itissid
[23:52] itissid: http://204.232.211.180:3000/
[23:52] rauchg: you don't want to "render" html
[23:52] rauchg: you want to .sendfile or similar
[23:52] rauchg: render implies a template engine
[23:53] itissid: rauchg, But why is it working in the first case
[23:53] itissid: Am i Lucky? i hardly think so..
[23:53] rauchg: itissid
[23:53] Stephen: Erg
[23:53] zzak: whut
[23:53] zzak: v8: ({"name":"a","content":["google"],"attributes":{"href":"google.com"}} == {"name":"a","content":["google"],"attributes":{"href":"google.com"}})
[23:53] v8bot: zzak: false
[23:53] Stephen: Why must Cloud9 be such a pain on Amazon instances
[23:53] rauchg: show me your code
[23:54] lluad has joined the channel
[23:54] itissid: rauchg, https://gist.github.com/998254
[23:54] itissid: Line 52 I render index.html
[23:54] mhordecki has joined the channel
[23:55] itissid: Line 208 i try it again
[23:55] itissid: This time it kills my app
[23:55] rauchg: itissid
[23:55] rauchg: why do you pass a title
[23:55] rauchg: to an html static file ?
[23:55] itissid: That is just an artifact
[23:55] itissid: I will remove it
[23:55] davidbanham has joined the channel
[23:55] rauchg: ok
[23:55] NjsL has joined the channel
[23:55] rauchg: are you running in dev
[23:55] rauchg: or prod mode
[23:55] itissid: dev
[23:56] NjsL: hello
[23:56] rauchg: what happens if after
[23:56] rauchg: you launch the app
[23:56] rauchg: you go straight to the route
[23:56] NjsL: I'm learning how and why I should use Node.js and I'm trying to run an example (the first one here: http://blog.nemikor.com/2010/05/21/long-polling-in-nodejs/).
[23:56] rauchg: that gives you the cannot find module error
[23:56] brownies has joined the channel
[23:57] NjsL: I think I'm misunderstanding something because I can't handle two request with this code
[23:57] Stephen: NjsL: A lot has changed since that example was written. Where are you having trouble?
[23:57] itissid: rauchg, So you mean to ask if i go straight to the line 208 route?
[23:58] rauchg: yep
[23:58] itissid: Then it gives me an oauth error cause it has to go through the oauth
[23:58] itissid: cycle first
[23:58] rauchg: it seems to me that some side effect must be at play
[23:58] itissid: Error getting OAuth access token : { statusCode: 401, data: '\n\n Invalid / expired Token\n /oauth/access_token\n\n' }[undefined][undefined][undefined]
[23:58] Stephen: NjsL: Node does not use threaded sandboxes like apache or other web services
[23:58] rauchg: for index not to get the error too
[23:58] Stephen: What leads you to believe you cannot handle 2 requests?
[23:59] NjsL: is it correct?
[23:59] NjsL: I tried to open it two times using my browser but it seems the second request wait to start until the first one is closed
[23:59] rauchg: anyways, you should probably be using a template engine
[23:59] rauchg: if you want to pass data from the route to the view
[23:59] rauchg: that's the whole premise of `render`
[23:59] Stephen: NjsL: You need to do some reading on asynchronous code.
[23:59] itissid: rauchg, Otherwise sendfile will work well in its place?
[23:59] rauchg: yep
[23:59] rauchg: but you might need to specify the views/ directory manually
[23:59] rauchg: and you won't have other conveniences `render` offers.