[00:00] eric_f: not sure, but anyone have an idea on why when running the basic zombie.js ( http://zombie.labnotes.org/ ) example is throwing with `assert` not being defined? Is the example excluding to mention a required lib? [00:05] xslashxr: hi im trying to create a ajax that calls the node.js server every 2 seconds via setTimeout , but one of my colleagues is saying that i should never use setTimeout for that and told me i should do some kind of infinite looping. what does he mean by that? [00:05] flowlo has joined the channel [00:06] isaacs_ has joined the channel [00:07] sh1mmer has joined the channel [00:10] [[zz]] has joined the channel [00:10] bingomanatee: any insight into this? bson compile error in ck:mongodb-native: [00:10] bingomanatee: https://github.com/christkv/node-mongodb-native/issues/issue/106 [00:11] bingomanatee: *ahem* You know I never had these issues with PHP. [00:13] Aria: .oO(Ever compiled PHP? Ever mucked with its internals at all?) [00:13] mikeal has joined the channel [00:13] RichardJ: Aria: plenty of times, never had any problems [00:14] Aria: Hehe. I've had PHP segfault a bunch. It's LOVELY to fix. [00:14] Aria: Doubly so when you have to look at the internals and see just how badly it's written. [00:14] RichardJ: xslashxr: he doesn't make sense, setTimeout is excellent for that. [00:14] RichardJ: Aria: it all depends on style. [00:14] bingomanatee: hmm. apt-get install php5 [00:14] RichardJ: it's getting better, really [00:14] bingomanatee: Step 2: solve problems [00:14] Aria: Yep. The last few releases of PHP have been MUCH better. [00:14] RichardJ: that's like comparing MySQL and PostgreSQL if you look at the source [00:14] Aria: 4.x was hell, and so was 5.1 [00:15] RichardJ: definitely, yeah [00:15] bingomanatee: Honestly the reason I'm here at all is performance issues with large data processing in PHP. [00:15] bingomanatee: It was slow. the memory leaked. [00:15] Aria: But less "depends on style" in PHP. You look at things that should map to posix calls, and you see ungodly hackery going on intead. [00:15] bingomanatee: but it worked.... [00:15] xslashxr: well what is least intensive on the server, setTimeout every 2 seconds or the, infinite loop aka long polling [00:15] RichardJ: that's why I let my database do the processingen [00:15] RichardJ: xslashxr: infinite loops are almost always "heavy" in a sense [00:16] RichardJ: they keep the cpu busy et cetera [00:16] Aria: xslashxr: Is there data every 2 seconds? Short polling is wasteful if there's no data; long polling is better when you want either faster reaction or the data is hard to predict the timing of. [00:16] bingomanatee: There has never been a truly infinite loop... yet... [00:16] Aria: RichardJ: That depends on whether there's something that waits in the loop [00:16] mape: Hmm anyone here used jsdom on cygwin? [00:17] RichardJ: Aria: only way not to keep the cpu busy is sleeping [00:17] RichardJ: which has the same net result as setTimeout [00:17] Aria: Kind-of. [00:17] RichardJ: of course, not completely, I know [00:17] Aria: Depends on what you're doing in that setTimeout -- I think the real question is long polling vs short intermittent polling [00:17] Aria: (in this case) [00:18] RichardJ: I'd say, don't poll at all, get notified when the data is there [00:18] Aria: Well, that's what long polling does. [00:18] RichardJ: but it's not polling :) [00:18] Aria: Well, it kinda is, in that you have to re-arm. [00:18] RichardJ: it's not even waiting, it's just an "event" [00:18] Aria: But yeah. It's also a way to propagate an event, and therefore a bit superior to actual polling. [00:19] RichardJ: gotta go, sorry [00:20] javajunky has joined the channel [00:20] dipser has joined the channel [00:20] xslashxr: i dont get it so what is the conclusion? [00:22] Aria: Long polling is awesome. But if you have data every 2 seconds, and you don't need instant notice of data, polling with setTimeout might rock just as much [00:22] jimt has joined the channel [00:25] flowlo has left the channel [00:27] bingomanatee: well despite throwing error messages , I guess the ck.mongo library is working. [00:27] bingomanatee: I'll try not to let it keep me up nights. [00:28] Ond has joined the channel [00:28] void_ has joined the channel [00:29] javajunky: guys, whats the maximum stack depth node.js supports by default ? ..and will I get a 'sensible' error when I exceed it ..or is it the usual 'exception of doom' ? [00:29] opengeard has joined the channel [00:31] javajunky: is 6196 or thereabouts a familiar number ? [00:32] xslashxr: how many concurrent connections can node.js handle? [00:32] robotarmy: can someone give me the rundown on the semi-colon - in context of that google post about the 3 places where the parser freaks out - does that apply to node/commonjs ? [00:32] xslashxr: lets just say on a standard quad core server with 2 gigs of memory [00:32] javajunky: robotarmy: 'yes' node.js is just javascript [00:32] xslashxr: i just need an approximate [00:32] javajunky: robotarmy: (errr give or take…but the part you care about is ) [00:33] robotarmy: javajunky: i got that - but what about the ; [00:33] xslashxr: because i have a site that gets around 3k concurrent users, and i am wanting to add a notification feed that polls server every 2 seconds by them and wanted to know if a single node.js is suitable for that [00:33] robotarmy: i see lots of node code without it [00:34] javajunky: robotarmy: Um, ok, but to answer your question … yes it applies to node/commonjs just the same as it does to any other implementation of the language as specified ? … [00:35] robotarmy: javajunky: so the whole minus ; is just a fad [00:36] Aria: xslashxr: Probably. Why every 2? What sort of data? What sort of data transfer can the server's connection sustain? [00:36] isaacs has joined the channel [00:36] isaacs: robotarmy: it's a lifestyle choice. [00:36] javajunky: robotarmy: err, well I guess its a point of view, some people choose to use them, others don't, but your question was whether it applied to node.js … and yes, in the same way it applies to any javascript/ecmascript language ? [00:37] javajunky: isaacs: hah! I refrained from exactly that phrase [00:37] Aria: xslashxr: Is there data every 2 seconds? Or is actual data to send more sparse? [00:37] robotarmy: isaacs hahah [00:37] robotarmy: javajunky: yes - my question was - do the errors that crop up if you leave out the ; in browsers also crop up in the nodejs implementation [00:38] robotarmy: and it seems so [00:38] isaacs: AlexMax: https://gist.github.com/579814 [00:38] javajunky: robotarmy: yup, excactly, the behaviour is as laid down be the specification of how the parser should behave. [00:38] javajunky: which isaacs has documented rather well over on his blog… [00:39] isaacs: AlexMax: I build node and npm from source on my local machine, and use nave for other versions. on my debian server, i install node using `nave usemain stable` and npm with the curl oneliner [00:39] isaacs: robotarmy: what errors crop up if you leave the ; out in browser js? [00:40] javajunky: isaacs: I don't suppose you know off the top of your head what the max stack depth is outta the box ? [00:40] isaacs: javajunky: in v8, i'm not sure. the spec doesn't specify. the lowest number i've ever heard is 100 [00:40] robotarmy: isaacs http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml?showone=Semicolons#Semicolons [00:41] javajunky: I'm running someone else's lib and I seem to get problems at around 6096 ;) (eek) … but I'm not getting actual 'overflow' type errors' [00:41] isaacs: v8: var n = 0; function f(){n++;f()}; try {f()}catch(e){n} [00:41] v8bot: isaacs: 25671 [00:41] isaacs: javajunky: ^ [00:41] javajunky: isaacs: cheers, hmmm .. shouldn't be that then …also why the hell didn't I think of trying that ;) [00:42] isaacs: javajunky: in the node repl, it seems to be 26136 on my system [00:42] isaacs: javajunky: but probably because it's wrapped differently. [00:42] isaacs: but, yah, about that [00:42] javajunky: just running the test here ;) [00:42] javajunky: 21744 [00:42] javajunky: but not getting that exception, so it isn't that *sigh* [00:42] isaacs: robotarmy: that's why when you start lines with ( or [, you need to prefix them with ; [00:44] javajunky: isaacs: 3> ;) it was a stack overflow, it must be memory related, running the actual code it bums out at 6196..but now I"ma ctually trapping the error (doh!) I Can see its a stack overflow… ughh tomorrow's job is re-write this recursive code into something a little more iterative ;) … open source sucks [00:45] darthdeus has joined the channel [00:48] isaacs: robotarmy: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding [00:48] isaacs: robotarmy: for the record, i don't care if you wear pants or not. do what makes you happy. [00:49] AlexMax: How can I tell what packages I have installed with npsm [00:49] AlexMax: erm npm [00:49] isaacs: AlexMax: npm ls installed --noreg [00:50] chapel: :) [00:50] isaacs: AlexMax: the --noreg isn't necessary, just makes it faster if it doesn't hit the registry [00:50] chapel: isaacs: I liked your blog post [00:50] robotarmy: thans isaacs that is helpful [00:51] hornairs has joined the channel [00:54] muk_mb: could someone have a look at my request on line 126 here https://github.com/sgoodwin/AppEngine/blob/master/server.js ? It's not responding when I attempt to POST to it, not sure why. [00:55] muk_mb: no errors either [00:58] jimt_ has joined the channel [01:03] muk_mb: oh nvm, figured it out [01:04] mikew3c_ has joined the channel [01:06] jimt has joined the channel [01:07] isaacs has joined the channel [01:07] micheil: isaacs: your blog's offline [01:07] isaacs: micheil: well, that's why they call it tumblr [01:07] micheil: yeah [01:13] davidwalsh has joined the channel [01:13] robotarmy: :d it's so awesome that it goes down at times [01:13] robotarmy: <3 tumblr [01:13] robotarmy: it's up [01:14] boaz has joined the channel [01:14] jashkenas has joined the channel [01:15] micheil: isaacs: are we getting a v8 debugger in core? [01:15] isaacs: micheil: we're getting a node debugger in core. [01:15] micheil: a client for it that is [01:15] isaacs: micheil: ryah's working on it [01:15] micheil: sounds cool [01:15] isaacs: put "debugger" in your node program, and then step through it [01:15] isaacs: jsut with node. no otherthings. [01:16] micheil: I've pretty much been offline the last week or so, so I'm trying to catch up a little bit :P [01:16] isaacs: and a cleaner API for hooking in stuff like node-inspector and such [01:16] isaacs: also, ryah promised ponies for all node users. [01:16] isaacs: oh, whoops, sorry, that wasn't supposed to be public yet! [01:16] micheil: unfortunately sydney doesn't feature wifi hotspots like SF/mountain view [01:16] micheil: isaacs: narwhal's could've been better. [01:17] isaacs: micheil: in theory, sure, but they're actually just wet gross sea animals when you get up close. [01:17] isaacs: and they stab a lot. [01:17] masahiroh has joined the channel [01:17] micheil: hmm, much like those sea lions I was told about.. [01:20] mikeal has joined the channel [01:24] pyrotechnick has joined the channel [01:26] hornairs: can anyone help a friend out with some not really node related javascript? if you visit this page: http://ukijs.org/, run the example code, and then in an inspector console look at the object returned by uki("Button[text^=Hello]"), how might you get a list of the functions defined on that object? [01:28] hornairs: a link to the source for that object is on the same page but its prototype is defined in a seemingly odd way such that Object.keys(uki("Button[text^=Hello]")) doesn't return anything useful [01:28] sivy has joined the channel [01:34] CIA-121: node: 03Ryan Dahl 07debugger * r294bcb3 10/ (lib/_debugger.js test/simple/test-debugger-client.js): [01:34] CIA-121: node: debugger: Fix some parser issues [01:34] CIA-121: node: Wouldn't handle events if it got backed up. - http://bit.ly/h8tLqb [01:36] ryah: ^-- annoying bug [01:36] TheEmpath: any instructions on how to isntall nodejs on centos 5.5/ [01:37] isaacs has joined the channel [01:37] pyrotechnick: does anyone know about scope.Close()? [01:37] ryah: TheEmpath: should work out of the box [01:37] ryah: pyrotechnick: yes [01:38] pyrotechnick: could you take a quick look at my extension and tell me where i'd need to use it please [01:38] pyrotechnick: ill push it [01:38] TheEmpath: when i configure, it says its missing stuff [01:39] TheEmpath: Checking for sync_file_range(2) : no [01:39] pyrotechnick: everyones does [01:39] TheEmpath: port.h, sys/event.h, kqueue, and sys/eventfd.h not foudn either [01:39] ryah: TheEmpath: doesn't matter [01:39] ryah: pyrotechnick: use it everywhere. [01:40] TheEmpath: k [01:42] pyrotechnick: right. it's not segfaulting anymore it's just infinately looping [01:43] pyrotechnick: i dont know how you did node ryah [01:43] boaz_ has joined the channel [01:43] dguttman_ has joined the channel [01:43] pyrotechnick: right [01:43] pyrotechnick: ryah: https://gist.github.com/51a11c3bf54224e0af73 [01:44] pyrotechnick: do i need to change my API? all of the docs ive found use "MyObject::New()" [01:44] pyrotechnick: instead of new MyObject [01:44] ryah: pyrotechnick: you always need to return a value [01:44] ryah: return Undefined() if you don't care [01:44] Hello71: Undefined()? [01:44] pyrotechnick: so in SetGravity and AddRigidBody i have to return Undefined [01:45] pyrotechnick: etc [01:45] pyrotechnick: what about scope.Close do i need that anywhere i do not have it [01:45] ryah: you need scope.Close everytime you return a value unless they are constants like Undefined(), True(), False(), or Null() [01:45] pyrotechnick: and what do i close exactly? args.This()? [01:45] ryah: return scope.Close(Undefined()) [01:46] pyrotechnick: right. [01:46] ryah: pyrotechnick: i think return args.This() works [01:46] pyrotechnick: in all of those methods? [01:46] ryah: but put a scope.Close() around it just in case :) [01:46] pyrotechnick: i need a return in them all? [01:46] ryah: v8 isnt good about warning you about these things [01:46] ryah: yes [01:46] pyrotechnick: cool [01:46] ryah: your compiler should be erroring on you [01:46] pyrotechnick: can you see anything else retarded i may be doing [01:46] pyrotechnick: im using node-waf [01:46] pyrotechnick: its not [01:47] pyrotechnick: is there a better way to build it [01:47] ryah: no [01:47] pyrotechnick: ok [01:47] pyrotechnick: its not bitching [01:47] ryah: hm [01:47] pyrotechnick: sokay i will try what you said [01:47] ryah: it should be telling you that you're not returning... [01:47] pyrotechnick: yeah it's rude isnt it [01:47] pyrotechnick: thanks i wont keep you too long, ill try what you said [01:47] ryah: perhaps you should put -Werror in your gcc args [01:47] pyrotechnick: ok [01:48] daniellopezific has joined the channel [01:48] void__ has joined the channel [01:48] daniellopezific: is there any particular reason that a CMS has not been built using node.js? [01:48] pyrotechnick: because instead of making one [01:49] pyrotechnick: everyone just talks about making one [01:49] pyrotechnick: and why one hasnt been made [01:49] daniellopezific: haha [01:49] daniellopezific: just wondering, i would hate to start on one only to find out there's a reason it hasn't been done [01:49] heavysixer has joined the channel [01:50] pyrotechnick: make sure you do it open-source [01:51] daniellopezific: nah, i'm all for proprietary software [01:51] pyrotechnick: NOOOOOO [01:51] daniellopezific: kiidding [01:51] pyrotechnick: i think it should be like hmm [01:51] pyrotechnick: theres one in ruby where instead of having plugins [01:51] pyrotechnick: you actually patch the code itself [01:52] pyrotechnick: i think thats a cool idea and node lends itself well to that way of doing plugins [01:52] pyrotechnick: like monkey patches [01:52] pyrotechnick: i think there needs to be a 'rails' first [01:52] pyrotechnick: and then do the CMS off that [01:52] daniellopezific: ideally it would be event driven, since javascript is naturally this way... similar to drupal but not forced and unnatural [01:53] pyrotechnick: yeah alot of people were throwing the drupal word around here this morning [01:53] daniellopezific: but hey, i'm going to stop talking about making one... :P [01:53] pyrotechnick: all itll take is a seed [01:53] void_ has joined the channel [01:54] CIA-121: node: 03Ryan Dahl 07debugger * raea568b 10/ (lib/_debugger.js test/simple/test-debugger-client.js): Fix some errors in debugger tests - http://bit.ly/hLm8LL [01:55] pyrotechnick: daniellopezific: if we did it we would make it realtime [01:55] pyrotechnick: imagine a real-time wikipedia [01:57] chapel: google wave [01:57] webr3: I'm not getting it [01:57] webr3: so you're reading about something and the sentence changes as you read it.. is that good? [01:58] void__ has joined the channel [01:59] daniellopezific: yea i'm not digging it, just looking to make a simple modular CMS that is all in javascript [01:59] webr3: define CMS [02:00] pyrotechnick: ryah: yu da man! [02:00] daniellopezific: content management system? [02:00] pyrotechnick: thanks mate i appreciate your time [02:00] daniellopezific: :P [02:00] DTrejo has joined the channel [02:00] pyrotechnick: EVERYONE [02:00] pyrotechnick: GET READY [02:00] DTrejo: good evening [02:00] pyrotechnick: FOR NODE-BULLET [02:00] chapel: DTrejo [02:00] pyrotechnick: HI DTrejo [02:01] pyrotechnick: how can we help you? [02:01] webr3: ACTION wonders what node bullet is [02:01] chapel: did you use trillo for your phone script? [02:01] pyrotechnick: bullet physics [02:01] DTrejo: node-bullet, sounds sexy :) [02:01] hobodave has joined the channel [02:01] DTrejo: chapel: yep, twilio for the phone stuff [02:01] chapel: ah, so every time someone calls you are paying? [02:01] webr3: pyrotechnick, cheers [02:01] DTrejo: do you guys know know of any node related events coming up in the bay area? [02:01] johnnywengluu has joined the channel [02:01] chapel: none that I know of [02:02] pyrotechnick: yeah [02:02] pyrotechnick: the global release of node-bullet [02:02] webr3: daniellopzeific, lol I know what cms stands for, i meant, what flavour of CMS, it's a pretty broad genre and typical CMS's go about things /all/ wrong [02:02] pyrotechnick: drupal [02:02] pyrotechnick: he wants drupal [02:02] DTrejo: chapel: the account gets some free credits, and since the # on the demo site is the sandbox #, they don't charge :) [02:02] chapel: ah thats cool [02:02] jashkenas has joined the channel [02:03] chapel: did you do a custom thing to hook into twillo, or is there a module? [02:03] webr3: drupal written in js for node? [02:03] JusticeFries has joined the channel [02:03] webr3: ACTION cries [02:03] void_ has joined the channel [02:03] richcollins has joined the channel [02:03] daniellopezific: the last thing i want is drupal [02:04] daniellopezific: however, i do want an event driven modular paradigm like drupal [02:04] chapel: https://github.com/sjwalter/node-twilio ? [02:04] DTrejo: chapel: well, what I wrote was really not too fancy: basically it shows you how to receive keypresses from twilio, and then send them down over socket.io. It's basically a demo so that you don't have to read the API docs as much, or so you can get going faster. There's node-twilio also, which seems like it would be good for more heavy duty twilio magic [02:05] DTrejo: right [02:05] chapel: cool [02:05] chapel: yeah the socket.io stuff isn't really necessary [02:05] DTrejo: ah, yeah, I just had that in there because if you're making a game, it helps to have that [02:05] chapel: yeah [02:07] daniellopezific: webr3, how do typical CMS's go about things all wrong? [02:07] sechrist has joined the channel [02:07] CIA-121: node: 03Ryan Dahl 07debugger * r7b9a2f2 10/ lib/_debugger.js : debugger: Don't prompt until child is killed - http://bit.ly/e1LIZs [02:07] isaacs has joined the channel [02:07] DTrejo: chapel: are you working on something related to twilio? [02:08] sechrist: twilio o o [02:08] chapel: not sure if you remember, I wanted to make a phone call reminder like service, part self help, part gtd [02:08] DTrejo: oh yeahh [02:08] DTrejo: how is it going? [02:08] webr3: daniellopezific, generally they concentrate on application state being on the server side rather than the client side, and do weird things like provide forms with text areas and input boxes to "enter content" only to later show it in an HTML page [02:09] benburkert has joined the channel [02:09] webr3: as in, typically CMSs have about 99% more code than they need [02:09] webr3: first point of call is typically, "database!" [02:10] daniellopezific: right, i'm all about simplicity. I dont see anything wrong with having a database [02:10] chapel: speed :) [02:10] webr3: neither do I, but only when one is needed, and often one isn't, and certainly not for all the crap people put in databases [02:10] chapel: if I were to build a cms today in node, I would hit up redis first [02:10] void_ has joined the channel [02:10] webr3: I wouldn't.. [02:11] webr3: I'd hit up contenteditable [02:11] webr3: then save a flat file [02:11] webr3: job done [02:11] pyrotechnick: YAYYYYY [02:11] pyrotechnick: world pos = 0.000000,-0.005555,0.000000 [02:11] pyrotechnick: world pos = 0.000000,-0.013885,0.000000 [02:11] pyrotechnick: world pos = 0.000000,-0.024990,0.000000 [02:11] pyrotechnick: world pos = 0.000000,-0.038871,0.000000 [02:11] pyrotechnick: world pos = 0.000000,-0.055527,0.000000 [02:11] pyrotechnick: world pos = 0.000000,-0.074958,0.000000 [02:11] pyrotechnick: world pos = 0.000000,-0.097164,0.000000 [02:11] pyrotechnick: world pos = 0.000000,-0.122146,0.000000 [02:11] pyrotechnick: YAAAAAAAY [02:11] daniellopezific: content editable is so sloppy though [02:11] webr3: balls [02:11] chapel: eh, scaleability sucks hitting the fs [02:11] daniellopezific: its not very practical [02:11] webr3: chapel, you joking? [02:11] chapel: :P [02:14] webr3: ACTION looks at http://zombie.labnotes.org/ [02:14] webr3: ACTION looks at http://www.propulsionjs.com/ [02:15] webr3: ACTION reads http://groups.google.com/group/nymphormation/browse_thread/thread/25f004088a936d93 [02:16] webr3: ACTION likes quote "".. We need a common standard to install plugings or external programs from the web in any machine. ..." [02:17] webr3: ACTION has been saying that forever! - need support for widgets specs in main browser context [02:18] daniellopezific: apparently couchDB is best for CMS systems: http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis [02:21] void_ has joined the channel [02:21] webr3: yup, I've used all of them for a heavy usage cloud storage system, we ended up coupling couch and redis together, redis positioned as a fast io cache [02:21] webr3: mongo was okay... cassandra looked the best but some features weren't ready yet that we wanted [02:22] webr3: (like the api.. iirc) [02:23] slloyd has left the channel [02:35] admc has joined the channel [02:35] derferman has joined the channel [02:39] eric_f has joined the channel [02:40] briznad1 has joined the channel [02:42] evanmeagher has joined the channel [02:43] muk_mb: is anyone using Formidable? [02:43] DTrejo: I tried one time, but I probably didn't try hard enough [02:45] muk_mb: I can't tell if it's the problem or if something I did is messed up [02:49] isaacs_ has joined the channel [02:50] CIA-121: node: 03Ryan Dahl 07debugger * raf6662d 10/ (lib/_debugger.js lib/readline.js): debugger: Prompt before quitting - http://bit.ly/eNP3XM [02:50] CIA-121: node: 03Ryan Dahl 07debugger * r916f567 10/ (3 files): debugger: a little bit of doc - http://bit.ly/fOpY7o [02:51] ryah: i think it'll be okay to merge debugger now [02:52] ryah: https://github.com/ry/node/blob/916f567d23c9e665f71c63df05734823b085fff4/doc/api/debugger.markdown [02:54] micheil: so, what debugger is purely triggered by a `debugger;` statement in code? [02:54] TheEmpath has joined the channel [02:54] micheil: oh, wait, no. [02:54] TheEmpath: so if my node.js never idles and is always consuming cpu, thats normal, right? [02:54] ryah: the debugger is built in [02:54] ryah: TheEmpath: no [02:54] skm_ has joined the channel [02:55] micheil: ryah: hmm, why `node debug` why not --debug? [02:55] davidwalsh has joined the channel [02:55] TheEmpath: damn [02:55] TheEmpath: i was afraid of that [02:55] ryah: micheil: well - one is to start the debugger client the other is to start the server [02:56] ryah: which is a bit confusing i admit [02:56] micheil: it is a bit. [02:56] ryah: micheil: can you think of a better way to do that? [02:56] micheil: not yet. [02:56] micheil: we still should probably rewrite that code for command line arguments [02:57] ryah: yes, probably [02:57] micheil: --debug (run as client) [02:57] micheil: --debug PORT (run as server) [02:57] micheil: maybe? [02:58] ryah: maybe [02:58] DTrejo: this probably doesn't make sense, but it could start both [02:59] CIA-121: node: 03Daniel C 07master * rca8cc71 10/ lib/events.js : EventEmitter.prototype.once should "return this;" - http://bit.ly/f5X0D7 [03:00] sveimac_ has joined the channel [03:09] softdrink has joined the channel [03:12] estrathmeyer has joined the channel [03:14] caligula_ has joined the channel [03:15] bingomanatee: https://gist.github.com/760678 is tossing "connection reset by peer" errors and breaking - despite numerous try/catch - any suggestions? [03:15] googol has joined the channel [03:15] CIA-121: node: 03Sami Samhuri 07master * re5a47c8 10/ lib/console.js : use util.inspect to format objects and arrays printed to the console - http://bit.ly/gz24sY [03:18] ryah: bingomanatee: client.on('error', function () { }); [03:20] mikeal has joined the channel [03:24] bingomanatee: yar - when I stopped pumping through data I fixed the problem. [03:24] bingomanatee: thanks. [03:27] vnguyen has joined the channel [03:32] muk_mb: what's the easiest way to handle file uploads? [03:32] derferman_ has joined the channel [03:35] DTrejo: I feel like this is a horror: http://grab.by/88Gb [03:37] jchris1 has joined the channel [03:37] wycats has joined the channel [03:37] omygawshkenas has joined the channel [03:38] muk_mb: also, how do I run the tests on someone's node package? [03:43] estrathmeyer: muk_mb: A lot of ppl will give testing instructions on their repo page, or in the readme.checking the top of their test files to determine what [03:43] micheil: muk_mb: try `npm test package` [03:44] estrathmeyer: testing package they're using and then looking that package. [03:45] muk_mb: doesn't look like that did anything [03:45] DTrejo has joined the channel [03:46] muk_mb: https://github.com/felixge/node-formidable this is the package I want to run tests on [03:46] bingomanatee_: muk_mb: file upload in express: https://github.com/visionmedia/express/blob/master/examples/multipart/app.js [03:47] muk_mb: oh ok cool [03:47] muk_mb: thanks bingomanatee [03:47] bingomanatee_: Don't thank me. Get a VIMM shirt. :D [03:47] muk_mb: http://vimm.net/ [03:47] muk_mb: ? [03:48] bingomanatee_: http://www.cafepress.com/MyLinkedFace [03:49] DTrejo: bingomanatee: I don't get it [03:49] zentoooo has joined the channel [03:50] bingomanatee_: VIMM: Vomit In My Mouth. [03:50] bingomanatee_: I'm trying to start a meme. [03:50] bingomanatee_: So far I have about 15% coverage of this channel but a guy can dream. [03:51] DTrejo: and the @10:34, meaning at that time of day [03:51] bingomanatee_: the time of day that VIMM was introduced into the channel. [03:51] VIMM: @10:43 [03:51] muk_mb: lol [03:53] isaacs has joined the channel [03:55] c4milo1 has joined the channel [03:55] volve has joined the channel [03:56] volve: hey all - anyone using Zombie for testing? Latest version (0.8.3) is giving me TypeErrors when visitng a url that sets cookies... :/ [03:57] evanmeagher: anyone else notice that if you specify a doctype in jade (served via express), css is ignored? [03:58] jpld has joined the channel [04:00] RichardJ: evanmeagher: no, I'm not noticing it [04:01] evanmeagher: strange. must be me, then [04:01] evanmeagher: thanks RichardJ [04:01] RichardJ: depends actually, "what" css do you mean? [04:01] RichardJ: external stylesheet, inline style attribute, style tag? [04:02] RichardJ: well, all works well here [04:02] RichardJ: weird :) [04:03] RichardJ: off to bed now [04:04] Ond has joined the channel [04:08] ryah: http://nodejs.org/dist/node-v0.2.6.tar.gz <-- please test [04:08] ryah: esp macs [04:09] AAA_awright: daniellopezific: Like what? [04:09] AAA_awright: daniellopezific: ping [04:09] creationix has joined the channel [04:10] AAA_awright: webr3: Perhaps you would be interested in what I'm working on [04:11] rchavik has joined the channel [04:11] rchavik has joined the channel [04:13] heavysixer has joined the channel [04:13] evanmeagher: isaacs: I'm thinking about how to style the npm doc site [04:14] muk_mb: hahahaha [04:14] isaacs: evanmeagher: awesome. that's a good thing to think about [04:14] muk_mb: handling forms with express means using connect-form which uses formidable [04:14] evanmeagher: isaacs: for the root "select-a-pkg" page, what would you think of a tiling of links, similar to the redis command docs: http://redis.io/commands [04:14] muk_mb: which I think is broken [04:14] evanmeagher: isaacs: seems kinda cool, but might come off as copying [04:14] isaacs: copying is fine. [04:15] isaacs: don't get too invested in any particular implementation, though. it'd be good to try out a few different things. [04:15] isaacs: also, it'd be nice if the a's didnt' get such high priority :) [04:15] isaacs: or maybe some kind of breakdown by keyword or something [04:15] isaacs: i dunno [04:16] isaacs: i guess you can pick just some random display mechanism, and then we can tweak how it gets done. just make it flexible, i guess. [04:17] evanmeagher: isaacs: sounds good. i'll ping you once i get something tangible. [04:18] evanmeagher: isaacs: also, i was looking at node-supervisor and wondered if it would be possible to have it watch non-js files, especially in cases when you're using express [04:18] evanmeagher: so like if you change a .jade or .sass file within ./views/, it would update accordingly [04:18] isaacs: evanmeagher: i think that shouldn't be too hard [04:19] timemachine3030 has joined the channel [04:19] creationix: isaacs: you around? [04:19] isaacs: creationix: hey [04:19] creationix: oh, hey, I guess I should have scrolled down before asking [04:19] isaacs: hahah [04:20] creationix: isaacs: so I have a npm "best use case" question [04:20] isaacs: k [04:20] creationix: I have a dinky little static file middleware for stack [04:20] creationix: I want it in npm so I can write packages that depend on it [04:20] creationix: but I don't want to create a high-quality supported package [04:20] isaacs: hahaha [04:21] isaacs: ok [04:21] creationix: is there the idea of private repos [04:21] DTrejo has joined the channel [04:21] creationix: or should I just prefix is with creationix [04:21] isaacs: yeah... so... prefixing it with creationix is one way. you can also replicate the registry, but that's a pita [04:21] creationix: the thing I really liked about github is the only namespace collision is within your own projects [04:21] creationix: (verses bazaar) [04:22] isaacs: creationix: the downside of that is that you end up with stuff like there being 3 different "markdown-js" repositories [04:22] isaacs: creationix: each of which has several forks. [04:22] creationix: right [04:22] AAA_awright: ...that's an upside [04:22] isaacs: AAA_awright: yeah... maybe. i guess. but it's not "less confusing", that's for sure. [04:22] isaacs: or "more organized" [04:23] AAA_awright: Well yeah, it's just a side-effect [04:23] AAA_awright: er, direct effect [04:23] isaacs: if you really want a nested namespace in npm, you can have one. [04:23] isaacs: just put your name in front of your package name [04:23] creationix: it's too late now, but I think it would have been cool is npm forced every package to be namespaced to it's owner [04:23] AAA_awright: Use URIs [04:23] creationix: AAA_awright: like com.creationix.static.foo ? [04:24] muk_mb: is anyone successfully making use of formidable or connect-form? [04:24] AAA_awright: No, like real URIs as specified in the RFCs [04:24] AAA_awright: http://giithub.com/x/y [04:24] creationix: well, that's not the npm way [04:24] AAA_awright: bah, more ore less [04:24] creationix: though I believe nodules works that way [04:25] isaacs: AAA_awright: you can install urls if you want. [04:25] isaacs: AAA_awright: but i'm not gonna force everyone to do that. [04:25] creationix: isaacs: well replicating the database is way too much work for my use case. It would be easier to skip npm and rsync stuff around [04:25] isaacs: AAA_awright: that's how npm started out. npm install [04:25] isaacs: AAA_awright: it sucks horrendously. [04:25] AAA_awright: No, not a download path, a URI as an identifieer [04:25] isaacs: AAA_awright: right, same difference. [04:25] isaacs: AAA_awright: urls are intolerably inhumate. [04:25] isaacs: *inhumane [04:25] AAA_awright: No, because it could just as easily be an ISBN or something [04:25] isaacs: AAA_awright: yeah. isbn. wow. that's WAY better. [04:26] isaacs: you're TOTALLY selling this right now. [04:26] AAA_awright: It doesn't have to be network-accessable, though if the package information is located at the HTTP URL that's a plus [04:26] daniellopezific: AAA_awright, whatsup? [04:26] AAA_awright: isaacs: Have you used RDF much? [04:26] isaacs: registry + humane name = rurl [04:26] isaacs: *url [04:26] isaacs: AAA_awright: i've managed to dodge that cluster [04:26] AAA_awright: daniellopezific: I haven't publicized this at all but http://magnode.bzfx.net/ [04:27] daniellopezific: why not? [04:27] AAA_awright: daniellopezific: It's not in a usable state right now, unless you're the programmer of the thing :p [04:27] creationix: isaacs: I think I'll just make a creationix-middleware package and put whatever stuff I want in there [04:27] isaacs: there are 26 letters and 10 digits to choose from, as well as _, ., and -, and package names can be as long you want. there are enough unique names to last us well until the singularity. [04:27] isaacs: creationix: that's totally acceptable. [04:28] creationix: kinda like I did for connect, except this isn't meant to be supported [04:28] isaacs: creationix: you can always split stuff out of it later if you decide to "promote" it [04:28] daniellopezific: gotcha, i'll check it out thanks :D [04:28] creationix: exactely [04:28] creationix: isaacs: so it's ok to abuse the registry for non public stuff like that? [04:28] AAA_awright: The source is there somewhere, it's uh [04:28] AAA_awright: daniellopezific: http://git.bzfx.net/~aaa/metawiki.git/ [04:28] isaacs: creationix: as long as it's non-public in the sense of being non-supported, not actually "private" [04:29] AAA_awright: Hard to find, Documentation -> Call Tree -> source code is the only link to it right now [04:29] isaacs: creationix: i mean, it's exposed, obviously [04:29] creationix: right [04:29] creationix: I've found that having to support everything I write has really put a damper on my creativity [04:29] isaacs: creationix: in fact, you could even call it connect-whatever, and then do `npm deprecate connect-whatever "This is an unsupported package. Use at your own risk"` [04:29] creationix: but I like the tooling of install from everywhere that npm suplies [04:29] isaacs: creationix: yeah, it's snazzy [04:30] isaacs: we're starting to use it for our internal stuff at joyent. it's cool seeing what folks here are putting it to use to do [04:30] creationix: yinst reborn ;) [04:32] isaacs: jinst :) [04:32] jashkenas_: AAA_awright: since you seem to be one of the few, the proud, the brave -- how exactly have you been able to put RDF to good use? [04:33] creationix: jashkenas_: what did you guys end up using for documentcloud? [04:33] AAA_awright: jashkenas_: Lots of work... Right now I'm manually converting Object structures of triples into an SQL query [04:33] creationix: I remember planning some json based thing that looked pretty cool [04:33] jashkenas_: creationix: we've never done real RDF, although the canonical document representation *is* available in RDF, if you're feeling silly. [04:33] AAA_awright: jashkenas_: Not ideal, clearly, I have a library that can parse SPARQL now, I'm trying to write another library that can query a memory store with the parsed query [04:34] jashkenas_: why not just query the store directly instead of round-tripping through rdf? [04:34] AAA_awright: jashkenas_: What are you doing with RDF and Javascript? [04:34] AAA_awright: The idea is to make _all_ the data semantically meaningful [04:34] AAA_awright: Or at least, all the stored data [04:35] AAA_awright: Though with webr3's library we could work with RDF datatypes natively, so probably all the data, even variables, can be RDF to a degree which is awesome [04:35] themiddleman has joined the channel [04:36] jashkenas_: "semantically meaningful" as "tagged with an opaque meaningless URI" is the big w3c lie. [04:36] AAA_awright: That's the hard part, making relationships between the data [04:36] jashkenas_: And transforming a web of uri-tagged-uris into real knowledge or insight requires strong AI. [04:36] jashkenas_: So, good luck with that. [04:36] AAA_awright: I don't want to just go the route of Drupal etc who is only planning on exposing the RDF data without making any meaning of it [04:36] jashkenas_: Until that day comes, RDF is just a really awkward API/format, IMO. [04:36] jashkenas_: creationix: http://www.documentcloud.org/documents/24606-state-audit-of-meal-programs-in-californias-charter-schools.rdf [04:37] jashkenas_: nasty stuff. [04:37] creationix: yep, that's autogenerated rdf [04:39] isaacs: jashkenas++ [04:39] v8bot: isaacs has given a beer to jashkenas. jashkenas now has 2 beers. [04:39] AAA_awright: jashkenas_: The ultimate idea is to be able to query the data and mine it for useful stuff, maybe with a natural language frontend like Wolfram Alpha does [04:39] isaacs: ""semantically meaningful" as "tagged with an opaque meaningless URI" is the big w3c lie." [04:39] isaacs: yes [04:39] isaacs: +1 [04:39] isaacs: omg yes [04:39] isaacs: URIs are awesome if you're a web browser. [04:39] isaacs: otherwise, they're hideous [04:39] skm has joined the channel [04:40] AAA_awright: isaacs: Nay, otherwise data is contextual [04:40] isaacs: RDF is like going to a conference and writing your home address on your nametag instead of your name. [04:40] AAA_awright: That is a big hurdle though, making it simple to work with [04:41] isaacs: which totally makes sense, right? because there might be more than one "isaac" there. [04:41] AAA_awright: Complex vocabularies ugh [04:41] creationix: isaacs: can an npm module have several submodules but no index? [04:41] isaacs: creationix: yes [04:41] isaacs: creationix: just don't supply a "main" or index.js [04:41] creationix: ok [04:41] isaacs: AAA_awright: i'm not sure that I know the best solution to the problems RDF sets out to do, but I'm pretty sure that RDF isn't it. [04:42] isaacs: i've yet to see a real problem that is better solved with RDF than almost anything else. [04:42] AAA_awright: Linked data [04:42] jashkenas_: isaacs: I'll join you on that bet. I've never seen one either. [04:42] isaacs: AAA_awright: you mean the kind in an rdbms, or the kind in html? [04:42] jashkenas_: AAA_awright: linked data doesn't exist in the way semantic-web-ers want it to. It's merely a really clunky way of exposing an API for your data. [04:43] isaacs: AAA_awright: there's also the Riak link techniques [04:43] AAA_awright: A single, standard format for publishing data. Maybe you import it into a SQL database, but the fact that it's published as RDF is useful for making stuff universal [04:43] isaacs: AAA_awright: rdf != universal [04:43] isaacs: AAA_awright: rdf = "just another format" [04:43] isaacs: it's no more "universal" than any other format, really. you have to speak it. [04:43] isaacs: which is fine, and all. [04:44] isaacs: just, it's not like angle brackets and uris make it any more universal than json and a namespace. [04:44] AAA_awright: No other format has globally unique identifiers, though... I can't link to a specific line in some CSV spreadsheet, and define an operation to perform on it [04:44] creationix: ACTION should really put a streaming static file server on creationix.com [04:44] jashkenas_: which would be fine, except that it's been sold as a bill of goods. [04:44] isaacs: AAA_awright: http://registry.npmjs.org/npm/0.2.13-2 [04:44] isaacs: AAA_awright: that's a globally unique identifier ^ [04:44] isaacs: AAA_awright: if you say "npm@0.2.13-2", and you have a registry config, then npm can globally uniquely identify which package you mean [04:45] AAA_awright: It's atomic. How about this: Open world assumption [04:45] isaacs: and since it's json, you can parse the object and address specific fields [04:45] AAA_awright: A JSON file is closed, it's a linked list or whatever, it's complete. [04:45] isaacs: "open world assumption". what's that, exactly? [04:45] amerine has joined the channel [04:45] creationix: so I found out what happens if you let node buffer files in ram and then try to read a 200mb m4v from several sources at once [04:45] AAA_awright: Open world assumption means you can define more data somewhere else [04:45] isaacs: AAA_awright: that json file can be {"url":"somewhere else"} [04:46] isaacs: AAA_awright: in which case the registry returns a 301 to "somewhere else" [04:46] isaacs: i mean, none of the solutions that rdf provides are actually the hard problems to solve, or better solved by rdf than teh things that everyone already knows and uses. [04:47] isaacs: if anything, the overhead of yet another format and yet another protocol is a bit of a burden in most cases [04:47] isaacs: i guess the "protocol" isn't really an issue, since it's still jsut http [04:47] jashkenas_: isaacs: it's more than a burder -- it's a whole ideology you have to cope with. [04:47] jashkenas_: *burden. [04:47] markt has joined the channel [04:47] AAA_awright: Yeah, it's not dependent on a protocol, and it's only dependent on XML for datatypes (and just because it's a good fit) [04:48] jashkenas_: note that RDF is actually older than JSON proper. [04:48] isaacs: i'm not saying rdf doesn't have its strong points. i'm just saying that a lot of the alleged benefits are a bit overstated. [04:48] isaacs: jashkenas: yeah, i mean, that's why it's not completely insane. if i went round inventing rdf today, why, they'd put me away! [04:49] markt has joined the channel [04:49] isaacs: no data format is ever going to infuse a document with meaning. ever. [04:49] AAA_awright: RDF makes it massively easy to work off, publish against, 3rd party data. Beacuse of the open world assumption that it has, as opposed to the closed world assumption that other models carry. [04:49] vborja has joined the channel [04:49] creationix: isaacs: hmm, now that I think about it, I really don't really want to prefix my packages, but rather subpackage them under a single package [04:49] isaacs: the data format that can do that can also write you a sonnet and invent a flying car. [04:49] creationix: require('creationix/stack/foo') vs require('creationix-stack-foo') [04:49] isaacs: creationix: npm install creationix-playground? [04:49] yozlet has joined the channel [04:49] isaacs: heh [04:50] isaacs: yeah, just npm install creationix. i dig it [04:50] creationix: so tell me more about this redirect [04:50] isaacs: creationix: maybe it could also depend on connect and anything else that you like ;) [04:50] creationix: can I store submodules in a different place [04:50] creationix: submodules in the npm sense [04:50] creationix: not git [04:50] isaacs: creationix: no. you can host your own registry, and then PUT your redirector thingie into my registry. [04:51] andrewfff has joined the channel [04:51] isaacs: HTTP/1.1 PUT /creationix {"url":"http://my-registry/creationix"} [04:51] isaacs: and then that URL has to be the npm registry doc [04:51] isaacs: with a dist.tarball, a version, etc. just like what you see on http://registry.npmjs.org/connect [04:51] creationix: hmm, I just don't want to have to update the version number on the creationix package [04:51] AAA_awright: jashkenas_: It's just so much easier for people to read JSON if you know the data is closed world, very well defined, and such. With RDF you have to come up with a vocabulary and such and it's a mess [04:51] CIA-121: node: 03Jorge Chamorro Bieling 07v0.2 * rae91603 10/ deps/libeio/eio.c : [04:51] CIA-121: node: Apple's threaded write()s bug [04:51] CIA-121: node: fixes test/simple/test-fs-sir-writes-alot.js on mac - http://bit.ly/ihUduc [04:51] creationix: for every little change [04:51] isaacs: creationix: so don't publish little changes ;) [04:51] arrty has joined the channel [04:52] isaacs: creationix: or bundle-install it from the git repo [04:52] creationix: isaacs: ahh, but that's my use case [04:52] jashkenas_: JSON keys === RDF Vocab, in practice. [04:52] creationix: I'm writing little changes, and then going to my several servers and deploying [04:52] jashkenas_: In theory, they're different -- but that theory requires strong AI to work. [04:52] AAA_awright: jashkenas_: https://github.com/webr3/js3 is a step in that direction [04:53] isaacs: creationix: well, i mean, if you dont' care about others depending on it, you can unpublish and publish the same version again [04:53] creationix: isaacs: true, but that seems clunky [04:53] AAA_awright: You just need to define the vocabs you are using and then you get all the benefit of the computer knowing how to handle it if it recognises it, without any other context [04:54] isaacs: creationix: echo -e "deploy:\n\tnpm unpublish\n\tnpm publish" >> Makefile [04:54] jashkenas_: How does the computer know how to recognize it, unless you tell it what to look for? [04:54] creationix: right, automate the clunky and wrap in in sound proofing and it's not clunky [04:54] isaacs: yep :) [04:54] jashkenas_: If you tell it what to look for, then you might as well tell it what to look for programming against a saner API. [04:54] isaacs: creationix: you just summed up software. [04:55] creationix: lol [04:55] isaacs: creationix: all software. [04:55] jashkenas_: isaacs++ [04:55] v8bot: jashkenas_ has given a beer to isaacs. isaacs now has 6 beers. [04:55] creationix: still, I think I like the creationix package idea [04:55] isaacs: creationix: yeah, it's neat [04:55] creationix: going got that + automation I think [04:56] AAA_awright: isaacs: For instance, I could ship with a few different templates that handle currencies, time series data, etc, and just by using the correct URIs in the schema, the CMS picks up on that and formats graphs correctly, and plots the data correctly. That's the upside, that's the semantically aware part I'm working on. [04:56] isaacs: creationix: i'd create an isaacs package, but whenever i decide to write a node program, i usually just try to rationalize doing it as an npm command... [04:56] isaacs: AAA_awright: and why could you not do that with json [04:56] isaacs: AAA_awright: ? [04:56] creationix: isaacs: that works too [04:56] AAA_awright: And would know about inconstistencies in the data [04:57] tapwater has joined the channel [04:57] AAA_awright: isaacs: Well you still need something globally unique, if not URIs then what? [04:57] isaacs: AAA_awright: the problem with rdf is that, whenever i'm talking to someone who likes it (including this conversation) i start running into these theory-of-mind problems. [04:57] creationix: AAA_awright: so basically you're saying that a single format that everyone agrees on and uses will make all data linkable [04:57] AAA_awright: I've been watching Drupal *I think* fall off a cliff wondering how they are going to go distributed with Git, but still have centralized naming of modules [04:57] sveimac has joined the channel [04:57] AAA_awright: You can't have centrally named things, you need URIs or *something* that's globally unique [04:58] creationix: IPv6 [04:58] creationix: ;) [04:58] isaacs: AAA_awright: like, "And would know about inconsistencies in the data" [04:58] halfhalo: ACTION votes cookies [04:58] isaacs: AAA_awright: i start to wonder what you mean by words like "know" [04:58] isaacs: AAA_awright: "named XYZ in this registry" is semantically equivalent to a URI. [04:58] AAA_awright: isaacs: If there's a RDFS description of the vocabulary, for instance [04:59] AAA_awright: isaacs: But you have to get into the registry first, that's a massive problem [04:59] jashkenas_: no one is arguing against URLs here -- they're totally useful and great. But pretending like tagging something with a URL makes it magically "semantic", isn't the case. [04:59] isaacs: AAA_awright: is it? [04:59] isaacs: AAA_awright: if you don't like it, you can create your own registry [05:00] isaacs: AAA_awright: i'm not saying you don't have a home address. i'm just saying you dont' write it on your nametag and expect people to use it when they talk to you. [05:00] AAA_awright: isaacs: But npm for instance, only has one namespace [05:00] AAA_awright: You can't go somewhere else [05:00] isaacs: AAA_awright: what do you mean? [05:00] isaacs: AAA_awright: you mean you can't create a registry? because you can. or that you can't install something that isn't published? because you can do that, too. [05:01] ossareh has joined the channel [05:01] isaacs: AAA_awright: it only has one namespace on the local machine, but even then, you can just install different things in a different folder. [05:01] AAA_awright: Trying to identify the resource in question [05:01] isaacs: AAA_awright: what is "resource in question"? [05:01] jashkenas_: The promise of RDF is that using URLs to describe Subject-Predicate-Object will enable computer agents to reason logically about the encoded data. That's never happened. Every instance of RDF-in-action has been a programmer hard-coding logic against the URLs as identifiers. At that point, it's just an awkward API. [05:01] AAA_awright: With RDF you're looking at billions of points of data [05:01] sveimac has joined the channel [05:01] AAA_awright: Right [05:02] jashkenas_: TimBL on the original idea: http://www.w3.org/DesignIssues/Semantic.html [05:02] isaacs: AAA_awright: ok, so, basically, assuming that we got over my pathological allergy to xml, and we had a good parser that could work and fetch things automatically, and such... [05:02] AAA_awright: jashkenas_: That's still a bit far out... I think people like Google are parsing RDFa for product information, to get prices, but still, for day to day clients [05:02] isaacs: AAA_awright: why would rdf work well for npm [05:03] AAA_awright: RDF doesn't have anything to do with XML [05:03] isaacs: AAA_awright: what could i do with rdf that i can't already do today, and which is valuable to do? [05:03] AAA_awright: Except it uses RDF datatypes, but even then you could define your own datatypes since those are also URIs [05:03] isaacs: AAA_awright: i've heard that. and yet, every rdf implementation i've seen has been xml.. [05:03] AAA_awright: er, XML datatypes [05:03] AAA_awright: because webpages use XML [05:03] isaacs: AAA_awright: but let's skip past that objection. [05:03] jashkenas_: isaacs: it's not really XML -- see N3. [05:03] isaacs: AAA_awright: ok. it's json. whatever. [05:03] AAA_awright: And it's convienent to emded RDF in XML for that reason [05:04] isaacs: what can i do with rdf that i can't do with just a couchdb full of data, and a client that can talk to whichever couchdb instance you like? [05:04] AAA_awright: Personally I use {"subject": {"predicate": ["object"]}} for a flat list of triples [05:04] isaacs: it's not like the programs are going to write themselves. rdf seems like a lot of useless copying and an unnecessarily klunky api [05:04] AAA_awright: or n3 [05:05] AAA_awright: The API is a problem, it's harder to work with than native datatypes, yes [05:05] isaacs: at some point, someone has to hard code logic about the business rules around the vocab. [05:05] AAA_awright: That's the sort of stuff I'm working on, for Javascript [05:06] isaacs: whether that's just some "dumb" non-world-saving non-singularity-inducing json document store thing, or rdf, hardly matters. [05:06] isaacs: the smarts still come from a human either way [05:06] AAA_awright: And webr3 it looks like, with that amazing lib https://github.com/webr3/js3 [05:06] isaacs: AAA_awright: so what does rdf actually give you? what problems can you solve with it more easily than without? [05:07] AAA_awright: To the native program, it might not matter. For interfacing with 3rd party data, it makes things a lot simpler, since there's a standard data model, and globally unique identifiers for all the data points [05:07] jashkenas_: In TimBL's original drawing: http://www.w3.org/DesignIssues/diagrams/loop.gif it's the center gap that has never been bridged. [05:07] isaacs: i mean, riak's ability to hold keys is limited only by the number of servers you add to your chain, and it's got map-reduce [05:07] AAA_awright: And vocabularies like RDFS and OWL that you can use to infer additional data, like "All Fords are also cars" [05:07] jashkenas_: There is no useful mapping from RDF statements into logical statements. [05:08] isaacs: AAA_awright: but, like, here's the thing: it's cool and all. but it's very much "computer scientists who smoked a bunch of pot one sunday", and not so much "hackers gettin stuff done" [05:08] AAA_awright: The thing that uses the actual RDFS data has to be hard coded of course, as is everything else. If you're looking for addresses in webpages, you hard code that much [05:08] isaacs: and tha't fine. [05:09] isaacs: i think that's kind of my aversion to it. i'm worried that i'll waste my whole sunday and have nothing to show for it but a full ashtray. [05:09] isaacs: (has happened before) [05:09] creationix: isaacs: https://github.com/creationix/creationix :) [05:09] AAA_awright: isaacs: I'd wait for a while more then, everything that's useful is still written in Java [05:09] creationix: npm install creationix [05:09] AAA_awright: >:( [05:09] isaacs: AAA_awright: ha [05:10] isaacs: AAA_awright: that's a shame. [05:10] isaacs: AAA_awright: though, i can't say i'm surprised. java community has a real problem with its mental masturbation addiction. [05:10] isaacs: (sorry, that was a low blow) [05:10] Aria has joined the channel [05:10] isaacs: but like, what kinds of problems does it *set out* to solve? [05:10] AAA_awright: I don't work with Java, I stay far away from it, so I couldn't say [05:10] isaacs: (good movie) [05:10] isaacs: *move [05:11] AAA_awright: Publishing RDF data can still be useful, though, for people who want to manipulate it [05:11] Aria: Aw, man. Disconnected in the middle of good conversation here. [05:11] Aria: I happen to think RDF is mostly really neat. Shame the RDF/XML syntax got conflated with it. [05:11] isaacs: Aria: i totally agree on the "really neat" thing. [05:11] AAA_awright: The real reason I want it is for data manipulation... the ability to infer stuff from multiple, independently published sets of data [05:11] isaacs: i'm not so convinced on the "useful for anything" tip. [05:12] isaacs: AAA_awright: but you can already manipulate and infer from all kinds of other data. [05:12] Aria: Hehe. I wish they'd added something more useful for negative assertions than reification. [05:12] AAA_awright: You have to script it all [05:12] AAA_awright: Actually, my goal is this: To take a time series of the oil price, a time series of the gold price, and divide the two to find the time series of the price of oil in mass of gold. [05:12] isaacs: AAA_awright: html links, package dependencies, etc. [05:12] isaacs: AAA_awright: awesome! ok, a real problem. [05:12] AAA_awright: Sure I could do that with a script, but that still has to be scripted [05:13] AAA_awright: er yeah, you have to parse it all out [05:13] isaacs: AAA_awright: so, do you already have the data for this in rdf? [05:13] Aria: Hehe. Package dependencies and html links are already RDF data. [05:13] creationix: jashkenas_: wow, underscore is the second most depended on project in npm [05:13] creationix: jashkenas_ does it add much beyond the ES5 stuff already in node? [05:13] isaacs: Aria: is this the part where you say that any linked data is *really* rdf anyway? [05:13] jashkenas_: creationix: yep. [05:13] AAA_awright: isaacs: I've converted long tables of CSV data, yeah [05:13] jashkenas_: The overlapping bits are just five or six functions, out of fifty-ish. [05:13] isaacs: AAA_awright: ok, so you converted your csv into rdf. [05:14] creationix: that's good [05:14] AAA_awright: With non-overlapping timestamps too [05:14] isaacs: AAA_awright: and then does rdf have some way to automatically perform that calculation for you? [05:14] isaacs: AAA_awright: or do you have to script that, as well? [05:14] AAA_awright: It's just the data model, no [05:14] Aria: Yeah, mostly. [05:14] isaacs: AAA_awright: because you could also import the csv into couchdb, and then write a view that would show you exactly that. [05:14] AAA_awright: But both are labeled as time series, both are marked in dollars per (good) [05:14] Aria: Anything that's a graph of subject-predicate-object is pretty much RDF. Sometimes kinda specific domain RDF, but still the sameish data model. [05:15] AAA_awright: Both use the same date format as specified by XML datatypes [05:15] jashkenas_: if you have to script it, then RDF has failed -- the whole point is being able to infer relationships from the intertangling of URLs. If that hasn't happened, you might have well given things a more readable name. [05:15] CIA-121: node: 03Ryan Dahl 07master * r5b81897 10/ doc/index.html : Update links for v0.2.6 on website - http://bit.ly/gyGftL [05:15] AAA_awright: jashkenas_: All that's left is say divide time series X by Y [05:15] Aria: URLs in RDF are about disambiguating, not readability. [05:16] isaacs: ok, i gotta run. keep this going. this is good [05:16] AAA_awright: And it should figure out interpolation, units (ozAu/barrel) [05:16] creationix: ACTION is now going to give up trying to derail the RDF thread and go back to hacking code :P [05:16] jakehow has joined the channel [05:16] jashkenas_: creationix: it was a noble effort. [05:16] creationix: I really did have questions for Isaac initially [05:16] Aria: Not "dependsOn", but "http://npmjs.org/terms/dependsOn". Not "version" but "http://semver.org/version" [05:17] CIA-121: node: 03Ryan Dahl 07v0.2 * r6f8d78d 10/ (5 files in 3 dirs): Bump version to v0.2.6 - http://bit.ly/egiE3Z [05:17] isaacs: Aria: actually, in that case, you *really* want https://github.com/isaacs/npm/raw/master/lib/utils/semver.js [05:18] isaacs: not semver.org/version [05:18] AAA_awright: jashkenas_: That is my goal, say with two independent data sets that know nothing about each other when they were published, and do simple operations without scripting anything. / and it returns another URI that is the result set. [05:19] AAA_awright: For starters. Then addition, other operations on time series, then tables of data... you do have to program libraries that will parse the data of course, but the point is the data is in a standard format that is globally addressable [05:19] Aria: Nah, the implementation and the identification of the thing are different ;-) [05:19] isaacs: Aria: i guess so [05:20] isaacs: since the URIs ar ejust hard-to-type names [05:20] isaacs: that no sane person would pick, so they're unique. [05:20] isaacs: ;P [05:20] Aria: Yeah. Also delegated authority. [05:20] Aria: Doh. [05:22] AAA_awright: isaacs: Also, CURIEs. npm:(package) would be the same thing [05:22] AAA_awright: They don't have to be hard-to-type [05:22] AAA_awright: (yes I know isaacs's gone >:( ) [05:23] creationix: AAA_awright: it is a noble effort you're working on, isaacs just like to have lively debates [05:23] AAA_awright: daniellopezific: Lemme know if you want to discuss requirements for a Node.js CMS or something [05:23] AAA_awright: creationix: Oh I like that, not a problem [05:23] AAA_awright: Thanks [05:24] hornairs has joined the channel [05:24] creationix: though I personally don't promote xml, whatever gets the most traction will end up being the best format [05:24] AAA_awright: creationix: Do you think it could be useful at all? I'm not convinced it can be pulled off yet, though it would be epic if it did [05:24] creationix: and I think rdf is most popular with semantic web people [05:24] AAA_awright: I don't use any XML at all, not yet [05:24] ryah: ACTION wonders if tj ever did work on that streaming json parser.. [05:24] creationix: AAA_awright: or, your javascript project [05:25] creationix: yeah, not sure [05:25] AAA_awright: I don't think there's even any tags in the source code at all, I use Jade, etc [05:25] creationix: would be cool if it worked though [05:25] AAA_awright: How is JSON parsed right now? [05:25] creationix: ryah: shouldn't be hard to write one [05:25] creationix: ryah: what kind of streaming? [05:25] AAA_awright: I thought the only way you could parse it is streaming [05:25] creationix: sax style? [05:25] ryah: creationix: yeah [05:25] AAA_awright: Oh, a stream API like SAX [05:26] AAA_awright: Evented API rather? [05:26] daniellopezific: AAA_awright, will do busy working on something else at the moment though [05:26] AAA_awright: daniellopezific: kk [05:26] creationix: ryah: if you convinced me it was for a good cause, I could write one [05:26] creationix: I don't see where a sax style parser would help though [05:26] ryah: creationix: sometimes web apis return really large json responses [05:26] ryah: liek 50kb long [05:26] creationix: agreed [05:27] creationix: like 5 google contacts in the gdata protocol [05:27] ryah: sucks to sit there inside JSON.parse the whole time [05:27] ryah: although i agree, it's marginal benifit [05:27] creationix: so you're trying to break up the cpu blocking time and limit the memory overhead? [05:27] ryah: benefit -_- [05:28] ryah: yeah - would be a fun little project [05:28] creationix: I doubt I could write one that performed anywhere near the speed of the built-in json.parse overall [05:28] creationix: now something I would find useful is a streaming parser in the sense that it used json structure as message framing [05:29] Aria: Ditto. [05:29] creationix: so the stream [1,2,3]{"name":"bob"}{} [05:29] creationix: would have three events [05:29] creationix: though you couldn't have non-objects as top-level items [05:29] ryah: i have something like that [05:29] Aria: A combined parse and extract. [05:29] creationix: "truetruefalse03null" [05:30] creationix: I guess the sax style parser would be useful if you were only interested in part of the data [05:30] Aria: Yeah. [05:30] creationix: but then it would be better to change the data that's getting sent to you if possible [05:30] Aria: I want, often, something nested deep. [05:30] AAA_awright_ has joined the channel [05:31] Aria: "give me the amounts for each foo key in the object for each bar key" [05:31] creationix: I still think a high-quality encoder/parser with something like msgpack would be great for node [05:31] Aria: {bar: {foo: {amount: 1}}} would emit "1" [05:33] creationix: msgpack would need to be modified to tell the difference between strings and buffers (and probably ascii strings and 16bit strings) [05:33] ryah: creationix, Aria: https://gist.github.com/760755 [05:34] Aria: Nice. [05:34] creationix: ryah: yeah, json + newlines works well, that was the original data format for nstore [05:34] creationix: or netstring + json [05:34] creationix: for faster parsing [05:34] mikeal has joined the channel [05:34] AAA_awright: Last I saw was I doubt I could write one that performed anywhere near the speed of the built-in json.parse overall [05:34] AAA_awright: creationix: Might there be a speed boost if JSON.parse isn't allocating any objects? Though I can't imagine that is that slow... [05:35] AAA_awright: Allocating memory or something, yeah that's fast isn't it [05:35] jacobrelkin has joined the channel [05:35] ryah: i think you can beat JSON.parse in a concurrency test [05:35] creationix: AAA_awright: even if I wasn't allocating objects, I would at least need to make function calls for each event and send it the object data as arguments [05:36] ryah: with large objects [05:36] ryah: and i think it would only be slightly slower in the small object case [05:36] creationix: ryah: so what API do you want? [05:36] creationix: onObjectStart, onArrayStart, onNumber, etc... [05:37] ryah: creationix: i think just emit the object once it's built [05:37] AAA_awright: And isn't there an overhead for calling functions from a compiled library? [05:37] creationix: JSON.parse may be a special case since it's built-in, not sure [05:37] eboyjr: >> for(;;); [05:38] creationix: ryah, ok, so you feed it data chunks in one end and it spits out objects on the other end [05:38] ryah: creationix: yeah [05:38] creationix: but internally it build the object as it gets data, not just buffer till it reaches the end of an object and call JSON.parse on the whole thing? [05:39] ryah: creationix: you'll get a win for operating on buffers [05:39] creationix: hmm, sounds like fun [05:39] ryah: that's probably the bottleneck for these people with large json objects [05:39] creationix: I'll take a hack at it [05:40] ryah: that = converting to string for JSON.parse [05:40] creationix: though someone should review my code when I'm done. My msgpack implementation was much slower than pgreiss's one [05:40] ryah: creationix: for (var i = 0; i < buffer.length; i++) { switch (this.state) { /* ... /* } } [05:40] creationix: ryah: right, I'll try the first style where it builds the object incrementially [05:40] creationix: yep [05:41] ryah: creationix: have you tried my debugger yet? [05:41] creationix: this page is awesome btw http://json.org/ [05:41] mikeal has joined the channel [05:41] creationix: ryah: no, what's that? [05:41] ryah: creationix: https://github.com/ry/node/tree/debugger [05:42] ryah: creationix: docs https://github.com/ry/node/blob/916f567d23c9e665f71c63df05734823b085fff4/doc/api/debugger.markdown [05:42] ryah: going to merge it into v0.3 soon. would like feedback [05:42] AAA_awright has joined the channel [05:42] c4milo2 has joined the channel [05:42] creationix: ryah: that looks neat [05:43] creationix: I never used command-line debuggers, so I'm not sure how much feedback I could give [05:43] creationix: ohh, so now SIGUSR1 can toggle debug mode? [05:43] creationix: now that is cool [05:44] ryah: not toggle, but turn it on [05:44] ryah: there's actually no way to turn off debug mode [05:44] ryah: need to fix that [05:44] creationix: yeah, most hard problems only happen in production [05:44] richcollins has joined the channel [05:44] creationix: it would be great to flip a switch and debug a live server [05:45] creationix: /server/mobile app/ [05:45] AAA_awright has joined the channel [05:45] ryah: nod [05:45] creationix: actually I think we already do it for the webkit on the phone, but not for node services [05:46] AAA_awright has joined the channel [05:47] creationix: ACTION goes to write a streaming json parser... [05:48] AAA_awright has joined the channel [05:48] creationix: so question, are non-objects valid json on their own? [05:48] creationix: is "true" a json value [05:48] Jeffrey_ has joined the channel [05:51] Aria: I don't believe so. [05:51] AAA_awright has joined the channel [05:51] langworthy has joined the channel [05:53] robotarmy has joined the channel [05:54] creationix: Aria: it's a "value" on json.org [05:54] Aria: Hm. [05:54] creationix: and JSON.parse accepts it I think [05:54] creationix: I'll just do the same thing JSON.parse accepts [05:55] creationix: that's probably easiest for everyone [05:55] Aria: Mmm, good call. [05:55] aristidesfl has joined the channel [05:55] creationix: though you'll get parse errors if several are in a stream [05:55] creationix: "22" could either be 22 or 2,2 [05:55] creationix: truefalse is true,false [05:56] creationix: I guess only numbers on top are dangerous [05:56] Aria: Yeah. Any reason not to require unambiguous delimiters? [05:56] Aria: 22{"foo":"bar"} would parse. but truefalse wouldn't? [05:56] creationix: JSON.parse won't take either [05:57] creationix: I'm saying my streaming parser wouldn't know if "22" was meant to be 2,2 or 22 [05:57] creationix: but truefalse has to be true,false [05:57] creationix: I think I'll just assume the longest possible match [05:57] creationix: and warn people to not send a stream of numbers in a row [05:58] creationix: they will likely get concated [05:58] creationix: and things like "0.23.4: would break it [05:58] creationix: it would emit 0.23 and then ERROR [05:58] muk_mb: why not use yajl? [05:58] Aria: You're intending to accept a stream of json objects? [05:58] Aria: Or just a partial parser for a single json "document"? [05:59] creationix: overall, I want a stream of data to go in and a series of value events to go out [05:59] indexzero has joined the channel [05:59] indexzero: isaacs: you around? [05:59] creationix: not sure if I want to write a sax style parser to power it or just include it all in a single state machine [05:59] creationix: json is so simple [06:00] creationix: but yes, a stream of json data goes in [06:00] creationix: and there are no partial document events [06:00] creationix: only complete document events [06:00] creationix: Aria: a partial document parser would be great for the use case we were talking about earlier [06:01] Aria: ACTION nods. [06:01] Aria: JSON.parse won't accept those because it onky handles one document [06:01] creationix: If the state machine gets too large, I may just go for both [06:01] creationix: and expose both APIs [06:02] sveimac has joined the channel [06:02] creationix: it would be awesome to to xpath like queries against a json stream [06:05] Aria: Yes indeed. [06:05] Aria: It'd be simple, too. [06:06] Aria: key/key/key, key[index], "key with weird/ characters", and perhaps "." or "value()" for a given node. [06:06] Aria: And then wildcards of various sorts. [06:07] creationix: I think writing a JSON parser would be an ideal exercise for someone in a compiler course [06:07] mikeal has joined the channel [06:07] Aria: Heck yes. [06:07] creationix: it's simple, but has a good mix of complexities [06:07] Aria: Yeah. [06:07] creationix: debating on which style to use [06:08] creationix: I want this thing as fast as possible [06:08] creationix: all tokens are single characters, except for the three keywords "true", "false", and "null" [06:08] creationix: I could do a state for every character and keep it a single-level pure state machine [06:08] creationix: or two-step tokenizer + parser [06:09] creationix: I think I'll just lookahead for the keywords and treat them as single characters [06:09] creationix: hmm, that won't work, I may not have the data yet [06:09] creationix: nevermind me, back to coding... [06:09] Aria: Hehe. Fun! [06:13] Jeffrey_: Anyone have a simple way to read a file line by line? [06:14] Aria: I wrote a linebuffer module you can pump to to do that. [06:15] AAA_awright: That sounds better than me: var lines = require('fs').readFileSync(config.htdigest, "UTF-8").split("\n"); for(i=0;i.> [07:41] Aria: Hehe. Yep. There's __dirname for that. [07:41] Aria: I prefer Node's behavior ;-) [07:41] rchavik has joined the channel [07:45] gkatsev: see, I was right. :D [07:45] andrewfff has joined the channel [07:46] eboyjr: lol you're always right, gkatsev [07:53] creationix: ryah: still there? [07:53] creationix: Aria: pin [07:53] creationix: *ping [07:53] Aria: Pong! [07:53] creationix: https://github.com/creationix/jsonparse [07:54] creationix: Aria: it's a sax style tokenizer [07:54] Aria: Sweet. [07:54] creationix: the next step is to implement the parser [07:54] creationix: I rolled string and numbers in to the parser and emitted them as single tokens [07:54] creationix: that should simplify parsing [07:54] Aria: Excellent. [07:54] creationix: *into the tokenizer [07:55] Aria: Nicely done, for not offloading to regexps! [07:55] creationix: well, those don't work on buffers anyway [07:55] creationix: and I need it 100% interruptable [07:56] creationix: so only character at a time allowed [07:56] Aria: Ah, yeah. [07:56] sveimac has joined the channel [07:56] Aria: Or you have to store a sync point and restart when you get more data. [07:56] Aria: (which is what I do parsing HTML) [07:56] creationix: It was somewhat tedious to create seperate states for each character of true, false, null, and the 4 hex codes in a unicode escape [07:56] creationix: but not too terrible [07:56] Aria: Basically flush the buffer when you transition states. [07:57] Aria: Yeah. [07:57] creationix: exactely [07:57] creationix: I'm not sure I have the mental power left to attempt the parser [07:57] creationix: but this should be a good start [07:57] creationix: (not tonight at least) [07:58] beta_ has joined the channel [07:58] Aria: Sweet! [07:58] eboyjr: Are objects still passed as reference across files? :S [07:58] Aria: (Yeah) [07:58] Aria: eboyjr: Once you've loaded the code, there are no files anymore. So yes. [07:58] eboyjr: Wow I must be going crazy then [07:58] eboyjr: Aria: Except for the __dirname thing :P [07:58] gkatsev: you are crazy but that's beside the point. [07:59] Aria: Oh, that's just context for the code. [07:59] Aria: Not across processes, but across files, yes. [07:59] eboyjr: Omg gkatsev shuddup! lol [07:59] eboyjr: omgwft [07:59] gkatsev: sorry, I'm not being helpful at all. [07:59] eboyjr: nope [07:59] gkatsev: lol [08:03] dguttman has joined the channel [08:04] pyrotechnick: are there any node clients that can emit xml chunks from a stream? [08:04] pyrotechnick: i mean modules [08:04] pyrotechnick: like if i stream xml through a socket to node [08:04] pyrotechnick: i.e. jabber/xmpp [08:04] pyrotechnick: is there a module that can give me hooks [08:04] pyrotechnick: that fire when new elements are parsed? [08:05] pyrotechnick: i imagine node uses one itself right? for http_parser? [08:05] Aria: HTTP doesn't involve XML [08:05] Aria: So no ;-) [08:05] pyrotechnick: right im thinking of html lol [08:05] pyrotechnick: my bad [08:05] Aria: But there's a sax parser available, node-expat [08:05] pyrotechnick: it works with buffers? [08:05] muk_mb: man, I can't figure this out. I just want to upload a file. [08:05] eboyjr: Ugh node.js sucks! error thrown in http.js :S [08:06] Aria: Yeah, I think it works with buffers. I've not looked under the hood enough [08:06] pyrotechnick: ok [08:07] pyrotechnick: yeah it does [08:07] pyrotechnick: sick [08:07] pyrotechnick: okay starting jabber server now [08:07] Aria: Woot! [08:07] pyrotechnick: whats your preference in terms of generating stanzas [08:07] pyrotechnick: theres a few on this modules page [08:07] pyrotechnick: i dont like the one xmppjs uses [08:08] Aria: I just used what xmppjs used. [08:08] pyrotechnick: yeah [08:08] pyrotechnick: aight [08:08] pyrotechnick: ill try a couple see how i like em [08:08] pkrumins has joined the channel [08:08] Aria: I've never been one to fight what others are doing. I think of 'not invented here' as the devil. [08:08] pkrumins: greetings [08:09] pyrotechnick: Aria: testify! [08:09] pyrotechnick: on the same token i like trying them all [08:09] Aria: Indeed. [08:10] pyrotechnick: if there's not too many i usually try the most popular / good looking ones [08:11] eboyjr: What are you guys' node versions? Mine is v0.3.0-pre [08:13] mikeal has joined the channel [08:14] Aria: 0.3.2 or 0.2.6 [08:14] eboyjr: Ah I should upgrade [08:14] Iszak: Ya. [08:14] Aria: Why yes, yes you should. [08:15] Aria: "node.js sucks", hah. You could try something that's not covered in blood ;-) [08:15] eboyjr: Can't remember how I installed it in the first place.. I think I compiled it from scratch for some reason [08:15] Aria: That's a normal way. [08:15] Aria: Since it's developing fast. [08:15] Iszak: and repo's lag. [08:15] eboyjr: Okay cool [08:15] Aria: Indeed. [08:16] Aria: if you git pull, make clean. [08:16] Aria: The build system sometimes glitches on the version transitions [08:16] Iszak: why does lord of the rings have to be ~70 GB :l [08:16] eboyjr: I get the tarball.. I guess I have to use the unstable version since I use require('utils').puts() instead of require('sys') [08:16] gkatsev: yeah, ubuntu's repo is still 0.2.0 [08:17] muk_mb: bah, I've tried 3 different versions of node and a few different modules. Still can't get file uploading to work. [08:17] Iszak: gkatsev, is that 10.10 or 10.04? [08:17] gkatsev: 10.10, unless it was changed in the last couple of weeks [08:17] Iszak: pyrotechnick, wake up [08:17] Iszak: gkatsev, doubt it [08:17] Iszak: I wonder what node.js 4.0 will bring. [08:18] gkatsev: unicorns [08:18] Aria: muk_mb: Have you poked the code that's doing it? Debugger or some log statements, mon! [08:18] Iszak: :D [08:18] Iszak: do they poop rainbows? [08:18] Aria: Iszak: 0.3.x will become 0.4. soon. [08:18] gkatsev: `^nn' [08:18] muk_mb: Aria: I logged all over the place, subscribed to each 'field' and 'file' and 'error' event that comes out, still nothing [08:18] Iszak: see, i never understood why people were like blah blah blah shouldn't use 0.3.x it's development branch, and why not? when it'll become 0.4 [08:18] gkatsev: looks like fedora doesn't have node in their repos [08:19] eboyjr: because its not 0.4 yet [08:19] Aria: muk_mb: logged in your code or the libraries? [08:19] Iszak: eboyjr, pre-emptive. [08:19] Iszak: gkatsev, that's surprising. [08:19] muk_mb: my code, I'm afraid to do too much to the modules [08:19] Aria: Iszak: Some people can't debug their way out of a wet paper bag. Nor handle change that comes often. [08:19] gkatsev: at least I'm not finding it [08:19] eboyjr: If it was good enough to be 0.4, it would be 0.4 [08:19] Aria: Well, then, muk_mb, you're not gonna find the problem ;-) [08:19] AAA_awright_ has joined the channel [08:20] Iszak: Aria, well if they want to be stuck in node.js 0.2.x for the rest of eternity then that's their choice. [08:20] gkatsev: Iszak: the 'node' package in yum is definitely not node.js [08:20] Aria: It's not that big a transition. [08:20] Aria: (Yeah, node in fedora is the ax.25 thing) [08:21] pkrumins: changelog for 0.2.6 is missing [08:22] pkrumins: or everything in 0.3.x gets backported to 0.2.x? [08:22] Aria: No, no backports. [08:22] Aria: 0.3.x becomes 0.4, not 0.2 ;-) [08:22] pkrumins: wondering why no change log of anything in 0.2.x [08:22] gkatsev: anyway, as it is almost 3:30am for me, I go to sleep [08:22] gkatsev: night [08:22] Aria: pkrumins: Ryah JUST released 0.2.6 -- could just not be updated yet. [08:23] gkatsev: the mailinst list has a small changelog [08:23] pkrumins: well there is no change log for 0.2.5 or 0.2.4 [08:23] faust45 has joined the channel [08:23] pkrumins: http://nodejs.org/changelog.html [08:23] Aria: Event handlers add a 'once' method, require lets you poke the internals of the cache, ssl has been rewritten -- that's the bulk of the change in 0.3 now. [08:23] pkrumins: Aria: I added 'once' ;) [08:23] Aria: Sweet! [08:23] pkrumins: but that was months ago! [08:23] pkrumins: like 2 months ago. [08:23] Aria: http://nodejs.org/docs/v0.2.6/changelog.html [08:23] gkatsev: here is your changelog: https://groups.google.com/d/topic/nodejs/secZbrbkqZA/discussion [08:24] pkrumins: Aria: thanks! [08:24] pkrumins: :) [08:24] gkatsev: I guess Aria linked the full one [08:24] pkrumins: gkatsev: thanks to you too :) [08:24] Aria: And so you see the evidence that 0.3.x branched from where 0.2.x split off. [08:24] Iszak: Aria, <3 those changes [08:24] Iszak: i would like to think 0.3.x is FASTER too, that's all I care about. [08:24] gkatsev: oh, I see. that has 0.2.5 and earlier changelogs as well [08:24] eboyjr: v8 takes so long to compile... why can't it compile itself with jit when you run it -.- [08:25] Aria: Because you'd have to compile the jit. [08:25] gkatsev: lol, have it compile itself? [08:25] Iszak: eboyjr, what are you running? an intel atom, compiled fast for me. [08:25] adambeynon has joined the channel [08:25] eboyjr: oh haha [08:25] Aria: And I dunno if youve ever compiled llvm, it's a real slow one too ;-) [08:25] eboyjr: It's some pentium 4 1.4 Ghz, Iszak [08:25] Iszak: ah, that explains it. [08:25] Aria: Arighty. Night, all. [08:25] pkrumins: Aria: actually SubStack was first to invent once in our project, and i just turned it into a patch for nodejs as it was needed frequently. [08:25] Iszak: Aria, Night. [08:25] Aria: Win, pkrumins! [08:25] Aria: I'll use it in the html5 lib too soon [08:26] gkatsev: night [08:26] Iszak: eboyjr, were you serious? [08:26] chapel: pkrumins: what would you use once for? [08:26] eboyjr: Iszak: About what? [08:26] Iszak: the gigahertz [08:26] rchavik has joined the channel [08:26] eboyjr: Yeah it's some old desktop that I am using as a server [08:27] Iszak: oh right, you should invest in an intel atom based server, i know i want to. [08:27] pkrumins: chapel: for an event that i need to catch just once [08:27] Iszak: low power usage is my main priority. [08:27] eboyjr: My netbook is faster than my server.. it uses intel atom [08:27] teemow has joined the channel [08:27] chapel: who here uses Linkinus? [08:27] eboyjr: Iszak: i don't pay the electric bill here :] [08:27] matjas has joined the channel [08:27] Iszak: eboyjr, bleh [08:27] mikeal has joined the channel [08:29] rchavik has joined the channel [08:31] muk_mb: ok, once I've modified someone's module, how do I build and install it? [08:32] eboyjr: build? [08:32] eboyjr: hrm [08:33] masahiroh has joined the channel [08:33] muk_mb: oh nvm [08:33] gkatsev: just require it [08:35] dguttman has joined the channel [08:36] eboyjr: nice finally installed [08:36] ryah: llvm :P~ [08:36] c4milo1 has joined the channel [08:37] eboyjr: make test failed :( [08:37] Druid_ has joined the channel [08:38] eboyjr: ehh my server needs a reboot, she has been working hard lately [08:39] muk_mb: hmm, even pumping formidable full of log statements, I'm coming up empty [08:43] eboyjr has joined the channel [08:44] Ond has joined the channel [08:45] jimt_ has joined the channel [08:52] jimt has joined the channel [08:53] pyrotechnick: how can i evesdrop on an xmpp session? [08:53] pyrotechnick: isnt there a new node module to do it? [08:54] datapimp has joined the channel [08:54] SamuraiJack__ has joined the channel [08:54] datapimp has joined the channel [08:54] superjudge has joined the channel [09:14] yozlet has joined the channel [09:21] pyrotechnick has joined the channel [09:21] pyrotechnick: how does one decode base64 in 0.3.x [09:21] pyrotechnick: none of the modules work but i see you can use a buffer [09:21] pyrotechnick: can anyone give me a shove on the right direction [09:22] sveimac has joined the channel [09:22] stagas: pyrotechnick: new Buffer(base64string, 'base64').toString('utf8') maybe [09:23] pyrotechnick: thanks babe [09:23] masahiroh has joined the channel [09:23] temp02 has joined the channel [09:23] eboyjr: babe? lol [09:24] chapel: do you even need a buffer? [09:24] pyrotechnick: hew its NYE anything goes [09:24] pyrotechnick: yeah that works [09:24] pyrotechnick: cheers [09:26] DTrejo has joined the channel [09:30] MikhX has joined the channel [09:30] JimBastard has joined the channel [09:31] masahiro_ has joined the channel [09:31] papandreou has joined the channel [09:35] masahiroh has joined the channel [09:36] steffkes has joined the channel [09:37] fly-away has joined the channel [09:39] devdrinker has joined the channel [09:40] papandreou: creationix: Hi Tim, any chance I can convince you to publish spark version 0.3.0 to the npm repo? The current version is missing the "use NODE_ENV instead of SPARK_ENV" fix, so it's out of sync with Connect and Express. I asked tj a while ago, and bumped the version in the github repo, but he didn't have the rights to publish the npm package. [09:40] skm has joined the channel [09:40] masahiro_ has joined the channel [09:40] creationix: papandreou: done [09:41] jimt has joined the channel [09:42] skm has joined the channel [09:43] papandreou: creationix: Whoa, thanks :) [09:43] creationix: :) [09:44] DTrejo has joined the channel [09:45] romainhuet has joined the channel [09:47] clarkfischer has joined the channel [09:48] DTrejo has joined the channel [09:49] eboyjr has left the channel [09:51] devdrinker: when using commonjs module spec is it okay to extend native objects via prototype or is this going against the grain? [09:52] pyrotechnick: yes [09:52] pyrotechnick: its ok [09:52] pyrotechnick: its kinda against the grain [09:52] pyrotechnick: but its ok [09:52] pyrotechnick: like if you're using something like MooTools in commonjs [09:52] pyrotechnick: itll extend the natives [09:53] pyrotechnick: you just have to watch out for different implementations of native extensions [09:53] void_ has joined the channel [09:53] devdrinker: cool, just thinking deeper i doubt there any way an implementation of commonjs could protect against it? [09:53] pyrotechnick: most of the time they will overwrite eachother and it wont mater [09:53] pyrotechnick: but if one Array.map is different to another Array.map your libraries or a library you're using wont work [09:53] pyrotechnick: by the very standard of CommonJS native extensions are supported [09:54] pyrotechnick: it's supposed to 'cache' includes and share them [09:54] pyrotechnick: node.js does [09:54] pyrotechnick: some dont but most do [09:55] creationix: node does have a flag where you can make each module live in it's own context [09:55] creationix: then you don't have to worry about clobbering globals [09:55] lintaba__ has joined the channel [09:55] creationix: but there are other gotchas with that [09:55] creationix: like instanceof Object won't work if the value is created from another module's Object [09:56] sveimac has joined the channel [09:57] devdrinker: explain context? context being the object set to this for the export? (i got my understanding of module js from http://www.davidflanagan.com/demos/require.js [09:57] creationix: no, context in the JavaScript VM sense [09:57] creationix: it's an whole set of globals [09:57] devdrinker: ah so mapping to browsers like a seperate tab/web page [09:57] creationix: with unique instances of all built-in objects [09:58] creationix: devdrinker: yep [09:58] creationix: except they can pass references to eachother via the modules sytem and function calls [09:58] devdrinker: okay, cool, didnt know about that flag, cant envision a use for it in my scenario/apps but interesting.. [10:00] JimBastard: anyone try https://github.com/joshfire/node-crawler ? [10:01] TomY_ has joined the channel [10:03] saschagehlich has joined the channel [10:03] Huvet has joined the channel [10:12] creationix: ryah: ok, got a json streaming parser done, now it just needs some polish, tests, and documentation [10:12] creationix: ACTION is off to bed [10:14] pyrotechnick: anyone know about md5-sess [10:15] pyrotechnick: it like doesnt exist on google [10:16] pyrotechnick: is it a salt? [10:17] altamic has joined the channel [10:17] JimBastard: if i wanted to send a partial http request id prob want to use the net module instead of http ya? [10:18] pyrotechnick: probs JimBastard [10:18] stagas: JimBastard: ya [10:18] JimBastard: nice [10:19] pyrotechnick: can node crypto do md5-sess? [10:19] pyrotechnick: ryah: can node crypto do md5-sess? [10:22] andrewfff has joined the channel [10:25] temp01 has joined the channel [10:29] Ond has joined the channel [10:29] Yuffster has joined the channel [10:32] saschagehlich: was rauchg here? :/ [10:35] steffkes: saschagehlich, [10:35] steffkes: -NickServ- Information on rauchg (account rauchg): [10:35] steffkes: -NickServ- Last seen : Jun 29 18:38:35 2010 (26 weeks, 2 days, 15:56:18 ago) [10:35] saschagehlich: well yea, he's rauchg_ now [10:36] saschagehlich: unfortunately whois don't work for me right now :( [10:36] steffkes: "rauchg_ is not registered." .. d0h ;D [10:36] saschagehlich: hrmpf [10:37] saschagehlich: why does socket.io not work for opera 11? :)( [10:37] superjudge has joined the channel [10:38] saschagehlich: especially for other domains [10:38] saschagehlich: so my connect from beta.filsh.net to v5con.filsh.net does not work - security violation [10:39] pyrotechnick: anyone used a state machine in node? [10:39] JimBastard: hes here all the time [10:43] saschagehlich: hm didn't see him for a long time now [10:44] aklt has joined the channel [10:46] papandreou: aklt: Happy new year :) [10:47] sveimac_ has joined the channel [10:51] aklt: papandreou: Yeah, you too! [10:51] rudebwoy has joined the channel [10:51] jimt_ has joined the channel [10:52] aklt: papandreou: enjoyed http://vimgolf.com, thats funny :-) [10:52] femtoo has joined the channel [10:53] femtooo has joined the channel [10:54] teemow has joined the channel [10:54] jetienne has joined the channel [10:54] papandreou: aklt: I thought you might, you already seemed to consider vim keystroke sequences to be a text processing language in its own right :) [10:57] aklt: papandreou: hehe, yeah, well it is kind of fun :-) [11:00] Iszak has joined the channel [11:00] Iszak has joined the channel [11:00] ewdafa has joined the channel [11:01] aklt: papandreou: Have a look at this: http://jsonml.org/ (scroll down the page),... Looks like something we had in mind as well! [11:04] papandreou: aklt: NIce. That looks identical to what a streaming *ML parser would spit out :) [11:06] pyrotechnick: anyone know much about xmpp/jabber? [11:08] aklt: papandreou: Yeah, it gives merit to the idea of opensourcing some of the work we did :) [11:11] marlun has joined the channel [11:13] devdrinker has joined the channel [11:13] broofa has joined the channel [11:13] broofa has joined the channel [11:14] vineyard has joined the channel [11:14] Max-Might has joined the channel [11:17] Ond has joined the channel [11:18] datapimp has joined the channel [11:19] mr_daniel has joined the channel [11:20] sepehr has joined the channel [11:21] stride: anyone here who used node-oauth with google data APIs? I'm getting invalid token errors when I try to authorize a requesttoken [11:22] masahiroh has joined the channel [11:24] Iszak: stride, does node-oauth support the specifications (v1 vs v2) of OAuth? [11:24] Iszak: that you're using [11:25] lintaba has joined the channel [11:25] stride: yeah 1 and 2, I followed a gcal example in the github wiki which specified to use 1.0A [11:26] stride: the requesttoken looks okay, tried it in the api playground as well, oa.getOAuthAccessToken (which should authorize the token imho) returns a 404 Invalid Token error page [11:28] JimBastard: yo aklt papandreou [11:28] JimBastard: check out https://github.com/hij1nx/JUP [11:29] JimBastard: same as json ml [11:29] JimBastard: npm install jup [11:29] stride: meh. Iszak nvm, I think I've got it [11:30] messju has joined the channel [11:32] papandreou: JimBastard: Thank you very much, looks great [11:33] JimBastard: papandreou: cool! we use that @ nodejitsu. the hij1nx guy is on our dev team [11:33] JimBastard: its very simple stuff [11:33] JimBastard: allows you to represent your views as data [11:33] JimBastard: json [11:33] papandreou: JimBastard: What's the approach to streaming? [11:34] JimBastard: server-side? [11:34] JimBastard: or both [11:34] JimBastard: i guess both [11:34] papandreou: JimBastard: Mostly serverside, but why not both :) [11:34] JimBastard: i dont think it can currently handly that [11:34] JimBastard: handle that [11:34] JimBastard: but it would make sense to implement if it didnt slow down the lower use cases [11:34] JimBastard: most of the time non streaming parsing is going to be the fastest [11:35] papandreou: JimBastard: Right, but sometimes you need to proxy a lot of data through [11:38] papandreou: JimBastard: ... But you know that, of course :) [11:38] JimBastard: i know bradleymeck wrote a streaming parser [11:39] JimBastard: but i dont think he was happy with what he had, wasnt fast enough [11:39] JimBastard: i'd like to see a streaming json parser that worked well [11:39] breccan_ has joined the channel [11:39] JimBastard: with a sane api [11:41] papandreou: JimBastard: Creationix mumbled something about getting something to work just before he fell asleep :) [11:41] JimBastard: yeah i saw [11:42] papandreou: JimBastard: Let's hope it's sane then :) [11:43] masahiro_ has joined the channel [11:45] sveisvei has joined the channel [11:46] stride: hah! [11:46] unomi has joined the channel [11:47] stride: 302. moving along in http error codes.. it's like bingo, only with Google APIs [11:47] papandreou: hahah [11:55] iFire has joined the channel [11:58] papandreou: Gotta go, happy new year, folks! [12:06] sveimac has joined the channel [12:15] jankoprowski has joined the channel [12:18] jankoprowski has joined the channel [12:18] sveimac has joined the channel [12:19] lintaba_ has joined the channel [12:19] Ond has joined the channel [12:19] devdrinker has joined the channel [12:19] rsms has joined the channel [12:21] Ond has left the channel [12:27] kolor has joined the channel [12:28] rsms has left the channel [12:28] hdon: hi all. does node have mmap()? [12:32] vineyard: hdon: https://github.com/bnoordhuis/node-mmap [12:33] hdon: vineyard, thanks :) [12:34] hdon: ACTION clicks test.js [12:34] hdon: cool, it is represented as a buffer :) [12:35] hdon: also: does node have posix advisory file locking api? [12:35] hdon: fflock(2) etc. [12:36] hdon: brb [12:37] altamic has joined the channel [12:39] aklt: hdon: I don't think it has, at least it is not documented [12:39] hdon: ACTION thinks how he will accomplish his goals [12:40] vineyard: hdon: what are you trying to do? [12:40] hdon: i know what i will do. i will lengthen the journal and keep an old state around for 10 seconds or so. then the node server i write can read the old state file and apply the changes in the journal. [12:41] hdon: vineyard, i have a very weird idea for a game. i want to use node as a temporary server at least for now. dont' know if i will use it when i install it on my server [12:41] hdon: are you familiar... with Befunge? [12:41] vineyard: nope [12:41] vineyard: ACTION googles [12:42] hdon: my idea is basically Corewars for Befunge, but with slightly different scoring algorithm / goal [12:43] hdon: iirc in corewars, score is simply a function of crashing the other cores running in the same shared memory space [12:44] hdon: in my game each core running in the shared memory space will be able to ... "worship" any player by their user id. therefore cores can spend more time worshipping and thus be less defended, or they can spend less time worshipping and more time reading memory / building defenses [12:44] devdrinker has joined the channel [12:44] hdon: i have written the multi-core befunge VM and i have some of the rudimentary work done for the web-based game client [12:44] hdon: ACTION uploads rudimentary client [12:46] dipser has joined the channel [12:47] hdon: had to change some paths to make it work: http://codebad.com/~donny/befunge-universe-client/test.html [12:47] hdon: just... type symbols and letters and numbers and stuff [12:47] hdon: here is my crappy font http://codebad.com/~donny/befunge-universe-client/font.png [12:48] JimBastard: is there any js code out there for doing betweenness centrality [12:48] JimBastard: like social graph stuff [12:48] JimBastard: really want to port the code for this into node http://blog.nodejitsu.com/most-influential-github-users-by-location [12:48] hdon: JimBastard, for a large graph you probably want to use some kind of system to index graph relationships [12:49] JimBastard: hdon: memory is no good? [12:49] JimBastard: i think can load every single github user into memory [12:49] JimBastard: ive done it before in firefox lol [12:49] JimBastard: ohh i guess its way more data then that [12:49] hdon: JimBastard, lol, well, calculation time is what worries me [12:49] JimBastard: yeah [12:49] hdon: unless you have a low threshold [12:49] JimBastard: there is a ruby library that does the calc [12:49] hdon: then you can get away with it [12:50] hdon: JimBastard, if you find some interesting graph algorithms written in Javascript please drop me a line i'd love to see it :)_ [12:50] omygawshkenas has joined the channel [12:50] JimBastard: hdon: http://igraph.rubyforge.org/igraph/classes/IGraph/Closeness.html#M000165 [12:50] JimBastard: thats the ruby lib [12:50] JimBastard: maybe there is a c one [12:51] hdon: i have heard of it, but i don't do ruby yet [12:51] JimBastard: yeah, http://igraph.sourceforge.net/ [12:51] hdon: i would NOT want to use C for graph manipulation [12:51] hdon: Javascript is a near perfect language for graph manipulation [12:51] SubStack: graph manipulation! [12:51] hdon: graff manipulation! [12:51] SubStack: haskell has so many graph algorithm libs [12:51] JimBastard: SubStack: morning [12:51] JimBastard: http://igraph.sourceforge.net/download.html , there is a C lib there [12:51] SubStack: oh hello! [12:51] JimBastard: how hard is it to slay some dragons to make a binding for that? [12:52] JimBastard: people prob want igraph [12:52] hdon: JimBastard, has Python and R bindings :) [12:52] espadrine has joined the channel [12:53] femtoo has joined the channel [12:53] SubStack: need to finish up this silly api thing today [12:53] femtooo has joined the channel [12:53] SubStack: requires coffee I suspect [12:53] SubStack: chemicals! [12:53] JimBastard: SubStack: did i tell you i got Resourcer and optimist playing nice [12:54] JimBastard: i can expose my models to optimist automagically [12:54] JimBastard: so i dont have to write any of the args by hand [12:54] JimBastard: prob did [12:54] JimBastard: need sleep [12:54] SubStack: \o/ [12:55] SubStack: hooray, pull requests [12:59] pyrotechnick: i just successfully connected to my node.js xmpp server [12:59] pyrotechnick: YAY [12:59] JojoBoss has joined the channel [13:00] hdon: pyrotechnick, that's awesome :) [13:00] hdon: pyrotechnick, where is your project? [13:00] pyrotechnick: it's FUCKING dirty though [13:00] pyrotechnick: but it does work most of the time ^w^ [13:00] hdon: are.. those crossed fingers? [13:00] pyrotechnick: there;s just one bug where if it sends multiple stanzas it screws up [13:00] pyrotechnick: but thats an easy fix that a refactor will fix [13:00] pyrotechnick: ill push it [13:00] pyrotechnick: you can try it out if you like [13:00] pyrotechnick: im using adium [13:01] pyrotechnick: it probably wont work with another client [13:01] pyrotechnick: it will probably work with a libpurple client [13:01] hdon: pyrotechnick, no need, i am busy with my own project right now, but i think it would be great for me to check out in the future [13:01] pyrotechnick: no worries [13:01] pyrotechnick: ill push it in the new year then [13:01] hdon: :) [13:01] pyrotechnick: once it's cleaned up and documented a bit [13:01] hdon: but i need the url [13:01] pyrotechnick: im really surprised nobody has done it [13:01] pyrotechnick: sure ill make the project so you can watch it [13:01] hdon: :D [13:01] hdon: i just typed in gitbug.com [13:02] Max-Might has joined the channel [13:02] pyrotechnick: i saw that linked on a stackoverflow today [13:02] hdon: lol [13:02] pyrotechnick: lulz [13:03] pyrotechnick: https://github.com/feisty/node-xmpp-server [13:03] hdon: awesome [13:03] pyrotechnick: will push it tomorrow sometime [13:03] pyrotechnick: thanks for watching! [13:03] pyrotechnick: let anyone who might be interested know [13:03] hdon: i must watch [13:03] hdon: or else how will i find it when i want to try it out? [13:03] pyrotechnick: yay [13:04] hdon: i wrote in Javascript a documentation generator for use at work [13:04] hdon: i think i will try to hook it up to your xmpp server somehow.... [13:04] pyrotechnick: awesome [13:04] pyrotechnick: its written in coffee though ^w^ [13:05] pyrotechnick: but you should be able to run it against the js [13:05] hdon: ACTION goes to cigarette store [13:05] pyrotechnick: yeah [13:05] pyrotechnick: im about to have one [13:05] pyrotechnick: its only 120 lines ^w^ [13:05] pyrotechnick: node is the bomb! [13:07] messju has left the channel [13:09] oal has joined the channel [13:09] espadrine: How does node's repl deal with multiline entries? [13:09] espadrine: I have written a function, and it doesn't come back to the prompt... [13:09] Druid_ has joined the channel [13:10] pyrotechnick: ; [13:11] darthdeus has joined the channel [13:11] pyrotechnick: mine came back after a function [13:11] pyrotechnick: wat version? [13:12] shinmei has joined the channel [13:12] espadrine: 2.5 [13:13] aklt: hdon: Gott ago. Happy new years everyone! [13:14] espadrine: Ah, yes... missed a semi-colon. It is sensitive... [13:16] marlun has joined the channel [13:16] marlun has joined the channel [13:17] pietern has joined the channel [13:22] JimBastard: anyone use formidable ? [13:22] JimBastard: its not working for me at all. form.parse just fails silently [13:22] JimBastard: never goes anywhere [13:23] jetienne_ has joined the channel [13:30] javajunky has joined the channel [13:31] jetienne_ has joined the channel [13:33] markwubben has joined the channel [13:39] Sembiance: morning :) [13:39] davidc_ has joined the channel [13:39] davidc_ has joined the channel [13:39] Imperion has joined the channel [13:41] Eber has joined the channel [13:41] Eber: Would you guys say that Node is stable enough to build an entire web[site/app] with it? [13:41] Sembiance: hehe [13:41] Sembiance: Eber: in a short answer, yes. [13:42] aheckmann has joined the channel [13:42] Eber: Sembiance: ok :) [13:43] Sembiance: Eber: I'm running it in production, serving 3.1 million requests a day, no problems at all. [13:43] Sembiance: Eber: no weird exceptions, no crazy memory leaks [13:43] chapel: what site is that Sembiance [13:43] Sembiance: chapel: http://worldofsolitaire.com [13:43] Sembiance: chapel: I converted it to use node.js on christmas eve :) [13:43] Sembiance: chapel: well, I spent 2 to 3 weeks on the conversion, and put it live on christmas eve ;) [13:44] Eber: Sembiance: did you use any frameworks? [13:45] Sembiance: Eber: I use fugue (https://github.com/pgte/fugue) to run multiple node.js instances and it spreads the love between them and automatically starts up any that die [13:45] Sembiance: Eber: I use expressjs (http://expressjs.com/) for handling the requests [13:45] Sembiance: Eber: and without Step (https://github.com/creationix/step) my server side code would look like an absolute nightmare. [13:46] Eber: Sembiance: cool :) thanks for the tips! [13:47] Sembiance: Eber: and of course I'm using other node.js modules, specific to what I'm doing such as a redis module and a date formatting module, etc. [13:47] Sembiance: Eber: what are you thinking about using it for? [13:48] Eber: Sembiance: www.tanlup.com It's an e-commerce website... Not exaclty a webapp with the characteristics of a node application... [13:49] Sembiance: Eber: one thing to keep in mind is right now SSL support in node.js is a little lacking. It's pretty high on the to-do list and some solutions exist, just be known it's not quite perfect yet (or at least, so I read in various blog posts) [13:50] Sembiance: Eber: Well if choose to go with node.js, I just can't say enough good things about the Step module. It's just pure awesome. [13:50] Eber: Sembiance: I'll take a look at it :) Thanks! [13:52] chapel: check out seq as well [13:52] chapel: <3 SubStack's work [13:55] Eber: chapel: what is that? [13:56] Sembiance: chapel: https://github.com/substack/node-seq [13:56] Sembiance: err that was to Eber [13:56] chapel: heh yeah [13:56] pyrotechnick: HAPPY NEW YEARS!!! [13:56] chapel: http://substack.net/posts/e0741f blog post about it [13:56] Sembiance: Eber: it's another 'control flow' module to make writing asynchronous code easier [13:56] Eber: Sembiance: tks :) [13:56] pyrotechnick: LOVE FROM BRISBANE AUSTRALIA [13:56] Sembiance: Eber: similar to Step [13:56] Eber: chapel: I'll read it :) [13:56] Sembiance: pyrotechnick: my best friend lives in brisbane :) [13:57] Wizek has joined the channel [13:57] daveyjoe has joined the channel [13:57] pyrotechnick: what's his name? [13:57] Sembiance: pyrotechnick: Jeremy Orr :) [13:57] pyrotechnick: hmm [13:57] pyrotechnick: i know some orrs [13:57] pyrotechnick: my brothers ex [13:57] Iszak has joined the channel [13:57] pyrotechnick: but i do not know a jeremy [13:57] pietern has joined the channel [14:02] SubStack: ACTION waves [14:02] Sembiance: ACTION smiles. [14:02] chapel: :) [14:04] rwaldron_ has joined the channel [14:09] MattJ has joined the channel [14:10] sriley has joined the channel [14:12] daveyjoe: Hi just getting to grips with WebSockets, quick question: How do I message a Socket.IO server from node (as opposed to from the browser). [14:14] lintaba_ has left the channel [14:15] pyrotechnick has left the channel [14:16] SubStack: daveyjoe: socket.on('connection', function (client) { client.send(...) }) [14:19] daveyjoe: SubStack: thanks, trying that now [14:23] Eber: Is there already a module to create MySQL models with relations and validations? [14:23] shimondoodkin has joined the channel [14:25] shimondoodkin has left the channel [14:25] shimondoodkin has joined the channel [14:27] hdon: Eber, do you want your MVC controller in the MySQL database? [14:28] Eber: hdon: what do you mean? [14:28] jakehow has joined the channel [14:29] hdon: Eber, well you say "create MySQL models with relations and validations," but that's very close to sounding like any MVC framework supporting relational abstractions with a MySQL back-end should do the job [14:29] hdon: on the other hand it's also very close to sounding like you want to do the validation in MySQL [14:29] Eber: hdon: no, I'm looking for something like MVC framework... [14:32] hdon: Eber, you might be able to meld this mvc framework with a mysql module: https://github.com/tuxychandru/grasshopper/tree/master/grasshopper [14:33] Eber: hdon: thanks, i'll take a look! [14:33] hdon: Eber, you'll want to take a look at this file (i think) to see how you might use mysql as your model store https://github.com/tuxychandru/grasshopper/blob/master/grasshopper/lib/model.js [14:35] boaz has joined the channel [14:39] Imperion: I wonder when tjholowaychuk is coming back [14:39] Imperion: I have good and bad news for him [14:46] Sembiance: hrm [14:48] themiddleman has joined the channel [14:49] nonnikcam has joined the channel [14:53] cagdas has joined the channel [14:54] zemanel has joined the channel [14:59] under_ has joined the channel [15:00] yonkeltron: hey all [15:01] under_: hello. [15:02] under_: whats the best way to concatenate a bunch of buffers together into another buffer? only ways i can see seem to involve copying them [15:02] Sami_ZzZ_ has joined the channel [15:04] under_: like, how to reassemble a series of buffers received as the body of an http respnonse? [15:04] javajunky has joined the channel [15:05] zemanel: happy new year and stuff [15:05] stride: you might want to push them in an array and afterwards copy them all into a buffer of the right size (or concatenate them to a string). there are modules that help maintaining lists of buffers like https://github.com/substack/node-bufferlist as well [15:05] stride: @ under_ [15:06] pHcF has joined the channel [15:06] under_: yeah, just wanted to make sure i wasn't missing something. currently im pushing them into an array and copying at end. [15:07] hornairs has joined the channel [15:07] under_: i saw some video about node and much was made of zero copying (or minimal anyway) for the http stack, so i figured i must have missed something [15:09] stride: depending on what kind of data is in there you don't have to keep all those buffers and basically implement streaming parsers that process chunk-by-chunk or buffer only a part of them until a complete "thing" is ready to process but the buffer and process on end approach is okay in many cases [15:10] javajunky has joined the channel [15:11] under_: i don't care whats in them, i want to deserialize complete request/responses into a list and later log them. thanks, anyway, sounds like im taking a reasonable approach [15:13] under_: next question while we're on a roll. the http headers handed to you by httpserver - is there any hope of getting the bytes sent by the browser? (instead of a canonicalized / normalized list, like in request.headers). in the responses i notice there is a _headers string, but not in requests [15:14] derren13 has joined the channel [15:14] Squax has joined the channel [15:14] sveimac has joined the channel [15:14] hdon: under_, if you want that, you want to implement your own HTTP server in Node using TCP [15:14] noahcampbell has joined the channel [15:15] Max-Might has joined the channel [15:15] JusticeFries has joined the channel [15:16] under_: hdon, yeah, was hoping to avoid that :) [15:16] stride: nah, just monkeypatching the addheaderline or whatnot of the server instance should be sufficient [15:16] hdon: under_, well dont' take my word for it, it might be possible. worst case scenario, you could modify the existing Node HTTP server [15:16] hdon: what stride said [15:16] under_: stride: sounds like thats what im looking for [15:16] under_: i will look into it thx [15:18] under_: i poked in the src a little but the http stuff isn't exactly easy . still new to javascript. can write it fine, but reading node's httpserver isn't fun for me yet :) [15:18] stride: it's part of IncomingMessage iirc [15:19] stride: hm. looking at it, if you want to catch that at a buffer level parser.onHeaderField / parser.onHeaderValue would be the place I guess [15:20] under_: yah checking it out. didn't know http headers had to be ascii ;) [15:21] MattJ has joined the channel [15:22] sivy has joined the channel [15:26] thinkt4nk has joined the channel [15:26] Blink7 has joined the channel [15:28] beta_ has joined the channel [15:29] mjr_: under_: there has been quite a bit of discussion about how to handle raw headers or raw client bytes in the HTTP server. [15:30] mjr_: under_: I think the proposers ran out of momentum and didn't end up with a working path or one that wasn't a lot slower. [15:30] mjr_: But you should check the mailing list archives. Maybe you can revive the discussion. [15:37] d0k has joined the channel [15:39] bingomanatee_: once you've required'd a module - can you un-require a module and purge it from memory? [15:42] kolor has joined the channel [15:42] Huvet has left the channel [15:43] altamic has joined the channel [15:44] under_: mjr_: thx, i will do some archive searching. just about every single http implementation i've looked at in interpreted environments fails at this [15:44] under_: would be cool if one could get it right :) [15:46] under_: is "on" or "addListener" preferred? i prefer "on" [15:48] mjr_: I think most people use "on" these days. [15:49] mjr_: But the API started with addListener, so there was a lot of momentum behind that. [15:52] vandenoever has joined the channel [15:52] bingomanatee_: Seems like you're unnecessarily taxing the parser with those extra nine characters. [15:53] bingomanatee_ has left the channel [15:54] bingomanatee_ has joined the channel [15:55] mjr_: I know, have some sympathy for the poor lexer. [15:56] bingomanatee_: A code loop's a code loop. [15:57] bingomanatee_: <-- resells milliseconds to the highest bidder [15:58] mjr_: So you get them wholesale then? [15:58] bingomanatee_: Do you really want to know how I get them? [15:59] under_: fingers have unknown upper limit on number of impacts. i care more about that :) [16:00] bingomanatee_: Lets just say, you don [16:00] softdrink has joined the channel [16:00] sriley has joined the channel [16:00] bingomanatee_: 't ask me where my msecs come from, I won't ask where your fingers have been. [16:02] daveyjoe: I'm having problems getting sessions working in express. [16:02] daveyjoe: i.e. console.log(req.session); <-- undefined [16:02] robotarmy has joined the channel [16:02] daveyjoe: I'm using: app.use(express.cookieDecoder()); app.use(express.session()); [16:03] daveyjoe: Do I need to create a session inside a request or should it happen automatically? [16:05] vandenoever has left the channel [16:07] under_: can i rely on "this" inside an event handler? will it be the object i called "on" on to add the handler? [16:08] dguttman has joined the channel [16:09] altamic has joined the channel [16:11] creationix has joined the channel [16:12] herbySk has joined the channel [16:13] bencee has joined the channel [16:13] bencee has left the channel [16:15] sveisvei has joined the channel [16:16] jchris1 has joined the channel [16:20] creationix has left the channel [16:21] jpld has joined the channel [16:21] jpld has joined the channel [16:21] under_: stride: ok, so any tips on how to monkeypatch parser.onHeaderX ? it's declared inside a function inside http. [16:21] jchris2 has joined the channel [16:22] jakehow has joined the channel [16:23] pyrotechnick has joined the channel [16:23] ybit has joined the channel [16:23] desaiu has joined the channel [16:24] tjholowaychuk has joined the channel [16:24] dmshann0n has joined the channel [16:25] desaiu: node.js has a lot of hype [16:25] desaiu: javascript as your primary language for both servre and client is thrilling to me though :) [16:25] desaiu: so, er, to that extent, i've been comparing getty and express [16:25] pyrotechnick: desaiu: are you new to node? [16:25] masahiroh has joined the channel [16:25] desaiu: pyrotechnick: yes (sir|madam) [16:26] pyrotechnick: desaiu: fire away with any questions [16:26] desaiu: excellent! [16:26] pyrotechnick: im sure there's alot of people in the node community that would like to be welcome and encouraging to any newbies so i will do my best to uphold their good standards [16:27] desaiu: according to github, getty hasn't been updated since november, and i'm afraid it won't be updated much anymore, but i suppose it is open source and i might be able to help with that [16:27] pyrotechnick: right. but it's a good idea to cluster around what is actively developed or you might find yourself on your own [16:27] desaiu: i like the rails/django approach of getty [16:27] pyrotechnick: but in saying that it would be nice for a few dead projects to be revived [16:28] desaiu: express seems to be the most actively developed as of right now [16:28] pyrotechnick: right [16:28] pyrotechnick: which is what i was about to recommend [16:28] pyrotechnick: but. [16:28] pyrotechnick: it's much different to rails or merb or django or etc [16:28] pyrotechnick: its more like sinatra [16:28] desaiu: yup [16:28] pyrotechnick: if you know ruby [16:29] pyrotechnick: but [16:29] pyrotechnick: there's nothing wrong with that [16:29] SubStack: I like to start out using connect and then switch over to express when I need something particular [16:29] herbySk74 has joined the channel [16:29] pyrotechnick: and i think the direction theyre taking express in is a very good one [16:29] pyrotechnick: so what substack is saying [16:29] pyrotechnick: is he likes to start out with something like rack [16:29] pyrotechnick: and then use parts of rails when it makes sense [16:30] altamic_ has joined the channel [16:30] devdrinker has joined the channel [16:30] pyrotechnick: js->ruby conversion [16:30] pyrotechnick: what is your background desaiu [16:30] SubStack: eh? I've never used rack actually [16:30] SubStack: but incremental all the way [16:30] pyrotechnick: so i can grasp your knowledge [16:30] pyrotechnick: SubStack: rack is connect for ruby [16:30] SubStack: gotcha [16:30] pyrotechnick: its like CGI [16:30] pyrotechnick: its cool [16:30] tjholowaychuk: SubStack: rack does kinda less, it has more middleware since some are easier to do in sync-land [16:30] tjholowaychuk: but [16:30] tjholowaychuk: omits things like routing [16:31] pyrotechnick: i've seen routing done in rack [16:31] tjholowaychuk: the only reason I had that in connect is because I had a few projects based on it [16:31] tjholowaychuk: pyrotechnick: not in core [16:31] pyrotechnick: no [16:31] under_: what do you think of coffeescript? (other than thoughts onusing whitespace - dont care about that) [16:31] pyrotechnick: not in rack itself right [16:31] desaiu: pyrotechnick: I don't have limited experience in both rails and django, but not enough experience in either one. however, i'm looking to get a project off the ground with friends this year. i figured it would save in development time to use just one language [16:31] pyrotechnick: under_: github.com/feisty [16:31] pyrotechnick: we love it [16:31] desaiu: I mean, i do have* [16:31] pdcawley has joined the channel [16:31] Wizek: Hi! Is mongoose suitable for nested "schemas"? [16:31] pyrotechnick: and i respect that the whitespace isnt a considerate of yours [16:32] pyrotechnick: Wizek: yes but its not "enforced" by the database like it is with SQL [16:32] under_: so far i can write and read coffeescript but not quite javascript :) [16:32] pyrotechnick: it's enforced by the application layer [16:32] pyrotechnick: under_: there's nothing wrong with that [16:32] pdcawley: under_: Why bother with Javascript then? [16:32] pyrotechnick: he might want to get into hacking modules [16:32] pyrotechnick: that are written in JS [16:32] pyrotechnick: or node.js itself [16:32] under_: i like what node is about [16:32] pyrotechnick: under_: we all do [16:32] pyrotechnick: welcome [16:33] under_: i spend a lot of time working with / writing http proxies, routers, etc [16:33] under_: so figured i'd check it out [16:33] under_: thats main reason for my foray into javascript [16:33] pyrotechnick: under_: it's very much in it's domain with those applications [16:33] under_: yes - hence my interst [16:33] pyrotechnick: in fact [16:33] Wizek: pyrotechnick: And what's the point of storing null values in a document db like mongodb? [16:33] pyrotechnick: the only reason i got started with node [16:33] pdcawley: I'm trying to work out if this is a FAQ, but is there any reason why 'emit' synchronous? [16:33] under_: but to reall grok whats happening im finding i need to know more javascript voodoo [16:34] pyrotechnick: Wizek: the same reason i set properties to null when i insatiate objects in coffee or javascript [16:34] under_: like its wacky scoping and object model [16:34] pyrotechnick: Wizek: to hint that they can be set [16:34] pyrotechnick: under_: right, coffeescript cradles you a bit in that respect. i can dig up a few articles to get you started [16:34] Wizek: okay, but null eventually takes up space, so why saving them to Mongo at the end? [16:35] pyrotechnick: Wizek: there's no reason, it's just a convention [16:35] tjholowaychuk: pyrotechnick: CS still uses "." right? foo.bar? or "foo bar" ? [16:35] pyrotechnick: tjholowaychuk: lol "," [16:35] pyrotechnick: "." [16:35] pyrotechnick: sorry a bit to drink [16:35] tjholowaychuk: ah ok [16:35] tjholowaychuk: haha [16:35] pyrotechnick: tjholowaychuk: we should skype one day [16:35] tjholowaychuk: fuck that, i just woke up haha [16:35] pyrotechnick: tjholowaychuk: i think you would like coffee [16:35] tjholowaychuk: im a skype newb [16:35] pdcawley: CS spells 'function' correctly... [16:35] pyrotechnick: tjholowaychuk: for "app" code at least [16:36] pyrotechnick: pdcawley: what do you mean? [16:36] jsnoob has joined the channel [16:36] tjholowaychuk: pyrotechnick: yeah i think it looks ok for the app.get kinda stuff [16:36] tjholowaychuk: very sinatra-ish [16:36] under_: heh - my first cs mistake. you need () to specify a function call with no args. i got used to leaving them out and ... doh [16:36] pyrotechnick: tjholowaychuk: i want to seed a site, kinda like howtonode but just js/coffee in general [16:36] SubStack: (.) is function composition, obviously [16:36] pyrotechnick: tjholowaychuk: i hate commonjs [16:36] SubStack: pyrotechnick: you too? [16:36] tjholowaychuk: pyrotechnick: haha :) [16:36] pyrotechnick: under_: yeah there are a few quirks [16:36] pdcawley: I'd rather type '(this, that) -> body of code' than 'function(this, that) { body of code }' [16:36] desaiu: I found a link the other day that listed all the work being done with nodejs on github, it had categories which included "microframeworks" and others i can't remember [16:36] pdcawley: 'function' is just too long. [16:37] pyrotechnick: under_: theyre fixing them, trust me [16:37] pyrotechnick: under_: for instance there is now the `do` keyword [16:37] desaiu: does anyone recall seeing this? [16:37] tjholowaychuk: pdcawley: i never type it [16:37] tjholowaychuk: just press "f" [16:37] tjholowaychuk: lol [16:37] pdcawley: Heck, 'lambda' is too long but lisp is old enough that they can claim they didn't know better. [16:37] pyrotechnick: under_: which lets u call something without () [16:37] SubStack: desaiu: github.com/ry/node/wikis/modules [16:37] SubStack: silly chrome http://github.com/ry/node/wikis/modules [16:37] pyrotechnick: it still works substack [16:37] pyrotechnick: at least in adium [16:37] desaiu: that's the one SubStack, thank you! [16:37] pyrotechnick: which i hope we're all using [16:37] pdcawley: tjholowaychuk: It's too long to read as well, specially on a slide. [16:37] SubStack: desaiu: also check out http://search.npmjs.org/ and http://npm.mape.me/ [16:37] tjholowaychuk: pdcawley: I dont mind it at all to be honest [16:38] tjholowaychuk: I find anything else would get lost [16:38] pdcawley: tjholowaychuk: You say that like it's a bad thing [16:38] tjholowaychuk: say for example if it were just (){} [16:38] pyrotechnick: desaiu: want those links? [16:38] tjholowaychuk: yeah I think its a bad thing [16:38] tjholowaychuk: personally [16:38] pdcawley: You're obviously not writing enough functions :) [16:38] tjholowaychuk: ohh I do [16:38] tjholowaychuk: trust me lol [16:38] pyrotechnick: tjholowaychuk: skype - pyrotechnick [16:39] pyrotechnick: whenever you have 5 [16:39] tjholowaychuk: woot [16:39] ceej has joined the channel [16:39] bingomanatee_: Happy 3 am pyro [16:39] pyrotechnick: thanks bingomanatee [16:39] pyrotechnick: its 2:39 ;) [16:39] tjholowaychuk: hahah [16:39] pyrotechnick: 2011 BITCHES [16:39] desaiu: thanks again SubStack , i saw the npm.mape.me yesterday, what does npm stand for? [16:39] tjholowaychuk: 8:30am here [16:39] bingomanatee_: close enough [16:39] desaiu: pyrotechnick: i'm sorry, what? [16:39] pyrotechnick: want to know what the next year is like? [16:39] bingomanatee_: really - had your new years then? [16:39] pyrotechnick: yeah hence the drinking [16:39] pyrotechnick: but i can still node [16:39] pyrotechnick: or at least #node.js [16:39] pyrotechnick: lol [16:39] SubStack: desaiu: node package manager [16:39] bingomanatee_: ish [16:40] dguttman has joined the channel [16:41] desaiu: package management for node! that's great news :) [16:41] pyrotechnick: desaiu: you are really going to like node.js lol [16:41] espadrine_ has joined the channel [16:41] pyrotechnick: desaiu: npm is just the beginning [16:42] matjas has joined the channel [16:42] pdcawley: ACTION is still slightly weirded out by setting /usr/local to 775 though... [16:42] desaiu: i'm guessing express is the way to go since i will most likely not have time to develop geddy further [16:42] desaiu: and my development experience is pathetic, so i'm not so sure what i could do [16:43] under_: so i want to monkeypatch something in a module that isn't exported. is this possible? any good references on monkeypatching techniques for node? [16:43] pyrotechnick: desaiu: it should never feel like that in node, but ATM yes... [16:43] pyrotechnick: under_: without touching the source? [16:43] under_: indeed [16:43] pyrotechnick: under_: hmm, maybe a custom require() [16:43] pyrotechnick: that can intercept libararies [16:44] pyrotechnick: under_: my 0.02 [16:44] pyrotechnick: others will have a better way [16:44] pyrotechnick: desaiu: there's alot of talk very recently about a rails in node [16:44] pyrotechnick: desaiu: it will happen [16:44] pyrotechnick: desaiu: tjholowaychuk might cry when i say this but express isnt heading in that direction [16:44] pdcawley: pyrotechnick: I'm not sure grabbing require will help - depends how the exported symbol is getting at the thing that under_ wants to monkeypatch. [16:44] pyrotechnick: and for good reasons [16:45] tjholowaychuk: pyrotechnick: why would I cry lol [16:45] pyrotechnick: i dunno [16:45] tjholowaychuk: I would cry if it was heading that direction [16:45] pdcawley: If it's using a closure, for instance, you're going to have to do exceedingly evil things to get near it. [16:45] pyrotechnick: so true [16:45] pyrotechnick: right pdcawley [16:45] pyrotechnick: my bad [16:45] pyrotechnick: but [16:45] pyrotechnick: yeah [16:45] pyrotechnick: monkeypatching would not really be applicable for that anyway [16:45] pyrotechnick: youd need to replace its accessible parent [16:45] pyrotechnick: just as in any other language [16:45] under_: ok pdcawley. i want to get raw http header bytes sent by browser via nodes http stack [16:46] pdcawley: I suppose if you had a require that would parse the source, fix it up programmatically and then eval it, thenyou'd solve the problem, but 'twould be the epitome of evil. [16:46] pdcawley: Cunning. But definitely evil. [16:46] under_: so in http.js, inside a closure, is parser.onHeaderField etc that i want to change/intercept/something [16:46] under_: is this just not something monkeypatchable? [16:46] pyrotechnick: who said before that they dislike commonjs [16:47] desaiu: Is there a virtualenv equivalent? [16:48] javajunky has joined the channel [16:48] pyrotechnick: SubStack: you dont like commonjs? [16:49] pdcawley: under_: What are you trying to achieve (ie: what's motivating you to attempt this monkeypatch). [16:49] desaiu: found the answer [16:49] desaiu: https://github.com/isaacs/nave [16:49] pyrotechnick: desaiu: yeah nave is cool [16:49] desaiu: https://github.com/visionmedia/ndistro [16:49] pdcawley: under_: Maybe there's a supported mechanism that will let you do that without the drama. [16:49] desaiu: not sure which one to use though [16:49] pyrotechnick: desaiu: https://gist.github.com/579814 [16:49] pyrotechnick: theres a snippet there for nave/npm [16:49] under_: pdcawley: said it above... i want raw bytes from browser for http headers, not the normalized list handed to me by httpserver [16:49] tjholowaychuk: desaiu: ndistro is different, still useful but different [16:50] tjholowaychuk: more for deploys [16:50] pdcawley: under_: What do you want them _for_? [16:50] tjholowaychuk: i dont like subshells so i stopped using nave [16:50] tjholowaychuk: i just version my bins now [16:50] pyrotechnick: here here tjholowaychuk [16:50] tjholowaychuk: makes mah shell ugly [16:50] tjholowaychuk: lol [16:50] desaiu: tjholowaychuk: more for deploys, can you explain that a little further? [16:50] under_: pdcawley: not really important. testing/logging/proxying [16:50] pdcawley: We know what you want, question is why you want them. [16:51] pdcawley: under_: Context is _always_ important. [16:51] tjholowaychuk: desaiu: if your project uses ndistro, you can do a git push (or whatever) to your server and $ ndistro [16:51] under_: i want to know what the client sent, not what node changed it to for me [16:51] desaiu: thanks for the link pyrotechnick, installing npm is top priority [16:51] tjholowaychuk: to grab the node binary [16:51] tjholowaychuk: etc [16:51] pyrotechnick: desaiu: a read over the README of ndistro and nave will show you how they're different [16:51] tjholowaychuk: so no compiling, its really fast [16:52] pyrotechnick: desaiu: ndistro is kinda like capistrana [16:52] pyrotechnick: capistrano [16:52] pyrotechnick: or whatever it is [16:52] pyrotechnick: desaiu: you're ruby right? [16:52] tjholowaychuk: not really though [16:52] tjholowaychuk: it doesnt do any ssh [16:52] tjholowaychuk: cap is lame [16:52] jimt has joined the channel [16:52] tjholowaychuk: and can be replaced by a tiny shell script lol [16:52] pyrotechnick: its a wannabe chef/puppet [16:53] pdcawley: under_: It might be worth looking at node's test suite to see how/if they test that node does the transformation correctly. [16:54] softdrink: soooo i signed up with joyent… no coupon code yet… [16:54] pyrotechnick: softdrink: im still waiting too [16:54] softdrink: ok [16:54] pyrotechnick: i think theyre a bit inundated [16:54] softdrink: just wanted to make sure i hadn't done something in error [16:54] pyrotechnick: nope [16:54] pyrotechnick: same storey with a few of my node comrades [16:55] pyrotechnick: if u dont hear back from them shortly [16:55] pyrotechnick: drop them a line [16:55] desaiu: pyrotechnick: thanks, yeah, i was thinking it was more like capistrano/fabric [16:55] softdrink: so do you just periodically hit the api to see if you have 'em? [16:55] pyrotechnick: let them know you're keen [16:55] pyrotechnick: softdrink: just hoping theyll email me like everyone else [16:55] softdrink: i'm /commander/ keen. [16:55] softdrink: ah [16:55] bingomanatee_: suryessur! [16:57] pdcawley: under_: If you're seriously needing to give a fuck about the case of your header fields, then you have bigger fish to fry. Like getting rid of any code that cares. [16:59] bingomanatee_: sounds like a head case. [16:59] bingomanatee_: :DS [17:00] softdrink: switch (head) { default: break; } [17:00] softdrink: ¬¬ [17:00] under_: pdcawley: not so helpful. i don't care what you think about my goals, just how i might achieve them with node. [17:01] pdcawley: under_: Build yerself a custom node that exposes parser in the exports. Prepare to live in a world of pain. You have been warned. [17:01] pdcawley: Or, accept what node is telling you: You don't need to worry about that stuff, and stop worrying about it. [17:01] under_: yeah, i didn't your help to know i could patch node's src. someone here earlier suggested monkeypatch. [17:01] pdcawley: How that isn't helpful, I don't know. [17:02] under_: i guess it isn't feasable in this case [17:02] under_: thats all youhad to say [17:02] pdcawley: ACTION is off for food. [17:02] under_: my conclusion is that as awesome as node's http stack is, it may not be for me [17:02] softdrink: under_: i'm curious, what are you up to? [17:03] pyrotechnick: he is blackhat [17:03] pyrotechnick: he's up to no good [17:03] softdrink: i don't have a hat :( [17:03] pyrotechnick: he's trying some underhanded node.js [17:03] pyrotechnick: sneaky bastard [17:04] under_: hats? [17:05] under_: i proxy a lot of http in different contexts. sometimes it gets routed / transformed etc, and sometimes it doesn't [17:05] matjas has joined the channel [17:05] under_: when it doesn't, the proxied requests should be what the client sent, not what node.js's idea of cannonical http is [17:06] softdrink: why not use nginx for that bit? [17:06] under_: indeed why not [17:06] shaver: man, I missed hacking with node [17:06] softdrink: i use nginx for lots of reverse proxy goodness [17:07] under_: cause i wantto use something like javascript (dynamic language, etc etc) to decide which requests get transformed and to do the transforming [17:07] under_: i can do this already with python, ruby, etc... (and do) [17:07] softdrink: ah, so you need to react based on the actual content? [17:07] under_: and so far i always have to write my own (crappy,slow,but with NO SIDE EFFECTS) http stack [17:07] shaver: there's an interesting nginx lua thing [17:07] under_: i thought after reading hype, that maybe node had a decent stack [17:07] under_: and maybe it does [17:07] under_: but maybe not for m [17:07] under_: e [17:08] galaxywatcher has joined the channel [17:08] under_: softdrink: yes, content sensitive of course [17:08] desaiu: I'm going to run and get some food, thank you for the responses so far. see you guys later today [17:08] under_: if i was just shovelling bytes there are many options [17:08] softdrink: hmmm [17:09] broofa has joined the channel [17:09] softdrink: are you running the content against a regex or something, or...? [17:10] under_: i need the flexibility of easily using a relatively full programming language to operate on the http [17:10] softdrink: fair enough [17:10] softdrink: what's node not doing right? [17:10] under_: anyway, on mjr_ 's suggestion im off to look for mailing list discussions on topic, im told therewere some [17:11] under_: its not giving me access to the bytes sent bythe client [17:11] softdrink: i came in part way hehe [17:11] under_: you get handed a canonicalized list of http headers that -will- be significantly different than what the client sent [17:12] Wizek: can a switch be within another? [17:12] softdrink: could you do something with request.connection? [17:12] spetrea has joined the channel [17:12] zentoooo has joined the channel [17:13] softdrink: it's a net.Stream instance [17:13] under_: softdrink, maybe. thats another avenue ive been looking into [17:13] under_: seems like a lot of work tho [17:13] Wizek: you know, the switch (bar) {case 'xy':foo();break;} stuff [17:13] softdrink: well if you have any luck, i'd be curious about your solution :) [17:14] under_: but i guss i could hook events to sniff data moving through stream, and desrialize it based on other events that httpserver sends me [17:14] under_: but so far has made my head hurt to think about it [17:14] c4milo1 has joined the channel [17:14] softdrink: hehe [17:14] softdrink: but "async everything" is fun :) [17:15] under_: i keep telling myself that [17:15] under_: have implemented async http stack in python on top of asyncore, and dabbled in twisted. neither was much fun [17:15] under_: i am hoping node is more so :) [17:16] softdrink: depends on what you like i suppose. i live mostly in browser-land and i guess i'm just used to it [17:17] softdrink: in general though, since playing with node, writing blocking code makes me nervous hehe [17:17] tapwater has joined the channel [17:17] confoocious has joined the channel [17:17] confoocious has joined the channel [17:23] stepheneb has joined the channel [17:24] espadrine_ has joined the channel [17:25] tjholowaychuk: in 0.3.x do you have to require('console') now? [17:26] tjholowaychuk: or is that module exposed [17:26] mape: tjholowaychuk: always work [17:27] tjholowaychuk: k fewf [17:27] mape: fck me? :( [17:27] mape: tjholowaychuk: It's the holidays! Be nice! ;) [17:27] tjholowaychuk: what? [17:27] tjholowaychuk: haha [17:30] tjholowaychuk: wow inspect() is quite the noodle [17:30] mape: utils? [17:30] tjholowaychuk: yeah [17:32] sudoer has joined the channel [17:34] herbySk has joined the channel [17:36] RevoOf has joined the channel [17:38] dnolen has joined the channel [17:38] sudoer has joined the channel [17:38] galaxywatcher has joined the channel [17:42] maushu has joined the channel [17:43] c4milo2 has joined the channel [17:45] hornairs: aanyone in here using jasmine for testing? [17:45] unomi has joined the channel [17:45] aurynn: woo, new node. [17:46] binarypie has joined the channel [17:47] jankoprowski has joined the channel [17:47] davidwalsh has joined the channel [17:47] ewdafa has joined the channel [17:51] herbySk74 has joined the channel [17:52] desaiu has joined the channel [17:54] RevoOf has left the channel [17:55] c4milo1 has joined the channel [17:58] jimt_ has joined the channel [17:59] c4milo1 has joined the channel [17:59] mape: Them new nodes are snassy [18:02] faust45 has joined the channel [18:05] jimt has joined the channel [18:05] derferman has joined the channel [18:05] cardona507 has joined the channel [18:09] softdrink: hornairs: i'm using jasmine, but totally client-side right now [18:10] softdrink: If anyone here is in Utah, I know of a place looking to hire someone for some sweet node.js action. [18:10] jimt_ has joined the channel [18:10] espadrine has joined the channel [18:11] richcollins has joined the channel [18:11] hornairs: softdrink do you run it in a browser? [18:12] hornairs: on v8 its stack traces are totally foobar'd if you ask me [18:12] hornairs: gives an internal stack instead of the stack in the code its testing [18:12] softdrink: yeah only in a browser currently [18:12] hornairs: firefox it makes a bit more sense [18:16] desaiu has joined the channel [18:17] under_: hornairs: i just started using node and admit the stack traces are pretty mystifying. haven't read up on it yet [18:17] jimt has joined the channel [18:18] mape: under_: Easy way out is just to never many any misstakes :) [18:18] under_: s/many/make - LOL [18:18] mape: % but yeah [18:19] mape: I guess making a lot of misstakes is as good [18:20] under_: -should- be good part of interpreted language [18:20] under_: mistake -> fix -> learn [18:20] under_: but good errors help [18:21] mape: Seems like the new gbg thingy might be neat [18:21] mape: Not sure how though [18:22] tjholowaychuk: mape: its pretty cool [18:22] tjholowaychuk: the backtrace output was kinda funky [18:22] mape: tjholowaychuk: As awesome as beer? [18:22] tjholowaychuk: not sure what he is going to do to clean that up [18:22] tjholowaychuk: haha [18:22] tjholowaychuk: you bet [18:22] under_: gbg? [18:22] mape: G�teborg? [18:22] tjholowaychuk: gdb [18:22] mape: Oh yeah.. trash [18:23] under_: link? [18:23] mape: http://www.goteborg.com/ [18:24] under_: i mean re: gdb and node [18:25] mape: under_: https://github.com/ry/node/tree/gdbjit [18:27] eric_f has joined the channel [18:27] shimondookdin_ has joined the channel [18:28] bingomanatee__ has joined the channel [18:34] softdrink: here, have some pixel fonts: http://www.pentacom.jp/soft/ex/font/museum.cgi?sort=fontname [18:34] mape: Them pixel fonts seem soo... [18:34] Joebob has joined the channel [18:36] mape: Useful [18:37] RevoOf has joined the channel [18:43] Me1000 has joined the channel [18:43] cnu has joined the channel [18:45] bitdrift has joined the channel [18:46] yrashk has joined the channel [18:47] yrashk has joined the channel [18:48] shripadk has joined the channel [18:48] softdrink: sidenote: ProFontX = programming font win [18:49] ryah: ACTION looks around [18:49] softdrink: ACTION hides [18:50] mape: ACTION throws things at ryah  [18:50] mape: ryah: So how will the garbage thingy turn out? [18:50] ryah: garbage thingy? [18:51] shripadk has left the channel [18:51] SubStack: ACTION decrements mape's reference counter [18:51] mape: https://github.com/ry/node/tree/gdbjit [18:51] ryah: mape: it looks good [18:51] ryah: mraleph is working on a x64 version [18:51] mape: ryah: Neat :) [18:52] ryah: also on the debugger front - i made my own client to V8's debugger [18:52] ryah: https://github.com/ry/node/blob/916f567d23c9e665f71c63df05734823b085fff4/doc/api/debugger.markdown [18:52] shaver: how much of a perf hit is it? [18:52] mape: SubStack: Them counters are well full already [18:52] shaver: wonder if it's worth just always having on [18:52] ryah: shaver: gdbjit - it's okay for debugging - you can't run it in production [18:53] shaver: alas [18:53] ryah: even for debugging it's pretty slow [18:53] hasenj has joined the channel [18:53] mraleph: mape: why you call it garbage thingy? [18:53] mape: mraleph: Because I thought it was an garbage thingy? [18:53] shaver: ryah: you mean the metadata generation at compile-time? [18:54] mape: My ignorance often leaks into things I say, since I usually say what I think [18:55] shaver: all I need now is something to recompile PHP into non-blocking node JS, and I can solve my application load issues [18:56] matjas has joined the channel [18:56] mape: mraleph: If you feel hurt you should listen to Merry Happy, or shutterbug for the party wibe [18:56] pyrotechnick: i can feel your heart beat [18:56] pyrotechnick: (she said to me) [18:56] mraleph: mape: rofl [18:56] pyrotechnick: sorry im making a media player in node, im in the singing mood ^w^ [18:57] pyrotechnick: what do nodes listen to as they node? [18:57] tjholowaychuk: pyrotechnick: haha that song is catchy [18:58] pyrotechnick: tjholowaychuk: what's your soundtrack of choice? [18:58] pyrotechnick: this is an important and often overlooked aspect of coding [18:58] pyrotechnick: especially in node since it's such a zen process [18:58] tjholowaychuk: I dont like lyrics when im coding, so usually just some kind of random noise [18:58] tjholowaychuk: haha [18:58] pyrotechnick: "2 solid hours of pink noise.mp3" [18:59] pyrotechnick: have you heard of binaural beats? [18:59] softdrink: i find that classical and trance make the best coding music. dunno why. [18:59] creationix has joined the channel [18:59] creationix: ryah: ping [18:59] pyrotechnick: apparently they induce certain bran-waves within the brain [18:59] pyrotechnick: softdrink++ [18:59] v8bot: pyrotechnick has given a beer to softdrink. softdrink now has 1 beers. [18:59] ryah: ACTION is listening to "Erlend Řye - The Black Keys Work" [18:59] SubStack: ACTION is skeptical of that [18:59] ryah: creationix: hi [18:59] googol has joined the channel [19:00] creationix: ryah: got a streaming json parser for you [19:00] softdrink: someone should change v8 bot so that when i get beers, "has" becomes "is". [19:00] ryah: creationix: oh that was fast :) [19:00] softdrink: hilarity will ensue [19:00] ryah: creationix: did you stay up all night? [19:00] pyrotechnick: SubStack: the brain is one of the most least understood instruments in this universe [19:00] shaver: creationix: wow, nice [19:00] creationix: ryah: no, only half the night [19:00] desaiu: node-wrapper? [19:00] pyrotechnick: SubStack: but it is healthy to be sceptical [19:00] mape: mraleph: it really is a good song, only heard it recently [19:00] desaiu: http://www.youtube.com/watch?v=h7X8Cp1FfqE&feature=related 3:13 [19:00] softdrink: current album that i can't get enough of: "Totems Flare" by Clark [19:01] creationix: ryah: https://github.com/creationix/jsonparse [19:01] desaiu: did he say node-wrapper? [19:01] pyrotechnick: derferman: you can link to specific times in videos on youtube [19:01] pyrotechnick: desaiu: you can link to specific times in videos on youtube [19:01] ryah: creationix: with integer states and everything [19:01] creationix: ryah: I'm benchmarking it now, though not sure what I would be able to do to speed it up if it's slow [19:01] desaiu: pyrotechnick: interesting, how? [19:01] SubStack: pyrotechnick: I don't see how a lack of understanding regarding the brain would support your positive claim of some effect related to binaural beats [19:01] creationix: ACTION misses dtrace for profiling [19:01] ryah: creationix: what's the results? [19:02] desaiu: ryah: i just watched your google tech talk [19:02] desaiu: if you are the same ryan [19:02] desaiu: ryah* [19:02] hornairs: ais there a way to enumerate all the functions defined on an object including those higher up in the prototype chain? [19:02] creationix: ryah: not sure yet, just going to take my large sample json file and parse it all at once with both JSON.parse and mine [19:02] pyrotechnick: desaiu: http://www.youtube.com/watch?v=h7X8Cp1FfqE&feature=related [19:02] pyrotechnick: fuck [19:02] creationix: I expect it to be a lot slower, but hopefully not too bad [19:02] pyrotechnick: desaiu: http://www.youtube.com/watch?v=h7X8Cp1FfqE&t=3m13s [19:02] pyrotechnick: http://youtubetime.com/# [19:03] ryah: creationix: are you calling JSON.parse in the parser? [19:03] hornairs: i miss method missing [19:03] pyrotechnick: but i expect everyone in here can fudge a URL [19:03] ryah: https://github.com/creationix/jsonparse/blob/master/jsonparse.js#L231 ? [19:03] pyrotechnick: hornairs: you can get it in javascript [19:03] creationix: ryah: just for strings and numbers [19:03] pyrotechnick: hornairs: google it. [19:03] ryah: creationix: oh [19:03] desaiu: pyrotechnick: so, er, node-wrapper? [19:03] pyrotechnick: desaiu: wats that [19:03] creationix: ryah: I could eval just the same if it's faster, but I prefer JSON.parse [19:03] desaiu: it's a javascript interpreter or something [19:03] ryah: creationix: n = 10 * n + (v - '0'.charCodeAt(0)) [19:04] desaiu: he breaks it out around the 5:50 mark [19:04] hornairs: what! [19:04] pyrotechnick: in that video? [19:04] mape: seems like JSON.*** is always an issue? [19:04] desaiu: yeah [19:04] pyrotechnick: will watch [19:04] desaiu: 6:00 is when you see it [19:04] shaver: creationix: you could find complete subobjects ({...} or [...]) in the source and deserialize those with JSON.parse [19:04] shaver: then put them in the graph [19:04] pyrotechnick: *hates australia* [19:04] pyrotechnick: hate you guys and your awesome conferences [19:04] ryah: shaver: nah, he should build up incrementally [19:04] creationix: shaver: it emits events for every complete subobject [19:05] creationix: you can ignore most the events [19:05] creationix: when the stack length is zero, you have a top-level object [19:05] desaiu: node-repl [19:05] shaver: ryah: well, this would be incremental, just on the increment of 'complete subobject' rather than 'complete property' [19:05] desaiu: think that's it [19:05] creationix: shaver: grab my code and run the test, you'll see what I mean [19:05] pyrotechnick: desaiu: right so it's jsdom [19:05] shaver: avoiding the multiple sets (and therefore shape transitions) is a big win for JSON.parse [19:06] shaver: creationix: yeah, I have Made A Note [19:06] hornairs: pyrotechnick thats neat, im kind of uneasy about the tostring business but it seems to work [19:06] hornairs: thanks [19:06] pyrotechnick: hornairs: we use it, very rarely, but we do [19:06] pyrotechnick: it's awesome for dsls [19:07] pyrotechnick: "I WANT TO SIT AROUND IN MY PANTS" [19:08] ryah: creationix: https://github.com/creationix/jsonparse/blob/master/jsonparse.js#L76 if you add charCodeAt() to Buffer you could operate on both [19:08] pyrotechnick: is that creationix [19:08] pyrotechnick: in this video [19:08] desaiu: where can a person fetch node-repl? [19:08] creationix: ryah: good idea [19:08] dguttman has joined the channel [19:09] pyrotechnick: desaiu: it comes with node [19:09] creationix: pyrotechnick: which video? [19:09] pyrotechnick: creationix: http://www.youtube.com/watch?v=h7X8Cp1FfqE&feature=related [19:09] pyrotechnick: maybe not, kinda look like you :p [19:09] pyrotechnick: nah its not [19:09] pyrotechnick: were you there? [19:09] creationix: looks like brian [19:09] creationix: from phonegap [19:09] ryah: creationix: slicing out strings can be done much better than making an array https://github.com/creationix/jsonparse/blob/master/jsonparse.js#L110 [19:09] creationix: I was there [19:10] ryah: creationix: just mark the offsets and use buffer.toString('ascii', begin, end) [19:10] creationix: ryah: yeah, I was thinking about that, but I wanted it correct first [19:10] creationix: that adds a bit of complexity [19:10] ryah: creationix: yeah, good idea [19:10] ryah: tests first, speed second :) [19:10] benburkert has joined the channel [19:11] ryah: but that will give a good speedup [19:11] ryah: pushing for each char will be slow [19:11] pyrotechnick: tests first, code second [19:11] creationix: so the benchmark came back fairly slow [19:11] creationix: JSON.parse took 162 [19:11] creationix: streaming parser took 4173 [19:11] ryah: creationix: what are you testing on? [19:11] creationix: for 1000 iterations through a 4k json file [19:11] creationix: in the repo [19:12] hornairs: is there a way to enumerate all the functions defined on an object including those higher up in the prototype chain? [19:12] ryah: creationix: o - i see [19:12] creationix: but only 40 times slower isn't that bad considering it's not optimized at all [19:12] ryah: creationix: you should download some twitter data [19:12] creationix: and pure js and calling callbacks for EVERY object created [19:12] ryah: creationix: "real life" json [19:12] creationix: yeah, I guess most json is string heavy huh? [19:13] ryah: creationix: yeah, what happens when you disable the callbacks [19:13] tjholowaychuk: creationix: ouch [19:13] ryah: creationix: building up the integers with your own arithmetic might help [19:13] ryah: creationix: it'll get jitted and stuff [19:13] ryah: (maybe) [19:13] ryah: but first string slicing [19:13] creationix: yeah, the call back didn't seem to make much difference. without: [19:14] creationix: JSON.parse took 158 [19:14] creationix: streaming parser took 4545 [19:14] creationix: yeah, string slicing will be the first optimization [19:14] pyrotechnick: aren't you comparing apples to oranges? [19:14] mraleph: shaver: ryah: you can run gdbjit in production. my measurements show that one takes hit only when gdb is attached. elf-object generation does not add much to code generation... maybe I should just talk to the guys behind gdb. they might have some advices. [19:14] creationix: pyrotechnick: sort of [19:14] creationix: but it needs to be fast or it's no good [19:14] pyrotechnick: like it makes sense to benchmark things that do the same thing [19:14] ryah: also, i notice you're doing a lot of function calls https://github.com/creationix/jsonparse/blob/master/jsonparse.js#L86 [19:14] pyrotechnick: but benchmarking two different features against eachother [19:15] creationix: function calls seem pretty cheap in my tests [19:15] ryah: what if you just set some var token = LEFT_BRACE [19:15] pyrotechnick: it's kind of a no-brainer the more complex one will be much slower [19:15] creationix: pyrotechnick: I knew it would be slower, I'm just using JSON.parse as my baseline [19:15] pyrotechnick: okay [19:15] pyrotechnick: its important to have numbers [19:15] pyrotechnick: but i wouldnt be too scared off by it being "too slow" [19:15] pyrotechnick: its a necessary feature in node [19:16] ryah: i don't think you need to have the tokenzier step [19:16] creationix: pyrotechnick: it's pretty cool though [19:16] pyrotechnick: regardless of how slow it is or will be once it's optimised [19:16] creationix: you just feed it buffers and it emits objects [19:16] creationix: ryah: I was thinking of merging the two objects [19:16] SamuraiJack__ has joined the channel [19:16] pyrotechnick: yeah ive been doing some evented xml stream stuff today, writing a jabber/xmpp server [19:16] pyrotechnick: loving it [19:17] pyrotechnick: id like to make xmpp but with json [19:17] pyrotechnick: so maybe i could use it creationix [19:17] ryah: creationix: also - it would be interesting to see what happens when the data comes in in multiple buffers [19:17] ryah: creationix: like how it works on the wire [19:17] creationix: pyrotechnick: the api isn't solid, but it should be hard to adjust your code to my final api if you want to start playing with it [19:17] ryah: you'll get, say, two 5kb buffers [19:17] ryah: json.parse will need to stringify both and concat [19:18] ryah: your parser can just operate on them directly [19:18] creationix: ryah: I tested that test case, and it worked fine, performance seems as expected [19:18] blueadept has joined the channel [19:18] creationix: right, the overhead of the for the json.parse route [19:19] dguttman has joined the channel [19:19] creationix: tjholowaychuk: ryah: do either of you have time to help out with test cases or good benchmarks to help gauge optimizations? [19:20] tjholowaychuk: creationix: nope sorry [19:20] ryah: creationix: i'll play around with it this weekend [19:20] desaiu: any ideas on where to get port.h, event.h, and kqueue in ubuntu? [19:20] creationix: tjholowaychuk: that's the one thing I miss from early connect days, you were awesome about writing tests :) [19:21] pyrotechnick: oi [19:21] pyrotechnick: cool it [19:21] tjholowaychuk: creationix: one thing I would try is possibly having the states defined in the constructor, since v8 can optimize the lookups [19:21] tjholowaychuk: instead of the closure like you have now [19:21] creationix: tjholowaychuk: really? does that make a difference [19:21] tjholowaychuk: creationix: yup [19:22] tjholowaychuk: creationix: for example new Point(x, y) will be faster than { x: x, y: y } [19:22] pyrotechnick: is that because it's templated in node? [19:22] pyrotechnick: i mean v8? [19:22] creationix: v8 has "hidden classes" [19:22] pyrotechnick: yeah [19:22] pyrotechnick: that's awesome [19:22] pyrotechnick: thanks [19:22] creationix: basically static structures created on the fly [19:22] pyrotechnick: yeah [19:23] pyrotechnick: i didnt know that though, i will see if it makes a difference in our game [19:23] pyrotechnick: we have methods run thousands of times per second [19:23] pyrotechnick: every second [19:23] tjholowaychuk: pyrotechnick: im sure it will help [19:23] tjholowaychuk: I forget the results I got but it was something like 30% gain vs { x, y} blah blah [19:23] pyrotechnick: wow [19:23] tjholowaychuk: [x,y] was really close [19:23] pyrotechnick: looks like my awesome names args api is getting a run for its money [19:27] pyrotechnick: ryah: do bound objects just randomly crash out in node sometimes? [19:27] pyrotechnick: our physics engine will just die randomly [19:27] pyrotechnick: im not convinced its a problem with bullet or the bindings [19:27] eric_f has joined the channel [19:28] pyrotechnick: you can run it 10 different times and it will die in 10 different stages [19:28] ryah: pyrotechnick: no [19:28] pyrotechnick: even though bullet is deterministic [19:28] pyrotechnick: meaning it will calculate the same things each time [19:28] pyrotechnick: hmm [19:29] pyrotechnick: if it's a scope/segfault thing with the bindings could it happen after a random time? [19:29] pyrotechnick: or would it always segfault on the same stacktrace? [19:30] pyrotechnick: its not even a segfault [19:30] pyrotechnick: maybe more information would help [19:30] pyrotechnick: node(583,0x7fff700deca0) malloc: *** error for object 0x125b02cc0: pointer being freed was not allocated [19:30] pyrotechnick: *** set a breakpoint in malloc_error_break to debug [19:30] pyrotechnick: Abort trap [19:30] pyrotechnick: it's completely random it appears [19:31] pyrotechnick: the more it tries to do the faster it happens [19:31] ryah: pyrotechnick: maybe some of your bound objects are being GCed [19:31] pyrotechnick: if i only have one physics object it takes hours (tried it overnight) if i have 1000 it takes only seconds [19:31] pyrotechnick: could the gc kick in after hours? [19:31] pyrotechnick: is that possible? [19:32] ryah: pyrotechnick: if you loose references to them [19:32] pyrotechnick: i really dont want to give up on native physics in node but unfortunately i feel my debugging / native skills just aren't up to the task [19:33] pyrotechnick: i'm considering exposing a socket in a pure c++ instance of the physics engine and "RPC"ing everything over that [19:34] ryah: not a terrible idea - if there's already a protocol [19:34] pyrotechnick: it's bullet physics [19:34] pyrotechnick: it's just a number crunching library [19:34] pyrotechnick: its not evented or async in anyway whatsoever [19:35] pyrotechnick: we're pretty much at an impasse with our project [19:35] pyrotechnick: we get native physics or we fail [19:35] pyrotechnick: it feels like i'm on the edge of the world sometimes [19:36] mjr_: pyrotechnick: have you tried node_g? [19:36] pyrotechnick: looking out into the abyss [19:36] pyrotechnick: yeah mjr_ [19:36] sivy has joined the channel [19:36] pyrotechnick: the stack-trace never leaves v8 i dunno like i said pretty much no idea when it comes to debugging; it's a problem [19:37] mjr_: But you are using some native code bits in there? [19:37] pyrotechnick: dunno what that is [19:37] pyrotechnick: i will tidy them up and update the repo this week, and just dump and leave it there, we'll have to rethink our strategy :( [19:38] mjr_: How long does it take to repro the crash? [19:38] ryah: pyrotechnick: you should invest some time in debugging :) [19:38] pyrotechnick: it strikes me as a memory consumption issue [19:38] pyrotechnick: i know ryah [19:38] pyrotechnick: im trying [19:38] pyrotechnick: mjr_: like i said [19:38] pyrotechnick: if i just add one body [19:38] pyrotechnick: it takes all night [19:38] pyrotechnick: if i add 1000 it takes seconds [19:38] mjr_: nice [19:38] pyrotechnick: it could be bullet doing something retarded [19:38] mjr_: well, you can also try guardmalloc [19:39] pyrotechnick: like if theres too many objects try to free some and that code is just broken i dunno [19:39] mjr_: If you have native code behaving badly, that's a good way to figure out where things went bad. [19:39] pyrotechnick: yeah [19:39] pyrotechnick: bullet is [19:39] pyrotechnick: its the only way but its not great [19:39] pyrotechnick: it sucks [19:39] mjr_: You know how to start with guardmalloc? [19:39] pyrotechnick: i hate the world sometimes, the world deserves a proper physics library [19:39] pyrotechnick: nah no idea, how about i tidy them up and come on later this week [19:39] ryah: pyrotechnick: where's your code? [19:40] pyrotechnick: ill push it [19:40] ryah: pyrotechnick: i'll scan it for anything obvious [19:40] pyrotechnick: iits fucking messy [19:40] mjr_: on OSX, there's a man page for libgmalloc [19:41] pyrotechnick: should be github.com/feisty/node-bullet [19:41] mjr_: basically: export DYLD_INSERT_LIBRARIES to /usr/∫lib/libgmalloc.dylib [19:41] ryah: is guardmalloc like electric fence? [19:41] mjr_: ryah: I can't remember how efence works [19:41] pydroid has joined the channel [19:41] pyrotechnick: so here im adding 500 bodies and it bombs out after about 5 iterations https://github.com/feisty/node-bullet/blob/master/test/master.coffee [19:41] mjr_: But guardmalloc makes every call to malloc live on its own protected page, so if you ever read/write past the boundary, the kernel will complain. [19:42] pyrotechnick: but if i change that to 1 it takes all night but still crashes with the same error eventually [19:42] ryah: crashes on memory problems - accessing uninitialized regions [19:42] pyrotechnick: i've done ~100 and counted the iterations and it bombs out at random times [19:42] pyrotechnick: which makes me think [19:42] pyrotechnick: it's like [19:42] mjr_: Of course, this makes your code run 1000X slower, but if you have a 1 second repro, you can probably find it in a few minutes of grinding. [19:42] pyrotechnick: some random error [19:42] pyrotechnick: maybe to do with random numbers, but bullet doesnt use any [19:43] pyrotechnick: mjr_: it can run over 1000 times a second [19:43] pyrotechnick: if u set that timeout to 0 it runs at 1000 Hz [19:43] pyrotechnick: and crashes almost instantly... [19:44] pyrotechnick: its related to the product of the rate and number of objects [19:44] pyrotechnick: but it's not a deterministic relationship [19:44] pyrotechnick: the same rate with the same number of objects crashes at different times [19:44] creationix: alright, got parser down to only 25 times slower... [19:44] pyrotechnick: which just makes me thinks its like a bug somewhere [19:44] creationix: now to try tj's suggestion [19:44] pyrotechnick: creationix: is that twice the speed now? [19:44] pyrotechnick: wasnt it 40 before? [19:45] creationix: well, 40 was bad math [19:45] pyrotechnick: right [19:45] jimt_ has joined the channel [19:45] pyrotechnick: creationix: lets swap projects [19:45] richcollins has joined the channel [19:45] pyrotechnick: ill make your streaming json parser faster [19:45] pyrotechnick: u fix my physics [19:45] pyrotechnick: deal? [19:45] tjholowaychuk: creationix: the fastest of course would be to just use int literals instead of any lookup [19:45] tjholowaychuk: maybe just do that, case 2: // { [19:45] tjholowaychuk: etc [19:45] mjr_: Do that guardmalloc thing. It's a super easy next step. Node shouldn't ever crash. [19:45] pyrotechnick: mjr_: okay please help [19:46] hornairs has joined the channel [19:46] pyrotechnick: even if its just a link [19:46] creationix: tjholowaychuk: I wish there were true constants [19:46] pyrotechnick: ryah: do you see anything retarded? [19:46] creationix: tjholowaychuk: I do use int literals for the character matches [19:48] desaiu: make test had an error [19:48] mjr_: pyrotechnick: DYLD_INSERT_LIBRARIES to /usr/lib/libgmalloc.dylib ; node yourprog.js [19:48] desaiu: http://pastebin.com/QGhQ3k92 [19:48] pyrotechnick: mjr_: `to` ? [19:48] pyrotechnick: set it? [19:48] mjr_: bah, paste error [19:48] mikeal has joined the channel [19:48] mjr_: are you on OSX? [19:48] pyrotechnick: cmon man [19:48] pyrotechnick: im not that dumb [19:48] pyrotechnick: course i am [19:49] mjr_: ok then [19:49] mjr_: gdb node_g [19:49] bingomanatee__: Has anyone made a mail parser in node? something that can take a raw mail block and chop it up into parts and headers? [19:49] mjr_: (gdb) set env DYLD_INSERT_LIBRARIES /usr/lib/libgmalloc.dylib [19:49] mjr_: (gdb) run yourprog.js [19:49] hunterloftis has joined the channel [19:50] pyrotechnick: sec [19:50] desaiu: what is node-waf? i try starting it and i get this error: http://pastebin.com/74HArgDj [19:50] ryah: pyrotechnick: link? [19:51] pyrotechnick: github.com/feisty/node-bullet [19:51] pyrotechnick: dont judge me [19:52] desaiu: installing libv8-dev doesn't solve the problem.. [19:53] ryah: pyrotechnick: https://github.com/feisty/node-bullet/blob/master/src/DiscreteDynamicsWorld.cc#L111 [19:53] pyrotechnick: mjr_: it's running. it's a bit slower. ill let you know when it crashes [19:53] ryah: pyrotechnick: you can't free with objects allocated with 'new' [19:53] pyrotechnick: do you think it's that? [19:53] pyrotechnick: FUCK [19:53] pyrotechnick: thats c [19:53] ryah: no, just saying [19:53] pyrotechnick: c as [19:54] pyrotechnick: right. i dont think that's being run though [19:54] pyrotechnick: but thanks [19:54] ryah: https://github.com/feisty/node-bullet/blob/master/src/DiscreteDynamicsWorld.cc#L59 <-- handle scope missing [19:54] ryah: https://github.com/feisty/node-bullet/blob/master/src/DiscreteDynamicsWorld.cc#L51 also [19:54] ryah: maybe not necessary - but i'd put it in anyway [19:55] pyrotechnick: okay it crashed eventually [19:55] pyrotechnick: GuardMalloc[node_g-862]: guard malloc zone failure: freeing a pointer we didn't allocate that was not claimed by any registered zone [19:55] pyrotechnick: GuardMalloc[node_g-862]: Explicitly trapping into debugger!!! [19:55] pyrotechnick: Program received signal SIGTRAP, Trace/breakpoint trap. [19:55] pyrotechnick: 0x0000000100b662e7 in guard_malloc_zone_failure () [19:56] ryah: pyrotechnick: open it in gdb and find out where that is [19:56] mjr_: yeah, you should have somewhat of a stack at that point [19:56] pyrotechnick: can you plz give me a command ;) [19:57] mjr_: (gdb) where [19:57] pyrotechnick: im on mac [19:57] mjr_: Did you run it under gdb already? [19:57] ryah: gdb --args your program [19:57] ryah: run [19:57] pyrotechnick: ill blog this so its not a waste of your times [19:57] pyrotechnick: im really appreciative [19:57] pyrotechnick: mjr_: https://gist.github.com/aaa4954eff2abb4c4889 [19:58] unomi has joined the channel [19:58] ryah: that's the free [19:58] pyrotechnick: ryah: ill do that if mjr_ doesnt want me to do anymore [19:58] pyrotechnick: okay [19:58] briahn10 has joined the channel [19:58] ryah: should be 'delete' [19:58] pyrotechnick: i wonder why theyre disposing my rigid body [19:58] pyrotechnick: fucking bullet [19:58] mjr_: wow, look at that beautiful stack [19:58] mjr_: totally non-mangled [19:59] pyrotechnick: thats how i roll? [19:59] pyrotechnick: why is that [19:59] mjr_: node_g, I guess [19:59] ryah: pyrotechnick: it's getting garbage collected [19:59] pyrotechnick: right so it's a scope thing [19:59] pyrotechnick: awesome. [19:59] pyrotechnick: makes me feel alot better [19:59] pyrotechnick: i thought it was bullet being a bitch [20:00] pyrotechnick: let me try what you suggested [20:00] Alex3000 has joined the channel [20:01] pyrotechnick: https://github.com/feisty/node-bullet/blob/master/src/DiscreteDynamicsWorld.cc#L59 [20:01] pyrotechnick: its just return Undefined();? [20:01] pyrotechnick: or scope.Close(Undefined()); [20:01] ryah: either is fine [20:01] pyrotechnick: ok [20:01] pyrotechnick: verbose [20:01] ryah: pyrotechnick: https://github.com/feisty/node-bullet/blob/master/src/DiscreteDynamicsWorld.cc#L111 [20:01] pyrotechnick: i like verbose [20:02] CrypticSwarm has joined the channel [20:02] meandi has joined the channel [20:02] pyrotechnick: the free? [20:02] pyrotechnick: delete? [20:02] ryah: should be delete [20:02] pyrotechnick: k [20:02] pyrotechnick: one more [20:02] tjholowaychuk: pyrotechnick: should pair new / delete, malloc / free [20:02] pyrotechnick: right [20:03] pyrotechnick: havent touched c++ for months buts its slowly coming back. thanks very much guys… [20:03] under_: c++ ftl every time [20:03] tjholowaychuk: ftl? [20:03] tjholowaychuk: i need to get on this lingo haha [20:03] under_: for the lose ;) [20:03] SubStack: faster than light? [20:03] pyrotechnick: for the lose [20:03] pyrotechnick: LO [20:03] pyrotechnick: LOL [20:04] tjholowaychuk: haha [20:04] SubStack: SET CONDITION ONE THROUGHOUT THE SHIP [20:04] pyrotechnick: > 3x10^8 [20:04] SubStack: Action stations! Action stations! [20:04] under_: faster than light, tho, thats some good battlestar right there substack [20:05] creationix: ok, so what's the fastest way to convert an array of char codes in json to a native string [20:05] SubStack: fastest? [20:05] pyrotechnick: :( same [20:05] creationix: well, a fast way [20:05] creationix: I'm using JSON.parse(new Buffer(array).toString()) [20:06] pyrotechnick: github.com/feisty/node-bullet [20:06] creationix: but I imagine that's pretty slow [20:06] pyrotechnick: https://github.com/feisty/node-bullet/blob/master/src/DiscreteDynamicsWorld.cc [20:06] SubStack: I would just array.map(String.fromCharCode) [20:07] SubStack: v8: [109,101,111,119].map(String.fromCharCode) [20:07] v8bot: SubStack: ["m [20:07] SubStack: o_O [20:07] frodenius: :D [20:07] SubStack: oh right, unicode bullshit [20:09] SubStack: ok what the hell [20:09] SubStack: v8: String.fromCharCode(109) [20:09] v8bot: SubStack: "m" [20:09] SubStack: v8: [109].map(String.fromCharCode) [20:09] v8bot: SubStack: ["m [20:09] pyrotechnick: lol [20:09] frodenius: it's because map gives more parameters than just the element [20:09] SubStack: v8: [109].map(function (x) { String.fromCharCode(x) }) [20:09] v8bot: SubStack: [undefined] [20:10] SubStack: ah [20:10] SubStack: stupid map [20:10] langworthy has joined the channel [20:10] frodenius: yeah, been bitten by that too often [20:11] frodenius: v8: String.fromCharCode.apply(this, [109,101,111,119]) [20:11] v8bot: frodenius: "meow" [20:11] creationix: well, also my input is JSON not raw string bytes [20:11] pkrumins: greetings mortals [20:11] creationix: full of quotes, escape codes and /uxxx sequences [20:11] under_: softdrink: still round? [20:12] XAristaX has joined the channel [20:12] softdrink: yeah [20:12] softdrink: sup [20:12] SubStack: oh neat [20:13] under_: so on that http header thing - i tried sniffing the underlying stream and synchronizing on events httpserver gives me, but i'm worried that pipelining clients could breakit [20:14] under_: want to take a look? http://pastie.org/1420192. apologize for the coffeescript, hopefully it makes sense to you [20:14] under_: and im curious why i don't get the 'end' event very often, even if i quit webbrowser that is acting as client [20:14] pyrotechnick: is there anything wrong with https://github.com/feisty/node-bullet/blob/master/src/DiscreteDynamicsWorld.cc#L102 [20:15] softdrink: which web browser? [20:15] under_: whatever one im using [20:16] under_: thats an aside - im more concerned that my basic approach is OK - sniffing underlying stream and synchronizing with 'request' event from http.Server [20:16] ryah: pyrotechnick: looks ok [20:16] pyrotechnick: im out of ideas [20:16] pyrotechnick: its only using two classes [20:16] pyrotechnick: maybe it is bullet [20:17] Hello71 has joined the channel [20:17] pyrotechnick: i dont know why it would be cleaning up rigid bodies [20:17] pyrotechnick: its not supposed to be [20:17] softdrink: i'm not aware of any weirdnesses there personally [20:17] pyrotechnick: can you find out what is cleaning up it [20:17] pyrotechnick: like wether its the GC or bullet itself [20:17] pyrotechnick: that way im closer to knowing the truth [20:18] under_: softdrink: my concern is that the 'data' event may give me the end of headers + beginning of request body -> i'm short circuting the parser sort of. or maybe i'm talking nonsense [20:19] softdrink: do you mean having headers and body content in the same chunk when that data event is being handled? [20:19] under_: yeah. seeems like its possible, tho hasn't happened in my brief testing [20:20] softdrink: i think it's possible… is that a problem? [20:20] under_: so then wheni get 'request' event, mylog might contain more than just the headers [20:20] under_: yeah [20:20] under_: means my approach is wrong :) [20:20] softdrink: that stream should just keep handing you raw data as it comes in [20:21] under_: yeah. i really need to find a wayto hook into parser [20:21] under_: maybe making my own fork of http.Server is way to go, but don't want to do that [20:22] herbySk has joined the channel [20:23] softdrink: i'm still not clear on what you're trying to do with the header [20:24] under_: i want the bytes sent by the client [20:25] creationix: tjholowaychuk: hmm [20:25] creationix: I replaced all the constants with number literals [20:25] under_: if client sent "Set-Cookie: blah=boo\r\nSet-Cookie: uuu=bbb\r\n" (as they often do) I don't want to get "set-cookie: uuu=bbb, blah=boo" (which node provides today) [20:25] creationix: and it's not any faster [20:26] creationix: I guess that's not the bottleneck [20:26] tjholowaychuk: creationix: definitely not your bottleneck [20:26] softdrink: under_: the body starts after the first blank line... [20:26] creationix: looks really leet though [20:26] tjholowaychuk: hahaha [20:26] creationix: all hex codes and no names [20:26] under_: softdrink: or, a server would send above. but you get idea [20:27] under_: softdrink: yeah, i could parse headers myself but that seems to defeat point somehow [20:27] under_: softdrink: but maybe it easy solution [20:27] softdrink: you'd really only be scanning for \r\n\r\n [20:27] softdrink: or \n\n [20:27] under_: yeah [20:27] under_: feels hacky but i'll use that while i contemplate alternatives [20:28] softdrink: seems like the cleanest way given the circumstances [20:28] under_: i still need to go find old discussions on topic [20:28] softdrink: i mean you'd be getting the raw data, and you'd know where the header ends and the body begins... [20:30] sivy has joined the channel [20:33] skampler: under_: https://github.com/ry/node/blob/master/lib/http.js#L238 [20:34] sth_: Is there a problem with the timeout event in the net lib? [20:34] under_: skampler: sure, great. same thing is in comments of every http stack trying to justify mangling what is sent by the client [20:34] skampler: under_: you could replace require('http').IncomingMessage.prototype._addHeaderLine with something else [20:34] sth_: After a while my app stops sending them [20:34] under_: skampler: nope. already canonicalized by then [20:34] skampler: ? [20:34] under_: skampler: read thecode [20:34] blaines has joined the channel [20:35] davidwalsh has joined the channel [20:35] under_: skampler: the left hand side has been lowercased already when _AddHeaderLine is called [20:35] tlrobinson has joined the channel [20:36] skampler: ok [20:36] under_: skampler: i need to hook in at line 37 - but its inside a closure and my javascript aint all that [20:36] datapimp has joined the channel [20:36] under_: skampler: any hints on if i can subclass / monkeypatch my way to happiness? [20:37] binarypie has joined the channel [20:37] jchris has joined the channel [20:37] jimt has joined the channel [20:38] pyrotechnick: can anyone see anything wrong with https://github.com/feisty/node-bullet/blob/master/src/DiscreteDynamicsWorld.cc? [20:40] tomhsx has joined the channel [20:41] under_: whoa! when did http start exporting 'parsers' ! hehe, thats just what i need. guess my fault for using .2.5 [20:41] pkrumins: parsers! [20:42] pkrumins: could be useful for finishing my node-browser [20:42] shaver: in *my* node? [20:42] shaver: (it's more likely than you think) [20:44] benburkert has joined the channel [20:46] pyrotechnick: ryah: one more look please https://github.com/feisty/node-bullet/blob/master/src/DiscreteDynamicsWorld.cc [20:46] tomhsx has joined the channel [20:48] creationix: ryah: yep, the JSON.parse(new Buffer(array).toString()) is the bottleneck for sure [20:48] creationix: when I disable it I get 10x speed increase [20:48] under_: yeehaw. https://github.com/ry/node/commit/0003c701bcb1d916073f8893ee4cbe698515158d [20:48] under_: guess im switching to using .3 [20:50] ryah: pyrotechnick: looks ok [20:50] ryah: creationix: that's good [20:50] creationix: now to find the best way to re-implement it faster... [20:51] creationix: I have a couple ideas... [20:51] ryah: creationix: buffer.toString('ascii', begin, end) [20:51] pyrotechnick: ryah: argh [20:51] creationix: ryah: well, that's not the problem [20:51] creationix: the problem is I have to intrepret JSON [20:51] creationix: though for most strings that's merely removing the quotes [20:51] pyrotechnick: ryah: you must be so good at multitasking by now [20:52] pyrotechnick: with all us noobs spamming you [20:52] daglees has joined the channel [20:52] ryah: yes, i have a very good window manager [20:53] creationix: ryah: btw, do you want this to support utf8 characters, or only ascii json inputs? [20:53] creationix: technically json supports utf8 [20:53] creationix: though JSON.stringify never outputs it [20:53] aurynn: ascii only. [20:54] creationix: I guess someone can convert their utf8 json string to an ascii string easily enough [20:54] creationix: just find the utf8 pairs and replace them with \uxxx entries [20:54] ryah: creationix: i think ascii only first [20:55] ryah: technically json shouldnt have high chars [20:55] ryah: afaik [20:55] creationix: that's what I have now, just wondering if I should plan for it [20:55] creationix: no, json allows and utf8 chars [20:55] creationix: it's just most people don't do that [20:55] creationix: they encode them [20:55] ryah: i think they need to be escaped? [20:55] shaver: JSON doesn't allow UTF-8 [20:55] creationix: nope, escaping is optional [20:56] creationix: from the diagram on json.org "Any UNICODE character except " or \ or control character" is allowed as a literal character [20:56] Eber has joined the channel [20:56] shaver: oh, maybe it's just in ES5 that it's not permitted [20:56] maushu has joined the channel [20:56] creationix: shaver: it's permitted in strings I think, even variable names too I think [20:57] shaver: sorry, I mean in JSON in ES5 [20:57] creationix: though I wouldn't recommend it, it puts v8 in slow mode for strings [20:57] kschzt has joined the channel [20:57] creationix: either way, I'll just assume ascii. If someone really wants to use the parser with raw unicode data, they will have to convert it first [20:58] creationix: s/convert/escape/ [20:58] webr3: feedback from open source dev's please.. http://webr3.org/blog/experiments/a-new-open-approach-to-business-for-2011/ [20:58] aurynn: creationix, I think I have a solid, stable build of postgres.js now :) [20:58] creationix: aurynn: nice [20:58] creationix: based on strtok? [20:58] creationix: or just modifications on mine? [20:59] shaver: nope, I'm just plain wrong [20:59] aurynn: Based on yours, entirely [20:59] creationix: aurynn: cool, that was my first real node module [20:59] aurynn: what's strtok? [20:59] creationix: strtok is awesomesause [20:59] creationix: https://github.com/pgriess/node-strtok [20:59] creationix: makes implementing protocols like this easy and fast [21:00] aurynn: Ah-hah. [21:00] aurynn: I did want to rip out the entire buffer implementation [21:00] creationix: I tried to implement msgpack on my own to be his strtok based one [21:00] creationix: it was a couple orders of magnatude slower [21:00] creationix: s/be/beat/ [21:00] shaver: JSON is UTF-8 on the wire, per the RFC, and any unicode character other than the control set (0x00 - 0x1f) are permitted in JSON to be decoded by ES5 impls [21:01] kschzt: in naming best of 2010, Node was born late 2009 right? [21:01] kschzt: :) [21:01] aurynn: creationix, looks like I'll be replacing the buffer stuff with that. :) [21:01] creationix: kschzt: yes, but 2010 was when it took off really [21:01] sechrist has joined the channel [21:01] creationix: aurynn: cool [21:01] kschzt: creationix, yeah of course [21:01] aurynn: creationix, and maybe restructuring around partial messages, but, I think only COPY needs partial messaging. [21:02] kschzt: Node + Socket.IO are on the top of my list to take off next year [21:02] tjholowaychuk: LearnBoost ftw! [21:02] kschzt: and Mongoose, yes :) [21:03] creationix: tjholowaychuk: yeah, I guess you fit in there better than sencha :P [21:03] tjholowaychuk: creationix: yeah lol [21:03] creationix: palm is pretty awesome too [21:03] tjholowaychuk: i got offered a job at palm a few years ago when i started jspec [21:03] tjholowaychuk: but [21:03] tjholowaychuk: me [21:03] tjholowaychuk: h [21:04] tjholowaychuk: it would be interesting in some ways, but at the same time I would rather work with a smaller team [21:05] benburkert has joined the channel [21:06] kschzt: Node + Socket.IO + Mongoose + 'some pubsub' [21:06] creationix: ryah: you were right about emitToken being expensive too [21:07] creationix: if I call onToken directly it's super fast [21:07] kschzt: personally for pubsub I'd either use AMQP or XMPP, definitely not Redis, for Redis pubsub is an afterthought [21:07] creationix: I'm down to 1.8 times the cost of JSON.parse for values without strings of numbers [21:07] pekim: qqqq [21:08] pkrumins: kschzt: don't forget dnode [21:09] ryah: creationix: go go go [21:10] creationix: ryah: I doubt it will get much faster than that, but that's good enough for me [21:10] creationix: in the streaming case it might be faster overall [21:10] kschzt: pkrumins, socket.io [21:10] tjholowaychuk: creationix: json kinda sucks in that sense, unless you can safely assume / operate on props in that fashion [21:11] tjholowaychuk: which is valid [21:11] SubStack: ACTION likes to emit functions [21:11] tjholowaychuk: but a lot of cases are the opposite I guess [21:11] SubStack: or objects with functions embedded in them [21:11] creationix: tjholowaychuk: what do you mean? [21:11] briahn10 has joined the channel [21:11] kschzt: pkrumins, dnode runs on socket.io [21:13] blaines has joined the channel [21:14] SubStack: I don't see the appeal of pubsub actually [21:14] pkrumins: i dont even know what that is [21:14] pkrumins: kschzt: why are you telling me this? [21:14] kschzt: no reason. I'll stop. [21:15] SubStack: as far as I can tell pubsub is like event emitters with a flat routing scheme [21:17] SubStack: not sure what xmpp is all about either [21:18] kschzt: why not? [21:18] blaines_ has joined the channel [21:19] jakehow has joined the channel [21:19] sechrist: Do browsers throw warnings if you load a http iframe inside https? [21:19] pkrumins: SubStack: our first stackvm implementation used xmpp ;) right after haskell [21:19] pkrumins: SubStack: it's bullshit [21:20] kschzt: xmpp isn't bad [21:20] sechrist: I really like rabbitmq [21:20] kschzt: sechrist, word, thank you [21:20] sechrist: redis is fine for it, if you don't have a lot of reliability requirements [21:21] stagas: at LAST! come play mmo soccer http://swos.stagas.com [21:21] sechrist: and need cool routing [21:21] pHcF: http://www.youtube.com/watch?v=jGN4oyddT0U :D [21:21] kschzt: AMQP is really awesome for message passing :) [21:21] kschzt: 0mq I haven't tried [21:21] sechrist: err I meant to say that rabbitmq has really nice routing with it's exchanges and stuff [21:21] SubStack: ACTION just uses dnode for everything [21:22] sechrist: fanouts, etc [21:22] SubStack: nested callbacks ftw [21:22] sechrist: implement dnode and python [21:22] stagas: well it needs a little work :) [21:22] sechrist: heh [21:22] kschzt: RabbitMQ hasn't lost a single message, ever, for me [21:22] sechrist: celery + rabbitmq is really cool [21:22] sechrist: but it's not callback oriented [21:23] SubStack: sechrist: problem is I don't have any python components that I would need it for [21:23] pkrumins: python sucks [21:23] pkrumins: dont use it [21:23] sechrist: SubStack: also there's a fatal flaw with how you're using dnode i'm assuming [21:23] kschzt: :-) [21:24] sechrist: you have no fault tolerance right? [21:24] ben_alman has joined the channel [21:24] pkrumins: there is no flaw in dnode [21:24] pyrotechnick: ryah: tjholowaychuk: i found my problem [21:24] sechrist: sure there is [21:24] SubStack: if there are flaws they don't surface in production [21:24] pkrumins: dnode for everything. [21:24] sechrist: I can issue a command to celery that will execute on a worker, any worker, that is listening on an AMQP exchange [21:24] sechrist: so I don't need to know the worker's IP in advance [21:25] sechrist: which is helpful in a cloud [21:25] ben_alman: what's a good recommendation for a "starting point" in node.js investigating writing a blog with content stored in git and served via node? [21:25] sechrist: since workers can crash and all of that fun stuff [21:25] sechrist: but I'm guessing the way dnode is used is fundamentally different than a distributed task queue [21:25] pkrumins: ben_alman: vim blog.js [21:25] pkrumins: best way to start out [21:26] ben_alman: i don't use vim [21:26] ben_alman: (not yet) [21:26] sechrist: emacs ftw [21:26] SubStack: sechrist: you can build whatever you want on top of it [21:26] SubStack: also it's symmetric so both sides of the connection can have methods [21:26] ben_alman: does blog.js have a url? [21:26] sechrist: dnode-amqp [21:26] ben_alman: i'm not quite "getting right to it" in google [21:27] ben_alman: https://github.com/furtivefelon/blog.js [21:27] ben_alman: ok find it, i think [21:27] ben_alman: found too [21:27] kschzt: substack, pkrumins, why are you guys pushing dnode so much? [21:27] herbySk has joined the channel [21:27] sechrist: they made it [21:27] kschzt: oh. [21:27] sechrist: and it is a really awesome project [21:27] SubStack: also it's the bestest thing ever [21:27] sechrist: it's just not real world stuff yet [21:27] pkrumins: agreed [21:28] kschzt: k [21:28] pkrumins: i mean agreed to SubStack of course [21:28] kschzt: imho that's not how to do RPC [21:28] kschzt: and we've done it another way [21:28] ben_alman: thanks pkrumins [21:28] sechrist: I really like celery's design [21:29] SubStack: kschzt: yes because so many RPC systems suck [21:29] pkrumins: kschzt: what are you talking about. [21:29] pkrumins: i will cut you! [21:29] SubStack: ACTION restrains pkrumins [21:29] sechrist: http://ask.github.com/celery/images/celery-broker-worker-nodes.jpg [21:29] pkrumins: ah, ok [21:29] kschzt: i want message passing between equal nodes [21:29] SubStack: kschzt: it's symmetric [21:30] pkrumins: yeah, you can already do that kschzt. [21:30] sechrist: symmetrically flawed [21:30] under_: fight! fight! dnode vs world, emacs vs vim! [21:30] under_: ruby vs node! [21:30] under_: lol [21:30] pyrotechnick: node will fuck rubys shit up. [21:30] pyrotechnick: node is all up in rubys grill like. [21:31] evanmeagher has joined the channel [21:31] vborja has joined the channel [21:31] kschzt: this is not the time to talk about this; it's the time to wish everyone a wonderfully happy New Year :) [21:31] under_: i give ruby and python credit for screwing up threads enough to give async methodology wide exposure:) [21:32] sechrist: there's no way to avoid a GIL without an event loop [21:32] under_: and... happy new year [21:32] pyrotechnick: it's 7:30 here [21:32] SubStack: threads are bound to suck without careful purity constraints [21:32] pyrotechnick: 2011 FTW [21:33] sechrist: argh shit I forgot I need to go up to SF today [21:33] pyrotechnick: sechrist: from? [21:33] sechrist: mv [21:33] shaver: sechrist: that's not true, you can have finer-grained locking [21:34] pyrotechnick: what's MV? [21:34] shaver: mountain view [21:34] pyrotechnick: i'm australian... [21:34] pyrotechnick: oh cool [21:34] pyrotechnick: apple and shit? [21:34] shaver: it has its moments [21:34] sechrist: more like google and shit [21:34] shaver: apple's in cupertino [21:34] pyrotechnick: google [21:34] shaver: google, bunch of startups, mozilla [21:34] pyrotechnick: thats so hot [21:34] pyrotechnick: id totally be in awe [21:35] pyrotechnick: it would feel like wonderland to us [21:35] pyrotechnick: to be there [21:35] shaver: ACTION pours one to the curb for SGI [21:35] Alex3000 has joined the channel [21:35] pyrotechnick: lol [21:35] sechrist: wait [21:35] mjr_: oh man, SGI [21:35] sechrist: anybody in here know if valley fair is packed today? [21:35] pyrotechnick: what happened to them? [21:35] shaver: sechrist: of course it is [21:35] sechrist: fuck [21:35] mjr_: sechrist: are you going to some NYE party in SF tonight? [21:35] sechrist: probably [21:36] shaver: what do you need from valley fair? [21:36] mjr_: one of these days, we'll be in the same place at the same time [21:36] sechrist: apple store [21:36] sechrist: and I hate parking on university in palo alto [21:36] mjr_: I think we should declare pquerna's party the official node NYE party in SF. [21:37] sechrist: woah where is that [21:37] sechrist: I was originally headed to the missions [21:37] sechrist: but a node party interests me [21:38] kschzt: having looked at it earlier, I think dnode is awesome for a lot of people; once you have to scale out, you won't be able to [21:38] kschzt: (i'll stfu now) [21:38] shaver: node-erlang [21:38] sechrist: dnode could be built upon amqp [21:38] ben_alman: hmmn.. with blog.js if i do git submodule update i get errors [21:38] sechrist: but the model would change [21:39] kschzt: sechrist, yeah, that would work [21:39] mjr_: sechrist: pm me your email [21:42] kschzt: node-webworker can also help [21:43] shaver: hmm [21:44] vborja_ has joined the channel [21:44] shaver: when my wife falls asleep at 9pm, maybe I'll come to the city [21:44] sechrist: anybody know where to get 1920s attire? [21:45] creationix: hmm, it seems JSON.stringify no longer escapes unicode in latest v8 [21:45] creationix: I guess that's a good thing [21:45] derferman has joined the channel [21:45] creationix: just means I'm more likely to have unicode data coming into my parser [21:46] creationix: js> JSON.stringify("Λάμβδα") [21:46] gbot2: creationix: "\"Λάμβδα\"" [21:46] creationix: v8bot: JSON.stringify("Λάμβδα") [21:46] v8bot: creationix: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [21:48] ben_alman: ok is there anything past blog.js that deals with things like markdown processing, syntax highlighting and interfacing with git or github? [21:48] ben_alman: this is a little basic [21:48] ben_alman: good, but basic [21:48] creationix: ben_alman: have you seen my wheat library [21:48] ben_alman: hmmn [21:48] ben_alman: that rings a bell [21:48] creationix: it's not super polished, but has a few features [21:48] creationix: hwotonode.org [21:48] creationix: *howtonode.or [21:48] creationix: *org [21:48] tjholowaychuk: ben_alman: blogs are so boring, just grab tumblr or something [21:49] ben_alman: i don't want a blog [21:49] creationix: though, fair warning, wheat is ugly code [21:49] ben_alman: i just want to understand how the parts go together [21:49] tjholowaychuk: oh [21:49] ben_alman: i saw a pretty sexy site recently [21:49] shaver: twss [21:49] ben_alman: http://timeless.judofyr.net/timeless [21:49] ben_alman: and it got me thinking [21:49] ben_alman: but i'm not a back-end guy, nor do i know ruby.. but i do know js [21:50] creationix: ben_alman: if you want to learn for yourself, I'd use express and use the wheat code as a "guide" and build from scratch [21:50] ben_alman: what is express? [21:50] creationix: express is tjholowaychuk's web framework [21:50] ben_alman: wait,s it that th routing thing? [21:51] ben_alman: right, ok i remember seeing this [21:51] creationix: or if express is too high level, try connect or my stack [21:51] ben_alman: i spend all my time in the browser, so node really intrigues me [21:51] pyrotechnick: would anyone be interested in a drupal/joomla on node.js? [21:51] pyrotechnick: or a zend framework? [21:52] herbySk has joined the channel [21:52] pyrotechnick: we're thinking about putting a couple of devs on it? [21:52] tjholowaychuk: we could do far better than all of those [21:52] webben: tjholowaychuk: I should hope so ;) [21:52] pyrotechnick: we're trying to gauge the demand [21:53] tjholowaychuk: wont be much demand in here, since we all build our own stuff lol but I imagine for typical devs out there using those tools [21:53] creationix: pyrotechnick: maybe a wordpress [21:53] tjholowaychuk: I would think they would like it [21:53] stagas: there should be less racing conditions with the ball now http://swos.stagas.com [21:53] webben: I think a series of separate components that can be used with Node would be better than some massive crufty framework [21:55] ben_alman: creationix: it's lsightly unclear to me. once i make install (etc) express, do i need to be inside the express clone? or can i just create a new folder wherever and start hacking? [21:55] creationix: I'd use npm and not make install [21:55] creationix: but I think either way it just installs express as a module you require [21:55] ben_alman: oh, ok [21:55] creationix: there should be good docs on the site [21:56] ben_alman: i'm in the docs [21:56] ben_alman: i'm just so new to node i guess i didn't know i was installing a new module [21:56] pkrumins: anyone got long hair? [21:56] creationix: oh, and tjholowaychuk is the author, I've never actually used express [21:56] ben_alman: lol ok [21:56] tjholowaychuk: ben_alman: you will have an "express" executable [21:56] tjholowaychuk: if you want to generate a basic app structure for you [21:56] tjholowaychuk: use $ express --help [21:56] ben_alman: oh, interesting [21:56] ben_alman: i've never used anything like this before at all [21:56] sechrist: is there a simple way to build libraries and scripts into a single bin? [21:57] sechrist: alone with node [21:57] ben_alman: i'm a js dev [21:57] ben_alman: well, client-side :P [21:57] ben_alman: (so far) [21:57] MikhX has joined the channel [21:57] hornairs has joined the channel [22:00] possibilities has joined the channel [22:01] ben_alman: tjholowaychuk: i'm getting a 500 error because it can't find jade, even though i just added jade via npm and added the npm path to my PATH [22:01] ben_alman: i just installed npm via homebrew [22:02] tjholowaychuk: homebrew breaks it AFAIK [22:02] ben_alman: is there something else i might be missing, or a test i can run to see what i've left out? [22:02] ben_alman: christ [22:02] ben_alman: is nothing easy [22:02] tjholowaychuk: breaks npm I mean [22:02] ben_alman: hmmn [22:02] tjholowaychuk: but if you clone the express repo [22:03] tjholowaychuk: and do $ git submodule update --init [22:03] ben_alman: i got it [22:03] ben_alman: export NODE_PATH="/usr/local/lib/node" [22:03] tjholowaychuk: and node examples/jade/app.js it should run [22:04] ben_alman: so i installed via make [22:05] ben_alman: should i somehow undo that and install via npm? [22:05] tjholowaychuk: you can do make uninstall [22:06] ben_alman: ok, awesome, that works [22:09] sechrist: How are people doing real-world deployments of node apps with libraries? [22:09] sechrist: I feel uneasy about running npm on all of my clusters [22:09] sechrist: that, and there's forks and stuff that have modifications that aren't in npm [22:09] sechrist: so I'm assuming they should just be shipped with it, in a libs folder or something, and have the paths modified accordingly? [22:09] tjholowaychuk: sechrist: I use ndistro, at LB we use npm bundle [22:10] tjholowaychuk: everything localized [22:10] tjholowaychuk: global == will fail you [22:10] tjholowaychuk: before we were using git submods [22:10] tjholowaychuk: but they are so damn slow [22:11] sechrist: npm bundle.. I actually haven't used this yet [22:12] sechrist: do you have a local npm repo or something? [22:12] tjholowaychuk: nope npm is installed [22:13] tjholowaychuk: but we just dont rely on npm install commands [22:13] tjholowaychuk: I kinda prefer ndistro since you dont need npm installed [22:13] tjholowaychuk: nor node even [22:13] cagdas has joined the channel [22:14] beta_ has joined the channel [22:24] skm has joined the channel [22:30] davidc_ has joined the channel [22:31] jpld has joined the channel [22:34] jakehow has joined the channel [22:37] ben_alman: oof http://tjholowaychuk.com/ [22:37] ben_alman: damn tumblr [22:37] tjholowaychuk: ahahaha [22:37] tjholowaychuk: #fail [22:38] ben_alman: tjholowaychuk: have you done anything with caching an express app? [22:38] ben_alman: like via a reverse proxy or memcached? [22:39] tjholowaychuk: ben_alman: nothing in core no [22:39] ben_alman: how about, just personally [22:39] tjholowaychuk: but you can do that with middleware or via proxy etc. I havent yet nope [22:39] tjholowaychuk: havent really needed to [22:39] ben_alman: sure [22:39] ben_alman: ok [22:43] pHcF has joined the channel [22:46] tim_smart has joined the channel [22:47] hornairs has joined the channel [22:48] pyrotechnick: bingomanatee__: what are you working on? [22:48] bingomanatee__: Sorry - NDA of a stealth operation. [22:48] pyrotechnick: FUCK [22:49] pyrotechnick: we're not like that at feisty [22:49] pyrotechnick: we're all open [22:49] bingomanatee__: Basically, we sell women in one country to people in another country. [22:49] pyrotechnick: would you be interested in our opensource projects? [22:49] bingomanatee__: This project is not amenable to open source. [22:49] pyrotechnick: we're looking for watchers? [22:49] bingomanatee__: open sores, though... [22:50] creationix: ryah: ok, got strings and numbers implemented in the tokenizer [22:50] creationix: it averages about half the speed of JSON.parse [22:50] creationix: I'm going to go play with my kids now :) [22:51] ben_alman: recommendation: markdown-js or node-discount [22:51] tjholowaychuk: ben_alman: depends if you want to compile or not [22:51] tjholowaychuk: one is fast one is slow [22:51] tjholowaychuk: one is js one is c :p [22:51] ben_alman: so yours is faster and easier? [22:52] tjholowaychuk: not easier no, discount is the one that needs compiling [22:52] ben_alman: well i have homebrew [22:52] tjholowaychuk: misewell give it a shot, i typically support both in markdown related projects [22:52] ben_alman: col [22:53] tjholowaychuk: but in reality you probably dont usually parse tonnnns of markdown so the js one should be ine [22:53] tjholowaychuk: fine* [22:53] ceej has joined the channel [22:55] herbySk has joined the channel [23:04] ben_alman: it's awesome [23:05] stalled has joined the channel [23:05] ben_alman: pretty much everything you say or write, from what i can tell offers a choice with no recommendation [23:05] ben_alman: until just after i install the one that i think you're recommending [23:05] ben_alman: at which point you tell me to probably install the one i didn't install [23:06] tjholowaychuk: haha [23:06] tjholowaychuk: different needs have different solutions [23:11] espadrine_ has joined the channel [23:11] zorzar_ has joined the channel [23:16] ben_alman: so, like, the express guide uses terms like "partials" and has things in routes like ":id" .. i'm not really familiar with this stuff.. can you suggest a guide that can help me get up to speed? [23:24] jimt has joined the channel [23:27] maushu has joined the channel [23:29] timemachine3030_ has joined the channel [23:34] [[zz]] has joined the channel [23:35] MattJ has joined the channel [23:37] zemanel has joined the channel [23:37] dtrasbo has joined the channel [23:39] mikeal has joined the channel [23:40] possibilities has joined the channel [23:41] espadrine_ has joined the channel [23:50] JojoBoss: ben_alaman: ":id" is just a predefined regular expression to make it easy to make variables out of the uri. [23:50] ben_alman: i've been reading, thanks! [23:50] ben_alman: i'm getting it a little more [23:51] JojoBoss: k. didnt see anyone respond so I figured I would. [23:51] ben_alman: thanks :) [23:51] tjholowaychuk: ben_alman: sorry lol yeah the strings are converted into RegExps [23:52] tjholowaychuk: but you can use a literal RegExp as well [23:53] MattJ has joined the channel [23:54] JojoBoss: don't use the global option on the end of a regex though. it makes things weird. [23:54] JojoBoss: took me hours to realise a regex i had written was failing cause of the added "g" flag [23:55] tjholowaychuk: ahaha [23:55] tjholowaychuk: yeah [23:55] tjholowaychuk: that could do it [23:55] tjholowaychuk: you want /^ [23:55] tjholowaychuk: at the beginning always [23:56] jimt has joined the channel [23:58] JojoBoss: ohhh, and use https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/RegExp as reference if you're gonna make a custom regex. This coulda saved me a ton of time had I found it in the first hour vs the 5th.