[00:00] sudoer has joined the channel [00:01] _announcer: Twitter: "My beloved node.js 711-bytes website code :-) http://gist.github.com/619726 - Oh procrastination, I should study Portuguese right now.." -- Rodrigo Alves Vieira. http://twitter.com/rodrigo3n/status/26982678345 [00:03] __mn__ has joined the channel [00:12] prettyrobots has joined the channel [00:16] gleicon has joined the channel [00:16] _announcer: Twitter: "@ochko node.js аягүй сонин эд байгаа биз?," -- Tulga. http://twitter.com/melug/status/26983742617 [00:16] gm__: any guides on using libraries built originally for browsers on node.js ? [00:17] jesusabdullah: It really depends, gm__ [00:17] gm__: there is an object inside it which I issue a new on the browser [00:17] gm__: I cant manage to use it on node [00:18] jesusabdullah: Some of them, you just have to figure out how to import them (running eval() on the code works, for example.) [00:18] gm__: hm, eval() [00:18] jesusabdullah: Or, wrapping the original library in some module.exports() action [00:18] jesusabdullah: Other times, though [00:18] jesusabdullah: If it requires the DOM, then you'll have to make it work with jsdom [00:18] gm__: its the diff patch match library, really simple to use in the browser [00:18] gm__: no DOM needed [00:18] jesusabdullah: Unfamiliar with this library [00:19] jesusabdullah: but if it doesn't do any DOM manipulations, then you just have to get it imported somehow :) [00:19] jesusabdullah: I've done the "adding your own module.exports" stuff before, works reasonably assuming the code is clean [00:19] gm__: http://7co.cc/2x [00:20] gm__: I am searching for module.exports on google [00:20] jesusabdullah: hold o0n [00:20] jesusabdullah: hold your horses [00:20] jesusabdullah: http://nodejs.org/api.html#modules-312 [00:20] jesusabdullah: You can thank me later! [00:20] jesusabdullah: This tells you how to export functions in node [00:21] gm__: the whole x = new class stuff from browser is what bugs me [00:21] gm__: thanks ! [00:21] jesusabdullah: Oh [00:21] jesusabdullah: Then either export the constructor [00:21] jesusabdullah: ie, [00:22] ryah: mikeal1: if you want to try: http://gist.github.com/619753 [00:22] jesusabdullah: exports.class = function() { ... } [00:22] jesusabdullah: or you can export the resulting object [00:22] jesusabdullah: module.exports = new function() { ... } [00:22] jesusabdullah: Either way [00:22] jesusabdullah: (Two different uses of exports there, btw) [00:22] mikeal1: ryah: i'm writing up the error handling proposal right now [00:22] gm__: cool, I could avoid using new in my code. [00:22] mikeal1: i'll check it out later [00:22] jesusabdullah: new isn't bad in and of itself [00:23] jesusabdullah: once you know what it does [00:23] gm__: I know [00:23] gm__: I just want to make my code short and clean, I like the way most modules are packaged [00:23] jesusabdullah: Ah [00:24] gm__: require x = 'diff_match_patch' and using straight x.functions would be awesome [00:24] jesusabdullah: Yeah, I like doing that too--exporting the constructor, I mean [00:24] jesusabdullah: or, rather [00:25] jesusabdullah: exporting the object instead of the constructor [00:25] gm__: yep, I will give it a try right now [00:25] jesusabdullah: No reason to make people make a new one themselves! [00:25] gm__: sure [00:25] jesusabdullah: Feel free to share with the rest of us if you make this thing useful in node! [00:25] gm__: there is no state in this library, as far as I know [00:26] __mn__: hey, can I ask a JSON question I'm dealing with for my nodejs login? How do I pass a function parameter as a JSON object property? function(param) { var obj = { param : 'value' }; } ? [00:26] gm__: sure, I already have a use for that, with node as the pubsub medium [00:26] gm__: www.7co.cc/editor/editor.html [00:26] gm__: I will implement it on node to enable text saving [00:26] __mn__: gum__: what are you using for pubsub in node? [00:26] jesusabdullah: cool :D [00:27] __mn__: *gm__: [00:27] gm__: __mn__: http://github.com/gleicon/pubsub_ws [00:27] __mn__: thanks :) [00:28] gm__: simplest setup ever, websockets and node (there is a redis example there, but I still using the standalone version) [00:28] __mn__: sweeet, exactly what I've been looking for, does it play well with socket.io? [00:28] micheil: hmm.. [00:28] micheil: websocketS? [00:28] gm__: I was trying to port it for socket.io but didnt finished it. Its really simple to do, using emitters [00:29] gm__: this editor example is a multi-user editor, but lacks a server side buffer for last edited text. thats what's I am implementing [00:31] zooko has joined the channel [00:32] __mn__: ah, mmkay. [00:33] ryah: hm [00:33] ryah: ACTION kicks node.. [00:33] indexzero: ryah: you got a second [00:34] ryah: indexzero: sure [00:34] indexzero: I know node https support is still a little raw, but I'm seeing a 499 response (SSL specific) and I'm not sure why [00:34] ryah: indexzero: *shrug* [00:34] __mn__: indexzero: I was able to get https to work. [00:35] indexzero: __mn__: Yeah, I have it working in some cases, but there are lots of edge cases [00:35] JimBastard_ has joined the channel [00:35] indexzero: ryah: Ok, well I'll work around it. Any status on when you might revisit the https implementation? [00:36] ryah: indexzero: probably before the end of the year [00:36] ryah: :) [00:39] sugardave has joined the channel [00:42] prettyrobots has joined the channel [00:44] rex_fernando: does anyone have a suggestion for a unit testing framework? [00:44] jesusabdullah: expresso or vows [00:44] jesusabdullah: I use expresso [00:44] jesusabdullah: Really easy to get going [00:45] jesusabdullah: but some people really like vows, too--if you're a BDD kinda guy, it might be more your bag [00:45] gm__: cool, it worked [00:45] gm__: thanx jesusabdullah [00:45] jesusabdullah: Yeah, no prob [00:45] jesusabdullah: gm__: You have github or something? [00:46] gm__: <3 finishing it all <3 [00:46] rex_fernando: ok [00:46] gm__: jesusabdullah: http://github.com/gleicon [00:46] rex_fernando: thanks :) [00:46] jesusabdullah: gm__: Wide range of languages there--js, python, erlang, ruby at least [00:46] jesusabdullah: ! [00:46] gm__: jesusabdullah: will upload the whole editor stuff [00:46] jesusabdullah: Sweet [00:47] gm__: jesusabdullah: nobody can tell I didnt tried ;) [00:47] jesusabdullah: huh? [00:47] gm__: I mean, no one can tell I didnt tried more than 1 language [00:47] jesusabdullah: ah [00:47] gm__: I keep looking for the easiest way to do my stuff [00:47] jesusabdullah: Any favorites? [00:48] gm__: I kinda like them all. I like erlang and python [00:48] jesusabdullah: Cool :) [00:48] gm__: I am learning to like js [00:49] jesusabdullah: Yeah, I'm kind of in the same boat, I think [00:49] gm__: first I need to learn the proper idioms [00:49] jesusabdullah: though I haven't learned erlang [00:49] gm__: sure [00:49] gm__: I did some stuff using erlang, but I'm not expert in otp and advanced topics [00:49] gm__: its a kidna lisp for me, I want to do something cool with it, but I end up stumbling on node and finishing a whole pubsub server in less than 20 lines [00:50] gm__: :D [00:50] jesusabdullah: :D Yeah, that's node for you [00:54] micheil: gm__: so, what were you using websockets for? [00:54] micheil: ryah: any thoughts on realtime / "online" databases? [00:54] gm__: micheil: I implemented ws for twisted and cyclone, a clone of tornado for twisted and python [00:54] gm__: used it in a project I have, called restmq [00:55] micheil: okay [00:55] gm__: then tried it on node.js, because I wanted a proxy for restmq [00:55] micheil: yeah [00:55] gm__: basically, its a message queue using http and json as protocol [00:55] micheil: and was there a stumbling block? [00:55] gm__: no, easy as pie [00:55] micheil: ah, I read it as that there was a stumbling block using socket.io [00:55] gm__: I mean, I'm no expert, but once I understood event emitters, I cut half of the code off [00:55] gm__: no [00:55] micheil: restmq, got a website for that? [00:55] murz has joined the channel [00:56] gm__: I used another library, adn was trying to port to socket.io but ended up procrastinating [00:56] micheil: ACTION is the node-websocket-server author. [00:56] gm__: micheil: restmq.com [00:56] micheil: so, yeah, I'm curious as to what library you'd be using then [00:56] _mythz has joined the channel [00:56] gm__: micheil: I node.ws ? [00:56] gm__: ops [00:56] gm__: I used node.ws here [00:56] micheil: hmm. [00:56] gm__: http://github.com/gleicon/pubsub_ws [00:57] micheil: not sure if there's spec compliant [00:57] gm__: it had the latest spec [00:57] micheil: imho the socket.io project and node-websocket-server are the current best websocket implementations [00:57] gm__: which, I may say, got me p*ssed off when I had to reimplement in python [00:57] gm__: those 8 bytes after the header broke me [00:57] micheil: oh, the new draft76 is easy., [00:57] micheil: yeah. we patched node for those. [00:58] gm__: micheil: I will give them a try. socket.io seems very complete, but I'm not a node/js experto so it seemed too much at the time [00:58] micheil: but the handshake is changing again [00:58] gm__: I will give node-websocket-server a try [00:58] gm__: oh no [00:58] micheil: well, do you have some code up? [00:58] gm__: do you know what will change ? [00:58] _announcer: Twitter: "Mixing node.js + Express + EJS + Redis for a personal app. I’ve never loved server-side development before now." -- Steve Streza. http://twitter.com/SteveStreza/status/26986856135 [00:58] micheil: gm__: not yt [00:58] micheil: but there is a mailing list [00:58] gm__: micheil: how so ? github repository ? [00:58] micheil: https://www.ietf.org/mailman/listinfo/hybi [00:59] micheil: gm__: for this proxy / node.js project [00:59] micheil: gm__: do you have some code; I could have a look at it. [00:59] gm__: micheil: its inside restmq, lemme find it [00:59] gm__: http://github.com/gleicon/restmq/tree/master/node/ this is just a tcp proxy [00:59] micheil: k [00:59] gm__: my webscoket code is not on github yet [01:00] gm__: and there are some js projects there, like pubsub_ws and pubsub_comet [01:00] micheil: oh, yeah, I was after the websocket code :P [01:00] chrischris has joined the channel [01:00] gm__: pubsub_ws is using node.ws.js [01:00] gm__: but no ws from me [01:00] micheil: well, yeah, besides node-websocket-server, I also author a module called Eventstream [01:01] micheil: which is a EventEmitter that emits via websockets [01:01] breccan has joined the channel [01:01] gm__: cool [01:01] gm__: distributed event emitter heh [01:01] micheil: so, stream.emit -> sends to client [01:01] micheil: stream.on <- receives from client [01:01] micheil: well s/client/peer [01:01] gm__: cool, I made pubsub_ws for something like that, a tickbox and tinychat, but the event emitter is local [01:02] gm__: I also used redis and its pub/sub channels before [01:02] micheil: yeah, this is just a neat idea. [01:02] micheil: took me about 30 minutes to go from node-websocket-server to socket.io [01:02] gm__: ool [01:03] gm__: someone told me that socket.io is cool because there are different transports besides ws [01:03] micheil: I'm currently trying to figure out if I can easily create a proof-of-concept evented database with websockets + redis [01:03] micheil: so, like, store JSON blobs and then have realtime filters on the data as it gets added to the db [01:03] jacobolus has joined the channel [01:03] mikeal1 has joined the channel [01:04] shimondoodkin has joined the channel [01:04] micheil: mikeal1: any thoughts on an evented database or realtime filtering database? [01:05] mikeal1: i invented something like that in my head [01:05] mikeal1: and talked to Nuno about it [01:05] gm__: hm, sounds interesting [01:05] micheil: Nuno? [01:05] mikeal1: Nuno Job, he works at MarkLogic [01:05] mikeal1: database geek [01:05] micheil: hmm [01:05] micheil: I've been talking to someone else about it; turns out their called "online" databases [01:05] mikeal1: he thought it was a good idea [01:05] mikeal1: that's a silly name [01:06] micheil: there's meant to be a fair bit of research into it atm [01:06] micheil: yeah, it is a silly name [01:06] micheil: I like realtime or evented database [01:06] mikeal1: i was thinking of something I called FilterDB [01:06] micheil: currently I'm thinking that it's highly possible. [01:06] micheil: FilterDB? [01:06] mikeal1: so, it's a k/v store [01:06] mikeal1: everything enters in to one interface [01:06] mikeal1: the "firehose" [01:06] shimondoodkin: can you give an exmaple of a use for it? [01:07] mikeal1: you can add filter functions to that firehose [01:07] micheil: shimondoodkin: yeah, tail.thechangelog.com [01:07] mikeal1: and filters to those filters [01:07] micheil: yeah [01:07] mikeal1: so it's like a tree off of the firehose [01:07] micheil: that's pretty much my ideas [01:07] mikeal1: it keeps some configurable amount in memory [01:07] skohorn_ has joined the channel [01:07] micheil: sort of like the ECMA262 filter api. [01:07] mikeal1: and writes the rest to an append-only log [01:08] pengwynn has joined the channel [01:08] micheil: I'm thinking it'd be wise to use a stable datastore behind it though [01:08] shimondoodkin: tail.thechangelog.com=App crashedThis application is temporarily offline.If you're the administrator of this app, please check your heroku logs for the backtrace. [01:08] micheil: like redis or tokyo cabinet [01:08] micheil: shimondoodkin: it's a stream of the github timeline. [01:08] micheil: it'd be awesome if I could filter it down. [01:08] gm__: careful, triggers are the new nosql. [01:08] mikeal1: not necessarily [01:09] gm__: as seen on the latest google paper [01:09] mikeal1: so, a realtime k/v store with minimal querying is easier to implement yourself than use an existing one [01:09] micheil: hmm, if you know about databases and stuff [01:09] mikeal1: if you don't need a btree, shit is easy [01:09] micheil: so far I've only done basic research into it. [01:10] SubStack: supermarket uses sqlite as a k/v store [01:10] benburkert has joined the channel [01:10] shimondoodkin: i dont understend the innovation, you already have view, triggers, and the database is super fast and you can search it., so wahts new about it, is it deletes the oldest information.. [01:10] skohorn_ has joined the channel [01:11] mikeal1: it's a different set of contraints [01:11] mikeal1: which means you can optimize a lot of hard problems trivially [01:11] micheil: exacrtly [01:11] mikeal1: for instance, distribution becomes very trivial [01:11] mikeal1: which is an incredibly hard problem in databases [01:12] micheil: rather then having to poll your db for changes, you can just open a new request with a filter and wait for results [01:12] micheil: as for distribution, I'm not sure on that. [01:12] mikeal1: also, every db should have a realtime feed [01:12] mikeal1: CouchDB has _changes, redis has channels [01:12] micheil: mikeal1: agree there. [01:12] micheil: mongodb has nothing :( [01:12] mikeal1: postgres has something as well [01:12] mikeal1: mongodb is like a cache that occationally writes to disc [01:12] shimondoodkin: so is it like views with a triggger for update [01:13] micheil: shimondoodkin: you're kinda loosing me talking about "views" [01:13] shimondoodkin: like updatable map reduce [01:13] micheil: not quite [01:13] micheil: take a map/reduce function, but then rather then iterating a static dataset [01:13] mikeal1: think of it like this [01:13] mikeal1: realtime only [01:14] mikeal1: with some history kept in memory [01:14] stephenjudkins has joined the channel [01:14] micheil: as a node gets added to the dataset, if it matches, then it gets pushed to the client [01:14] mikeal1: and a log on disc, but you can't query across the entire historical dataset [01:15] shimondoodkin: i thing i get you [01:15] mikeal1: very useful for realtime, worthless as a blog engine :) [01:15] micheil: mikeal1: what's the need for the log? [01:15] mikeal1: so that if you want to create a new filter and start it at the beginning on the db, it can read back through the log [01:15] micheil: nawh [01:16] micheil: if you want historical queries, you'd be better off using a secondary backup db [01:16] mikeal1: you can still delete the logs [01:16] micheil: so, like pushing all data into another db like mongo or something [01:16] mikeal1: you'd wanna roll it to make that easier [01:16] micheil: I think pure in-memory would work better. [01:17] mikeal1: at some scale, what you think of as the data from the last hour is barely going to fit on disc [01:17] micheil: I'm also thinking it might work best as an embedded db [01:17] mikeal1: so if you want to have any reach in to the recent history you have to keep something on disc [01:17] micheil: yeah [01:18] dbathurst has joined the channel [01:18] mikeal1: but damn, distribution is simple [01:18] micheil: mikeal1: the other part of it is how do you define a filter for the results? [01:18] shimondoodkin: you know mongodb saved my app , i thought to do all in javascript and in memory, with mongo db it seems faster [01:18] mikeal1: because you don't keep everything around you only have to scope a filter to a node [01:19] mikeal1: mongodb is only slightly better than keeping it in memory [01:19] _mythz: how can it be better? [01:19] mikeal1: you should look at redis [01:19] shimondoodkin: javascript is not c+++ [01:19] mikeal1: especially if you're moving from in process globals to a database [01:20] mikeal1: that's kinda what redis is designed for [01:20] _mythz: so its better to serialize and send it over the network so you can collect it again? [01:20] _mythz: yeah redis++ [01:20] micheil: redis does look awesome, but I haven't had a chance to play with it much yet :( [01:20] mikeal1: well, in process globals don't scale to other application processes :) [01:20] mikeal1: redis lets you scale the application processes horizontally [01:21] mikeal1: by holding the globals [01:21] mikeal1: and it's absurdly fast [01:21] _mythz: if you want a shared memory server with more than just key/value (i.e. memcached) redis is your thing [01:21] shimondoodkin: redis seems good for that [01:21] micheil: tokyo cabinet and kyoto cabinet are also absurdly fast. [01:23] _mythz: I've built a Redis Admin UI if anyone is interested :) http://www.servicestack.net/RedisAdminUI/AjaxClient/ [01:23] micheil: _mythz: is it node.js? :P [01:23] mikeal1: nice [01:23] _mythz: it's optimized for JSON values, so would work good here [01:23] mikeal1: i really want an HTTP frontend for Redis [01:23] _mythz: nah, requires mono unfortunately [01:24] micheil: :( [01:24] micheil: mikeal1: how-so? [01:24] _mythz: yeah the webservice layer provides SOAP / JSON/ XML api for every redis operation [01:24] mikeal1: cause i have using custom engineered socket protocols and would much rather talk to things over HTTP :) [01:25] _mythz: because the Admin UI only requires a subset of the redis ops I'm thinking about porting it over to node.js [01:25] _mythz: mikeal1: totally but this lets me build an ajax UI which runs on the browser - its completely static [01:26] _mythz: pure ajax i.e. loads once and only makes ajax calls from then on.. [01:26] shimondoodkin: Kyoto Cabinet also looks very fast [01:27] yhahn has joined the channel [01:28] shimondoodkin: why JSON.parse is not working on this, but eval does: [ [ 'phonecol', 'ansicol', 'utfcol', 'numcol', 'datecol' ], [ '05412345678', 'asfasd', '\u05d2\u05d3\u05db\u05e9\u05d3\u05d2\u05e9\u05d3\u05d2' , 12312 , '2010-10-10T10:55:00Z' ]] [01:29] quirkey has joined the channel [01:29] _mythz: you want to stringify? [01:30] _mythz: is it because JSON expects a '{' ? [01:30] shimondoodkin: no [01:30] shimondoodkin: already tested [01:30] tilgovi has joined the channel [01:31] shimondoodkin: maybe for each item but arrays are part of jso [01:31] shimondoodkin: i hava a stringified value [01:32] dmcquay has joined the channel [01:32] micheil: shimondoodkin: might be the [01:32] micheil: \u... data [01:33] shimondoodkin: no [01:34] _announcer: Twitter: "trying out node.js seeing what the fuss is all about" -- Saud. http://twitter.com/si3dy/status/26989729032 [01:34] keeto: shimondoodkin: you're using single quotes.. JSON strings need to be wrapped in double quotes.. [01:34] micheil: the double [[ [01:34] __mn__ has joined the channel [01:34] micheil: keeto: not really. [01:35] keeto: micheil: yes really. [01:35] micheil: actually. my bad [01:35] micheil: I had a skewed result [01:35] keeto: :) [01:35] keeto: it's only forgiving parsers that accept single quotes. [01:35] shimondoodkin: it is for http://github.com/shimondoodkin/node_spreadsheet [01:36] micheil: shimondoodkin: yeah. it's the quotes. [01:36] shimondoodkin: keeto: thanks ill test it [01:36] micheil: .replace(/'/g, '"') [01:36] micheil: fixes [01:36] Eber has joined the channel [01:36] jesusabdullah: shimondoodkin: Thanks for making this. >:D [01:36] shimondoodkin: ill just generate it correctly [01:38] galaxywatcher has joined the channel [01:38] shimondoodkin: :) [01:38] __mn__: shimondoodkin: wow, nice. [01:38] jesusabdullah: I currently do most of my spreadsheeting in python, but man, if I could do it in node... [01:38] jesusabdullah: could be a good thing! [01:39] micheil: reminds me of taglib. [01:39] shimondoodkin: no it is not in node its a dirty cheap php cli [01:39] micheil: erm. [01:39] micheil: tablib. [01:39] micheil: tablib.org [01:39] jesusabdullah: I saw tablib! Sounded awesome [01:40] jesusabdullah: It's funny--the scientific python community has needed something like this for, well, AGES [01:40] jesusabdullah: but for some reason I don't think they're really considering tablib [01:40] micheil: yeah, kenneth is an awesome guy. [01:40] jesusabdullah: Probably because of datarray's opinion on 2-d vs. n-d data [01:40] micheil: ACTION does the changelog stuff with him. [01:40] jesusabdullah: tables are inherently 2-d and all [01:40] jesusabdullah: orly? Right on [01:40] jesusabdullah: I actually told the scipy mailing list about tablib, no discussion :/ [01:41] jesusabdullah: idk, it seems to me that tablib captures a lot of what people wanted [01:41] jesusabdullah: except for the whole n-d thing (which was of debatable utility anyway, since pretty much any-dimensional data can be re-cast into 2 dimensions anyway [01:41] jesusabdullah: and the use of nparray, maybe :/ [01:42] jesusabdullah: ihnfi [01:42] jesusabdullah: python people are weird [01:42] shimondoodkin: one good thing about it is that PHP excel is the best stable lib i know to read excel files on linux [01:43] jesusabdullah: orly? [01:43] jesusabdullah: I've used the python excel libs, and they work pretty well [01:43] jesusabdullah: Bit of a clunky api though, imo [01:43] jesusabdullah: Probably due to formatting or something [01:43] jesusabdullah: *shrug* [01:44] shimondoodkin: ive never seen http://tablib.org [01:44] emmanueloga has joined the channel [01:44] jesusabdullah: http://www.python-excel.org/ [01:44] jesusabdullah: Tablib is pretty new, only saw it a few weeks back [01:44] jesusabdullah: Totally gonna use it next time I want to interact with tables in python, though [01:45] jesusabdullah: Nice to see it abstracts away the bullshit in xlwt [01:46] jgautier has joined the channel [01:46] jesusabdullah: micheil: Read abilities are upcoming, right? [01:46] micheil: jesusabdullah: I'm not sure. [01:46] jesusabdullah: by "read" I mean import [01:46] jgautier: anyone here used mongoose? when trying to save an object everything appears to be working but all i get in mongo is { "_id" : ObjectId("4cb26b1cc92c2e961a000002") } [01:46] jgautier: i dont see any of the attributes i set [01:46] jgautier: any ideas? [01:48] shimondoodkin: you brobably did it backwards [01:48] shimondoodkin: first you create then you add fileds then you save [01:48] shimondoodkin: i am not sure but this is my guess [01:49] jgautier: hmm im doing it the same way as another object that works....only different is this object has 2 nested objects and 1 array [01:50] jgautier: it could be throwing an error but i dont even know how to see exceptions [01:51] derferman has joined the channel [01:52] Tim_Smart: ryah: Around? [01:55] bpot has joined the channel [01:56] Ari-Ugwu has joined the channel [01:56] _announcer: Twitter: "@tommorris http://github.com/nicferrier/elnode <- nodejs like thing. servers have been done before but not the async thing I think." -- Nic Ferrier. http://twitter.com/nicferrier/status/26991551703 [01:59] ryah: Tim_Smart: yeah [01:59] Tim_Smart: ryah: Is it possible to create a buffer from char*? [01:59] Tim_Smart: data_ is private... [02:01] micheil: Buffer:utf8write? [02:02] ryah: Tim_Smart: no, but you can add it [02:03] ryah: just memcpy the buffer into the new data_ [02:03] ryah: the char*, i mean [02:03] ryah: (or should i?) [02:03] micheil: ryah: is that saying as a patch? [02:03] BHSPitMonkey has joined the channel [02:04] Tim_Smart: You can if you like, Buffer::New(char* data); would be useful for addons. [02:04] _announcer: Twitter: "Running a NodeJS server as a daemon on Ubuntu http://bit.ly/a4o65t" -- barbietunnie. http://twitter.com/barbietunnie/status/26992194761 [02:04] shimondoodkin: jgautier: Mongoose.addListener('error',function(errObj,scope_of_error){console.log(errObj)}); [02:04] Tim_Smart: But... it wouldn't create a fast buffer in that case, right? [02:05] Tim_Smart: Hmm... [02:06] _mythz: anyone know where I should put .npmrc on windows? [02:06] derferman has joined the channel [02:06] micheil: _mythz: not I [02:06] _mythz: k, it says $HOME/.npmrc but there's no $HOME in windows :( [02:07] jgautier_ has joined the channel [02:07] micheil: Tim_Smart: still can't work out that issue with that parser.. [02:07] micheil: looks like a race condition. [02:07] micheil: I can't think of what else it could be [02:08] shimondoodkin: _mythz: it is c:\users\username\ [02:08] jgautier_: has anyone done DBRef in mongoose? [02:09] _announcer: Twitter: "@gisikw, @bphogan - think Chippewa Valley Code Camp would be interested in a NodeJS talk this year? Was thinking I could get my feet wet..." -- Marc Harter. http://twitter.com/wavded/status/26992577028 [02:09] ossareh has joined the channel [02:09] CIA-77: node: 03Ryan Dahl 07master * rbc69547 10/ (5 files in 3 dirs): Add Stream base class with stream.pipe - http://bit.ly/9PiQxE [02:09] CIA-77: node: 03Ryan Dahl 07master * r0cf03ab 10/ (src/node_buffer.cc src/node_buffer.h): Add char* constructor for Buffer - http://bit.ly/94OK9N [02:09] ryah: Tim_Smart: --^ [02:09] Tim_Smart: Thanks! [02:09] shimondoodkin: jgautier_: there is no dbref you just create a new mongodbid object [02:10] Tim_Smart: ryah: What about the 'return buffer'? [02:10] jgautier_: so u cant use syntax like this [02:10] jgautier_: ? [02:10] jgautier_: { $ref : , $id : [, $db : ] } [02:11] ryah: wow [02:11] ryah: uh - shouldn't my compile have failed? [02:11] shimondoodkin: jgautier_: what is the url you are looking at [02:11] micheil: ryah: we should be consistent within node on capitalisation [02:11] Tim_Smart: ryah: Yeah, I think it should have... [02:11] jgautier_: http://www.mongodb.org/display/DOCS/Database+References [02:11] ryah: sorry [02:11] micheil: and module.exports [02:11] ryah: not sure why this is happneing [02:11] ryah: ACTION goes back to gcc [02:11] jgautier_: just reading it again though and sounds like doing a manual reference as you were saying is more efficient anyways [02:11] danielzilla has joined the channel [02:12] Tim_Smart: ryah: Builds fine on gcc... [02:12] Tim_Smart: Hmm weird. [02:13] shimondoodkin: jgautier_: maybe it works never used it tho [02:13] ryah: yeah what's up with that? I build with -Wall -Werror [02:13] jgautier_: sounds like it maybe more effort than its worth [02:13] shimondoodkin: jgautier_: in mongodb you have object modifiers or query modifiers , it is variable names that begins with a $ [02:14] shimondoodkin: jgautier_: also as the result of this it looks like it is just an idea [02:14] _announcer: Twitter: "@wavded I think the talks are full already! but I'd love to see a NodeJS talk. /cc @dougrhoten" -- Brian Hogan. http://twitter.com/bphogan/status/26993034018 [02:14] shimondoodkin: jgautier_: anyways you have to create amongodbid [02:16] maqr: i just wrote a really simple web service with express/connect/node... what's the easiest way to deploy it on a server? right now it's running in screen and i could just detach, but i'd like it to come back on reboot [02:17] micheil: ryah: yeah. stream.Stream is really kinda ugly, any reason not to use module.exports for it? [02:17] ryah: maqr: have a process manager start it - like monit [02:17] micheil: (same with freelist) [02:17] ryah: micheil: is module.exports acceptable yet? [02:17] micheil: (like just that manner of calling it, it's also really inconsistent, could be cleaner) [02:17] maqr: that's what i thought, just wanted to make sure i wasn't missing something simpler, thanks [02:17] micheil: I believe so... [02:17] shimondoodkin: maqr: you may try http://github.com/shimondoodkin/nodejs-autorestart [02:18] maqr: shimondoodkin: i'm more worried about the server being stable than ryah's code :) [02:18] shimondoodkin: maqr: what do you mean? [02:18] maqr: shimondoodkin: i'm not worried about node crashing, i'm worried about server reboots [02:19] shimondoodkin: ok [02:19] maqr: it's cool though, i'll just use monit, i should know how to set that up anyway [02:19] Tim_Smart: ryah: Talking to Mark now. [02:21] micheil: ryah: looks like a no. [02:21] ryah: Tim_Smart: mark? [02:21] micheil: either way, we need to be consistent in the code. [02:21] Tim_Smart: schmorp [02:21] unomi has joined the channel [02:22] micheil: ryah: would you like a patch for that? [02:22] ryah: ok [02:22] dpritchett has joined the channel [02:23] micheil: ryah: just a patch to make the usage of modules always consistent, rather then different styles of calling the same thing [02:23] Tim_Smart: ryah: irc.schmorp.de [02:23] Tim_Smart: #schmorpforge [02:23] BHSPitMonkey: which one of you is that aaron fellow from LearnBoost? :) [02:24] micheil: BHSPitMonkey: none at the moment. [02:24] BHSPitMonkey: ah [02:24] micheil: BHSPitMonkey: is it something about socket.io? [02:24] CIA-77: node: 03Ryan Dahl 07master * r9d248f6 10/ src/node_buffer.cc : Fix return in Buffer::New - http://bit.ly/cCfaWV [02:25] randy_ has joined the channel [02:25] _announcer: Twitter: "Node.js screencast series begin at Nodecasts.org: http://bit.ly/bBQQpw" -- Sébastien. http://twitter.com/arnaudsj/status/26993969993 [02:27] prettyrobots has joined the channel [02:35] jacobolus has joined the channel [02:37] richcollins has joined the channel [02:38] _announcer: Twitter: "@lightfiend I've gone from cakephp/wordpress to django and now I'm trying node.js/express. Scala and erlang look fun." -- Casey W. Stark. http://twitter.com/caseywstark/status/26995050635 [02:39] gf3 has joined the channel [02:40] micheil: ryah: patch for the stream.Stream stuff: http://gist.github.com/619888 [02:40] micheil: (had to use stream.Stream, like event.EventEmitter as net.js uses the Stream var [02:40] ryah: micheil: i thought we were thinking about not using module.exports? [02:40] micheil: it isn't. [02:41] micheil: it's just making http.js consistent with the usage of Stream with net.js [02:41] ryah: this is just renaming stuff - and i don't agree with the renaming [02:42] micheil: like I said, it's only for consistency. [02:42] Tim_Smart: ryah: Hmm check_cb is now being called - except node's event loop is running (setInterval is broke) [02:42] Tim_Smart: *isn't [02:42] ryah: hm? [02:43] ryah: micheil: sigh. okay.... [02:43] ryah: :) [02:43] micheil: (sometimes it's good to be anal about code.) [02:44] CIA-77: node: 03Micheil Smith 07master * r1af52d2 10/ lib/http.js : Changing http.js to use the same stream.Stream creation as net.js - http://bit.ly/dfJiMK [02:44] micheil: also, the other thing I noticed about Stream was: options.end = options && options.end === false ? false : true; [02:44] micheil: that should probably just be done within the if statement, no? [02:46] micheil: if( !(options.end === false)) [02:46] _announcer: Twitter: "If you use encryption node.js, openssl is not enabled or not." [ja] -- MASAHIRO KIURA. http://twitter.com/wasab_i/status/26995751250 [02:48] dohtem has joined the channel [02:49] Tim_Smart: ryah: OMFG its working [02:49] ryah: Tim_Smart: *HUG* [02:49] ryah: :) [02:49] _announcer: Twitter: "Crockford Scene 6: learn event-queue-based programming (Java Swing, Flash/AcionScript, JavaScript (incl.Node.js)) yuiblog.com/crockford/" -- Ed Toro. http://twitter.com/eddroid/status/26995999216 [02:50] ryah: what was wrong? [02:50] aconbere has joined the channel [02:50] Tim_Smart: ryah: Only when I have a setTimeout running though ;( [02:52] micheil: ryah: this is the patch for the other things I noticed about Stream: http://gist.github.com/619898 [02:52] ryah: Tim_Smart: that's fixable [02:52] ryah: Tim_Smart: you'll have to play with ev_ref, ev_unref [02:52] Tim_Smart: Right. [02:53] ryah: Tim_Smart: when you have a window open call ev_ref [02:53] ryah: when it closes call ev_unref [02:55] alexb_ has joined the channel [02:58] derferman has joined the channel [02:58] mikeal1 has joined the channel [03:00] Ari__ has joined the channel [03:01] dipser_ has joined the channel [03:02] micheil: ryah: and here's the rest of unrelated consistency changes: http://gist.github.com/619907 [03:03] Tim_Smart: ryah: Is there anyway to check the ref depth of ev? [03:03] mjr_ has joined the channel [03:04] Tim_Smart: I removed my unref's from the Init(), and it now ref's and unref's on window open/close. [03:04] Tim_Smart: But it still hangs when there is nothing left to do. [03:04] Ari-Ugwu has joined the channel [03:04] siculars has joined the channel [03:05] ryah: Tim_Smart: you have have unrefs in init [03:05] ryah: Tim_Smart: you'll have to play with it... [03:05] Tim_Smart: OK. [03:08] _announcer: Twitter: "Very good @ NodeCasts Better yet know that something is about # nodejs by a Brazilian, @ emerleite" [pt] -- Julio. http://twitter.com/TheJCS0/status/26997561444 [03:08] Ari__ has joined the channel [03:16] zemanel has joined the channel [03:16] Ari-Ugwu has joined the channel [03:16] CIA-77: node: 03Ryan Dahl 07master * r8ab6917 10/ lib/stream.js : clean up options.end code - wasn't working - http://bit.ly/cJwPMG [03:18] hsuh has joined the channel [03:18] mikeal1: ryah: why the readable check? [03:18] mikeal1: http://github.com/ry/node/blob/8ab691726d76026c123b4ad96bb771be94c96729/lib/stream.js#L18 [03:18] CIA-77: node: 03Ryan Dahl 07master * r393f007 10/ test/disabled/pipe-test.js : Improve pipe-test. Still not working - http://bit.ly/9cneQp [03:19] ryah: mikeal1: pause throws if it's not readable... [03:19] ryah: er, resume [03:19] ryah: maybe we should change that [03:20] mikeal1: i don't see why we need to throw when someone forgets to set the boolean [03:21] ryah: the boolean is part of the spec [03:21] mikeal1: right, but why? [03:21] ryah: easier to use than readyState [03:21] ryah: which i dislike [03:21] Ari__ has joined the channel [03:21] ryah: (and would like to get rid of) [03:21] mikeal1: i'm just saying, why are we adding these requirements that will 99% of the time be set to true [03:22] mikeal1: for instance [03:22] mikeal1: if it's not readable, it shouldn't have a pipe method [03:22] mikeal1: the author should remove that method [03:22] ryah: mikeal1: it might be a closed socket [03:22] mikeal1: oh i see [03:22] mikeal1: hrm..... [03:23] mikeal1: maybe we should make readyState something that actually looks up the pipe chain [03:23] ryah: probably [03:23] mikeal1: because people are just going to set that boolean to true on their streams and leave it there and it's going to cause the same damn problems [03:23] ryah: we should get rid of readyState... [03:23] ryah: actually [03:24] mikeal1: i know of at least one leak that is being caused because it's not updated [03:24] Tim_Smart has joined the channel [03:24] mikeal1: it happens in my client pool library [03:25] Tim_Smart: ryah: I have to put gtk_init() and the gtk calls into a process.nextTick to make it work. [03:25] ryah: Tim_Smart: nod [03:26] ryah: mikeal1: i think we want these .readable and .writable properties [03:26] mikeal1: can they be methods? [03:26] Tim_Smart: ryah: And guess what, removing the process.nextTick from module.runMain fixes it in src/node.js [03:26] ryah: mikeal1: why? [03:26] mikeal1: because for most streams you'll want it to be a gettr anyway [03:26] ryah: mikeal1: it should be the system's idea of the state [03:26] mikeal1: that checks some internal state [03:27] _announcer: Twitter: "Check out the slides from my presentation on Rapid Application Development with Node.js http://lnkd.in/EyHjS3" -- Shane Hansen. http://twitter.com/shanemhansen/status/26999051746 [03:27] mikeal1: if you remove readyState, how are you going to "closed" [03:27] ryah: mikeal1: !s.readable && !s.writable [03:28] jacobolus has joined the channel [03:28] mikeal1: when a stream is paused is it !writable? [03:29] ryah: no [03:29] ryah: er [03:30] ryah: paused has nothing to do with .writable [03:30] mikeal1: ok [03:30] ryah: you mean !readable ? [03:30] mikeal1: either actually [03:30] mikeal1: paused has nothing to do with it [03:30] mikeal1: that's good to know [03:30] d4ilycow has joined the channel [03:30] mikeal1: so, basically when !writable a write() call will throw [03:30] ryah: yes [03:31] mikeal1: well, it's going to be less error prone than readyState [03:32] aconbere has joined the channel [03:34] mikeal1: yeah, i think it's good [03:35] mikeal1: if someone wants to safeguard their stream against people setting them they can just create a settr [03:35] sechrist: would http.request('HEAD', '/'... work ? [03:35] sechrist: I'm assuming so [03:35] ryah: sechrist: yes [03:36] ryah: er [03:36] ryah: not [03:36] ryah: no [03:36] sechrist: so I can't do a head request with http.client? [03:36] ryah: client.request('HEAD', '/'.. [03:36] mikeal1: yes you can [03:36] sechrist: oh err yeah ryah I meant client.request [03:36] sechrist: : [03:36] sechrist: ) [03:38] Tobsn has joined the channel [03:39] micheil: ryah: I think the options.end check you changed in 8ab6917 is wrong [03:39] micheil: + if (!options || options.end === false) { [03:39] micheil: should be: [03:39] micheil: + if (!options || options.end !== false) { [03:41] mikeal1: ryah: can Stream.pipe return dest? [03:41] andrewfff has joined the channel [03:41] aho: why would you write === booleanThingy anyways? [03:41] micheil: aho: because, it's a bitwise check [03:41] micheil: due to the handling of falsy values [03:41] ryah: right. i shouldn't start coding at 4:20 in the afternoon on sunday... [03:42] mikeal1: if it's undefined it should be treated as true :) [03:42] aho: ew [03:42] mikeal1: that's the default [03:42] micheil: aho: bitwise isn't ew. [03:42] micheil: bitwise is seriously mega awesome. [03:42] mikeal1: triple comparison operator is faster as well [03:43] micheil: 'also.. could be: [03:43] micheil: + if (options.end !== false) { [03:43] _announcer: Twitter: "@bryanl now you're talking about node.js. you're confused. confusion is a sign of operating at webscale." -- James Golick. http://twitter.com/jamesgolick/status/27000313217 [03:43] micheil: as options is always defined [03:43] micheil: (i think.) [03:43] mikeal1: no it's not [03:43] micheil: or not. my bad [03:44] mikeal1: it's an optional argument [03:44] micheil: yeah [03:44] micheil: just tested it. realised the mistake on my behalf there. [03:44] mikeal1: it might be faster to just do if (!options) options = {} [03:44] micheil: would it? [03:44] mikeal1: i mean, we do like 5 comparison checks for it [03:45] mikeal1: or maybe just options = true [03:45] mikeal1: so that the attributes are just undefined [03:45] micheil: mikeal: no.. [03:45] foobar2k has joined the channel [03:45] foobar2k: hey guys [03:45] micheil: there's only one comparison [03:45] jesusabdullah: bitwise stuff can get pretty crazy S: [03:45] mikeal1: there will be more eventually [03:45] mikeal1: or else it wouldn't be an object :) [03:45] foobar2k: is it ok for me to modify builtin object prototypes in a module? [03:46] micheil: mikeal1: right, fair enough then [03:46] mikeal1: foobar2k: no [03:46] micheil: foobar2k: probably not. [03:46] foobar2k: eg I want to add extra methods to the Date object, whats the best way for me to do this? [03:46] micheil: foobar2k: nothing stops you, but people may ask questions or get grumpy with you. [03:46] jesusabdullah: Date.x = whatever ? [03:46] micheil: foobar2k: probably don't. [03:46] bpadalino: extra should be OK, right ? [03:46] micheil: x(Date) [03:46] foobar2k: ok, makes sense [03:46] micheil: bpadalino: not necessarily due to iterators. [03:47] foobar2k: dont want to pollute the method namespace [03:47] micheil: foobar2k: there's no global namespace. [03:47] foobar2k: i didnt say global namespace [03:47] micheil: all the code in a file via require() is evaluated within a closure [03:47] bpadalino: hrmm .. iterators can screw up if you add an extra prototype to something like String ? [03:47] micheil: bpadalino: depending how they are done, yes [03:47] mikeal1: don't fuck with the base types [03:47] mikeal1: just don't do it [03:47] mikeal1: it's bad news [03:47] foobar2k: if in a require("blah") i modified the Date prototype, then that would surely be modified for everyone [03:48] mikeal1: also [03:48] foobar2k: thats what im saying, i dont want to pollute the Date namespace [03:48] jesusabdullah: LIKE A BOSS [03:48] micheil: foobar2k: that is right. [03:48] TheEmpath has joined the channel [03:48] mikeal1: there is the possibilty that modules will be evaled in a new context some day, in which case all the props will be copy on write [03:48] foobar2k: yeh [03:48] mikeal1: so that will break all this voodoo you're trying [03:48] micheil: foobar2k: oh, in otherwords, don't modify the object prototypes. [03:49] bpadalino: what if the object prototypes are all methods and not attributes ? [03:49] foobar2k: ok so i could make a module "date_utils" or something similar, and require that, and pass the date object as a param [03:49] Mikushi1: hey there, how would i catch a connection being closed by a client? (connection made through httpClient, basically i have a proxy, client makes call to my nodejs server, nodejs server call remote url and returns it back to the client, but sometime clients are closing the connection (closing tab, changing page, ...) , but i'm not sure how to go from there if i want to kill my proxy request when client is closing the connection? ) [03:49] bpadalino: s/methods/functions/ [03:49] DozyPieman has joined the channel [03:49] micheil: foobar2k: that would be the recommended way [03:50] micheil: ryah: is it possible to deprecate lib/utils.js? [03:50] micheil: as well as lib/tcp.js [03:50] ryah: micheil: actually i'd rather sys get renamed to utils [03:50] ryah: we can drop tcp [03:50] micheil: okay [03:51] micheil: well, yeah, there needs to be migration for sys -> utils then. [03:51] mikeal1: can we add inspect to console? [03:51] _announcer: Twitter: "@jamesgolick i'm most definitely not talking about node.js, but i do agree: confusion is a sign of operating at webscale" -- Bryan Liles (ツ). http://twitter.com/bryanl/status/27000875431 [03:51] micheil: lib/file.js has also been long deprecated [03:51] jacobolus has joined the channel [03:51] ryah: micheil: it's already there [03:51] ryah: er [03:51] micheil: and lib/posix.js [03:51] ryah: mikeal1: [03:51] mikeal1: since when? [03:51] micheil: console.dir isn't it? [03:52] mikeal1: is that what that is [03:52] mikeal1: :) [03:52] ryah: % git blame -- src/node.js | grep console.dir [03:52] ryah: 4962702e (Ryan Dahl 2010-09-19 11:20:25 -0700 525) global.console.dir = function(object){ [03:52] micheil: yeah, funky naming. stolen from firebug [03:52] micheil: (I'm guessing) [03:52] ryah: yes [03:52] deepthawtz has joined the channel [03:53] ryah: if you just console.log() something it will also be sys.insepcted [03:53] ryah: micheil: do a patch for the util migration [03:53] micheil: ryah: also, I agree on sys -> utils, as then sys could be used for things like setGuid and such [03:53] ryah: micheil: if you wnat [03:53] TheEmpath has joined the channel [03:53] micheil: ryah: soft migration or just drop it? [03:53] ryah: soft [03:53] micheil: k [03:53] Tim_Smart: ryah: OK everything works now, with this removed: http://github.com/ry/node/blob/master/src/node.js#L587 [03:53] ryah: just print an error message once [03:54] micheil: sure thing. [03:54] ryah: Tim_Smart: hm [03:55] micheil: ryah: also deprecate sys.pump? [03:55] mikeal1: we can do that sooner [03:55] mikeal1: it's been marked as experimental for a while [03:55] ryah: mikeal1: not yet - the new one isn't working [03:56] mikeal1: why? [03:56] MikhX_ has joined the channel [03:56] ryah: not sure.. trying to fix it [03:56] ryah: run test/disabled/pipe-test.js [03:56] micheil: ryah: okay, leave that, there's also sys.p that's flagged for deprecation [03:57] ryah: micheil: you can take that out [03:57] ryah: sys.p [03:57] micheil: k [03:59] micheil: sys.exec [03:59] micheil: also marked for deprecation [04:00] ryah: micheil: you can also take it out [04:00] micheil: k. [04:00] micheil: (I'm just wanting to run these past you before removing.) [04:00] ryah: make sure the tests pass - i think they're still some left [04:00] ryah: uses of sys.exec i think [04:01] Mikushi1: anyone? How can i catch a connection being closed by a client? [04:02] Tim_Smart: ryah: <3 http://github.com/Tim-Smart/node-gtk/commit/c9d272aa2ea41a572439e03bad414c20b4c0e247 [04:02] mikeal1: ryah: looking at Stream.pipe [04:04] digitaltoad has joined the channel [04:04] ryah: Tim_Smart: sweet [04:04] jamesarosen has joined the channel [04:05] ryah: Tim_Smart: you should do a screencast [04:05] Tim_Smart: On GTK? [04:05] ryah: yeah [04:05] Tim_Smart: Hah, not enough bindings yet. [04:05] ryah: oh - yeah, when you get a basic app :) [04:05] Tim_Smart: Good luck making something with just buttons, windows and entry boxes :p [04:05] Tobsn: sounds like the google start page [04:05] ryah: like a twitter gtk app [04:06] ryah: would be good [04:06] yhahn: Pay $ [___________] to Tim_Smart [GO] [04:06] mikeal1: dude, when is EventSource going to be working [04:06] mikeal1: debugging sucks [04:06] micheil: events.Promise should probably also be removed. [04:06] ryah: micheil: yeah [04:07] micheil: ryah: also, I always run the tests before sending patches. [04:07] ryah: mikeal1: yeah... [04:07] ryah: micheil: with --debug and 'make test-all' ? [04:07] micheil: hmm, no, generally just make test [04:07] ryah: mikeal1: maybe i can put some time in this week [04:07] micheil: but I'll switch to doing that. [04:07] ryah: i've got like 10 node projects underway [04:07] micheil: so, ./configure --debug, right? [04:07] ryah: and keep skipping between them [04:07] mikeal1: i just run the individual test [04:08] ryah: micheil: yeah [04:08] micheil: k [04:08] mikeal1: ./node --debug test/disabled/pipe-test.js [04:08] ryah: this seems to be a net.js bug.. [04:09] micheil: fs.cat, marked as deprecated, remove? [04:10] ryah: micheil: yes [04:10] ryah: micheil: do these in different commits [04:10] ryah: so we can rollback individual ones if necessary [04:10] micheil: uh, okay. I was just doing all as one. [04:10] ryah: micheil: git add -p [04:11] micheil: do we want on patch for sys -> utils [04:11] ryah: is your friend [04:11] micheil: yeah [04:11] micheil: and one for deprecations? [04:11] micheil: (or many for deprecations) [04:16] micheil: lol. http.js ~line 500/600, var hot = this._headerSent === false [04:16] jameshome_ has joined the channel [04:20] hassox has joined the channel [04:26] _announcer: Twitter: "@gleicon I do use NodeJS, it is pretty cool, try it!" -- César D. Rodas. http://twitter.com/crodas/status/27003335699 [04:26] ryah: god. i need to get some better debugging going on here.. [04:27] ryah: really not easy. [04:28] ryah: but it seems to be a problem with how http server is propigating the parse error... [04:29] mjr_: sometimes things just get swallowed silently, but I haven't come up with a minimal test case yet. [04:29] mjr_: It's really annoying. [04:30] Mikushi1: according to the documention the http.clientResponse implements de ReadableStream interface, but when i try to call destroy() on a clientResponse, i get a nasty error. Is this normal? Or am i missing something [04:30] ryah: it might be a proble with nextTick [04:30] micheil: ryah: with the deprecation stuff, do you want the notices removed from src/node.js? [04:30] mjr_: Mikushi1: destroy is missing, it's a bug. You can call req.connection.destroy() [04:30] micheil: (they're removed() notices) [04:31] ryah: micheil: leave those [04:31] ajsie: anyone uses Mongoose here for MongoDB on node? [04:31] micheil: k [04:32] Mikushi1: mjr_: working, thanks! [04:32] mjr_: Mikushi1: I was just bugging ryah about that on Thursday. I'm sure it'll get fixed in a little while. [04:33] _announcer: Twitter: "Working on a nice big patch for node.js" -- Micheil Smith. http://twitter.com/miksago/status/27003804840 [04:33] Mikushi1: mjr_: ok, i'll keep my eyes open for that. Just starting to use nodeJS, so far impressed, but i really do like a documentation that is clean and not misleading :p [04:35] mjr_: Mikushi1: yeah, we'll get there. File an issue on github if you notice anything else that's documented incorrectly. [04:35] Mikushi1: mjr_ : I will :) always a good thing to give feedback anyway (i'm used to do so in PHP) [04:36] charlenopires has joined the channel [04:37] _announcer: Twitter: "finished a video proxy server (that's right) using NodeJS, that was a lot easier than anything i tried recently #tryit" -- Michel Bartz. http://twitter.com/MichelBartz/status/27004032606 [04:40] micheil: Mikushi1: yeah, I second mjr_ on the documentation. [04:41] micheil: there is a work in progress to update the documentation a bit (design wise and code wise) [04:41] micheil: so, I'll be looking at those things when I do more work on said changes [04:41] _announcer: Twitter: "#PHP feels so wrong after learning #NodeJS. Blocking I/O? Lame." -- Ivar Vong. http://twitter.com/ivong/status/27004314327 [04:42] dbathurst has joined the channel [04:43] Mikushi1: micheil: cool, thanks. If i get the chance to use NodeJS more, i will make sure to file any issue i find. [04:43] micheil: thanks [04:47] ryah: huh - is the http client not setting content-encoding: chunked ? [04:47] ryah: er [04:47] ryah: tranfer-encoding [04:50] mjr_: ryah: I always set it explicitly, just in case. I think there are cases where the auto-magical setting doesn't work. [04:50] _announcer: Twitter: "http://7co.cc/2z - collaborative text editor using node.js and diff/match/patch" -- gleicon. http://twitter.com/gleicon/status/27004881705 [04:51] jamesarosen has joined the channel [04:51] ivong has joined the channel [04:52] ryah: mjr_: hmm - yeah.. [04:52] twoism has joined the channel [04:53] Tim_Smart: ryah: So what it the story with that nextTick calling module.runMain? [04:54] ryah: b27f8ba0 <-- strange [04:55] ryah: Tim_Smart: it fixes something [04:55] quirkey has joined the channel [04:55] ryah: Tim_Smart: something with uncaughtException [04:55] _announcer: Twitter: "@gleicon Awesome, I'm also playing with nodejs -- http://github.com/crodas/Bigdis" -- César D. Rodas. http://twitter.com/crodas/status/27005163546 [04:55] Tim_Smart: OK. [04:55] Tim_Smart: I guess I better work around it anyway, in case people want to require gtk at some weird time. [04:56] ryah: i dont see why http requests should not use chunked by default... [04:57] pquerna: what if you are acting as a reverse proxy to a fucking terrible java application server that barely speaks http 1.0 [04:57] mikeal1: because it's less efficient, especially for rendering images [04:57] micheil: ryah: Path: simple/test-child-process-buffering is that meant to throw atm? [04:57] pquerna: fwiw, just do it; add an override option, but just do it. [04:57] mikeal1: sending images chunked to the browser is painfully slow [04:58] mikeal1: does node already default to chunked unless you set a content-length? [04:58] alexb_ has joined the channel [04:58] alexb_: Shouldn't request.end return request object? [04:58] ryah: micheil: no [04:59] micheil: well, is it meant to be broken? [04:59] ryah: micheil: all tests are working currently [04:59] ryah: afaik [04:59] micheil: found it. [04:59] ryah: (macintosh at least) [04:59] micheil: common.p [04:59] jamesarosen has joined the channel [04:59] micheil: done a global replace on that. [04:59] micheil: should fix it. [04:59] guybrush: hm there is a problem with the socket.io version in npm? the socket.io/socket.io.js isnt served properly? [05:00] guybrush: couldnt get it running (HEAD works fine) [05:00] mjr_: Why would sending images chunked be slow? You probably know the entire length, and you can just send a single chunk for the entire file. [05:01] mikeal1: oh, you mean you're setting the content length and also using chunked? [05:01] mikeal1: why send it chunked if you know the content-length? [05:01] mikeal1: it's actually easier [05:02] mikeal1: to just write chunks out [05:02] mikeal1: without the encoding [05:03] mjr_: Oh, I dunno. My point is that an entire image can be sent as one chunk for just a couple of extra bytes. [05:03] mjr_: Just because it is chunked doesn't mean that it can't be large chunks. [05:06] micheil: ryah: I think this patch is almost done. [05:07] gerred has joined the channel [05:08] alexb_ has joined the channel [05:11] cloudhead has joined the channel [05:11] CIA-77: node: 03Ryan Dahl 07master * rcdd1d67 10/ (src/node.cc lib/tcp.js): Remove old tcp module - http://bit.ly/9FMcic [05:11] CIA-77: node: 03Ryan Dahl 07master * r81ac0d5 10/ (lib/stream.js test/disabled/pipe-test.js): pipe-test fixes - http://bit.ly/9uuSbu [05:11] ryah: some really strange behavior here. [05:11] ryah: there must be some deep net.js bug... [05:12] banjiewen has joined the channel [05:12] mjr_: ryah: strange behavior with what? [05:12] _announcer: Twitter: "@lordmortis that said, nodejs + couchdb makes for fun javascript only web hackery. Fun to play with~ :)" -- shadowmint. http://twitter.com/shadowmint/status/27006237349 [05:12] ryah: test/disabled/pipe-test.js [05:13] mape has joined the channel [05:14] _announcer: Twitter: "Updated some node3p stuff (0.3.0). Also, updated node3p-web, some eye-candy and #couchdb storage. Both updates are in #npm. #nodejs" -- Nick Campbell. http://twitter.com/ncb000gt/status/27006331997 [05:14] mikeal1: when do we turn that off? [05:14] mikeal1: too many damn messages all the time [05:15] mape: mikeal1: ignore? [05:15] ryah: mikeal1: announcer? [05:15] ryah: i like it [05:15] mikeal1: i liked it at first [05:15] mikeal1: now i find it distracting [05:15] ryah: /ignore _announcer [05:15] mape: if anything one might want to use filter:links on the search [05:17] micheil: ryah: hmm.. now I need to fast-forward before generating patches.. [05:17] micheil: also, some tests should've been throwing errors. [05:17] micheil: "common is not defined" [05:17] _announcer: Twitter: "@googleSearch02 nodejs" -- Rails Dev. http://twitter.com/rails_dev_hb/status/27006540995 [05:17] micheil: fixed by var common = require("../../common") [05:18] ryah: micheil: ? [05:18] Tim_Smart: micheil: Hah. Did the parser comparison. [05:18] micheil: the fixtures.. they use the common variable. [05:18] micheil: it's not defined. [05:18] Tim_Smart: (C++ vs ecmascript) [05:18] Tim_Smart: (For redis) [05:18] micheil: so you get an assertion error. [05:19] ryah: micheil: oh [05:19] ryah: why isn't that blowing up my test? [05:19] micheil: I'm not sure. [05:19] micheil: make clean [05:19] micheil: ./configure --debug [05:19] ryah: micheil: which one? [05:19] micheil: make test-all [05:19] micheil: simple/test-repl.js [05:19] micheil: slowly patching. [05:20] skohorn has joined the channel [05:20] chapel: v8: console.log(8+4/22); [05:20] Tim_Smart: Calling into a C++ parser was 10x slower than parsing in ecmascript. [05:20] v8bot: chapel: ReferenceError: console is not defined [05:20] chapel: damn [05:20] ryah: micheil: it's using a global variable [05:20] chapel: v8: 8+4/22 [05:20] v8bot: chapel: 8.181818181818182 [05:20] micheil: Tim_Smart: wow. [05:21] ryah: micheil: it's not an error [05:21] micheil: ryah: it's throwing an error for some reason. [05:21] ryah: not for me... [05:21] micheil: fixed by directly requiring [05:21] ryah: it shouldn't be broken [05:21] micheil: might be the addition of a var declaration [05:21] chapel: v8: var a = 8, b = 2; a+b [05:21] v8bot: chapel: 10 [05:21] chapel: :) [05:21] micheil: is using a global explicitly testing something? [05:22] ryah: no need to add vars while removing deprecations [05:22] micheil: ryah: I was working through the changes to sys -> utils [05:22] micheil: in a few cases I may have added a vars [05:23] micheil: I'm also occassionally hitting EMFILE on simple/test-net-server-max-connections [05:23] mikeal1: ryah: http://gist.github.com/620021 [05:23] ryah: oh i get why this test isn't working... [05:23] derferman has joined the channel [05:23] ryah: i'm waiting until i connect to the server [05:23] micheil: ryah: k, everything now passes. [05:24] ryah: damn [05:24] davidascher has joined the channel [05:24] ryah: we need to ability to write to a stream that isn't yet connected. [05:24] micheil: ryah: writeQueue's? [05:25] dgathright has joined the channel [05:26] ryah: mikeal1: you have to implement filter.write? [05:26] mikeal1: haha [05:26] micheil: stream.createFilter(stream, filterFn) [05:26] micheil: perhaps? [05:26] mjr_: you can write to an http client before it's connected. [05:26] mikeal1: that was silly [05:26] ryah: mjr_: yeah - it should be the same for tcp [05:26] mikeal1: the point of the filter it to have an easy way of creating streams not the other way around [05:27] mjr_: ohh, tcp [05:27] mjr_: Yeah, it really should. I assumed that it was. [05:27] micheil: ryah: in fact, net should provide that functionality to http [05:27] mjr_: It also work for fs write streams, right? I thought I was already doing this. [05:27] sh1mmer has joined the channel [05:27] mikeal1: yeah, this api is backwards [05:28] mjr_: I don't use bare TCP, so I probably missed it. [05:28] mikeal1: i forgot how this was suppose to work [05:28] ryah: mjr_: i think it works for fs.WriteStream [05:28] Tim_Smart: micheil: If I remove the buffer creation + the callback call, it is considerably faster than the ecmascript version... [05:29] micheil: Tim_Smart: then that would be the way to roll then. [05:29] micheil: unless buffer creation + callback call are in JS [05:29] micheil: because from what I recall the calling stuff for other JS objects into C scope is slow [05:30] micheil: but calling arguments isn't too slow. [05:30] Tim_Smart: micheil: This could speed up your websocket parser maybe, but I don't it is worth it. [05:30] mikeal1: ok [05:30] Tim_Smart: *think it is [05:30] micheil: yeah. [05:30] mikeal1: this looks better [05:30] mikeal1: http://gist.github.com/620021 [05:31] micheil: there is a risk changing from pure js to c [05:31] micheil: or c+js [05:31] Tim_Smart: c is pretty comparable to c++ [05:32] micheil: yeah, I more meaning having to suddenly make the module instead of just copy files [05:32] noahcampbell has joined the channel [05:32] micheil: ryah: could you hold off on commits for a few moments while I prepare these patch files? [05:32] Tim_Smart: Yes, that is what I mean :) [05:34] ryah: micheil: sure.. [05:34] micheil: I shouldn't be too long. [05:34] Tim_Smart: micheil: Here was my parse fwiw http://gist.github.com/620030 [05:34] micheil: so how did you want these changes? [05:34] sveimac has joined the channel [05:35] Tim_Smart: parser* [05:35] mikeal1: here we go http://gist.github.com/620021 [05:36] dgathright has joined the channel [05:36] micheil: Tim_Smart: I guess in the end, I need to converse with the learnboost team as to whether to take the websocket parser to C/C++ [05:36] Tim_Smart: micheil: Line 57 - 63 was why it was slow. [05:36] radiofreejohn has left the channel [05:36] micheil: (I'm trying to lower the barrier to taking socket.io to use node-websocket-server infrastructure [05:36] Tim_Smart: micheil: I would only use it for returning the position of a delimiter. [05:37] Tim_Smart: Then do all the buffer work in ecma land. [05:37] micheil: hmm.. [05:37] _announcer: Twitter: "Draw on any web page then share. http://markup.io #neat #tool #nodejs" -- Sverre Ølnes. http://twitter.com/sverre_olnes/status/27007680221 [05:37] micheil: Tim_Smart: I still need to rejoin the buffers. [05:37] Tim_Smart: micheil: I will do a quick bench. [05:38] Tim_Smart: micheil: OK. [05:38] micheil: k [05:43] unomi has joined the channel [05:45] twoism has joined the channel [05:47] _announcer: Twitter: "The day was productive today. I'm reading a book on Ruby, played with Node.js and finished the day by changing a python script:) # progpoliglota" [pt] -- PotHix. http://twitter.com/PotHix/status/27008216590 [05:47] micheil: ryah: here's the migration: http://gist.github.com/620050 [05:48] micheil: I'll follow up with the deprecations as individual patch files. [05:49] micheil: (fixed the gist so you can wget it properly) [05:50] rra_ has joined the channel [05:53] _announcer: Twitter: "I just read up on node.js, since it seems there is a lot of buzz about it. I already have an idea for a testing framework at work." -- Jeremy Whitlock. http://twitter.com/jcscoobyrs/status/27008561445 [05:55] HAITI has joined the channel [05:55] HAITI has joined the channel [05:56] ajsie: is narwhal a competitor of node? [05:56] ajsie: or could i use narwhal on node? could someone explain plz [05:59] jamesarosen has joined the channel [06:00] ryah: micheil: okay just publish your branch on github [06:01] davidascher has joined the channel [06:01] ryah: ajsie: basically [06:01] Tim_Smart: micheil: Yup, C++ is faster at find the delimiter. [06:01] ryah: but they're solving slightly different problems [06:01] Tim_Smart: finding* [06:02] Tim_Smart: micheil: http://gist.github.com/620070 [06:02] ajsie: ryah: basically to which question? :) [06:03] ajsie: narwhal is a framework on top of rhino? and node is a framework on top of v8? [06:03] ryah: ajsie: kind of. narwhal is theoretically platform independent [06:04] ryah: but rhino is the most complete platform [06:04] Tim_Smart: ryah: Why do SlowBuffers have to be so slow :( [06:05] ajsie: should I use narwhal when im using node or is it recommended to use node libraries? [06:05] micheil: ryah: sure thing. [06:06] matjas has joined the channel [06:07] ajsie: cause narwhal uses blocking IO in its libraries right? [06:07] ajsie: isnt that the main reason node.js got this huge popularity over the others [06:07] Mikushi1 has joined the channel [06:08] micheil: ryah: pull request sent. [06:09] CIA-77: node: 03Ryan Dahl 07master * r1d3142a 10/ (lib/net.js test/disabled/pipe-test.js): TCP clients should buffer writes before connection - http://bit.ly/d7WLoQ [06:09] micheil: Tim_Smart: the next part is how to handle the broken packets. [06:10] micheil: I've been told I should assume packets will get broken [06:10] micheil: rather then assuming they won't be [06:11] ryah: micheil: doc/api.markdown changes? [06:11] micheil: not yet. [06:11] ryah: micheil: and doc/index.html [06:11] micheil: I've got partial edits due to the doc branch [06:11] Tim_Smart: micheil: Wow, I get completely different bench results in one terminal over another one. [06:12] Tim_Smart: (one is in a screen session, one isn't) [06:12] micheil: so I can't easily make the changes to the documentation. [06:12] ryah: getting this fucking pipe working is not easy... [06:12] micheil: ryah: although, for all that it's worth, the documentation can be delayed in updating, as the api is mirrored with warning [06:13] micheil: it's not an abrupt breaking change [06:13] ryah: http client -> http server -> pipe -> tcp client -> tcp server [06:13] micheil: ouch. [06:13] Tim_Smart: ryah: Yeah it won't. I remember trying to pump file -> gzip -> response was annoying, [06:13] ryah: im hammering at net.js though. [06:14] jarfhy has joined the channel [06:14] ryah: i feel like it should work at some point.. [06:14] Tim_Smart: Maybe its hungry. Feed net.js some food. [06:15] SubStack: like those e-pet things [06:15] prettyrobots has joined the channel [06:16] benburkert has joined the channel [06:16] mopemope has left the channel [06:19] micheil: ryah: just pushed the changes for deprecation. [06:19] SamuraiJack has joined the channel [06:20] _announcer: Twitter: "NodeCasts - free podcasts for learning Node.js: http://fdw.lu/aHO" [fr] -- DJo. http://twitter.com/LaFermeDuWeb/status/27009926831 [06:20] rra_ has joined the channel [06:20] muk_mb has joined the channel [06:20] Tim_Smart: micheil: Will quickly code something up now, before I go. [06:20] muk_mb has left the channel [06:20] micheil: okay, cool [06:21] jamesarosen has joined the channel [06:21] alexb_ has joined the channel [06:23] micheil: feck. looks like github's pull requests are forward inclusive. [06:23] micheil: ryah: looks like if you want specific things included you'll have to git checkout SHA [06:26] guybrush: i dont understand how to access the raw post-data which i get from an xhr, in php i would use fopen("php://input", "r") - how can i do this with nodejs? [06:27] _announcer: Twitter: "node.js http://ow.ly/19o2xu" -- Javascript News. http://twitter.com/del_javascript/status/27010311611 [06:27] Kami_ has joined the channel [06:29] micheil: guybrush: it'll be in the request object or under the data events for a request [06:29] micheil: I forget which [06:30] guybrush: currently im looking into formidables multipart-parser, but i dont get it at all so far :D [06:33] ajsie: how do you run shell commands from node script? [06:34] d0k has joined the channel [06:34] guybrush: ajsie: http://nodejs.org/api.html#child-processes-89 [06:34] ajsie: thanks [06:35] jacobolus has joined the channel [06:37] daglees has joined the channel [06:37] daglees has joined the channel [06:39] guybrush: micheil: ahh i see now, its in the data-event of http.ServerRequest [06:40] guybrush: nice [06:41] overra has joined the channel [06:44] alexb_ has joined the channel [06:48] felixge has joined the channel [06:48] felixge has joined the channel [06:48] ph^ has joined the channel [06:49] Tim_Smart: micheil: A start http://gist.github.com/620138 [06:50] Tim_Smart: Just need to add the join stuff. [06:54] breccan has joined the channel [07:01] micheil: guybrush: don't try to understand formidable unless you're really good with CS concepts and implementations, probably. [07:01] micheil: Tim_Smart: okay [07:02] Tim_Smart: Hmm there is a bug somewhere. [07:02] Tim_Smart: Wait a sec. [07:04] ivanfi has joined the channel [07:04] _announcer: Twitter: "Mojolicious:: Lite to make chat with at WebSocket - naoya Hatena Diary: WebSocket aim for the "real Web"! - @ IT I read an article. Toi ... http://bit.ly/cx8VoT node.js" [ja] -- 通販マン. http://twitter.com/tuuhanman/status/27012097714 [07:05] micheil: Tim_Smart: yeah, line 79 should have pos = length [07:05] micheil: to skip to the end of the buffer. [07:05] Tim_Smart: micheil: Not that, I'm not getting the data correctly in C land [07:06] micheil: as if we don't have an end, then we need to just skip the rest. [07:06] micheil: okay [07:10] guybrush: micheil: i dont understand why formidable is necessary, why not just writing the data to disk? i want to use xhr.upload on the client-side. with php i just took the stream and wrote it to disk [07:10] astrolin has joined the channel [07:10] micheil: guybrush: because, node's http is like apache level low [07:10] micheil: not php style [07:11] digitalspaghetti: node don't need no stinking server [07:13] ajsie: how do i create modules to be required in javascript? [07:13] micheil: ajsie: explain [07:13] ajsie: like sys = require("sys"); [07:13] Tim_Smart: ryah: Buffer::Data is being weird... [07:13] micheil: okay, generally you'll do: myModule = require("./myModule") [07:14] micheil: then all you need to do is assign properties to the exports object [07:14] micheil: ajsie: iirc, this is covered in the API documentation. [07:14] rra_ has joined the channel [07:14] ajsie: is there a tutorial for this? [07:14] Tim_Smart: ajsie: Did you see that node.js screencast? [07:14] _announcer: Twitter: "A browscap.ini parser for node.js http://www.dangrossman.info/2010/10/11/a-browscap-ini-parser-in-javascript/" -- Dan Grossman. http://twitter.com/djg/status/27012572338 [07:14] ajsie: which screencast? [07:14] Tim_Smart: http://nodecasts.org/ [07:15] ajsie: okay ill check thanks [07:15] ajsie: is that site like railscasts? [07:15] digitalspaghetti: oh i was about to post that too :D [07:15] delapouite has joined the channel [07:15] ajsie: but only one screencast ? [07:15] ajsie: digitalspaghetti: =) [07:16] Tim_Smart: ajsie: It just came out. [07:16] ajsie: okay so more videos in the future i guess [07:16] guybrush: micheil: alright, i guess formidable does not fit for application/octet-stream at all? i wonder if i just could "circumvent" this line http://github.com/felixge/node-formidable/blob/master/lib/formidable/incoming_form.js#L203 by faking the octet-stream as multipart? :D [07:16] micheil: guybrush: uh. I think you'd be doing it wrong. [07:18] guybrush: well, so i will give up on xhr-upload for now - ty for explanation [07:18] Anti-X has joined the channel [07:18] felixge: guybrush: xhr upload is not explicitly supported [07:19] felixge: (I don't know how those actually work) [07:19] ajsie: funny voice in nodecasts.org [07:19] ajsie: he is serious? [07:19] ajsie: :) [07:20] micheil: ajsie: yes, and he's iirc, brazilian. [07:20] guybrush: felixge: i got the idea from http://hacks.mozilla.org/2009/06/xhr-progress-and-richer-file-uploading-feedback/ and used it with http://github.com/valums/file-uploader [07:20] Tim_Smart: micheil: Oh wait, I know what is wrong... [07:21] micheil: ? [07:21] Tim_Smart: 0xFF is a memory delimited (NULL byte) [07:21] Tim_Smart: *delimiter [07:21] Tim_Smart: or is it 0x00 [07:21] Tim_Smart: one of the two. [07:21] micheil: huh? [07:22] micheil: Tim_Smart: should be looking for 0x00 [07:22] micheil: 0xFF ... data... 0x00 [07:22] micheil: because 0xFF & 0x80 === 0x80 [07:23] felixge: guybrush: well, it seems like you won't need a parser for application/octet-stream [07:23] felixge: guybrush: but it also seems like you can only do single file uploads with it [07:23] Tim_Smart: micheil: I thought it was 0x00 data 0xFF.. [07:23] micheil: nup [07:24] aubergine has joined the channel [07:24] micheil: wait. [07:24] micheil: wtf. I'm confused. [07:24] micheil: 0xFF & 0x80 === 0x80 is binary [07:24] micheil: 0xFF & 0x80 !== 0x80 is UTF8 [07:24] Tim_Smart: Yeah. [07:25] micheil: so, 0x00 ... 0xFF [07:25] ajsie: i can't stop to laugh when he is talking .. sounds so funny =) [07:25] guybrush: felixge: ty for response! i will take a deeper look into it - when i get something running i will ping you (just in case im messing it up at all :p) [07:26] ryah: Tim_Smart: why [07:26] Tim_Smart: ryah: It's just be being dumb. [07:26] dachary has joined the channel [07:26] Tim_Smart: ryah: There was a 0x00 byte in the data, meaning printf was terminating the string. [07:26] adambeynon has joined the channel [07:27] micheil: erc. [07:27] Tim_Smart: Actually.. that is screwing things up. [07:28] Tim_Smart: Hm. [07:28] CIA-77: node: 03Felix Geisendörfer 07master * r3cd09e7 10/ test/pummel/test-http-upload-timeout.js : [07:28] CIA-77: node: Stress test for http upload timeouts [07:28] CIA-77: node: This was meant to find a bug in setTimeout, but there doesn't seem to be [07:28] CIA-77: node: one. So this test can no help to prevent future regressions. - http://bit.ly/coXuav [07:28] ryah: felixge: thanks [07:28] felixge: ryah: np [07:29] Tim_Smart: ryah: Why does setting a byte to 0xFF make its value -1? [07:30] mytrile has joined the channel [07:31] ryah: > b = Buffer(10) [07:31] ryah: [07:31] ryah: > b[0] = 0xff [07:31] ryah: 255 [07:31] ryah: > b[0] [07:31] ryah: 255 [07:32] micheil: what's the go with 0c in that buffer? [07:32] rnewson has joined the channel [07:32] ryah: "what's the go" ? [07:32] micheil: well, why's the new buffer that's empty got 0c in it? [07:33] ryah: micheil: the data isn't initialized [07:33] Tim_Smart: ryah: In C++ land. [07:33] chapel: anyone have any experience with cradle? [07:34] Tim_Smart: v8: 0x0C [07:34] v8bot: Tim_Smart: 12 [07:34] micheil: v8: 0xFF [07:34] v8bot: micheil: 255 [07:34] Tim_Smart: v8: 0x0c [07:34] v8bot: Tim_Smart: 12 [07:34] Tim_Smart: v8: String.fromCharCode(12) [07:34] v8bot: Tim_Smart: " " [07:35] pydroid has joined the channel [07:36] sveimac has joined the channel [07:37] chapel: no one? [07:38] _announcer: Twitter: "Previously based in node.js run, upstart, monit, nginx or a feeling? But I do not know at all that strange." [ja] -- MASAHIRO KIURA. http://twitter.com/wasab_i/status/27013644935 [07:38] _announcer: Twitter: "The daemon of node.js but we can do." [ja] -- MASAHIRO KIURA. http://twitter.com/wasab_i/status/27013659455 [07:39] micheil: Tim_Smart: so, memchr wasn't an option? [07:40] Tim_Smart: micheil: It can be... [07:40] micheil: okay [07:40] Tim_Smart: Won't be much faster. [07:40] micheil: ryah: would you be up for having memchr or similar operation within node's buffer library? [07:40] micheil: Tim_Smart: much faster then? [07:40] Tim_Smart: The while loop I'm using. [07:41] micheil: k [07:42] mikeal1 has joined the channel [07:43] micheil: there's also memmem that could work [07:44] _announcer: Twitter: " Mojolicious:: Lite to create a chat by using WebSocket: WebSocket aim for the "real Web"! - @ IT I read an article. node.js. .. http://bit.ly/by3zAv # dncreco # dncaster" [ja] -- #1 Doncaster Network. http://twitter.com/Donca1/status/27013912085 [07:44] ryah: alright micheil, dropping your changes [07:44] micheil: dropping as in not pulling? [07:44] ryah: no, opposite [07:44] micheil: k [07:44] andrewfff has joined the channel [07:45] micheil: gotta love language differences [07:45] alexb_ has joined the channel [07:45] CIA-77: node: 03Micheil Smith 07master * r16a0565 10/ (src/node.cc lib/file.js lib/posix.js): Removing file & posix modules which have been deprecated (+6 more commits...) - http://bit.ly/bD9uyh [07:45] ryah: thanks dude [07:46] micheil: ryah: so, yeah, would you be against a C binding within buffer's to search them? [07:46] micheil: no worries [07:46] ryah: eh - not sure [07:46] micheil: that could potentially make network parsers a fair bit faster [07:46] micheil: especially when it's finding just one char [07:47] Kami_ has joined the channel [07:48] ajsie: is there a way to require all files (sys = require("sys"), exec = require("child_process").exec etc) in one file and then just include that file in another and use all those in that new file [07:48] micheil: yes [07:48] ajsie: cause i dont want to rewrite the same require lines in all my files [07:48] ajsie: micheil: how =) [07:48] Anti-X: yeah but you could have name clashes [07:48] micheil: ajsie: nothing stops you doing: exports.sys = require("sys") [07:48] micheil: I wouldn't recommend doing it though, load only what you need. [07:49] micheil: although, take note the "sys" module in master is now called "utils" [07:49] Anti-X: yeah that's one way, but i think he was thinking var all = require('all'); all.log('sys.log') [07:49] fbits has joined the channel [07:49] ajsie: micheil: okay [07:49] _announcer: Twitter: "Just made available the ultimate dev pack for windows: Redis server v2.0.2 + Node.js v0.2.3 + Express v1.0.0rc3: http://bit.ly/9xnhmp" -- Demis Bellot. http://twitter.com/demisbellot/status/27014162365 [07:50] felixge: micheil: it would pretty much only be useful for finding a char [07:50] ajsie: Anti-X: yeah .. but i think micheil's way was just for that [07:50] micheil: (you won't directly see this for quite a while yet, iirc.) [07:50] felixge: micheil: because usually you don't have all buffers of a message yet, so searching for any sub string longer than 1 character means buffering [07:50] ajsie: in one file i use michells way to require and exports all .. then in my other files i just require that file and use all of its exported modules [07:50] felixge: micheil: WebSocket's are fucked if they really use a boundary byte ... it's just plain stupid [07:50] micheil: Anti-X: yah, so, with the way I suggested, you'd do: all.sys.* [07:50] _announcer: Twitter: "Kewl idea of a box out of the box: Idea + tech + business model lying on a map in less than a minute! WooWOo: D # # node.js webTR" [fr] -- Jean-Louis Huynen. http://twitter.com/gallypette/status/27014216149 [07:50] Kami_ has joined the channel [07:50] micheil: felixge: not for long!@ [07:51] Anti-X: still, i'd recommend requiring stuff where it's used anyways [07:51] felixge: micheil: not for long? [07:51] Anti-X: makes for easier debugging [07:51] micheil: felixge: but other protocols use similar. so it would still be useful [07:51] micheil: felixge: one moment. [07:51] ajsie: micheil: i know there is a performance penalty for this .. but im using it for server things .. so i code faster [07:51] Tim_Smart: micheil: Yeah memchr is faster again. [07:51] micheil: Tim_Smart: k [07:52] micheil: felixge: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-02#section-4 [07:52] micheil: that's the latest draft [07:52] ajsie: could one say that module (require/exports) is equivalent to ruby gem? [07:52] ajsie: or is a package like npm package equivalent to gem? [07:52] micheil: ajsie: not quite. [07:52] Tim_Smart: parser 1496 [07:52] Tim_Smart: parser2 10263 [07:52] Tim_Smart: string 3229 [07:52] micheil: npm is like ruby gems. [07:52] micheil: Tim_Smart: wows. [07:52] micheil: Tim_Smart: that's some impressive figures. [07:53] digitalspaghetti: ajsie: i think of it like python imports (since I don't do Ruby) [07:53] micheil: is parser returning buffers or strings? [07:53] felixge: micheil: ah, so there will actually be a frame length? [07:53] Tim_Smart: buffers [07:53] digitalspaghetti: so var sys = require('sys') is like 'import sys' [07:53] micheil: felixge: yeah, there'll be a length., [07:53] micheil: Tim_Smart: switch them to strings, for an equal compare. [07:53] felixge: micheil: sweet [07:53] ryah: micheil: util would be better than utils [07:53] micheil: so, have each output UTF8 strings [07:53] felixge: ryah: +1 [07:54] felixge: ryah: even so I don't understand the rename to begin with [07:54] micheil: ryah: the reason I used utils was because it was already an alias [07:54] micheil: felixge: free's sys up to be used for system stuff? [07:54] Anti-X: like what? [07:55] micheil: Anti-X: ? [07:55] Anti-X: what system stuff do you see could be included? [07:55] Anti-X: that isn't already [07:55] micheil: ryah: so, if you want I can switch it to util over utils. [07:55] felixge: micheil: meh [07:55] micheil: Anti-X: well, for one the setgid and setuid [07:55] micheil: I have partial evented bindings for those [07:55] Anti-X: wouldn't that be in process? [07:55] micheil: (which I was using os for) [07:55] Tim_Smart: micheil: [07:56] Tim_Smart: parser 1588 [07:56] Tim_Smart: parser2 1731 [07:56] Tim_Smart: string 1301 [07:56] Tim_Smart: For string 'test' [07:56] felixge: Tim_Smart: what are you benchmarking? [07:56] micheil: erm. getpwuid and getpwgid [07:56] Tim_Smart: felixge: websocket parsers [07:56] micheil: felixge: parsers for websockets [07:56] _announcer: Twitter: "For what kind of project would you choose node.js ? Trying to figure out when its a great choice." -- Martin Jonsson . http://twitter.com/martinjonsson/status/27014478266 [07:56] Tim_Smart: micheil: Notice how the first one doesn't degrade though ;) [07:56] micheil: ryah: it's up to you, I'd be fine to switch to util [07:57] micheil: Tim_Smart: yeah [07:57] micheil: Tim_Smart: where as before it did. [07:57] micheil: Tim_Smart: now try the broken packet test. [07:57] MikhX has joined the channel [07:57] Tim_Smart: Let me just get the join code sorted... [07:57] ryah: felixge: yeah - we should think this over a bit more [07:57] micheil: write say: "0xFFdata" "datum0x00" [07:57] micheil: k [07:57] ryah: ACTION pulls out the renaming commits [07:57] Anti-X: !tweet @martinjonsson Anything that requires you to keep a connection up and running for an extended period of time. Long polling AJAX apps for instance. [07:58] _announcer: Twitter: "Javascript not need to be like, node.js. http://bit.ly/ak8aVl" [ja] -- dancerj. http://twitter.com/dancerj/status/27014580062 [07:59] digitalspaghetti: Anti-X: Also, where Javascript is 100% of your stack :D [07:59] astrolin has joined the channel [07:59] Anti-X: we've been through this! until they make a JS BIOS, javascript will never be 100% of your stack! [07:59] digitalspaghetti: (except for that pesky HTML file you need to load your client side stuff) [08:00] digitalspaghetti: well, web dev stack of course [08:00] Anti-X: ;) [08:00] micheil: ryah: perhaps leave them, and then we can do another move? [08:00] micheil: might be a shite load easier due to the amount of changes [08:00] ryah: micheil: already gone [08:00] micheil: okay [08:01] micheil: let me know when we come to a consensus [08:01] digitalspaghetti: it's actually quite scary how i can take JSON from my client side, pop it directly into a couchdb database, and load it again with no conversion or other language involved [08:01] Anti-X: and digitalspaghetti, i wouldn't recommend node for a purely static web server. in that scenario, there are plenty of way faster alternatives out there [08:01] micheil: nginx? [08:01] Anti-X: lighttpd, cherokee, nginx [08:02] digitalspaghetti: Anti-X: oh yea, there is that but taking the server out in terms of the user, my app uses only JS from the ExtJS frontend, nodejs app and couchdb backend [08:02] micheil: Tim_Smart: am I right in saying: memchr <= while? [08:02] digitalspaghetti: the server just makes things more stable [08:02] Tim_Smart: micheil: memchr was faster, yes. [08:02] micheil: okay [08:02] micheil: although, it only finds the first index. [08:02] micheil: is that what people would want from something built into buffers? [08:03] micheil: (for my case, yes, because I'm mutating the buffer in each iteration) [08:03] Tim_Smart: memchr isn't a bad idea I guess. [08:03] Tim_Smart: buffer#indexOf [08:03] Tim_Smart: ryah: --^ [08:04] ntelford has joined the channel [08:04] micheil: more array-esque [08:05] micheil: ACTION checks ECMA262 on the syntax of indexOf [08:05] _announcer: Twitter: "Aim WebSocket the "real Web"! Node.js first shock and the Prosperous Future WebSocket - @ IT http://htn.to/gqDqtC" [ja] -- 石田武士. http://twitter.com/takeboruta/status/27014885018 [08:05] micheil: buffer#indexOf(searchElement [, fromIndex]) [08:05] micheil: Tim_Smart: how could we do a fromIndex? [08:06] ossareh has joined the channel [08:06] Tim_Smart: well memchr is (ptr, char, length) [08:06] Tim_Smart: so indexOf(char, bytesToSearch) [08:07] micheil: hmm.. [08:07] ajsie: micheil: wanted to share my require all file [08:07] ajsie: http://pastie.org/1212480 [08:07] micheil: that would allow you to limit. [08:07] Anti-X: seems like the !tweet doesn't work [08:07] Anti-X: latest nodejsbot tweet was sep 22 [08:07] ajsie: so now i can just require one file and use it ... pretty neat even with performance penalty .. but i just put common usable things there [08:09] micheil: ajsie: not module.exports.* [08:09] micheil: exports.* [08:09] micheil: module.exports is non-standard [08:09] ajsie: micheil: really? the video in nodecasts.org uses it [08:09] micheil: module.exports is also used for overrriding the entire object [08:09] ajsie: as well as other tutorials [08:10] ossareh has joined the channel [08:10] micheil: if you're exporting a single function, then yes, you could use module.exports [08:10] micheil: but otherwise, use exports.* [08:10] micheil: it's safer. [08:10] ajsie: okay [08:10] ajsie: done [08:10] micheil: but in all honesty, a file such as that is kinda pointless [08:11] ajsie: why? i dont have to repeat everything in every file [08:11] ajsie: kinda tedious [08:11] ajsie: there has to be a DRY way [08:11] _announcer: Twitter: "@faresfarhan No, I am still trying node.js. Not sure when I will use it for production." -- Elias. http://twitter.com/saile/status/27015152197 [08:12] micheil: ajsie: well, you're not saving much and you're having negative impact on performance in a way (I would guess) [08:13] micheil: because v8 would have to look / traverse more objects to find the originating object [08:13] ajsie: yeah [08:13] ajsie: :( [08:13] chapel: anyone used cradle for nodejs with couchdb? [08:14] micheil: chapel: not I. [08:14] chapel: what do you guys use for couchdb? [08:14] ajsie: well well .. i dump that solution then =) [08:15] ajsie: doesnt look like standard way of handling stuff [08:15] hellp has joined the channel [08:17] ooooPsss has joined the channel [08:18] Max_Might has joined the channel [08:20] jblanche has joined the channel [08:21] TomY has joined the channel [08:22] mlangenberg: Has node core support for HTML tag escaping? [08:22] CIA-77: node: 03Ryan Dahl 07master * r007881b 10/ test/pummel/test-net-tls.js : No long have tcp module - http://bit.ly/cKsinR [08:22] CIA-77: node: 03Ryan Dahl 07master * r2944e03 10/ (lib/http.js test/disabled/pipe-test.js): Closer to a working pipe - http://bit.ly/c5GMmJ [08:24] ryah: mlangenberg: no [08:25] mlangenberg: ok, thx. [08:26] micheil: hmm, would it be possible to do: memchr(buffer->data_+offset, p, buffer->length_-offset) ? [08:27] micheil: (given the right typecasting to void* and size_t [08:27] alexb_ has joined the channel [08:28] micheil: probably one for Tim_Smart or ryah that.. [08:28] micheil: given, [08:28] micheil: const void * memchr ( const void * ptr, int value, size_t num ); [08:28] micheil: void * memchr ( void * ptr, int value, size_t num ); [08:28] Tim_Smart: Yeah... [08:29] micheil: so we could do the Array-esque indexOf [08:29] Tim_Smart: Well not buffer->data_ [08:29] micheil: why not? [08:29] Tim_Smart: (That is private) [08:29] micheil: it's used within buffer [08:29] Tim_Smart: And fast buffers use a memory pool. [08:29] micheil: so, one would expect node_buffer.cc could use it. [08:30] Tim_Smart: Yeah it could use it fine. [08:30] micheil: so, we could have a Buffer#indexOf( p, fromIndex) [08:30] micheil: awesome. Now to try and prototype this.. [08:31] micheil: ACTION has fun, even if his C/C++ sucks. [08:31] digitalspaghetti: i've forwarded a patch from the node list to node-dev for TZ handling (mainly cos I need it too :D) [08:34] ajsie: is it possible to export an object? [08:34] aubergine has joined the channel [08:34] digitalspaghetti: yes [08:35] ajsie: "exports = my_object" and then use it with "my_object = require("my_object"); my_object.my_function" ? [08:35] digitalspaghetti: hang on a sec [08:35] ajsie: cause it doesnt work [08:35] digitalspaghetti: http://pastebin.com/q9iSVZkM [08:35] digitalspaghetti: for example [08:35] digitalspaghetti: then I call: [08:36] digitalspaghetti: var database = require('database') (as teh file is called database.js [08:36] Tim_Smart: micheil: OK. Got it joining buffers properly. [08:36] daglees has joined the channel [08:36] daglees has joined the channel [08:36] digitalspaghetti: then I can do: [08:36] micheil: k [08:36] digitalspaghetti: database.save(foo, bar) for example [08:36] ajsie: http://pastie.org/1212513 [08:36] aubergine has joined the channel [08:37] Tim_Smart: micheil: http://gist.github.com/620138 [08:37] ajsie: the only difference is in the line 17 and 44 [08:38] FransWillem has joined the channel [08:39] ajsie: hmm [08:39] _announcer: Twitter: "@ Higayasuo Oh, that's also Hi node.js?" [ja] -- koichik. http://twitter.com/koichik/status/27016388110 [08:39] ajsie: the problem was i had to have module.exports [08:39] ajsie: :) [08:39] ajsie: weird...suddenly i have to have it [08:39] ajsie: problem solved [08:39] ajsie: like this: module.exports = sos; [08:40] ajsie: thanks for the example file digitalspaghetti [08:40] digitalspaghetti: ajsie: i think for objects you do need module.exports [08:40] digitalspaghetti: exports is just for functions [08:40] ajsie: yeah [08:40] ajsie: okay [08:40] digitalspaghetti: so you could do: [08:40] JimBastard_ has joined the channel [08:40] digitalspaghetti: exports = function sos() { return { //object in here }}; [08:41] digitalspaghetti: or something along those lines [08:41] sschuermann: re [08:41] ajsie: ah yeah [08:42] ajsie: i love how the functions could be used in javascript [08:42] digitalspaghetti: it's the beauty of functions as first class [08:42] _announcer: Twitter: "So, test driven development Wed JavaScript and Node.js - uiii slowly sucks node." [de] -- Philipp N.. http://twitter.com/botic/status/27016561631 [08:43] _announcer: Twitter: "@ Koichik and I say, but it is vague definition is too wide, I thought not. What do people say that node.js." [ja] -- ショータロー / 坪内 章太郎. http://twitter.com/shootaroo/status/27016581063 [08:43] micheil: Tim_Smart: any ideas on converting a args[0]->ToString(); to an int? [08:44] Tim_Smart: micheil: args[x]->Int32Value()? [08:44] micheil: k [08:45] zooko has joined the channel [08:46] micheil: woo! it built [08:46] Tim_Smart: It's nice having a compiler to tell you where you screwed up ^^ [08:47] micheil: yeah [08:47] Anti-X has joined the channel [08:47] micheil: bbl, dinner [08:47] digitalspaghetti: you guys using gcc or llvm/clang? [08:47] HAITI has joined the channel [08:48] Tim_Smart: Except in that weird case where ryah forgot a return and it didn't complain :/ [08:48] Tim_Smart: digitalspaghetti: gcc atm. [08:48] HAITI: cheers [08:48] digitalspaghetti: i don't really 'do' C/C++ but i really need to think about getting into it [08:48] Tim_Smart: I don't either, but I'm working on some gtk bindings and learning as I go... [08:49] digitalspaghetti: anyway, ubuntu upgrade didn't seem to break so now to shower then start coding [08:50] Tim_Smart: Yeah I need to update sometime.. [08:50] mikeal1 has joined the channel [08:50] Tim_Smart: I might backup first. [08:51] _announcer: Twitter: "Node.js Because I'm all like to assess RingoJS" [ja] -- YAGI.Teruo. http://twitter.com/terurou/status/27016942048 [08:51] caolanm has joined the channel [08:59] _announcer: Twitter: "@ Koichik 降Raseta me to camp gate of the Eclipse refactoring is, I think this is js in Castanopsis millet. node.js Debugger support is nice feeling like I'm out, I run my index finger but we will not use the debugger ..." [ja] -- Takuto Wada. http://twitter.com/t_wada/status/27017332750 [09:03] MattJ has joined the channel [09:03] _announcer: Twitter: "Web Sockets Server (Java) is as WebSocket from client ... node.js Java would possibly take more elegant. # JWebSocket" [de] -- Dmytro Navrotskyy. http://twitter.com/dypsilon/status/27017506619 [09:04] _announcer: Twitter: "@jamieyork I had a mess around with node.js at the weekend. Server side JS is a whole world of fun." -- Dan Jordan. http://twitter.com/danjordan/status/27017551278 [09:04] MikhX has joined the channel [09:06] _announcer: Twitter: "Because the present interest node.js concurrent programming and functional programming, with a time of one hour Tsuyoshi Tsutomu of the neighborhood." [ja] -- tanabe sunao/たなべすなお. http://twitter.com/sunaot/status/27017624201 [09:06] _announcer: Twitter: "@ T_wada expected, TDD and the debugger will also need to incarnate! ! Hmm ... it is impossible. Thanks to you I node.js been helpful even when playing in the debugger." [ja] -- koichik. http://twitter.com/koichik/status/27017636798 [09:08] xla has joined the channel [09:10] virtuo has joined the channel [09:11] pufuwozu has joined the channel [09:13] jetienne has joined the channel [09:15] _announcer: Twitter: "Well, node.js'm Spending on jQuery" [ja] -- Yohei Sasaki. http://twitter.com/yssk22/status/27018057104 [09:21] aliem has joined the channel [09:22] _announcer: Twitter: "Seems like everyone who listens http://radioplz.com is hooked. Source: http://github.com/stagas/radioplz if you care to improve #nodejs" -- George Stagas. http://twitter.com/stagas/status/27018383804 [09:23] _announcer: Twitter: "just installing #debian on my Seagate FreeAgent Dockstar ... ready for some funny times with @couchdb and #nodejs!" -- Julian Moritz. http://twitter.com/feuervogel83/status/27018435668 [09:23] pufuwozu has joined the channel [09:23] micheil: Tim_Smart: yeah, I should have a possible Buffer::IndexOf operation soon. [09:25] bronb has left the channel [09:29] Mobbit has joined the channel [09:29] pufuwozu has joined the channel [09:36] micheil: Tim_Smart: ping [09:36] micheil: > var b = new Buffer("test") [09:36] micheil: > b.indexOf("s") [09:36] micheil: RangeError: Maximum call stack size exceeded [09:36] micheil: any ideas? [09:38] Tim_Smart: diff? [09:39] pufuwozu has joined the channel [09:39] jimmybaker has joined the channel [09:41] felixge has joined the channel [09:41] felixge has joined the channel [09:42] micheil: http://gist.github.com/620277 [09:42] Anti-X: how come multipart is v0.0.0? [09:42] micheil: Tim_Smart: ^ [09:42] sideshowcoder has joined the channel [09:43] Anti-X: you get a stack overflow on indexOf? [09:43] Anti-X: that's particular [09:43] micheil: Anti-X: uh, I think you miss understand; I'm writing the indexOf feature for Buffers. [09:43] Anti-X: oh right [09:43] Anti-X: but still.. why is it recursive? :P [09:44] micheil: I have no idea. [09:45] Anti-X: does it even reach line 39? [09:45] Anti-X: because i would think, if anywhere in that function, that error would be in line 38 [09:46] pufuwozu has joined the channel [09:46] Anti-X: 37 i mean [09:46] micheil: Anti-X: I just removed that. [09:46] ginader has joined the channel [09:46] micheil: line 37 is fine. [09:47] Anti-X: that leaves scope.close() and undefined() [09:47] mbrochh has joined the channel [09:49] micheil: Tim_Smart: any ideaS? [09:50] ginader has left the channel [09:50] Anti-X: what did you change that it went from works to not works? [09:51] micheil: Anti-X: it doens't work and hasn't worked. [09:51] _announcer: Twitter: "websocket / node.js Let's play with" [ja] -- Daisuke Mori. http://twitter.com/mdaisuke/status/27019763399 [09:51] rra_ has joined the channel [09:52] pufuwozu has joined the channel [09:52] Anti-X: doesn't your debugger have a stack dump thing? [09:53] micheil: no. [09:53] Anti-X: or are you coding c++ without a debugger? also known as adrenaline sports... [09:55] Anti-X: a well [09:55] Anti-X: your indexOf js methods call themselves [09:56] Anti-X: at least the slowbuffer one does [09:57] pufuwozu_ has joined the channel [09:58] hassox has joined the channel [09:59] mbrochh has joined the channel [10:02] agnat has joined the channel [10:02] Anti-X: i don't think you need to have lines 9-11 [10:03] Anti-X: because atm it probably overwrites the c++ function [10:03] Anti-X: unless i'm really far off [10:03] _announcer: Twitter: "YouTube favorited a video - Node.js: JavaScript on the Server http://youtu.be/F6k8lTrAE2g?a" [ja] -- 江ミ藤. http://twitter.com/emit7c/status/27020323370 [10:03] pufuwozu has joined the channel [10:04] Anti-X: just thinking out loud too, even if it probably doesn't help :p [10:05] _announcer: Twitter: "nice intro to #nodejs on http://nodecasts.org/" -- SayB. http://twitter.com/SayB/status/27020429517 [10:09] pufuwozu has joined the channel [10:10] cefn has joined the channel [10:11] mlangenberg: Can anybody help me with a Faye extension problem? I am trying to only allow my server client subscribe to a channel called '/messages'. [10:12] Anti-X: micheil, also your error is a JS error.. if that same error was in C++ it would crash the node app, wouldn't it? [10:13] mlangenberg: On the Faye website (http://faye.jcoglan.com/node.html), there is an example to block a subscribtion without a valid token. [10:14] mlangenberg: The browser client has an outgoing extension, while the server has an incoming extension. [10:14] Tim_Smart has joined the channel [10:14] pufuwozu has joined the channel [10:15] Tim_Smart: micheil: Sorry. Were you taking into account the fastbuffer offset? [10:15] Tim_Smart: Take a look at http://gist.github.com/620302 [10:16] guybrush: on() vs addListener()? [10:17] hellp has joined the channel [10:17] MikhX has joined the channel [10:17] Tim_Smart: guybrush: http://github.com/ry/node/blob/master/lib/events.js#L77 [10:17] guybrush: ty :) [10:19] breccan_ has joined the channel [10:20] mlangenberg: Just doesn't look like it is possible to have channel that is only subscribable by the server with Faye. [10:21] pufuwozu has joined the channel [10:22] mAritz has joined the channel [10:27] pufuwozu has joined the channel [10:27] _announcer: Twitter: "@ayende noticed that the mastering nodejs book used markdown and then converts from there http://bit.ly/9GrCmo" -- TheCodeJunkie. http://twitter.com/TheCodeJunkie/status/27021540329 [10:28] Tim_Smart: micheil: Wow, can't believe how many times I screwed up my ecma code. That gist should be working code now... [10:34] pufuwozu has joined the channel [10:36] saimon_ has joined the channel [10:36] _announcer: Twitter: "I have examined their implementation ServerSideJS, RingoJS http://ow.ly/2RxMD # appengine is it runs on, CommonJS are compliant. node.js appengine but also interesting because it focused on movement" [ja] -- higayasuo. http://twitter.com/higayasuo/status/27021999161 [10:38] badaxx has joined the channel [10:41] adambeynon has joined the channel [10:41] pufuwozu has joined the channel [10:47] pufuwozu has joined the channel [10:48] bahamas has joined the channel [10:54] _announcer: Twitter: "I move on GAE attractive. . . PG rest against the interest or give. nodejs Rise of the "programming" or not depends greatly on which part of the re-recognition of the presence programmers." [ja] -- fu_su. http://twitter.com/fu_satou/status/27022918457 [10:54] pufuwozu has joined the channel [10:55] evl has left the channel [10:58] omarkj has joined the channel [10:59] faust45 has joined the channel [11:00] antono has joined the channel [11:03] faust45: hi guy's i looking for lib like http://blog.new-bamboo.co.uk/2010/1/2/dragonfly for node [11:03] faust45: for processing and caching images on fly [11:04] pufuwozu has joined the channel [11:05] rikarends has joined the channel [11:05] rikarends: hi guys, anyone know how to do UDP in nodejs? [11:05] Anti-X: faust45 there is some stuff in development i think [11:06] rikarends: ah dgram. missed that [11:06] _announcer: Twitter: "As a server-side javascript'm talking about. Aptana jaxer feel that the guy saw me a year or so ago in Dounokouno. Or is Node.js comes in with signs? Maybe you can go to a simple server-side. Good cross or not to worry. Oh, hell trauma that screen" [ja] -- 寺瀬功一. http://twitter.com/k_terase/status/27023572512 [11:06] _announcer: Twitter: "As a server-side javascript'm talking about. Aptana jaxer feel that the guy saw me a year or so ago in Dounokouno. Or is Node.js comes in with signs? Maybe you can go to a simple server-side. Cross and ... http://ff.im/-rQQgU" [ja] -- 寺瀬功一. http://twitter.com/k_terase/status/27023574389 [11:07] faust45: Anti-X: did you know any node lib for caching? [11:07] rikarends: Your kung fu not very strong [11:08] kjy112 has joined the channel [11:08] Anti-X: there's node-memcache [11:08] Anti-X: but dunno if that's very suitable for images, unless it supports files as well [11:09] Anti-X: basically you can just write files to /tmp, can't you? it's not too hard to implement [11:10] faust45: Anti-X: thank's [11:10] pufuwozu has joined the channel [11:10] rikarends has left the channel [11:11] path[l] has joined the channel [11:11] _announcer: Twitter: "What is Google V8 JavaScript Engine node.js of whether it was using server-side framework »Mojolicious:: Lite to make chat with at WebSocket http://t.co/UhPYhDD" [ja] -- はやま かおる. http://twitter.com/zetamatta/status/27023869000 [11:12] zorzar has joined the channel [11:12] Anti-X: i like how some people (who haven't tried it) thinks server side js means you start a server in your browser [11:13] Anti-X: it's so cute [11:13] cefn has left the channel [11:15] bahamas: hello. i want to install npm, but i have the following problems: 1) i don't want to use the first install option from there because i've been adivsed not to. 2) second install option require that i have node install in /home/local, but i have already installed node in /home/user/. how can i do this? [11:16] jetienne has joined the channel [11:16] cefn has joined the channel [11:16] bahamas: i'm talking about the installation instructions from here http://github.com/isaacs/npm [11:16] crohr has joined the channel [11:17] pufuwozu has joined the channel [11:20] agnat: bahamas: 1) it's $HOME/local not /home/local. 2) If you installed node in your home directory you should have $HOME/bin/node and Option 3 is what you want [11:23] _announcer: Twitter: "The youtube video got node.js CouchDB mirror writing scripts. . . It can not tell ..." [ja] -- Yohei Sasaki. http://twitter.com/yssk22/status/27024518553 [11:25] bahamas: agnat: i'm new at linux (i'm on ubuntu). i have $HOME/node. does option 3 still apply? [11:27] agnat: bahamas: Option 3 is the general case. You can make it work not matter where you installed node using option 3. You only have to get the pathes right. However, I'd recommend using option 1. It's easy and recommended by isaac (the author) ... [11:27] agnat: bahamas: specially if you are new to linux ... [11:28] bahamas: agnat: but option 1 is not recommended by people on #ubuntu [11:28] pufuwozu has joined the channel [11:29] agnat: ah, right ... sorry ... [11:30] agnat: bahamas: I always use "Simple install" ... it works fine for your situtation as long as node is in your path ... [11:30] teemow has joined the channel [11:34] _announcer: Twitter: "Friendly reminder: Tomorrow another Cologne.JS meetup with Node.js, Ringo.js and Functional JS. http://colognejs.de/" -- cgnjs. http://twitter.com/cgnjs/status/27025141297 [11:35] agnat: bahamas: "Simple install" just looks for node and installs npm in the same location. How did you end up with node flat in your home dir? [11:36] pufuwozu has joined the channel [11:36] bahamas: agnat: i followed the instructions i found on some website. i cloned the repo, then ./configure, make and make install [11:36] _announcer: Twitter: "@SenchaInc Any chance you can add me to the #ExtJS devs list? I'm doing a ExtJS/Nodejs + Connect + Express/Couchdb app" -- Tane Piper. http://twitter.com/tanepiper/status/27025290175 [11:37] bahamas: and node is not in my path, i'll have to add it (i get a permission denied kind of error when trying the simple install) [11:37] agnat: bahamas: hm ... but then it installs to /usr/local ... yeah ... that explains that [11:38] agnat: bahamas: here is what I would do: 1. Remove /usr/local/bin/node, /usr/local/lib/node. [11:39] bahamas: agnat: i followed this tutorial. http://howtonode.org/how-to-install-nodejs the official nodejs page doesn't give too many details, so that sucks for beginners [11:39] _announcer: Twitter: "Real-time voice transmission is an implementation of JavaScript from the browser test. - Saki with this Ajax: WebSocket + node.js in Audio Streaming - livedoor Blog (blog) - http://goo.gl/I0g8" [ja] -- Hiroshi Suda. http://twitter.com/suda_hiroshi/status/27025470321 [11:40] agnat: bahamas: yeah, that installs node system-wide ... which is kind of not recommended ... [11:40] bahamas: ok, remove that folder and then? [11:40] _announcer: Twitter: "Here comes http://nodecasts.org/ . The node.js screencasts." -- Takaaki Kato. http://twitter.com/takaakikato/status/27025524395 [11:41] agnat: bahamas: then do ./configure --prefix=$HOME/my_node [11:41] agnat: bahamas: followed by 'make install' [11:41] agnat: this installs node to a new folder 'my_node' in your home dir ... [11:42] charlenopires has joined the channel [11:42] agnat: than edit $HOME/.profile and add a line like this: 'export PATH=$PATH:$HOME/my_node/bin' [11:43] agnat: bahamas: then do 'source $HOME/.profile' [11:44] agnat: after that node should be in your path and in a location that you can write to ... now simple install should work as expected [11:44] bahamas: agnat: ok. i'll try your instructions [11:45] Anti-X: Tim_Smart, I see you have a uuid package on npm, where is the repo? [11:47] pufuwozu has joined the channel [11:49] charlenopires has joined the channel [11:53] bahamas: agnat: that did it. thank you [11:53] agnat: bahamas: np ... [11:58] pufuwozu has joined the channel [11:58] ben_alman has joined the channel [11:59] dpritchett has joined the channel [12:00] _announcer: Twitter: "# Awesome! nodejs http://bit.ly/avRXXb # # # joyent cloud" [pl] -- Johan Andersson. http://twitter.com/anderssonjohan/status/27026727489 [12:04] bahamas: agnat: i'm curios about something. this time i didn't need to run 'make' because i had already done it the first time i installed node or is 'make' optional? [12:04] charlenopires has joined the channel [12:06] gregerolsson has joined the channel [12:06] niemeyer has joined the channel [12:06] _announcer: Twitter: "Also advised to visit http://di.by/2010/3300/. @ Antono will read about the # Node.JS. I love them both (Tohu and # Node.JS) ;-)" [ru] -- ever.zet. http://twitter.com/everzet/status/27027171575 [12:07] pufuwozu has joined the channel [12:08] agnat: bahamas: well ... 'make install' depends on 'make' ... so 'make install' triggers 'make' ... the tutorial you where looking at uses 'sudo make install' which would have triggered make with root-permissions ... that's why they used two separate commands. [12:10] _announcer: Twitter: "I do not care to look at all the clothes or school. Heck it looks ahead to consider (ry soup. Node.js doll and moving to read all the documentation and source code ejs" [ja] -- こば@好きな人ができた生徒会長. http://twitter.com/KOBA789/status/27027430966 [12:10] agnat: bahamas: if you are installing as a normal (non-root) user 'make install' does everything that is necessary. [12:11] agnat: bahamas: and yes ... this time the 'make [12:11] agnat: # [12:12] digitalspaghetti: micheil: http://openjsan.org/doc/s/sa/samuraijack/Test/Run/0.09/lib/Test/Run.html [12:12] agnat: oops ... the 'make' part was a lot faster because most things where already uptodate [12:12] bahamas: yes, i noticed [12:12] niemeyer_ has joined the channel [12:13] pufuwozu has joined the channel [12:13] Jonasbn_ has joined the channel [12:15] Jonasbn_: Hi guys. I just started looking into Node.js for a specific use case, and was hoping that someone with more experience could advice me on whether its a good idea or not. [12:15] dpritchett has joined the channel [12:16] _announcer: Twitter: "There is something strange with C + + when it is better to write all their code base to. H files. http://bit.ly/cQARFQ nodejs # # o3" [sv] -- Marcus. http://twitter.com/marcusf/status/27027791653 [12:16] MattJ: Jonasbn_: I'm sure someone can if you give more details [12:16] jashkenas has joined the channel [12:16] Jonasbn_: I'm developing a web app for a client. The application is for foreign exchange, and therfore needs to send price data real-time to the client interfaces. I figured node.js would be a great tool here? [12:16] MattJ: Most likely, yes [12:17] Jonasbn_: I've decided to do the actual app in Rails, but figured that node.js could be used as the price engine [12:18] Jonasbn_: The price information os delivered from an external service and stored in database, but would it make sense to only use node.js to communicate the prices after rails puts the data in the database? Or would it be better, if node.js both handles database feeding and communicating to clients? [12:18] gregerolsson: Jonasbn_: There's also an HTTP push module for Nginx which allows you yo do long-polling/comet style apps in Rails that notify Nginx to push info over channels to connected users [12:19] gregerolsson: If you're already heavily invested in Rails, that is.. [12:19] Jonasbn_: gregerolsson: sounds interesting. And not rocket science to implement? [12:20] gregerolsson: Jonasbn_: Not really.. If you're new to Node.js then you're already in for a bit of a learning curve, although Node.js if fairly easy to get started with [12:21] gregerolsson: Jonasbn_: Here's an overview: http://www.igvita.com/2009/10/21/nginx-comet-low-latency-server-push/ [12:21] Jonasbn_: The issue really is, that prices can change several times per second, so the "engine" has to be reliable. [12:21] Jonasbn_: gregerolsson: looks great. Thanks mate! [12:21] Anti-X has joined the channel [12:23] __mn__ has joined the channel [12:23] gregerolsson: I've read about a startup that offers just the kind of service you mention, where the web app stack is implemented in Rails (I think it was) and which pushes notifications to a Node.js stack that keeps the persistent connections to the clients. [12:23] Jonasbn_: gregerolsson: I might know the company you mean. Let me see if I can find it. [12:24] pufuwozu_ has joined the channel [12:24] Jonasbn_: gregerolsson: http://pusherapp.com/ ? [12:24] gregerolsson: Jonasbn_: Yup! That's the one [12:25] Jonasbn_: gregerolsson: Cool. I didn't know they where using node.js [12:26] Jonasbn_: As far as I can see they use HTML5 websockets. I'm completely new to this, but that's not what node.js is based on, is it? [12:26] gregerolsson: Jonasbn_: Not sure what they use for the push service, but the general idea is sound -- implementing the bulk of the app in a more established framework and do websockets/comet in something like Node.js [12:27] gregerolsson: Jonasbn_: It's fairly easy to implement a WS-server in Node.js but Node.js can do regular TCP or you use the great HTTP server that comes with Node [12:27] Anti-X: node is pretty low level, it just happens to have libraries that support tcp, udp, http etc [12:28] Jonasbn_: I guess I'll have to look into the metrics of Websockets, TCP and HTTP. I don't really have a feeling of what would work best. [12:28] gregerolsson: Jonasbn_: If you can have your clients use a particular set of browsers, websockets definately will have the least overhead [12:29] gregerolsson: Not all browsers support them [12:29] Jonasbn_: gregerolsson: yeah, I can see that pusherapp falls back to Flash if the client doesn't support it [12:29] gregerolsson: Jonasbn_: Yes, and that seems to be pretty rock solid from what I can tell [12:30] path[l] has joined the channel [12:30] pengwynn has joined the channel [12:30] Anti-X: you should use socket.io for web communications [12:30] Anti-X: it's simply the best [12:30] Jonasbn_: that seems pretty promising. The first app I did for the client a year ago was in Java. Terrible. [12:31] Jonasbn_: Anti-X: How is that different from Node.js? [12:31] gregerolsson: Jonasbn_: Yeah, hacking Swing, AWT, or SWT isn't very nice when you compare to HTML5 [12:31] Anti-X: it's a library for node [12:32] Anti-X: it lets you use websockets, xhr, jsonp, and stuff like that, without needing to worry about which one is chosen (it automatically chooses the one that fits the client's browser) [12:32] pufuwozu has joined the channel [12:32] Jonasbn_: gregerolsson: yeah, I was ready to shoot myself after a few months. A Rails/websockets approach seems so much more convenient. [12:33] jstemmer has joined the channel [12:33] Jonasbn_: Anti-X: sounds great. I'll definitely check it out. Would you prefer it to what pusherapp provides? [12:34] Anti-X: i prefer it to anything that does the same [12:34] Anti-X: dunno what pusherapp does [12:34] Jonasbn_: Anti-X: hehe, okay.. [12:34] gregerolsson: Jonasbn_: Pusherapp is a complete package with hosting if I understand correctly. And that may not be what you want. [12:35] Jonasbn_: gregerolsson: yeah I think so. That seems like a good starting point though. At least to get up and running. [12:35] gregerolsson: It's a good example though that they though in the same lines as you -- a regular webapp in Rails or similar, and just handle the messaging part in a tool that does it best [12:36] Jonasbn_: What do you guys think in terms of the latency from writing to the database? I guess the push can't be executed before the data is saved, and would Rails be the quickest way of doing that? [12:37] sudoer has joined the channel [12:37] Anti-X: i doubt this is the place to ask about ruby [12:37] Anti-X: ACTION spits [12:37] Anti-X: :p [12:37] gregerolsson: Well, Rails has a global mutex which locks the whole stack. [12:38] _announcer: Twitter: "Bavlyus with node.js. So far, put it on Win7 then cursed half of the world. (If someone accidentally dropped a brick, then zvynyayte)" [uk] -- Ivankiv Mykhaylo. http://twitter.com/Neformal/status/27029354724 [12:38] _announcer: Twitter: "If you use either the DB MongoDB CouchDB node.js but I feel that it probably really is the best one. # Nodejs_jp" [ja] -- 本城 博昭. http://twitter.com/honjo2/status/27029370478 [12:38] bradleymeck has joined the channel [12:38] gregerolsson: So if you can, it would likely be faster if your Rails app just notified the Node.js "module" of your app to both persist and broadcast the info [12:38] jansc has joined the channel [12:39] _announcer: Twitter: "Form validation using jQuery on the server http://github.com/fgnass/jayno #nodejs" -- Felix Gnass. http://twitter.com/fgnass/status/27029449321 [12:40] gregerolsson: Jonasbn_: There are pretty decent web app frameworks for Node.js so you might want to investigate if writing the whole thing in Node.js is perhaps best? [12:40] Jonasbn_: gregerolsson: yeah I see what you mean. What I was thinking was that the module that receives the data could be implemented in something else than rails. That module would the write to the database and notify the pusher module [12:40] gregerolsson: Sounds feasible. [12:40] bahamas: what's the recommended module for exporting data to csv format? [12:40] pufuwozu has joined the channel [12:41] Jonasbn_: gregerolsson: I'll investigate it, for sure. [12:41] Jonasbn_: Finally, any suggestions to the choice of database? :-) [12:42] gregerolsson: Jonasbn_: Well, I think there are good bindings to most of them from both Ruby and JS. [12:42] __mn__: hey, sorry to jump in, but uh... how do I send passwords to Node.js? I'm using websockets.io and you can't really send the value of a input type as password. And I didn't read anything in the API for form data... [12:43] jansc: hi! what's the state-of-the-art way to create XML with node? libxmljs? I'm looking for something similar to the libxml xmlwriter api [12:45] Jonasbn_: gregerolsson: Okay. I'm no DB expert, but from what I hear, postgres should do these kinds of jobs good. Someone said it works completely asynchronous. I haven't looked into it yet though. [12:45] mif86 has joined the channel [12:45] gregerolsson: Jonasbn_: Have only worked with MySQL, MongoDB, and Oracle databases lately. [12:45] gregerolsson: Jonasbn_: Can't speak for postgres, but some people swear by it. [12:46] _announcer: Twitter: "nodejsのgem的な / npm - Node Package Manager http://htn.to/243Z2F" -- Sho Kusano(18). http://twitter.com/rosylilly/status/27029960155 [12:47] __mn__: gregerolsson: if you are using node.js why do you need a database system? just for the comfort of using a database? JSON seems to work beautifully just by itself. [12:48] gregerolsson: __mn__: Personally, with Node.js I use MongoDB. But Jonasbn_ was wondering about integrating a Rails app with a Node.js "messaging" hub [12:48] __mn__: ah. [12:48] gregerolsson: __mn__: Still, if you want to persist stuff that outlive the Node.js process, you surely want something better than flat files, right? [12:49] Jonasbn_: __mn__: Got any suggestions to choice of database? :-) [12:50] __mn__: gregerolsson: from my research flatfiles far outpace database systems for excessive short parsing, which is what I need it for. Though I see the advantages for more heavy weight stuff. [12:50] diorahman has joined the channel [12:50] gregerolsson: __mn__: Agree, the simplest solutions are often the best. [12:51] __mn__: Jonasbn_: depends on your project. Mine is realtime, so I have tons of "queries" -- way too many for me to be comfortable using a database with. They aren't efficient for stuff like that. And I'm only adding tiny snippets. [12:51] jashkenas has joined the channel [12:52] __mn__: so in my head I don't want to deal with the overhead of a database if I know that a simple read, write, parse is faster. [12:52] pufuwozu has joined the channel [12:52] Jonasbn_: __mn__: It's a foreign exchange platform (buying and selling currencies). Prices change multiple times per second, and deals and accounts can be stored in a db [12:53] __mn__: Jonasbn_: yeah... so uh, why on earth would you want to have the huge bulk and overhead of a database system? rrr, I guess that depends on which one you are using. NoSQL? [12:54] gregerolsson: Jonasbn_: Sounds like it's relatively crucial information. So transactions and integrity should probably come high on the checklist. [12:54] Jonasbn_: gregerolsson: exactly [12:54] gregerolsson: So for NoSQL DB's, it sounds like CouchDB would feel a little safer than MondoDB for instance. [12:54] Jonasbn_: __mn__: so it's very important that all exchange rates are stored [12:54] __mn__: if it is anything like MySQL or structures like that... that is going to kill your speed and give you bloat. [12:55] __mn__: stored to... specifically a database? [12:55] gregerolsson: Just my personal optinion, don't want to clank down on MongoDB, but CouchDB has a somewhat different set of goals than MongoDB [12:56] __mn__: how would you describe the security difference between a JSON flatfile db system and an SQL structured db? [12:56] Jonasbn_: __mn__: I'm no expert, so I love any input :-) [12:56] gregerolsson: __mn__: What happens to your data if you get a power outage while flushing stuff to a file? [12:56] Jonasbn_: How would you otherwise store it? [12:56] __mn__: in the end, all databases are just flatfiles with extra features [12:57] __mn__: gregrolsson: what happens if you are in the middle of opening a database connection and the power goes out? :P [12:57] gregerolsson: __mn__: Well, you would at leat want some kind of journaling system that doesn't overwrite data on disk, like CouchDB does [12:57] xla has joined the channel [12:57] gregerolsson: __mn__: Well.. in CouchDB for instance you can kill the process at any time and you never loose data. [12:57] __mn__: Jonasbn: I'm not an expert either, but I'm trying out a JSON flat file system. [12:58] gregerolsson: Granted, this can be done with flat files as well, my point being that you'd have to code in such things yourself [12:58] jansc_ has joined the channel [12:58] ceej has joined the channel [12:58] _announcer: Twitter: "Time to sprinkle some node.js and memcached on the machines :)" -- Arnout Kazemier. http://twitter.com/3rdEden/status/27030878231 [12:59] Jonasbn_: So flat-file systems = better performance but with a greater risk of loosing data? [12:59] jetienne: i heard some people complaining about 0.2.3 compatibility issues. how bad is it [12:59] __mn__: true, but avoiding overwriting and having journaling is as easy as createWriteStream('here.txt',{'flags':'a'}); [12:59] __mn__: well, performance depending on circumstance [13:00] pufuwozu has joined the channel [13:00] __mn__: if you have lots (and I mean lots) of queries with tiny files... flatfiles beat databases in a snap. [13:00] __mn__: however databases are much more efficient for managing slower, less queried, large bulk of data. [13:01] Jonasbn_: And would you consider account and deal models tiny? [13:01] __mn__: (psst, did anybody have an answer to my question about sending password values to node.js via websockets / or how to do this with forms, as the API doesn't have form stuff.) [13:02] __mn__: Jonasbn_: you said realtime currency conversion stuff, that seems like tiny integer based stuff. So yes. [13:02] kriszyp has joined the channel [13:02] Jonasbn_: __mn__: sounds reasonable. Thanks mate! [13:03] __mn__: *sockets.io [13:03] badaxx has joined the channel [13:03] __mn__: Jonasbn_: np, lol, sorry to storm in here with my flatfile bias. :P If you already have stuff set up and understand databases, might as well go with that. [13:04] __mn__: my project is... weird. So I guess I come up with weird solutions for stuff. So my bias may not be desirable for other projects. [13:04] Jonasbn_: __mn__: ORM with Rails is like scratching your ass. But I haven't tried flatfile systems :-) [13:04] __mn__: haha [13:04] _announcer: Twitter: "The JetBrains IDEA WebStorm I'm making it in the. And seems node.js WebStorm2.0 in support. I paid it. . . IDE, but I'm not such what should I buy if just one person to use." [ja] -- koichik. http://twitter.com/koichik/status/27031334672 [13:05] pufuwozu has joined the channel [13:06] cefn has left the channel [13:08] Jonasbn_: Anyway, this channel is definitely added to autojoin. You guys rock. [13:08] _announcer: Twitter: "Node.js Google Calendar API to access the sample. EventEmitter would be helpful and how to use. / 2010-09-21 - Web journal of the shop | | WebJourney http://htn.to/7Jjpbx Development log" [ja] -- 河合 太郎. http://twitter.com/inuro/status/27031653115 [13:09] kriszyp_ has joined the channel [13:10] trotter has joined the channel [13:10] _announcer: Twitter: "#node.js developers: NetBeans + PHP Project + http://bit.ly/bPNj2H + F6 === awesome node environment" -- Jeremy Martin. http://twitter.com/jmar777/status/27031825566 [13:11] _announcer: Twitter: "Twitter Client for node.js Oh well. / Twitter I'm used too. - 2010-09-21 - Web journal of the shop | | WebJourney http://htn.to/iqqKyu Development log" [ja] -- 河合 太郎. http://twitter.com/inuro/status/27031867735 [13:13] _announcer: Twitter: "updating nodejs ppa with 0.2.3... likely the last of for this ubuntu 10.04" -- Jerome Etienne. http://twitter.com/jerome_etienne/status/27032043647 [13:14] sudoer has joined the channel [13:15] pufuwozu has joined the channel [13:16] _announcer: Twitter: "Using Socket.IO with Node.JS to mimic Windows FileSystemObject behavior cross-browser / cross-platform. Also, I have gone quite mad." -- Fred Ostrander. http://twitter.com/sullenfish/status/27032253383 [13:16] _announcer: Twitter: "ooooooooof finally able to run my fist #nodejs app http://nodejs.org/" -- Goutam Dey. http://twitter.com/dgoutam/status/27032296962 [13:17] _announcer: Twitter: "I participated anyway. / Node.js User Group started in Japan - about their susceptibility http://htn.to/cCr6sy" [ja] -- 河合 太郎. http://twitter.com/inuro/status/27032316155 [13:17] robinduckett has joined the channel [13:18] xla has joined the channel [13:20] Anti-X has joined the channel [13:23] softdrink has joined the channel [13:23] diorahman has left the channel [13:24] _announcer: Twitter: "HoIiday kkyaul ~ ~ node.js Lang Look at some fun lol" [ko] -- Outsider. http://twitter.com/Outsider__/status/27032888965 [13:24] _announcer: Twitter: "@bphogan @wavded The schedule is full at #CVCC now. If a presenter cancels, I'll let you know. Would love to see NodeJS at a CVNUG meeting." -- Doug Rhoten. http://twitter.com/dougrhoten/status/27032951944 [13:25] aubergine has joined the channel [13:27] bradleymeck has joined the channel [13:27] _announcer: Twitter: "@dougrhoten @bphogan @wavded but keep Twin Cities Code Camp 10 (April 2011) in mind, we'd love to have a node.js talk there :)" -- Jason Bock. http://twitter.com/jasonbock/status/27033179276 [13:27] joeyn has joined the channel [13:28] joeyn has joined the channel [13:28] siculars has joined the channel [13:32] subclub has joined the channel [13:33] subclub has joined the channel [13:33] ntelford has joined the channel [13:33] pufuwozu has joined the channel [13:34] subclub has joined the channel [13:35] subclub has joined the channel [13:37] ajsie has joined the channel [13:38] jtsnow has joined the channel [13:39] matt_c has joined the channel [13:39] subclub: hey has anyone gotten mysql-libmysqlclient to work on os x? [13:42] pufuwozu has joined the channel [13:42] hsuh has joined the channel [13:42] niemeyer has left the channel [13:46] _announcer: Twitter: "wondering why #nodejs still doesn't support #e4x, we need it guys! http://bit.ly/baqbcB" -- Francisco Jordano. http://twitter.com/mepartoconmigo/status/27034805972 [13:49] _announcer: Twitter: "japh(r) by Chris Strom: Getting Started with node.js and CouchDB - http://bit.ly/bWM3Jy" -- V. http://twitter.com/voluntas/status/27035020207 [13:49] bradleymeck: !tweet @mepartoconmigo, i disagree [13:50] _announcer: Twitter: "Node.js User Group Japan began - as their susceptibility http://htn.to/QKpyMd" [ja] -- Kosei Moriyama. http://twitter.com/cou929/status/27035082725 [13:53] chrischris has joined the channel [13:53] andrewfff has joined the channel [13:55] _announcer: Twitter: "@mepartoconmigo have to correct myself, is not a problem of #nodejs is a problem of the #v8 engine implementation!" -- Francisco Jordano. http://twitter.com/mepartoconmigo/status/27035407832 [13:55] _announcer: Twitter: "maintains a global variable you node.js What Rerun" [ja] -- 右京. http://twitter.com/ukyo/status/27035468864 [13:56] MrNibbles: anyone about? [13:56] _announcer: Twitter: "Has anyone gotten mysql-libmysqlclient to work on os x? #node.js #mysql" -- Joey Nelson. http://twitter.com/joeynelson/status/27035576606 [13:57] sonnym: a bit [13:57] chrischris has joined the channel [13:57] _announcer: Twitter: "I have many views Node.js do something fun, languor Soge" [ja] -- Sho Kusano(18). http://twitter.com/rosylilly/status/27035639351 [13:57] MrNibbles: ACTION waves [13:57] sonnym: how goes? [13:58] MrNibbles: not bad [13:58] MrNibbles: wondering about some debugging tools [13:58] antono has joined the channel [13:58] MrNibbles: at the mo, i keep just setting up a websocket connection and dumping data through to console [13:59] MrNibbles: so i can see nested objects etc [13:59] sonnym: yeah, that's pretty much what I've been doing, too. [13:59] MrNibbles: but its a pain setting it up every time and its far from elegant [13:59] __mn__: are you using socket.io ? [13:59] sonnym: I wrote some tests, but when everything is async, I'm not exactly sure how to handle it [14:01] MrNibbles: __mn__: nope, im using another package which i totally cant remember the name of [14:01] MrNibbles: just trying to find it [14:01] __mn__: ohkay [14:01] aubergine has joined the channel [14:01] sonnym: hmm, there's node-websocket-{client,server} [14:01] sonnym: not sure what else [14:02] MrNibbles: __mn__: http://github.com/miksago/node-websocket-server [14:02] __mn__: gotcha, are you good with sockets? cause I'm trying to figure out how to send password fields through a socket :P [14:03] MrNibbles: it shouldnt be that hard really, how are you trying to do it? [14:04] __mn__: well basically hides the real value (for good reasons) [14:04] MrNibbles: oh i see [14:04] __mn__: so I can't just the value through a socket [14:04] __mn__: :P [14:04] stride has joined the channel [14:04] bradleymeck: this e4x stuff is never going away is it? [14:05] __mn__: e4x looked dumb [14:05] sonnym: __mm__: you should be able to get the value w/ something like: document.getElementById("pass").value; [14:05] sonnym: and then just send it over the socket in a serialized json object [14:06] bradleymeck: e4x is fine if it didnt make the parser for js soo much more hideous [14:06] dylan_ has joined the channel [14:06] __mn__: I managed to get an HTTPS server running with Node, and I got sockets.io to have secure connections on everything except ws:// and wss:// due to a handshake failure. [14:06] digitalspaghetti: XML is dumb, E4X is dumber [14:06] __mn__: sonnym: I tried something like that [14:06] __mn__: but it was received as '' [14:07] sonnym: as far as I can tell, that should work [14:07] figital has joined the channel [14:07] __mn__: if you alert(document.getElementById("pass").value) on an input type = password, it alerts '' [14:07] bradleymeck: i want e4json, oh wait, but yea e4x is a great meta language for a small set of problems, but that is the problem of including it [14:07] __mn__: I'll try again... then, thans. [14:07] digitalspaghetti: e4json == javascript?!?! [14:08] sonnym: I'm trying exactly that on facebook with stuff in the password box and it's working. . . not exactly the cleanest proof of concept, but I think it's correct [14:09] sonnym: if you're using jquery, could be as simple as the difference between $("#pass").val() and .value [14:09] __mn__: sonnym: haha, always test security on FB. ;) [14:13] hunt0r_ has joined the channel [14:13] __mn__: sonnym: oh, okay, yeah, that worked. Wow, thats a huge relief. I thought so. And hey, is it improper to pass passwords to the server on an insecure connection? like http:// or in this case ws:// ? [14:16] aconbere has joined the channel [14:16] bradleymeck: yes [14:17] __mn__: bradleymeck: I've been using socket.io and I got secure connections to work for everything other than the actual wss://, which failed. do you have any experience with secure connections via socket.io? [14:18] bradleymeck: yes, and i can say they are not reliable at this time due to a bug in node's ssl [14:18] yhahn has joined the channel [14:19] bradleymeck: route any secure info over https at the current time using ajax [14:19] bradleymeck: or make an nginx proxy in front of your node server that can reroute ssl as normal [14:19] bradleymeck: s/normal/non-ssl/ [14:19] __mn__: mmm. So its not a socket.io thing. [14:19] __mn__: thanks. [14:21] __mn__: before I go look it up... do you know off the top of your head if socket.io has a feature to send an individual message using an alternate method? like send(message,{transport:xhr-multipart}) ? [14:21] bradleymeck: i do not think so as that would require a second handshake [14:22] __mn__: so what do you recommend I do meanwhile? Should I just force !websocket connections untill a stable secure node update comes out? [14:23] pgriess has joined the channel [14:24] _announcer: Twitter: "# List of hosts nodejs http://bit.ly/9A8Ms3" [fr] -- Jean-Louis Huynen. http://twitter.com/gallypette/status/27038068038 [14:24] __mn__: I mean, honestly, from testing firefox and IE... long-polling seems just as fast as websockets. [14:24] bradleymeck: i would not stream secure info [14:24] bradleymeck: send it over https somehow [14:24] bradleymeck: respond on the socket [14:25] bradleymeck: __mn__ long polling at low latency is fast, at long latency it is terribly bad [14:25] __mn__: oh, wait. sockets.io has a fallback to long polling via https://, thats what I meant. its okay to use that for secure info, yes? (I'm definitely not a security person at all) [14:29] badaxx has joined the channel [14:29] bradleymeck: __mn__ yea [14:29] bradleymeck: just make sure not to leak any sensitive info in js land [14:30] __mn__: very true. :P thanks :) [14:31] bradleymeck: ie. (dont put secure info into your html that is dumped on page load, dont forget to remove any dynamic