[00:00] maushu: Or use nginx/apache reverse proxy requests to the node.js you implemented. [00:01] rodrigo3n: yeah, then i could hook that to my existing application [00:01] maushu: Basically, node.js is not only for webapps. [00:01] JimBastard: its also part of a balanced breakfast [00:01] maushu: You can do anything with it that you could do with any other generic language, but in javascript. [00:01] maushu: What JimBastard said [00:03] maushu: "[Sun Jun 06 2010 00:03:34 GMT+0000 (UTC)] Announcing NaN questions to channel." [00:03] _announcer has joined the channel [00:03] maushu: What the hell happened. [00:05] ajpiano has joined the channel [00:05] rodrigo3n: thanks maushu [00:05] maushu: I'm desactivating stackoverflow section of the bot. I'm tired of SO developers shenanigans. [00:08] _announcer has joined the channel [00:11] tmpvar_ has joined the channel [00:12] tmpvar has joined the channel [00:15] tpryme has joined the channel [00:23] fictorial: re: Connect http://news.ycombinator.com/item?id=1406253 [00:24] robrighter has joined the channel [00:25] ec has joined the channel [00:35] paul_irish has joined the channel [00:36] pdelgallego has joined the channel [00:37] oleg_ has joined the channel [00:40] softdrink has joined the channel [00:48] ajpiano has joined the channel [00:49] paul_irish has joined the channel [00:56] JimBastard: mvp pattern owns your face [00:56] JimBastard: i just made a little plugin that turns css selectors into state machines [00:56] JimBastard: then added a view engine [00:56] JimBastard: ohh maaan [00:57] JimBastard: if only i had some behaviors to apply [00:57] JimBastard: http://blogs.msdn.com/blogfiles/erwinvandervalk/WindowsLiveWriter/1thedifferencebetweenmodelviewviewmodela_EC9E/image_5.png [00:57] JimBastard: supervising controller [00:57] JimBastard: so the presenter is optional [01:01] bmizerany has joined the channel [01:03] tmpvar: mvp? [01:03] Kiba: yo [01:03] tmpvar: oh [01:03] tmpvar: that crap [01:04] tmpvar: hey Kiba [01:04] Kiba: got a weird syntax error at line 37 [01:04] Kiba: http://gist.github.com/427156 [01:04] tmpvar: JimBastard, quit humping m$ [01:04] tmpvar: Kiba, what is the error? [01:04] Kiba: Uncaught SyntaxError: Unexpected token ] [01:04] tmpvar: lol [01:05] tmpvar: http://jslint.com/ [01:05] JimBastard: lol sup tmpvar [01:05] JimBastard: i think binary is coming by tonight [01:05] tmpvar: word [01:05] JimBastard: im killing it on the behaviors stuff [01:05] JimBastard: i think [01:05] tmpvar: nice [01:05] JimBastard: i spent most of the day walking around in circles [01:06] JimBastard: and eatting icecream [01:06] tmpvar: heh [01:06] tmpvar: whatever it takes [01:06] tmpvar: im wrapping numbers with ObjectWrap [01:06] JimBastard: css selectors => state machines [01:06] JimBastard: $(selector).machine() [01:06] tmpvar: JimBastard, hrm [01:06] Kiba: I wish I can use emacs' clipboard when I goes paste stuff in other applications [01:07] JimBastard: i dont wanna paste all the syntax [01:07] tmpvar: JimBastard, you'd have to show me a real example lol [01:07] JimBastard: back to teh codings [01:08] arnaudsj has left the channel [01:08] stepheneb has joined the channel [01:10] Kiba: erm [01:10] Kiba: I got lot of false positive [01:11] Aikar has joined the channel [01:15] SteveDekorte has joined the channel [01:19] richcollins has joined the channel [01:19] mfeiri_ has joined the channel [01:20] _announcer: Twitter: "A set implementation for #nodejs, using the object hash for uniqueness: http://bit.ly/bmXPX8"-- Jacob Rothstein. http://twitter.com/jacobrothstein/status/15523367985 [01:25] ryah: cygwin port! [01:26] _announcer: Twitter: "#nodejs cygwin port!"-- Ryan Dahl. http://twitter.com/ryah/status/15523676391 [01:26] mde: Sweet. [01:27] foobarfighter has left the channel [01:27] ryah: ACTION boots up windows to try it out [01:27] creationix has joined the channel [01:27] ryah: creationix: hey [01:27] creationix: hi [01:28] ryah: creationix: are you slides online from txjs? [01:28] creationix: yep, let me find a link [01:29] creationix: http://static.creationix.com/swdc.pdf http://static.creationix.com/txjs.pdf [01:29] creationix: they are on slideshare too [01:29] creationix: http://www.slideshare.net/creationix [01:30] maushu: cygwin port! [01:30] liucougar has joined the channel [01:32] tmpvar: does anyone know what is happening internally when you do something like: var i=0; i=i+10 ? is "i" coerced into a double during the addition/set operations? any ideas as to what *might* be happening? [01:38] liucougar has joined the channel [01:44] tmpvar: I guess that may sound like a stupid question, but I'm trying to wrap numbers in order to pass them by reference. _any_ pointers would be helpful at this point heh [01:47] fictorial: Can I ask a dumb question as a non-Windows user... Do people really run servers on Windows? Not trolling, I've no idea. [01:47] tmpvar: yeah they do [01:48] tmpvar: .net, java, lamp [01:48] tmpvar: (is what I've seen) [01:49] mde: And people like to dev locally on Win, if that's what they have. [01:50] fictorial: mde: good point [01:55] richcollins has joined the channel [01:58] hartley231: micheil: just dropped you an email with my still not working attempt to add Draft76 to node-websocket-server [01:59] voodootikigod_ has joined the channel [02:00] creationix: tmpvar: I thought all js numbers were the same type [02:01] tmpvar: i figure it out :) [02:02] tmpvar: well, the = operator atleast [02:02] tmpvar: now for + [02:02] thejustinwalsh: When in doubt... http://www.ecma-international.org/publications/standards/Ecma-262.htm [02:02] thejustinwalsh: :D [02:03] tmpvar: actually, no.. i did not figure it out [02:05] thejustinwalsh: tmpvar: afaik, all numbers in javascript are doubles [02:05] tmpvar: creationix, yeah they are doubles [02:05] tmpvar: yeah [02:05] mattly has joined the channel [02:06] thejustinwalsh: Is there such thing as HTTP streaming? Or am i crazy? [02:07] jbr has joined the channel [02:07] thejustinwalsh: i.e. when would i need to send multiple body chunks to a http.ServerResponse? [02:09] creationix: thejustinwalsh: yeah, just call write a few times [02:10] creationix has left the channel [02:13] jbr: hi, all – does anyone know if thought has been put into a database-agnostic orm? [02:14] hartley231 has left the channel [02:14] hsuh has left the channel [02:15] tmpvar: haha, you should have asked when creationix was in here [02:15] tmpvar: he has a project up on github.. or he did atleast [02:15] jbr: did? has it gone away? [02:16] hsuh has joined the channel [02:16] polotek has joined the channel [02:17] jbr: oh, maybe creationix/node-persistance. I'll check that out [02:19] tmpvar: that'd be it [02:20] tmpvar: last i heard he stopped working on it [02:20] jbr: I had been doubting if there was any need for an orm given the nosql craze, but it seems people are writing drivers for rbdms's. Seems like a big task, though [02:20] tmpvar: just because of the disparity between rdbms/nosql systems [02:21] jbr: yeah, that whole "join" thing :) [02:21] jbr: well, and everything else [02:22] tmpvar: fictorial, http://gist.github.com/427196 -- almost not painful [02:23] stepheneb has joined the channel [02:25] mde: jbr: It's just a stake in the ground, but Geddy has Postgres and SQLite support. [02:25] mde: Basically just storing blobs of JSON. I'm doing Couch next I think. [02:26] jbr: so it's like a document store on top of whatever rbdms you want? [02:26] mde: It may be total insanity, but I just want a basic query language I can use for either. [02:27] tmpvar: linq? [02:28] mde: I started with the basic model and validations. I looks pretty much like a JS port of DataMapper. [02:29] jbr: what about css3 for the database? like query('user.administrator[name*=foo]:first') [02:29] mde: The query interface is still really simple. [02:29] danfo has joined the channel [02:29] mde: Well, that's pretty close to the normal DM or AR api. [02:29] mde: That's an interesting idea, yeah. [02:30] mde: Right now it just does find by id, datatype, and you can filter in memory for anything else. [02:30] mde: Big datasets will be slow if you're using something relational, I'm not paying too much attention to that. [02:31] mde: I just want people to be able to try it out without having to install something exotic. [02:31] tmpvar: jbr, jsonquery / jsonpath? heh [02:32] jedschmidt has joined the channel [02:32] saikat has joined the channel [02:32] mde: I haven't looked really closely at those yet, but I really want to aim for a simple API that's similar to what people are already used to. [02:33] tmpvar: sure [02:33] tmpvar: are you enforcing a schema on the rdms end? [02:33] tmpvar: almost seems like you would need to [02:33] mde: Maybe not as sexy, but I think that the real challenge will be making an API that works the way people expect, but on top of a noSQL store. [02:33] tmpvar: rdbms* [02:33] mde: The only things that get actual columns are common properties. [02:34] mde: So ... id, datatype, created_at, updated_at. [02:34] mde: It doesn't care what you store in it. [02:35] mde: There's a well-defined format so that the model code knows how to serialize and de-serialze and you end up with your typed objects with typed properties. [02:35] jbr: mde: so on a sql driver, the actual bulk of the data would be in a text field? [02:35] mde: Yes, just the "data" column. :) [02:36] tmpvar: mde, so you do enforce a schema for relational db's [02:36] mde: Just those five columns, in a single table. [02:36] tmpvar: sure [02:36] mde: So there's no single-table inheritance, etc. [02:36] mde: No 'schema' per se. The model items are all defined in JS files. [02:37] mde: I just started writing docs. The query-interface piece is not done yet: http://wiki.github.com/mde/geddy/models [02:38] mde: But we're using the model/validations client-side where I work. [02:38] mde: So it's definitely more baked. [02:41] dgathright has joined the channel [02:44] micheil: wow. someone just got node to compile under cgwin [02:44] micheil: *cygwin [02:45] mde: Good stuff, yeah. :) [02:45] mde: Off for a run, see y'all. [02:45] Kiba: http://gist.github.com/427219 [02:45] Kiba: I got an odd error [02:46] Kiba: Uncaught SyntaxError: Unexpected token ] [02:47] _announcer: Twitter: "Fresh in from the Node.js mailing list: Someone got node to compile under Cygwin! More here: http://is.gd/cEdEF"-- Micheil Smith. http://twitter.com/miksago/status/15528060301 [02:48] Kiba: ACTION suddenly got a bright idea [02:48] tmpvar: Kiba, [02:49] tmpvar: line 32, use a : not a = [02:49] tmpvar: and line 33 [02:49] Kiba: tmpvar: doesn't work in client side javascript [02:49] richcollins has joined the channel [02:49] Kiba: I was missing a ; at line 35 [02:49] tmpvar: SyntaxError: missing : after property id { message="missing : after property id", source="with(_FirebugCommandLin...se(message));\n }\n}\n\n};", more...} [02:50] _announcer: Twitter: "Whoohoo! I have a raw port of dshaw.com up on @webfaction running Node.js using Mu (node mustache). http://node.dshaw.com/"-- Daniel Shaw. http://twitter.com/dshaw/status/15528192947 [02:50] Kiba: tmpvar: ya sure? chrome complained. [02:50] tmpvar: heh [02:51] Kiba: unexpected token : [02:51] tmpvar: wrap name with "'s [02:51] tmpvar: i think? [02:51] Kiba: hmm? [02:51] Kiba: in any case, chrome is not complaining [02:52] softdrink has joined the channel [02:52] Kiba: and chrome does complain in place of a : [02:53] tmpvar: Kiba, http://gist.github.com/427237 [02:53] tmpvar: jslint is your friend [02:54] tmpvar: those "false positives" you mentioned earlier were not "false positives" [02:54] vnguyen has joined the channel [02:55] polotek: anybody know why I can't get gdb to break on anything? [02:57] dji has joined the channel [02:57] Kiba: tmpvar: look. : doesn't work for me. [02:57] tmpvar: thats a shame, if I were you, I'd lint my entire project. god knows what else is wrong [02:58] Kiba: God know what's tmpvar talking about since chrome didn't complain. [02:59] tmpvar: heh [03:01] Kiba: the last time I paste, tmpvar, I probably missed a letter and caused all the false positive. [03:01] Kiba: in jslint that is. [03:02] tmpvar: not really [03:02] Kiba: I wonder if there's a way to get emacs clipboard content into the OS' clipboard [03:02] Kiba: it would be a godsend. [03:03] Kiba: tmpvar: done another paste. Now that's weird. [03:03] Kiba: you see [03:03] Kiba: chromium would complain about = [03:03] Kiba: err [03:03] Kiba: : [03:03] Kiba: but jslint complain about = [03:03] Kiba: what's up with that? [03:03] tmpvar: with that many problems.. who knows what its really bitching about [03:04] Kiba: eh. It gave me only two errors, tmpvar [03:04] tmpvar: your original paste had a few [03:04] polotek: Kiba: my emacs killring gets saved to the clipboard [03:05] Kiba: polotek: so you found a way. [03:05] polotek: I'm on os x [03:05] polotek: using emacs-starter-kit [03:05] polotek: haven't really looked at how it's done [03:05] Kiba: well [03:05] Kiba: my emacs' configuration is entirely homegrown [03:06] polotek: There's a lot of good stuff to pullout of emacs starter kit [03:06] polotek: you should check it out [03:06] Kiba: I will. [03:06] Kiba: in maybe 3 months. [03:07] Kiba: I still didn't pick all the low hanging fruits yet. [03:07] Kiba: and my .emacs is only 75 lines long. [03:11] JimBastard has joined the channel [03:13] JimBastard: toString() is fucking amazing #bastardfacts [03:14] Kiba: why so amazing, JimBastard [03:14] JimBastard: debuggin [03:15] JimBastard: entering state : #/nav Object { state="/"} function () { debug.log("entered state"); } entered state Object { state="/"} function (state) { $("#navOutput").html(state.toString()); } [03:15] JimBastard: thats actually a misnomer lulz [03:15] bmizerany has joined the channel [03:17] stepheneb has joined the channel [03:17] rictic has joined the channel [03:19] hassox has joined the channel [03:20] _announcer: Twitter: "There's a nodejs Cygwin port! http://cot.ag/bUUo79" [af]-- aaron heckmann. http://twitter.com/aaronheckmann/status/15529898295 [03:22] smtlaissezfaire has joined the channel [03:30] creationix has joined the channel [03:34] thejustinwalsh has joined the channel [03:37] gwoo has joined the channel [03:41] polotek has joined the channel [03:44] reid has joined the channel [03:47] reid: Anybody use npm and try to install into /usr/local/bin with a bin object in their package.json? [03:50] _announcer: Twitter: "nodejs the HTTP status code portion of an array of modules "I'm a teapot" There is Warota" [ja]-- あんでぃふぁいんど. http://twitter.com/nullkal/status/15531491753 [03:50] rtsuk has joined the channel [03:52] thejustinwalsh: I love how amazingly not simple a multipart message is. :) multipart-js please save me :) [03:52] Pilate: youre just not thinking with portals yet [03:55] wilmoore has joined the channel [03:56] thejustinwalsh: this is true. :) I'm out of practice in my js fu for sure! [03:57] rtsuk has left the channel [04:00] ewdafa has joined the channel [04:03] cloudhead: reid: yes [04:04] cloudhead: anyone got a clever way to round numbers to two decimal points? [04:05] Aria has joined the channel [04:07] cloudhead: I think I got it [04:07] cloudhead: x - x % 0.01 [04:07] polotek: cloudhead: http://www.mredkj.com/javascript/nfbasic2.html [04:08] polotek: oh you mean actually round [04:08] polotek: not just for printing [04:08] cloudhead: actually printing is fine [04:08] cloudhead: this looks good [04:08] thejustinwalsh: toFixed rounds up [04:09] cloudhead: yea, perfect [04:17] nicolaerusan has joined the channel [04:24] vnguyen has joined the channel [04:29] nicolaerusan: hey guys [04:30] nicolaerusan: i wanted to ask a question, not neccesarily 100% related to node (though i am thinking of switching over) [04:30] nicolaerusan: I am playing with the Tornado Web Server implementation of web sockets [04:30] nicolaerusan: and i've got it up and running, but it looks like there is one web socket connection for the entire machine [04:31] _announcer: Twitter: "Today's #txjs has me wondering if we could do a NodeJS like thing in our C# world. Likely some dynamic-fu preventing this from reality."-- Kevin Miller. http://twitter.com/kevm/status/15533693460 [04:32] nicolaerusan: i have tried opening multiple tabs in chrome, i am trying to simulate a client, and all the messages go to the same tab (as though its the only real connection) [04:32] _announcer: Twitter: "http://tinyurl.com/24f48md Componentix blog - File uploads using Node.js: once again"-- Schantol. http://twitter.com/schantolafp/status/15533735178 [04:32] nicolaerusan: anyone have any insight into this? [04:32] nicolaerusan: is it 1 web socket connection per browser? [04:33] thejustinwalsh: nicolaerusan: is it URL bound? [04:34] nicolaerusan: thejustinwalsh: yes [04:34] _announcer: Twitter: "Connect middleware lib for #nodejs looks promising. Talk by @creationix - http://vimeo.com/12316916"-- Marc Harter. http://twitter.com/wavded/status/15533841859 [04:34] nicolaerusan: here lemme show u the client side code [04:34] nicolaerusan: http://pastebin.com/71Ebr3gM [04:34] pzich has joined the channel [04:35] nicolaerusan: any ideas/ [04:36] thejustinwalsh: I'm curios if chrome only lets one page talk to that socket at that url... so if your server had another socket at localhost:8080/socket2 would it work? Or can you have sockets at urls? Just throwing out ideas... [04:37] nicolaerusan: yah [04:37] nicolaerusan: thats what i was thinking as well [04:37] nicolaerusan: let me try [04:42] nicolaerusan: hmm [04:42] nicolaerusan: i think it may be tornado [04:42] nicolaerusan: i am gonna just implement in node.js [04:42] nicolaerusan: and see what happens [04:42] nicolaerusan: it looks like its closing connections [04:43] nicolaerusan: i was asking them if i have to use asynchronous calls with their web sockets implementation, but sitll no response [04:43] nicolaerusan: seem node.js has more support [04:45] edspencer has joined the channel [04:47] thejustinwalsh: hrm. I need something fun (and relatively qucik/simple) to write with node.js, looking for ideas. [04:49] _announcer: Twitter: "@mattpodwysocki hrm, conflating Connect a "middle-ware" piece I saw for NodeJS - http://bit.ly/brlzo7"-- Kevin Miller. http://twitter.com/kevm/status/15534635586 [04:52] paul_irish has joined the channel [04:52] wilmoore_ has joined the channel [04:58] nsm has joined the channel [04:59] creationix has joined the channel [05:04] mape: creationix: Hey, got buffers in last night instead of strings, make quite a bit of difference, now it pushes like 3600req/sec (around 400MB/sec) [05:05] creationix: nice [05:05] bmizerany has joined the channel [05:06] ajpiano has joined the channel [05:12] nsm has joined the channel [05:13] stephenlb has joined the channel [05:21] micheil: creationix: any luck with that module? [05:21] micheil: /re connect [05:22] micheil: nicolaerusan: you need to try the node.js websocket implementations [05:22] nicolaerusan: micheil: yah i am going to try that right now [05:23] micheil: first, I'm having a shower, then I'm going to implement draft76 for node-websocket-server. [05:23] micheil: ACTION goes. [05:23] micheil: also: http://1.bp.blogspot.com/_t25cbBoQP_8/Swl_7jAbCPI/AAAAAAAAAEw/4lNKzCQvzsM/s1600/coffee-you-can-sleep-when-youre-dead.jpg [05:23] nicolaerusan: is this the implementation: node-websocket-server? [05:23] nicolaerusan: micheil? [05:23] micheil: that's mine [05:23] nicolaerusan: is that the one i should be using [05:23] nicolaerusan: (according to your suggestion?) [05:23] micheil: it doesn't work one some browsers, due to the draft76 thing [05:23] micheil: you can use that, or you can use sockets.io [05:24] micheil: although, sockets.io does much more then websockets [05:24] micheil: (supports downgrading to long-polling and I think short-polling) [05:25] nicolaerusan: yah [05:25] nicolaerusan: i was wondering [05:25] nicolaerusan: how stable [05:25] nicolaerusan: sockets.io is [05:25] micheil: I'm not sure [05:25] nicolaerusan: any insights from your experiences? [05:25] nicolaerusan: i just saw a really nice article [05:25] nicolaerusan: you should chekcout [05:25] micheil: I've heard it works good, but I haven't personally used it [05:25] micheil: link me. [05:26] nicolaerusan: http://www.web2media.net/laktek/2010/05/25/real-time-collaborative-editing-with-websockets-node-js-redis/ [05:26] liucougar has joined the channel [05:26] nicolaerusan: found it a useful discussion [05:26] micheil: ah, yeah, that's the one I get a mention in [05:27] _announcer: Twitter: "Interesting article on WebSockets, node.js and redis to implement real-time chat: http://bit.ly/d5GtJU"-- Nicolae Rusan. http://twitter.com/NicolaeRusan/status/15536470084 [05:29] nicolaerusan: yup [05:29] nicolaerusan: so you freelancing these days? [05:29] raz has joined the channel [05:29] micheil: yes, sort of. [05:29] micheil: I'm a contractor [05:30] micheil: I mainly work for people to improve their opensource code & projects [05:30] micheil: but I'm also working on a startup called Ideocase [05:30] raz has left the channel [05:30] nicolaerusan: interesting, you work from home a lot I take it? [05:30] micheil: yeah, currently the most I can do, being 500km from a large city [05:31] micheil: although, working from home's no barrier for me, as most of my clients are US based or european [05:31] nicolaerusan: yah, where you at? [05:31] micheil: a little town in rural australia called Leeton [05:32] nicolaerusan: cool. You using node.js for ideocase, or is it just a personal interest? [05:32] nicolaerusan: (nice design on branded code by the way) [05:32] micheil: um, no, I compared node.js and rails3, but eventually rails3 won out because of the available ORM for mongomapper [05:33] micheil: (and at the time, being ideocase is also tied to educational commitments I had to choose the thing that meant the least re-wheeling) [05:33] jsilver has joined the channel [05:33] jsilver: hello nodies [05:33] nicolaerusan: you're in school still? [05:34] jsilver: i made some broken code [05:34] micheil: nicolaerusan: yeah, final year, then looking for some solid employment for a year [05:35] jsilver: Server running at http://127.0.0.1:8000/ [05:35] jsilver: TypeError: Cannot read property 'file_url' of undefined [05:35] jsilver: at Timer.callback (/home/jonathan/development/node/example.js:13:44) [05:35] jsilver: at node.js:176:9 [05:35] micheil: nicolaerusan: that is, not college or university, but year 12. [05:35] nicolaerusan: micheil: word up :). Ahhh i c, i thought you meant university for sure [05:35] micheil: jsilver: please paste your code on something like gist.github.com [05:35] jsilver: http://pastie.org/993579 [05:35] micheil: nicolaerusan: actually, correction, I'm in university as well. [05:35] nicolaerusan: micheil: damn, when did you start writing code? [05:35] jsilver: please don't mind the clandestine aspect of it, it's just for fun [05:35] nicolaerusan: micheil: explain what you mean? [05:36] micheil: about.. 5 or 6 years ago [05:36] nicolaerusan: micheil: taking some courses for uni at same time? [05:36] micheil: okay.. [05:36] jsilver: transformFileURL works how I want [05:36] jsilver: but my callback is wrong som how [05:36] jsilver: my script works once and breaks the next time [05:36] micheil: nicolaerusan: http://news.csu.edu.au/director/regionalnews.cfm?itemID=6FD153180375A70EC07947F4E86A444C&bprint=true [05:36] jsilver: it needs some kind of if-statement [05:37] micheil: nicolaerusan: nothing that can't be found out on google. http://www.google.com.au/search?q=%22micheil+smith%22 [05:37] jsilver: i need more help understanding the inner and outer callback i think [05:37] micheil: jsilver: why are you using packed code? [05:37] jsilver: it's not mine [05:37] jsilver: i'm hacking [05:37] jsilver: :P [05:38] jsilver: reversing [05:38] nicolaerusan: :) good stuff [05:38] micheil: jsilver: first up, remove the setTimeout() it's unneeded [05:38] jsilver: kk [05:38] nicolaerusan: micheil: so you thinking of skippin uni? [05:39] jsilver: that fixed it [05:39] jsilver: y [05:39] jsilver: ty [05:39] micheil: nicolaerusan: not really, just taking a gap year and then deciding [05:39] micheil: jsilver: also. [05:39] jsilver: it's only rot13 [05:39] jsilver: i just figured it out [05:39] jsilver: :) [05:39] nicolaerusan: micheil: cool, i'm gonna play with the web sockets implementation now [05:39] micheil: nicolaerusan: have fun :) [05:40] micheil: nicolaerusan: I'll be pushing a new version to npm and the repo in hopefully ~<12hrs [05:41] nicolaerusan: micheil: cool, yah, if we end up going down this road, and its working decently, you'll have 3 more developers using and giving feedback/help. We've been working on an app, and we've decided to throw away all traces of polling, so, spend today playing with tornado, and now websockets. [05:41] nicolaerusan: micheil: talk more soon [05:42] micheil: nicolaerusan: cool, let me know of any problems you have [05:43] micheil: jsilver: try this: http://pastie.org/993581 [05:43] micheil: for future reference: http://jsbeautifier.org/ [05:43] micheil: it'll unpack packed code [05:43] jsilver: nice! [05:44] jsilver: worked very well [05:45] jsilver: it has unused functions to make it look weird [05:46] micheil: yes [05:46] micheil: anyway, bbl. [05:46] jsilver: kk [05:47] dgathright has joined the channel [05:48] sztanphet has joined the channel [05:49] jedschmidt has joined the channel [05:57] xer0x has joined the channel [05:57] nsm has joined the channel [06:11] visnup has joined the channel [06:15] saikat has joined the channel [06:20] mostlygeek has joined the channel [06:22] hassox has joined the channel [06:31] _announcer: Twitter: "Looking for a different vendor platforms GAE close, heroku.com found the. Amazon EC2 on the deployment git, postgresql can also be used. Java, not just the current Ruby, Javascript (node.js) is also being tested." [ja]-- ティロ*日本語*Java. http://twitter.com/jajathilo/status/15539316011 [06:36] _announcer: Twitter: "`curl -o node.tgz nodejs.org/dist/node-v0.1.97.tar.gz && tar xzvf node.tgz && cd node && ./configure && make && make install` #learning"-- Damon Cortesi. http://twitter.com/dacort/status/15539524433 [06:47] reid has joined the channel [06:54] jedschmidt has joined the channel [06:58] nsm has joined the channel [07:09] jbr has joined the channel [07:18] MattJ has joined the channel [07:35] mikeal has joined the channel [07:36] mikeal1 has joined the channel [07:44] qFox has joined the channel [07:48] dabreaka has joined the channel [07:55] dekz has joined the channel [08:02] dekz has left the channel [08:08] nsm has joined the channel [08:08] _announcer: Twitter: "Wanna know the definition of geek? 3AM Node.js experiments after an amazing night out. Thanks a pantload, @sh1mmer... :-)"-- Clint Andrew Hall. http://twitter.com/clintandrewhall/status/15543046408 [08:10] dandean has joined the channel [08:12] dandean: question about npm. is it possible to do anything like: `npm info ` ? [08:12] dks has joined the channel [08:12] dandean: mikeal1: would you know? [08:13] _announcer: Twitter: "Slicehost, Node.js & WebSockets - http://lnkby.me/kb << Including Twitter Streaming API. :-D"-- Damon Cortesi. http://twitter.com/dacort/status/15543216927 [08:15] o_o has joined the channel [08:20] devtime has joined the channel [08:22] BBB has joined the channel [08:25] derbumi has joined the channel [08:28] crafteh has joined the channel [08:33] micheil has joined the channel [08:35] _announcer: Twitter: "For my web app project, I've more or less settled for the Node.js server/framework. Now I seek for the best database."-- herve. http://twitter.com/_hrv/status/15544016600 [08:36] mitkok has joined the channel [08:43] jedschmidt has joined the channel [08:44] mikeal has joined the channel [08:47] jetienne has joined the channel [08:50] [[zz]] has joined the channel [08:51] keyvan has joined the channel [08:52] b_erb has joined the channel [08:55] jhelwig has joined the channel [08:56] herbySk has joined the channel [09:04] mcarter_ has joined the channel [09:17] gerad has joined the channel [09:23] [[zz]] has joined the channel [09:23] thejustinwalsh has joined the channel [09:26] dridge has joined the channel [09:29] mikeal has joined the channel [09:37] FSX has joined the channel [09:38] micheil has joined the channel [09:40] micheil has joined the channel [09:42] stagas has joined the channel [09:43] micheil_mbp has joined the channel [09:45] micheil has joined the channel [09:45] tmpvar: just got texture mapping working in node-ogl [09:47] stagas: so funny: http://stackoverflow.com/questions/2980278/automatic-link-submission-in-search-engine [09:49] ditesh|cassini has joined the channel [09:50] micheil has joined the channel [09:52] micheil has joined the channel [09:53] cheapRoc has joined the channel [10:00] _announcer: Twitter: "http://bit.ly/a6vgpD ¦ [Slides] Real Time Web with #NodeJS ( #TXJS )"-- François-G. Ribreau. http://twitter.com/FGRibreau/status/15546979080 [10:29] romainhuet has joined the channel [10:33] devtime has joined the channel [11:03] sveisvei: stagas: wtf, funny as hell! [11:04] stagas: hahah [11:06] mape: You have a sec to take a look at http://mape.me:8081/test.html ? [11:08] stagas: mape: nice what is it? [11:08] _announcer: Twitter: "node.js did not want to get a complex framework, but a range of very low-level api. There are many active developers to write many of the features for the node.js complete range of small module interfaces, like the table strewn with Lego building blocks for any fight you take. node.js not forced to use a certain mode, such as the python-like dynamics, but also as static as php" [zh-CN]-- aki. http://twitter.com/aki_xavier/status/15549385 [11:08] mape: Well.. that is what I hoped the page would explain :P [11:08] mape: But yeah, did you read the initial text? [11:09] stagas: i'm just now focusing on the bold yet [11:09] stagas: it caches files [11:09] stagas: in real time [11:10] stagas: and merges [11:10] stagas: similar together [11:10] stagas: nice :) [11:11] mape: Yeah, it allows you to merge 10 javascriptfiles into 1, so the user has to do less requests [11:11] mape: It then minifies them to make it smaller, and if you want to you can alter the src of the files using hooks [11:12] mape: So for example in the bottom where I have an example I replace all alert functions in the source with console.log [11:12] mape: And when that is done I wrap all those in if(window.console){console.log(***);} [11:12] mape: And it is all done in real time so I don't have to worry about it in the javascript source, the manager takes care of that. [11:12] mape: Can also be used for fixing vendor-prefixes on css and whatnot [11:14] stagas: where is the example? and firebug shows an error: missing ) after argument list [Break on this error] ;for(var c=0,cl=classNames.length;c.< [13:04] tmpvar: this is mostly scary and useless to work with in js [13:06] _announcer: Twitter: ".@geddyjs, a rails/django like framework for node.js, looks like it has potential to be big. http://geddyjs.org/"-- Scott Messinger. http://twitter.com/scottmessinger/status/15554394578 [13:06] MaSch: for me, the biggest problem is to change from the "java-php-...-thinking" to the "js-thinking" [13:06] MaSch: the object model, event driven programming.. its COMPLETLY differend [13:09] [[zz]] has joined the channel [13:10] MaSch: it works! thanks a lot [13:11] MaSch: tmpvar: https://gist.github.com/427568/e49b3180fac414e151b6e8da8c8732a46e1410a2 [13:12] tmpvar: smooth [13:13] tmpvar: MaSch, "Javascript the good parts" is an excellent book [13:13] MaSch: okay, i think i'll buy it asap [13:14] tmpvar: I'm so happy/excited that I got texture mapping working in node-ogl. this is huuuge :) [13:14] MaSch: yes thats great [13:14] MaSch: how does it perform? [13:17] MaSch: can opengl take advantage from the evented I/O ? [13:18] tmpvar: opengl is non-blocking [13:18] tmpvar: it performs really well :) [13:18] tmpvar: much better than I expected [13:19] ashb: opengl is neither blocking nor non-blocking. [13:19] tmpvar: all the method calls return immediately [13:19] tmpvar: i think the real "blocking" aspect is the swapbuffers [13:20] MaSch: thats why i asked. afaik opengl doesn't realy have something that can block expect loading models/textures from disk [13:20] ashb: and that isn't core opengl iirc, but glut [13:20] MaSch: expect => except [13:20] tmpvar: MaSch, true, but opengl doesn't really provide a way to do that anyhow [13:23] tmpvar: break time [13:25] micheil has joined the channel [13:33] [[zz]] has joined the channel [13:34] micheil has joined the channel [13:37] jetienne has joined the channel [13:38] _announcer: Twitter: "crushing on jruby & padrino, node.js, couchdb, redis, nginx, coffeescript, fab, compass, riak, webmachine, nitrogen - and also on ring apps."-- grantmichaels. http://twitter.com/grantmichaels/status/15556015166 [13:40] mfeiri_ has joined the channel [13:41] stepheneb has joined the channel [13:47] jetienne: q. is there a company behind node.js ? [13:49] MaSch: afaik no [13:51] jetienne: core devs should do that... this gives confidence to people willing to do production work on node [13:51] jetienne: and a company would pay for all the needed-but-crappy work, than volunteers dont want to do :) [13:52] MaSch: but how should this company earn money for paying for all th eneeded-but-crappy work, that volunteers dont want to do? [13:53] tmpvar: jetienne, are your offering? [13:53] jetienne: tmpvar: nope :) [13:53] Aikar has joined the channel [13:53] jetienne: MaSch: dunno. there is always the "provide source for free, entreprise support for a fee" [13:54] jetienne: net10 and mongodb, how do they moneytize? [13:54] drudge: hosting and deployment too [13:54] jetienne: yep some ruby people do that [13:56] MaSch: does anyone know a working mimetype module for node? http://github.com/rsms/node/blob/mimetypes-module/lib/mimetypes.js uses deprecated "promise" [13:57] drudge: what about node-mime [13:57] drudge: http://github.com/bentomas/node-mime [13:58] MaSch: thanks that would work [14:08] [[zz]] has joined the channel [14:08] jetienne: return exports.types[path.extname(filename)] || fallback || exports.default_type; <- i wasnt aware this use of || was available in js [14:13] mape: Sure is, really handy [14:14] stepheneb has joined the channel [14:16] ashb: jetienne: if (a || b) [14:17] ashb: jetienne: its not restricted to just in an if expression - you can use it anywhere [14:17] ashb: var x = y || 'default'; [14:17] jetienne: ashb: this is the normal one. but you may return a/b vqlue or a bool [14:17] ashb: ah yes, || behaves like it does in perl, not in C [14:17] jetienne: ashb: the use for default option is nice but knew it only on ruby [14:17] ashb: i.e. it evaluates to the value of the lhs if the lhs is true not just a 1/0 value [14:18] jetienne: ok [14:18] jetienne: noted [14:18] _announcer: Twitter: "node.js work? # 1 http://ff.im/lyXO6" [ko]-- Outsider. http://twitter.com/Outsider__/status/15558259749 [14:19] stepheneb has joined the channel [14:20] maushu has joined the channel [14:22] herbySk has joined the channel [14:23] _announcer: Twitter: "RT Node.JS to developers who want to know the same post Danielle ~ @ Outsider__: node.js work? # 1 http://ff.im/lyXO6" [ko]-- A.J. http://twitter.com/andrwj/status/15558534533 [14:23] paul_irish has joined the channel [14:25] MaSch: wohoo webserver is working nice :-) [14:34] polotek has joined the channel [14:35] MaSch: damn.. it's raining [14:35] _announcer: Twitter: "node.js work? # 2: Hello World to run http://ff.im/lz04L" [ko]-- Outsider. http://twitter.com/Outsider__/status/15559198937 [14:37] Ori_P has joined the channel [14:43] micheil has joined the channel [14:43] MaSch has joined the channel [14:44] keyvan has joined the channel [14:44] jetienne has joined the channel [14:45] wilmoore has joined the channel [14:46] ly- has joined the channel [14:47] joshbuddy has joined the channel [14:49] jedschmidt has joined the channel [14:49] micheil: hey jedschmidt [14:49] jedschmidt: hey micheil. [14:49] jedschmidt: how ya doin'? [14:49] micheil: not too bad [14:49] micheil: jedschmidt: btw, any thoughts on connect? [14:50] jedschmidt: haven't finished the preso yet. [14:50] jedschmidt: watched a few minutes of it, tho. [14:50] jedschmidt: it's definitely a step in the right direction from express. [14:51] jedschmidt: tho i'm a bigger fan of the more general apps with arity than "filters" (binary apps) and "providers" (unary apps) [14:51] jedschmidt: micheil: what do you think? [14:52] micheil: hmm.. it's an interesting concept [14:52] micheil: I haven't used it yet, but it seems to be something simpler to develop for [14:52] micheil: (eg, no need to worry about arity when writing modules, in a way) [14:52] micheil: even though there's always a next(); [14:52] jedschmidt: not sure i agree with that. [14:53] jedschmidt: but it is simpler at the expense of power, for sure. [14:53] punytan has left the channel [14:53] jedschmidt: i'm not sure arity is something to worry about, heh. [14:54] SamuraiJack has joined the channel [14:55] mape: Doesn't it seem like easy is more important then good at this time? [14:55] mape: To get adoption and therefor a community of users that can promote and build more stuff around it [14:56] _announcer: Twitter: "Ruby-on-rails, Node.js, MongoDB, GIT, JQuery" [sv]-- Dmitry Smirnov. http://twitter.com/zmitruk/status/15560485176 [14:56] polotek: I still haven't checked out the Connect pres either. On my list for today [14:56] _announcer: Twitter: "Nowadays a lot of words that hard-core Perl hacker Node.js Marc Lehmann (http://bit.ly/aa5H2r) made libev (http://bit.ly/Cx44N) and was used boots ~" [ko]-- aero. http://twitter.com/aer0/status/15560503045 [14:57] polotek: I was in some discussions about the direction of it so I'm curious as to how it developed [14:57] mape: Was easy enough to develop for, if I did it right that is [14:57] polotek: sounds much different than the version I had envisioned [14:57] jedschmidt: mape: for short term apps, maybe. i'd like to build something that scales well, in a way that simpler things like sinatra don't. [14:57] micheil: jedschmidt: I'm just wanting a routing dsl, then I'm fine. [14:58] polotek: jedschmidt: the only reason sinatra doesn't scale is because of the threads and blocking io [14:58] mape: jedschmidt: Well for anything, just that fact that there is no definitive web framework for node might be an issue [14:58] micheil: in my opinion, I think the rails3 router got a lot of things right, although, a lot of people will tell me I'm wrong. [14:58] _announcer: Twitter: "@ Artem_a nenene. My výbor: Django, node.js, MongoDB, Bazaar, jQuery." [hr]-- myfreeweb. http://twitter.com/myfreeweb/status/15560593090 [14:58] polotek: the challenge was to wrap a usable framework structure around node [14:58] jedschmidt: polotek: disagree. sinatra is more for building endpoints, not middleware etc. that's what rack is for. [14:58] polotek: so you could still take advantage of the non-blocking nature and more importantly, streaming [14:59] polotek: that depends on your outlook [14:59] jedschmidt: mape: well, there was no definitive package manager a month ago. we're getting a lot closer now. [14:59] polotek: middleware is an idea about how to organize architecture [14:59] polotek: you're not prevented from doing it in sinatra [14:59] polotek: it just doesn't give you any helpful infrastructure [14:59] mape: jedschmidt: For sure, I'm just saying better to have it now then later, but not that things won't change [15:00] jedschmidt: mape: i can't disagree with that, but think there are already some choices now. [15:00] jetienne: i liked rack and how it is organized [15:00] jetienne: url for connect pres/ [15:00] jetienne: ? [15:01] jedschmidt: http://vimeo.com/12316916 [15:02] micheil: so no-one's for just a standard routing middleware? [15:02] jedschmidt: i'm excited to see where they take it. [15:03] steadicat has joined the channel [15:03] micheil: (I'm meaning something that sits directly at http level, checks the domain, path, and that's about all) [15:03] jedschmidt: isn't there already something like that, from creationix? [15:03] jetienne: micheil: this already exist no ? [15:03] _announcer: Twitter: "Finally got around to installing node.js. Thank you @creationix for pushing me over the edge yesterday with your mind blowing demo at #txjs."-- Boaz Sender. http://twitter.com/BoazSender/status/15560912619 [15:03] polotek: micheil: the reason I became interested [15:03] polotek: is I want to create a different kind of routing middleware [15:03] polotek: or routing module really [15:04] polotek: rather than the list of regexes paradigm [15:04] polotek: I want a framework that will support it in a sensible way [15:04] micheil: well, I mean, to really reflect the language of js, you have two approaches, (fab) style with deeply nested chained functions [15:04] jedschmidt: polotek: how would it differ? i don't like the list of regexes either, which is why i broke it down into an app per routew. [15:04] micheil: or you can go for strings mapping to functions [15:05] polotek: jedschmidt: I mean the routing technique itself is different [15:05] markwubben_ has joined the channel [15:05] nsm has joined the channel [15:05] micheil: or, a third which is to combine the two [15:05] polotek: I want to support an tree structure of model objects [15:05] polotek: and the routing would essentially be traversing that tree structure [15:06] polotek: and dispatching would be calling methods on the nodes [15:06] micheil: var s = router.createServer(); s.use(middleware); s.onRoute(...) [15:06] markwubben_ has joined the channel [15:06] polotek: so /users/polotek [15:06] micheil: s.resources(object) [15:06] polotek: would route from the root to the users object to the polotek object [15:06] micheil: maps all object methods to a route [15:06] polotek: which is an instance of user (me) [15:06] micheil: however, also make it continuable in a curried manner [15:07] micheil: I do also quite like some of the ideas present in: http://ministerwebserver.com/docs/getting_started/#a-simple-tutorial [15:07] jedschmidt: micheil: ah, thanks for that link. haven't seen that. [15:08] polotek: dammit v8 is driving me nuts [15:08] micheil: jedschmidt: that is python, minds you. [15:08] jetienne: i want a framework which handle offline gracefully and automatically using the fact it is js all around... Additionally it would allow to offload the server/client in a rather transparent fashion... even if i dont think it will happen anytime soon [15:08] jedschmidt: micheil: what is python? nyuk. [15:08] micheil: jedschmidt: the core idea there is that it mounts any application as a naked webserver, based on a json file [15:08] micheil: jedschmidt: minister [15:09] jedschmidt: micheil: interesting. [15:09] micheil: on that page, scroll down a little until you see the json data [15:09] jedschmidt: aight, it's getting late in tokyo. i'm gonna head out. [15:09] micheil: jedschmidt: it's 1am AU [15:09] _announcer: Twitter: "http://ping.fm/fOHMX presentation of connect: nodejs + ExtJS" [es]-- Jerome Etienne. http://twitter.com/jerome_etienne/status/15561289238 [15:09] derbumi has joined the channel [15:09] micheil: so.. what, 12midnight TK? [15:09] micheil: / JP [15:09] jedschmidt: micheil: ha ha. i am half the hardcore nerd you are. [15:10] jedschmidt: yeah. [15:10] micheil: jedschmidt: heh.. 6am last night, 5am the night before. [15:10] micheil: my body clocks' buggered. [15:10] jedschmidt: micheil: but i still need to sleep off my hangover from this morning. [15:10] micheil: feels like 4pm to me. [15:10] micheil: heh heh, G'night then ;P [15:10] jedschmidt: that's a good schedule to be in sync with nodejsland. [15:11] jedschmidt: micheil: gnight! [15:11] jedschmidt has left the channel [15:11] mape: nn [15:16] mau has joined the channel [15:19] MaSch: is nodes "require" a "require_once".. so if i require foo.js and bar.js and bar.js requires foo.js, does he include foo.js twice? [15:21] ajpiano has joined the channel [15:22] micheil: it's a requires per module [15:22] micheil: modules get cached, so theres only a single fs hit [15:23] micheil: however, iirc, every require() returns a new instance in a way [15:23] jetienne: what about execution ? [15:23] micheil: so, var x = require("foo"), y = require("foo"); [15:23] jetienne: so every require will run the module, correct ? [15:24] polotek: jetienne: no, it's cached [15:24] polotek: it won't run the module code [15:24] micheil: x === y [15:24] MaSch: okay thats nice [15:24] MaSch: thanks! [15:24] micheil: however, there'll only be one request for file "foo" [15:25] micheil: so, if you have stuff that happens automatically in "foo", it will be run. [15:25] micheil: (although, only in the context of x or y) [15:27] jetienne: polotek: ok [15:30] keyvan has joined the channel [15:31] landonlewis has joined the channel [15:31] derbumi has joined the channel [15:39] xer0x has joined the channel [15:39] dji has joined the channel [15:45] MattJ has joined the channel [15:49] markwubben_ has joined the channel [15:50] MaSch: with _self(..) i call the method itself again? [15:51] mikeal has joined the channel [15:53] _announcer: Twitter: "I'm pretty excited about the things I learned at #txjs especially #nodejs"-- elofland. http://twitter.com/elofland/status/15563939372 [15:56] pgriess has joined the channel [15:59] jetienne: q. when i put a callback, am i ensured it wont be called in the current iteration of the event loop ? [15:59] mape: depends on when the callback is called? [15:59] polotek: stupid question [15:59] polotek: what's the difference between gcc and g++? [16:00] jetienne: gcc is C, g++ is c++ [16:00] MaSch: gcc doesn't precompile c++ [16:00] polotek: that's what I thought [16:00] polotek: so shouldn't node be using g++ if it's available? [16:00] jetienne: g++ is just a front for gcc [16:01] polotek: this is not something I want to be worrying about [16:01] MaSch: iirc g++ calls gcc after precompiling the C++ code to C code [16:01] polotek: I don't think the problems I have are related to the compiler at all [16:01] polotek: I've just been banging my head against this for days with no leads [16:02] jetienne: polotek: running on a exotic plateform ? [16:03] pgriess has joined the channel [16:03] polotek: os x 10.6 [16:04] jetienne: polotek: i dont use mac, but im sure nodejs is supported on it. [16:04] polotek: jetienne: I've been using node for months [16:04] polotek: that's not the problem [16:05] polotek: it compiles fine [16:05] aho has joined the channel [16:05] polotek: I'm working on a C++ addon [16:09] joshbuddy has joined the channel [16:19] derbumi has joined the channel [16:22] jetienne has joined the channel [16:24] MaSch: wtf O.o sometimes this evented i/o shocks me [16:26] MaSch: when handling a request im printing some debug stuff, making a request to the couchdb server and then printing the requestet couchdb document [16:26] MaSch: i got the print of the couchdb Document befor the debug message "creating database object" O.o [16:26] MaSch: thats wired [16:27] _announcer: Twitter: "When you install ubuntu to be installed in Node.js help? Ubuntu install because Mac is still studying a Node.js I want to see the movie too, because you love to look at the source ^ ^ If you're trying to get a swim in the morning, all happy night ^ getdang" [ko]-- Kim Sang Youl. http://twitter.com/r2fresh/status/15565975679 [16:30] [[zz]] has joined the channel [16:32] polotek: depends on how your code is structured [16:32] polotek: MaSch: are you using sys.debug? [16:32] MaSch: polotek: sys.puts and sys.p [16:32] polotek: there you go :) [16:32] polotek: sys.puts buffers the output [16:32] polotek: it's async [16:32] polotek: so it might be delayed [16:32] MaSch: ahh okay [16:33] polotek: use sys.debug for immediate output [16:33] MaSch: sys.p does'n buffer? [16:33] polotek: I think sys.p was removed [16:33] polotek: or deprecated at least [16:34] polotek: but yes, also async [16:36] dji has joined the channel [16:38] jetienne has joined the channel [16:38] jetienne has joined the channel [16:39] jherdman has joined the channel [16:42] _announcer: Twitter: "@ironick heard Yahoo dev talk about node.js at #txjs. He said Y! is looking at it v. seriously for various projects. (it works well w/ YUI)"-- Peter Keane. http://twitter.com/pkeane/status/15566818067 [16:44] jetienne: that would be a good company support :) [16:44] jetienne: q. is there a widely used insource documentation system for js ? [16:48] dandean has joined the channel [16:48] derbumi has joined the channel [16:50] hartley231 has joined the channel [16:52] niklasfi has joined the channel [16:55] micheil: jetienne: no, prefer documentation is generally in markdown files [16:55] micheil: or in wikis / websites [16:55] MattJ: \o/ [16:55] MattJ: <-- hates inline documentation [16:57] jetienne: ok [16:59] Yuffster has joined the channel [16:59] mindeavor has joined the channel [17:02] _announcer: Twitter: "@ Muslimov business logic can be in JavaScript, nodejs.org, particularly true of online games and other ajaxa" [ru]-- ramainen. http://twitter.com/ramainen/status/15567885730 [17:07] jetienne: hmm the url is a tweet in russian... autotranslation is becoming scary [17:09] tav has joined the channel [17:10] [[zz]] has joined the channel [17:17] sechrist__ has joined the channel [17:27] Gruni has joined the channel [17:27] MaSch: doesn't http.Server support POST data? [17:28] ashb: it almost certainly does [17:29] MaSch: but to use it i had to parse the request by myself? [17:30] mikeal: of course [17:30] ashb: 'by yourself' = use a lib to do it, but yes [17:31] _announcer: Twitter: "#txjs was great, #jquery and #nodejs were definitely the stars of that event"-- Artem Nezvigin. http://twitter.com/Artnez/status/15569507169 [17:35] mikeal: you can use my request library [17:35] mikeal: http://github.com/mikeal/node-utils/tree/master/request/ [17:38] MaSch: mikeal: thanks. i quick-fixed it by checking req.method == post and then adding event listener to parse the body but a nice librar would be better [17:38] mikeal: request also handles basic auth and some other stuff for you [17:39] MaSch: whats npm ? [17:39] _announcer: Twitter: "Never put a # nodejs older versions, though they are under cygwin, path. Net - do not. Then the syntax would have to retrain." [ru]-- ramainen. http://twitter.com/ramainen/status/15569900374 [17:39] mikeal: it follows 3xx response forwards automatically [17:39] _announcer: Twitter: "@abustin I'm beginning to see flash's shortcomings, too. Do u have any non as3 samples you can share? You mentioned node.js a while back?thx"-- Michael Kaufman. http://twitter.com/flabbygums/status/15569915857 [17:39] mikeal: blahblah blah [17:39] mikeal: MaSch: package manager [17:40] mikeal: http://github.com/isaacs/npm [17:40] MaSch: oh okay nice [17:40] MaSch: mikeal: is this a client library? [17:40] mikeal: yes [17:40] mikeal: haha, i just realized you're writing a server and not a clinet [17:40] MaSch: oh .. okay :-) i need the serverside [17:40] mikeal: nm :) [17:40] mikeal: what are you doing with the request body? [17:41] mikeal: are you writing it to the filesystem? [17:43] MaSch: noo [17:43] kixxauth has joined the channel [17:43] MaSch: http://github.com/themasch/jsChat/blob/master/server.js see handleRequest [17:43] MaSch: and yes: i know the code is messy [17:43] mikeal1 has joined the channel [17:44] mikeal1: oh i see [17:44] MaSch: works fine for me [17:45] mikeal1: yeah, that'll work for form posts [17:46] MaSch: thats all i currently need [17:46] MaSch: i don't need file upload or stuff like that [17:46] mikeal1: if you want to write it to another stream, like a socket or a file, you should use pump [17:46] mikeal1: http://groups.google.com/group/nodejs/browse_thread/thread/3727c0fd95a65d99/9aec072562fbc5e3?#9aec072562fbc5e3 [17:49] MaSch: okay [17:50] softdrink has joined the channel [17:52] mrjjwright has joined the channel [17:52] rnewson has joined the channel [17:54] polotek: mikeal1: does pump work for http now? I remember it was having issues before? [17:54] mikeal1: it *should* [17:54] mikeal1: ry said he added all the stuff [17:54] mikeal1: i think we need to add a "close" event [17:55] lobridge has joined the channel [17:55] _announcer: Twitter: "landed texture mapping in node-ogl, #nodejs ftw! proof: http://github.com/tmpvar/node-ogl/raw/master/example/nehe/lesson6.png"-- Elijah Insua. http://twitter.com/tmpvar/status/15570760491 [17:56] liucougar has joined the channel [17:57] polotek: v8 hates me [17:58] jetienne has joined the channel [17:59] derbumi has joined the channel [18:02] pdelgallego has joined the channel [18:03] pgriess has joined the channel [18:03] MaSch: is there an easy way to force a async function into a sync function. i don't want to create a new method just for crypting a password [18:05] MaSch: ohh.. node.js supports hashes .. [18:06] saikat has joined the channel [18:08] niklasfi has joined the channel [18:21] thejustinwalsh has joined the channel [18:22] sveisvei has joined the channel [18:23] polotek has joined the channel [18:23] ceej has joined the channel [18:24] polotek: MaSch: don't do that :) [18:25] _announcer: Twitter: "Wrote some unit tests for my node.js templater. Pretty slick! Really cuts down on dev time."-- Chris Jaure. http://twitter.com/chrisjaure/status/15572286646 [18:31] sudoer has joined the channel [18:33] rictic has joined the channel [18:33] hellp has joined the channel [18:44] _announcer: Twitter: "@neurodamage Haven't looked at Bespin in a while. But they're switching to full-stack JS, using, of course Node: http://is.gd/cEW4q"-- Matthew Eernisse. http://twitter.com/mde/status/15573251097 [18:48] edspencer has joined the channel [18:52] mfeiri_ has joined the channel [19:01] Aria has joined the channel [19:04] stepheneb has joined the channel [19:09] b_erb has joined the channel [19:17] _announcer: Twitter: "Node.js - is that super-cool or what?!"-- Honza Pokorny. http://twitter.com/_honza/status/15574930638 [19:18] nicolaerusan has joined the channel [19:19] nicolaerusan: hey [19:19] DracoBlue has joined the channel [19:19] _announcer: Twitter: "Played with #nodejs all afternoon, will demo to colleagues tomorrow! @voormedia #codetalk"-- Roel van Dijk. http://twitter.com/rdvdijk/status/15574990453 [19:19] nicolaerusan: got a question for the peoples [19:19] nicolaerusan: what is the best way to handle cookies in node? [19:19] niklasfi has left the channel [19:21] mde|afk: I did something like this: http://github.com/mde/geddy/blob/master/geddy-core/lib/cookies.js [19:21] mfeiri_ has joined the channel [19:21] _announcer: Twitter: "So much to play with over the summer. I want to look in to Node.js and Redis."-- Brandon Titus. http://twitter.com/bjtitus/status/15575123636 [19:23] nicolaerusan: so many frameworks for node!! madness :) [19:23] boaz has joined the channel [19:23] nicolaerusan: thnx, i am reading the code now [19:23] boaz has left the channel [19:24] mde: The biggest thing to trip over is multiple, same-named Set-Cookie headers. [19:24] tmpvar_ has joined the channel [19:25] mde: That's what the hack in the serialize method is for, so you can set multiple headers. [19:25] boaz has joined the channel [19:26] afters has joined the channel [19:28] niklasfi2 has joined the channel [19:28] niklasfi2: has anyone played around with html file uploads? [19:33] nicolaerusan has joined the channel [19:38] afters: how should I go about creating a cryptographically secure random number? [19:38] siculars has joined the channel [19:39] jetienne: afters: read /dev/random [19:39] pzich: heh [19:42] cloudhead has joined the channel [19:44] afters: I know little about crypto, so my reading led me to recommentdations to use openssl or gpg. [19:44] afters: I'll go read a little about /dev/random [19:46] jetienne: afters: what do you wanna do with crypto? [19:46] ryan[WIN]: what do you mean by cryptographically secure random number [19:46] afters: jetienne: salts and session id [19:46] _announcer: Twitter: "Thinking about checking out Node.js tonight. I'm Probably the last person in the entire Rails community to not have tried it, but anyway."-- David Trasbo. http://twitter.com/dtrasbo/status/15576360432 [19:47] b_erb has joined the channel [19:47] thejustinwalsh: niklasfi2: http://www.componentix.com/blog/13 [19:49] niklasfi2: @thejustinwalsh thanks [19:49] niklasfi2: that looks like it will help [19:49] jetienne: afters: use /dev/urandom then [19:49] jetienne: afters: and salt doesnt need to be that good random [19:50] thejustinwalsh: niklasfi2: np, i was about to do some uploads myself, and found this guy yesterday [19:50] _announcer: Twitter: "@mamund or how about i write a js that creates a A DOMElement, add href, text etc to it and adds it as a child node on doc for a user.."-- nathan. http://twitter.com/webr3/status/15576549533 [19:50] jetienne: ryan[WIN]: he means hard to guess numbers... even against powerfull attackers [19:51] ryan[WIN]: jetienne, yes but that tells us nothing of the context [19:52] afters: jetienne: I'll look into /dev/urandom [19:53] afters: I'm currently spawning 'openssl rand'. I thought it might be an overkill [19:53] saikat has joined the channel [19:54] jetienne: ryan[WIN]: yep, most use a secret in the server and md5(some short lived context) [19:54] ctp has joined the channel [19:55] afters: ryan[WIN]: I'd like to put an unique identifying token in an http cookie [19:56] ryan[WIN]: something like a GUID? [19:56] afters: yeah [19:57] jetienne: http://github.com/280north/narwhal/blob/master/lib/uuid.js the new version of crypto strong number :) [19:58] ctp: hi folks. anyone has a hint for me how to read a file non-blocking and write its line by line non-blocking. here's the code snippet i'm working on (line 26 is my actual question): http://pastebin.com/YXKH39Fc [19:58] jetienne: aka rely on normal Math.random :) [19:58] _announcer: Twitter: "Having fun with user streams and node.js. Real-time updates and followings. http://twitpic.com/1uks7q"-- Damon Cortesi. http://twitter.com/dacort/status/15576933491 [19:59] keeto has joined the channel [20:00] chbm has joined the channel [20:00] dji has joined the channel [20:00] afters: ryan[WIN]: it should be an unpredictable GUID, to be precise [20:00] chbm: hi [20:01] afters: (or preicse as I can be, knowing very little about crypto) [20:01] chbm: guys, I'm sure someone must've done fgets alreadr for fs but I can't find anything [20:02] polotek: ctp: what's the problem with what you have? [20:04] _announcer: Twitter: "Will used this HTML5 Forms article http://24ways.org/200903 as the basis for my HAML, SASS (using node.js Express) auto form framework."-- Ewoud van den Boom. http://twitter.com/ewoudj/status/15577219389 [20:05] polotek: chbm: fs.read or fs.readFile [20:05] polotek: what are you reading? [20:05] ctp: polotek: i'm new in node but afaik the code snippet i posted reads the whole file and puts its as one blob. the file contains 10 million urls (i'm working on a node crawler ;-)), so what i'm looking for is to read it line by line and to fire event foo on every line. so my first goal is to read the file line by line and to "fire" response.write for every line read in as first, [20:06] ryah: ctp: use fs.ReadStream [20:06] ryah: ctp: to read the file [20:06] ryah: each time you get a chunk, write it to the response [20:07] ctp: ryah: ah, ok. mni thx ;-) [20:07] ryah: if write returns false, puase the file ReadStream [20:07] ryah: (so to not load it all into memory) [20:07] ctp: yepp [20:07] ryah: we're wroking on ways to simplify this, but it's not there yet [20:07] ryah: should be something like [20:08] ryah: f = fs.createReadStream(filename); [20:08] polotek: ryah: he'll have to process the chunks into lines though won't he? [20:08] ryah: pump(f, res); [20:09] ryah: i guess- i thik he can figure that out [20:11] ctp: yepp, i understand. mni thx guys [20:11] polotek: okay v8 doesn't hate me [20:12] polotek: libxml2 hates me [20:13] JimBastard has joined the channel [20:13] JimBastard: sheep go to heaven, goats go to hell [20:19] siculars has joined the channel [20:23] niklasfi2: was multipart removed? [20:23] DracoBlue: yes [20:25] niklasfi2: :( [20:26] cheapRoc has joined the channel [20:26] JimBastard: niklasfi2: there is a bunch of code for it [20:26] JimBastard: its everywhere [20:27] JimBastard: http://github.com/isaacs/multipart-js [20:27] JimBastard: there is also the drop in replacement [20:27] JimBastard: from where it was removed [20:27] niklasfi2: yes i am curently reading that [20:27] JimBastard: what you trying to do [20:28] niklasfi2: still working on the file upload [20:28] JimBastard: http://github.com/Marak/hook.io/blob/master/hookio/lib/multipart.js [20:28] JimBastard: not sure if that works with HEAD [20:30] pgriess has joined the channel [20:38] derbumi has joined the channel [20:44] ctp: ryah + polotek: hm, you meant something like this: http://pastebin.com/Zwz4EMew ? i'm not sure how to express my aim ;-) [20:46] polotek: ctp: almost, but pump is asynchronous, you can't call res.end directly after [20:46] polotek: or you won't get anything [20:46] polotek: in fact, the version of pump you're using will call end for you when it's done [20:49] ctp: hm, so i have to call pump outside the block? *confused* [20:49] nicolaerusan: quick js question - how do you pass variables by reference? [20:49] nicolaerusan: (string in particular) [20:50] polotek: nicolaerusan: in v8? [20:50] nicolaerusan: polotek: yup [20:50] polotek: depends on what you're doing [20:50] nicolaerusan: polotek: writing a function to pretty print objects [20:50] nicolaerusan: here lemme pastebin [20:51] nicolaerusan: http://pastebin.com/DSXscCng [20:51] nicolaerusan: lots of junk but you will see what i ma trying to do [20:51] Aria: Ah, adding to output? [20:51] nicolaerusan: yup [20:51] nicolaerusan: tis not working [20:52] nicolaerusan: inside the helper [20:52] nicolaerusan: i mean, it adds it in the helper [20:52] nicolaerusan: but then when it returns [20:52] nicolaerusan: to the caller [20:52] polotek: nicolaerusan: you should use Object.keys to get the property names [20:52] nicolaerusan: it is not there (i.e. it's like its pass by value) [20:52] polotek: and hasOwnProperty to filter prototype properties [20:52] nicolaerusan: polotek: ok, but beyond that, the problem still remains [20:53] Aria: Heh, other than that I'd never do it that way (I'd use a closure and just share the string...), you can pass an object and assign a string to a property of it. [20:53] polotek: and you need to return output [20:53] polotek: from toSourceHelper [20:53] nicolaerusan: yah so that wouldn't be passing by reference [20:53] nicolaerusan: i mean internally, its a pass by value? [20:53] nicolaerusan: just wanted to know if it was possible to do it like this [20:53] polotek: javascript doesn't pass primitives by reference [20:53] nicolaerusan: i c [20:54] polotek: I thought you were in v8 C++ [20:54] nicolaerusan: i thought they were ultimately objects as well [20:54] nicolaerusan: nope [20:54] polotek: yo ucould also take Aria's advice and use a closure [20:54] nicolaerusan: so if i made a string object [20:54] Aria: strings convert to objects silently often [20:54] nicolaerusan: would that change things [20:54] nicolaerusan: ? [20:54] nicolaerusan: if i explicitly made a string object? [20:54] polotek: nicolaerusan: no, you'll get the same behavior [20:54] Aria: Yeah, no. [20:57] polotek: nicolaerusan: you could also pass an array around and call join at the end [20:57] polotek: would at least avoid the string copying [20:57] nicolaerusan: kk, thanks for the input [20:57] nicolaerusan: i am surprised this type of facility [20:57] nicolaerusan: to print objects [20:57] nicolaerusan: in a pretty way [20:57] nicolaerusan: is not built in [20:57] nicolaerusan: is it? [20:57] polotek: yes :) [20:58] polotek: sys.inspect(obj) [20:58] nicolaerusan: haha [20:58] nicolaerusan: ahh [20:58] nicolaerusan: i c [20:58] polotek: toSource is different from pretty printing [20:58] nicolaerusan: that would be a better way to go [20:58] nicolaerusan: yah i googled [20:58] polotek: which is why I didn't mention it before [20:58] nicolaerusan: they mentioned ffox had it [20:58] nicolaerusan: saw v8 didnt [20:58] nicolaerusan: so was gonna write it [20:58] nicolaerusan: ok [20:58] nicolaerusan: i will use sys.inspect(obj) [20:58] polotek: toSource is a literal representation supposedly suitable for evaling [20:58] nicolaerusan: whats a good way to do it in the browser? [20:58] ctp: polotek: hmhm, not sure if i understand you, but you mean something like this: http://pastebin.com/kmVE6zjF ? tried it out, but i'm not sure how to write the output read in by streamreader. [20:59] _announcer: Twitter: "Experimenting with node.js, found that JSON.stringify is globally available. Very handy. #nodejs"-- Tim Hastings. http://twitter.com/timhastings/status/15579948312 [20:59] ctp: polotek: the code hangs [21:00] polotek: ctp: that's because pump does not exist. [21:00] polotek: ryah was using it as an example of what will be available at some point [21:00] polotek: but it's not ready to use for http right now [21:00] polotek: so you'll have to listen to the data event on your readstream and push it into res.write yourself [21:01] ctp: aaah, ok [21:01] nicolaerusan: hmm [21:01] nicolaerusan: sys.inspect [21:01] nicolaerusan: is not working [21:02] chbm: sorry, was managing the kids [21:02] nicolaerusan: just freezes up the server [21:02] nicolaerusan: sys.inspect(req); [21:02] thejustinwalsh: sys.debug(sys.inspect(req, true)); [21:02] nicolaerusan: ok [21:02] nicolaerusan: i c [21:02] nicolaerusan: thx [21:03] chbm: polotek: i need fgets which gets a line at a time, readFile slurps the whole file [21:03] thejustinwalsh: And i had the same issue with the server not responding after inspecting a request... [21:04] polotek: chbm: you'll have to stream the file and process the lines yourself [21:04] polotek: fs.ReadStream [21:04] _announcer: Twitter: "Grr! Just wasted like an hour reading about node.js, jazz, express.. and deploying all of those!"-- Honza Pokorny. http://twitter.com/_honza/status/15580251842 [21:05] ewdafa: wasted eh [21:06] chbm: polotek: yeah :) I'm just annoyed cause when I started with C libc was already written :P [21:06] nicolaerusan: thejustinwalsh: it works for me now [21:06] polotek: chbm: There will be more convenience methods built up around node [21:06] polotek: but it pays to learn the lower level apoi [21:06] polotek: api [21:06] thejustinwalsh: that tweet sounds like a spoiled capistrano user :p [21:07] chbm: oh well, I'll just ReadFile and walk the buffer splitting lines [21:07] ryah: ctp: there is no pump yet [21:07] thejustinwalsh: nicolaerusan: right on! [21:09] felixge has joined the channel [21:09] felixge has joined the channel [21:11] alex-desktop_ has joined the channel [21:17] mrjjwright has joined the channel [21:20] sztanpet has joined the channel [21:21] creationix has joined the channel [21:24] nicolaerusan: hey are there some stable drivers for mysql with node? [21:25] _announcer: Twitter: "Flight to baltimore delayed. Who wants to hack on node.js stuff at #railsconf :)"-- Zach Carter. http://twitter.com/zii/status/15581250715 [21:25] nicolaerusan: found a few out there, was just wondering if there is anything that is becoming more standard [21:34] dgathright has joined the channel [21:36] creationix has joined the channel [21:37] _announcer: Twitter: "@saikatc I am. But this particular gripe stemmed from V8 (node.js)."-- rentzsch. http://twitter.com/rentzsch/status/15581867566 [21:39] rictic has joined the channel [21:41] thejustinwalsh: wow, ninjatown trees of doom update... game got way harder. off-topic :) [21:41] _announcer: Twitter: "Installing some 32bit Fedora instances on @virtualbox so I can give node.js a whirl. #nodejs"-- Chris Lea. http://twitter.com/chrislea/status/15582064245 [21:44] TommyM has joined the channel [21:48] freshtonic has joined the channel [21:53] hartley231 has joined the channel [21:54] _announcer: Twitter: "Today I will be mostly learning Node.js. Mostly."-- Tom Meier. http://twitter.com/PommyTom/status/15582662061 [21:58] dgathright_ has joined the channel [22:00] yashh has joined the channel [22:04] yashh: http://gist.github.com/427947 I am trying to tail a log. tail.stdout.addListener("output") does n't seem to catch the event [22:04] yashh: am i using the output event on wrong object? tail.stdout ? [22:04] devtime has joined the channel [22:05] derbumi has joined the channel [22:05] ryah: yashh: 'data' [22:06] hartley231 has left the channel [22:06] mindeavor has joined the channel [22:09] yashh: ryah: works. thanks . Is this approach right. ? [22:09] siculars has joined the channel [22:09] hartley231 has joined the channel [22:17] SteveDekorte has joined the channel [22:17] nicolaerusan: any good examples of doing comet with node? I am currently using web sockets in my app, but I want to have a fall back to comet [22:18] nicolaerusan: ( I know there are flash based sockets, but I don't want to rely on flash) [22:21] ryah: nicolaerusan: checkout node-chat [22:21] nicolaerusan: ryah: thx, taking a look [22:22] mape: creationix: http://mape.me:8081/test.html is there any way I can integrate that into outputing a var in the template? is the middleware takes care of a cache var that is appended to the link/scripttag in the html [22:25] hartley231: nicolaerusan: you may want to check out the forked Socket.IO that supports Draft 76 of Websockets at http://github.com/mscdex/Socket.IO-node/ [22:26] ryah: has anyone got the cygwin patch to compile ? [22:26] ryah: i can't get it work [22:26] ryah: (but i know nothing of windows) [22:27] charlesjolley- has joined the channel [22:34] SteveDekorte has joined the channel [22:35] magcius has joined the channel [22:36] SteveDekorte: does v8 support coroutines? [22:38] yashh has left the channel [22:41] [[zz]] has joined the channel [22:42] ryah: SteveDekorte: http://code.google.com/p/js-coroutine/ [22:44] SteveDekorte: ryah: cool - thanks [22:55] richcollins has joined the channel [23:02] temp01 has joined the channel [23:06] tav has joined the channel [23:07] polotek: ryah: ever had the problem where memory RSS keeps going up even through heap and external memory seem to be under control? [23:09] ryah: polotek: hm - donno [23:10] nicolaerusan: what's the best way to handle post parameters in node? [23:13] tilgovi has joined the channel [23:17] Guest25607: nicolaerusan, post? Well, get the data using the data event and then parse like if it were a query string. [23:18] sztanpet has joined the channel [23:20] tilgovi: pgriess: I'm trying to build node-msgpack but getting errors about recompiling with -fPIC [23:21] nicolaerusan: great [23:21] nicolaerusan: thanks [23:21] nicolaerusan: its working :) [23:23] _announcer: Twitter: "Wrapping my mind around the low server-side resource cost of many idle connections with #nodejs"-- Tim Hastings. http://twitter.com/timhastings/status/15587359699 [23:24] nicolaerusan: hmm getting a strange bug when i try to use querystring.parse(chunk) [23:25] nicolaerusan: http://pastebin.com/BnfqDkNj [23:26] ryah: nicolaerusan: you probably should "setEncoding('utf8') [23:29] ryan[WIN]: wee [23:31] sztanphet has joined the channel [23:31] nicolaerusan: ryah: i call that on the connection event, on the stream object? [23:32] nicolaerusan: ryah: i guess i can call request.connection.setEncoding('utf8)? [23:32] SteveDekorte: anyone here compiled js-coroutine on OSX? [23:33] devtime has joined the channel [23:33] stepheneb has joined the channel [23:35] nicolaerusan: hmm not working [23:37] nicolaerusan: ryah: any ideas? [23:38] hassox has joined the channel [23:41] _announcer: Twitter: "Am I insane thinking I could replace everything or just about everything I do in Ruby with Node.js? I'm really impressed with it. #nodejs"-- Chris@SocialTexture. http://twitter.com/communicating/status/15588323696 [23:42] joshbuddy has joined the channel [23:45] o_o has joined the channel [23:47] _announcer: Twitter: "@steida although I agree it'd be rad to have a Node.js hosting environment for CouchApp design docs."-- CouchApp. http://twitter.com/couchapp/status/15588654912 [23:49] _announcer: Twitter: "@steida also you should check out @mikeal's http://github.com/mikeal/node.couchapp.js which is a completely different way of thinking."-- J Chris Anderson. http://twitter.com/jchris/status/15588767934 [23:50] Validatorian has joined the channel [23:50] mrjjwright has joined the channel [23:52] ryah: nicolaerusan: req.setEncoding('utf8' [23:54] nicolaerusan: ryah: beauty [23:56] creationix has joined the channel [23:57] kloeri has joined the channel [23:58] tilgovi: anyone built node-msgpack?