[00:00] voodootikigod_ has joined the channel [00:00] jan____: quirkey: mmmmnice [00:00] jan____: quirkey: README is missing install isntructions [00:00] quirkey: doh! [00:00] quirkey: fixing [00:02] tjholowaychuk: jan___: http://github.com/visionmedia/kiwi [00:03] tjholowaychuk: sp many variations on package management you guys lol lets get one going that is actually going to be adopted [00:03] mikeal: i'm working on some npm stuff right now :) [00:04] tjholowaychuk: kiwi is pretty much finished [00:04] tjholowaychuk: just need a server [00:04] tjholowaychuk: or money for a server [00:04] tjholowaychuk: lol [00:05] quirkey: tjholowaychuk: this isnt really package management [00:05] quirkey: its more just installer plus bundler [00:05] quirkey: less of rubygems, closer to sprockets + bundler [00:05] quirkey: also more for browser js than common js [00:06] tjholowaychuk: ah i gotcha [00:06] tjholowaychuk: because kiwi has bundler like functionality too [00:08] dnolen has joined the channel [00:12] bpot has joined the channel [00:14] jashkenas: quirkey: what project is this? [00:14] Tim_Smart has joined the channel [00:14] quirkey: jashkenas: http://github.com/quirkey/jim, just pushed - inspired by jammit for sure [00:15] jashkenas: quirkey: take a look at juicer too. [00:15] quirkey: jashkenas: http://github.com/cjohansen/juicer ? [00:16] jashkenas: yep [00:17] quirkey: cool [00:17] BBB has joined the channel [00:17] quirkey: interesting [00:17] jashkenas: the main difference is that I prefer dependencies in one place -- assets.yml, so that you can know what's included on a page at a glance. [00:17] jashkenas: In Juicer, it's the sprinkle-requires-throughout-your-js style [00:18] jashkenas: Where it does dependency resolution, and you get what you need (whatever that ends up being) [00:18] jashkenas: Was there something about Jammit that was bugging you though? [00:18] binary42: ACTION is a jammit/virtualenv type mindset these days. [00:22] quirkey: jashkenas: no not bothering me, just slightly different desires 1 - I wanted to use easily outside of ruby projects, 2 - wanted to be able to install js libs in a central HOME dir [00:23] jashkenas: Sure -- two tips then -- The assets.yml file can handle absolute paths (or globs) to any directory (including centrally-located resources). And you can use the `jammit` command from whereever. [00:23] jashkenas: Some folks have been using it from Erlang projects, etc. [00:24] jashkenas: But that said, it's always nice to have more projects and more ideas, so it would be great to see jim go large. [00:24] quirkey: yup - same thing from sprockets, too, this is really just an idea to fix a pain point for my own workflow [00:24] quirkey: but thats every project, right? [00:24] quirkey: hehe [00:25] jashkenas: right [00:26] quirkey: jashkenas: thanks for jammit though, I've used it on a couple projects [00:26] quirkey: anyway, headed home - have a good weekend [00:26] jashkenas: no problem -- feel free to pilfer at will. [00:27] jashkenas: talk to you later. [00:38] cadorn has joined the channel [00:42] aho has joined the channel [00:46] jashkenas: hey #node -- I'm talking to Peter Seibel about that quarterly magazine you might have seen proposed yesterday. If you were submitting an article or essay to it, what flavor of markup would you prefer to use? [00:48] mrd`: SGML [00:49] jan____: markdown [00:50] jed has joined the channel [00:54] mikeal: markdown [00:55] cloudhead: markdown [00:55] jashkenas: thanks folks, much appreciated. [00:57] gwoo: markdown [01:11] mikeal: is there a central place for release notes [01:17] binary42 has joined the channel [01:19] _Pilate: github? [01:19] binary42 has joined the channel [01:30] binary42 has joined the channel [01:40] n8o has joined the channel [01:40] n8o: has anyone got node running on a shared host like dreamhost? [01:44] stepheneb has joined the channel [01:44] gwoo: n8o: you would need access to compile [01:44] gwoo: im not sure dream host allwos that [01:44] gwoo: and cloud servers are as cheap as dreamhost [01:44] n8o: really? i can't find one cheaper than $20/mo. any suggestions? [01:44] gwoo: so why not just sign up for one of them? [01:44] gwoo: i pay $11/month for rackspace [01:45] n8o: is that a special price? (going to check it out now) [01:45] gwoo: nope [01:45] n8o: could be exactly what I want then :P [01:45] gwoo: yup [01:45] gwoo: its not the fastest machine at that price but the upgrade is easyu [01:45] gwoo: when you are ready [01:46] n8o: think it's slow than my shared hosting on dreamhost? that'd could be hard, hehe [01:48] dnolen has joined the channel [01:55] dnolen has joined the channel [01:58] tmpvar has joined the channel [02:00] tmpvar: are events in the node world "messages"? [02:00] tmpvar: i seem to have confused myself hah [02:05] Tim_Smart has joined the channel [02:06] rtomayko has joined the channel [02:09] ryah: n8o: well, i work at joyent [02:10] ryah: n8o: so node runs there [02:10] n8o: so that's interesting too then [02:10] n8o: $16.5/mo is decent [02:11] RayMorgan_ has joined the channel [02:22] rtomayko has joined the channel [02:32] kriskowal has joined the channel [02:36] CIA-77: node: 03Rasmus Andersson 07master * r860fcf2 10/ test/mjsunit/test-tcp-tls.js : skipping TLS test if node was not compiled with TLS - http://bit.ly/boTsiy [02:41] rtomayko has joined the channel [02:42] JimBastard has joined the channel [02:44] stevestmartin has joined the channel [02:55] r11t has joined the channel [02:55] rtomayko has joined the channel [02:55] CIA-77: node: 03Ryan Dahl 07master * rfcda5e8 10/ test/mjsunit/test-keep-alive.js : If ab isn't installed skip keep-alive test - http://bit.ly/apNiwP [02:56] quirkey has joined the channel [03:02] bentomas has joined the channel [03:05] mynyml has joined the channel [03:07] bentomas has left the channel [03:20] RayMorgan has joined the channel [03:21] malkomalko has joined the channel [03:33] hassox has joined the channel [03:59] stephenlb: 00exit [04:00] rtomayko has joined the channel [04:21] malkomalko has joined the channel [04:39] abadr has joined the channel [04:41] mahemoff has joined the channel [04:46] RayMorgan_ has joined the channel [04:57] hassox: hullo guys [05:16] abadr: Is there anywhere that explains how the EventEmitter stuff works? I'm just copying my usage of it from another lib, but I'd like to understand it more. [05:17] abadr: Specifically, it's really strange to have to call events.EventEmitter and sys.inherits to use it [05:19] kennethkalmer has joined the channel [05:22] JimBastard: does anyone know a good tool for creating json schemas [05:23] JimBastard: based on http://json-schema.org/ [05:30] Micheil_away: ryah_Away: ping. [05:43] Qard has joined the channel [05:44] ako has joined the channel [05:45] scudco has joined the channel [05:49] Qard has joined the channel [05:51] gwoo has joined the channel [05:51] Qard: Hey, new to node here...anyone know if there is a way to pass variables into a file as it's required, so they are prepared and accessible from within that file as it's parsed and executed? [05:51] JimBastard: what are you trying to do Qard ? [05:52] Qard: like this.... require('./somefile', {parent:this}); [05:52] JimBastard: aahhh [05:52] JimBastard: you want to template [05:52] JimBastard: mustache [05:52] JimBastard: one sec [05:52] JimBastard: http://maraksquires.com/articles/2010/02/03/you-love-mustache-js-and-just-dont-know-it-yet/ [05:52] JimBastard: or maybe i misunderstand what you say [05:52] Qard: yeah, that's not quite it. [05:53] Qard: what I want is to load a new module with a few variables already set, so I don't have to load them in after. [05:53] JimBastard: ohh [05:53] JimBastard: drr [05:53] JimBastard: im not sure how the hot require stuff works [05:54] Qard: Basically I'm trying to make a loader that I do loader.helper() or loader.config() or loader.view() etc, and a reference to the loader is passed to the module that gets added with require. [05:55] Qard: That way I can use those loader functions inside any of those modules without needing to know the absolute path of the loader in comparison to that particular script. [05:57] Qard: I'm kind of used to lazy languages like PHP, where when you include a file it's more like injecting it in place--all the variables and such are still available. [05:57] Qard: and browser-based javascript, where basically everything is global... [06:00] steadicat has joined the channel [06:03] inimino: Qard: the way it works is that you require a module, and then you call functions (or constructors) in that module and pass any parameters you like [06:06] Qard: Is there no way to preload a module with some extra stuff prepended to it? I'd really like to be able to have my loader object always available from inside any module that has been loaded with the loader. [06:08] Qard: I tried this, but it didn't work, sadly. :( [06:08] Qard: i = {}; [06:08] Qard: i.o = this; [06:08] Qard: i += require('./core/'+type+'/'+name); [06:08] Qard: type is the resource type folder...like config, helper, control, lib, model, etc. [06:08] Qard: and name is the resource name. [06:13] cadorn has joined the channel [06:14] inimino: Qard: modules are isolated by design [06:14] inimino: Qard: you can export a function that takes whatever arguments you like and does whatever setup you like... [06:17] Qard: That seems somewhat less elegant to me, but I guess that's the way I'll have to do it. :( [06:18] Qard: It'd be nice to be able to optionally passing in an object of variables to auto-assign in require() like I showed above. That'd be pretty handy. [06:18] unomi: its just one call to your initializer [06:19] unomi: its how you 'should' be doing it, both in php and clientside [06:19] jspiros has joined the channel [06:21] Qard: Well basically every web development framework I've ever used has been built rather heavily around the concept of passing an array of data to other parts of the framework for ease of use. [06:21] unomi: and nothing is keeping you from doing that [06:21] unomi: through your initializer [06:21] unomi: inimino | Qard: you can export a function that takes whatever arguments you like and does whatever setup you like... [06:21] Qard: Not to mention it's sometimes unfeasable or even impossible to replicate data from elsewhere. [06:22] unomi: I don't know what you mean by that [06:23] Qard: Well for example, most MVC frameworks are designed with a view system where you do something like this; [06:23] Qard: view = view('somefile.html', {title:'page title', body:'this is the body'}); [06:23] dnolen has joined the channel [06:25] Qard: that particular example has some level of support through templating, but there is often controllers or other things that just get included and retain access to properties of the calling class. [06:25] unomi: perhaps you should have a look through existing node.js projects and see how they solve such problems. [06:27] unomi: but there is nothing stopping you from using basically the same syntax as the above [06:27] unomi: you just can't do it through the require call [06:27] unomi: so you would require, then call the function from the module you just required [06:29] Qard: Yeah, that's what I'm doing at the moment, but it's rather inelegant to have to add an initializer to hundreds of different modules just to make the core loader available. [06:29] Micheil_away: Qard / Jim: There's some talk on the commonjs mailing list of allowing that [06:31] unomi: presumably you could use eventlisteners [06:31] Qard: I hope it does. That'd be very nice for the framework I'm developing. :) [06:31] Micheil_away: Qard: it'd be good for a lot of things, eg, require("protocol", {as: "server"}); [06:32] Micheil_away: although, I could, in that case just do require("protocol/server"); [06:33] tmpvar: lol [06:33] Qard: I think that's the best way to do things. I'm a little torn on node's current implementation at the moment because, while it doesn't have the issue that browser-based js does of having everything in global space it's a little TOO isolated for me at the moment. [06:34] Micheil: Qard: or not, the proposal just got shot down [06:34] Qard: :( [06:34] unomi: I must admit, i still don't see it. at some point you must be consuming your module right? either via eventListeners or through a function, why does it matter if you define its context before that? [06:34] Qard: What was the argument against it? [06:34] unomi: well, browserbased js is very much moving away from that model [06:35] nsm has joined the channel [06:35] Qard: and thank god for that. ;) [06:35] Micheil: Qard: probably best to go with a class / instance based system [06:35] unomi: yui3 is sandboxed by default, which means you can have multiple libs and multiple yui3 instances for example [06:36] Micheil: var View = require("mylib/view"); View.create(args); [06:36] Micheil: View.create returns a new View instance [06:36] unomi: right [06:36] Qard: Haven't used YUI before...I have worked for a company crazy enough to use mootools and jquery at the same time though. >.> [06:37] Micheil: which also means you can have multiple views all using the one View library (less cpu/mem usage) [06:37] unomi: I am in the process of moving yui3 into a prototype / jquery environment, it could be alot more dramatic if it weren't so sandboxed [06:37] Micheil: Qard: both YUI and Dojo Toolkit I highly recommend [06:38] Qard: That's what I'm doing at the moment. I've just thinking that it shouldn't be necessary to do that across many different modules if all it's doing is function(args) { this += args }; [06:39] Micheil: ryah_Away: I'm thinking that for the custom eio bindings, I should create a new set of files, eg, eio_extensions.cc eio_extensions.h [06:39] Micheil: and put all the extensions in there, to keep the actual node code fairly simple [06:43] Micheil: then we could just do: eio__mkstemp(...); [06:43] Micheil: and it'd work [06:43] Micheil: eio__access() eio__realpath() [06:48] Micheil: or something [06:48] Micheil: just to get them out of the c bindings for the modules [06:53] mikeal has joined the channel [07:09] brandon_beacher has joined the channel [07:21] brandon_beacher_ has joined the channel [07:22] ryah_Away: Micheil: hey [07:22] ryah: Micheil: what about patching eio itself? [07:28] cmlenz has joined the channel [07:36] Micheil: ryah: I'm not sure [07:37] Micheil: ryah: a lot of this stuff is the first C++ I've ever done [07:38] Micheil: ryah: I'm looking at implementing fs.move, fs.remove/rmdir (recursive), fs.access fs.realpath [07:39] Micheil: (so far) [07:39] Micheil: ryah: a few of these are already implemented in v8cgi, which could be a useful place to look for various other filesystem methods] [07:41] Micheil: (sorry about the delayed reply, got called away) [07:43] Micheil: ryah: did you see: http://gist.github.com/309284 ? [07:44] Micheil: I did also do http://gist.github.com/308823 last night, but I'm now going to switch that to be realpath() [07:45] brapse has joined the channel [07:48] ryah: Micheil: rename is move [07:48] Micheil: okay [07:48] Micheil: although, rename doesn't remove the file afterwards [07:49] Micheil: wait. wrong.. sorry [07:50] Tim_Smart has joined the channel [07:51] Micheil: re move: http://code.google.com/p/v8cgi/source/browse/trunk/src/fs.cc#282 [07:51] Micheil: I think that's there as a callback [07:52] ryah: Micheil: i kind of think eio_mkstemp should be done as a patch to eio [07:52] Micheil: okay [07:52] ryah: we should ask marc if he'd accept it [07:52] Micheil: what about things like access() [07:52] Micheil: ? [07:52] Micheil: and realpath() [07:52] Micheil: (the idea on realpath() http://code.google.com/p/v8cgi/source/browse/trunk/src/path.cc#22 ) [07:53] ryah: what's wrong with stat()? [07:54] Micheil: is this: http://code.google.com/p/v8cgi/source/browse/trunk/src/fs.cc#331 [07:54] Micheil: *also [07:54] Micheil: realpath isn't given by stat() is it? [07:54] Micheil: and access looks possibly lighter? [07:55] Micheil: haha, 9 shows in a row where node.js has been mentioned as an interesting project to watch out for [07:57] Micheil: I actually had to look up access() in the gnu c reference, http://www.gnu.org/s/libc/manual/html_node/Testing-File-Access.html#Testing-File-Access [07:58] Micheil: so we could do various things to check if a file isWriteable() isReadable() isExecutable() [07:58] Micheil: as well as just checking if the file exists [08:00] mattly has joined the channel [08:05] ryah: Micheil: realpath we're doing in js atm [08:05] Micheil: we're not really doing it though [08:05] Micheil: that's the thing. [08:06] ryah: how so? [08:06] Micheil: I assume you're talking of path.normalize? [08:06] ryah: yeah [08:07] ryah: or whatever it's called, path.resolve [08:07] Micheil: hmm... somewhere I had information that realpath resolved symlinks [08:08] ryah: oh, that might be the case [08:08] Micheil: readlink does, but only if the last part is a symlink [08:08] Micheil: eg, ln -s /tmp /tmp2 [08:08] Micheil: readlink("/tmp2") => succes [08:08] Micheil: readlink("/tmp2/somefile") => succes [08:08] Micheil: rather [08:08] Micheil: readlink("/tmp2/somefile") => error [08:09] Micheil: iirc [08:09] Micheil: yeah.. the information on realpath comes from: http://code.google.com/p/v8cgi/source/browse/trunk/src/path.cc#17 [08:11] Micheil: canonicalize_file_name may be better [08:11] Micheil: "The canonicalize_file_name function returns the absolute name of the file named by name which contains no ., .. components nor any repeated path separators (/) or symlinks." [08:13] ryah: anyway, did you ask marc? [08:13] Micheil: not yet [08:14] Micheil: because while I can try and implement things, I don't really know exactly what I'm doing just yet [08:14] ryah: i can help you with the eio patch [08:14] Micheil: that's why I suggested going with a eio_extensions for now, then contributing that back [08:15] ryah: i think it's good to get marcs opinion on this. if he doesn't want it there, it's probably for a good reason [08:15] Micheil: okay [08:15] ryah: email the libev mailing list [08:15] Micheil: ask about implementing or patching libeio for realpath? [08:16] Micheil: or suggest the other few ones, like mkstemp and access? [08:17] Micheil: because I have mkstemp basically working (it's a little messy still) [08:17] ryah: For access he's going to say to use stat [08:17] ryah: but well, ask anyway :) [08:18] ryah: just say "hey, would you accept patches for eio_mkstemp, eio_access, eio_realpath, (whatever else)" [08:18] Micheil: I suppose I should subscribe to the list as well :P [08:19] ryah: yeah - libev's mailing list is great [08:19] Micheil: yeah, I was reading it for information on eio__custom [08:20] Micheil: which I think we should add a wrapper for in node [08:20] Micheil: somewhere [08:20] ryah: you can't execute javascript outside the v8 thread [08:20] Micheil: so that we can easily stub / extend things to it [08:20] Micheil: (node as in node's c++ api) [08:20] Micheil: or something [08:20] Micheil: so that other libraries that may require it can use it [08:21] ryah: oh - yeah - i don't know. then we're just going to be wrapping eio. i don't want to get into that battle [08:21] Micheil: okay [08:21] mattly has joined the channel [08:21] ryah: just let people use eio :) [08:21] ryah: i agree, it's not so pretty - but - not so many people look there [08:22] ryah: at some point i considered wrapping eio and libev - basically throw them in a node:: namespace - but i don't think it adds anything [08:23] Micheil: ryah: well, providing some lowlevel access to a event system, be it libev or libeio [08:23] Micheil: that way various people can write their libraries to use certain methods from those libraries [08:24] Micheil: eg, if you're doing some stuff that really does require an event loop and not a promise [08:24] Micheil: sort of a wrapper to ASYNC_CALL or something [08:24] Micheil: (I think that's currently a really nice api, process.fs.*(arguments, callback) ) [08:27] ryah: mm, i don't think people will really be using eio so much since we've already wrapped it all in js. they'll be using libev though. [08:27] ryah: gtg. ttyl. [08:27] Micheil: okay [08:37] Micheil: sent an email to the lsit [08:37] Micheil: list. [08:43] Qard: I have a rogue node instance that I can't figure out how to kill. >.> [08:46] Qard: Nevermind. I got it. [08:48] Qard: I had it running in the terminal through Geany, but I closed it, not thinking and it was nice enough to leave my process running in the background somewhere, and since it was running through sudo I couldn't kill it through the task manager. >.< [08:54] Tim_Smart: sudo killall apptopwn [09:07] RayMorgan_ has joined the channel [09:14] teemow has joined the channel [09:44] scudco has joined the channel [10:13] teemow has joined the channel [10:28] Micheil: it's quiet, too quiet. [10:35] brainproxy has joined the channel [10:40] Qard has left the channel [10:45] bpot has joined the channel [11:08] felixge has joined the channel [11:08] felixge has joined the channel [11:17] Tim_Smart has joined the channel [11:33] mahemoff has joined the channel [11:37] Spot_ has joined the channel [11:38] Spot_: I don't see a property on the http request object which holds the full url or the full host... where can I get access to this? [11:44] Spot_: If anyone has that info :) [11:46] Micheil: hello thar. [11:46] Micheil: one sec [11:48] Micheil: hmm.. I can't see one immediately.. [11:50] Micheil: have you tried doing an inspect() on the req object? [11:51] Spot_: yes [11:51] Spot_: it's not there [11:51] Spot_: all there is is 'url' which is missing the host [11:52] qFox has joined the channel [11:52] Micheil: yeah, true [11:52] Spot_: Thanks anyway [11:52] Micheil: I'd recommend emailing the mailing list and asking about it, maybe it's been left out by accident, or maybe it isn't meant to be their [11:53] Spot_: ok [11:53] Micheil: unless ryah_away happen's to be about right now? [11:54] Micheil: shit. howtonode crashed/ [12:25] Tim_Smart: oh dear [12:25] Tim_Smart: read my article :p [12:25] Micheil: where? [12:25] Tim_Smart: on howtonode haha [12:25] Tim_Smart: the one on monit and upstart or w/e [12:26] Micheil: what's wrong with it? [12:26] Micheil: apart from you being really vulnerable [12:26] Tim_Smart: o.O [12:26] Micheil: "If I heard two "Yes"'s, then you are in the some boat as me, and being in that boat feels really really vulnerable. Like the kind of vulnerable you would feel if you were trapped in a cage with lions. And here is why:" [12:26] Micheil: :P [12:27] Tim_Smart: :p Yeah well you said node crashed [12:28] Micheil: oh, no, it's something different [12:29] Micheil: my changes aren't being pulled in [12:29] Tim_Smart: ah. Thought so [12:29] Micheil: that's what I meant, not that the server was down [12:29] Tim_Smart: node is pretty good at staying alive [12:31] Micheil: hmm.. yeah, looks like I killed the git-hook reciever [12:31] Tim_Smart: hopefully large sites that use it don't run into as much issues as rails did. Like twitter and github etc. Much I guess that just boiled down to surprising amounts of traffic [12:32] Tim_Smart: previous.replace('Much ', '') [12:32] Micheil: there was something tim caswell mentioned to me, which was not to push too often other wise you cause the git hook to crash [12:32] Tim_Smart: so on githubs half? [12:33] Micheil: no, on our half I think [12:33] Tim_Smart: Hmm then maybe a slight system re-design is in order? [12:33] Tim_Smart: If I get time I'll send in some pull requests [12:34] Tim_Smart: but for now, I need sleep :) [12:34] Micheil: Tim_Smart: there'll be a full redesign soon [12:34] Tim_Smart: ah nice [12:34] Micheil: I'm writing a git library for node [12:34] Micheil: which will power the next version of the site [12:34] Tim_Smart: I guess it won't be as hard core as the pure ruby implementation guthub uses :p [12:35] malkomalko has joined the channel [12:35] Tim_Smart: doesn't go through the native git binaries at all [12:35] Micheil: umm.. [12:35] Micheil: well, I'm actually uses that version as a basis. [12:36] Micheil: and it does use the git binaries [12:36] Tim_Smart: ah nice [12:36] Tim_Smart: hmm ok, I read wrong somewhere then [12:36] Micheil: it has a few things done in pure ruby, but most stuff is via child processes / sh [12:36] Micheil: or Open3 [12:37] Tim_Smart: ah ok, looking forward to it [12:37] Tim_Smart: well, can't keep myself awake, and my laptop screen is going all blurry... Must sleep.. [12:38] Micheil: k [12:38] Micheil: night [12:54] happyelephant has joined the channel [13:11] charlenopires has joined the channel [13:24] brosner has joined the channel [13:24] brosner has left the channel [13:32] Connorhd has joined the channel [13:33] bryanl has joined the channel [13:36] cmlenz has joined the channel [13:40] stevestmartin has joined the channel [13:45] teemow has joined the channel [14:45] mynyml has joined the channel [14:46] unomi has joined the channel [14:56] Connorhd has joined the channel [14:59] alex-desktop has joined the channel [15:10] brosner has joined the channel [15:11] brosner has left the channel [15:15] brosner_ has joined the channel [15:15] drostie has joined the channel [15:40] bronson has joined the channel [15:48] kriszyp has joined the channel [15:49] eikke has joined the channel [15:52] micheil_mbp has joined the channel [16:04] felixge has joined the channel [16:04] felixge has joined the channel [16:12] bpot has joined the channel [16:16] jashkenas has joined the channel [16:41] jashkenas has joined the channel [16:44] happyelephant has joined the channel [16:46] dnolen has joined the channel [16:50] kriszyp_ has joined the channel [16:52] dnolen_ has joined the channel [17:14] mikeal has joined the channel [17:17] binary42 has joined the channel [17:21] cloudhead has joined the channel [17:23] dnolen_ has joined the channel [17:26] dnolen has joined the channel [17:31] bryanl has joined the channel [18:03] felixge has joined the channel [18:03] felixge has joined the channel [18:10] kennethkalmer has joined the channel [18:13] r11t has joined the channel [18:14] drostie has joined the channel [18:27] mahemoff has joined the channel [18:28] unomi has joined the channel [18:33] mikeal has joined the channel [18:42] kriszyp has joined the channel [18:50] richtaur has joined the channel [18:54] richtaur has left the channel [19:00] maritz has joined the channel [19:08] technoweenie has joined the channel [19:12] dnolen has joined the channel [19:17] bryanl has joined the channel [19:17] creationix has joined the channel [19:19] aho has joined the channel [19:22] mikeal has joined the channel [19:36] scudco has joined the channel [19:38] dnolen has joined the channel [19:40] dnolen has joined the channel [19:45] Zoka has joined the channel [19:48] Zoka: ryah_away: --debug-brk command line option is now fully functional [19:48] Zoka has left the channel [19:52] felixge has joined the channel [19:52] felixge has joined the channel [19:52] felixge: ryah_away: you about? [19:55] felixge: I guess not, who else is in here partying? [19:55] felixge: :) [19:59] jcrosby has joined the channel [20:04] voodootikigod_ has joined the channel [20:05] ryah_away: felixge: ping [20:06] ryah_away: felixge: how does your gc affect memory? [20:06] felixge: ryah_away: it reduces it :) [20:06] felixge: ryah_away: basically it just asks v8 to do its magic [20:06] ryah_away: how much? [20:08] felixge: ryah_away: if you call gc(true), it frees *everything* it can, which means node uses even less memory than it does right after startup [20:08] felixge: if you just call gc(), it reduces it a little bit, you need to call IdleNotification in a loop to make sure everything gets freed [20:08] felixge: ryah_away: I think the test is actually fairly nice [20:10] felixge: ryah_away: in my tests it takes 6-7 IdleNotifications to collect 100k loose objects from an array [20:10] felixge: not sure what approach v8 uses [20:11] felixge: but it seems to nicely chunk the work [20:16] maritz has joined the channel [20:18] felixge: ryah_away: what ya think? [20:18] mumrah has joined the channel [20:18] ryah_away: testing it [20:20] teemow has joined the channel [20:21] nrstott has joined the channel [20:22] mumrah: if i need to keep a very large hash table in memory with node.js, should i use an object+properties, or implement a more efficient data structure [20:23] felixge: mumrah: there is a tradeoff [20:23] mumrah: i guess my question is what type of optimizations for node.js and V8 do in regards to seek time in a large list [20:23] felixge: iteration is *much* faster via Array.filter [20:23] felixge: but lookup of individual keys is object territory [20:24] felixge: my approach for node-dirty (nosql store) is to keep all keys in an object, and all values in an array [20:24] felixge: to get the best of all worlds [20:24] mumrah: interesting [20:24] mumrah: so my use case is user sessions [20:24] ryah_away: felixge: i don't know. seems pretty expensive [20:24] ryah_away: felixge: i mean. what use would this have? [20:25] felixge: ryah_away: to reduce memory when you want to [20:25] felixge: ryah_away: like when your process is idle [20:25] felixge: ryah_away: rather than waiting for V8 to decide doing it during a peak [20:26] ryah_away: we could do something internally where we wait for idle time and try to do GC [20:26] ryah_away: like wait for 500 ms of idleness [20:26] felixge: ryah_away: I don't see the harm in exposing it [20:26] felixge: ryah: power to the people [20:26] ryah: i don't know about exposing this - it's just going to make people start calling it [20:27] ryah: i think v8 goes through a lot of effort to call GC when it's the right time [20:27] felixge: ryah: well, V8 has really lazy GC which I think is good in some cases, but I'd like to have control [20:27] mumrah: what is GC [20:27] felixge: rather than us deciding to be smarter than V8 and implementing our own heuristics [20:28] ryah: i think we can add some information by calling Garbage Collection when the process it idle [20:28] felixge: mumrah: Garbage Collection [20:28] mumrah: thanks [20:28] tmpvar has joined the channel [20:28] ryah: but i'm not sure about exposing this to users [20:28] felixge: ryah: I heard people asking for it in the mailing list numerous times [20:29] mumrah: so, worth it to implement complex data structures? [20:29] felixge: mumrah: probably not for user sessions, use an object [20:30] mumrah: how about spatial data [20:30] mumrah: i'm helping a friend design a simple 2d game [20:30] mumrah: and i would like to store the point data in a quadtree [20:30] tmpvar: mumrah, you are building it on node? [20:30] mumrah: yes [20:30] mumrah: or, at least i would like to [20:30] felixge: ryah: I think we should either explicitly not deal with GC, or let the user decide. I'm against node deciding what "idle" means [20:31] tmpvar: mumrah, nice, what graphics toolkit? [20:31] mumrah: dunno, that's my friends domain [20:31] felixge: mumrah: well, I'd use a combination of arrays and objects if you need to both iterate as well as do lookups [20:31] felixge: with sessions I think you pretty much just need lookups [20:31] tmpvar: mumrah, i think there was some sort of binding to ogl.. SDL would be nice because you can do sound and whatnot [20:31] ryah: felixge: but node can decide what 'idle' means - no callbacks are being called [20:32] mumrah: tmpvar: sounds sexy [20:32] ryah: felixge: or even better - no FDs are open [20:32] felixge: ryah: well, but some apps may rather be responsive any given time even if they were completely idle 10ms ago [20:32] binary42 has joined the channel [20:32] felixge: ryah: I just think we aren't smart enough to predict this [20:32] mumrah: has there been any work on async database libraries? [20:33] tmpvar: mumrah, from what i remember.. it does sound / input / 2d / platform windowing / ogl [20:33] mumrah: for things like couchdb or others where i/o is non blocking [20:33] felixge: ryah: I don't see V8's default behavior as a problem right now, so if you don't want to merge the patch I'm fine with that [20:33] creationix has joined the channel [20:33] ryah: i don't see it as much of a problem either - i'd like to be able to tune what it's threadhold is [20:34] RayMorgan has joined the channel [20:34] felixge: ryah: user defined? [20:35] ryah: maybe... [20:35] ryah: i think node is the only programming language where we can truly make decisions about idle notification [20:35] felixge: I don't see the harm in exposing IdleNotification, your argument is that people won't understand it - right? [20:35] ryah: we should probably utilize that [20:36] voodootikigod_: felixge: need pic [20:36] voodootikigod_: and the other pars of that email [20:36] felixge: voodootikigod_: Didn't get my email? Did the same day [20:36] voodootikigod_: didnt have pic wit it [20:36] felixge: hm [20:36] voodootikigod_: least not when it got to me [20:36] felixge: weird [20:36] voodootikigod_: try it again [20:36] voodootikigod_: gotta run [20:36] voodootikigod_: getting kicked out of the bar [20:36] ryah: my argument is that they're going to hurt themselves. i just threw a process.gc() into benchmark/http_simple.js - the results were terrible [20:37] ryah: voodootikigod_: wow. [20:37] ryah: voodootikigod_: from last night? [20:37] voodootikigod_: hahaha [20:37] voodootikigod_: no this morning [20:37] voodootikigod_: training [20:37] voodootikigod_: and you should be too [20:37] ryah: oh. mm. maybe even more impressive [20:38] voodootikigod_: my right bicep is epic [20:38] voodootikigod_: from the lift beer motion [20:38] voodootikigod_: out [20:38] felixge: ryah: well in that case I'd say lets not mess with v8's behavior for now [20:39] felixge: ryah: until somebody has a really good reason he needs to reduce the memory footprint before v8 does it naturally [20:39] felixge: IMHO people just are just imagining problems at this point [20:39] felixge: and I'd rather address actual issues than theoretical ones [20:40] ryah: felixge: i'm going to throw together a little patch - brb [20:40] felixge: ryah: kk [20:40] felixge: ryah: I just need excuses to improve my C++, that's why I tackled this one [20:43] Zoka has joined the channel [20:43] Zoka has left the channel [20:45] felixge: ryah: btw. I'm very happy to see promises gone. Breaks all node code out there, but man it's aweomse [20:45] felixge: :) [20:45] felixge: good move [20:45] Zoka has joined the channel [20:45] tmpvar: ^ agreed [20:54] brapse has joined the channel [21:00] gwoo has joined the channel [21:01] bryanl has joined the channel [21:16] ryah: well.. can't really get it working [21:17] binary42 has joined the channel [21:18] creationix_ has joined the channel [21:18] ryah: and god macintosh sucks [21:19] ryah: can i not display 3 terminals side by side? [21:19] ryah_away: bbl [21:21] alexiskander has joined the channel [21:37] mumrah: what version of ecmascript does node.js/v8 implement? [21:42] felixge: mumrah: 3 1/2 :) [21:43] felixge: mumrah: mostly Ecma3, with some Ecma5 [21:43] felixge: mumrah: http://wiki.github.com/ry/node/ecma-5mozilla-features-implemented-in-v8 [21:44] felixge: gn8 [21:48] mumrah: is there anything like map/filter for objects? [21:48] mumrah: besides iteration [21:53] maritz: only arrays, afaik [21:53] maritz: but using keys(object), iterations should be really easy. [21:57] mumrah: is keys(object) the same as "for x in object" [21:59] arlolra has joined the channel [22:04] gwoo has joined the channel [22:04] maritz: using it with an iteration would be, yes. (at least if i understand the ecma5 spec correct. and i haven't slept much in the last 2 weeks and fell asleep in class today multiple times.) [22:07] kriszyp has joined the channel [22:09] fyorl has joined the channel [22:11] fyorl: Hi, I can't seem to get node's example simple server code working. I can start the script running but any attempt to visit the address crashes the script with an error about ServerResponse not having a method 'write'. [22:12] fyorl: I've looked through the API and am fairly certain the http.ServerResponse object does contain a 'write' method. [22:15] Zoka: Have look at the latest doc at http://nodejs.org/api.html [22:16] fyorl: That's the one I was looking at. I can definitely see a response.write method listed. [22:18] fyorl: Just to clarify, I'm using the /exact/ same code as is listed on the node.js home page and receiving this error. [22:20] BBB has joined the channel [22:21] jashkenas has joined the channel [22:24] Zoka: fyorl: Did you do sudo make install? If not, a fresh build is still using http.js from/usr/local/lib/node/libraries/ [22:27] mumrah: anyone feel like clicking around a little demo i have? [22:27] mumrah: (need to test it with multiple users) [22:28] Zoka: mumrah: yes, why not [22:29] mumrah: http://75.101.158.36:8080/ [22:29] mumrah: move around with WASD [22:30] mumrah: do you see a yellow square moving around? [22:31] maritz: uhm... i see the yellow square [22:31] maritz: i think i was blue. however blue vanished after a few moves [22:31] maritz: oh, back again [22:32] mumrah: i see two yellow squares, one moving one stationary [22:32] mumrah: blue is you, yellow is other people [22:32] Zoka: I am blue [22:32] maritz: uhm... i was just teleported a few units :D [22:32] fyorl: Zoka: Updating to the newest version fixed it, thanks. [22:32] fyorl has left the channel [22:32] mumrah: excellent [22:33] maritz: whenever i move more than 10 blocks to the right, i vanish?! [22:33] mumrah: what browser? [22:33] maritz: and in the pre-pre-last i'm back. then teleport to first row in pre-last [22:33] maritz: opera 10.50beta [22:33] mumrah: i've only tested it in chrome, FF, and safari [22:33] mumrah: on ubuntu and mac os [22:34] mumrah: but, in general does it feel responsive [22:34] maritz: well, my movements are instant. moves of others mostly feel real, but sometimes they seem warped [22:34] mumrah: cool [22:34] mumrah: i'm using node.js on the backend [22:35] mumrah: with long polling [22:35] mumrah: for pushing other people's moves to you [22:35] maritz: what's the black block? [22:35] Zoka: Mostly responsive from Sydney [22:35] mumrah: black is just unpassable [22:35] maritz: oh, indeed [22:35] maritz: :) [22:36] mumrah: today i incorporated sessions with http://github.com/Miksago/node.js-sessions [22:36] mumrah: the session lib seems good so far [22:36] mumrah: though i'm not sure about the TTLs [22:36] jashkenas: how fast does it update? [22:36] mumrah: the sessions? [22:36] maritz: look at me, entering the black block! [22:36] mumrah: lol [22:36] maritz: uhm, wait [22:36] maritz: broken [22:36] maritz: :D [22:37] mumrah: (taking it down) [22:37] maritz: grrr [22:37] maritz: was just about to start cheating :( [22:37] mumrah: superb [22:37] maritz: xD [22:38] maritz: do you detect colisions on serverside too? [22:38] mumrah: one reason i looked to node.js was so it would be easy to have the game logic interprited on the server [22:38] mumrah: lol [22:38] mumrah: not yet [22:38] maritz: hehe [22:38] mumrah: i'm trying to work out basic state communication before i start on game logic [22:39] mumrah: my current roadblock is how to persist things on disk [22:39] maritz: redis :) [22:40] mumrah: yea, i've been reading about that [22:40] maritz: super easy, super fast, good community [22:40] mumrah: plus there's support in node, yes? [22:40] maritz: yes. [22:40] Zoka: Did you consider using WebSocket instead of long polling? [22:40] maritz: there's a module [22:41] mumrah: i haven't heard anything about WebSocket [22:41] mumrah: is that a new standard? [22:41] binary42: WebSockets are awesome but still pretty alpha. [22:41] maritz: using websockets just feels wrong to me. i don't care about ie6. but ie8 at least should be supported. and falling back to flash horrifies me. [22:41] binary42: No release browsers support it and the spec is likely to change the handshake. [22:41] mumrah: heh [22:41] Zoka: Google chrome supports it [22:41] maritz: (not that they would be awesome, if they were implemented sufficiently) [22:42] mumrah: well chrome is what i'm developing for [22:42] binary42: Zoka: Release or dev builds? [22:42] mumrah: but i will also want to support webkit [22:42] Zoka: Release [22:42] binary42: Zoka: I use websockets on one project right now but I wasn't aware that google pushed out already. [22:42] binary42: Either way, spec isn't very final yet so code will break. [22:42] mumrah: what's wrong with long polling? [22:42] Zoka: There is also Flash based emulation for older browsers [22:43] mumrah: isn't that how most browser based chat clients work [22:43] maritz: is there a good node/client module to use websockets if natively available and else fall back to long-polling [22:43] mumrah: long polling + erlang [22:43] binary42: mumrah: Not much actually. Keep with it unless you need to send lots of small things really quickly. [22:43] mumrah: likely, the connections won't last all that long [22:43] RayMorgan has joined the channel [22:44] binary42: mumrah: Yeah. If it's really just waiting on a single thing, long polling fits very well. [22:44] Zoka: WebSocket gives you persistent bidirectional connection, so there is no overhead in esyablishing connections [22:44] binary42: You may need to reset the connection if it's 60+ seconds though. [22:44] mumrah: yea, dont think that will be an issue [22:45] Zoka: Also, there are no http headers [22:45] binary42: Perfect. WebSockets would be overkill in this case (though if they were more standard it'd be just as easy... but the targeting headaches kill it here). [22:45] binary42: Zoka: That's actually a minus in some cases. [22:45] binary42: Zoka: You can't do any caching etc... you lose out on the whole HTTP stack. [22:46] mumrah: hmm, i think i will modify this to use the events library [22:47] Zoka: it can be combined - the interactive stuff goes through WebSocket, and eveything ekse throughhttp, In fact WebSocket connection is made by "upgrading" http [22:51] Zoka: The missing bit here is to have nginx module that will pass through websocket connection to node.js Wesocket module on some other port, and serve static stuff normally. [22:53] Zoka: Actually, you so not need websocket logic in node.js in this case, just TCP server, since nginx would handle websocket handshake [22:53] binary42: Zoka: Yeah. The handshake setup is very cool. I do tend to tell people to use both HTTP and an interactive channel too... but in simple cases HTTP alone is fine. [22:55] mumrah: anyone have experience with the events library? [22:56] mumrah: can't i create arbitary events? [22:56] mumrah: rather, can't i create arbitrary named listeners [22:56] mumrah: and later trigger them [22:58] mumrah: nm, figured it ou [22:58] mumrah: out * [23:16] maritz: :D [23:25] edspencer has joined the channel [23:32] r11t has joined the channel [23:40] creationix: Is there any ETA on when node v0.1.30 is going to be released yet? [23:43] creationix_ has joined the channel [23:50] brainproxy has joined the channel