[00:00] ryah: ascii codes basically [00:00] piscisaureus: yeah I saw that [00:00] dguttman_ has joined the channel [00:00] piscisaureus: how to detect ctrl+alt+F6 for example? [00:01] ryah: *shrug* :) [00:01] piscisaureus: ryah: I it is too much of a hassle, don't do it [00:01] ryah: piscisaureus: on my computer that exits xwindows :) [00:01] piscisaureus: ryah, but maybe it's just testing bitflags, something like that [00:01] piscisaureus: haha [00:01] piscisaureus: okay bad example [00:01] piscisaureus: ctrl+up then [00:02] killfill has joined the channel [00:03] ryah: im sure it's possible to get - not sure [00:04] piscisaureus: on my computer ctrl+alt+f6 is {char: undefined, keycode: 117, flags: 10 } [00:04] msekimura has joined the channel [00:04] ryah: echosystm: package names? [00:04] ryah: echosystm: i like "lower-case-names" [00:04] Athox has joined the channel [00:06] piscisaureus: ryah: btw what is the meta key? [00:06] piscisaureus: ryah: equals alt? [00:07] ryah: usually [00:07] piscisaureus: hmm, strange that pressing alt-f gives me char='f' seems wrong to me [00:08] piscisaureus: ryah: apparently, for anything but the enter, tab, backspace etc.. (usual suspecs) and ctrl+letter, linux sends an ansi code to stdin? [00:09] piscisaureus: ESC[102 == meta-f [00:11] ryah: piscisaureus: ok [00:11] sh1mmer has joined the channel [00:11] yozgrahame has joined the channel [00:11] ryah: piscisaureus: are we agreed on this api? [00:11] ryah: piscisaureus: i'll do the unix backend if so [00:11] piscisaureus: i am :-) [00:12] hij1nx has joined the channel [00:13] piscisaureus: I agree. If there's anything missing in the 'spec', add it. [00:13] ryah: piscisaureus: i'd lik to use strings instead of consts [00:13] ryah: for colors [00:13] BrianTheCoder has joined the channel [00:13] ryah: setColor("green") ? [00:13] piscisaureus: ryah: np [00:13] Chaosbit has left the channel [00:14] piscisaureus: ryah: will be implementing the most of it in js anyway [00:14] piscisaureus: ryah: oh, what I'm currently doing is define tty.ReadStream in tty.js [00:14] theloniousBot has joined the channel [00:15] piscisaureus: and in node.js (if st [00:15] piscisaureus: *reset* [00:15] ryah: ok [00:15] maushu: Tried to make a small async http server in C# similar to node.js... for some reason it doesn't work on mono. ;_; [00:15] Anti-X has joined the channel [00:15] maushu: This is why I hate these kind of platforms. [00:15] piscisaureus: in src node.js: [00:15] piscisaureus: if (stdio.isatty(fd)) { [00:15] piscisaureus: stdin = new tty.ReadStream(fd); [00:15] piscisaureus: } else {... [00:15] piscisaureus: you get it :-) [00:16] stepheneb has joined the channel [00:16] ryah: yes [00:16] ryah: for me it's going to derive from net.Stream [00:16] piscisaureus: ryah: oh, stdin.isTTY shouldn't be a function but a boolean [00:16] piscisaureus: ryah, for me too [00:16] ryah: but i thought you can't select on stdin [00:17] piscisaureus: for you it should wrap net.stream, for me it calls stdio.writeTTY [00:17] piscisaureus: ryah: stimmt [00:17] ryah: or are you going to do a pipe? [00:17] piscisaureus: ryah: no, a wait thread [00:17] piscisaureus: and ev_async_send [00:17] ryah: oh right... [00:17] ryah: piscisaureus: seems like you shouldn't derive from net.Stream [00:18] piscisaureus: ryah: why? [00:18] ryah: oh - that just gives ready notification [00:18] ryah: you still can read(0) [00:18] ryah: i see - nm [00:19] piscisaureus: ryah: oops. I shouldn't derive from net.stream [00:19] piscisaureus: ryah: you were right, I misread that for stream.Stream [00:19] ryah: node [00:19] ryah: er [00:19] ryah: nod [00:21] broofa has joined the channel [00:23] Sami_ZzZ has joined the channel [00:24] piscisaureus: ryah: would that by require('tty).setRawMode(true) or process.stding.setRawMode(true) [00:25] JusticeFries_ has joined the channel [00:26] piscisaureus: ryah: we also need stdout.pushCursor() and stdout.popCursor() [00:28] trigrou has joined the channel [00:28] jakehow has joined the channel [00:30] UHMA has joined the channel [00:30] ryah: let's just do require('tty).setRawMode(true) for now [00:30] ryah: pushCursor? [00:30] desaiu has joined the channel [00:31] CIA-121: node: 03Ryan Dahl 07master * r7c0f453 10/ test/simple/test-debugger-client.js : Add delay into test-debugger-client - http://bit.ly/hsClgF [00:31] desaiu has joined the channel [00:33] piscisaureus: ryah: pushCursor (saveCursor): store the current cursor position -- ESC[s on linux [00:33] piscisaureus: popCursor (restoreCursor?) -- ESC[u on linux [00:34] piscisaureus: make it saveCursorPosition/restoreCursorPosition to follow ansi naming more closely [00:34] c4milo1 has joined the channel [00:34] ryah: ok [00:34] sonnym has joined the channel [00:38] bbttxu has left the channel [00:39] dustinwhittle has joined the channel [00:41] sh1mmer has joined the channel [00:41] maushu: https://github.com/500 [00:43] piscisaureus: clicking octocat should make him drop into the river [00:43] joemccann has joined the channel [00:44] davidc_ has joined the channel [00:44] Lorentz: Try all the different error codes. [00:47] piscisaureus: most of 'em give 404 [00:47] piscisaureus: which is also nice btw [00:47] piscisaureus: ACTION back to work [00:49] kiddphunk has joined the channel [00:49] piscisaureus: ryah: what encoding does a linux tty normally use? [00:49] piscisaureus: utf8? [00:50] piscisaureus: e.g. if they write stdout.write(buffer), what encoding do you use in buffer so it looks good on a tty? [00:51] ryah: piscisaureus: yes [00:51] ryah: well, i think these days that's what terms are set to [00:52] piscisaureus: so on windows I do utf8->ucs16 because that's what windows eats [00:53] zum has joined the channel [00:53] ryah: sure. [00:53] ryah: how are you getting that, though? [00:53] piscisaureus: ehm [00:54] maushu has joined the channel [00:54] ryah: you should only do the conversion if they write a string [00:54] ryah: if they write a buffer, then it should be raw - or? [00:54] piscisaureus: can't do [00:54] Alex3000 has joined the channel [00:54] ryah: can't write buffers to the term? [00:54] piscisaureus: well WCHAR arrays :-) [00:55] piscisaureus: at least if you want to be sure about what you get [00:55] dnolen has joined the channel [00:55] ryah: how do you do the conversion? [00:55] piscisaureus: I think I'll leave strings untouched, convert buffers to string [00:55] piscisaureus: then pass the string to binding.writeConsole [00:56] piscisaureus: and in C-land use String::Value to get a wchar array [00:56] ryah: ok [00:57] c4milo1 has joined the channel [00:57] saikat has joined the channel [00:58] c4milo1 has joined the channel [00:58] ryah: pquerna: can you increase ulimit -n on your mac [00:58] c4milo1 has joined the channel [00:58] ryah: pquerna: the buildbot [00:59] pquerna: k [00:59] CIA-121: node: 03Ryan Dahl 07master * r82e9da9 10/ lib/timers.js : [00:59] CIA-121: node: Allow one extra ms in timer diff [00:59] CIA-121: node: Fixes sporadic test-next-tick-ordering.js failures - http://bit.ly/guVWqb [01:00] ryah: pquerna: maybe bump the port range and msl too while your at it? [01:00] piscisaureus: ryah: btw moveCursor(x,y) or moveCursor(y, x) [01:00] ryah: piscisaureus: your choice [01:00] ryah: ACTION bbl [01:02] boaz has joined the channel [01:03] pquerna: ryah: whats the things to set that? [01:06] zentoooo has joined the channel [01:06] pquerna: nm, found em. [01:06] ossareh has joined the channel [01:07] charlenopires has joined the channel [01:07] themiddleman has joined the channel [01:07] kawaz_air has joined the channel [01:08] dguttman has joined the channel [01:11] tylerstalder has joined the channel [01:12] sh1m has joined the channel [01:16] mjr_: ryah: speaking of timers, do you have any idea what would cause this assert error? [01:16] mjr_: https://gist.github.com/72218749ce15cf9dbfa7 [01:16] mjr_: oh, he left [01:17] prettyrobots has joined the channel [01:20] wasabist` has joined the channel [01:25] scheibo has joined the channel [01:25] lukegalea has joined the channel [01:27] lukegalea: hey, has anyone gotten connect-assetmanager's replaceImageRefToBase64 to work? [01:27] lukegalea: mape: are you around? [01:28] pquerna: ryah: okay, should be good now. [01:30] echosystm: does anyone else here contribute to the standard library? [01:31] pquerna: many do [01:31] pquerna: but ryah acts as the gatekeeper/bdfl/etc [01:31] echosystm: i had a question earlier about conventions, but i didnt get an answer [01:31] echosystm: i'm trying to write a small style guide for myself and colleagues so we dont write crap code [01:32] guybrush: isaacs: i planning to implement an assets-module based on npm -- which is, i add package.json to some client-libs (like jquery, ..) - then I would just call my module which concats all the dependencies of the client-libs together and outputs the source [01:32] echosystm: (based as close as possible on what i see in the std lib) [01:32] guybrush: what do you think about that? [01:32] echosystm: is there any kind of rule about module names? some are like 'a_name' while others are like 'aname' [01:32] guybrush: is this a bad idea at all? and is there some stuff already built in npm which could help? [01:32] tg has joined the channel [01:33] pquerna: echosystm: nope. much of it is adhoc, but if you raise inconsistencies, people generally agree to un-inconsistency them. [01:34] pquerna: echosystm: http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml [01:34] pquerna: doesn't cover many issues [01:34] pquerna: but its a start [01:41] TheEmpath2 has joined the channel [01:42] sh1mmer has joined the channel [01:43] m0rganic has joined the channel [01:44] isaacs: guybrush: you mean something like teleport or transporter or whatever the thing is called? [01:44] guybrush: huh didn't hear of that yet [01:44] isaacs: echosystm: i've contributed a few things [01:45] guybrush: it just came into my mind yesterday, all this requirejs and other commonjs things just suck (imho) [01:45] twoism has joined the channel [01:46] guybrush: since all my server-code and basically my whole deployment is built upon npm now it would make sence to put all the browser-code also into npm [01:46] guybrush: right now i have 1 big git-repo with all the browser-libs as submodules in it [01:46] isaacs: guybrush: check out teleport [01:47] isaacs: guybrush: http://jeditoolkit.com/teleport/#guide [01:47] guybrush: https://github.com/Gozala/teleport [01:47] guybrush: kk [01:47] SubStack: can we require() npm modules in the browser yet? [01:47] guybrush: :D [01:47] isaacs: SubStack: glwt [01:48] pkrumins: he already did that :D [01:48] SubStack: I'll get around to finishing that here eventually [01:48] SubStack: pkrumins: not all the way [01:48] pkrumins: yes not all the way [01:49] lukegalea_ has joined the channel [01:51] amerine has joined the channel [01:53] echosystm: so no one has an answer to my question? [01:53] guybrush: ah i see, it uses that overlay-thingy [01:53] guybrush: looks good [01:55] echosystm: am i the only person who cares about things like this? :P [01:56] dspree has joined the channel [01:56] dspree has joined the channel [01:56] guybrush: echosystm: what standard library are you talking about? [01:57] scheibo has joined the channel [02:00] guybrush: i think it is bad if everybody has to adopt to any sort of rule for module-names or anything like that :p [02:00] guybrush: everything will be less innovative/creative [02:01] echosystm: i dont see how the name of a module determines how innovative it is :/ [02:01] tjholowaychuk: its not that big of a deal really [02:01] AAA_awright_ has joined the channel [02:01] tjholowaychuk: I use "-" instead of _, just preference [02:01] echosystm: thats what they said about perl [02:02] echosystm: now ask your average perl programmer how they feel about cpan :P [02:02] dingomanatee has joined the channel [02:02] guybrush: i mean not only module-names, anything which restricts me anyhow makes me mad [02:02] Yuffster has joined the channel [02:03] echosystm: you can do whatever you want in your own code, i'm just saying there should be some kind of general practices for libraries released to public [02:03] echosystm: its hard enough to remember an API, without every cowboy doing things their own weird way [02:03] guybrush: right, so you restrict those who want to publish code to the public [02:04] mikew3c: fixes still being made to ecmascript spec for ES 5.1 - https://mail.mozilla.org/pipermail/es5-discuss/2011-January/003882.html [02:04] guybrush: say.. you want everyone to use semicolons :p [02:04] figital_ has joined the channel [02:04] echosystm: i dont care if people use tabs or spaces, semicolons or whatever [02:05] echosystm: i just want people to provide sane interfaces to things [02:05] echosystm: whatever goes on inside the code, i dont care about [02:05] alek_br has joined the channel [02:06] dnolen_ has joined the channel [02:07] tilgovi has joined the channel [02:12] sh1mmer has joined the channel [02:13] Wyverald has joined the channel [02:13] echosystm has joined the channel [02:14] ashleydev has joined the channel [02:16] Wyverald has left the channel [02:16] tfe_ has joined the channel [02:17] softdrink has joined the channel [02:18] mikeal has joined the channel [02:19] dguttman has joined the channel [02:19] dguttman has joined the channel [02:21] CIA-121: node: 03Ryan Dahl 07master * rfc634cd 10/ (19 files): Upgrade c-ares to 1.7.4 - http://bit.ly/gelN8e [02:21] lukegalea has joined the channel [02:23] dguttman_ has joined the channel [02:23] whyme has joined the channel [02:26] hij1nx has joined the channel [02:27] Me1000 has joined the channel [02:29] benburkert has joined the channel [02:31] jmar777 has joined the channel [02:31] ryah: https://github.com/cretz/gwt-node/blob/master/examples/hello-world/src/org/cretz/gwtnode/examples/helloworld/client/HelloWorld.java [02:31] ryah: :D [02:32] jmar777: i have a child_process that I'm spawning as part of a test runner, but it exists with code 127 [02:32] skm has joined the channel [02:32] meso has joined the channel [02:32] jmar777: that's the situation - not sure I know enough to know the right question.... [02:33] elijah-mbp has joined the channel [02:33] piscisaureus: jmar: that means that it never even starts [02:33] piscisaureus: jmar: check the mpath [02:33] tmzt: ryah: any future for compiled js or does it really only matter at startup? [02:35] jmar777: piscisaureus: mpath? [02:35] piscisaureus: jmar777: typo. I mean just the path to the program you're spawing [02:35] Aria: Yeah. "127" usually means "command not found" [02:36] jmar777: piscisaureus: hmm... it's just 'node' [02:36] jmar777: piscisaureus: and it's running in a loop - first iteration always succeeds, second fails [02:36] Aria: Huh! [02:36] isaacs: ryah: i think you accidentallied that tweet [02:36] devdrinker has joined the channel [02:37] yrashk has joined the channel [02:37] isaacs: ryah: also, that's not the hello world web server, is it? it looks like it's just process.stdout.write("hello world") [02:38] piscisaureus: jmar777: does you get any data on stderr? [02:39] piscisaureus: jmar777: if spawn fails, you should [02:39] jmar777: piscisaureus: oops, thought I had already pasted. yes: "execvp(): Permission denied" [02:40] piscisaureus: jmar777: Okay, well, that's why node doesn't start your child [02:40] yrashk has joined the channel [02:40] nook: A small question, nodejs server will be the one recieving binary data (files basicly) from another application. What will work best, using multipart.js, socket.io or pure socket streaming? [02:40] piscisaureus: I don't know how that might happen, ask the *ux experts [02:41] jmar777: piscisaureus: thanks anyway [02:41] nook: Best way would be to chunk-write data, not buffer it all in memory and write to fs in one move [02:41] jmar777: *nix experts - any ideas? all the files in the directory have the same permissions. first one works, second one fails [02:42] ryah: isaacs: yes, just caught that [02:42] ryah: tmzt: *shrug* [02:42] ryah: tmzt: would like to compile things into node [02:42] brapse has joined the channel [02:43] sh1mmer has joined the channel [02:43] ryah: but i think compiling js probably doesn't save much [02:43] ryah: there's an intermediate formate available from v8 [02:43] brapse: isaacs: ping [02:43] ryah: but i've heard it doesn't save much [02:44] amerine has joined the channel [02:45] antonkovalyov has joined the channel [02:45] matt_c has joined the channel [02:45] antonkovalyov: hey, i am trying to build node.js from the latest master and get this error: http://dl.dropbox.com/u/447925/Screenshots/z7asllfy~mzz.png [02:46] antonkovalyov: do i need to install any dependencies first? [02:46] antonkovalyov: (i tried installing v0.3.4, same result) [02:47] ryah: antonkovalyov: what os? [02:47] antonkovalyov: sorry, os x [02:47] antonkovalyov: 110.6.6 [02:48] antonkovalyov: err, 10.6.6 [02:48] ryah: antonkovalyov: what version of g++ ? [02:48] tmzt: ryah: well im wondering if the concepts behind gwt would make sense, essentially build a full apllication on the server and generating the client side js [02:49] antonkovalyov: "i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664)" [02:49] tmzt: but potentially doing the whole thing in js instead of java [02:49] antonkovalyov: ryah, ^ [02:49] mikeal has joined the channel [02:49] ryah: antonkovalyov: strange. [02:50] Aria: Was it a clean pull? [02:50] ryah: antonkovalyov: it's a V8 build problem. [02:51] ryah: antonkovalyov: try ./configure --without-snapshot [02:51] rphillips has joined the channel [02:52] antonkovalyov: ryah, same :-( [02:52] ryah: antonkovalyov: make distclean && ./configure --without-snapshot && make [02:52] ryah: in the v0.3.4 on [02:52] ryah: one [02:52] kylefox has joined the channel [02:53] HAITI has joined the channel [02:53] derferman has joined the channel [02:53] antonkovalyov: sec [02:53] kylefox: Hey everyone. I'm writing my first node app (using Express), and it's loading a bunch of JSON from a REST resource - is there any existing node/js library to help with this? [02:53] antonkovalyov: it definitely went further [02:53] kylefox: (I realize it's a simple task, just wondering if anyone's built something generic) [02:53] antonkovalyov: ryah, what does --without-snapshot do? [02:54] jpld has joined the channel [02:54] ryah: antonkovalyov: modifies the build process :) [02:54] piscisaureus: I love c++ [02:54] ryah: piscisaureus: don't get all c++ on me [02:55] piscisaureus: :s [02:55] echosystm: ryah: is there any convention in the name of modules in the std lib? [02:55] prettyrobots has joined the channel [02:55] ryah: echosystm: snakecased [02:55] piscisaureus: ryah: what in particular? [02:56] ryah: piscisaureus: don't make any classes [02:56] piscisaureus: ryah: function with template arg? [02:56] ryah: piscisaureus: ? [02:56] echosystm: so, what makes querystring, readline etc. not snake cased? [02:57] jmar777: piscisaureus: i've found that if I wait for the first process to exit before I run the next file, everything's peachy. guess it's ok for a temporary work around, but seems strange [02:57] CrypticSwarm has joined the channel [02:57] ryah: echosystm: they're both one words :) [02:57] echosystm: or freelist - the camelcasing for that is FreeList, implying that its two words [02:57] ryah: oh right [02:57] antonkovalyov: ryah, same thing just much later [02:58] echosystm: i;m not trying to grill you, i'm just trying to get my head around it because i want to write my code the same way [02:58] ryah: echosystm: actually i hate the 'child_process' [02:58] antonkovalyov: oh wait, much later because of distclean [02:58] antonkovalyov: so yeah, same thing [02:58] ryah: echosystm: i've been wanting to get away from snake cased for a while [02:58] jmar777: childProcess++ [02:58] v8bot: jmar777 has given a beer to childProcess. childProcess now has 1 beers. [02:59] jmar777: ha - wasn't aware that beer system is in effect [02:59] ryah: antonkovalyov: hm - can you post it to http://code.google.com/p/v8/issues/detail?id=90 [02:59] echosystm: okie doke, so the formal position is "was snake cased, but now lower case words all concatenated" ? [02:59] ryah: er [02:59] ryah: echosystm: http://code.google.com/p/v8/issues/list [03:00] antonkovalyov: ryah, yeah, sure [03:00] ryah: echosystm: *shrug* i've been thinking about trying to transition to dashes [03:00] ryah: echosystm: because i like dashes.. but i don't kno wyet [03:00] airhorns has joined the channel [03:00] echosystm: lol, ok [03:00] ryah: antonkovalyov: include gcc version, os version, and the output [03:00] piscisaureus: ryah: I mean [03:00] piscisaureus: template [03:00] piscisaureus: static Handle SetCursor(const Arguments& args) { [03:00] piscisaureus: ... [03:00] piscisaureus: if (relative) x = newX; else x += newX; [03:00] dthompson has joined the channel [03:00] piscisaureus: ... [03:00] piscisaureus: NODE_SET_METHOD(target, "moveCursor", SetCursor); [03:01] piscisaureus: NODE_SET_METHOD(target, "cursorTo", SetCursor); [03:01] antonkovalyov: ryah, do i need to specify that i am building it with node? [03:01] ryah: piscisaureus: sigh. [03:01] ryah: piscisaureus: i suppose that's okay [03:01] piscisaureus: i feel like i'm wasting beers here [03:02] ryah: piscisaureus: i have to say that node_script.cc, which does that too, is super annoying [03:02] ryah: because it's devolved into many massive conditionals [03:02] piscisaureus: ryah: what's wrong with it [03:03] kevwil has joined the channel [03:04] ryah: piscisaureus: where's your gist? [03:04] piscisaureus: the api one? [03:04] ryah: yeah [03:05] piscisaureus: https://gist.github.com/29da783028be9a516230 [03:05] piscisaureus: not updated tho [03:06] zemanel has joined the channel [03:06] piscisaureus: updating it now [03:06] ryah: piscisaureus: you should put your stuff in tty_win32.js [03:06] AAA_awright_ has joined the channel [03:08] agenteo has joined the channel [03:08] agenteo has left the channel [03:08] piscisaureus: ryah: will do. [03:09] gf3 has joined the channel [03:09] danny_ has joined the channel [03:09] evanmeagher has joined the channel [03:09] danny_ has left the channel [03:10] piscisaureus: ryah: remind me if I forget [03:10] dnyy has joined the channel [03:10] ryah: k [03:10] ryah: isn't it like the middle of night there? [03:11] piscisaureus: yeah. my rhyth has been fckd up for weeks now. [03:11] devdrinker has joined the channel [03:12] antonkovalyov: kk, created issue there [03:12] antonkovalyov: thanks, ryah [03:12] dnyy has joined the channel [03:15] piscisaureus: ryah: https://gist.github.com/775635 [03:15] twoism has joined the channel [03:15] piscisaureus: that's all we need to support for the moment [03:16] piscisaureus: colors set by sys.inspect, should come later [03:16] ryah: piscisaureus: sweet. i'll try to get on that soon. [03:17] whyme has joined the channel [03:18] piscisaureus: ryah: vertical movement isn't used yet but we should. readline currently doesn't un-wrap at beginning of line correctly when using the backspace or left key [03:19] scanner has joined the channel [03:19] raz has joined the channel [03:20] raz: so, ladies and gentlemen [03:20] possibilities has joined the channel [03:20] raz: why is there still no sane MVC framework for the browser? one that deals properly with nested models? [03:20] raz: or is there one that I haven't heard of? [03:20] SubStack: because there's no module system? [03:20] Blink7 has joined the channel [03:20] aheckmann has joined the channel [03:21] scanner: i have issue when compiling node.js under windows cygwin, can someone help, pls? [03:21] SubStack: not having a standard module system really retards development [03:21] tmzt: multichannel websockets would be awesome, remove the overhead of bayeux [03:22] scanner: quit [03:22] scanner has left the channel [03:22] malkomal_ has joined the channel [03:22] lukegalea has joined the channel [03:23] robotarmy has joined the channel [03:23] Blink7 has joined the channel [03:23] SubStack: tmzt: socket.io can transparently open multiple connections now [03:23] alek_br has joined the channel [03:23] tmzt: SubStack: sure but thats multiple tcp connections [03:23] SubStack: no, multiple logical connections over the same connection [03:24] tmzt: oh, what protocol theb? [03:24] binarypie has joined the channel [03:25] shinmei has joined the channel [03:25] tmzt: basically looking for something to use for automated crud that can be abstracted into a module and not interfere with anything else using socket.io or polling [03:26] webr3 has joined the channel [03:26] dspree has joined the channel [03:28] ron_frown has joined the channel [03:29] mraleph has joined the channel [03:33] c4milo1 has joined the channel [03:34] c4milo2 has joined the channel [03:34] c4milo2 has joined the channel [03:34] softdrink has joined the channel [03:34] c4milo2 has joined the channel [03:34] stagas_ has joined the channel [03:35] c4milo2 has joined the channel [03:35] c4milo3 has joined the channel [03:35] c4milo2 has joined the channel [03:35] c4milo1 has joined the channel [03:36] Aria: Dear c4milo. Adium IRC sucks terribly. Try something like Textual. [03:36] c4milo1 has joined the channel [03:36] meso has joined the channel [03:36] c4milo1 has joined the channel [03:37] c4milo1 has joined the channel [03:38] prettyrobots has joined the channel [03:40] matt_c_ has joined the channel [03:44] lukegalea has joined the channel [03:44] Prometheus: or LimeChat if you like keeping your memory free :> [03:45] rcy has joined the channel [03:45] chrischris has joined the channel [03:46] MattDiPasquale has joined the channel [03:47] EGreg has joined the channel [03:47] ryah: piscisaureus: maybe we shouldn't do this as a class [03:48] skm has joined the channel [03:48] ryah: piscisaureus: but rather require('tty').clearLine(process.stdout) [03:48] ryah: well.. [03:48] ryah: nm [03:48] piscisaureus: ok. why? [03:48] ryah: for you it makes more sense [03:48] ryah: for me it's kind of arbitrary [03:49] ryah: nah, the class is fine [03:49] ron_frown: so uhh anyway [03:49] ron_frown: no compilaiton for mingw for anything remotely stable atm? [03:50] amirpc|laptop has joined the channel [03:50] ryah: ron_frown: no [03:50] piscisaureus: nope. fix it [03:50] matt_c has joined the channel [03:51] ryah: ron_frown: slowly starting to get somewhere [03:51] ryah: it compiles [03:51] ryah: ron_frown: piscisaureus is doing it [03:51] piscisaureus: ryah: don't think it compiled, C-ares upgrade :-/ [03:51] ron_frown: ahh thus the curious little hints on the subject [03:52] Tim_Smart has joined the channel [03:52] ryah: piscisaureus: did you make changes to c-ares too? [03:52] piscisaureus: ryah: hehe. yeah. leak inet_pton and inet_ntop out of there [03:53] piscisaureus: ryah: not there on windows but the very latest. until we have something better, I thought I'd do it this way [03:53] ron_frown: piscisaureus: is it at least looking promising? [03:53] piscisaureus: what do you mean? [03:53] piscisaureus: it'll be node, on windows [03:53] ron_frown: like it can be done, and in a reasonable amount of time [03:54] mattly has joined the channel [03:54] piscisaureus: hmm. 90% done pretty soon [03:54] ron_frown: sweet titties [03:54] ron_frown: cant wait man [03:54] piscisaureus: fast? don't know, depends on external factors [03:54] mraleph has joined the channel [03:55] ron_frown: of course [03:55] ron_frown: thats what I always try to explain to people [03:55] overthemike has joined the channel [03:55] overthemike has left the channel [03:55] ron_frown: its easy to say it'll take x time, but if thre are ANY wildcards in there [03:56] Tprice has joined the channel [03:58] piscisaureus: ryah: if you like require('tty').clearLine(process.stdout) so much better it can be done [03:59] piscisaureus: WriteStream.prototype.clearLine = function(direction) { [03:59] piscisaureus: binding.clearLine(this.fd, direction || 0); [03:59] piscisaureus: } [03:59] piscisaureus: is how it ends up here [04:00] jspiros has joined the channel [04:00] ryah: piscisaureus: no, let's do it with a class [04:00] ryah: we can refactor after [04:04] ryah: piscisaureus:what do i emit when someone hits the enter button? [04:05] piscisaureus: ryah: emit('keypress', '\r', ENTER, flags) [04:05] piscisaureus: flags depends, we didn't define those yet [04:05] echosystm: ok dudes, i wrote a quick style guide [04:06] mikew3c_ has joined the channel [04:06] echosystm: i;d like people to tell me what they want changed, and then i'll put it up for discussion on the mailing list or something [04:06] benburkert has joined the channel [04:06] echosystm: i've basically just tried to encapsulate what i've seen in the standard library [04:07] jspiros has joined the channel [04:07] cloudhead has joined the channel [04:07] echosystm: http://pastebin.com/qvGXTaPZ [04:08] piscisaureus: ryah: how to get v8 string length in C++ land? [04:08] ryah: piscisaureus: LocalToString()->Length() not working [04:09] echosystm: it's not about tabs vs. spaces, 8 space tabs vs. 4 space, prototypes vs. factries etc. just things that actually make a difference [04:09] ryah: piscisaureus: why not? [04:09] chapel: echosystm: I use 2 space tabs :P [04:09] piscisaureus: ryah: ..\src\/node_stdio_win32.cc:240:15: error: 'class v8::Value' has no member named 'Length' [04:10] ryah: uh. [04:10] piscisaureus: ah hmm I get it [04:10] deepthawtz has joined the channel [04:10] piscisaureus: I was lying [04:11] piscisaureus: Handle data = args[1]->ToString(); [04:11] piscisaureus: int len = data->Length(); [04:11] derferman has joined the channel [04:12] Tprice has joined the channel [04:12] confoocious has joined the channel [04:13] confoocious has joined the channel [04:14] ashleydev has joined the channel [04:19] prettyrobots has joined the channel [04:19] ryah: Local data = args[1]->ToString(); [04:19] piscisaureus: thnx [04:21] antonkovalyov has joined the channel [04:22] gf3 has joined the channel [04:23] Aria has joined the channel [04:25] ryah: piscisaureus: yeah, i think we need to revise the api [04:25] ryah: i don't want this thing loaded for every node program [04:25] ryah: most will not need readline stuff - so they shouldn't be forced to have it [04:26] ryah: maybe something like this: [04:26] ryah: var reader = new tty.Reader(process.stdin); [04:27] piscisaureus: ryah: how would that make things any different? [04:27] AAA_awright: echosystm: I use 3 space tabs and I would be using 2.3 if it were at all possible [04:27] skm has joined the channel [04:27] piscisaureus: ryah: stdin set lazily [04:27] ryah: piscisaureus: then we would only do that in readline.js [04:28] ryah: true... [04:28] piscisaureus: you know I don't really mind the API [04:28] dingomanatee: hows life? [04:28] Guest26430 has joined the channel [04:28] dingomanatee: you kids playing nice? [04:28] piscisaureus: well, nice & consistent is always good [04:28] josephhitchens has joined the channel [04:28] ryah: piscisaureus: im almost done with my half, i'll send to you soon [04:29] piscisaureus: ryah: that's fast [04:29] piscisaureus: I'm going to bed soon, honestly [04:29] antonkovalyov has left the channel [04:30] paulrobinson has joined the channel [04:31] ryah: piscisaureus: yes, that sounds like a good idea :) [04:32] matt_c has joined the channel [04:32] piscisaureus: ryah: my stuff is almost working as well [04:33] rsms has joined the channel [04:35] SubStack: goodness that async mailing list thread is annoying [04:35] RockShox: isnt that guy in the channel [04:35] SubStack: dunno [04:36] SubStack: If they are, descriptive semantics. That is all. [04:39] skm has joined the channel [04:40] mraleph has joined the channel [04:40] langworthy has joined the channel [04:43] evanmeagher has left the channel [04:44] evm has joined the channel [04:46] yozgrahame has joined the channel [04:47] isaacs has joined the channel [04:49] EyePulp has joined the channel [04:49] skm has joined the channel [04:50] piscisaureus: ACTION playing with his ... tty [04:51] evm: kinky [04:52] piscisaureus: ryah: how are you going to load tty-win32.js? [04:53] piscisaureus: in tty.js? [04:53] piscisaureus: if (process.platform == 'win32') exports = require('tty-win32') [04:54] creationix has joined the channel [04:55] echosystm: hm [04:55] echosystm: howcome Error.apply doesnt work? [04:55] ajpiano has joined the channel [04:55] echosystm: eg. var x = {}; Error.apply(x, "test"); [04:55] echosystm: x is still {} [04:56] echosystm: or am i missing something entirely [04:57] brianmario has joined the channel [04:57] twoism has joined the channel [05:01] derferman has joined the channel [05:02] Ond has joined the channel [05:04] Chadams has joined the channel [05:04] Chadams: can anyone recommend a good module for mongodb? [05:06] tilgovi has joined the channel [05:06] m0 has joined the channel [05:06] jherdman has joined the channel [05:08] EyePulp: Chadams: mongoose is nice if you want some formality to your models [05:08] EyePulp: er... your collections [05:08] muk_mb has joined the channel [05:09] Chadams: formality? what do you mean by that? [05:09] Yuffster_work has joined the channel [05:11] ivan has joined the channel [05:11] Chadams: oh nm I see what you mean [05:11] EyePulp: It means you can define some structure, cast some types, and define some methods in a structured way surrounding your docs in a way similar to django models. [05:11] EyePulp: more like a standard ORM [05:11] Chadams: yea, I see them creating models hee in their docs [05:12] Chadams: yea [05:12] Chadams: ok makes sence [05:12] Chadams: sense [05:12] Chadams: have you used it much? [05:12] EyePulp: It's a core piece to a new app I've been working on for about a month [05:12] skm has joined the channel [05:13] Chadams: oh nice [05:13] Chadams: mongous looks interesting too [05:13] EyePulp: I doubt I'm stretching its potential with the way I'm using it, but I'm getting my basic needs met. [05:13] EyePulp: haven't seen mongous - got a link? [05:13] sh1mmer has joined the channel [05:15] nodewise has joined the channel [05:15] Chadams: https://github.com/amark/mongous#readme [05:16] sivy has joined the channel [05:16] nodewise: need help for windows 7 setup [05:17] EyePulp: Chadams: you notice at the bottom of that readme that it's based off of node-mongodb-driver, which is also what mongoose sits on top of. [05:18] Chadams: oh I didn;t know that [05:18] EyePulp: mongous looks pretty interesting [05:18] Chadams: yea I work in jQuery a lot so it interests me [05:19] EyePulp: Chadams: node-mongodb-driver requires a *lot* of callbacks - Mongoose and mongous seem to streamline the callback messiness a bit [05:19] piscisaureus: ACTION to bed [05:19] nodewise: I am having the "Unable to Remap to Same Address as Parent" error [05:19] EyePulp: nodewise: Sorry dude, I'm pretty windows ignorant [05:20] dgathright has joined the channel [05:21] nodewise: I followed the instructions from the Github, but didn't help much [05:21] jimt has joined the channel [05:21] nodewise: I meant from the nodejs Github page [05:23] piscisaureus: nodewise: install the rebaseall package [05:23] isaacs has joined the channel [05:23] piscisaureus: run it from a very simple terminal (not bash) [05:24] mjr_ has joined the channel [05:25] piscisaureus: use ash or dash [05:25] nodewise: I installed and run it from ash [05:25] nodewise: didn't help [05:26] piscisaureus: full error message? [05:28] nodewise: $ ./configure make make install Checking for program g++ or c++ : /usr/bin/g++ 1 [main] python 5496 C:\Cygwin\bin\python.exe: *** fatal error - unable to remap \\?\C:\Cygwin\lib\python2.6\lib-dynload\_functools.dll to same address as parent: 0x360000 != 0x410000 Stack trace: Frame Function Args 002891E8 6102749B (002891E8, 00000000, 00000000, 00000000) 002894D8 6102749B (61177B80, 00008000, 00000000, 6117997 [05:29] piscisaureus: hmm, rebaseall usually solves that [05:29] piscisaureus: try lowercasing 'Cygwin' [05:29] cloudhead has joined the channel [05:29] piscisaureus: rename Cygwin to foo, then rename foo to `cygwin` (all lowercase) [05:30] nodewise: you mean the directory name [05:30] piscisaureus: yeah [05:33] JojoBoss has joined the channel [05:34] nodewise: same error [05:35] piscisaureus: nodewise: u ran rebaseall again? [05:35] nodewise: no [05:35] HAITI has left the channel [05:35] nodewise: let me do it again [05:37] chrischris has joined the channel [05:37] nodewise: Same error [05:37] dnolen has joined the channel [05:38] piscisaureus: hmm. I don't know. Rebaseall is there to solve this problem. Something on your system is borked or unusual [05:39] piscisaureus: You should ask on the cygwin mailing list. Be polite though, the cygwin mailing list is unfriendly territory for newbies [05:39] nodewise: Thanks [05:42] yozgrahame has joined the channel [05:42] piscisaureus: nodewise: look at http://sourceware.org/ml/cygwin/2010-12/msg00327.html [05:42] flippyhead: Does anyone have suggestions on better ways to deal with Dates in node? [05:42] flippyhead: the standard JS Date() is a pain to deal with [05:42] piscisaureus: nodewise: if you're going to ask a question yourself, this is a good example except for the last two lines [05:42] nodewise: Thanks [05:45] stride: flippyhead: doesnt that datejs thing run on node? [05:45] flippyhead: hey! just found that, I'll give it a try [05:46] ron_frown: does require just inlude a regular js file? [05:47] jimt_ has joined the channel [05:47] ron_frown: i got a bunch of functions i dont want poluting my node stuff [05:50] dingomanatee has joined the channel [05:51] brapse has joined the channel [05:52] flippyhead: stride: you ever seen date.js run on node? I'm not finding a port anywhere [05:52] kylefox has joined the channel [05:52] shinmei has joined the channel [05:54] kylefox: Anyone work with Express much? I seem to be having a problem loading a Jade template: http://dpaste.com/308786/ [05:56] Aria: ron_frown: It runs it inside a function, so you can var f = function()... and have it stay private. [05:56] ron_frown: sayin separat files [05:59] fizx has joined the channel [06:03] echosystm: kylefox: does the file definitely exist? [06:03] kylefox: echosystm: no -- i created the file and it worked [06:03] echosystm: lol [06:03] kylefox: heh [06:03] kylefox: i was just expecting it to complain about that path missing first [06:04] dgathright has joined the channel [06:08] matjas has joined the channel [06:11] creationix has joined the channel [06:11] creationix: anyone know how to hook up the http client to a subprocess that's emitting http data? [06:11] creationix: instead of an internal tcp stream [06:12] ryah: creationix: ? [06:12] ryah: subprocess.stdout.pipe( [06:12] ryah: req) [06:12] ryah: ? [06:13] creationix: ryah: I'm trying to use node's http client, but with curl in a subprocess [06:13] creationix: since curl supports http proxy and https clients [06:13] creationix: curl -i seems to output raw looking data [06:14] ryah: ok [06:14] ryah: but you want the same interface as require('http').Client ? [06:14] creationix: yep [06:14] creationix: I want a drop-in replacement for node's native http client [06:15] ryah: you'll have to shim that up [06:15] creationix: sure, but looking though http.js I'm getting lost [06:18] ryah: creationix: just try to mimic the interface [06:18] ryah: seems like it will be useful [06:18] Ond has joined the channel [06:18] creationix: ryah: think that might be easier than trying to cram a child.stdout into the existing code? [06:18] ryah: yeah - don't try to put it into http.js [06:18] mnutt has joined the channel [06:19] ryah: it's pretty hairy in there [06:19] creationix: I guess parsing the headers by hand isn't hard [06:19] creationix: just newlines and colons [06:20] ryah: creationix: oh right, you have to parse the headers... [06:20] creationix: are there gotchas in there? [06:20] creationix: or is it as simple as it looks? [06:20] ryah: well - there's lots of gotchas, actually [06:20] ryah: but just ignore that :) [06:21] creationix: edge cases that most people won't hit? [06:21] ryah: yes [06:21] creationix: fair enough [06:21] ryah: if you start hitting a lot of cases, we can use the http parser in there [06:21] creationix: will node's http client ever support http proxy support? [06:22] creationix: or socks5 in the tcp client? [06:22] creationix: I think that can all be done in userspace modules if not [06:22] ryah: well. i don't know. i guess if it's neeed [06:23] ryah: https://github.com/ry/http-parser/blob/03970a576da4fc921d164be35e0a27b5fbdb1cc5/test.c#L566 [06:23] ryah: ^-- good examples of the extent of headers [06:23] ryah: it's actually not too bad the headers [06:24] creationix: yeah, the spec for headers is almost sane [06:24] Athox has joined the channel [06:25] AAA_awright_ has joined the channel [06:25] creationix: looks like looking for \r\n for fields and : to separate them will work 99.9% of the time [06:27] ryah: yeah, the first line is easy to [06:27] ryah: too [06:28] mikeal has joined the channel [06:28] creationix: I'll bet curl takes care of chunked encoding for me too [06:29] ryah: probably [06:30] hobodave has joined the channel [06:30] creationix: is it possible to reuse a curl process for several requests? [06:30] creationix: or will I have to create a new child process per request? [06:30] Aria: No, it's not. [06:30] evanmeagher has joined the channel [06:30] creationix: oh well [06:30] ryah: yeah - ignore the overhead :) [06:30] creationix: at least it will work for low traffic stuff [06:30] under_: there is always libcurl [06:31] ryah: libcurl would be admitting defeat [06:31] under_: perhaps [06:31] creationix: yep, if my curl wrapper doesn't work, Tom Hughes gets to try libcurl [06:31] ryah: really? he should just make the node one work [06:31] pquerna: eeeeeeeeeee [06:32] jankoprowski has joined the channel [06:32] creationix: ryah: even if the node one worked perfectly, it would work for this use case [06:32] pquerna: if you can get libcurl to use the libev eventloop, doens't seem all that bad [06:33] creationix: when the phone is behind a corporate firewall, the system only tells libcurl about the proxy settings. It's transparent to anything using libcurl [06:33] creationix: (which includes the curl executable) [06:33] pquerna: how does curl get them? imean, its prolly just reading a conf in etc right? [06:33] creationix: I guess our node build could hook into whatever does that [06:33] evanmeagher has joined the channel [06:33] creationix: but that's more work [06:33] ryah: strace ftw [06:34] ryah: palm probably patched libcurl [06:34] ryah: :) [06:34] creationix: that will probably be the long term solution [06:34] creationix: but in the mean-time, shelling out to curl should work [06:34] under_: sounds easier to read the config than to parse curl's output [06:35] under_: you'll end up writing your own http stack [06:35] ryah: nah - try to parse curl's output [06:35] creationix: lol [06:35] ryah: i think it's not bad [06:35] ryah: it's just going to be a little slow [06:35] creationix: after writing parsers for haml, coffeescript, msgpack and json, this should be nothing [06:35] creationix: oh, and postgres [06:36] pquerna: er, you are going to parse the output of curl command line [06:36] pquerna: so like [06:36] pquerna: reimplement http [06:36] creationix: pquerna: right :) [06:36] creationix: except it's normalized http [06:36] pquerna: at least use libcurl [06:36] ryah: he's going to do a http.Client interface [06:36] ryah: no [06:36] ryah: shell out :) [06:36] pquerna: surrounded by insanity [06:36] ryah: i think it's a great idea - it'll take 30 minutes [06:37] creationix: pquerna: till I actually take the time to learn how to do c bindings... [06:37] creationix: I'll never write bindings [06:37] ryah: making a libcurl binding would be hard [06:37] ryah: it's also admitting defeat [06:38] pquerna: C is easy [06:38] pquerna: learn C [06:38] creationix: I know c, I just don't know how to do node bindings [06:38] pquerna: its too bad bindings aren't C [06:38] SubStack: I don't like C. :/ [06:38] creationix: C++ macros scare me [06:38] SubStack: but there is that ffi [06:38] creationix: I still think node should come with a generic ffi [06:38] pquerna: ffi should scare you, however it is da bomb [06:39] mjr_: ryah: any thoughts on where this assert crash might have come from? https://gist.github.com/86074a3d378994b659e3 [06:39] pquerna: we bind ffi in lua; its nice. [06:39] pquerna: though structs are still a massive pain. [06:39] pkrumins: i love c [06:39] pkrumins: and i love c++ too! [06:39] creationix: (by generic ffi, I mean a way to call arbitrary shared libraries provided you describe the interface in json first) [06:39] under_: ctypes is nice. python ftw again ;) [06:39] pkrumins: agreed with pquerna, very easy. [06:39] ryah: mjr_: which version? [06:40] pkrumins: c++ is a bit more difficult. [06:40] ryah: mjr_: timers.js:94 apparently [06:40] SubStack: if C had a nice way to do qualified imports it would be so much nicer [06:40] ryah: mjr_: assert(list._idleNext === list); // list is empty [06:40] mjr_: ryah: that is node at master from maybe 5 days ago. [06:40] pkrumins: creationix: use my simple example modules to get started [06:40] pkrumins: creationix: node-async and node-time [06:40] ryah: mjr_: can you reproduce it? [06:40] Stephen has joined the channel [06:41] mjr_: Not reliably. It happens every few hours. [06:41] ryah: mjr_: i'd love to be able to walk through that with my debugger [06:41] ryah: hm [06:41] mjr_: And then sometimes it'll go all day without a crash. [06:41] creationix: wouldn't it be awesome to just include this 8000 line json beast and there are your gtk bindings! [06:41] creationix: no compiling needed [06:41] mjr_: ryah: it's a fatal error though. Can you get your debugger to stop on such a thing? [06:42] mjr_: That's the output from an uncaughtException listener. [06:42] pquerna: creationix: what about structures? [06:42] mjr_: Last gasp before exit and then upstart will respawn. [06:42] ryah: mjr_: it'll get a break if something is thrown [06:42] pquerna: creationix: encode them in json too? [06:42] creationix: pquerna: why not [06:43] ryah: mjr_: yeah - there must be some broken logic in the timer code [06:43] creationix: pquerna: something like this https://github.com/orlandov/node-ffi [06:43] ryah: mjr_: but it's going to be impossible to find without being able to reproduce it [06:43] mjr_: Yeah, I know. [06:43] ryah: that code is really hard [06:44] mjr_: I'm intrigued by your idea of putting a debugger on it though. I could actually inhibit respawn if this would help track down this error. [06:44] mjr_: Things are way over-provisioned at the moment, so the loss of one node for a few hours would be no problem. [06:45] ryah: mjr_: hm - i'm not sure that would be enough info - to have the post-mordem debugger [06:45] ryah: i'd want to see the state of things before that [06:45] pkrumins: wow node-ffi is pretty crazy stuff! [06:46] pquerna: creationix: well, just a pain with variable size things on different architectures [06:46] ryah: which - if we were programming in C - would be doable :) [06:46] creationix: pkrumins: yeah, it just needs some updating [06:46] ryah: pkrumins: yeah [06:46] pkrumins: doesnt compile anymore, or why? [06:46] mjr_: ryah: so if we put a debug statement in the uncaughtException listener, would that stop it at a useful point? [06:46] creationix: pquerna: yeah, the json wouldn't be very portable I imagine [06:46] creationix: pkrumins: well, it uses node promises for one [06:46] creationix: last time I tried, I couldn't compile it [06:46] pquerna: i have some scons code to generate lua tables of offsets in a structure [06:47] pquerna: could easily generate the right json [06:47] pquerna: but it'd still be platform specific [06:47] pkrumins: creationix: oh bad. [06:47] creationix: pquerna: I'm fine with platform specific [06:47] creationix: pkrumins: I could be wrong, I just noticed, it's on('success', not addListener('success' [06:47] ryah: mjr_: honestly, i don't think it's enough [06:47] pkrumins: oh. [06:48] ryah: i also can't change frames yet with the debugger :) [06:48] pkrumins: i know what i will do now, i will finally push the ryah's patch for node-png [06:48] pkrumins: it crashes on my machine, but i assume i got npm problems [06:48] pkrumins: or soemthing! [06:48] ryah: pkrumins: yey. i was just thinking about that [06:48] pkrumins: but doesnt crash for ryah and SubStack. [06:48] pkrumins: so i am gonna push it. [06:49] mjr_: OK, enough computers for today. I'm going to go solder some stuff. [06:49] x_or has joined the channel [06:49] tylerstalder has joined the channel [06:49] ryah: mjr_: i can walk through that logic and see if i agree with the assert. [06:50] ryah: maybe it's wrong. [06:50] ryah: also - asserts should be compiled out of node... [06:50] ryah: somehow the preprocessor is broken [06:51] x_or: I'm using the http-proxy module for some simple proxying using the proxyRequest() method. I need to convert certain requests that come in as POST requests to GET. I thought I could modify the method field in the request object, but it says it is read-only. And, the docs say only a HttpServer should create a ServerRequest object, not a user. Any idea how I could accomplish what I want? Do I need to instantiate a new server or something [06:51] creationix: pkrumins: pquerna: if you two could make a solid ffi library + a way to generate the json, I would be very grateful [06:51] boaz has joined the channel [06:53] herbySk has joined the channel [06:54] herbySk has joined the channel [06:54] x_or: Is there a way to clone/duplicate a ServerRequest object which I could then modify myself? I don't see anything in the docs for that... [06:56] pkrumins: creationix: probablility that i will find time for it now is very small [06:56] creationix: pkrumins: that's a shame [06:56] pkrumins: got to start making money with browserling! [06:56] creationix: I'm almost tempted to learn C and do it myself [06:56] creationix: but I'm in the same boat with regards to time [06:57] pkrumins: ryah: any ideas how to apply a patch and also preserve patcher's info (your name). I applied it, then commited, and I see myself as commiter, even though the patch was yours. [06:57] TomsB has joined the channel [06:57] pkrumins: i used git patch [06:57] pkrumins: just git patch your_patch_file [06:57] pkrumins: that didnt seem good enough [06:58] sriley has joined the channel [06:58] creationix: pkrumins: it will show two fields, the author and the comitter [06:58] creationix: or at least it should [06:58] pkrumins: oh! [06:58] pkrumins: hmm, shows just me [06:58] pkrumins: `git log` [06:59] pkrumins: any special flags to git log to see that, creationix? [06:59] creationix: not sure about git log, but github seems to know the right flags [06:59] creationix: https://github.com/ry/node/commit/435ece505897c8931548162a1ccc5389e3fc558c [06:59] pkrumins: oh sorry, not `git patch` but `git apply` [07:00] pkrumins: creationix: looking [07:00] creationix: I always use git am, is that the same as git apply? [07:00] pkrumins: hmm [07:00] TomsB: Hi. I'm creating game "system" with websockets. I have net.createServer() with connect,disconnect,data events. Now I'd like to organise my code, so it is easy to work with. I'd like to have Client class (client.send .disconnect .broadcast etc.) and Game class with game logis. But in the same time I'd like to use Game.updateCurrentClient() and similar game-client class interactions. [07:00] pkrumins: no! [07:00] pkrumins: looks different [07:00] kawaz_air has joined the channel [07:00] TomsB: Question is - where to look for some reading no this? [07:00] TomsB: Code organisation in Node [07:00] SubStack: sounds like a job for dnode! [07:02] pkrumins: creationix: yeah, git am did that [07:02] x_or: TomsB: I think this is one of new frontiers for node. I'd recommend starting by learning how to test your code in node (very different, IMHO, than rails for example). Writing "testable" code makes it so you have to write modularized and refactorable code. [07:02] pkrumins: creationix: git apply, applies the patch but does not record who made it! [07:02] creationix: pkrumins: I see [07:02] creationix: I had the answer and didn't even know it [07:04] TomsB: x_or, maybe you have some good bookmarks on this? [07:04] nejucomo has joined the channel [07:04] creationix: TomsB: plain vanilla unit tests work well [07:04] pkrumins: ryah: pushed the node-png patch. [07:04] pkrumins: thanks :) [07:04] x_or: I don't really. I would recommend starting with vows.js, maybe. I am still struggling with this same question, but I think this is the place to look. [07:05] creationix: vows is a bit overwhelming for starters [07:05] SubStack: yeah I still haven't bothered to learn vows [07:05] SubStack: although I have written some tests in it [07:05] pkrumins: what is vows! [07:05] x_or: pkrumins: http://vowsjs.org/ [07:05] pkrumins: click [07:06] x_or: Sure looks pretty, though. :) [07:06] creationix: vows is great if you want bdd testing [07:06] creationix: but it's a lot to take in at once if you haven't already been doing unit tests and tdd [07:06] kawaz_ai_ has joined the channel [07:06] x_or: TomsB: I think it is useful to learn how to test in javascript because I had to modify my style when writing applications. It was helpful to understand how to write something that could be tested. [07:07] x_or: creationix: Agreed absolutely. [07:08] zentoooo has joined the channel [07:08] TomsB: Seems taht I will need to write 2x the code I need because of tests.. [07:08] creationix: TomsB: here is my testing framework https://github.com/creationix/nstore/blob/master/test/helper.js#L8-20 [07:08] TomsB: With vows [07:08] SubStack: TomsB: check out expresso too [07:08] evanmeagher: +1 for expresso [07:08] creationix: and here is a sample test https://github.com/creationix/nstore/blob/master/test/saveTest.js [07:09] creationix: plain vanilla javascript [07:09] creationix: if there is output, the test failed [07:09] mgutz has joined the channel [07:10] creationix: (usually with an exception being thrown) [07:11] creationix: ACTION is trying to compile node-ffi again... [07:11] pkrumins: creationix: what do you need it for? [07:11] pkrumins: interested in your use case [07:11] creationix: so I don't have to compile anything else [07:11] creationix: I often deploy to strange environments [07:11] creationix: and often they don't have compilers [07:12] pkrumins: me and substack were reasoning about embedded C code in node.js programs [07:12] pkrumins: like call_c('printf("hello\n")'); [07:12] pkrumins: doable! [07:12] mr_daniel has joined the channel [07:12] creationix: pkrumins: what does the compiling? [07:13] creationix: llvm is great for that kind of stuff I hear [07:13] pkrumins: external call to compiler [07:13] pkrumins: compile to object code, then link it in. [07:13] JimBastard has joined the channel [07:13] SubStack: that's what ghc does, pretty much [07:13] ryah: :( [07:13] pkrumins: hmm, now i cant remember exctly how to link it in after compiling at runtime. [07:14] pkrumins: oh right [07:14] pkrumins: that gets compiled to a node.js module [07:14] pkrumins: and that line gets replaced by a call to require('module').randstuff() [07:14] TomsB: Hmm, I'll crate simple app on Node and create tests with xpresso and creationix suggested testing.. To see which fits the best for me. Is it a good idea? [07:14] pkrumins: where randstuff is the C code that was inside call_c(). [07:14] TomsB: Will I see the benefits of each-other? [07:15] creationix: TomsB: xpresso is a full framework with code coverage tools and dependencies of it's own [07:15] creationix: mine is 10 lines of js [07:15] creationix: it's hard to compare them [07:15] pkrumins: xpresso or expresso? [07:15] TomsB: *expresso [07:15] SubStack: but you can just `npm install expresso` and pow [07:15] creationix: expresso [07:16] creationix: SubStack: hopefully, it does have a native dependency [07:16] creationix: ACTION is installing libffi-dev now... [07:16] creationix: there we go, npm install node-ffi worked this time [07:16] creationix: now to see if it still works [07:18] derren13 has joined the channel [07:18] JimBastard: im getting some strange behavior in 0.3.4 when making https requests, https://gist.github.com/775805 [07:19] JimBastard: was working in 0.3.1 [07:20] mikeal: ryah: does 0.3.4 change the HTTPS client API? [07:20] TomsB: No tests will each me this: [07:20] TomsB: *teach [07:20] mikeal: the docs look the same http://nodejs.org/docs/v0.3.4/api/http.html#http.Client but Marak is seeing weird errors [07:21] creationix: mikeal: It's a "new feature" in the changelog [07:21] creationix: oh, that's server, nevermind [07:21] JimBastard: yeah [07:21] mikeal: yeah, i knew the Server changed [07:21] JimBastard: it could be with a previous version, i jumped from 0.3.1 to 0.3.4 [07:22] JimBastard: well, someone else experienced it with 0.3.4, im running 0.3.5-pre now [07:22] JimBastard: but if i roll back to 0.3.1, it works [07:22] JimBastard: i could try rolling back to a different version, if that would help [07:22] creationix: JimBastard: I'm working on a curl powered https client for node [07:22] TomsB: If I have two "classes" folder/school.js and antoherfolder/student.js then I want them to interact in some way.. Two ways: 1. eventEmitter; 2. include both in index and use like School.fnc() and Student.fnc2()..? [07:22] creationix: if you want to test it when I'm done [07:22] JimBastard: libcurl ? [07:23] creationix: JimBastard: no, subprocess [07:23] JimBastard: ohh, yeah [07:23] JimBastard: thats kinda lame [07:23] JimBastard: we do that for node-cloudservers i think [07:24] creationix: TomsB: JavaScript is very freeform, just out of curiosity, are you coming from Java or C# [07:24] JimBastard: five bucks on java [07:24] creationix: TomsB: "interact in some way" is a bit vague to offer any meaningful advice [07:25] TomsB: neither. [07:25] JimBastard: ACTION loses 5 bucks [07:25] creationix: TomsB: I have several articles on techniques at howtonode.org though [07:25] creationix: JimBastard: after I asked, I did notice, he said "classes", not classes [07:25] TomsB: which of them? :) You have so many there.. [07:26] creationix: depends on what you're trying to do [07:26] JimBastard: lol [07:26] JimBastard: classes, of course [07:26] creationix: TomsB: Object graphs parts one and two are great if you come from OOP [07:27] B2oba has joined the channel [07:27] TomsB: thanks, sec. [07:27] creationix: "what is this" and "why use closure" are good for some javascript unique things [07:27] JimBastard: lol wow, if i try to run our tests for broodmother on 0.3.5-pre i get Maximum call stack size exceeded [07:27] JimBastard: >.< [07:27] JimBastard: roll back [07:27] creationix: running a production server on a pre version of a beta branch of a mostly experimental software project... [07:28] JimBastard: it was just out of curiosity really, we have a lot of httpClient stuff in that code [07:28] JimBastard: just running locally [07:28] B2oba: creationix: that sounds like what I'm about to do ^^ [07:28] creationix: JimBastard: fair enough [07:28] JimBastard: i think our production stack is frozen at 0.3.1 for now [07:28] creationix: I did bite the bullet and move creationix.com to node v0.3.x [07:28] creationix: I really like the .pump api [07:29] SubStack: ACTION is still on 0.2.5 for the time being [07:30] B2oba: Quick question. I am using node.js as a webserver -- However if an exception is uncaught it will bring the whole server down. Is the best approach to avoid this behavior to process.on('unchaughtException', function(err) { // do some logging ? [07:30] creationix: B2oba: possibly [07:30] creationix: or let the process crash and have an external monitor restart it [07:30] B2oba: that's not an option considering it's a real time application [07:30] creationix: either way, you want to avoid uncaught exceptions as much as possible [07:31] creationix: they could leave things in a bad state [07:31] B2oba: for sure, simply preparing for the worst :) [07:31] creationix: but, yes, uncaughtException handlers will prevent a lot of process crashes [07:31] B2oba: alright, thks! [07:32] whyme: B2oba: server.on('error', logger) would work [07:32] TomsB: B2oba, I was using process.addListener('uncaughtException', function(err){}); and it was working nice, just had to restart somethingthat went down with exception. [07:32] creationix: just make sure to log the exceptions so they never go unnoticed [07:32] TomsB: *is working nice [07:32] TomsB: But my code is awful, ~1K loc in one file huh.. [07:33] SubStack: ouch! [07:33] creationix: pkrumins: wow, this node-ffi thing really works, I'm creating sqlite database with only javascript (sortof) [07:33] pkrumins: creationix: via sqlite.so? [07:33] SubStack: O_O [07:33] creationix: pkrumins: yep [07:34] pkrumins: creationix: very cool [07:34] creationix: sqlite3.so [07:34] pkrumins: yeah [07:34] B2oba: whyme: oh ok, I'll be handling at two level. On the server level it will allow me to at least return the request rather than leave it open on error. [07:34] creationix: I wonder how hard this is for something like GTK [07:34] creationix: probably need to generate the signatures and structures for that [07:34] pkrumins: yeah probably. [07:34] pkrumins: i dont like any of those GUI frameworks [07:35] creationix: or libwebkit, ohhh [07:35] pkrumins: they are so big and ugly. [07:35] pkrumins: ideally i'd run node.js for the GUI app, and everything would be in html [07:35] SamuraiJack has joined the channel [07:35] pkrumins: like i did in social-submitter application [07:35] dustinwhittle has joined the channel [07:35] creationix: right now, my gui apps consist of a node powered http server and a chromeless chrome instance running as a child process [07:36] pkrumins: open it in browser, it's a real gui app, except runs in browser, and is powered by node.js on localhost [07:36] creationix: yep [07:36] pkrumins: creationix: neat, how did you get chromeless chrome running? [07:36] creationix: --app [07:36] pkrumins: ah1 [07:36] pkrumins: fantastic :D [07:36] creationix: chrome has some neat command line switches [07:36] creationix: also, you need to specify a custom session to not share the normal browsing session [07:36] SubStack: that's what I've been doing for gui apps for years [07:37] creationix: unless you want to share it of course [07:37] pkrumins: got it, creationix. [07:37] SubStack: the old http server on localhost trick [07:37] creationix: SubStack: it's called "web development" [07:37] creationix: :) [07:37] muhqu has joined the channel [07:37] pkrumins: web development! [07:38] creationix: ACTION rummages through /usr/lib for new goodies... [07:38] SubStack: some webapp I wrote and shipped as a standalone graphical thing is being used to measure sea ice extents in the arctic ocean and bering sea :/ [07:38] creationix: ahh yes, libz.so [07:38] creationix: that could be useful to ffi [07:39] creationix: SubStack: nice [07:39] SubStack: I know it's still being used too because I heard something about it last month [07:39] pkrumins: need more webapps [07:39] pkrumins: not enough webapps. [07:39] SubStack: agree! [07:39] creationix: pkrumins: so how would I look up the structures needed by libz.so? [07:39] creationix: the header files of the source? [07:39] fangel has joined the channel [07:40] pkrumins: creationix: you can unmangle the C mangled names [07:40] creationix: ? [07:40] pkrumins: creationix: automatically, 1 sec. [07:40] pkrumins: creationix: lookupname mangling while i write it out [07:41] SubStack: amusingly that sea ice thing was a rails app with the entire ruby toolchain burned onto a cd [07:41] mjr_: Seems like eventually we'll have gzip in node in a more official way. [07:42] mjr_: Won't we? [07:42] pquerna: it was discussed in a positive light previously [07:42] creationix: mjr_: I hope so [07:42] ajpiano has joined the channel [07:42] creationix: I talked with mikeal about it today [07:42] pquerna: aka ryah said somehting like 'yes' [07:42] mjr_: Yeah, I think I heard ryah drunkenly admit that we should have gzip in core. [07:43] creationix: I think node-ffi in core would solve most these problems partially [07:43] creationix: people could just supply their own json [07:43] pquerna: -ffi calls are more expensive though [07:43] pquerna: its not free [07:43] pquerna: what its doing [07:43] creationix: true, it wouldn't perform as well [07:43] creationix: would probably beat implementing gzip in javascript though [07:44] mjr_: Why wouldn't we just depend on libz? [07:44] mjr_: I think openssl already does, doesn't it? [07:44] creationix: mjr_: I vote for that [07:44] creationix: libz is everywhere and used by everything [07:44] pkrumins: creationix: it actualy doesnt seem so easy as i thought [07:44] pquerna: i thought openssl might have an internal impl [07:44] pquerna: but anyways [07:44] pquerna: its everywhere [07:45] creationix: pkrumins: yeah, if it was that easy, it would be done more [07:45] mjr_: mjr@prod-01:~$ ldd /usr/local/bin/node | grep libz [07:45] mjr_: libz.so.1 => /lib/libz.so.1 (0xb72e1000) [07:45] margle has joined the channel [07:45] creationix: mjr_: nice, so it just needs to be exposed [07:45] mjr_: Kinda looks like we already link against libz. [07:46] creationix: ls [07:46] mjr_: But somebody needs to make it talk gzip transfer encoding. [07:46] mjr_: creationix: I vote for you [07:46] mjr_: Palm surely needs this to get the most out of 3G networks and stuff, right? [07:46] creationix: mjr_: what the heck is gzip transfer encoding [07:47] mjr_: or whatever that's called [07:47] mjr_: when the body of an HTTP is gzipped [07:47] creationix: the only thing I need gzip for at work is to create ipg (deb) files [07:47] jbpros has joined the channel [07:47] creationix: mjr_: can't you just set the content-encoding and pipe the raw gzip data? [07:48] creationix: that's what I did with connect when I shelled out to "gzip" [07:48] creationix: come to think about it, there were a lot of issues filed against that [07:48] mjr_: Yeah, I think that's what people do. There are a couple of libraries that do this as well, but I hear worrisome storied about their reliability. [07:49] mjr_: Some quick googling reveals that of course I meant "content-encoding". [07:49] creationix: currently all our cloud infra. is java based [07:49] mediacoder has joined the channel [07:49] creationix: hopefully we can start moving it to node soon when we get more js people [07:50] creationix: mjr_: well, I never read the spec for gzipped bodies, I just set the header and gzipped the body and it seemed to work [07:50] creationix: perhaps there is something special for chunked encoding [07:50] creationix: or other encodings [07:53] daglees has joined the channel [07:53] TomY has joined the channel [07:57] handle_with_care has joined the channel [07:58] ivanfi has joined the channel [07:59] daniellindsley has joined the channel [08:00] ph^ has joined the channel [08:04] hellp has joined the channel [08:07] richcollins has joined the channel [08:08] kawaz_air has joined the channel [08:09] mAritz has joined the channel [08:10] zomgbie has joined the channel [08:11] lightharut has joined the channel [08:11] brianmario has joined the channel [08:14] lightharut: I'm using node v0.2.6 . I'm connecting from my node.js(client) to another server(written on c++) using var stream = net.createConnection(1200);. When server is available all is okay. But if it is not available I got an exception. How can I catch this exception so my application will not be terminated? [08:15] lightharut: Exception is the following one: [08:15] lightharut: http://pastebin.com/ZVDeyetf [08:16] daglees has joined the channel [08:22] nook has joined the channel [08:26] Druid_ has joined the channel [08:28] xla has joined the channel [08:28] virtuo has joined the channel [08:31] amerine has joined the channel [08:35] [AD]Turbo has joined the channel [08:35] [AD]Turbo: hi there [08:35] mraleph has joined the channel [08:36] mAritz: hm, i'm in the mood to make myself unpopular: why can't coffeescript just die in a fire? it looks horrendous :( [08:36] sideshow has joined the channel [08:37] Druid_ has joined the channel [08:37] stonebranch has joined the channel [08:38] B2oba: maritz: If it burns it won't be good, its better to let it "cook" on that fire you are talking instead... much more enjoyable that way :) [08:39] q_no has joined the channel [08:39] mAritz: who'd want to eat sth like that? [08:42] B2oba: two mistakes there. 1) it's not "eat", but rather "drink" -- 2) Don't get tricked by the color, it's not "shit", but "coffee" [08:43] kawaz_air has joined the channel [08:44] [tm] has joined the channel [08:46] [tm] has joined the channel [08:47] skm has joined the channel [08:48] dguttman has joined the channel [08:49] Gruni has joined the channel [08:51] langworthy has joined the channel [08:53] lightharut: Why my node application terminated when I'm connecting to another server from it? [08:53] svnlto has joined the channel [08:54] gozala has joined the channel [08:54] x_or: lightharut: Probably an exception, put everything inside a try/catch block. [08:57] rot13 has joined the channel [08:57] adambeynon has joined the channel [09:00] gmonnerat has joined the channel [09:00] gmonnerat has left the channel [09:01] derferman has joined the channel [09:02] mikeal has joined the channel [09:03] jetienne has joined the channel [09:04] aklt has joined the channel [09:05] mikedeboer has joined the channel [09:05] kiddphunk has joined the channel [09:06] pgte has joined the channel [09:07] x_or: How does "node debug foo.js" work? Do I just set a breakpoint inside my app with debugger() or something? I don't see anything in the help to set breakpoints. [09:08] qFox has joined the channel [09:08] ROBOd has joined the channel [09:08] sth: x_or: you need a debugger [09:09] sth: node --debug foo.js [09:09] sth: if you're running 0.3.X, node-inspector is my favourite [09:09] mgutz: 0.34 has a cli debugger built-in [09:09] mgutz: i use node-inspector though [09:10] x_or: mgutz, sth: Yeah, I meant with new 0.3.4, wondering how that works. I prefer a CLI, but unsure how to use it. [09:10] mgutz: unfortunately, i haven't used it. I tried it on something simple. [09:10] opengeard_ has joined the channel [09:11] x_or: ryah: Do you have a sample for CLI debugger on 0.3.4? [09:12] dguttman has joined the channel [09:13] glenngillen has joined the channel [09:13] lightharut: x_or: I have put it inside try catch, but it is not help. Could you please check my code? [09:13] lightharut: http://pastebin.com/HyjUxWuf [09:13] glenngillen has left the channel [09:14] lightharut: The exception is occurred only if server is not available. Otherwise all working fine. [09:15] x_or: If server is not available. What do you mean, if createConnection() fails? [09:16] tc77 has joined the channel [09:16] sechrist has joined the channel [09:17] sechrist: Anybody know any used computer parts stores in south bay? [09:17] sechrist: I need like 4 1GB ddr2 sticks and don't want to spend $80 on deprecated crap [09:18] sriley has joined the channel [09:19] q_no has joined the channel [09:20] altamic has joined the channel [09:23] Blink7 has joined the channel [09:24] ttpva has joined the channel [09:24] shaver: sechrist: Weird Stuff? [09:25] sechrist: Weird stuff still exists? [09:25] shaver: oh no [09:25] sechrist: I heard some guys talking about it at work [09:25] shaver: don't talk like that [09:25] shaver: did it shut down? [09:25] sechrist: they mentioned it [09:25] sechrist: and said they think it's closed [09:25] sechrist: ACTION just moved to the valley [09:25] shaver: *sniff* [09:26] sechrist: perhaps they were mistaken [09:26] curtisc has joined the channel [09:26] sechrist: looks like they're in sunnyvale [09:26] sechrist: http://images.weirdstuff.com/thumb/panorama_as_is.jpg [09:26] sechrist: oh my god this looks amazing [09:28] Kingdutch has joined the channel [09:28] sechrist: ACTION will probably go to weird stuff tomorrow [09:39] pdelgallego has joined the channel [09:40] dsirijus has joined the channel [09:40] B2oba: anyone familiar with the "chat demo". There is a library called "fu" within. Do you know what that stands for? [09:41] altamic has joined the channel [09:43] Kingdutch: Free Umbrella's :D [09:43] Kingdutch: (Sorry that's the best I could come up with) [09:43] B2oba: :) [09:45] mAritz: B2oba: what chat demo are you talking about? afaik there is a node module called fu [09:46] B2oba: mAritz: - Add logging for error 404 / 500 [09:46] B2oba: oops [09:46] B2oba: https://github.com/ry/node_chat [09:46] mAritz: one entry from the node modules wiki: "node-router — Simple Sinatra-like http server based on fu.js from the original node-chat demo." [09:46] B2oba: pasted wrong thing ^^ [09:47] mAritz: so, fu.js seems to be a http router [09:47] Kingdutch: I have openssl installed, but running ./configure still tells me it's not found? :S [09:48] mAritz: Kingdutch: openssl-dev? [09:48] B2oba: where is the node modules wiki? ^^ [09:48] mAritz: ohwait... i think it was libssl-dev [09:48] mAritz: not sure [09:48] B2oba: found it [09:48] Kingdutch: Yeh I got libssl-dev [09:48] Kingdutch: now I getg [09:48] Kingdutch: Checking for openssl : not found [09:48] Kingdutch: Checking for function SSL_library_init : yes [09:48] Kingdutch: Checking for header openssl/crypto.h : yes [09:48] Kingdutch: Those were Not Found before [09:48] Kingdutch: openssl is still absent though :O [09:48] mAritz: openssl-dev [09:48] mAritz: ? [09:49] mAritz: (guessing) [09:49] Kingdutch: Doesn't exist [09:49] tanepiper: http://www.readwriteweb.com/hack/2011/01/how-to-use-microsoft-kinect-to.php kinect + nodejs [09:50] langworthy has joined the channel [09:50] bzinger has joined the channel [09:51] hellp has joined the channel [09:52] B2oba: tanepiper: cool stuff [09:52] tanepiper: yea, really tempted to buy one now [09:52] B2oba: its very impressive technology [09:52] mAritz: Kingdutch: what node version? [09:53] Kingdutch: Hold on, I'm cloning from git://github.com/ry/node.git [09:53] Kingdutch: according to https://gist.github.com/579814 (only-git-all-the-way.sh) found in the mailinglist [09:53] Kingdutch: Although I forgot I wanted to try to latest version (0.3) so not sure if I'm doing it right [09:53] Kingdutch: :') [09:55] mAritz: there were versions were the configure script had a problem detecting some openssl libs [09:55] mAritz: (or sth like that) [09:55] mAritz: not sure which ones though [09:55] sth: Yeah, I had that a few times [09:55] mAritz: try to make && make install anyway and see if it has ssl [09:55] sth: I don't think I have openssl atm [09:55] AAA_awright_ has joined the channel [09:56] altamic has joined the channel [09:56] Kingdutch: Hmmm I need to find the right version first ;") [09:57] Kingdutch: https://github.com/ry/node.git <-- That's one epic 404 page [10:00] hasenj has joined the channel [10:01] ewdafa has joined the channel [10:03] [tm] has joined the channel [10:05] mikew3c_ has joined the channel [10:08] B2oba: I cant catch an "uncaughtExection" a the request level [10:08] B2oba: anyone knows how to do that? [10:09] B2oba: I can only catch it at the process (e.g. process.on('uncaughtException')) [10:09] B2oba: problem is if that happens during a request, the request doesn't return and stays idle until time out [10:10] Kingdutch: Ooh I'm up to date :) "v0.3.5-pre" [10:13] jimt has joined the channel [10:14] altamic has joined the channel [10:20] jsnoob has joined the channel [10:20] jimt has joined the channel [10:23] echosystm has joined the channel [10:23] markwubben has joined the channel [10:25] jimt_ has joined the channel [10:25] richcollins has joined the channel [10:27] echosystm: for anyone who's interested... i've started writing a node.js code style guideline and i'd like some feedback before i post it on the mailing list [10:27] echosystm: http://pastebin.com/qvGXTaPZ [10:29] gozala has joined the channel [10:34] mAritz: B2oba: can you give a gist? [10:34] B2oba: maritz: hum, what's a gist? also which question are you refering to? -- sorry forgot [10:35] mAritz: gist.github.com [10:35] mAritz: your uncaughtException problem in a request [10:35] B2oba: ah figured it out [10:36] B2oba: ohh, gist is like pastebin.. good to know [10:36] B2oba: i ended up using a try { .. } catch { } is my request handler [10:36] Kingdutch: ACTION votes for Google C Style Coding :') [10:36] Kingdutch: (Even though it might not be at all appropriate for JS) [10:36] mAritz: echosystm: i don't think you've got a chance with that. there have been some rather lengthy discussions on several small issues about code guidelines... and no result yet. [10:36] agnat has joined the channel [10:36] Kingdutch: C++* [10:37] mAritz: (like semicolon usage) [10:37] B2oba: what about semicolon usage? [10:37] Kingdutch: Arent semicolon's mandatory? [10:37] mAritz: do you use them? [10:37] B2oba: of course [10:37] echosystm: well, ive looked around at all the big packages and this seems to be what almost everyone does [10:37] Kingdutch: I only omit em in the console [10:37] mAritz: well, then i like you but some others hate you. [10:37] B2oba: i can't imagine anyone hating the face semi-colons are used [10:37] echosystm: i dont think its much of a compromise for anyone to follow these guidelines [10:37] B2oba: fact* [10:38] mAritz: there are some rather fanatic anti-semicolon people here [10:38] mAritz: :D [10:38] Kingdutch: http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml [10:38] Kingdutch: I propose that ^^^ [10:38] Kingdutch: http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml?showone=Semicolons#Semicolons <-- For our semicolon love [10:39] B2oba: yup [10:39] B2oba: the one guideline that might be more conflictual is the use of [10:39] B2oba: ") {" versus "( \n {" [10:39] B2oba: I'd make the first one a coding guideline too [10:40] mAritz: tj isn't here right now, but he's one of those guys who don't like semicolons [10:40] mAritz: B2oba: that's pretty universally the first one :D [10:40] mAritz: vertical space is too valuable to use a \n there [10:41] B2oba: only in javascript [10:41] B2oba: cuz of the semi-colon rules lol [10:41] Kingdutch: http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml?showone=Function_Declarations_Within_Blocks#Function_Declarations_Within_Blocks I can see some people getting pissed off by that [10:41] mAritz: i even sometimes go as far as writing lastExpressionInFunction(); } (without \n) [10:41] Kingdutch: mAritz: Eeew, that's ugly [10:42] Kingdutch: How am I supposed to know where shit ends that way? Or what { that belongs to? :O [10:42] echosystm: the document i wrote is mostly consistent with that [10:42] mAritz: yeah, i know. but developing on a netbook gets you grinding for vertical space :D [10:42] echosystm: in fact, i cant see anywhere my document isnt consistent with the google one [10:42] mAritz: Kingdutch: indentation is my friend (plus matching-braces highlighting) [10:42] jetienne: http://ejohn.org/apps/learn <- some fun with js [10:42] fly-away has joined the channel [10:42] echosystm: difference is, google are more anal [10:42] common- has joined the channel [10:42] echosystm: its a bigger ask to have people adhere to that than the one i wrote [10:43] Kingdutch: mAritz: I know, but I shouldn't have to mouse over a bracket to find it's partner, if you indent well and go one lower it's as simple as looking down [10:43] Kingdutch: If I have: [10:43] Kingdutch: func { [10:43] Kingdutch: indent somestuff [10:43] Kingdutch: reallylonganduselesslineofcodewithclosingparenthesisorwhateverit'scalled } [10:44] Kingdutch: Then I might miss that } [10:44] B2oba: i agree with you King, but the real issue with javascript is [10:44] B2oba: return [10:44] B2oba: { a: function() .... [10:44] mAritz: i know it's ugly and bad, but for personal development on my netbook (10,2") i prefer having one more line :D [10:44] B2oba: javascript will think you meant "return ;" [10:44] B2oba: when you're returning an object :P [10:44] mAritz: B2oba: you're talking about something entirely different than we are :D [10:44] Kingdutch: Wait what? [10:44] Kingdutch: Yeah... lol [10:45] B2oba: oh you mean the closing one ^^ [10:45] mAritz: yep [10:45] Kingdutch: Wait wait wait [10:45] Kingdutch: I'm with a whole bunch of javascript people here [10:45] Kingdutch: I can finally ask: [10:46] Kingdutch: What's the best way to verify code integrity, like I've had plenty of situations where I could do something in i.e. PHP because I was sure no one oculd tamper with the code, so I could put like an API key in there [10:46] Kingdutch: How'd you do that with JS? [10:46] mAritz: what? how can you do that in php? oO [10:46] mAritz: only giving out opcode isn't secure! [10:46] jetienne: Kingdutch: this is not about the language, this is about where it runs [10:47] Kingdutch: I know [10:47] Kingdutch: Sorry for changing subject so abruptly :$ [10:47] jetienne: Kingdutch: ? so why to do you ask [10:47] Kingdutch: Just sprung into my mind, haven't been able to find the answer [10:47] B2oba: the answer is no to put any API key in client side javascript [10:47] B2oba: use other mechanisms :P [10:47] Kingdutch: [10:47] Kingdutch: JS key != 'save'; [10:48] Kingdutch: So how to dorequest() [10:48] mAritz: what? [10:48] B2oba: ugh i think I might have misunderstood what you meant -- I'm a bit confused. [10:48] jetienne: i think Kingdutch himself is confused [10:49] mAritz: you have an api key in php and want your client side js to use it? (my interpretation) [10:49] Kingdutch: Oh right, you're thinking that way [10:49] Kingdutch: What I mean is that, if I get an API key for say, google maps [10:49] Kingdutch: That's _my_ key, I don't want my clients to have that, so I use PHP to get a map with the key and everything's fine [10:50] Kingdutch: How would I access such an API in JS, since I can't verify if a user tampered with the code etc. [10:50] Kingdutch: ACTION sucks at explaining :X [10:50] mAritz: what? [10:50] mAritz: xD [10:50] ajpiano has joined the channel [10:50] jetienne: if the key is in the browser, it is no more secret. as everybody reading the page got the key [10:51] mAritz: you could use php as a proxy [10:51] jetienne: aka you can not send secret to the browser [10:51] Kingdutch: right, but if I use PHP as a proxy, i.e. JS -> PHP -> Google [10:51] Kingdutch: Then how do I know it's not Malicious user -> PHP -> Google [10:51] Kingdutch: Which still means someone else is using my key [10:52] B2oba: malicious user doesn't have the key, PHP does [10:52] B2oba: ahh [10:52] fgnass has joined the channel [10:52] echosystm: ok dudes [10:52] echosystm: so [10:52] mAritz: treat every user as a malicious user... [10:52] echosystm: code style guide [10:52] mAritz: always [10:52] echosystm: who wants to help me? [10:52] jetienne: :) [10:52] Kingdutch: mAritz: Which means I can't implement the functionality =/ [10:52] mAritz: why not? [10:52] B2oba: well you can't do much about depending on what you expose [10:52] jetienne: write codes, no coding style [10:52] Kingdutch: Because there's no way of knowing if my JS is legit, right? [10:52] echosystm: every other language has one, but they always implement it when its too late and their code is already a pile of shite [10:52] jetienne: code run, paper burn :) [10:52] B2oba: but they won't be able to use it from JS, due to same domain policy [10:53] mAritz: if you don't want malicious users to access the api, create a login that only you can access. [10:53] B2oba: is there an function to append text to a file? :S [10:54] jetienne: echosystm: so go write another coding style for js. but nobody will use it. so not of much use. this is why code itself is a better use of your time. [10:54] Kingdutch: B2oba: Open it, write to it, closei t [10:54] Kingdutch: ? [10:54] jetienne: echosystm: why write yet another js coding style ? [10:54] echosystm: people do use coding style... look at java [10:54] echosystm: then look at perl [10:55] Kingdutch: echosystm: I know it's fun to create things people use, but if your coding style is so much like google's, use google's [10:55] echosystm: perl is an example of where every amateur non-programmer spewed out some nonsense and put it on cpan [10:55] jetienne: echosystm: ok go write yet another coding style. how will it be different from all the existing one ? [10:55] Kingdutch: Also, you mention that coding styles are made after piles of bad code have been writting, that's for a reason [10:55] echosystm: people dont know about the "existing" one [10:55] B2oba: oh it's a C style open, didn't notice the 'a+' flag [10:55] jetienne: echosystm: ? [10:55] Kingdutch: Coding styles come together from best practices, discovered from doing the bad stuff too, you can't really write a coding style up front [10:55] echosystm: the point is for node to officially adopt a code style and communicate that to people [10:56] jetienne: echosystm: this is widely available all over the place. like all major publisher got one [10:56] Kingdutch: Then spread the word about the existing one [10:56] echosystm: ie. put it on the website or something [10:56] Kingdutch: The solution to not knowing about something is not to create a new thing [10:56] echosystm: Kingdutch: JS has been around long enough for us to know what is/isnt bad [10:56] Kingdutch: B2oba: There you go :) [10:56] jetienne: echosystm: redoing existing work (aka yet another coding style) is not urgent :) [10:56] echosystm: node.js has the unique opportunity of being a fresh start [10:57] Kingdutch: echosystm: Hence why there's plenty of coding style documents already written [10:57] jetienne: echosystm: nothing unique [10:57] devdrinker has joined the channel [10:58] jetienne: go document libraries, go stabilize libraries <- this seems a lot more usefull to node.js than "lets write yet another coding style" [10:58] aaaa_ has joined the channel [10:58] julienXX: Hi! What are the main differences between 0.2.6 and 0.3.4 regarding requests? My app works on 0.2.6 but does nothing under 0.3.4 https://gist.github.com/774628 [10:59] echosystm: well, thats what people said about perl jetienne... now find me a person who says they like using perl [10:59] echosystm: :P [11:00] Kingdutch: ACTION likes using perl [11:00] Kingdutch: :< [11:00] jetienne: echosystm: i prefer to find people who contribute code to node.js [11:00] jetienne: or documentation [11:00] Kingdutch: I will always like the language I start out with [11:00] Kingdutch: It's like your first kiss [11:00] Kingdutch: Well ok, maybe your first kiss is better, but it's a close second :> [11:01] echosystm: well, how about this [11:01] echosystm: instead of writing a style guide [11:01] MikhX has joined the channel [11:01] echosystm: how about we actually use one of the ones available already... [11:01] jetienne: echosystm: good idea [11:01] echosystm: ie. ask ryan to put it on the website or something [11:01] echosystm: a lot of new people are coming to nodejs who dont know about these things [11:02] mAritz: Kingdutch: i started with turbo pascal (school) - hate it; went on to c++ (~3-4 months) - don't particularly like it; went on to php (4 years) - meh; went to javascript - YEEEEAAHHHHHHH [11:02] Kingdutch: mAritz: Fine :< I still can't wrap my head around the greatness of PHP [11:02] Kingdutch: JS* [11:02] Kingdutch: Brainfart htere [11:02] Kingdutch: I mean why does [11:03] mAritz: echosystm: https://github.com/ry/node/wiki/Contributing [11:03] mAritz: :D [11:03] Kingdutch: Function(something,function(somethin,function(something) { alert('nesting eew'); }) {}) {} [11:03] Kingdutch: appeal to you [11:03] jetienne: js got one good point. it is available everywhere. everybody want it to be efficient. [11:03] ron_frown has joined the channel [11:04] fgnass: Question regarding heap profiling: Is there any way to get a list of retaining objects, aka the 'retainers' as in Chrome's dev-tools? In node-inspector only the reference count is shown. [11:04] mAritz: Kingdutch: what's so bad about the fact that you can pass anonymous functions as an argument? [11:05] Kingdutch: The massive indentation it creates [11:05] Kingdutch: And the fact it feels overused [11:05] jetienne: fgnass: i dunno. maybe reasking later will get an answer [11:06] mAritz: Kingdutch: that's a developer problem, not a language problem [11:06] Kingdutch: Javascript encourages it though [11:06] jetienne: Kingdutch: a lot of funciton in js. this is due to closure and the fact you get variable got function as minimal scope (as opposed to block in C) [11:06] Kingdutch: Can't create that kind of soup in C++ [11:07] Kingdutch: ACTION should learn what closures are, keeps popping up *mental note* [11:07] jetienne: Kingdutch: apple did closure in objective C :) [11:07] ron_frown: anyway... creating a little common lib for my js... whats the details inincluding external file [11:07] Kingdutch: Seen objective C, looked revolting [11:07] jetienne: Kingdutch: closure is a big part of js [11:07] jetienne: Kingdutch: it is :) [11:07] Kingdutch: Hence why I should learn it [11:07] mAritz: Kingdutch: the only way a language can encourage something is by either making it good or by making the alternative very bad... which one is it? [11:07] ron_frown: if I include utils.js in the same folder as my parent app.... can I just do required("Utiils" [11:08] jetienne: ron_frown: require("./utils") will do it [11:08] ph^_ has joined the channel [11:08] ron_frown: ok [11:08] ron_frown: thank you [11:08] jetienne: http://howtonode.org/why-use-closure <- Kingdutch good ref on closure [11:08] Kingdutch: K thx= ) [11:09] B2oba: how expensive is it to create a stream vs. maintain a file stream? [11:09] Kingdutch: I haz found example for my earlier problem [11:09] B2oba: e.g. should I open a write stream to my log every time i want to add an entry, or keep it open as long as node is open, and write when needed? [11:10] B2oba: as node is running* [11:10] jetienne: B2oba: depends on the frequently of the logging. [11:10] jetienne: B2oba: the issue will likely be the underlying operating system. and not node itself [11:10] Druid_ has joined the channel [11:10] B2oba: error log, so hopefully not too frequent ^^ hum.. centOS. I'll start w/ opening on request [11:10] jetienne: B2oba: open/close may be expensive. especially close(). because kernel is flushing stuff on disk on close() [11:11] Kingdutch: You can access the adwords API using http://code.google.com/intl/nl-NL/apis/adwords/ Plenty of languages in there, but JS isn't one of them because the access requires a private key which JS would leak and thus expose data. So how do you use this API from JS? You could write a proxy in PHP, but then you'd still have the problem, anyone who can make a curl request to that PHP script is patched to the SOAP API [11:11] jetienne: B2oba: then do a open/close everytime. and if perf becomes a problem, cache the opened file ?. [11:11] Kingdutch: Wew blockline [11:11] B2oba: jetienne: deal :) Thks [11:12] cognominal_ has joined the channel [11:12] mAritz: Kingdutch: yeah, there are multiple ways of dealing with this. depending on how you want to limit the access [11:13] Kingdutch: Any direction you can point me to? I haven't been able to find a singe such solution [11:13] mAritz: what do you want to do? [11:13] Kingdutch: Euh dang that's a hard question [11:13] mAritz: let only certain users use the api? limit the requests/timespan? only allow certain requests? cache the requests? [11:14] Kingdutch: I guess the best exmple (And I might even be in the wrong direction, but I don't think so ) is a way to be able to control the client side JS from the server [11:14] mAritz: oO [11:14] Kingdutch: so I'd basically create some Javascript in the client that'd handle button clicks so I could just subscribe to that server side [11:14] B2oba: a way would be to general "access token" with an expire time [11:14] B2oba: and bind those to a single ip [11:15] mAritz: Kingdutch: i don't quite get what the problem is :D [11:15] Kingdutch: Yeh I might be confusing stuff [11:16] Kingdutch: It basically comes down to client side integrity [11:16] mAritz: don't create the api queries in the client side?! [11:16] B2oba: I think he has a webserver exposing a given set of web services (e.g. http://example.com/getTime would return the time). He wants to secure it in a way that only people allowed users can use this service [11:16] mAritz: your php proxy can do more than just add the api key [11:17] Kingdutch: I'll start coding some stuff, see if I can get into a better explanation [11:18] zomgbie has joined the channel [11:18] mraleph has joined the channel [11:20] iFire has joined the channel [11:20] Kingdutch: Just to prove how much I suck btw, I reinstalled linux on a machine that had my windows backup yesterday [11:21] jbpros has joined the channel [11:22] desaiu has joined the channel [11:24] malkomalko has joined the channel [11:25] Evet has joined the channel [11:26] fermion has joined the channel [11:31] margle has joined the channel [11:32] astoon has joined the channel [11:35] mAritz: on the same partition i assume?! :D [11:37] Kingdutch: I repartitioned [11:41] maushu has joined the channel [11:43] yrashk has joined the channel [11:48] fly-away has joined the channel [11:50] karboh has joined the channel [11:52] Kingdutch: It's cool how http://net.tutsplus.com/tutorials/javascript-ajax/learning-serverside-javascript-with-node-js/ (If updated to work with 0.3 since there's deprecated methods in there) is a total security danger [11:59] dodecaphonic has joined the channel [11:59] tmzt: Kingdutch: use tabs makes things look very clean, and conceptually its very beautiful, dont think of it as nesting but as one thing triggering an action and then responding to it, like a conversation of sorts [12:06] dodecaphonic has joined the channel [12:13] Kingdutch: tmzt: That's input to the discussion from an hour ago, or what are you responding to? [12:13] tmzt: yes I guess so [12:13] herbySk has joined the channel [12:14] tmzt: but I dont know why you need php to be your proxy, if you want to expose the full api but protect the key you could do that in node as well [12:14] tmzt: just implement authentication, such as with cookies, I use a double md5/sha1 hash of the password [12:15] vdrab has joined the channel [12:16] Kingdutch: Sidenote: rehashing an md5 pass increases collision chance [12:16] Kingdutch: But [12:16] Kingdutch: Still, if I implemetn authentication [12:16] Kingdutch: Anyone can see the authentication and possibly fake it [12:21] shinmei has joined the channel [12:24] Kingdutch: tmzt: ^^^ [12:25] dodecaph` has joined the channel [12:25] stagas: Kingdutch: fake what? the session cookie? [12:26] Kingdutch: Then I misinterpret your way of doing the authentication I think [12:26] Kingdutch: but oh well [12:27] margle has joined the channel [12:27] ph^ has joined the channel [12:28] jbpros has joined the channel [12:31] springify has joined the channel [12:34] perlmonkey2 has joined the channel [12:34] thinkingpotato has joined the channel [12:35] hellp has joined the channel [12:35] malkomalko has joined the channel [12:40] okuryu has joined the channel [12:44] hitesh has joined the channel [12:45] hitesh: good morning folks! [12:45] margle: morn [12:45] jbpros: morning! (or afternoon) [12:51] perlmonkey2: Quip says that it isn't read for prime time. Anyone know of a similar lib that is more production ready? [12:53] perlmonkey2: __dirname is part of the CommonJS spec right? [12:53] Gruni has joined the channel [12:54] piscisaureus has joined the channel [12:55] teemow has joined the channel [12:59] MikhX has joined the channel [13:00] MattDiPasquale has joined the channel [13:02] mAritz: Kingdutch: md5(md5('asd')); increases collision chance because the last md5 is always made from a string of fixed length. if you assume that your base string ('asd') is fixed length as well, md5(md5()) shouldn't add more collision chance, right?! [13:02] spetrea has joined the channel [13:03] stepheneb has joined the channel [13:03] tc77 has joined the channel [13:04] lukegalea has joined the channel [13:05] guid_ has joined the channel [13:06] Kingdutch: mAritz: Actually my earlier statement was false, and you're correct [13:07] c4milo1 has joined the channel [13:07] Kingdutch: It's just, pointless.. [13:07] mAritz: why was your earlier statement false? rehashing an md5 can increase collision chances if your original string is not fixed length or fixed length and shorter than an md5 hash. [13:08] d0k has joined the channel [13:08] d0k_ has joined the channel [13:09] Kingdutch: Hmm right [13:09] Kingdutch: Still, rehashing an Md5 is pointless [13:10] d0k has joined the channel [13:11] mbrochh has joined the channel [13:11] mbrochh has joined the channel [13:11] jetienne: pkcs5 key derivation thinks otherwise [13:11] skm has joined the channel [13:11] m0rganic has joined the channel [13:12] fgnass has joined the channel [13:12] Kingdutch: Your what? [13:13] perlmonkey2: How did node.js spring up so completely? V8, plus node, plus an incredible numnber of libs, all well documented. Did this all happen in about a year? [13:14] Kingdutch: Yeh I'm thinking the same perlmonkey2, never heared of it, and now it's like this half year old big thing [13:16] tc771 has joined the channel [13:17] malkomalko has joined the channel [13:19] charlenopires has joined the channel [13:22] arpegius has joined the channel [13:30] malkomalko: anybody know a good way with the node api to manipulate lines of data in a file? I'm trying to add data into certain columns based off a delimiter [13:30] eee_c has joined the channel [13:31] w0rse has joined the channel [13:31] malkomalko: piping everything through awk works but starts acting all strange when doing this on multiple files, it seems like some exec calls just hang forever and get lost in the flood [13:32] mgutz has joined the channel [13:34] Kingdutch: Node can't listen on port 80 without root access? [13:34] zorzar_ has joined the channel [13:35] Thorn has joined the channel [13:36] derren13 has joined the channel [13:37] jetienne: Kingdutch: yes [13:37] Kingdutch: run node as root feels insecure [13:37] jetienne: Kingdutch: this is a limitation from the operating system. not a node limitation [13:37] Kingdutch: I kno [13:37] Kingdutch: but still :S [13:38] ashleydev has joined the channel [13:39] jetienne: malkomalko: seems like your handling of the output stream is inproper [13:40] malkomalko: jetienne: it works fine if I pump one request at a time into this thing, but as soon as I try pumping 20, 50, 100 requests in at a time, things start becoming weird with all the exec's [13:40] malkomalko: so maybe I am handling the output stream improperly, but I'm not quite sure I understand :) [13:41] jetienne: malkomalko: my wild guess would be "your stuff fails when buffer get full". because it fails when it is heavy loaded only [13:41] tmzt: malkomalko: regex? [13:41] tmzt: or write sed/awk for node streams maybe [13:41] malkomalko: my approach was execing awk [13:42] malkomalko: I think it's all the awk processes running at once [13:42] jetienne: malkomalko: what if you launch many time on the same file ? on a very small file, like 1kbyte [13:42] malkomalko: jetienne: any good code/example I can look at for managing streams more effectively? [13:43] malkomalko: it seems ok in that case [13:43] malkomalko: we need to inject columns of data to each line in about 400 files, each might be around 20-30 megs [13:43] malkomalko: it seems like a memory thing, when awk hogs up all the memory [13:43] jetienne: malkomalko: not sure what you need. to code that fully in nodejs is doable too [13:44] malkomalko: using Read/Writestreams? [13:44] Kingdutch: So basically you guys are saying I can't use node as a webserver because... wait a sec, how does apache do this? :S [13:45] jetienne: Kingdutch: it use root [13:45] jetienne: Kingdutch: as you know, this is required by the OS [13:45] Kingdutch: But [13:46] Kingdutch: node as root = security nightmare [13:46] mnbvasd_: Kingdutch: most stuff that uses privalidged ports runs as root, opens the port then drops privs. [13:46] Remoun has joined the channel [13:46] jetienne: malkomalko: yep, you read the file, cut it line by line, modify the line, output it in another file [13:46] Kingdutch: And one does that how? [13:47] mnbvasd_: Kingdutch: a nasty hack is just to run it on a high port and use your firewall to nat port 80 to the high port. [13:47] Kingdutch: I guess I can do that, but what about other people wanting to use my code? [13:47] jetienne: http://nodejs.org/docs/v0.2.6/api.html#process-setuid-68 to change the current user [13:48] mnbvasd_: Kingdutch: well it's a fact of virtually *EVERY* *NIX OS... that's how they work. [13:49] mnbvasd_: Kingdutch: but as jetienne showed... run as root, open port 80, then drop privs to $webuser ....... [13:49] under_: linux has capability systems like SELINUX and grsecurity that let you sort of get around this, but they come with their own complexity/security issues [13:49] x_or: If I put a listener on a request object for events "data" and "event" then do those listeners get called in the order in which they were added? For example, I am using the bodyDecoder() of connect, and I am wondering if it is doing something to the request object that a module later is struggling to deal with. [13:49] mnbvasd_: that's how all *nix daemons work. [13:50] djanowski has joined the channel [13:50] Kingdutch: jetienne: That's exactly what I need :D [13:50] Kingdutch: then I can just create a config file [13:50] Kingdutch: run as "me" [13:50] arpegius has joined the channel [13:50] Kingdutch: sudo node server.js [13:50] Ari-Ugwu has joined the channel [13:50] Kingdutch: and when server.js starts "process.setUID(me);" [13:51] webr3 has joined the channel [13:52] altamic has joined the channel [13:55] c4milo1 has joined the channel [13:55] Kingdutch: SIdenote, how does one convert a username to a uid [13:55] Kingdutch: ? [13:56] Kingdutch: nvm [13:58] gaYak: awk -F: '/username/ { print $3}' /etc/passwd ;) [13:58] Kingdutch: id -u [14:01] mave has joined the channel [14:01] mave: hey there [14:02] mave: someone can help me with some questions about working with nodejs? [14:02] mave: thing is i want to use nodejs with flashsocket [14:03] mave: it should be used to handle events in flash and give it next to php [14:03] mave: ... [14:03] tc77 has joined the channel [14:06] Kingdutch: Can you run exec in a blocking way? [14:07] piscisaureus: Kingdutch: why would you want to do that? [14:10] hober has joined the channel [14:12] Kingdutch: Because I use exec to figure out the user id for a given username [14:12] panosjee has joined the channel [14:12] Kingdutch: And I don't really want any incoming requests to be handled before I'm switch off root [14:13] Kingdutch: nvm I'll defer listenin [14:13] Kingdutch: g [14:14] mAritz: now your thinking async! [14:14] mAritz: :D [14:15] dnolen has joined the channel [14:15] mave: someone want to say something to my questions? :) [14:15] malkomalko: jetienne: know of any good code I can look at for dealing with manipulating streams? I'm not grokking it from looking at the api [14:16] piscisaureus: mave: your question is unclear. [14:16] piscisaureus: use node to handle events in flash??? [14:17] piscisaureus: use flash to handle events in flash! [14:18] piscisaureus: I want to go to Wall Mart to buy stuff at the apple store... [14:19] m0rganic has joined the channel [14:19] mroman has joined the channel [14:19] mroman has left the channel [14:20] mroman has joined the channel [14:20] Kingdutch: How do I strip a trailing "\n" from an stdout [14:20] Kingdutch: (I hate relearning all the string manipulation) [14:21] prettyrobots has joined the channel [14:21] piscisaureus: s = s.slice(0, s.length - 1) [14:21] alek_br has joined the channel [14:21] piscisaureus: if it is a string anyway [14:21] Kingdutch: course [14:21] Kingdutch: wouldn't that be s.length -2? [14:21] piscisaureus: or s = s.replace(/\n$/, ''); [14:22] piscisaureus: why? [14:22] Kingdutch: that'd work [14:22] Kingdutch: nvm \n = 1 char [14:22] Kingdutch: >.> [14:23] springify has joined the channel [14:23] kawaz_air has joined the channel [14:24] Kingdutch: Error: , Success [14:24] Kingdutch: at execCallback (/home/kingdutch/NodeProjects/e-commerce/main.js:51:29) [14:25] piscisaureus: stack trace + node version? [14:25] prettyrobots_ has joined the channel [14:26] Kingdutch: v0.3.5-pre [14:26] Kingdutch: And stack trace ^^ I know what it is, but how to do it in node? [14:26] piscisaureus: well, you got this: execCallback (/home/kingdutch/NodeProjects/e-commerce/main.js:51:29) [14:27] piscisaureus: there should be more, unless you're throwing this exception yourself [14:27] Kingdutch: node.js:68 [14:27] Kingdutch: throw e; // process.nextTick error, or 'error' event on first tick [14:27] Kingdutch: ^ [14:27] Kingdutch: Error: , Success [14:27] Kingdutch: at execCallback (/home/kingdutch/NodeProjects/e-commerce/main.js:51:29) [14:27] Kingdutch: at ChildProcess.exithandler (child_process.js:75:7) [14:27] Kingdutch: at ChildProcess.emit (events.js:45:17) [14:27] Kingdutch: at Socket. (child_process.js:152:12) [14:27] Kingdutch: at Socket.emit (events.js:42:17) [14:27] Kingdutch: at Array. (net.js:754:12) [14:27] Kingdutch: at EventEmitter._tickCallback (node.js:60:24) [14:27] Kingdutch: Wooops [14:27] Kingdutch: I meant http://pastebin.com/EfaT1xaL [14:27] Kingdutch: But it didn't copy the link >.> [14:29] lukegalea has joined the channel [14:31] jetienne: Kingdutch: bind error in child process [14:32] Kingdutch: Which means? [14:32] fumanchu182 has joined the channel [14:34] tmzt: mave: I'm trying to find the same thing, I was looking at socket.io but it only uses flash as an alternative method for javascript to communicate with a server [14:34] tmzt: I was looking for a port of it or something similar to as3 [14:34] tmzt: node is just handling tcp, http, etc. so you can create a normal socket if you follow Adobe's security methods (like the xml file it has to find) [14:35] herbySk has joined the channel [14:36] piscisaureus: Kingdutch: how are you getting this stacktrace. Is it `if (err) throw err` in exitHandler. Or is this in stderr output? [14:36] EGreg has joined the channel [14:36] Kingdutch: This is what node gives me when running the program [14:36] piscisaureus: hoe does node give that to you? [14:37] piscisaureus: it just outputs that to stderr? I don't think so [14:38] Kingdutch: https://gist.github.com/776220 [14:39] MattJ has joined the channel [14:40] piscisaureus: Kingdutch, ah [14:41] piscisaureus: try this to debug [14:41] piscisaureus: function execCallback(error, stdout, stderr) { [14:41] piscisaureus: if (error) { [14:41] piscisaureus: console.log(stderr); [14:41] piscisaureus: throw error; [14:41] piscisaureus: } [14:42] sivy has joined the channel [14:43] djanowski has joined the channel [14:43] Kingdutch: Gives me the exact same stuff [14:44] piscisaureus: Hmm [14:45] piscisaureus: internally node maps your command to '/bin/sh -c id -u' [14:45] piscisaureus: it means that /bin/sh didn't print anything on stderr but exited with a status code != 0 [14:46] Kingdutch: but error is 0 [14:46] paulrobinson has joined the channel [14:46] jetienne: Kingdutch: bind error in child process [14:46] jherdman has joined the channel [14:46] Kingdutch: Kingdutch: bind error in child process [14:46] Kingdutch: Which means? [14:46] piscisaureus: console.log(error.code) gives you what [14:47] davidsklar has joined the channel [14:47] MattDiPasquale has joined the channel [14:47] jetienne: Kingdutch: stuff that you already know :) [14:47] Kingdutch: TypeError: Cannot read property 'code' of null [14:47] piscisaureus: ?????? [14:47] Kingdutch: Nope, not sure what you mean jetienne [14:47] under_: is "id" in root's path? [14:47] piscisaureus: so error === null huh [14:47] Kingdutch: Jup [14:47] Kingdutch: To both of you [14:48] jetienne: if(null){console.log("abl");} this wont display bla [14:48] derren13 has joined the channel [14:48] jetienne: maybe error is not null [14:49] Kingdutch: You looked at the code? [14:49] jetienne: hehe :) [14:49] Kingdutch: if error != null it's rethrown [14:49] Kingdutch: and I'll output it [14:49] Kingdutch: otherwise I'll do stuff [14:50] Kingdutch: error actually is null [14:50] devdrinker has joined the channel [14:50] willwhite has joined the channel [14:50] jetienne has joined the channel [14:50] piscisaureus: Kingdutch [14:51] piscisaureus: I was wrong. It has nothing to do with the child process [14:51] piscisaureus: probably server.listen is failing [14:51] Kingdutch: Thought so, it actually errors on this line process.setuid(uid); [14:51] riven has joined the channel [14:51] piscisaureus: ok could be as well [14:52] mave: @pisc: whats wrong [14:52] mave: just wanna get and event from flash [14:52] akahn has joined the channel [14:52] davglass has joined the channel [14:52] Kingdutch: try { process.setuid(uid); } catch (err) { console.log("Error: " + err);} [14:53] under_: Kingdutch: uid is a string, should prob be an int, no? [14:53] tmzt: mave: I haven't worked with flash itself, just as3 from flex sdk [14:53] Kingdutch: Error: Error: , Success [14:53] Kingdutch: under_: Since when is javascript strongtyped? [14:53] tmzt: but events are up to you to write code, call your network code, marshall them, etc. [14:53] tmzt: Kingdutch: might be how the c++ bindings work [14:54] under_: Kingdutch: good point i'm pretty new to js sorry ;) [14:54] Kingdutch: under_: Well you actually do have a point [14:54] Kingdutch: setuid(1000); works [14:54] mave: just wanted to push a get post thing to php [14:54] Kingdutch: Whereas [14:54] Kingdutch: hold o [14:54] Kingdutch: n [14:54] mave: and give the reply back to flash [14:54] mave: as json [14:54] piscisaureus: KingDutch: if you stuff a string into setUid, it will do some lookup (getpwnam_r) don't really know what it is for [14:54] chrischris has joined the channel [14:55] under_: thats ugly magic. i guess not magic if documented [14:55] piscisaureus: Kingdutch: try process.setuid(+uid); [14:55] mave: client.on('message', function(message) { JSON.parse ... } [14:55] Kingdutch: parseInt(uid) solved it [14:55] mave: doing sth. with the obj and forward it to flash or reply to php [14:56] tmzt: client on whihc end? [14:56] tmzt: that's the kind of api I'd like to see ported to as3 [14:56] mave: what you mean with end? [14:56] tmzt: which doesn't even seem to have JSON oddly enough (I thought it was a feature of es3 now) [14:56] piscisaureus: Kingdutch: I think you don't need the exec call at all, you could just call process.setUid('username'); [14:56] piscisaureus: http://nodejs.org/docs/v0.3.4/api/process.html#process.setuid [14:56] tmzt: mave: I mean are you trying to do that from your flash code [14:57] mave: flash is just giving the json [14:58] mave: node is taking the json and reply on this [14:58] void_ has joined the channel [14:58] mave: to php or back to flash depending on the json given [14:58] Kingdutch: piscisaureus: Thank you, you just reminded me how useful it is to read the entire descriptions, instead of just usage examples >.> [14:58] tmzt: as3corelib? [14:58] Druid_ has joined the channel [14:58] tmzt: I'll have to look into this [14:59] Kingdutch: Does node work on windows btw? [14:59] mave: if json is just a thing like sending to user 1 to 2 node should give 1 a successfully ssend msg and 2 should get a got message thing [14:59] piscisaureus: Kingdutch: not yet, working on it [14:59] tmzt: even cygwin etc. [14:59] tmzt: ? [14:59] Kingdutch: Ah so no reason to put in a compat check there [14:59] piscisaureus: cygwin should work [14:59] piscisaureus: but I hate it [14:59] mave: some other actions should be that sth is given to php [14:59] piscisaureus: the build also breaks all the time, the latest master certainly does not work on cygwin [15:00] mave: as json and a reply from php comes back to node [15:00] piscisaureus: but I think the v2 branch does [15:00] tmzt: mave: what format is the php using? [15:01] piscisaureus: Kingdutch: no compat check needed no [15:01] montylounge has joined the channel [15:01] piscisaureus: I thing setuid will be a no-op on windows [15:01] piscisaureus: Unless you have a better idea :-) [15:01] p0rc has joined the channel [15:01] mave: json [15:01] mave: just working with json obj [15:02] tmzt: piscisaureus: some kind of LUA or run as user implmenentation? [15:02] tmzt: but more win32 specific bindings might be helpful [15:02] aheckmann has joined the channel [15:02] Kingdutch: piscisaureus: That's what I was thinking, so I had a check in there ot skip the whole thing [15:03] tmzt: mave: why do you need node and php? [15:03] mave: php because of mysql db [15:04] tmzt: is the php already written? [15:04] mave: yes [15:04] sonnym has joined the channel [15:05] tc77 has joined the channel [15:05] tmzt: okay, so as3 has flash.net.socket, flashsocket is something specific to socket.io and the js bridge [15:05] piscisaureus: tmzt: can an app do runas to itself on windows? [15:06] tmzt: piscisaureus: maybe there some CreateProcessEx that allows it, but I"m the wrong one to ask [15:06] kawaz_air has joined the channel [15:06] piscisaureus: tmzt: that only affects a child process [15:06] tmzt: mave: oh there's soemthing called WebSocket.as as well (searching for socket.io as3) [15:06] mave: @tmzt: what you mean with specific to socket.io? [15:07] Kingdutch: the phone keeps on ringing :S [15:07] tmzt: mave: I mean that socket.io supports using a flash swf as one of it's backends in webpage [15:07] mave: got this [15:08] mave: the flash stuff is coming from the flash guys [15:08] mave: just need to know the node stuff [15:08] tmzt: "AIR app socket connectio to Socket.IO-node server?" [15:08] mave: how to get the json from flash and working with it [15:08] tmzt: on google groups [15:09] tmzt: and use as3corelib com.adobe.serialization.json for the JSON.parse implementation [15:09] tmzt: and stringify [15:10] mave: currently i got this [15:10] bradleymeck has joined the channel [15:10] mave: var socket = io.listen(server); [15:10] mave: socket.on('connection', function (client) { [15:10] mave: client.on('message', function(message) { [15:10] mave: console.log('we are in ...'); [15:10] mave: // message string decoding as js obj [15:10] gf3 has joined the channel [15:11] mave: got it? [15:11] noahcampbell has joined the channel [15:11] tmzt: that's the server side, I would assume that's okay [15:11] mave: thats right [15:11] tmzt: I'm trying to find the client side assuming you're doing this directly from flash [15:11] mave: the flash stuff is coming from the flash guys [15:11] mave: dont really know how they do their thing [15:12] tmzt: sure but you need to have it be compatible with what you're doing right? [15:12] mave: the thing is im getting something from flash (json) [15:12] Kingdutch: So the [15:12] mave: like user logged in [15:12] Kingdutch: http.createserver() is nice, does what it needs to do, but handling stuff is clunky [15:12] mave: than i give this to php which replies with a json obj again [15:12] Kingdutch: Is there a way to solve it, do dynamic includes in node like in PHP? [15:12] mave: which is given from node to flash [15:13] tmzt: Kingdutch: includes? [15:13] mave: and the user is getting a message in flash window like "you are in" [15:13] Kingdutch: Euh, dynamic class initialisations* [15:13] Kingdutch: tmzt I know the require lol [15:14] yrashk has joined the channel [15:14] bradleymeck: Kingdutch, do you mean you want a template engine like jade? [15:14] Kingdutch: No [15:14] bradleymeck: not sure what you mean by dynamic class initialisations [15:14] Kingdutch: I mean that [15:14] Kingdutch: I could have something like [15:15] DoNaLd`: all: exist some identical JS framework like sencha ? [15:15] gbot2: DoNaLd`: spidermonkey: Error: SyntaxError: missing ; before statement: exist some identical JS framework like sencha ? ......^ [15:15] Kingdutch: http://www.domain.com/index map to index_controller.index_method() [15:15] zorzar_ has joined the channel [15:15] altamic has joined the channel [15:15] bradleymeck: look into a router like connect's (the one express uses) [15:16] bradleymeck: then you can do w/e you want [15:16] bradleymeck: as for the php thing, its not actually dynamic, thats done w/ htaccess files, completely different [15:19] jpld has joined the channel [15:19] Kingdutch: It's not completely different [15:19] Kingdutch: All the htaccess files do is map everything to index.php [15:19] Kingdutch: the index.php splits the query string and goes about loading the right classes [15:20] mave: @tmzt: ? [15:21] malkomalko: man, I'm not grokking this, how can I use createReadStream.. and the data event to just print out the contents of a file? I'm thinking I'm doing the right thing but I just keep getting back the stream object [15:21] pengwynn has joined the channel [15:23] prettyrobots has joined the channel [15:24] matt_c has joined the channel [15:24] Aikar: if anyones interested, i commited my changes for node-msgpack for node 0.3.x support. pgriess has abandoned it so i may be taking it over, https://github.com/Aikar/node-msgpack [15:25] eikke has joined the channel [15:27] dylang has joined the channel [15:27] nook has joined the channel [15:28] prettyrobots: How to I pretty print JSON in the Node.js style? [15:28] boaz has joined the channel [15:28] UHMA has joined the channel [15:28] prettyrobots: sys.inspect in V2 prints out JavaScript, but not JSON. [15:30] matt_c has left the channel [15:30] mave: @pretty: sys.puts(sys.inspect(obj))? [15:31] Nevtus has joined the channel [15:31] robotarmy has joined the channel [15:31] boaz has joined the channel [15:32] joemccann has joined the channel [15:33] malkomalko: ahh, nevermind in node 0.2.6 I was trying to use the node shell with readStreams but it wasn't returning the data properly, but creating a script it worked just fine [15:33] femtoo has joined the channel [15:33] htsh has joined the channel [15:34] ph^ has joined the channel [15:37] htsh has left the channel [15:37] cloudhead has joined the channel [15:38] davidwalsh has joined the channel [15:39] htsh has joined the channel [15:44] gf3` has joined the channel [15:46] sriley_ has joined the channel [15:49] proppy has joined the channel [15:49] Yuffster has joined the channel [15:49] x_or has joined the channel [15:52] shinmei has joined the channel [15:53] gf3 has joined the channel [15:53] Aikar: ryah: any update on https://github.com/ry/node/issues/issue/520/ ? [15:54] brapse has joined the channel [15:54] djanowski has joined the channel [15:54] piscisaureus: Aikar: http://www.timeanddate.com/worldclock/city.html?n=224 [15:55] EyePulp has joined the channel [15:56] charlenopires has joined the channel [15:56] Ond has joined the channel [15:58] felixge has joined the channel [15:58] felixge has joined the channel [15:58] felixge: ryah: ping [15:59] benburkert has joined the channel [16:00] bzinger has joined the channel [16:03] Aikar: felixge: i dont think hes usually on much in the mornings [16:04] hobodave has joined the channel [16:04] felixge: Aikar: I know, but his irsii will notify him when he comes in :) [16:06] mikew3c_ has joined the channel [16:06] sprout has joined the channel [16:08] boaz has joined the channel [16:08] derferman has joined the channel [16:10] m0rganic has joined the channel [16:11] gf3` has joined the channel [16:12] softdrink has joined the channel [16:14] rwaldron_ has joined the channel [16:15] rwaldron_ has joined the channel [16:15] djanowski_ has joined the channel [16:16] Me1000 has joined the channel [16:19] skohorn has joined the channel [16:20] randy_ has joined the channel [16:22] derferman has joined the channel [16:22] thinkingpotato_ has joined the channel [16:23] derferman has joined the channel [16:23] iszak has joined the channel [16:25] aheckmann has joined the channel [16:26] pietern has joined the channel [16:27] ashleydev has joined the channel [16:31] machee has joined the channel [16:32] sstephenson: node's -e/--eval command line argument is undocumented - is that an oversight, or should I not rely on it? [16:33] malkomal_ has joined the channel [16:34] JusticeFries has joined the channel [16:34] Kingdutch: The way javascript handles inheritance and why some people do and some don't use 'this' still confuses me :S [16:36] Aria has joined the channel [16:39] mikew3c has joined the channel [16:43] zorzar_ has joined the channel [16:43] briznad has joined the channel [16:43] willwhite: Anyone know of examples for using expresso to test POST or PUT requests? I'm having trouble getting the body of the request set properly. [16:43] ben_alman has joined the channel [16:43] yhahn has joined the channel [16:44] dmcquay has joined the channel [16:45] josephhitchens has joined the channel [16:45] proppy: has anyone worked on a junit output for expresso ? [16:45] [tm] has joined the channel [16:46] prettyrobots has joined the channel [16:47] vineyard has joined the channel [16:48] kriszyp has joined the channel [16:48] sriley_ has joined the channel [16:49] kriskowal has joined the channel [16:49] robotarmy has joined the channel [16:49] bradleymeck: Kingdutch, those are hard descisions to make, but in general if you are using prototypes (which many things should but dont) the use of this is a good way to go [16:50] bradleymeck: however due to closures and private/hiding variables you cant use this for doing those things [16:50] nonnikcam has joined the channel [16:51] Kingdutch: So basically prototypes encourage this [16:51] Kingdutch: closures decourage it? [16:53] bradleymeck: kingdutch basically, but those 2 things should be used at different times, just people like to go all in one way or another for some reason [16:53] stephank has joined the channel [16:54] Kingdutch: Because everything in 1 way is easier [16:54] bradleymeck: then again functional discourages both this and prototypes and sometimes people do that to try and emulate jquery and the like [16:54] Kingdutch: Especially since I'm guessing most people enw to JS don't know when to use which way [16:54] bradleymeck: its easier until it gets to be a large project [16:54] Kingdutch: (Atleast I certainly don't and I've been spending the entire day learning this kind of stuff) [16:56] tylerstalder has joined the channel [16:58] isaacs has joined the channel [16:58] elijah-mbp has joined the channel [16:59] tekky has joined the channel [16:59] fgnass has joined the channel [16:59] wmealing_ has joined the channel [17:00] flippyhead: anyone know about date.js (or an other date library) that works with node ? [17:00] jakehow has joined the channel [17:00] wmealing_: say i wrote commandline line app in node.js and the sucker doesn't quit, am i supposed to call some kind of exit manually, or should it fall through to the end of the js ? [17:00] wmealing_: and then exit [17:01] losing has joined the channel [17:01] dguttman has joined the channel [17:01] Kingdutch: flippyhead: Tried new Date()? [17:01] ben_alman: anyone here doing stuff with git as a database or model in node.js? [17:01] Kingdutch: (Standard functions, thus standard date functions work) [17:02] flippyhead: Kingdutch: heh, yeah, heard of that. It's just that I hate working with Date [17:02] felixge: wmealing_: node won't quit if there are still active watchers [17:02] bradleymeck: wmealing_ if there are no watchers it should fall out [17:02] wmealing_: ah ! [17:02] felixge: wmealing_: could be an open socket, file or server [17:02] wmealing_: watchers, right. [17:02] hunterloftis has joined the channel [17:02] wmealing_: yes, the mysql socket [17:02] felixge: wmealing_: yip [17:02] wmealing_: ok, thats a good point, thanks. [17:02] felixge: wmealing_: what mysql lib are you using? [17:02] Kingdutch: wmealing_: The node app will end if you run out of JS code (Although for example the httpserver.listen() might keep it alive). If it's taking too long you can kill any app with Ctrl + C (Linux + windows, not sure on mac) [17:02] sechrist has joined the channel [17:03] wmealing_: the node-mysql one where he meantions pinkbike/transloadit [17:03] felixge: wmealing_: :) [17:03] wmealing_: ACTION see's your name in it [17:03] wmealing_: works wonderfully. [17:03] bradleymeck: flippyhead Date() is portable and handles a lot of the chaos of Calendar glitches, plus it has UTC! [17:03] felixge: wmealing_: sweet. That's why I was asking : ) [17:04] wmealing_: the bugs are all mine, dont need to worry about that. [17:05] felixge: wmealing_: cool : ) [17:05] overthemike has joined the channel [17:05] felixge: wmealing_: well, I hope you find your bugs : ) [17:05] wmealing_: me too, this is my first real foray into javascript [17:05] wmealing_: ben_alman: if you find a good javascript interface to git, let me know. [17:06] bradleymeck: felixge while you are about, does your driver have prepared statements (and string escaping)? [17:06] ben_alman: wmealing_: i see bits and pieces in a few github repos, but nothing with any documentation whatsoever [17:06] bingomanateeIpho has joined the channel [17:06] wmealing_: ben_alman: can you link me ? [17:06] ben_alman: what i did was click on each of these people and search their repos https://github.com/creationix/node-git/network/members [17:07] hornairs has joined the channel [17:07] wmealing_: oh ok. [17:07] felixge: bradleymeck: no, no prepared statements yet. But it looks like I get some more sponsoring to work on this beginning next week [17:07] ben_alman: i see some github apis [17:07] ben_alman: but i want a git api [17:07] wmealing_: ben_alman: yeah, i hear ya. [17:07] ben_alman: i could exec git commands manually [17:07] halfhalo: its easy [17:07] wmealing_: ben_alman: but that is nasty. [17:07] ben_alman: and just parse their responses [17:07] halfhalo: ACTION is writing one [17:07] fgnass has left the channel [17:07] ben_alman: but like... i have other priorities [17:07] creationix has joined the channel [17:08] wmealing_: halfhalo: a git interface ? [17:08] halfhalo: yeah [17:08] ben_alman: it's a matter of time, really [17:08] ben_alman: what we really need is 2 things: a full git filesystem interface [17:08] ben_alman: and a model built atop that [17:08] wmealing_: halfhalo: if/when you get something working, i'm very interested. [17:09] ben_alman: same here [17:09] x_or has joined the channel [17:09] halfhalo: although the one I'm writing is for a specific project only and is not really all that flexible [17:09] halfhalo: but its working [17:09] felixge: bradleymeck: escaping is supported however [17:09] ben_alman: wmealing_: right now there's this https://github.com/creationix/node-git which is very basic with only a few methods [17:09] wmealing_: i need to be able to find tags, read logs, and do bisects [17:09] wmealing_: halfhalo: opensource ? [17:09] ben_alman: this also seems like it has a lot of stuff [17:09] ben_alman: https://github.com/christkv/node-git [17:09] ben_alman: but i can't get it to work :/ [17:09] ben_alman: that one purports to be a port of grit [17:10] ben_alman: but i'm not having any success [17:10] halfhalo: wmealing_: it will be when its more polished [17:10] ben_alman: (the current version of it in npm has deps issues) [17:10] wmealing_: halfhalo: eta ? (my project isn't in any rush) [17:10] wmealing_: as its personal, non profit etc. [17:10] halfhalo: ACTION dunnos [17:10] halfhalo: ACTION is still writing bits and peices [17:11] wmealing_: ok [17:11] Kingdutch: How do all those sites take care of their routing? :O [17:11] Kingdutch: Or maybe the problem is I don't want static routing? [17:11] wmealing_: why wait for polish, let the world suffer your code ! [17:11] dylang has joined the channel [17:11] halfhalo: still experimenting with different methods of getting the data, so its rough around the edges, but right now it can get branches, tags, trees using a tag [17:12] bradleymeck: kingdutch, http://senchalabs.github.com/connect/router.html [17:12] halfhalo: I'm finishing up the tree method right now actually [17:12] wmealing_: what about via the hash "tag" thing ? [17:12] wmealing_: hash identifier [17:12] halfhalo: yeah, thats what I meant by tag [17:12] wmealing_: ok [17:13] halfhalo: I also am going to add a way to get commits by tag (not sha tag, tag tag) since thats important to the project [17:13] Kingdutch: bradleymeck: How is that middleware? [17:13] wmealing_: ACTION has that requirement also [17:13] Kingdutch: Like how does that work out? [17:13] figital has joined the channel [17:13] Kingdutch: Sounds like a nice buzzword [17:13] mattly has joined the channel [17:14] bradleymeck: its middleware the way connect uses the word, connect basically lets you layer features you want (stuff in the middle is the middleware) so you can have a modular server instead of standard one [17:14] jetienne has joined the channel [17:14] overthemike has left the channel [17:15] creationix: are we talking about middleware and connect? [17:15] noahcampbell has joined the channel [17:15] Kingdutch: Jup [17:16] creationix: TJ and I got the name from ruby land (which got it from other systems) [17:16] creationix: I think layers makes more sense to some people [17:16] Kingdutch: bradleymeck: Hmm I'm interested in the way they implemented that, if Icould make it dynamic I could maybe automaticall call a function from controllers/users.js if someone goes to domain.com/user [17:16] Remoun has joined the channel [17:16] creationix: they are just request handlers that can fall through to another layer [17:16] hunterloftis: creationix: yeah the "middleware" word confused me at first [17:17] bradleymeck: kingdutch the :id is grabbed and then you can route on that [17:17] EyePulp: ACTION knows knows middleware from django, so it made sense [17:17] creationix: Kingdutch: I know express has an example of how to do MVC style code [17:17] hunterloftis: But it's just layers, or: http://en.wikipedia.org/wiki/Chain-of-responsibility_pattern [17:17] Kingdutch: bradleymeck: I know, but it means that if I have 100 different controllers, I need to specify a hundred possible routes [17:17] Kingdutch: With possible parameters [17:17] ben_alman: heya creationix, your readme for node-git has examples that use code not in the repo. do you have a branch somewhere you still need to push? Git.exists, Git.getTags [17:17] bradleymeck: or you could just register your controllers and have them in a dictionary [17:17] creationix: Kingdutch: no, if you have naming conventions, you can automate that [17:17] bradleymeck: then controllers[id](...) [17:18] creationix: never underestimate the power of object[name] syntax [17:18] bradleymeck: praise be to brackets [17:18] Kingdutch: http://kohanaframework.org/guide/kohana/tutorials/hello-world <-- I know it's a diff language, but see how domain.com/hello maps to install_dir/controllers/hello.php -> Hello_Controller [17:18] creationix: also, "middleware" layers are simply javascript functions [17:19] creationix: you can do ANYTHING in one [17:19] hunterloftis: Hey guys what's the "node way" to extend an object? Like, to take {a: "a", b: "b"}, and override it with {b: "c"} to get {a: "a", b: "c"} ? [17:19] creationix: hunterloftis: there are a few ways [17:19] creationix: Object.create, setting __proto__, utils.inherit [17:19] creationix: I prefer setting __proto__ since it's the most direct [17:19] hunterloftis: Kingdutch: That's no problem, in fact in the express /examples folder you can view an "mvc" example that shows just that. [17:20] Kingdutch: I don't see why I was thinking of using [] all the time, but when you guys say it it gave me an idea [17:20] alek_br has joined the channel [17:20] ben_alman: hunterloftis: do you mean extend an object through inheritance or simply merge two objects [17:20] bradleymeck: kingdutch, we arent going to go program that for you but grab the id, pull the controller out of a dictionary, or make it require("./controllers/"+id) [17:20] hunterloftis: ben_alman: Just merge, I don't really care about the prototype chain [17:20] creationix: and require is cached, so you can require in a hot loop [17:20] ben_alman: creationix: ^ [17:20] ben_alman: ACTION doesn't know if there's a merge utility in node yet [17:21] creationix: hunterloftis: merge, just a sec... [17:21] Kingdutch: bradleymeck: I don't expect you to program it for me :) [17:21] Kingdutch: That'd take the fun out of it [17:21] creationix: ACTION digs through his outbox [17:21] bradleymeck: creationix your outbox is like a xmas tree [17:21] EyePulp: heh [17:22] creationix: https://gist.github.com/776495 [17:22] creationix: oh wait, that's the wrong one [17:22] creationix: but same idea, just put properties onto an existing object instead of creating a new one [17:22] hunterloftis: creationix: ok cool, I can write the function no problem, but after seeing sys.inherits I thought maybe there was something standard [17:22] ben_alman: wmealing_: this looks impressive btw but i don't see any docs whatsoever https://github.com/christkv/node-git/ [17:23] creationix: hunterloftis: there was a node built-in a while back, but it got removed due to too much bikeshedding [17:23] wmealing_: ben_alman: in test i guess ? [17:23] creationix: I don't think sys.inherits should be a public API either [17:23] ben_alman: dunno. all the unit tests pass here [17:23] wmealing_: best that i guess we can get for now [17:23] ben_alman: but as i've no experience with grit, i'm not sure how to even get started [17:24] ben_alman: i'm looking thru the source [17:24] tylerstalder has joined the channel [17:24] hunterloftis: creationix: why not? [17:24] ben_alman: it would've been really cool if he threw up some very basic examples :P [17:24] creationix: hunterloftis: just make sure to use Object.getOwnPropertyNames, Object.getOwnPropertyDescriptor, and Object.defineProperty [17:24] wmealing_: ben_alman: check the tests directory [17:24] ben_alman: i have [17:24] amerine has joined the channel [17:24] ben_alman: it's split into a lot of files [17:24] ben_alman: heh [17:24] Kingdutch: Ok so before I start working on my routes, my last question for the day, should I have a little piece of JS in the client handle all the requests using # to handle history for the client etc.? [17:24] creationix: Kingdutch: that's one way [17:24] wmealing_: plenty. [17:25] creationix: Kingdutch: are you using a dom framework like jQuery? [17:25] aelaguiz has joined the channel [17:25] Kingdutch: The other is to just let the page refresh [17:25] Kingdutch: Not using anything yet atm, I've used jQuery though and it's fun to work with [17:25] ben_alman: here's a maybe general node implementation question. everything works with callbacks, whether asynchronous or not. is it fairly common to use something like Step to link together many asynchronous actions? is there something built into node to facilitate this? [17:25] wmealing_: Error: Cannot find module 'async_testing' [17:26] creationix: ben_alman: no, there is nothing built-in [17:26] ben_alman: wmealing_: you need to do git submodule init && git submodule update [17:26] wmealing_: make sure you got that installed ben_alman . [17:26] creationix: and sync stuff shouldn't use callbacks [17:26] creationix: Step works with return values too [17:26] ben_alman: then go into the compress submodule dir and follow the README [17:26] ben_alman: then it'll run [17:26] fly-away has joined the channel [17:26] tylerstalder has joined the channel [17:26] creationix: Kingdutch: you could look at sammyJS or backbonejs [17:27] creationix: those are some simple frameworks for handling that kind of stuff client-side [17:27] creationix: I usually just write my own framework [17:27] Kingdutch: K I'll look at it thanks [17:27] ben_alman: Kingdutch: i have a jQuery lib for handling fragments if you want it more custom [17:27] ben_alman: look at jQuery BBQ [17:27] ben_alman: and if you just want the hashchange event, i [17:27] Kingdutch: yeh me too, means I know what they do, I do look at other frameworks to see how they did stuff though [17:27] ben_alman: ve got a plugin for that [17:27] EyePulp: a little late, but I found this a few days ago for doing .extend() on simple objects: https://gist.github.com/776508 [17:27] ben_alman: but if you want a framework, backbone or sammy [17:28] creationix: EyePulp: yep [17:28] wmealing_: ben_alman: i have one failure during the make. [17:28] creationix: though putting extend directly on Object.prototype is considered bad vodoo by some [17:28] EyePulp: creationix: si [17:28] wmealing_: http://pastebin.com/UMDZMUg5 [17:29] wmealing_: not asking you to fix, just letting you know. [17:29] ben_alman: weird, i have no failures (running HEAD) [17:29] tmzt: ben_alman: anything for handling both # like names and relative urls effeciently? [17:29] ben_alman: Test create patch from commit failed? maybe you need write permissions on the dir? [17:29] ben_alman: ACTION has no idea [17:29] ben_alman: tmzt: what do you mean [17:29] tmzt: ben_alman: like #cms/stuff and /cms/stuff [17:29] jimt has joined the channel [17:30] saschagehlich has joined the channel [17:30] tmzt: serving the same html/jade from node [17:30] saschagehlich: is there an event that is emitted when a response (an OutgoingMessage) has been closed? [17:31] ben_alman: tmzt: what i recommend is to use /cms/stuff in all your links then a little jquery for example.. $(document).delegate('a', 'click', function(e){ var url = $(this).attr('href'); if ( !attr.indexOf('/') ) { e.preventDefault(); location.hash='#'+href; } }); [17:31] ben_alman: or something a long those lines [17:31] ben_alman: i don't have a gist of it [17:32] ben_alman: but that would take every link starting with '/' and "ajaxify" it :P [17:32] creationix: tmzt: I made this a while back: https://github.com/ry/node_docs/ [17:32] creationix: it supports both url styles [17:32] ben_alman: i actually have a pretty robust jQuery plugin for determine link inside-ness [17:32] creationix: and the same code will render the page on either the server or client [17:33] Kingdutch: you know what I just realised [17:34] ben_alman: creationix: and if you included my small jQuery hashcahnge plugin, your site would also work on IE7! :P [17:34] creationix: ACTION doesn't care about IE [17:34] ben_alman: lucky you [17:34] Kingdutch: It's either #!/url for SEO and JS enabled users, # for JS enabled users and no SEO, or plain links that can be overridden to # for Non-JS and JS users but sicne SEO doesn't parse JS your links won't get transformed to #! so it's either JS + SEO or JS + No-JS but never all 3 =/ [17:34] ph^ has joined the channel [17:34] aelaguiz has joined the channel [17:34] Kingdutch: nvm non-js = SEO >.> dummy me [17:34] Aikar: anyone got any ideas for debugging why a socket.io connection just doesnt do anything? https://gist.github.com/776518 host and port looks correct [17:34] ben_alman: i need to write that blog post about how #! is evil and should be avoided [17:35] julienXX: any idea why with the same code I can get get a response with 0.2.6 but not with 0.3.4? [17:35] bradleymeck: yay for only working in IE only! [17:35] jimt_ has joined the channel [17:35] Aikar: yay? [17:35] hunterloftis: Aikar: You're definitely running as sudo? ;) [17:35] Aikar: why is that yay [17:35] Kingdutch: bradleymeck: We should stone you just for saying that [17:35] Aikar: hunterloftis: yep i can see the http page fine lol [17:35] ben_alman: Kingdutch: with #! you can have either seo or non-js, but not both [17:35] Aikar: just the socket wont connect [17:35] creationix: I did my years with IE. I can't handle much more brain damage [17:35] ben_alman: with simple progressive enhancement you can have both [17:35] creationix: (it literally caused brain damage inducing migraines almost weekly) [17:35] ryah: felixge: yo [17:36] Kingdutch: ben_alman: I know, but with normal links you can actually have both SEO and Non-JS, and you can put some JS in there to make it pretty transitions [17:36] Aikar: i added transports section thinking maybe flash wasnt working [17:36] felixge: ryah: would you mind a patch that cleans up the module system code (without changing any functionality)? It's just such a mess :) [17:36] ben_alman: my recommendation is to use plain links in hrefs and then delegate a click handler to enhance them to # or pushstate [17:36] softdrink has joined the channel [17:36] ben_alman: and not use #! ever [17:36] bradleymeck: i say yay because it pays the bills, and not having to care about anything but one browser that fails at virtually everything for a non-js dependant app is doable [17:37] creationix: if anyone wants a javascript job that doesn't involve IE, I know of many openings :) [17:37] EyePulp: heh [17:37] felixge: creationix: 3 days a week, remote? :) [17:37] creationix: felixge: possibly, though most prefer onsite of course [17:38] q_no has joined the channel [17:38] creationix: felixge: but it's not outside the realm of possibility, there is a lot of work do to [17:39] ryah: felixge: what do you have in mind? [17:39] Kingdutch: ben_alman: I agree, #! requires more server work, and plain links works great for SEO too [17:39] felixge: creationix: well, let me know if you hear about something that would fit the bill [17:39] ben_alman: yes Kingdutch [17:39] felixge: ryah: mostly getting rid of all these loose functions, and make them class methods of the Module constructor [17:39] ben_alman: well #! doesn't require the user to actually care about how the non-js site looks, just that it serves content [17:39] ben_alman: so it could be use after-the-fact to just "enable" seo [17:39] felixge: ryah: also putting requireNative into the module system, not on the outside [17:40] ben_alman: but it's a bad practice [17:40] felixge: ryah: let me show you my current status [17:40] creationix: felixge: go ahead and send me your contact info and what you're looking for in email [17:40] felixge: ryah: https://gist.github.com/776530 [17:40] Kingdutch: ben_alman: I don't understand that line, since the non-js site could look the exact same as the JS site [17:41] Kingdutch: I just need a way of distingquishing the different retrievals now though [17:41] felixge: ryah: if you look at the diff, that's the overall direction I'd like to take with this [17:41] ben_alman: send a header in your GET request [17:41] bradleymeck: is there a good oauth provider module? [17:41] ben_alman: to differentiate them [17:41] felixge: creationix: sending you an email [17:42] ryah: felixge: sure [17:42] Kingdutch: ben_alman: Ooh headers :) [17:42] ben_alman: so are there node alternatives to Step or best practices? how do people generally handle chains of async callbacks [17:43] creationix: ben_alman: why would you ever want an alternative to my step ;) [17:43] felixge: ryah: ok, I'll continue with it then : ) [17:43] creationix: ben_alman: mainly, just understanding javascript well goes a long ways. See the recent thread on the mailing list and the infoq article about it [17:43] ben_alman: creationix: i love your implementation but i am afraid of getting tied down to a not-widely-used implementation [17:43] felixge: ryah: once I'm done I might also like to propose another patch for testing, but this has to be cleaned up first before :) [17:43] ben_alman: i'm not new to javascript, but i am noew to node [17:44] bradleymeck: oi, i love Step, but mostly hand code stuff [17:44] losing has joined the channel [17:44] ben_alman: so many of the patterns are, while understandable (and cool) quite different than what i typically use [17:44] creationix: I think step is the most popular within the node community (well, after home grown stuff) [17:44] creationix: most people just roll their own framework/library [17:44] ben_alman: while rolling your own is awesome, it's like.. a lot of extra work [17:44] creationix: not really [17:44] tanepiper: for me it's between Step and Seq, they are both good at what they do [17:45] ben_alman: yes really [17:45] bradleymeck: as long as your api does f w/ my brain by requiring me to know your chaining system internals im good [17:45] ben_alman: i'd say, generally, it's non-trivial to code up a framework [17:45] creationix: Step is all of about 100 lines and I haven't had to update it in over 6 months [17:45] creationix: that's about as easy as a framework gets [17:45] ben_alman: step isn't really a framework [17:46] ben_alman: i mean, it's just a utility for sequential callback execution [17:46] creationix: right, that's all a framework should be imho [17:46] ben_alman: well, i guess if you're calling that a framework then i agree with your statement [17:46] ben_alman: it's not hard [17:46] ben_alman: but all these little things add up for sure [17:46] creationix: anything that tells you how to write your code is bad, anything that helps you write code your way is good [17:47] creationix: and 90% of generalisations are wrong [17:47] ben_alman: i see, so seq takes a chaining approach [17:47] ben_alman: while step is arguments [17:47] EGreg: hey it's ben alman! [17:48] ben_alman: hiya EGreg [17:48] EGreg: what you up to these days... doing any more jQuery plugins? [17:48] ben_alman: i'm working on jQuery and JavaScript training mainly [17:48] creationix: training is good [17:48] ben_alman: and i have a bunch of plugin updates and new stuff [17:48] creationix: we need more people who know javascript [17:48] ben_alman: but right now i just want to redo my site [17:48] halfhalo: ACTION wants this function to become sync [17:48] creationix: I've considered offering free private lessons just so I can fill more positions [17:48] ben_alman: creationix: yeah, i blog about concepts and stuff, and do comprehensive trainings [17:49] mape: creationix: Any plans on making it so spark can deal with crashing children and create new ones? [17:49] ben_alman: through my company, bocoup [17:49] creationix: I don't maintain spark or connect anymore [17:49] steffkes has joined the channel [17:49] creationix: but spark2 has a lot of neat features [17:49] creationix: I think it's under dav glass's github [17:49] mape: oh k [17:49] isaacs has joined the channel [17:50] EGreg: I like your site's design btw [17:50] EGreg: although many people didnt :P [17:50] ben_alman: who, mine? [17:50] wmealing_: do node.js native extensions need to be C++ [17:50] creationix: halfhalo: become one with the async [17:51] creationix: wmealing_: at least enough C++ to hook into V8 [17:51] wmealing_: ok [17:51] tc77 has joined the channel [17:51] halfhalo: ACTION only wants a way to fire off a return on a function when an event is recieved inside of the function [17:51] halfhalo: creationix: most of the code is, but for certain parts it makes a crapton more sense to have sync [17:51] EGreg: ben_alman ... I think I made some really cool Javascript functions for controlling flow in Node.js [17:51] EGreg: what would you recommend I do? [17:51] jchris has joined the channel [17:51] jbpros has joined the channel [17:52] EGreg: Throw them up on github and make a site about them? [17:52] ben_alman: cool. Seq actually looks pretty sweet [17:52] ben_alman: well, yeah i guess just make people aware of them [17:52] creationix: EGreg: and put it in npm [17:52] EGreg: Yeah I know the guy who made it. He made dnode also [17:52] ben_alman: i don't know how the community flows with node [17:52] EGreg: how do I put it in npm [17:52] ben_alman: ACTION has no idea there [17:52] EGreg: well these 2 js functions are good for both browser and node.js [17:52] isaacs: EGreg: npm help developers [17:52] ben_alman: i've literally just started using node, and i have absolutel 0 working code yet [17:52] creationix: put a package.json in your project and then "npm publish" [17:52] isaacs: creationix: there's a *little* bit more than that [17:52] EGreg: ah nice :) [17:52] EGreg: that's simple [17:53] creationix: ok, and create a user account [17:53] EGreg: Basically the two functions do this: [17:53] isaacs: you also have to do npm adduser, and it should ideally install properly [17:53] EGreg: one is called Q.pipe [17:53] EGreg: (my lib is called Q) [17:53] isaacs: EGreg: i think there's already a Q [17:53] EyePulp: ben_alman: patience. it takes time, and you'll be hand rolling a lot of things you take for granted elswhere =) but it's fun to steal client-code and have it run on your server... [17:53] EGreg: Q.pipe basically is a generalization of seq and node-lazy [17:53] EGreg: fine I'll call it something else then [17:53] isaacs: http://github.com/kriskowal/q/ [17:53] halfhalo: ACTION bashes his head into the desk [17:53] norviller has joined the channel [17:53] EGreg: basically it lets you program in the following style: [17:53] creationix: halfhalo: you should instead give the desk a callback to get at your head [17:54] dmcquay has joined the channel [17:54] EGreg: get stuff.... when A and B are available, do some more stuff ... as soon as A and C are available, do something else ... and also, do X for each time something returns through the pipe [17:54] EGreg: so you basically wait for objects to become available and do stuff. You don't care how they become available [17:54] Kingdutch: I love how I can override my log function for my entire program with: oldLog = log; log = function() { sys.puts("Special me!"); oldLog(); } :> [17:54] jchris has joined the channel [17:54] EGreg: the other function is called Q.getter . There you REALLY dont care how they are available. [17:54] creationix: sounds kinda like conductor [17:55] EGreg: You just do Users.getUser(function (user) { do stuff } ) [17:55] wmealing_: node with libusb, nice [17:55] halfhalo: ACTION will drive up there and asyncly stab creationix with a knife [17:55] EGreg: and the great part is, it's re-entrant, you can call getUser many times etc. [17:55] ben_alman: EyePulp: i've kinda gotten to the point where i don't want to write all my own little utility code [17:55] EGreg: Users.getUser(29384, callback) [17:55] jimt has joined the channel [17:55] EGreg: Users.getUser(29384, callback2) [17:55] void_ has joined the channel [17:55] ben_alman: and just want to get work done [17:55] ben_alman: but i guess with node, it's both since it's all so... new [17:55] EGreg: ben_alman what u doing with node [17:55] adambeynon has joined the channel [17:55] ben_alman: redoing my site [17:55] creationix: halfhalo: no, I won't give you a callback handle to stab me, sorry [17:56] ben_alman: or, trying to [17:56] ben_alman: anyone use deferreds in node? [17:56] ben_alman: that seems pretty sweet [17:56] creationix: ben_alman: yeah, there are people using promises, futures, and deferreds [17:56] EyePulp: ben_alman: I hear you. I used a lot of the pre-built modules initially, found them too much or too little, and then just started learning via baby steps. Painful, but a better education. [17:57] EyePulp: and a much leaner codebase now [17:57] creationix: ben_alman: have you seen this http://www.infoq.com/articles/surviving-asynchronous-programming-in-javascript [17:58] halfhalo: ACTION goes to think of some convoluted as hell way to make this act syncishly [17:58] astoon has joined the channel [17:58] ben_alman: creationix: awesome, thanks [17:58] creationix: halfhalo: it's impossible, you CAN'T make async functions look sync [17:58] creationix: async is viral like gpl [17:58] ben_alman: i've used a few methods for handling async stuff [17:58] ben_alman: would like to expand my brain there [17:59] creationix: halfhalo: but chaining and other techniques help make it *look* sync [17:59] altamic has joined the channel [17:59] mikeal has joined the channel [17:59] xla has joined the channel [17:59] sechrist: you can make async look like sync [17:59] sechrist: but it's evil [17:59] sechrist: there we dragons there [17:59] halfhalo: I can live with evil [17:59] sechrist: I mean in general [17:59] sechrist: aka not in nod [17:59] sechrist: node* [17:59] sechrist: coroutines suuuuuuck [17:59] ben_alman: in my ideal world, you wouldn't be able to differentiate between sync and async code [17:59] halfhalo: Its a single function that will only be used sync in a few specific instances [18:00] ben_alman: which is why i like deferreds [18:00] sechrist: well [18:00] sechrist: use chaining [18:00] sechrist: and ignore the dots [18:00] sechrist: you don't need sync looking code [18:00] sechrist: I said that when I first started using node [18:00] sechrist: then I realized I was retarded [18:00] ben_alman: no it's not that [18:01] jchris has joined the channel [18:01] ben_alman: i just think that when you "do something" and get "a result" it would be nice if your code just looked the same whether you were getting the result now vs later [18:01] sechrist: weird abstractions like coffeescript may make this kind of possible [18:01] sechrist: but it's still not solving anything [18:01] ben_alman: so that you didn't have to even care if something was async or sync [18:01] sechrist: well if you design a solution inform everybody [18:02] sechrist: the entire CS world would love it [18:02] ben_alman: will do! :D [18:02] perlmonkey2 has joined the channel [18:02] ben_alman: well [18:02] ben_alman: the end result would be to make everything look async [18:02] ben_alman: but uniformly so [18:02] ben_alman: just callbacks everywhere [18:02] ben_alman: heh [18:02] ben_alman: which is what all these things do [18:02] sechrist: syncscript [18:02] sechrist: synchronous looking code that compiles to async code! [18:03] malkomal_: any good ways to delete certain lines of a file via node? [18:03] SubStack: what about asynchronous looking code that compiles to synchronous code? [18:04] Kingdutch: How does one define a dynamic web interface? Like what changes should be made to an interface when a certain request is made (They should be defined such a way that I can build the interface from scratch if no previous state is there) (BTw, asking too much?) [18:04] trotter has joined the channel [18:04] halfhalo: ACTION will attempt to make this work with async only [18:04] halfhalo: there will be thousands of callbacks.... [18:04] halfhalo: IT WILL BE EPIC [18:05] dguttman has joined the channel [18:06] EyePulp: Kingdutch: jquery on the client, and whatever on the server. et voila - dynamic interfaces. [18:07] creationix: halfhalo needs a vacation [18:07] Kingdutch: Obviously... What I mean is how can I specify what needs to be changed. I.e. all content in the body needs to be replaced with some other content [18:07] creationix: halfhalo: what are you working on? is it webos related? [18:08] mape: creationix: thanks for the spark tip [18:08] EyePulp: Kingdutch: $('body').html(new_html); [18:08] springmeyer has joined the channel [18:08] EyePulp: ACTION thinks he's missing the point of Kingdutch's question [18:09] Kingdutch: You're totally missing my point lol [18:09] Kingdutch: It's not about how ot change, but to define, what needs to be changed [18:09] Kingdutch: like [18:09] Kingdutch: Or something like that [18:10] EyePulp: Kingdutch: you can use an xhr request, and pass back json or even jsonp to get executed client-side [18:10] akahn has left the channel [18:10] msekimura has joined the channel [18:10] Kingdutch: Not sure what xhr is, but it's more like, how do I define the changes server-side, like what is a persisent way to say, this interface is based on interface A, but changes these things [18:11] Kingdutch: I'm thinking XML files [18:11] EyePulp: oh good lord no. [18:11] Kingdutch: HTML can't do it since I'd have invalid HTML tags in there =/ [18:12] EyePulp: Kingdutch: I serve up basic html and a client js. the client js makes xhr calls to the server based on events. the server responds with json. the client side uses a callback, reads the json, and acts on it. [18:12] Kingdutch: I need a way to define the changes so that if say I go from one state to the next I know what to reload, and not retransmit entire pages (Makes it faster, and better looking imo) but also that if I have no previous state I can build the interface ground up [18:13] Aria: I serve up html fragments in response, usually, keeping the rendering all server-side. [18:13] Kingdutch: That's what I want to do, my dilemma is in what way to tell the server which changes to send [18:14] EyePulp: Kingdutch: the server should be getting things passed to it from the client, which then guides its response. Its the same request/response roundtrip websites have used forever, just made more bitesize. [18:14] EyePulp: *it's* [18:15] Kingdutch: You're in implementation land [18:15] Kingdutch: Come to the designers view [18:15] Max-Might has joined the channel [18:15] Aria: I try to assign each fragment a URL. For my uses, it works. "here's a list of Xs", "Here's an X that fits in a list" [18:16] Kingdutch: how as a designer am I going to tell the server that if a user goes from domain.com/index to domain.com/profile I don't need to reload the entire body, but just the navbar and a little content block? [18:16] creationix: Kingdutch: it can be abstracted and all automatic, but often it's much easier to just manually do ajax calls for specific data [18:17] creationix: Kingdutch: but for that use case, you'd need a lot of logic in the client [18:17] Kingdutch: Here's how I see it [18:17] creationix: I would keep the server-side dumb and mostly stateless [18:17] EyePulp: Kingdutch: How do you do it in any framework/language/client/server? eliminate node from the equation entirely. How would you solve this with your favorite web tools now? [18:17] EyePulp: from a designer's standpoint, of course. =P [18:18] dguttman has joined the channel [18:18] dguttman has joined the channel [18:18] blueadept_work has joined the channel [18:18] creationix: Kingdutch: I would start out by looking at sammy [18:18] creationix: it's close to what you're looking for [18:18] isaacs: ryah: hey, is that EventSource stuff still kicking around somewhere? [18:19] isaacs: ryah: i need htat. [18:19] creationix: there is a full mvc stack in the browser and the server is treated like a dumb data repository [18:19] EyePulp: Kingdutch: and also, with your example, barring current HTML5 fanciness, how would you ever change a url without a page reload? Not the #, but the basic url? [18:19] Kingdutch: User clicks a link -> Client.js intercepts it since JS is enabled, and fires it off to the server -> Server knows current state and the state the user wants to go to so it loads some .xml file which defines the new state (That's the part I'm wondering about) -> The server parses the xml file and either sees it's based on the previous state or on a parent state of that and simpyl tells the client what is changed, OR the server sees it's based on an [18:19] Kingdutch: entirely different base and just gives the client the entire page -> We do this routine again in the next loop [18:19] isaacs has joined the channel [18:19] halfhalo: ACTION crashed node [18:20] hunterloftis has joined the channel [18:20] djanowski has joined the channel [18:20] Kingdutch: EyePulp: I actually want to use the HTML 5 fanciness [18:20] creationix: Kingdutch: that works too, but please use json, not xml [18:20] creationix: for sanity's sake [18:20] Kingdutch: well I can always send JSON to the browser, but imo XML is easier to write =/ [18:20] halfhalo: ACTION votes xml IN json! [18:20] EyePulp: heh - masochist [18:20] sudoer has joined the channel [18:21] tmzt: '<', 'html', '>' ? [18:21] Kingdutch: lol [18:21] tmzt: creationix: sammy? [18:22] creationix: http://code.quirkey.com/sammy/ [18:23] Kingdutch: But you guys agree that XML is a good way to build the interfaces for what I try to do [18:23] Kingdutch: ? [18:23] Kingdutch: It's pretty much inspired by euhm, lemme fetch a link [18:23] creationix: Kingdutch: I think it's a neat idea, I'd personally use json [18:23] creationix: but yeah, xml works ok for documents [18:23] creationix: just don' [18:23] softdrink has joined the channel [18:23] creationix: don't use it for data structures [18:23] booths has joined the channel [18:23] creationix: JSON fits with JavaScript much better [18:24] Kingdutch: Well no obv. it's just in my eyes JSON is a pain to write by hand [18:24] ben_alman: ugh [18:24] Kingdutch: xml is easier to read/modify [18:24] ryah: isaacs: https://github.com/ry/node/tree/eventsource [18:24] ben_alman: you never, ever, ever write it by hand [18:24] creationix: also, I often write in JS instead of JSON [18:24] ben_alman: unless you do [18:24] ben_alman: but don't [18:24] altamic has joined the channel [18:24] Kingdutch: lol ben_alman [18:24] creationix: then you can simply require it instead of load the file and parse the contents [18:24] ben_alman: serialize data structures into JSON using something smart [18:25] SubStack: v8: JSON.stringify({a:1,b:[2,3]}) [18:25] v8bot: SubStack: "{"a":1,"b":[2,3]}" [18:25] isaacs: ryah: ah. no activity since sept. am i to assume that it's a Big Task to get it landed? [18:25] ben_alman: oh, cool, a bot [18:25] ryah: isaacs: yeah [18:25] isaacs: that's a shame [18:25] ryah: it needs to be redone [18:25] creationix: ben_alman: there are a few bots here [18:25] ben_alman: cool [18:26] stride: dudes! evening [18:26] Kingdutch: http://www.magentocommerce.com/design_guide/articles/intro-to-layouts <-- They use XML for layouts, which although they don't allows for updates [18:26] tapwater has joined the channel [18:26] stride: node-faq show node.js to ben_alman [18:26] node-faq: ben_alman: node.js is "awesome!" [18:26] Kingdutch: Just can't grasp how they ever did it, which is why I don't use magento as e-commerce software [18:27] creationix: Kingdutch: if you want really easy to write, just make your own language and write a parser to convert it to javacsript/xml/json/whatever [18:27] mdoan has left the channel [18:27] creationix: https://github.com/creationix/topcloud/blob/master/examples/Main.tci [18:27] creationix: for example [18:27] twoism has joined the channel [18:27] gattuso has joined the channel [18:27] gattuso: hi [18:28] Kingdutch: I should just mix HTML layouts with custom XML tags [18:28] Kingdutch: Purists are gonna hate [18:28] gattuso: in node.js 0.3.4 what is the global object? [18:28] creationix: gattuso: same as it's always been [18:28] creationix: "global" [18:28] gattuso: ok [18:28] creationix: the equiv of "window" in the browser [18:29] creationix: except there is nothing extra on it [18:29] ryah: isaacs: did path.split go away? :/ [18:29] kiddphunk has joined the channel [18:29] gattuso: creationix: thanks [18:29] jtrally: How is XML easier to type? my foo vs {fooTag:"my foo"} [18:29] ryah: isaacs: during the windows revamp i guess [18:29] isaacs: ryah: yeah, remember? that path windows stuff that piscisaureus did. [18:29] isaacs: ryah: yeah. [18:29] gattuso: then i have a problem [18:29] isaacs: it's not windows-safe. [18:29] gattuso: i'm trying to use mootools [18:29] Kingdutch: jtrally: Add some attributes in there [18:29] isaacs: you end up with ["c:", "", "windows"] [18:29] SubStack: jtrally: don't forget the doctype and the encoding! [18:29] gattuso: but when i apply methods to GLOBAL [18:30] Twelve-60 has joined the channel [18:30] jtrally: yeah but even at the most basic its a pain in the ass [18:30] halfhalo: ACTION runs into the wall headfirst [18:30] gattuso: i can't normally access with namemethod [18:30] isaacs: god, i hate windows path handling. [18:30] isaacs: it's so wildly insane. [18:30] ryah: isaacs: is there a good way to get the filename of a path? .e.g '/blah/foo/bar.js' -> 'bar.js' ? [18:30] creationix: gattuso: "apply methods" [18:30] jtrally: god, i hate windows path handling. [18:30] gattuso: but i have to do something similar to GLOBAL.namemethod [18:30] creationix: ? [18:30] gattuso: is normal? [18:30] isaacs: ryah: path.basename(x) [18:30] ryah: great [18:30] mlins has joined the channel [18:31] gattuso: creationix: what i did [18:31] Kingdutch: I actually like C: and D: =/ [18:31] isaacs: ACTION is now giving nodejs support to ryah. the snake has finally swallowed its own tail. [18:31] Kingdutch: To me those letters represent drives [18:31] Kingdutch: Which is more meaningful than / [18:31] ossareh has joined the channel [18:31] booths has joined the channel [18:31] isaacs: now all i need is someone to tell me how npm works... [18:31] isaacs: ;P [18:32] jtrally: ' / = root // = root of roots. Letters = arbitrary [18:32] creationix: isaac, first tell me how stack works [18:32] dgathright has joined the channel [18:32] gattuso: creationix: how? [18:32] creationix: gattuso: I see [18:32] creationix: but why do you need this anyway? [18:33] isaacs: jtrally, Kingdutch: another way i've heard it explained is that it's like urls, and each drive is a hostname. [18:33] isaacs: but the thing is, the computer is still one host. [18:33] isaacs: so that's dumb. [18:33] gattuso: creationix: i like the Class method [18:33] Kingdutch: :') [18:33] SubStack: I like how the first two drives are reserved for devices that modern computers don't have anymore [18:33] Kingdutch: Aria: B:? [18:33] CIA-121: node: 03Ryan Dahl 07master * r1b63bd1 10/ lib/_debugger.js : tab completion for commands in debugger - http://bit.ly/hVFbl1 [18:33] Kingdutch: Floppy and? [18:33] isaacs: i tell ya, some day i'm going to find some awesome feature in windows, and be forced to admit that it's not completely crap, and my whole world will come crashing down. [18:33] creationix: gattuso: what does that have to do with putting properties on global? [18:33] CIA-121: node: 03Ryan Dahl 07master * r72589b6 10/ lib/_debugger.js : debugger: Only display basename of scripts - http://bit.ly/dLyr0u [18:34] fly-away has joined the channel [18:34] isaacs: Kingdutch: two floppies [18:34] creationix: isaacs: just buy some "windows is not crap" insurance [18:34] Kingdutch: Ah [18:34] isaacs: Kingdutch: or, 5.25" and 3.5" [18:34] Kingdutch: Wait [18:34] Aria: Hm, Kingdutch? [18:34] Kingdutch: you say you don't have floppies anymore? [18:34] isaacs: Kingdutch: usually A was 5.25 and B was 3.5 [18:34] Aria: You touchin' my /dev/fd1? [18:34] Kingdutch: Oh Aria That's autocomplete on A: for ya, sorry [18:34] booths: So, was doing troubleshooting with someone yesterday about ENOBUFS I'm seeing (http://pastebin.com/Ua6Zu6xz) using Cygwin / Node 0.3.1... (more) [18:34] Aria: Hehe. [18:34] isaacs: the thing is, on unix systems, you have /dev/whatever which is also pretty sensible. [18:34] isaacs: then you can mount drives/folders wherever you want. [18:34] gattuso: creationix: on browser if i add a method with something similar to window.qualcosa i can access it with qualcosa [18:34] SubStack: ollydebug runs in windows [18:34] booths: I tried modifying (https://github.com/ry/node/blob/v0.3.1/src/node_net.cc#L368) to include && errno != ENOBUFS, which is causing the program to no longer crash on an outgoing connection, but I guess the problem is that something is preventing me from making that outgoing connection via createClient [18:34] isaacs: it's all much more internally consistent in the notation, and abstracts out what you don't care about. [18:35] creationix: gattuso: sure, but what's wrong with "foo = true" [18:35] creationix: leave off the var and it will be top-level [18:35] SubStack: some day I'll write my own crazy debugger [18:35] gattuso: creationix: uhm? [18:35] creationix: or put an explicit var at the top level [18:35] Kingdutch: I still like -> mv -R / /dev/null [18:35] booths: Any ideas? I did edit /etc/resolv.conf to have the internal DNS that my company is using (the DNS address applied to the machine) [18:35] Kingdutch: *sudo mv -R / /dev/null [18:36] isaacs: THROW IT INTO THE FIRE! [18:36] gattuso: creationix: i know, but i have to load it with a closure if i want to use the more clean require() method [18:36] creationix: var Class = require('myclasslib') [18:36] creationix: gattuso: what's wrong with that? [18:37] piscisaureu_ has joined the channel [18:37] gattuso: nothing, if that work [18:37] gattuso: https://github.com/cpojer/mootools-loader [18:38] gattuso: i'll try with a closure [18:38] booths: I'm thinking it's a problem with the DNS at least... should I not be using the internal DNS if it's an internal only server? [18:38] gattuso: i'll came later [18:38] gattuso: thanks [18:38] creationix: gattuso: yeah, I don't know why GLOBAL and global aren't working as expected [18:38] creationix: but just use the second style "var Class = require('./MooTools').Class;" [18:38] creationix: it's better anyway [18:39] creationix: gattuso: or if you really want browser-like behavior eval(fs.readFileSync("somefile.js", 'utf8')) [18:40] sivel has joined the channel [18:40] mjr_ has joined the channel [18:41] zorzar_ has joined the channel [18:41] booths: Well, I guess Ill post my question on SO, but quick question, Connect spawns new proccesses for each HTTP Request? [18:41] booths: if you use connet.router() [18:41] mjr_: node is a single process [18:42] booths: Right, but it seems as if Connect is spawning new proccesses? Or at least catching exceptions. [18:42] mjr_: Connect just makes it easier to work with connections in node's event loop. [18:42] Aria: I'd imagine it catches exceptions. [18:42] mjr_: Ahh yes. Exceptions are often surprising. [18:42] ryah: mjr_: i think he means for gzip [18:42] mjr_: Ohhhh, it might at that. [18:43] creationix: the default gzip library spawns gzip in a subshell [18:43] creationix: node needs a native gzip [18:43] creationix: we already have libz included in the binary anyway [18:43] ryah: sigh. [18:43] mjr_: creationix: I agree. Make it so. [18:43] booths: Alright, so that might be what I'm seeing then, thanks. [18:43] creationix: ryah: if people are really worried about eating cpu, they can make a second node process that does the gzipping [18:43] ryah: the problem with all these things is that they're 2 day projects [18:44] ryah: and i've got about 50 of them :) [18:44] creationix: ryah: would you take a gzip patch if someone did it? [18:44] creationix: I think there is enough interest someone would do it for you [18:44] ryah: i would - but i want to discuss it first [18:45] Aria: gzip sounds like something that might make sense to thread, too. Well defined in and out points, no communication except on completion of some amount of data. [18:45] ryah: iit should be a stream [18:45] ryah: i had a dream about the module system too [18:45] creationix: Aria: I'm not sure what threads buy you, it's a CPU clobking operation [18:45] creationix: it's not like IO wait [18:45] ryah: i think src/node_http_parser.cc should be moved to lib/http/parser.cc [18:45] Aria: Exactly that. I've two cores! [18:45] o_o has joined the channel [18:46] ryah: with a lib/http/wscript [18:46] zorzar has joined the channel [18:46] creationix: Aria: do threads really use other cores? [18:46] ryah: and lib/http.js to lib/http/index.js - maybe [18:46] c4milo: creationix: good question ahaha [18:46] c4milo: creationix: ++ [18:46] Aria: Yes. Unless your OS is spectacularly insane. Why wouldn't they? [18:47] jimt_ has joined the channel [18:47] mjr_: Threads often use other cores, depending on what you have them do. [18:47] creationix: I guess as long as it's just one or two threads, it's ok, but not a thread per call [18:47] c4milo: Aria: mjr_: that's up to the scheduler [18:47] curtisc has joined the channel [18:47] creationix: threads have heavy cpu cost when you get a lot of them [18:47] creationix: and the gzipping is already using up some cpu [18:47] Aria: Yeah. Switching is what really costs you. [18:48] Aria: I'd imagine 1, _maybe_ two threads per core would be optimal on most OS schedulers. [18:48] creationix: I've been bitten by node's thread pool for disk IO a time or two [18:48] Aria: Oof! [18:48] creationix: when I profiled my database, it was about 60% in pthread mutex lock [18:48] creationix: or something like that [18:48] Aria: Ooofta. YEah. Mutexes are the devil. [18:48] creationix: and that's for disk io, where the cpu can wait and rest [18:49] Aria: (hence something like completion events rather than mutexes -- give the thread a private copy of the data via whatever method you can, so you don't have to exclude others from it.) [18:49] creationix: I imagine gzip will be work [18:49] creationix: *worse [18:49] creationix: Aria: that's a good idea [18:49] isaacs_ has joined the channel [18:50] c4milo: async programming is the way to go , everybody knows that, even Microsoft [18:50] creationix: sadly that's just above my understanding [18:50] augustl has joined the channel [18:50] Aria: Threads are best used asynchronously. [18:50] creationix: I understand now excluding others being good though [18:50] creationix: *not [18:50] Aria: Fork off a relatively long process, and have it just tell you when it did something important. [18:51] creationix: Aria: but does that process share memory, or are you serializing data across? [18:51] Aria: Well, in-process, you can just trade ownership of data, rather than serializing it. [18:51] Aria: "Here. It's yours. Tell me when I can have the results back." [18:51] Aria: You pass pointers rather than serializing data, essentially. But the trick is to have the ownership transfers be simple and clear. [18:51] jimt has joined the channel [18:52] creationix: that should work for a gzip module [18:52] Aria: The only time you need to mutex is when you've not been clear about that. [18:52] Aria: Exactly. gzip is nice -- "big chunk in" "big but not as big chunk out" [18:52] Aria: And you don't usually want the original back. [18:52] Aria: (at least not in a stream interface) [18:52] creationix: and most cases you don't need the data you gave it modified [18:53] creationix: just new data in return [18:53] Aria: right. [18:53] creationix: sounds fine by me in concept, but I have no clue how to implement that [18:54] Aria: ACTION nods. [18:55] creationix: what I do know how to implement is seperate processes talking over serialized ipc [18:55] Aria: ACTION nods [18:55] Aria: You'd use ev_async_send in the thread to call back and say there's data. [18:56] ben_alman: SubStack: you wrote Seq? [18:56] Aria: (and could probably just loop on a posix semaphor in the thread -- sem_wait until the node main thread gives you data, then do stuff, and ev_async_send when done.) [18:56] SubStack: affirmative [18:57] ben_alman: have you considered a .debug() type method that works like seq but simply dumps useful stack/this info to the console and continues? [18:57] jimt_ has joined the channel [18:58] SubStack: you could just do .seq(function () { console.dir(this) }) [18:58] SubStack: oh wait [18:58] SubStack: you could just do .seq(function () { console.dir(this); this(null) }) [18:58] ben_alman: k [18:59] lukegalea has joined the channel [18:59] femtoo has joined the channel [19:00] losing_ has joined the channel [19:00] isaacs: ryah: 72589b6 <-- could be annoying to have a stack trace full of "index.js", no? [19:01] aklt has joined the channel [19:02] isaacs: SubStack: something really bugs me about this(null) [19:02] aconran has joined the channel [19:02] ryah: isaacs: indeed - that's not stack trace - it's a list of the scripts involved [19:02] ryah: isaacs: it would be nice to display enough of the path starting at the leaf, working upwards, such that each script was uniquely identified [19:02] xSmurf: mroing nodites [19:02] ryah: btw, i just used the debugger in real life [19:03] ben_alman: isaacs: can you just call this() ? [19:03] ben_alman: i mean, then the 1st arg is undefined (assuming you're not using arguments.length in there) [19:03] V1 has joined the channel [19:03] isaacs: SubStack: "this" sound be an object, not a function [19:04] isaacs: ryah: how was it? [19:04] SubStack: it is! [19:04] ben_alman: lol functions r objects [19:04] SubStack: you can do fun stuff like this.into('key') [19:04] isaacs: SubStack: i mean, unless you're adding stuff to Function.prototype, this() seems weird. [19:04] ben_alman: yeah i liked that [19:04] ben_alman: isaacs: when you pass this into a function as the callback, it's getting executed internally the same as this() [19:04] SubStack: isaacs: just expectation I guess. I think of `this` like an implicit parameter [19:05] ben_alman: it just has a reference [19:05] SubStack: like a state monad [19:05] ben_alman: var cb = this; cb() [19:05] sveimac has joined the channel [19:05] eddanger has joined the channel [19:05] isaacs: yeah. i guess i just dislike relying on "this" being something that you can modify or tweak. [19:05] ben_alman: awesome [19:05] ryah: isaacs: it worked [19:05] ryah: :) [19:06] ben_alman: well you can't modify what `this` references, but you can modify any of its properties [19:06] isaacs: i'd use the debugger, except that my code never breaks on my own machine. [19:06] isaacs: NEVER EVER FOREVER. [19:06] SubStack: well blame creationix he gave me the idea! [19:06] ben_alman: it's a good idea [19:06] SubStack: with step [19:06] isaacs: SubStack: oh, i know where the blame lies ;) [19:06] creationix: what idea, I wasn't watching [19:06] isaacs: creationix: this() [19:06] ben_alman: creationix: this as callback [19:06] SubStack: hahah yeah I would have written it that way anyway [19:06] xSmurf: I have to admit... [19:06] creationix: I got it from flow-js [19:06] xSmurf: ACTION misses YUIs bind() method [19:06] ben_alman: lol nobody is responsible [19:06] creationix: ACTION passed the blame/praise [19:06] SubStack: pass the buck! [19:07] xSmurf: .bind(this) << godly [19:07] SubStack: oh wait [19:07] ben_alman: SubStack: i probably would've had this be an object or instance with the callback as a property of it, not this as the callback itself [19:07] ben_alman: just out of habit [19:07] creationix: ben_alman: that's probably a better way [19:07] creationix: I just wanted to save typing [19:07] SubStack: sometimes [19:07] ben_alman: but considering that the most common use-case is really just the callback, it's very clean in the resulting code [19:08] ben_alman: creationix: i like it. elegant and exploitative of js's functions [19:08] ben_alman: -as-objects [19:08] isaacs: xSmurf: you know, v8 has native bind [19:08] mikeal has joined the channel [19:09] SubStack: bind() kinda sucks [19:09] losing_ has joined the channel [19:09] ben_alman: SubStack: the stack in Seq is always growing until you clear it explicitly? [19:09] SubStack: since there's no function that just passes along the arguments, you've got to set `this` [19:09] SubStack: so currying is annoying to do [19:09] ben_alman: SubStack: you could write a trivial partial function [19:10] dthompson has joined the channel [19:10] nejucomo has joined the channel [19:10] ben_alman: i do wish that JS came with Function#partial along with bind [19:10] SubStack: the stack doesn't grow, it gets reset every time you hit a seq() [19:10] ben_alman: oh. [19:10] SubStack: it only grows when you do a chain of par()s [19:10] ben_alman: gotcha [19:10] SubStack: or when you call the stack modifiers [19:10] langworthy has joined the channel [19:10] ben_alman: i have an article on partial application coming out maybe even this week [19:11] ben_alman: soon, at any rate [19:11] thebigbad: mmm... curry [19:11] ben_alman: and is the entire stack .apply'd to every .par method after a .seq? [19:11] mraleph: monads in js anyone? [19:12] altamic has joined the channel [19:13] ryah: mraleph: is gdbjit going to land? [19:13] mraleph: ryah: yep [19:13] ryah: \o/ [19:13] ben_alman: wait.. SubStack, wouldn't .seq(function () { console.dir(this); this(null) }) reset the stack? [19:14] ben_alman: what if you wanted to log but not reset the stack? [19:14] mraleph: ryah: this week I hope to find a bit of time to go through Erik's comments. [19:14] Gruni has joined the channel [19:15] sveimac_ has joined the channel [19:15] perlmonkey2: I installed Connect with npm. My node is installed in userspace. Where are the man pages for Connect? [19:15] ben_alman: SubStack: yeah, it resets the stack then.. is there a way to execute a .seq and have it not reset the stack? [19:16] perlmonkey2: or do they not get installed with npm? [19:16] isaacs: perlmonkey2: npm get manroot [19:16] sveimac has joined the channel [19:16] mlins has joined the channel [19:16] djanowski has joined the channel [19:16] perlmonkey2: isaacs: wow, sweet, thanks :) Guess I need to read up more on the npm [19:16] ryah: mraleph: what about the patch from the gdb mailing list? [19:16] ryah: mraleph: did that work out: [19:16] ryah: ? [19:16] isaacs: perlmonkey2: (also, i'm pretty sure node is always installed in userspace, unless you've figured out a way to compile it into your kernel ;) [19:17] m0rganic has joined the channel [19:17] dgathright has joined the channel [19:17] springify has joined the channel [19:17] isaacs: perlmonkey2: it should print out a warning that it's installing man pages to a place that isn't in your MANPATH. read up on `man man` to see how to address this. man's logic is *ridiculously* complex, so i just don't even touch it. [19:17] mraleph: ryah: have not tried it really. judging from subsequent messages the patch was not completely correct :-) [19:18] podman has joined the channel [19:18] perlmonkey2: does look like Connect didn't get its man pages installed with npm....guess I can try grabbing and building it myself. [19:18] stride: woah. wth, can we ban HTML posts from the mailing list? [19:18] mraleph: ryah: I did not actually do anything with gdbjit since my vacation ended :-) [19:18] podman: wow, lots of people here [19:19] isaacs: perlmonkey2: i'm not sure if connect tells npm about it's man pages. creationix? [19:19] podman: i've been playing around with expressjs and was wondering if there way anyway to stub method calls in expresso like you can with say rspec, or is that just not possible? [19:20] ryah: mraleph: if you get it in we can start improving it :) [19:20] CIA-121: node: 03Ryan Dahl 07master * r33c3394 10/ (lib/net.js test/simple/test-net-connect-timeout.js): [19:20] CIA-121: node: Add test for connection timeouts [19:20] CIA-121: node: Also make socket.end() destroy connection if still trying to connect. [19:20] CIA-121: node: Previously was ignoring. - http://bit.ly/g1jZYY [19:20] isaacs has joined the channel [19:20] CIA-121: node: 03Ryan Dahl 07v0.2 * r82afd0d 10/ (lib/net.js test/simple/test-net-connect-timeout.js): [19:20] CIA-121: node: Add test for connection timeouts [19:20] CIA-121: node: Also make socket.end() destroy connection if still trying to connect. [19:20] CIA-121: node: Previously was ignoring. - http://bit.ly/e88Xn1 [19:20] yozgrahame has joined the channel [19:20] nsswb has joined the channel [19:21] robotarmy has joined the channel [19:22] ossareh has joined the channel [19:22] bradleymeck: podman im not familliar with rspec, what are you trying to do exactly? something like __methodMissing__ when routing? [19:22] piscisaureu_ has joined the channel [19:23] mraleph: ryah: yeah. also a guy from mailing list (Sanjoy Das) expressed interest in writing generator for .eh_frame to enable stack unwinding on x64. [19:23] bradleymeck: or are you trying to tie routing to a prototype? [19:23] podman: bradleymeck: neither, actually [19:23] podman: i want to test different scenarios for given routes [19:23] gf3 has joined the channel [19:23] podman: like if a document exists in mongodb or not [19:24] podman: so i'd like to stub out the calls to mongodb for each test so i can have them return null or a document [19:24] podman: that kind of thing [19:24] djanowski_ has joined the channel [19:25] bradleymeck: i dont think it can stub out its data backends like that, at least not built in :/ [19:25] bradleymeck: tj might know better [19:27] podman: otherwise i have to make sure that there is always a mongodb server running locally and is properly populated with test documents [19:28] bradleymeck: yep, thats the way to go for now i think. Stubbing out data backends is a bit overkill unless someone funds that [19:28] geojeff has joined the channel [19:29] x_or has joined the channel [19:30] bartt has joined the channel [19:30] kuhrt has joined the channel [19:30] podman: something like this is kind of what i'm looking for: http://cjohansen.no/en/javascript/javascript_test_spies_stubs_and_mocks [19:30] blueadept_work has joined the channel [19:31] flippyhead has joined the channel [19:32] djanowski has joined the channel [19:33] tmzt: node doesnt do zlib compression internally even for compressing http results? [19:34] charlenopires has joined the channel [19:36] jchris has joined the channel [19:36] Ori_P has joined the channel [19:37] isaacs: ryah: ok, i'm sold. this is awesome. just found an actual issue with it, and fixed it. i <3 the debugger. [19:38] hornairs has joined the channel [19:38] pquerna: tmzt: not currently in the built in client. there are some 3rd party ones that do [19:39] brianmario has joined the channel [19:41] ryah: isaacs: yey :) [19:41] isaacs: i still need a way to, somehow, magically, run this debugger on someone *else's* machien [19:41] isaacs: but one problem at a time :) [19:42] bradleymeck: make a wrapper script that boots up a node instance and opens a tty port? [19:42] gattuso: creationix: ok i'm in [19:42] gattuso: creationix: i've found a bug [19:42] jimt has joined the channel [19:43] creationix: gattuso: with what? [19:43] gattuso: nodejs [19:43] halfhalo: shocker [19:43] gattuso: if i use the interactive console in nodejs, i can't use the variables of GLOBAL [19:44] Aikar has joined the channel [19:44] Aikar has joined the channel [19:44] gattuso: meanwhile i can use it while parse a script [19:44] gattuso: halfhalo: lol [19:44] jchris has joined the channel [19:44] creationix: gattuso: I believe that [19:44] altamic has joined the channel [19:45] gattuso: creationix: mh? [19:45] gattuso: i open a ticket on github? [19:46] creationix: gattuso: sure, but I'm not sure how much attention those issues get [19:46] creationix: you'd have better luck mentioning it here or on the nodejs mailing list [19:47] kuhrt has joined the channel [19:48] mediacoder: creationix: that email thing should have been a smartness-test (on twitter) to filter the noise [19:48] springmeyer_ has joined the channel [19:50] podman: well, now i'm just lost on how to use expresso. are there any good examples anywhere? [19:50] Remoun has joined the channel [19:50] djanowski has joined the channel [19:50] creationix: mediacoder: oh, not mention where my email is [19:50] isaacs has joined the channel [19:50] mediacoder: hehe, yea :-) [19:50] creationix: I got some pretty good responses already [19:51] mediacoder: yea, i also replied [19:51] felixge: ryah: you want my patch to pass make lint, right? [19:52] bmizerany has joined the channel [19:53] ryah: felixge: please [19:53] dgathright has joined the channel [19:53] felixge: ryah: :( [19:53] creationix: mediacoder: which one it you? [19:54] felixge: Binary operator should go on previous line "?" [19:54] isaacs: GOOD NEWS EVERYBODY: it's npm ls output poll time. [19:54] felixge: Wrong indentation: expected any of {10, 19, 23, 30, 32, 34} but got 8 [19:54] gozala has joined the channel [19:54] mediacoder: flashvid@ (michael from germany) [19:54] felixge: I don't think that should be any of lints business [19:54] felixge: :( [19:54] mediacoder: ^^ creationix [19:54] felixge: oh well, I'll comply for now ... [19:54] isaacs: package descriptions sometimes change. currently, i'm just putting the latest description on every pacakge. should it show the accurate descriptions per-version? (lots more data to download) or only show the description on the @latest package? [19:55] mikeal: i can't type for shit today [19:55] mikeal: my emails are basically not legible [19:55] muhqu has joined the channel [19:55] xSmurf: sorry that didn't make any sense mikeal [19:55] creationix: mediacoder: oh, right, the PGP signed one, that's cool [19:56] mediacoder: hah, yea [19:56] Kingdutch: XML Layouts are difficult [19:56] creationix: mikeal: better than my normal dyslexic typing [19:57] mikeal: too much coffee [19:57] mikeal: i want to type certain words and the muscle memory does other words [19:57] bradleymeck: isaacs is the info available if we ls npm@x.y.z (or just on the web in gener?) [19:57] bradleymeck: general* [19:57] daniellindsley has joined the channel [19:57] isaacs: bradleymeck: well, if you do `npm view foo@version description`, yeah, it'll fetch just that [19:58] bradleymeck: then id say latest is my vote [19:58] dingomanatee has joined the channel [19:58] eddanger has joined the channel [19:58] tmzt: so what would stop you from generating sammy and express routes from the same js file, maybe with processing or a shim api for partials? [19:59] podman: If i have an expresso app in server.js and i want to create a test suite for it using expresso, what is the best way to go about that? From what i can tell the tests need access to the server, but if i have the tests in another file how is that possible? [19:59] bradleymeck: felixge, but lint wants you to read to the end of every line rather than know if the next line is a continuation [19:59] tmzt: preprocessing [19:59] mischievious has joined the channel [19:59] opengeard has joined the channel [19:59] podman: i must be missing a very fundamental assumption here [20:00] bradleymeck: podman, you can run a setupscript at the top of an expresso script and make your test server run locally there [20:00] creationix: mediacoder: btw, do you have the original vector for the node logo, and what's the copyright on it? Did you give ryah ownership? [20:00] podman: bradleymeck: hmm, but then i'd just be copy and pasting the server into the test file [20:00] namelessnotion_ has joined the channel [20:01] bradleymeck: podman ideally your server startupscript would be small, pull in your config, start up the module that contains your server [20:01] podman: i guess i could create another class that's essentially a factory [20:01] yozgrahame has joined the channel [20:02] felixge: bradleymeck: lint and I don't want the same things : ) [20:02] mediacoder: creationix: i can email you the vectorfile. well, not sure what you mean by "giving ownership" we didnt do any ritual :-) ryah knows i did it, he can do whatever he wants with it [20:02] podman: but there is a fair amount of setup required for my server [20:02] altamic has joined the channel [20:04] softdrink has joined the channel [20:04] mediacoder: creationix: i dont claim any rights, i did it for the community (when node was young :-)) i aslo registered the domain back then and gave it to ryah [20:04] creationix: mediacoder: yeah, go ahead and send me the vector. I just want to use it for t-shirts or whatever to give away at node meetups [20:04] creationix: ryah: that's fine with you right? [20:04] bradleymeck: podman and you cant just require("server.js")? [20:04] jbpros has joined the channel [20:04] admc has joined the channel [20:04] podman: bradleymeck: that just executes server.js? [20:04] mediacoder: creationix: yea, ask ryah .. he told me there were some plans with the logo.. not sure what happened here [20:05] podman: bradleymeck: actually, yeah, i guess that makes sense [20:05] Aria has joined the channel [20:05] svnlto has joined the channel [20:06] bradleymeck: I hope the new logo is an animal [20:06] bradleymeck: if we get one [20:07] creationix: bradleymeck: mascot or logo? [20:07] creationix: we can have both [20:07] Kingdutch: I am sooo gonna steal the android way of defining layouts [20:07] Kingdutch: Anyone wanna shoot me or do you think it's ok? [20:08] jchris1 has joined the channel [20:09] wink_: Kingdutch: as in xml? [20:09] Kingdutch: Yeah, I was planning xml anyway, just needed a good xml implementation [20:09] Kingdutch: Android allows me to do something like [20:10] xla has joined the channel [20:12] tmzt: Kingdutch: funny, the magento method might work well for client side updates [20:13] tmzt: and its entirely designed around the concept of updating an existing hierarchy [20:13] podman: yeah, i guess i'm just not understanding something fundamental here [20:13] podman: oh well [20:13] tmzt: I would say its to verbose though [20:13] mraleph has joined the channel [20:14] bradleymeck: creationix, i think we should merge them, have the logo branded onto the hind leg of the mascot [20:14] jimt_ has joined the channel [20:14] creationix: six legged narwhal! [20:14] creationix: with two horns [20:15] creationix: :P [20:15] Kingdutch: tmzt: Yeh I figured, which is pretty much what I need, but I don't udnerstand the magento implementation [20:15] bradleymeck: I was thinking more like we should have a crab with pincers [20:16] Kingdutch: [[You know you use IRC too much when you start trying to auto-complete normal words isntead of usernames]] [20:16] brianmario_ has joined the channel [20:16] creationix: dragonfly [20:17] Kingdutch: I choose an elf! [20:17] Kingdutch: I mean fairy [20:17] Kingdutch: (Please note I'm also in #irrlicht :')) [20:17] bradleymeck: a muppet? [20:17] brianmario__ has joined the channel [20:18] Kingdutch: � [20:18] Kingdutch: You pay the usage price? [20:18] creationix: http://bit.ly/hRb3Zl [20:18] creationix: have it eating java [20:19] jimt has joined the channel [20:20] isaacs_ has joined the channel [20:24] yhahn has left the channel [20:26] namelessnotion has joined the channel [20:26] Kingdutch: lol [20:27] Kingdutch: tmzt: Any good articles on magento's way of doing layouts broken down? It feels so much more complex than necessary [20:27] jchris has joined the channel [20:27] ryah: creationix: yeah, of course [20:27] ryah: ACTION wishes he had a nodejs tshirt [20:27] creationix: ryah: but probably not ok to sell merchandise and make profit [20:27] felixge: ryah: http://www.redbubble.com/people/dmitrybaranovsk/t-shirts/5821133-1-node-js ? [20:28] felixge: I got one of these, looks very nice [20:28] felixge: :) [20:28] ryah: felixge: yeah dmitry was going to give me one but i felt guilty and refused [20:28] ashleydev has joined the channel [20:28] felixge: ryah: I think what you've done for node is worth a t-shirt to most people in here :) [20:28] felixge: you should have accepted [20:28] creationix: ryah: I'll get you one, but maybe find a cheaper store, $20 + shipping seems like a lot [20:29] bruse: that's almost 257 tshirts then [20:29] bruse: what is he going to do with all of those? [20:29] ryah: creationix: i think you can do whatever you want with the node logo [20:30] ryah: felixge: well, tbh it was a sweatshirt [20:30] ryah: well, robrighter came up with a new logo [20:31] felixge: lol, just found this: http://images1.memegenerator.net/ImageMacro/4997628/I-wrote-the-grid-in-nodejs.jpg?imageSize=Large&generatorName=Orphan-Faggot-Programmer : ) [20:31] ryah: it's pretty nice [20:31] felixge: ryah: is that the one I've seen a while ago? [20:31] mediacoder: ryah: yea, you told me there might be a new one, i just gave the original vectors to like 2-3 people (jp usergroup and the like) [20:31] teddy_ has joined the channel [20:31] piscisaureus: ACTION here. now. [20:31] V1: lol @ grid [20:31] sw33per has joined the channel [20:31] sw33per: hi all [20:32] ryah: http://node.robrighter.com/ [20:32] mediacoder: i remember ryah not wanting a logo at all.. but the community asked for one, so i had a quick shot :-) [20:33] felixge: ryah: is that the new site? [20:33] sw33per: im trying to understand node's architecture: i understand that it's an event loop waiting for requests, and when a request comes in it is dispatched to do some work while the event loop waits for more requests. however, since node is single, how does it work that the application is performing work for that first request while wiating for new requests at the same time? i can't think of how that might work without threads? [20:33] paulrobinson has left the channel [20:33] ryah: felixge: yeah [20:33] V1: I hope not [20:33] sw33per: in other words, how does the dispatch work? [20:33] V1: oops :$ [20:33] mediacoder: nice [20:33] augustl: docs are kind of sparse here :) https://github.com/isaacs/node-glob [20:33] felixge: sw33per: the event loop is blocked while your JS code is running [20:34] felixge: sw33per: so if you do CPU intensive stuff, you should put that in it's own process and use IPC (web workers) [20:34] felixge: ryah: what happened to the one I've seen a while ago? [20:34] creationix: sw33per: but IO doesn't block [20:34] deepthawtz has joined the channel [20:34] creationix: so while one request is waiting on IO, it can be handling another request [20:34] ryah: felixge: donno? [20:34] Kingdutch: No offense ot anyone, that new site feels so web 1.0 :$ [20:35] Kingdutch: It's not even centered [20:35] ryah: inarru: that was the point [20:35] felixge: ryah: oh well, this one looks nice :) [20:35] V1: Kingdutch: The first thing I thought of was MS DOS [20:35] ryah: er [20:35] ryah: Kingdutch: that was the point [20:35] Kingdutch: V1: NAh that'd be mean [20:35] Kingdutch: ryah: :S Why? It means that I need to move my view like 400px to the left >.> [20:35] TheEmpath: this channel needs more cumin [20:35] augustl: I like the new site :) [20:36] TheEmpath: ACTION sprinkles savory cumin on ryah. [20:36] c4milo: augustl: which site? [20:36] mediacoder: im just sad the logo loses the "tinycloud" :-) [20:36] augustl: kind of strange that the super mega huge call to action text has a super tiny small link to actually perform the action [20:36] felixge: mediacoder: I loved that :) [20:36] augustl: c4milo: http://node.robrighter.com/ [20:36] sw33per: felixge: so if a request came into node and did super complex math, the entire process would block? [20:36] augustl: did I fail? Is that the old site? =P [20:36] Kingdutch: Also, the font could be easier on the eyes (I haz +6 on both eyes, the nav is just tiny :O), but tohse are just my .3$ [20:37] sw33per: felixge: in that case, i guess im failing to understand how you would implmenet this such that IO wouldn't block but CPU would? [20:37] creationix: sw33per: non-blocking I/O [20:37] creationix: AIO [20:37] ryah: https://gist.github.com/776825 [20:37] creationix: callbacks [20:37] ryah: ^-- debugger [20:37] ryah: :P~ [20:37] bradleymeck: libeio [20:37] creationix: sw33per: it actually uses a thread pool for things that don't have a native aio interface [20:37] V1: That site doesn't really give me a feel of scaleability, high performance node.js it just looks like slow MSDOS app that we all where happy to drop ages ago. [20:37] creationix: but some things like networking are naticly async down to the kernel [20:38] podman: phew. ok, so i can get tests to sort of run but they never finish [20:38] creationix: V1 dos was many things, but slow was not one of them [20:38] bradleymeck: podman did you stop the server after they are done? [20:38] podman: expresso claims to do that itself [20:38] bradleymeck: *doesnt know expresso* [20:38] podman: "Performs assertions on the given server, which should not call listen(), as this is handled internally by expresso and the server is killed after all responses have completed." [20:39] nonnikcam has joined the channel [20:40] stride: isaacs: https://gist.github.com/776833 have a pointer on hwo I can debug that? tar & gzip usually work on that VM [20:40] stride: s/hwo/how/ [20:42] stride: nvm, the archive seems to be using weird unsupported stuff [20:43] desaiu has joined the channel [20:44] sw33per: creationix: so is the ability to do non-blocking IO purely at the kernel level? [20:44] creationix: well, it either has to be implemented at the kernel level or simulated through a thread pool [20:44] altamic has joined the channel [20:44] sw33per: ah ok [20:45] sw33per: the kernel piece is the part i wasn't getting [20:45] sw33per: ok, thank [20:45] sw33per: s [20:45] creationix: yeah, it's pretty awesome [20:45] bradleymeck: i once had someone try to tell me device drivers werent async... [20:45] brianc: not the best benchmark ever but I am getting about .4 milisecond execution time for a postgres query from node-postgres on my dev laptop...anyone know if that's in the ballpark of good speeds? [20:46] brianc: i always spell milliseconds with one "l". Makes me sound smart. [20:46] ryah: the problem with https client is that i need to change the whole thing [20:46] ryah: sigh [20:47] brianc: I been trying to do perf stuff w/ the v8 perf tools but is a biiiit tricky to read the result report [20:47] brianc: as in over my very low head *snort* [20:47] jchris has joined the channel [20:49] zorzar has joined the channel [20:49] jchris has joined the channel [20:50] Kingdutch: How is url.parse().uri not a string? [20:50] Kingdutch: It should support friggin .mtch [20:50] Kingdutch: .match* [20:50] jchris has joined the channel [20:50] hornairs has joined the channel [20:51] isaacs_ has joined the channel [20:51] augustl: does https://github.com/isaacs/node-glob actually work? I always get an empty array. [20:51] maushu has joined the channel [20:51] piscisaureu_ has joined the channel [20:52] augustl: user error, don't mind me [20:52] markwubben has joined the channel [20:53] rpflo has joined the channel [20:53] dingomanatee has joined the channel [20:53] jamesarosen has joined the channel [20:54] piscisaureus: ryah: do you still enjoy coding node or have you lost apetite? [20:54] augustl: is there a way to make node-glob use the path of the file it's in rather than pwd? [20:54] creationix: __dirname [20:55] ryah: piscisaureus: i go through phases, right now i like it [20:56] augustl: creationix: how do I make it use it though? :) [20:56] augustl: anw, looking at the code now I'll prolly figure it out [20:56] kolor has joined the channel [20:56] Kingdutch: Rya [20:56] altamic has joined the channel [20:57] Kingdutch: address.uri.match( == syntax error [20:57] Kingdutch: y? [20:57] bradleymeck: is uri a string or an object, JSON.stringify that sucker [20:57] mraleph: brianc: what's the problem with profiler output? [20:58] Kingdutch: Why do I always need to stringify? [20:58] augustl: seems I'd have to alter the C++ code, hmm. [20:58] Kingdutch: I can just output it to sys.puts [20:59] Kingdutch: So there's a __toString in there [20:59] pieterv has joined the channel [20:59] eddanger has joined the channel [20:59] x_or has joined the channel [20:59] bradleymeck: Kingdutch cause it isnt a string? and node generally will give output on what it is rather than what it may be wanted as [20:59] piscisaureus: ryah: is it fear to do something big that makes you not like it? or is it doubt about the project itself? [21:00] piscisaureus: btw: done yet? [21:00] Kingdutch: bradleymeck: But I can still puts it [21:00] bradleymeck: yep [21:00] willwhite has left the channel [21:00] jetienne has joined the channel [21:00] ryah: piscisaureus: *shrug* sometimes i just want to work on unrelated things :) [21:01] ryah: but can't really [21:01] Kingdutch: JSON.stringify(address.uri).match <-- Too an error at .match [21:01] creationix: ryah: you should make little node libraries that don't belong in core [21:01] creationix: they are loads of fun [21:01] Kingdutch: Is the regex .match even implemented? :O [21:01] ryah: ACTION wants to make a libc [21:01] rmanalan has joined the channel [21:01] ryah: for windows [21:01] piscisaureus: ryah: we need that! [21:01] piscisaureus: actually [21:01] ryah: i know [21:01] ryah: :) [21:02] tylerstalder has joined the channel [21:02] piscisaureus: seriously [21:02] pquerna: ryah: https://github.com/dustin/labrea http://dustin.github.com/2010/12/03/labrea.html [21:02] piscisaureus: windows can do at most 512 fds [21:02] piscisaureus: so node needs its own [21:02] bradleymeck: kingdutch regex.match is regex.exec in js's nutty world [21:02] pquerna: ryah: would be interesting to do things like simulating filesystem failures.. [21:03] pquerna: (or to simulate weird syscall behavoirs in test cases) [21:04] creationix: Kingdutch: https://developer.mozilla.org/en/JavaScript/Guide/Regular_Expressions [21:04] creationix: see the first paragraph [21:04] ryah: pquerna: neat [21:04] creationix: match is a method of Strings, exec is on RegExp objects [21:04] CIA-121: node: 03Ryan Dahl 07master * r5f795ef 10/ (lib/net.js test/simple/test-net-connect-timeout.js): net: Timeouts should work before DNS resolution - http://bit.ly/efFKVN [21:04] pquerna: like forcing read() to return -1/EIO, etc [21:04] rmanalan: hi all... just getting into express/jade... having a bit of trouble figuring out the equivalent of = yield (from haml) for may layout... anyone?? [21:05] Remoun has joined the channel [21:05] pquerna: or short reads... [21:06] Kingdutch: Right thx creationix [21:07] ryah: pquerna: yeah that's really nice [21:08] felixge: ryah: https://github.com/felixge/node/commit/2a2b7e8b0a860ae0edb62aa6db59f615ee7914fd [21:08] felixge: ryah: all tests (including lint) pass, no behavior changed [21:08] felixge: ryah: but the code should be much more readable now [21:09] creationix: felixge: nice [21:11] ryah: http://arlolra.no.de/waterfall/ab-hello-world-buffer-1024/hist/ [21:12] ryah: :P~ [21:14] losing has joined the channel [21:16] booo has joined the channel [21:16] ryah: felixge: debug() is a special call taken out by the preprocessor [21:16] piscisaureus: ryah: does resuming stdin read count as an activity that keeps node alive? And when stdin is paused again, will node exit? [21:17] booo: what's the bester rest router for nodejs out there? [21:17] mkkl has joined the channel [21:17] creationix: booo: that's a dangerous question [21:17] felixge: ryah: I think that is still working [21:17] felixge: ryah: and was a really frustrating thing to learn [21:17] felixge: :D [21:17] creationix: booo: I can recomment stack, connect, or express, depending on how much framework and abstraction you want [21:18] booo: creationix, i like danger ;) [21:18] felixge: ryah: but I could look at the preproccessor code to verify that, do you know which file? [21:18] ryah: piscisaureus: yes, it will exit [21:18] Kingdutch: Goodnight all [21:18] creationix: booo: I like minimal abstraction, so stack is my favourite this week [21:19] piscisaureus: Kingdutch: slaap lekker [21:19] ryah: felixge: tools/js2c.py [21:19] creationix: booo: https://github.com/creationix/stack [21:19] datapimp has joined the channel [21:19] stride: creationix: can you call your next module "danger" please? ;) [21:19] tilgovi has joined the channel [21:19] creationix: stride: perhaps, what should it do? [21:19] booo: we need a router that works with expressions like blub/node[key=value][anotherkey=anothervaulue] or blub/node* [21:19] stride: creationix: world domination perhaps :) [21:19] booo: should work with special characters [21:19] creationix: booo: that can be done as a stack middleware module [21:20] creationix: connect/express has one built-in [21:20] creationix: http://senchalabs.github.com/connect/ http://expressjs.com/ [21:20] creationix: I think express adds a little extra sugar to the syntax [21:21] felixge: ryah: would you prefer if I reference it as 'debug'? [21:21] booo: creationix, thx. i will have a look [21:21] ryah: felixge: also https://github.com/ry/node/blob/72589b60ada148467caa42912585316cde0ce3e8/wscript#L552-591 [21:21] creationix: stride: dunno, world domination seems more like a google thing and less a creationix thing [21:21] isaacs has joined the channel [21:22] altamic has joined the channel [21:22] ryah: felixge: yeah [21:22] felixge: ryah: ok, will do [21:22] stride: creationix: hmkay. world domination plans cancelled, again. meh [21:22] booths has joined the channel [21:22] creationix: unless world domination involves teaching EVERYONE proper Javascript and ending work hunger [21:23] creationix: that I could agree to [21:23] booths: Can anyone help with this: http://tinyurl.com/4brynty [21:27] gf3 has joined the channel [21:28] stride: booths: does that happen everytime or only under load? [21:28] booths: stride: Every time after a long duration [21:30] booths: Well, it has incoming load consistently [21:30] felixge: ryah: https://github.com/felixge/node/commits/module-cleanup [21:30] booths: From things being posted to it, but the outgoing connection appears to fail every time after some duration [21:30] CIA-121: node: 03Ryan Dahl 07master * r5f5201d 10/ (lib/net.js test/simple/test-net-connect-timeout.js): [21:30] CIA-121: node: Fix test-net-connect-buffer [21:30] CIA-121: node: Change to end() behavior in 33c339 was breaking it. end() should wait for [21:30] CIA-121: node: connection before dumping. Changed test-net-connect-timeout to use destroy() [21:30] CIA-121: node: instead. - http://bit.ly/dYnjsK [21:33] charlenopires has joined the channel [21:33] ryah: felixge: i find it a little confusing that the module module is called Module and the module class is also called Module [21:34] felixge: ryah: I'm exporting the Module class directly now. You can think of those new methods as class methods [21:34] ryah: well - okay [21:34] tg has joined the channel [21:35] CIA-121: node: 03Felix Geisendörfer 07master * r2e5dfaf 10/ src/node.js : Cleanup node module system code - http://bit.ly/ghLxsj [21:35] ryah: felixge: thanks for the clean up [21:36] booths: I really loathe Cygwin. [21:36] felixge: ryah: np : ). I might suggest another patch in a bit that I need for testing. [21:37] bradleymeck: i loathe the win32 api [21:37] creationix: ryah: thanks for taking the cleanup [21:37] Aikar: ryah: did you see my post https://groups.google.com/d/msg/nodejs-dev/k9hLOVKz568/powPg7jQxNgJ [21:38] dspree has joined the channel [21:38] dspree has joined the channel [21:38] Country has joined the channel [21:38] booths: Yeah, well I suppose my hatred for Cygwin comes from the fact that it's on Windows [21:39] ryah: Aikar: yes - like i said.. when i hit some bottleneck in my ipc protocol, i'll make a better one :) [21:41] piscisaureus: booths: tried this: http://support.microsoft.com/kb/196271 [21:42] softdrink has joined the channel [21:45] booths: Guess I'll give that a try. netstat sdoesn't show me the port for the Foreign Address connection that is the problem. It just says :http [21:46] piscisaureus: booths: its the local address that matters [21:46] booths: Ah, in that case it's 64755 [21:48] astoon has joined the channel [21:49] booths: That's a successful connection, 64755. [21:49] booths: This sounds like it already is allowing connection to ports about 5000 then [21:49] piscisaureus: booths: yeah [21:49] piscisaureus: booths: then I don't know [21:50] booths: Yeah me neither... [21:51] booths: Is what I did for the /etc/resolv.conf correct? Getting the DNS servers that the Windows side is picking up and putting those IP addresses in the /etc/resolv.conf with nameserver x.x.x.x? [21:51] isaacs_ has joined the channel [21:52] kuhrt has joined the channel [21:53] booths: I think it's a Cygwin problem directly [21:54] piscisaureus: booths: what makes you think so? [21:54] piscisaureus: booths: not unlikely tho [21:54] matjas has joined the channel [21:55] booths: Well, http://www.mail-archive.com/cygwin-xfree@sources.redhat.com/msg05789.html for one [21:55] booths: and every problem I've had so far has been with Cygwin [21:55] aheckmann has joined the channel [21:56] jchris has joined the channel [21:57] booths: That's some thread that is apparently discussing that errno, nothing tangible in the official thread that helps me fix it. [21:58] booths: I might try to convince them to just let me run a virtual machine inside this virtual machine... [21:58] dbbnj has joined the channel [21:58] jchris has joined the channel [21:59] booths: Well ill look into more tomorrow, see ya [22:00] datapimp has left the channel [22:00] jchris has joined the channel [22:02] mroman has left the channel [22:05] svnlto has joined the channel [22:08] guybrush: am I doing sth wrong here? https://gist.github.com/776999 -- why is req.body { 'bla[foo]': 'bar' } and not {bla:{foo:"bar"}} ? [22:08] bradleymeck: no v8 team nooo, dont include strict mode /cry [22:09] bradleymeck: guybrush jquery guys would know better than us [22:10] guybrush: i thought maybe i am not using the bodyDecoder properly [22:11] mraleph: bradleymeck: lol [22:12] hunterloftis: How do you guys like to handle errors/exceptions thrown within Step( ... ) ? [22:12] bradleymeck: id be fine with it, if it didnt break code as a side effect and rather broke only code in a function [22:15] mikew3c has joined the channel [22:16] montylounge has joined the channel [22:18] boaz has joined the channel [22:19] stagas: guybrush: express has connect so you can use express.staticProvider, etc. [22:19] stagas: guybrush: and do this in a node repl: require('express').version [22:20] Ori_P has joined the channel [22:21] AAA_awright: I just updated my Node.js and my require.paths is empty [22:22] svnlto has joined the channel [22:22] isaacs has joined the channel [22:22] piscisaureus: ryah: ping [22:24] gf3 has joined the channel [22:24] Fullmoon has joined the channel [22:25] andy___ has joined the channel [22:25] AAA_awright: Time to git-bisect e1f4b3f..2e5dfaf [22:26] andy___: hey everybody [22:26] andy___: i have a build question [22:27] andy___: i get an error while trying to install node on windows [22:27] felixge: AAA_awright: ouch, that could be my cleanup patch [22:27] felixge: AAA_awright: let me look into this right now [22:27] markt has joined the channel [22:27] rot13 has joined the channel [22:28] felixge: AAA_awright: is this REPL only? [22:28] alek_br has joined the channel [22:28] andy___: does anyone have any idea how to fix { task: libv8.a SConstruct -> libv8.a} [22:29] andy___: task failed err #2 [22:29] AAA_awright: felixge: Lemme see, maybe, but I looked into it because it could no longer find something in my ~/.node_libraries, but it could for a different module kept in my NODE_PATH [22:29] echosystm has joined the channel [22:29] felixge: AAA_awright: fixing this now [22:29] dguttman_ has joined the channel [22:30] AAA_awright: Yeah, node is only populating things in my NODE_PATH for regular scripts [22:30] AAA_awright: Or at least, not the defaults [22:30] AAA_awright: Did it normally populate require.paths with ~/.node_libraries and the like? I think it did, iirc [22:32] felixge: AAA_awright: yes, it did [22:32] felixge: ryah: sorry about this: https://github.com/felixge/node/commit/f3eac272f52dbb8c9fccf50704b794121c503a5b [22:32] booo has joined the channel [22:32] felixge: AAA_awright: this patch will fix things [22:33] AAA_awright: felixge: The patch that broke it passes all the tests? [22:33] felixge: AAA_awright: yeah, which is ok [22:33] felixge: AAA_awright: testing the whole module system again for the REPL would be stupid [22:34] AAA_awright: It's broken outside the REPL too [22:34] felixge: AAA_awright: not in my tests [22:34] felixge: AAA_awright: well, if you are using the debugger it would be true as well [22:34] sudoer has joined the channel [22:35] felixge: AAA_awright: or --eval [22:35] AAA_awright: felixge: Ah that's it, I am using --debug [22:35] x_or has joined the channel [22:35] felixge: AAA_awright: --debug? Or node debug