[00:00] ncb000gt: booths: that shouldn't be an issue [00:00] sudoer has joined the channel [00:00] bartt has joined the channel [00:01] booths: Alright, just as long as things in the callback aren't utilizing things outside of the callback right? [00:01] booths: ie listener hit creates a var, and then the callback references that var [00:01] ncb000gt: booths: unless they are doing something like this, pushing the callback onto an array and popping the CB only before it's used [00:01] ncb000gt: booths: afaik [00:02] booths: What would be wrong with pushing things into an array and then pulling them out? [00:02] onar__ has joined the channel [00:02] booths: I use that sometimes when I have multiple async calls and a callback to be fired once. [00:02] ncb000gt: booths: it's only an issue if you don't pop the items off [00:02] booths: I pull it out of the array completely, so it wouldn't be any the array anymore, I understand it'd take up memory while still in the array. [00:02] booths: Alright [00:03] unknowndna has joined the channel [00:03] booths: Just trying to figure out what the deal is [00:03] booths: Maybe JSON.parse? [00:03] booths: and JSON.stringify [00:03] ncb000gt: so for instance, i push onto the array and pop when all is good, but don't pop/shift when there is a problem [00:03] ncb000gt: parsing strings isn't going to be blazing fast [00:03] ncb000gt: shouldn't exactly be slow, but it wont be the most speedy thing [00:03] booths: right, but I just mean the memory usage. It goes up when I parse a ton and takes a while to settle down [00:04] booths: Also, I normally set a 10s timeout or so to make sure the array is clear if it hasn't cleared itself in that time. [00:04] ncb000gt: yea, depends on the GC in v8 [00:04] booths: Alright, so that's not just me then? [00:04] booths: Cygwin has a hacked in v8 from my understanding, so that makes sense. [00:05] ncb000gt: nah. we stresstest our servers and such and have gotten node to sit pretty high in mem usage [00:05] ncb000gt: it'll take a little to settle [00:05] ncb000gt: booths: have you looked at the mingw work that's been happening>? [00:05] booths: Nope [00:05] ncb000gt: I hear good things. Should make windows usage of node a lot nicer [00:06] booths: I got it up to about 3gigs of memory once, parsing about 15000 xml packets and then converting to json, then stringifying [00:06] booths: I'll have to check it out, that could be potentially awesome, cygwin doesn't seem to perform to well in this instance [00:06] ncb000gt: yea, xml is pretty large [00:06] ncb000gt: well, verbose [00:06] beawesomeinstead has joined the channel [00:06] beawesomeinstead has joined the channel [00:06] ncb000gt: and will add overhead [00:06] booths: Well, shitty [00:06] booths: It's all internal stuff [00:07] booths: so they don't follow standards [00:07] booths: and it pisses me off [00:07] ncb000gt: :) eh it happens [00:08] booths: mingw could be good though, will at least give me an idea of whether the problem is cygwin or not [00:08] kriszyp has joined the channel [00:08] ncb000gt: booths: yea. [00:09] booths: that was my big concern, that my callbacks were somehow hogging memory if I didn't utilize them even if I didn't save them anywhere [00:10] ncb000gt: booths: it's unlikely but possible [00:10] ncb000gt: depends on the lib [00:10] ncb000gt: still, pretty unlikely [00:11] booths: I didn't think it was likely, but just trying to iron out everything. This is a solo project, so if shit hits the fan all blame comes to me :P [00:12] ncb000gt: booths: :) [00:12] ncb000gt: been there [00:12] ncb000gt: booths: wait till people start using modules you've written [00:13] booths: yeah, I'd imagine that's fun to deal with, but at least you have no obligation :P [00:13] jimt has joined the channel [00:13] ncb000gt: heh [00:14] ncb000gt: not unless you yourself are using the module too [00:14] syntheze has joined the channel [00:14] booths: yeah thats true lol [00:14] opengeard has joined the channel [00:16] dguttman has joined the channel [00:19] jimt has joined the channel [00:21] boogyman has joined the channel [00:23] skm has joined the channel [00:23] bmp has joined the channel [00:25] beawesomeinstead has joined the channel [00:25] beawesomeinstead has joined the channel [00:25] tvon has joined the channel [00:27] jdalton has joined the channel [00:27] mscahill has joined the channel [00:27] mscahill: piscisaureus: are you around? [00:30] charlenopires has joined the channel [00:31] ryanfitz has joined the channel [00:32] techwraith has joined the channel [00:33] dominictarr has joined the channel [00:33] ryah: j/names [00:40] mikeal has joined the channel [00:41] aurynn has joined the channel [00:41] sprout has joined the channel [00:42] beppu has joined the channel [00:43] tmm1 has joined the channel [00:43] blueadept2 has joined the channel [00:43] eee_c has joined the channel [00:43] springmeyer has joined the channel [00:44] jherdman has joined the channel [00:46] sr has joined the channel [00:47] piscisaureus: mscahill: I am now [00:47] steadicat has joined the channel [00:48] jimt has joined the channel [00:48] ncb000gt: If anyone here is using the bcrypt lib I wrote, please update to the latest in npm or find it at https://github.com/ncb000gt/node.bcrypt.js/tree/v0.1.2. [00:48] ncb000gt: There was a bug related to the number of rounds of hashing. [00:48] mscahill: piscisaureus: It appears as if the python test runner is using os.path, generating paths that MinGW doesn't like... [00:49] piscisaureus: mscahill: could be, but I'm not seeing it here. And generally python has good windows support. [00:50] piscisaureus: Can you give an example of a path that it generates and that is wrong? [00:50] mscahill: sure. just a sec. [00:50] galaxywatcher has joined the channel [00:50] davida has joined the channel [00:51] mscahill: c:\node\build\default\node.exe c:\node\test\simple\test-fs-readfile-empty.js [00:51] jonaslund: piscisaureus: hi, got a binary built now... however it seems to have tried some dynamic linking (libstdc++-6.dll). anything you recognize? [00:51] mscahill: node wants either escaped slashes (\\) or forward slashes [00:52] ericnakagawa has joined the channel [00:53] piscisaureus: jonaslund: I think that is not wrong, although I would like to link that one statically [00:53] piscisaureus: mscahill: i don't think node wants that. It could be bash though [00:54] jamescarr: node.exe??? [00:54] mscahill: I'm getting the error "The filename, directory name, or volume label syntax is incorrect" [00:54] mscahill: jamescarr: yeah - we're working on porting Node to Windows [00:54] piscisaureus: may be it is not quoting correctly [00:54] mscahill: right [00:55] mscahill: do you know where in the test runner it sends the final command? [00:55] xla has joined the channel [00:56] kris_ has joined the channel [00:56] jonaslund: piscisaureus: well that dll doesn't exist in the mingw directories at all, but there's a few libstdc++ files for the linker. any idea how to force static linking ? [00:56] jonaslund: btw what version of mingw do you have ? [00:57] jonaslund: ACTION goes off downloading an older version to compare [00:57] mscahill: jonaslund: did you install the C++ compiler when you installed MinGW? [00:57] piscisaureus: jonaslund: I have gcc 4.5.0 [00:58] jonaslund: mscahill: i ran some msys installer. it compiles but the resulting binary fails to run due to the missing dll [00:58] piscisaureus: jonaslund: looking at it [00:58] mscahill: jonaslund: I'm talking about when you installed MinGW itself [00:58] hellp has joined the channel [00:59] jonaslund: mscahill: can't remember exactly. if the msys installer would've prompted me i'm sure i would've selected it [00:59] jonaslund: mscahill: if it wasn't installed i wouldn't have gotten it compiled in the first place, or ? [00:59] piscisaureus: mscahill: you won't be able to compile at all without installing g++ [00:59] mattly has joined the channel [00:59] mscahill: k [01:00] mscahill: ACTION goes back to groking the test runner [01:01] c4milo1 has joined the channel [01:01] jonaslund: ACTION ponders why he got dynamic linking at all [01:01] piscisaureus: jonaslund: yeah it makes me wonder too [01:01] mattly has joined the channel [01:02] jonaslund: it could possibly be that patch for v8 to avoid msvc [01:02] piscisaureus: hmm. then it would be chrome's fault [01:02] piscisaureus: ehm v8's [01:02] joshlockhart has joined the channel [01:02] piscisaureus: I don't think so [01:02] jonaslund: well [01:02] jonaslund: i have changed the SCons files [01:02] jonaslund: that thread about msvc [01:03] jonaslund: the env IS different [01:03] piscisaureus: could be yeah [01:03] piscisaureus: i would suggest you rename libstdc+.dll.a and retry the build, see where it fails [01:04] joshlockhart: Just learning node.js with mongo and express for the first time. Running into an issue where mongoose is not reporting Validator error messages when a model validator fails. I've posted an example app that demonstrates this at https://gist.github.com/808787. Can anyone help? [01:04] piscisaureus: it should try to link with libstdc++.a (without the dll part) [01:04] piscisaureus: It's usually somwhere here: C:\MinGW32\lib\gcc\mingw32\4.5.0 [01:04] jonaslund: yeah i found it when searching for the dll [01:05] jonaslund: if mingw uses coff i'll get a link error [01:05] jmwinn21 has joined the channel [01:05] piscisaureus: coff is not in my dictonary [01:05] jonaslund: i mean the coff binary format used by msvc [01:05] jonaslund: erm,, object format [01:06] booths: seem to be having trouble installing python with mingw [01:06] piscisaureus: ah. .obj and .lib [01:06] dnolen has joined the channel [01:06] jimt has joined the channel [01:06] booths: is there some catch, or am I running into something unique [01:07] piscisaureus: booths: no catch is known to me. [01:07] booths: do you use it? [01:07] piscisaureus: yeah [01:07] jonaslund: hey that actually worked :) [01:07] mscahill: you have to add Python to your windows PATH [01:07] mscahill: booths: ^^^ [01:08] booths: sorry, could you elaborate :P [01:08] piscisaureus: jonaslund: it didn't break but just compiled correctly :-) [01:08] piscisaureus: ? [01:08] jonaslund: now the question is.. is my mingw more or less borked now than it was before [01:08] jonaslund: no i got the repl [01:08] piscisaureus: heh. [01:09] piscisaureus: weird. Maybe it *is* due to mingw version differences [01:09] jonaslund: > print=require("util").puts; [01:09] jonaslund: [Function] [01:09] jacob_ has joined the channel [01:09] jonaslund: > print("apa"); [01:09] jonaslund: apa [01:09] davida has joined the channel [01:09] mscahill: booths: when you do `python` from the MinGW shell, what does it say? [01:09] booths: command not found, I'm trying to install it [01:10] booths: i grabbed the compressed source tarball and tried ./configure make but it didn't work [01:10] piscisaureus: mscahill: test runner calls the command @ tools/test.py line 360 I think [01:10] mscahill: no - install the windows version from python.org [01:10] piscisaureus: booths: just download binary [01:10] booths: use the windows installer? Alright [01:11] tsyd has joined the channel [01:11] piscisaureus: jonaslund: can you help me make the build process better [01:11] mscahill: piscisaureus: I escaped the path. Same error. Perhaps the node path needs to be escaped, but Node doesn't want the path escaped [01:11] piscisaureus: nooo [01:12] galaxywatcher has joined the channel [01:12] jonaslund: piscisaureus: sure, if we can get it somewhat stable then maybe i can just pull the current and compile in the future :) [01:12] jonaslund: piscisaureus: i for one hate repeating myself [01:12] booths: So I just install Python into windows and then move on in installing Node w/ mingw? [01:12] mscahill: yes [01:13] eee_c has joined the channel [01:13] piscisaureus: jonaslund: if you add this line to wscript [01:13] fairwinds: mape: ping [01:13] piscisaureus: conf.env.append_value('LIB', 'libstdc++') [01:13] piscisaureus: right after the line [01:13] piscisaureus: conf.env.append_value('LIB', 'winmm') [01:13] piscisaureus: and undo that rename action, does it still work? [01:13] booths: That was for me right mscahill :P [01:13] mscahill: yes :-) [01:13] jonaslund: w8 a sec.. lemme get it to fail [01:13] piscisaureus: booths: https://github.com/ry/node/wiki/Building-node.js-on-mingw [01:13] booths: yeah I was following that [01:13] booths: It just says get python [01:13] mscahill: thanks piscisaureus. couldn't find the link fast enough. [01:14] mscahill: bbiab [01:14] piscisaureus: mscahill: what if you insert a print statement just before the Execute() call in test.py [01:15] fairwinds: mape: I found your scraper today which works quite well. Could you add the following line to your code: $('head').append($(body).find('head').html()); [01:15] mscahill: I'll be right back. I need to go do something. [01:15] mscahill: probably an hour [01:15] piscisaureus: I will be gone by then [01:15] jonaslund: ok got the failure back.. lemme try the patch then [01:15] jonaslund: piscisaureus: what TZ are you in btw ? [01:15] fairwinds: mape: this provides access to the head of the scraped doc which I needed to get access to keywords and title [01:15] piscisaureus: It is 02:15am here [01:16] piscisaureus: UTC+1 [01:16] mscahill: oh [01:16] jonaslund: oooh CET [01:16] mscahill: crap [01:16] mscahill: piscisaureus: will you be around tomorrow? [01:16] piscisaureus: probably [01:16] mscahill: ok. I'll catch you then. [01:16] piscisaureus: ok [01:16] mscahill: have a good night [01:17] jonaslund: hmmm [01:17] fairwinds: mape: have modified my local copy but would like to see this in the source, thanks. [01:17] jonaslund: i need to rerun the configure step first now i guess ? [01:17] piscisaureus: jonaslund: considering that you went for dinner at 18:00 UTC , you must be in europe as well :-) [01:17] piscisaureus: yeah reconfigure [01:17] jonaslund: stockholm/sweden [01:18] jonaslund: did a make clean aswell [01:18] piscisaureus: yeah. well it's always dark in stockholm this time o year so it doesn;t matter if you work at night :p [01:18] jonaslund: though libv8.a will not be rebuilt (v8.lib) [01:18] piscisaureus: doesn't matter [01:18] jonaslund: yeah it's just a linker change [01:19] WarriorSl has joined the channel [01:19] piscisaureus: jonaslund: to be sure you could manually delete build/default/libv8.a so it will be relinked [01:19] mscahill: piscisaureus: where are you? [01:20] jonaslund: piscisaureus: when i compile i need to do a manual copy of v8.lib to libv8.a [01:20] piscisaureus: Netherlands (Delft) [01:20] piscisaureus: jonaslund: then that msvc problem isn't completely fixed. It should do that automatically [01:20] jonaslund: v8.lib should be rebuilt so a "proper" rebuild would be the matter of copying and re-running make [01:20] jonaslund: nope [01:20] mscahill: k [01:20] jonaslund: and that might also be the root cause for the dll foulup [01:21] piscisaureus: jonaslund: hmm.. that could be true [01:21] piscisaureus: usually only scons (that builds v8) is affected by the problem [01:21] piscisaureus: but maybe it makes waf a little dizzy too [01:21] bartt has joined the channel [01:21] jchris has joined the channel [01:22] piscisaureus: ryah: I hate waf. [01:22] dthompson has joined the channel [01:22] ryah: yes, everyone hates waf. [01:22] CIA-99: node: 03Ryan Dahl 07master * re6f14d6 10/ lib/tls.js : (suck, blow) -> (pull, push) - http://bit.ly/hq6RvP [01:22] CIA-99: node: 03Ryan Dahl 07master * r41b4ec7 10/ (4 files in 4 dirs): [01:22] CIA-99: node: TLS: flush buffer before destroy [01:22] CIA-99: node: Also disable test-https-large-response.js. Covered by [01:22] booths: So this having to modify the PATH for mingw regardless? I'm not understanding the directions [01:23] mscahill: yes [01:23] mscahill: right click My Computer [01:23] mscahill: properties [01:23] booths: The link leads to stuff about Java [01:23] booths: k [01:23] jonaslund: piscisaureus: na the patch didn't help [01:23] mscahill: Advanced [01:23] mscahill: Environment variables [01:23] ryah: modify path on windows => 10 dialogs [01:23] mscahill: find PATH [01:23] piscisaureus: bleh [01:23] mscahill: add a ; and the python directory [01:24] mscahill: OK, OK, OK, OK [01:24] piscisaureus: jonaslund: there should be some linker/compiler option that toggles the static/dynamic switch [01:24] mscahill: close all MinGW windows and try again :-0 [01:24] jonaslund: -static or something [01:24] jonaslund: i remember using that on linux ages and ages ago [01:24] jonaslund: like in 1999 when building a binary thing for linux :) [01:24] booths: Okay [01:25] booths: I just add E:\Python27, correct. [01:25] booths: That appears to be the format, just verifying [01:25] boaz has joined the channel [01:25] piscisaureus: maybe shoud add \bin [01:26] ryah: booths: i obligate you to update https://github.com/ry/node/wiki/Building-node.js-on-mingw with your experience [01:26] ryah: booths: anything you found unclear should be detailed there. [01:26] jonaslund: -Bstatic, -dn, -non_shared, -static [01:26] jimt has joined the channel [01:26] jonaslund: Do not link against shared libraries [01:26] booths: ryah: yeah if I can make it through this :P [01:26] ryah: booths: you will. keep notes. [01:26] piscisaureus: jonaslund: yeah it does Bdynamic currently [01:27] piscisaureus: probably I just have libstdc++ [01:27] piscisaureus: could be that it comes from a Microsoft Visual C runtime redistributable install [01:27] booths: well msysgit is installing right now... I'll try to install node right after this [01:27] mscahill: ryah: step 1 should be "take some diazepam" [01:27] mscahill: ;-) [01:28] jonaslund: yes it is [01:28] clarkfischer has joined the channel [01:28] mscahill: the python installer really should add the binary to the PATH [01:28] jonaslund: piscisaureus: naa... "libXXX" stuff is hardly never from MS [01:28] piscisaureus: booths: msysgit or just git for windows [01:28] booths: just following whatever was on that page [01:28] booths: led to msysgit [01:29] piscisaureus: ACTION doing a hard drive search [01:29] piscisaureus: from the msysgit page you can fetch "git-something-installer" and "msysgit-something-installer" [01:29] piscisaureus: turns out the latter is a build environment for git [01:30] piscisaureus: bleh [01:30] piscisaureus: ryah got bitten by that too I think [01:30] booths: mysysGit-fullinstall-1.7.3.1-previewblahblahdate [01:30] ryah: piscisaureus: you should just tell people to download the tarballs instead of the git [01:30] booths: that's the one i'm using [01:30] ryah: piscisaureus: 0.3.7 should build [01:31] jonaslund: well from my experience tonight there was 2 things that could fail [01:31] forzan has joined the channel [01:31] admc has joined the channel [01:31] jonaslund: 1: msvc being present confuses the V8 part of the build [01:31] booths: I uninstalled that already [01:31] jonaslund: 2: that dll being dynamically linked by "default". [01:32] piscisaureus: ryah: 0.3.7 doesn't include the -no-builtin-memcpy patch I think [01:32] piscisaureus: so it should build but it may crash in mysterious ways [01:32] markwubben has joined the channel [01:32] piscisaureus: jonaslund: the second can be fixed, I guess [01:33] piscisaureus: I really need to get this build system more robust [01:33] jonaslund: mm, -static ? [01:33] piscisaureus: mm? [01:34] booths: so.... bleh. I did the full installer and git worked in that shell, closed it to try the new path settings and now git does nothing, was I supposed to do something else... [01:34] mscahill: piscisaureus: so once this project is over, I'm going back to Ubuntu. I'd love to commit on the Linux side of things, though. [01:34] jonaslund: oh.. "mm"/"umm" . just a positive acknowledgement [01:34] piscisaureus: mscahill: that's fine [01:34] jonaslund: with -static as the possible solution [01:34] mscahill: :-) [01:35] booths: God I hate this company laptop, wireless just dies every once in a while [01:35] tsyd: booths: save the rants for twitter [01:36] booths: lol... just frustrated, not having luck with mingw and now the laptop dies and boots me from the vm [01:36] dgathright has joined the channel [01:36] ryah: piscisaureus: https://github.com/ry/node/blob/v0.3.7/deps/v8/SConstruct#L135 [01:36] eresair has joined the channel [01:37] piscisaureus: ryah: oh, overlooked ... *shame* [01:38] booths: I used the full installer and it's not working, says please initialize it by running /share/msysGit/initialize.sh, don't have that though [01:38] piscisaureus: jonaslund: probably just -static-libstdc++ [01:38] booths: and just 'git' worked before I closed the shell [01:39] Evet has joined the channel [01:39] jonaslund: oh that exists ? [01:39] jonaslund: cool [01:39] piscisaureus: need to check if it works :-) [01:40] jonaslund: i'll try it [01:40] piscisaureus: it is here: http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html [01:40] ossareh has joined the channel [01:40] jonaslund: hmm [01:40] piscisaureus: if sys.platform.startswith('win32'): [01:40] piscisaureus: bld.env.append_value('LINKFLAGS', '-Wl,--static-libstdc++') [01:40] piscisaureus: [01:41] jonaslund: gcc -v --help didn't list it in my mingw gcc [01:41] piscisaureus: oh maybe one dash [01:41] jonaslund: but i can try [01:41] booths: I'm skipping this git part, it's not makin a ton of sense... [01:42] piscisaureus: jonaslund: g++ --help -v [01:42] jonaslund: piscisaureus: should that go inside the build function ? [01:42] jimt_ has joined the channel [01:43] booths: does the path in environment variables need to be all uppercase. I have Paths already, and just appended to that. [01:43] piscisaureus: jonaslund: in wscript, somewhere around line 766 [01:43] matt_c has joined the channel [01:43] jonaslund: next to the cygwin things [01:43] piscisaureus: should be ok [01:44] jonaslund: unrecognized option [01:44] piscisaureus: :-/ [01:44] jonaslund: oh wait [01:44] jonaslund: double dash [01:44] piscisaureus: yah make it 1 dash [01:44] jchris has joined the channel [01:45] booths: piscisaureus: adding \bin for me actually makes python not work, so lets se [01:45] jonaslund: d:/prg/util/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: unrecognized -a option `tic-libstdc++' [01:46] booths: No crypto support? Is there a way around that or is that up to date. [01:46] piscisaureus: it is true [01:46] booths: Hmm [01:46] piscisaureus: there is a way around it [01:46] piscisaureus: but it is hard [01:46] zentoooo has joined the channel [01:48] booths: Well, I definitely need it, guess I'll google around [01:49] jonaslund: i built openssl once [01:49] jonaslund: that wasn't fun :( [01:49] akahn has joined the channel [01:49] MattDiPasquale has joined the channel [01:49] booths: Suppose I could leave it out for now just to test various things for now [01:49] piscisaureus: jonaslund: building on windows is really simple [01:49] jimt has joined the channel [01:49] jonaslund: or was it? hmm.. don't remember exactly but something in memory tells me that it was a few steps under windows [01:50] jonaslund: maybe it involved installing some extra stuff ? [01:50] piscisaureus: the trouble is in installing it (manually) and making ./configure detect it [01:50] jonaslund: i thought the point of msys was to make things a breeze [01:50] piscisaureus: I don't know what the point is [01:51] bartt has joined the channel [01:51] piscisaureus: jonaslund: drop -the ` -Wl,` part [01:51] intel_ix has joined the channel [01:51] booths: Well this is definitely leaps and bounds better on memory usage than cygwin [01:52] intel_ix: Is there a way to get input from the command line? [01:52] piscisaureus: this works: [01:52] piscisaureus: bld.env.append_value('LINKFLAGS', '-static-libstdc++') [01:52] booths: It reported 0 for rss for a js file that just logged the process.memoryUsage()... [01:52] lukegalea_ has joined the channel [01:53] piscisaureus: booths: maybe it is not supported. there s a lot of small stuff that's missing still [01:53] booths: Suppose. It did get the heapTotal and Used though [01:54] piscisaureus: booths: I think that comes from v8. for rss and vsize you get 0 always [01:54] piscisaureus: shouldnt be too hard to fix though [01:54] broofa has joined the channel [01:54] jonaslund: links but still links to the dll ?! :( [01:54] piscisaureus: ?!?! [01:55] ossareh has joined the channel [01:55] piscisaureus: you see that -static-libstdc++ in the build command? [01:56] piscisaureus: ult\deps\c-ares\ares_llist_1.o default\deps\c-ares\ares_timeout_1.o default\deps [01:56] piscisaureus: \c-ares\ares__read_line_1.o default\deps\c-ares\ares_strdup_1.o -o d:\nodejs\nod [01:56] piscisaureus: e-src\build\default\node.exe -Wl,--enable-auto-import -Wl,--enable-auto-import - [01:56] booths: this is probably better but I don't think I'm going to be able to get it to work... not savvy enough [01:56] piscisaureus: m32 -static-libstdc++ d:\nodejs\node-src\build\default\libv8.a -Wl,-Bdynamic -lws2_32 -lwinmm -lpthread.dll [01:56] jonaslund: yes [01:56] piscisaureus: ^---- there it is [01:56] hij1nx has joined the channel [01:56] piscisaureus: something b0rked [01:56] jonaslund: it COULD be that it appears BEFORE the -llibstdc++ argument [01:56] jimt_ has joined the channel [01:56] jonaslund: ld is sensitive in that [01:56] piscisaureus: oh yeah drop that line again [01:56] jchris has joined the channel [01:56] _jdalton has joined the channel [01:57] piscisaureus: maybe because it comes after the -Wl,-Bdynamic argument [01:57] booths: Node says it install but the node command isn't working... I give up. I'll try again when this is more developed. [01:57] marcosvm has joined the channel [01:57] piscisaureus: don't try to install [01:57] piscisaureus: run just ./node [01:57] piscisaureus: after building [01:57] booths: yeah that works [01:58] piscisaureus: now copy node.exe somewhere you need it :-) [01:58] djanowski has joined the channel [01:58] booths: can I put it in /usr/local/bin? [01:58] piscisaureus: booths: put it in c:\windows\system32 :-) [01:59] booths: I think I'm misunderstanding this whole ming thing [01:59] lukegalea_: tjholowaychuk: Thanks a lot for your change to Jade re: each on array-like objects. Are you going to publish 0.6.3 so I can install via npm? Or should I just git submodule that? [01:59] mayfield has joined the channel [01:59] booths: is it intended to wrap like cygwin? [01:59] lukegalea_: npm is still showing 0.6.0 as the newest. [01:59] booths: or make windows behave natively as such [01:59] tjholowaychuk: lukegalea_: 0.6.3 should be out [01:59] tjholowaychuk: hm [01:59] piscisaureus: booths: nonono [01:59] tjholowaychuk: i get 0.6.3 from npm [01:59] piscisaureus: mingw != cygwin at all [02:00] booths: I've been using the shell like cygwin essentially [02:00] piscisaureus: mingw is actually just gcc for windows. msys is bash and stuff [02:00] lukegalea_: tjholowaychuk: maybe I just need to kick npm somehow.. lemme see.. some kind of update defintions command maybe.. [02:00] booths: am I supposed to be doing other stuff? [02:00] piscisaureus: booths: /usr/local/bin isn't really a meaningful place in windows [02:00] lukegalea_: tjholowaychuk: weird.. npm update went to 0.6.0, but a forced install of 0.6.3 worked fine. [02:00] tjholowaychuk: lukegalea_: woah wird [02:00] tjholowaychuk: weird* [02:01] booths: piscisaureus: yeah, but it's letting me run "node" from MinGW shell now [02:01] piscisaureus: if you want to access stuff there you need to add it to your path manually [02:01] tjholowaychuk: maybe your package.json or whatever figured 0.6.0 was enough [02:01] booths: which is what I thought was supposed to happen [02:01] lukegalea_: cool.. well: thanks again. Can't wait to finally get my app working again. It's been pretty out of sorts since the mongoose update. [02:01] tjholowaychuk: i dunno [02:01] booths: am I supposed to be using powershell or cmd prompt instead? [02:01] piscisaureus: no [02:01] piscisaureus: nobody does [02:01] bmp has joined the channel [02:01] booths: so, back to the basics, this will be ran through mingw shell [02:01] lukegalea_: tjholowaychuk: nope, my package.json was fine.. but don't sweat it. I'm happy to just move on :) [02:01] piscisaureus: booths: no need to [02:02] booths: lol, I am confused [02:02] charlenopires has joined the channel [02:02] booths: what shell do I run it through [02:02] piscisaureus: whatever. bash is ok. but you can also run it from cmd if you want to [02:02] piscisaureus: or double-click it :-) [02:02] aurynn has joined the channel [02:03] jonaslund: piscisaureus: well, thanks for the help. it's time to sleep now though [02:03] jonaslund: 303 here [02:03] piscisaureus: jonaslund: hell it is [02:03] piscisaureus: same here [02:03] booths: double clicking it says it's mising libpthread-2.dll [02:03] piscisaureus: oh funk [02:03] jonaslund: piscisaureus: my lady is up feeding the baby, means time for me to sleep since i don't wanna disturb the baby when i go to bed [02:03] piscisaureus: that also stinks [02:04] piscisaureus: (was talking to booths) [02:04] jonaslund: yeah i figured [02:04] piscisaureus: well, goodnight then jonaslund [02:04] booths: I'll just figure this out once it's more developed. Spending time I could be spending on actually developing the project [02:04] jonaslund: libpthread is a part of mingw atleast [02:05] jonaslund: (the dll thatis) [02:05] piscisaureus: yeah [02:05] piscisaureus: I will get rid if it entirely [02:05] piscisaureus: when I kill libeio :-) [02:05] booths: so you made mingw? [02:05] piscisaureus: i did not make mingw :-) [02:06] jacobolus has joined the channel [02:06] piscisaureus: I mean node should no longer use pthreads-w32 [02:06] jonaslund: piscisaureus: i wouldn't be surprised if ithere's a bunch of pthread proxys for windows [02:06] jonaslund: a simplistic one should do [02:06] piscisaureus: jonaslund: only libeio uses it [02:07] jonaslund: yes but for a "good cause" ? [02:07] piscisaureus: but windows has builtin stuff to manage thread pools [02:07] piscisaureus: QueueUserWorkItem [02:07] jonaslund: mm [02:07] heavysixer has joined the channel [02:07] jimt has joined the channel [02:07] jonaslund: what i meant is that we could maybe find a single-file pthread-wrapper for windows [02:07] jonaslund: that we could just throw with node [02:08] jonaslund: instead of if-deffing alot of code here and there [02:08] piscisaureus: hmm. I think libpthread-w32 is what comes closest [02:08] piscisaureus: you can link that statically also [02:08] jonaslund: yes [02:08] piscisaureus: but I gave up on that because it segfaulted on me all the time [02:08] jonaslund: static linking will be the issue for tomorrow :) [02:08] jonaslund: ahh :( [02:09] piscisaureus: jonaslund: you are doing it for fun or for profit? [02:10] jonaslund: node for profit.. not really developing node :) [02:10] jonaslund: but i do lack some stuff that i thought i'd need to implement [02:11] jonaslund: but now the lady has finished feeding the baby [02:11] piscisaureus: ok sleep well then... [02:11] jonaslund: err.. using node for a project to make profit.. [02:11] piscisaureus: oh ok [02:12] piscisaureus: ryah: what are the buildbot plans? [02:12] jonaslund: well.. night [02:15] booths: well now this is interesting......... node is running my server but not showing up in ps aux... I restarted and it's still running. Don't have access to task manager in windows... any ideas? [02:16] mscahill: weird [02:16] torvalamo: did you call that tv show that checks your house for ghosts? [02:16] torvalamo: i'm sure every country has one [02:16] booths: might be a good first step [02:17] torvalamo: loonies exist everywhere [02:17] piscisaureus: booths: I don;t think the mingw ps is that reliable [02:17] booths: nah I gave up on that, went back to cygwin [02:17] piscisaureus: ok [02:17] booths: way too much was apparently going over my head, was tired of bothering you guys [02:18] qschzt has joined the channel [02:18] torvalamo: can't you do ps -W [02:18] torvalamo: to see windows procs [02:18] saikat_ has joined the channel [02:18] torvalamo: or ps -aW even [02:18] qschzt: hey. what are you doing for memory profiling? [02:19] razvandimescu has joined the channel [02:19] brapse has joined the channel [02:19] booths: torvalamo: found an instance of node but kill (the PID) returns permission denied.... tonight is not my night [02:20] torvalamo: won't say which user has it? [02:20] techwraith has joined the channel [02:20] booths: Not sure.... [02:20] qschzt: anything for V8/Node memory profiling? [02:20] booths: I'm the only one on the vm [02:21] qschzt: i think there is nothing [02:21] lukegalea_ has joined the channel [02:21] booths: I'm trying to find a way to crash the server and coming up with nothing. Which I guess is good and bad. [02:21] qschzt: booths, yo, sudo [02:21] trobrock has joined the channel [02:22] booths: sudo isn't a command in cygwin, for me [02:22] trobrock: Is there anyone here that could help me out with chain-gang? [02:22] ossareh has joined the channel [02:22] booths: is there any way to kill a node process other than kill pid [02:25] qschzt: booths, get virtualbox :) seriously [02:25] qschzt: booths, you are wasting your time with cygwin. [02:25] torvalamo: booths, according to 'man kill' (fishy).. you can force it [02:25] torvalamo: with -f [02:25] torvalamo: kill -f [02:25] hij1nx_ has joined the channel [02:25] torvalamo: and it will use win32 api if necessary [02:25] torvalamo: so permissions shouldn't be an issue [02:26] booths: nice [02:26] booths: thanks [02:26] Yuffster_work has joined the channel [02:26] booths: qschzt: it is a virtual machine, and I might at some point try to install a VM inside the VM... [02:26] booths: I'm hoping I can figure out mingw at some point [02:26] qschzt: but why? [02:27] qschzt: vbox + ubuntu -> great [02:27] booths: it's an internal project, it's all I have access to, our network admins won't service linux [02:27] JimBastard has joined the channel [02:27] qschzt: "network admins won't service linux" I will stop talking to you now. [02:28] booths: lol [02:28] w3dot0 has joined the channel [02:28] booths: well, it's in a different state than me, so if anything goes wrong, they won't touch it [02:30] qschzt: booths, good luck. [02:31] nonnikcam has joined the channel [02:32] booths: piscisaureus: So is there a general overview of mingw somewhere, I think I didn't understand it from the get go [02:33] piscisaureus: not that i know of, but the introduction on www.mingw.org should help [02:33] lukegalea has joined the channel [02:33] skm has joined the channel [02:34] booths: alright, the understanding I got from that was that it's just a layer on windows [02:34] booths: unlike cygwin which is it's own VM essentially-ish [02:35] bradleymeck has joined the channel [02:35] piscisaureus: booths: it is just a collection of gnu programs (gcc and bash) ported to windows [02:36] booths: seems like it would run better than cygwin [02:36] booths: if I could get it to work ;) [02:36] piscisaureus: that was the idea :-) [02:36] konobi: cygwin is an emulation layer (POSIX)... mingw is direct native access [02:37] piscisaureus: booths: you should understand that the mingw port is very much not ready [02:37] piscisaureus: so you cannot use npm and stuff [02:37] booths: yeah I tried that [02:37] booths: I still feel like an idiot [02:37] booths: which isn't fun :P [02:38] twoism has joined the channel [02:39] MikeMakesIt has joined the channel [02:39] lukegalea_ has joined the channel [02:42] eee_c has joined the channel [02:42] chapel: piscisaureus: when you guys get the mingw windows build solid, wont you be able to just distribute a built exe or bundle? [02:46] piscisaureus: chapel: that 'd be good [02:47] piscisaureus: there's too much to be done and too little time [02:47] chapel: is the goal to have windows working by 0.4? [02:48] piscisaureus: not my goal [02:48] piscisaureus: that would be 2 weeks [02:48] piscisaureus: can't do [02:48] davidascher has joined the channel [02:48] chapel: oh [02:49] piscisaureus: actually, you should ask ryah, he is the roadmapping master brain [02:49] chapel: how did ruby get their package on windows like they did? [02:49] piscisaureus: work hard [02:49] piscisaureus: it's not that hard [02:49] piscisaureus: but it takes time [02:50] Evet has joined the channel [02:50] booths: well, if there's any contribution I can offer... [02:51] booths: I kept notes of tonights ordeal, but I doubt it helps as I ultimately failed [02:51] chapel: I personally dont care for windows, but I can see the reasoning to push for it, it adds a large user base, both hobbyist and companies [02:52] lukegalea has joined the channel [02:52] piscisaureus: It makes sense yeah [02:52] lukegalea_ has joined the channel [02:52] booths: I hate windows with every fiber of my being. [02:52] booths: my goal is to make the product good enough that they'll get me a linux server [02:52] piscisaureus: That's the problem here. All windows users have left because node doesn't run on windows. [02:52] prettyrobots has joined the channel [02:53] prettyrobots: How is SSL support coming along? [02:53] prettyrobots: Last I checked there were some bugs that kept it from being useful for writing servers or apps that have large transfers. [02:54] chapel: prettyrobots: yeah, they are looking into that [02:54] piscisaureus: yo no se [02:54] prettyrobots: chapel: So, not yet? [02:54] prettyrobots: Which is not a complaint or expectation, just wondering. [02:55] chapel: piscisaureus: I dont see why people dont just run linux, vm it, or remote ssh into a box with it [02:55] chapel: prettyrobots: yeah I believe so, you could check master and any commits, but I haven't seen any word [02:55] booths: chapel: I have no choice [02:55] hij1nx has joined the channel [02:55] piscisaureus: chapel: it requires you to run a vm all the time. which is annoying and takes time to set up. same story for a remote box [02:55] chapel: piscisaureus: but that is mostly my reasoning, I do understand if you are at a company, sometimes you dont have a choice [02:56] piscisaureus: sometimes you have no choice for other reasons [02:56] booths: chapel: yeah the company i'm at has network admins on the regional level that won't support linux servers. if it crashes they won't bring it back up. national is all linux though... [02:57] chapel: I think people shouldn't get upset that it doesn't work on windows right, that is a lot to expect, specially this early in node's lifetime [02:57] konobi: booths: to the cloud!! [02:57] booths: konobi: I hate those commercials. Oh god I hate them. [02:57] konobi: =0P [02:57] chapel: I go to the cloud all the time, with my Android phone [02:57] chapel: :) [02:58] chapel: like the new marketplace [02:58] chapel: the web based one :) [02:58] JimBastard: whats the preferred way to pass function arguments to something like router.path('/apps', require('./service/apps')); where /service/apps.js looks like: exports.module = function (a, b, c) {} [03:02] jmwinn21 has joined the channel [03:02] daniellindsley has joined the channel [03:03] tanepiper: JimBastard: i like this: https://gist.github.com/d61e9a20201758057a19 [03:04] tanepiper: then you can do something like: router.path('/apps', require('./service/apps')(settings, someOtherDep)); for example [03:04] JimBastard: tanepiper: yeah, thats the trick [03:05] JimBastard: stack / connect work the same way [03:05] tanepiper: yea [03:05] JimBastard: thanks [03:05] tanepiper: i need to sit down and totally reorg my app [03:06] tanepiper: need to come up with a good way to have coffeescript source files, compile them into an app and have my views/public dirs [03:06] JimBastard: thats always fun [03:06] tanepiper: i want to do my clientside in coffee as well, it's all a bit mehh just now [03:06] piscisaureus: ryah: this buildbot thinie ... [03:06] piscisaureus: (or im going to bed) [03:07] tanepiper: possibly even the views with CoffeKup [03:07] JimBastard: are you doing a single page app or no? [03:07] piscisaureus: ACTION finally got junctions working. trying to make npm work tomorrow [03:08] tanepiper: nope, but it's not a huge app either, most of the logic is in the clientside extjs stuff, and with extjs even more will be [03:08] tanepiper: *extjs4 [03:08] tanepiper: really i just need good routes for serving the app, having user login/signup, and standard couchdb routes [03:09] tanepiper: like get doc, save doc, views, lists, updates, etc [03:09] tanepiper: i was using DNode, but i have concerns about security and tying in sessions and that [03:10] tanepiper: maybe once 0.4 lands, i'll check out DNode over SSL, might negate some of those concerns [03:10] jdalton has joined the channel [03:12] JimBastard: im only trying to think about single page apps these days [03:12] jdalton has left the channel [03:12] tanepiper: well i suppose it is single page with DNode [03:12] tanepiper: all the logic is handled over sockets [03:13] tanepiper: anyway, to bed! [03:14] mscdex has joined the channel [03:18] tokumine has joined the channel [03:20] mjr__ has joined the channel [03:21] w0rse has joined the channel [03:22] mjr___ has joined the channel [03:23] amerine has joined the channel [03:24] broofa has joined the channel [03:26] lukegalea has joined the channel [03:27] skm has joined the channel [03:30] CIA-99 has joined the channel [03:30] ericnakagawa has joined the channel [03:34] mikeal has joined the channel [03:34] kiddphunk has joined the channel [03:36] marcosvm has joined the channel [03:36] prettyrobots has joined the channel [03:37] wilmoore_ has joined the channel [03:41] Rixius has joined the channel [03:42] ryah: piscisaureus: i asked if i could have one. i'll let you know when i get it. [03:48] luke`_ has joined the channel [03:49] akahn has joined the channel [03:53] jherdman has joined the channel [03:54] jimt_ has joined the channel [03:55] atmos: is anyone using vows ? [03:56] CIA-99 has joined the channel [03:56] tfe_ has joined the channel [03:56] hobodave has joined the channel [03:56] beawesomeinstead has joined the channel [03:57] MikeMakesIt has left the channel [03:57] CIA-99 has joined the channel [03:57] MikeMakesIt has joined the channel [03:59] mscdex: node.js rules! [03:59] jimt has joined the channel [04:00] TrollBot: mscdex: node.js sucks [04:00] atmos: lol [04:01] mscdex: ! [04:03] mscdex: node.js sucks on windows maybe :p [04:03] Lorentz: More like windows sucks [04:03] mscdex: well, that's implied [04:03] zzak: trollbot++ [04:03] v8bot: zzak has given a beer to trollbot. trollbot now has 1 beers. [04:04] zzak: trollbot-- [04:04] v8bot: trollbot is getting too many beers. Don't let trollbot get drunk! [04:04] zzak: TrollBot++ [04:04] v8bot: zzak has given a beer to TrollBot. TrollBot now has 1 beers. [04:04] broofa has joined the channel [04:05] shaver: windows is pretty well suited to event-based programming [04:05] shaver: you just mostly have unix libraries that are built around select instead of event notifications [04:07] piscisaureus: shaver++ [04:07] v8bot: piscisaureus has given a beer to shaver. shaver now has 2 beers. [04:08] mikeal has joined the channel [04:09] dgathright_ has joined the channel [04:10] dipser has joined the channel [04:11] joelklabo has joined the channel [04:12] razvandimescu has joined the channel [04:13] micheil has joined the channel [04:14] mikeal has joined the channel [04:17] pauls has joined the channel [04:20] saikat has joined the channel [04:22] aurynn has joined the channel [04:24] kris_ has joined the channel [04:30] Yuffster_work has joined the channel [04:32] jherdman has joined the channel [04:37] sivy_afk has joined the channel [04:37] chrischr_ has joined the channel [04:40] sechrist has joined the channel [04:41] w3dot0 has joined the channel [04:45] pr2012 has joined the channel [04:45] pr2012: whats the best way to grab the http client's ip address? [04:45] ryah: req.connection.remoteAddress [04:46] pr2012: will I get the proxy's ip with that or the forwarded for ip? [04:46] mikeal has joined the channel [04:47] Me1000 has joined the channel [04:49] ryah: the proxy's [04:49] statim has joined the channel [04:49] JulioBarros has joined the channel [04:58] kylefox has joined the channel [04:58] kylefox has left the channel [05:00] w3dot0 has joined the channel [05:01] skm has joined the channel [05:02] derferman has joined the channel [05:04] stepheneb has joined the channel [05:04] dgathright has joined the channel [05:07] skm has joined the channel [05:07] dominictarr has joined the channel [05:13] davidascher has joined the channel [05:18] noahcampbell has joined the channel [05:19] MattDiPasquale has joined the channel [05:20] matyr has joined the channel [05:21] dgathright has joined the channel [05:24] tk has joined the channel [05:30] abraham has joined the channel [05:31] mjr__ has joined the channel [05:31] yozgrahame has joined the channel [05:31] rakeshpai has joined the channel [05:33] rakeshpai: Hey. So, I'm trying to create a http.createClient with the secure flag set to true, and without any creds. The connection just seems to take a long time, and then I get an error saying "socket hang up". Anyone seen this? Know any workaround? [05:33] mfernest has joined the channel [05:34] mape: rakeshpai: use the https client [05:34] mape: if you are using latest [05:34] rakeshpai: mape: I am using the latest. Thanks for this, but where can I find docs for the https client? [05:35] mape: rakeshpai: http://nodejs.org/docs/v0.3.7/api/https.html [05:35] rakeshpai: mape: ah. Thanks a million [05:35] isaacs has joined the channel [05:35] mape: :) [05:37] sudoer has joined the channel [05:42] jezuz has left the channel [05:46] wang: who * [05:46] jimt_ has joined the channel [05:49] akahn has joined the channel [05:50] admc has joined the channel [05:51] ROBOTARMY has joined the channel [05:51] Ond has joined the channel [05:51] sprout has joined the channel [05:53] matyr has joined the channel [05:55] rakeshpai: mape: Thanks for pointing me to the https client. It worked! When was this introduced? A library I was using was using the old createClient code. I think it's time to send them a patch ;) [05:55] chapel: I think 0.3.6 was when it was introduced [05:58] rakeshpai: chapel: How recent was that? (Sorry, I've been away from node developments for some time now. Just getting back.) [05:59] langworthy has joined the channel [06:05] peol^ has joined the channel [06:05] peol^ has joined the channel [06:06] yozgrahame has joined the channel [06:06] chapel: umm, a week or two ago [06:07] Vertice has joined the channel [06:07] chapel: http://groups.google.com/group/nodejs/browse_thread/thread/e1e16b3b1ba02293 [06:07] ryanfitz has joined the channel [06:16] objectvar has joined the channel [06:17] tim_smart: ryah: When do you think 0.4 will hit shelves? [06:21] mape: tim_smart: didn't he say next week a couple days ago? [06:23] matyr has joined the channel [06:23] tim_smart: mape: I thought he said next week a week ago :p [06:23] mape: Hehe think it was this week [06:24] tim_smart: mape: Yeah. I got no idea what the TODO list for 0.4 is [06:24] mape: tim_smart: fix bugs [06:25] ezmobius has joined the channel [06:25] tim_smart: Hmm github.com/ry/node/issues needs some more attention. [06:25] ezmobius has joined the channel [06:27] dustinwhittle has joined the channel [06:29] mattly has joined the channel [06:29] jed__ has joined the channel [06:30] warz has joined the channel [06:30] jed__: can anyone explain why the https example works for me on safari, but not on chrome? [06:30] jed__: http://nodejs.org/docs/v0.3.7/api/https.html#https.createServer [06:31] jed__: on chrome it just hangs after i click to "proceed anyway" [06:34] vojto has joined the channel [06:43] matyr_ has joined the channel [06:53] sprout has joined the channel [06:55] Lorentz: Hmm, need to make my irc bot more modular [06:55] Lorentz: Good thing for require() [06:55] Lorentz: And commonjs [06:56] Dhae has joined the channel [06:56] Dhae: hey, all! i am complete beginner with node, but have a quick question if you don't mind :-) [06:57] skm has joined the channel [06:58] Dhae: can anyone tell me this: [06:58] Dhae: how can i use node to write something into the of a document, like i can write "hello world" into its ? [06:59] Dhae: i guess it ought to be pretty simple, but i am quite new to programming :p [07:00] dgathright has joined the channel [07:02] ZiXon has joined the channel [07:03] JohnnyL: what's your favorite programmer's editor? [07:03] JohnnyL: <--vim [07:03] ZiXon: VI [07:03] warz: vim and eclipse [07:03] Lorentz: echo [07:03] Vertice has joined the channel [07:04] Lorentz: ok, serious answer, vim, gedit, or eclipse [07:04] zzak: vim [07:04] rwhitby: emacs [07:04] rwhitby: (someone had to say it( [07:05] Dhae: hmmm, maybe this was not the right place to ask :( [07:05] Lorentz: Dhae: Look up express for nodejs. [07:06] ph^ has joined the channel [07:06] Dhae: ah, thanks for the response! [07:06] Dhae: i have looked at express, but since i am a complete beginner, thought i would just start with node.js as is [07:06] Lorentz: It's a web framework for nodejs. [07:06] Lorentz: It'll be better than starting off from complete scratch. [07:06] Dhae: no simple way, like response.write to write to in node without using any framework? [07:07] Lorentz: Well, node isn't just an http server. [07:08] Dhae: i see [07:09] Dhae: i guess i should take a second look at express then [07:09] Dhae: so does that mean that there is no simple way to output into the client docs without it? [07:10] muhqu has joined the channel [07:10] Lorentz: node isn't like PHP where PHP itself is a templating language. [07:11] muhqu has joined the channel [07:11] Lorentz: I'm not exactly sure what you're asking, actually [07:11] yozgrahame has joined the channel [07:11] Lorentz: But that's what I think you mean. You have an html doc, and you want node to put something in somehow. [07:11] Dhae: thanks, maybe i am too much of a noob to understand completely what you mean, sorry :p [07:12] Dhae: i was just looking at the hello world examples [07:12] mraleph has joined the channel [07:12] isaacs: Dhae: https://gist.github.com/809159 [07:12] Dhae: when a request is sent to node, it returns "hello world" to the client, using response.end [07:12] Dhae: to the body [07:12] isaacs: Dhae: when you say "body" what do you mean? [07:13] isaacs: Dhae: the body of the response, or the html tag? [07:13] Dhae: the html's docs body [07:13] isaacs: they are different things [07:13] isaacs: ok. no, it doesn't do that [07:13] isaacs: req.end("hello, world") sends JUST "hello world" [07:13] isaacs: no [07:13] isaacs: no [07:13] Dhae: oh, but when i check the source, using the browser, it is there in the [07:14] isaacs: Dhae: ok. your browser is lying. [07:14] onar_ has joined the channel [07:14] isaacs: :) [07:14] mape: are you checking the generated source or the actual source? [07:14] Dhae: i guess my understand is kind of flawed then :p [07:14] isaacs: Dhae: how do you check the source? [07:14] Dhae: view source in google chrome [07:14] isaacs: Dhae: If you use Firebug, you're seeing the generated source, which contains an implicit tag because it "corrects" that plain string to an html document [07:15] Dhae: ah, i see [07:15] isaacs: Dhae: if you just click View: Source in Firefox or Chrome, you'll see the real pre-mangled source code [07:15] isaacs: which is just exactly what you sent [07:15] isaacs: think about it: what if you wanted to serve an image? it wouldn't do to have "" in there [07:16] Dhae: ah, i see [07:16] FireFly|n900 has joined the channel [07:16] Dhae: but i am also using a "fake" browser for node.js called zombie to view the doc it also outputs the html, with head and body tags [07:16] Dhae: kind of confusing [07:16] hobodave has joined the channel [07:16] isaacs: i see [07:17] isaacs: i haven't used zombie [07:17] SamuraiJack has joined the channel [07:17] isaacs: i see it a lot, though, because they're at the bottom of the `npm ls` output :) [07:18] Dhae: i tried making a simple static file server from a tut [07:18] Dhae: and then i can just place a html doc there, with a head [07:18] isaacs: serving static files is trickier than it might seem to get really right [07:18] isaacs: especially if you wanna handle stuff like ETags and last-modified dates and range requests and suck [07:18] isaacs: *such [07:19] luke` has joined the channel [07:19] Dhae: but if i want the server to just output html straight to the clients browser, with and all, what should i do then? [07:19] isaacs: Dhae: https://gist.github.com/809159 [07:19] Dhae: - and thanks a lot for helping me out :) [07:19] ZiXon: :) [07:19] Dhae: - thanks [07:19] isaacs: np [07:19] matyr has joined the channel [07:19] isaacs: Dhae: the basic idea is this: [07:19] isaacs: 1. you get a request [07:20] isaacs: 2. you start sending some data to it with response.write [07:20] isaacs: 3. when you are done, you call response.end() (optionally sending one more chunk of data if necessary) [07:20] Dhae: i see, the simple example you linked to is really helpful! [07:21] Dhae: it is just that when i tried it, even though i included no head tags in the response.write, they were there in the browsers html source [07:21] isaacs: right, so, either some process in your server is adding stuff, or your browser is lying. [07:21] Dhae: so i got the idea that probably write was only sending to the browser html's body or something :p [07:21] Dhae: thanks! [07:21] isaacs: i usually test node sites with curl, because it's easier to see the exact response. [07:22] Dhae: i see [07:22] Dhae: i'll have a look at it [07:22] Dhae: thanks again! [07:22] Dhae: i am a complete beginner, only know html, css and a bit of client side JS [07:23] Dhae: figured node was interesting, since i could use some of the JS i already know [07:23] isaacs: Dhae: ayep. that's how a lot of us got here :) [07:24] isaacs: Dhae: watch out, the rabbit hole is deep [07:24] Dhae: haha, thanks [07:24] isaacs: g'nite [07:25] mikedeboer has joined the channel [07:26] dgathright has joined the channel [07:27] matyr has joined the channel [07:28] joelklabo has joined the channel [07:29] mikeal has joined the channel [07:29] tilgovi has joined the channel [07:33] Gruni has joined the channel [07:37] matyr_ has joined the channel [07:40] Mike_Rice has joined the channel [07:40] void_ has joined the channel [07:40] Mike_Rice: Good morning [07:40] Qbix1 has joined the channel [07:40] Mike_Rice: Anyone awake? [07:40] Ond: Ni hao [07:40] Ond: Awake is what I am [07:41] Mike_Rice: LOL [07:41] Mike_Rice: What's the ideal way to format Date.now() inline? [07:41] MikhX_ has joined the channel [07:43] dgathright has joined the channel [07:45] Ond: Uh [07:47] k3yvn has joined the channel [07:47] jakehow has joined the channel [07:47] matyr has joined the channel [07:49] ivanfi has joined the channel [07:52] beawesomeinstead has joined the channel [07:53] dominictarr has joined the channel [07:53] matyr_ has joined the channel [07:55] bmp has joined the channel [07:56] aklt has joined the channel [07:56] joelklabo has joined the channel [07:57] dekz has joined the channel [07:59] pomodoro has joined the channel [08:03] matyr has joined the channel [08:04] ryanfitz_ has joined the channel [08:06] sholmes has joined the channel [08:07] sholmes: hey, so express is just added stuff on top of connect? [08:07] ircretary has joined the channel [08:09] SubStack: hello friends! [08:10] skohorn has joined the channel [08:11] sudoer has joined the channel [08:12] maritz has joined the channel [08:14] w0rse has joined the channel [08:15] mraleph has joined the channel [08:19] matyr_ has joined the channel [08:21] Epeli has joined the channel [08:22] markwubben has joined the channel [08:22] hellp has joined the channel [08:24] cloudhead has joined the channel [08:25] guybrush: sholmes: yes [08:25] guybrush: as connect is just added stuff on top of nodejs :p [08:25] sholmes: guybrush, haha right [08:25] sholmes: but what does express add to connect? [08:26] sholmes: the routing is obvious [08:26] w0rse has joined the channel [08:26] sholmes: but what else is a major feature of express? [08:26] guybrush: view-stuff templating and other stuff like mentioned on http://expressjs.com/ [08:26] sriley has joined the channel [08:26] Epeli has joined the channel [08:28] guybrush: creationix.static should be the new connect.staticProvider ! [08:29] guybrush: streaming files ftw [08:30] sholmes: what's creationix.static? [08:30] guybrush: https://github.com/creationix/creationix/blob/master/static.js [08:31] halfhalo has joined the channel [08:31] guybrush: basically the difference is, that instead of putting the static files into memory first before serving them, it will just stream it [08:31] halfhalo has joined the channel [08:32] sholmes: guybrush, what's is streaming? [08:32] sholmes: I mean. [08:32] sholmes: Isn't that what servers do [08:32] sholmes: ...stream the content [08:32] guybrush: http://nodejs.org/docs/v0.3.7/api/streams.html [08:32] Mike_Rice: has anyone run into the "Error: ENOTFOUND, Domain name not found" when trying to use the mysql modules? [08:33] sholmes: what is the fundemental concept behind a stream? [08:33] matyr has joined the channel [08:36] matbee_ has joined the channel [08:36] guybrush: mhh streams are to time as arrays are to space "Jed Schmidt @ JSConf.eu/2010" [08:37] sholmes: arrays to space is what? [08:38] sholmes: what is space? [08:38] guybrush: maybe i am the wrong person to explain that right (still learning), but as I see it - streams are just a way to move date from one point to another [08:38] shaver: getting pretty philosophical in here [08:38] shaver: I might need another beer [08:38] bmp has joined the channel [08:38] sholmes: shaver: I had kombucha!! [08:39] guybrush: this is done asynchrone [08:39] sholmes: guybrush: is it, instead of dumpy the whole file down a request, it does it in chucks? [08:39] muhqu has joined the channel [08:39] mape: a little at a time [08:39] guybrush: right, but it is more than just that [08:40] sholmes: guybrush, then what more is it? [08:40] shaver: a stream is a sliding window over the inputs and outputs of some operation [08:40] sholmes: a window..sliding. [08:40] shaver: an array is a degenerate stream: the window is the size of the whole data set [08:40] sholmes: maybe anologies are the best way to explain this. [08:40] guybrush: sholmes: the problem is, that shuffling data from one point to another that the receiving point may not be able to consume very much data in short time [08:40] guybrush: so the data has to be buffered somehow [08:41] andrewfff has joined the channel [08:41] sholmes: oh, so the stream buffers the data, then dumps it to the receiving point in small chunks [08:41] kal-EL_ has joined the channel [08:42] guybrush: yes, as said I am still learning how this is done exactly [08:42] [AD]Turbo has joined the channel [08:42] guybrush: but for now, it just works for me :) nodejs makes that very easy [08:42] CrazyGoogle has joined the channel [08:42] guybrush: and provides a perfect api [08:42] JohnnyL: what is your favorite templating language for node.js? [08:43] guybrush: JohnnyL: jade [08:43] sholmes: is it like a streaming video vs a buffered video? [08:43] guybrush: for html [08:43] guybrush: sholmes: streaming video and buffered video are not mutial exclusive, isnt it? [08:43] sholmes: jade does seem pretty cool. But Idk about the pipe characters for large bodies of text [08:43] lightharut: Who knows how to realize "ensureIndex" in node.js for mongodb database. I'm using node mongdb native driver? [08:43] guybrush: *mutual [08:44] sholmes: guybrush: I don't know what mutial exclusive means here. [08:44] sholmes: mutual* [08:44] mape: lightharut: the docs are rather poor for that module but I tend to look at ttps://github.com/christkv/node-mongodb-native/blob/master/integration/integration_tests.js [08:44] mape: collection.ensureIndex([['a', 1 ]], true, function(err, indexName) { [08:44] mape: true being if it should be unique or not [08:45] guybrush: sholmes: one does not except the other [08:45] pedrobelo has joined the channel [08:45] sholmes: guybrush: now I'm wondering what you mean by except/accept? [08:45] lightharut: mape: there is also parameter background:true [08:46] lightharut: do you know how to write that? [08:46] guybrush: sholmes: i just wanted to say, if a video is streamed i can still buffer it aswell [08:46] mape: lightharut: Sorry no, probly better of checking the source [08:46] lightharut: mape: thanks in any case [08:46] mape: np [08:49] sholmes: idk what this all means. [08:49] guybrush: lost in translation! [08:49] sholmes: I just tend to think of node Streams as data moving in chucks [08:49] guybrush: i have to admit, my english is very bad [08:49] sholmes: while non-streams are data moving all at once [08:50] guybrush: i guess it is ok to think of node-streams as unix-pipes [08:50] guybrush: so you can do $ cat file | sendToClient [08:52] guybrush: though i might be wrong with that at all :D [08:53] guybrush: imo it is essential to understand what events.Eventimitter is doing [08:53] guybrush: *events.Eventemitter [08:54] guybrush: all the hot stuff is built upon that [08:55] guybrush: and events.Eventemitter itself is built upon libev [08:55] ROBOd has joined the channel [08:56] mikedeboer has joined the channel [08:56] tc77 has joined the channel [08:56] Druid_ has joined the channel [08:57] hwinkel has joined the channel [08:57] matyr_ has joined the channel [09:00] gattuso has joined the channel [09:03] FuzzYspo0N has joined the channel [09:03] matjas has joined the channel [09:04] aklt has joined the channel [09:04] [AD]Turbo: yo all [09:06] peol has joined the channel [09:06] peol has joined the channel [09:08] peol has joined the channel [09:09] prettyrobots has joined the channel [09:10] JohnnyL: sholmes: agreed [09:10] q_no has joined the channel [09:10] lukegalea has joined the channel [09:12] dewey_ has joined the channel [09:12] dewey_: guys, I'm receiving , how can I change that to a string? (it's a string send by a socket connection) [09:14] chapel: buffer.toString() [09:14] FuzzYspo0N: docs.toRead() [09:14] FuzzYspo0N: Anyone experimented with threads/fibres with v8 at all? [09:14] chapel: I havent, but Ive seen node-fibers [09:15] shaver: that stuff will get better when isolates land [09:16] chapel: are there any examples of using fibers? [09:16] dekz: When using express/coffeekup as the render, how do you get data into the coffeescript -> scope? [09:17] matyr has joined the channel [09:18] dekz: or is the logic meant to be done before rendering and pass in the local? [09:18] FuzzYspo0N: yea id like to know too chapel , i understand v8 model of 'threading' well enough, and its easy to throw in a test or two of my own but im wondering if others have had any experience with trying threaded events or backgrounded v8 instances [09:22] kristsk has joined the channel [09:23] jonaslund: you mean proper VM fibers or JS hacks ? [09:25] jonaslund: ah proper.. didn't read completely [09:25] FuzzYspo0N: either. Think in terms of games i guess [09:25] FuzzYspo0N: Im just looking for research/experience of any kind [09:26] felixge has joined the channel [09:26] davidc_ has joined the channel [09:26] felixge has joined the channel [09:26] jonaslund: ah [09:26] rakeshpai has joined the channel [09:27] jonaslund: i wrote a little "stack" module where you attached "contexts" to objects [09:27] jonaslund: this was mostly because i wanted to add tail-calling [09:28] jonaslund: basicall you returned a closure encapsulated in a frame to either make it a tail call or "normal call" in that stack [09:28] altamic has joined the channel [09:28] altamic has joined the channel [09:28] codetonowhere has joined the channel [09:29] FuzzYspo0N: hm its inteteresting jonaslund [09:29] FuzzYspo0N: wtf was that. lol interesting* [09:30] FuzzYspo0N: I think i avoided threading my v8 stuff for a while because while the v8::Locker is simple to use, I found that the biggest problem was starvation [09:30] FuzzYspo0N: the scripts would dominate the locks and leave everything else waiting every nth frame [09:30] jonaslund: isn't there functionality in V8 to pre-empt fibers ? [09:31] FuzzYspo0N: yea well preempt is just making sure its accessing on the v8 thread [09:31] FuzzYspo0N: and you can call them out if you need [09:31] FuzzYspo0N: If i get what you meant? Im new to the fibres approach [09:33] FuzzYspo0N: Much that i read this : http://altdevblogaday.com/slim-and-light-multitasking-with-fibers [09:33] fly-away has joined the channel [09:33] FuzzYspo0N: And was thinking hey, actually this is something i already implemented i just didn't know it was named [09:35] FireFly|n900 has joined the channel [09:35] dewey_: it's probably a noob question as well, but: JSON.parse(data.toString()); is giving me a SyntaxError [09:35] dewey_: data.toString() = {"f":"getPrograms"} [09:35] dewey_: that's a valid json string right [09:35] ilpoldo has joined the channel [09:36] jonaslund: FuzzYspo0N: fibers is a very elegant and simple solution for a lot of things but you need to think it through in a game context [09:36] chapel: v8: var x = JSON.parse('{"f":"getPrograms"}'); x; [09:36] v8bot: chapel: {"f": "getPrograms"} [09:36] FuzzYspo0N: jonaslund, surely. That is why i have games with no threading/fibres in themselves YET. I want to make sure i dont do what i did when i started, i threaded the hell out of everything and had an awesome 8000fps lag engine [09:37] caolanm has joined the channel [09:37] dewey_: jonaslund: yeah, when I use the literal string it works [09:37] FuzzYspo0N: Cos of starvation nothing could really get at the data each cycle. It is obvious to thread modules and smaller tasks... And games have many of these [09:38] dewey_: but not when I use the data.toString() (the console.log outputs the correct string) [09:38] kal-EL_ has joined the channel [09:38] jonaslund: FuzzYspo0N: i did a lucasarts like game prototype that was based on a "lisp like" interpreter running on J2ME. I did some "fiber threads" support into the VM for animating stuff. [09:38] peol has joined the channel [09:38] peol has joined the channel [09:39] jonaslund: FuzzYspo0N: the grand idea of the interpreter was that ALL state would be held within the VM and to save/load the game you just got the VM state [09:39] Rahul_ has joined the channel [09:39] Rahul_: hi [09:40] jonaslund: So f.ex. threads would be running instantly with animation in a scene since the state of the threading was in the VM memory itself. it was a fairly pretty solution [09:40] Rahul_: while installing node i am getting errror [09:40] chapel: windows? [09:40] jonaslund: FuzzYspo0N: the "problem" was that while you didn't have to confuse normal "ingame" logic with load/save things and risking state wedging i had complicated the normal flow of things (to control the threads upon room entry/exit) [09:41] Rahul_: ya [09:41] Rahul_: windows [09:41] chapel: which version of node? [09:41] FuzzYspo0N: jonaslund, yea [09:42] TomY_ has joined the channel [09:42] jonaslund: FuzzYspo0N: with JS you really don't need threads "that much" imho, just have a ticker list and if you need to associate data just use the fact that JS has closures :) [09:42] SubStack: I like how JS doesn't have threads. Less thinking for me. [09:42] SubStack: reasoning about concurrency is hard [09:42] Rahul_: @ chapel using https://github.com/ry/node/wiki/Building-node.js-on-Cygwin-%28Windows%29 article for installing [09:43] Rahul_: giving me this error while doing make [09:43] Rahul_: copy: src/node_config.h.in -> build/default/src/node_config.h [50/74] copy: tools/nodejs.pc.in -> build/default/tools/nodejs.pc [51/74] libv8.a: deps/v8/SConstruct -> build/default/libv8.a /usr/bin/python "/home/Administrator/node/tools/scons/scons.py" -j 1 -C "/home/A dministrator/node/build/default/" -Y "/home/Administrator/node/deps/v8" visibili ty=default mode=release arch=ia32 library=static snapshot=on scons: Reading SConscri [09:44] chapel: SubStack: I like your take on 'threads' in that there aren't threads, but processes with discrete actions that you connect with dnode :) [09:44] chapel: Rahul_: what version of node? [09:44] jonaslund: fuzzy: ticker.setAnimator( function(deltaTime) { y+=dY*deltaTime; dY+=gravity*deltaTime; if ( y<0} return "stop"; character.setPos(x,y); return "ok" ); [09:44] jonaslund: that works for most small stuff [09:45] FuzzYspo0N: jonaslund, yea, it is just that concurrency would be critical in games usually. So there should be at least some form of 'go and do this and tell me when you get back'. While thats easy already in js using events, i want to extend it to make it more optimal if i can. [09:45] FuzzYspo0N: For example, the animation you just posted [09:45] dewey_: jonaslund: console.log(data.toString()); = {"f":"getPrograms"}, console.log(JSON.parse(data.toString())); = SyntaxError: Unexpected token ILLEGAL [09:45] Rahul_: @chapel latest [09:45] jonaslund: fuzz: how much javascript do you know ? [09:45] chapel: 0.3.8pre? [09:45] admc has joined the channel [09:46] chapel: those don't work with cygwin, you need to use mingw [09:46] chapel: or use 0.2.6 for cygwin [09:46] Rahul_: ok [09:46] FuzzYspo0N: I have these transitions that apply a curve to a start and end point, and animate them over time. While this is backgrounded and transparent to me as a user, it can easily weigh down the whole game if you use too many Exponential curves over time with events. What i would like is to somehow push that into a fibre/thread and concurrently update that with the normal game logic [09:46] SubStack: chapel: for one it's a lot easier to hook into a network stream to figure out what's going on than to muck about with internal shared memory [09:47] FuzzYspo0N: jonaslund, plenty :) i wrote a game engine in it so i like to think i know enough to get around [09:47] jonaslund: SubStack/chapel: threading are very precarious to get right if you don't take care from the start. For most programming i prefer erlang-style message passing (ie no-sharing) [09:47] mraleph has joined the channel [09:47] dewey_: could someone help me with this json problem: console.log(data.toString()); = {"f":"getPrograms"}, console.log(JSON.parse(data.toString())); = SyntaxError: Unexpected token ILLEGAL [09:47] chapel: SubStack: and conceptually, you can share memory in an abstract way [09:48] chapel: jonaslund: check out dnode, it passes messages if you will, and doesn't share memory [09:48] Rahul_: @ chapel so in the sequence of these command how can i choose 0.2. [09:48] Rahul_: .6 [09:48] Rahul_: cd ~ $ git clone git://github.com/ry/node.git $ cd node $ git fetch --all # if the above fails complaining --all is not recognised, try: git fetch origin $ git tag $ git checkout [latest stable tag from previous command, e.g., v0.2.5] $ ./configure $ make $ make install [09:48] xla has joined the channel [09:48] chapel: Rahul_: I am not much help with node on windows [09:49] chapel: I just know the 0.3.x code doesn't work in cygwin [09:49] Rahul_: ok [09:49] chapel: dewey_: see if you can assign data.toString() to a variable then json.parse that variable [09:49] dewey_: chapel: yeah tried that [09:50] FuzzYspo0N: or try String() the whole thing, maybe try ''+data.toString() or even try print out data[0] , might have a ' or something [09:50] nook has joined the channel [09:50] jonaslund: FuzzYspo0N: ah ok.. i was thinking you wanted it mostly for being able to write code more simply. closures handles most of those troubles if you come from c/c++/java [09:50] jonaslund: FuzzYspo0N: but if it's a performance problem yeah, you'd want threads [09:51] FuzzYspo0N: jonaslund, yea, its just that it is a common requirement in a game setting [09:51] jonaslund: FuzzYspo0N: the problem is that JS at the core is a very un-threadable language [09:51] FuzzYspo0N: I dont think that is a problem, more at how v8 implements itself at this stage [09:51] FuzzYspo0N: its threading model is single threaded [09:51] jonaslund: umm no, it's a language problem [09:52] FuzzYspo0N: well yes, but now with what im looking to do [09:52] jonaslund: or "problem", you do get alot of benefits instead [09:52] FuzzYspo0N: there is no concurrency problem in js [09:52] chapel: FuzzYspo0N: games don't have to be threaded, it depends on the game, and what you are trying to do [09:53] FuzzYspo0N: chapel, i never said they must be. Though they can use it to make more game and less worry of performance. [09:54] jonaslund: fuzzy: any "normal JS object" can have properties added or removed during execution, and there isn't really a way to do it atomically without locks [09:54] FuzzYspo0N: im thinking about trying to copy state across to a new instance.. Like 'take this code, and return the results', using background process/thread/whatever [09:54] jonaslund: FuzzYspo0N: and if you put locks (even if it was object specific locks) on every object you'd be loosing alot of performance [09:55] FuzzYspo0N: yea [09:55] jonaslund: hence.. it's a JS "problem" [09:55] FuzzYspo0N: which is not ideal of course [09:55] FuzzYspo0N: i guess. I think it is easier to model it in terms of work tasks, rather than a full execution context shared amongst threads [09:56] jonaslund: personally i think JS should get immutable objects and erlang style threading [09:56] narayan82 has joined the channel [09:56] jonaslund: #{hello:world,bla:123} -> an immutable object. and that could then be passed to other threads [09:57] FuzzYspo0N: hmm, i could probably implement something like that myself too [09:57] jonaslund: or maybe automatic "cloning" or binary serialization [09:57] FuzzYspo0N: yea snapshotting is what im thinking [09:57] jonaslund: but then there's that little funny part about the prototype chain [09:57] FuzzYspo0N: like shadow copy the state, execute in a background thread and return the results [09:59] FuzzYspo0N: hmm , i think ill experiment on the concept for now, maybe i can introduce something syntactically which marks something as shared like you mentioned [09:59] jonaslund: not shared, immutable [09:59] FuzzYspo0N: yea, well im thinking shared & immutable [09:59] jonaslund: immutable objects have alot of other virtues than just being immensly usable for threading :) [09:59] FuzzYspo0N: well no [09:59] FuzzYspo0N: yea hehe [10:00] FuzzYspo0N: im still waking up so most of what i say can be garbage yet [10:00] margle has joined the channel [10:00] bzinger has joined the channel [10:05] DoNaLd`: Is this bug in nodejs 0.3.7 .. or only i'm doing something wrong ? https://gist.github.com/808597 [10:05] matyr has joined the channel [10:07] sveimac: doing it wrong :) [10:07] sveimac: jk, dunno :) [10:08] altamic has joined the channel [10:08] altamic has joined the channel [10:08] sveimac: works the way you want in the chrome console at least, so might be latest v8 maybe... [10:09] daniellindsley has joined the channel [10:09] peol has joined the channel [10:09] peol has joined the channel [10:09] Jaye has joined the channel [10:10] jonaslund: *shudder* [10:11] jonaslund: I prefer to write dates as 2011-12-31 [10:11] daniellindsley has joined the channel [10:11] jetienne has joined the channel [10:12] danielzilla has joined the channel [10:12] jonaslund: (In Sweden on non-computerized records people usually write 31/12-2011 with 31 above the 12) [10:12] sveimac: ..same here... but some ego trips want to do everything their own way :P [10:13] sveimac: (dont get me started on oz vs the meter system :) [10:14] jonaslund: i just can't fathom how someone at some point in time thought it would be good to have the month first(neither smallest or biggest entity), then the date (the smallest) and finally the year (the biggest) .. in that order.. makes no sense [10:14] sveimac: amen [10:15] jonaslund: actually i can understand ounces and stuff since it had kinda of historic roots and worked well enough for people [10:15] saschagehlich has joined the channel [10:15] saschagehlich: good morning! [10:16] jonaslund: but writing dates like that has no basis in anything as far as i can see? (ok years was an afterthought on small dates.. but in cases like that you should just change the layout) [10:16] saschagehlich: does anyone have a good stringify function that converts strings containing non-utf8 characters to good filenames? [10:17] FireFly|n900 has joined the channel [10:19] davidc_ has joined the channel [10:19] daniellindsley has joined the channel [10:20] d0k has joined the channel [10:21] niklasfi has joined the channel [10:21] dominictarr has joined the channel [10:21] daniellindsley has joined the channel [10:21] dewey_: pff I finally found out what happend [10:21] dewey_: getPrograms\u0000 [10:22] dewey_: toString() isn't properly converting the buffer to string [10:22] stagas has joined the channel [10:24] nmtmason has joined the channel [10:24] neynenmo has joined the channel [10:26] altamic has joined the channel [10:26] altamic has joined the channel [10:27] astoon has joined the channel [10:30] danielzilla has joined the channel [10:35] markwubben has joined the channel [10:39] peol^ has joined the channel [10:40] margle has joined the channel [10:40] margle_ has joined the channel [10:44] matyr_ has joined the channel [10:47] altamic has joined the channel [10:47] torvalamo has joined the channel [10:48] niklasfi has joined the channel [10:51] matyr has joined the channel [10:51] CrazyGoogle: what is the best way to output exception ? With complete stack and etc. info ? [10:52] niklasfi has joined the channel [10:52] CrazyGoogle: util.debug(util.inspect(e)) isnt deep anought [10:53] altamic has joined the channel [10:54] fly-away has joined the channel [10:55] hwinkel has joined the channel [10:56] skm has joined the channel [10:57] daniellindsley has joined the channel [10:58] dominictarr has joined the channel [10:59] kristsk: CrazyGoogle, how about "util.inspect(e, false, 382818)" ? [10:59] w0rse has joined the channel [10:59] nook has joined the channel [10:59] kristsk: 382818 being depth [10:59] CrazyGoogle: ok, thanks :D [11:00] CrazyGoogle: kristsk: does it do Getter/Setter ? [11:00] kristsk: umm, afaik no [11:00] okuryu has joined the channel [11:00] FireFly|n900: Hm [11:01] FireFly|n900: I think it outputs [Getter/Setter] or something similar [11:02] dachary has joined the channel [11:02] tanepiper: CrazyGoogle: just throw the exception? That will print a full stack trace, and you can catch uncaughtException so your app doesn't crash [11:03] CrazyGoogle: i dont want the application exit [11:03] brainproxy: is it possible to require(..something..) to get console.log back if the global scope has been cleaned out? [11:03] CrazyGoogle: i will only output exception as it do if i throw [11:03] CrazyGoogle: actually [11:03] CrazyGoogle: i do catch uncaughtException [11:03] void_ has joined the channel [11:04] CrazyGoogle: and i have to ouput it now in this callback [11:04] CrazyGoogle: exectly as you sad [11:05] CrazyGoogle: but if you listen on uncaughtException than it dont ouput exception on console [11:05] shaunau has joined the channel [11:05] kristsk: catch(e) { sys.log(e.stack); herpDerp(); } usually does it for me. [11:05] neynenmo has left the channel [11:06] Jonasbn_ has joined the channel [11:06] altamic has joined the channel [11:06] altamic has joined the channel [11:07] w0rse has joined the channel [11:09] tanepiper: oh yea, e.stack :) [11:09] nook has joined the channel [11:09] CrazyGoogle: kristsk: yeah, i do that right now too, i was hoping there is generel util function to full output of the exception [11:09] dominictarr: e.stack attaches the message if one is defined. [11:09] CrazyGoogle: without going throw whole exception object [11:10] dominictarr: there are sometimes other attributes to the error which arn't in the message. [11:10] dominictarr: also, several attributes, like stack are getters [11:10] dominictarr: process the exception with for(var i in err) err[i] = err[i]; [11:11] dominictarr: that will normalize the error (no more setters) then inspect [11:11] dominictarr: also, log it to sys.err [11:11] w0rse has joined the channel [11:15] danielzilla has joined the channel [11:18] daniellindsley has joined the channel [11:18] emerleite has joined the channel [11:18] kristsk: sys.err appends timestamp [11:18] kristsk: ? [11:22] dominictarr: not sure. notmally i use console.error [11:22] dominictarr: but I think that might be blocking? [11:22] w0rse has joined the channel [11:22] dominictarr: i'm just debuging libs, njot writing servers so i don't worry [11:23] danielzilla has joined the channel [11:24] dominictarr: hmm... can you concat regexps? will they still work? [11:25] rakeshpai has joined the channel [11:25] rakeshpai: is there anything like active record or data mapper for node.js apps? just curious [11:28] pietern has joined the channel [11:28] dominictarr: I was looking into ORMs a few weeks ago. [11:29] w0rse has joined the channel [11:29] dominictarr: didn't find anything trad. [11:29] dominictarr: went with couchdb in the end... [11:30] rakeshpai: that's interesting. You'd think someone would have come up with something by now [11:30] rakeshpai: http://thechangelog.com/post/1178933840/sequelize-orm-for-mysql-and-node-js is the only thing I can find so far [11:31] chapel: biggieorm [11:31] chapel: there are a few orms [11:31] rakeshpai: this also sounds like a pretty solid area for code-exchange between client and server [11:31] chapel: depends on what you want [11:31] rakeshpai: yeah... I found several wrappers on top of no-sql dbs [11:31] rakeshpai: but nothing to work on top of relational dbs [11:32] rakeshpai: nothing = very little [11:32] CrazyGoogle has joined the channel [11:32] CrazyGoogle: i love new https module. Work like a charm, and is simplier than 0.2 ones [11:32] dominictarr: I feel people are getting into noSql more, especially with node [11:33] dominictarr: oh, I just remembered reading about a ruby-javascript transliterator [11:33] dominictarr: maybe it's possible to port activerecord with it? [11:33] rakeshpai: true, but node is merely a "node" in a system (according to ryah at least), and that might mean you would need to talk to relational dbs [11:34] dominictarr: absolutely... I guess it's just a matter of someone deciding it's a fun enough problem to solve. [11:35] rakeshpai: I seriously hope i'm not that one - I feel I need an ORM right now. Must. Resist. Urge. To. Write. One. [11:35] Ezku\: rakeshpai: i'd guess a lot of people are feeling that right now [11:35] rakeshpai: I just feel that writing one for my purposes is a little bit like yak shaving [11:37] MikhX_ has joined the channel [11:37] dominictarr: maybe everyone who wants an orm gets together and draws straws. [11:37] RichardJ has joined the channel [11:37] rakeshpai: There's so much that could be done! code sharing between client and server, running on top of everything from mysql and postgres to indexeddb and webdb [11:37] dominictarr: short straw writes it, everyone else buys them beers. [11:38] Ezku\: or, more likely, short straw gets to be manager. [11:38] rakeshpai: lol [11:38] dominictarr: you make it sound like drawing the sort straw is a bad thing. [11:38] MikhX_ has joined the channel [11:39] dominictarr: brb [11:39] unomi has joined the channel [11:42] Ezku\: well, assuming a manager's there to take care of the nitty gritty details of running things and the rest get to actually write code on an awesome new platform, i know which side i'd like to be on [11:43] altamic has joined the channel [11:43] altamic has joined the channel [11:46] dominictarr: ok, so manager to coders, that 1-many parent-child relation? [11:46] dominictarr: when the project gets big enough, you might need to manage managers. [11:47] dominictarr: trees are such a bitch in sql... [11:47] Lorentz: Hehe, recursives. [11:47] Ezku\: i'd like to read a good writeup on tree structures with map-reduce [11:47] Ezku\: or nosql systems in general [11:47] astoon has joined the channel [11:48] Ezku\: with embedded documents, it's trivial, but what if you can't have that [11:49] Lorentz: Ezku\: My guess is the usual parent_object_id style coding. [11:49] vineyard has joined the channel [11:49] Lorentz: Not sure how you'd write queries for it in nosql style dbs, considering this kind of stuff is sql's speciality of sort. [11:50] dominictarr: yeah, you approch with nosql seems to be to flatten your datastructure as much as possible. [11:50] Ezku\: Lorentz: I think trees in their explicit form (eg. adjacency matrix) are specifically _not_ fit for SQL because it usually requires an amount of recursion [11:50] Throlkim has joined the channel [11:51] kristsk: there are some graph oriented storages thou [11:51] kristsk: http://neo4j.org/ comes to mind [11:51] dominictarr: yeah! no recursive sql queries! thats is the biggest disapointment with sql [11:51] kristsk: have not used it thou [11:52] dominictarr: I had a look into neo4j... it's written in java and embedded. [11:52] dominictarr: which I think invokes the linking clause in thier AGPL licence. [11:52] Ezku\: kristsk: isn't that just your basic object oriented database? [11:52] daniellindsley has joined the channel [11:52] kristsk: which one? [11:53] Ezku\: they've been around for quite a while but never taken up (see eg. neo4j's 10 years) [11:53] kristsk: oh you mean in general, well. neo4j has "native" level abstractions for graphs [11:53] Lorentz: oodb implies you use objects to reference data, meaning you can just as well implement a graph with it. [11:53] Lorentz: This one is probably special just for graphs. [11:54] dominictarr: ...like pathfinding etc. [11:54] kristsk: oodb probably make lausy graphs if used for some mathematical sake [11:55] Lorentz: Mmm, pathfinding. [11:55] kristsk: you prbably could make a graph using some rdf db too heh [11:55] Ezku\: i guess objects would imply classes, which there don't seem to be (the schema is arbitrary by a cursory glance), which would make me wrong. [11:56] daniellindsley has joined the channel [11:56] vz has left the channel [11:56] dominictarr: ezku: what db are you refuring to? [11:56] hwinkel has joined the channel [11:57] Ezku\: neo4j [11:57] dominictarr: actually... an rdf database would do OO great [11:57] dominictarr: right. yeah you wouldn't get inheritence and all that stuff. [11:58] daniellindsley has joined the channel [11:58] kristsk: rdf query langages kinda suck. [11:58] piscisaureus has joined the channel [11:58] daglees has joined the channel [11:58] piscisaureus: jonaslund: ping [11:58] daglees has joined the channel [11:58] kristsk: imhp sparql and friends are quite verbose [11:58] kristsk: imho [11:58] dominictarr: either way, it would be a big hassle to connect neo4j to node... (java, they have a rest interface but it's not very powerful) [11:59] kristsk: um, wasnt there a bridge to java for node? [12:00] dominictarr: yup: https://github.com/unicodefreak/jbnode [12:03] dominictarr has joined the channel [12:03] dominictarr: ...i'm not convinced that neo4j really scales. [12:04] dominictarr: i mean, I havn't used it... but by smell. [12:04] dominictarr: read a google paper about pregel, (google's graph framework) [12:05] dominictarr: both claim a similar order or magnitude of scale, but pregle is (massively) distributed [12:05] daniellindsley has joined the channel [12:07] Frush3 has joined the channel [12:07] kristsk: haven't red anything on pregel [12:08] kristsk: but yeah, im not sure either on scaling of neo4j [12:08] Frush3: Hi there! Can anybody help me with irc-js? I'd like to know how I can catch a "ping timeout". [12:09] zorzar_ has joined the channel [12:09] dominictarr: the paper is a good read, but you have to pay ACM $15 to read it... [12:09] dominictarr: i mean download it. [12:10] Lorentz: Frush3: Not sure if it even lets you catch a ping timeout. [12:10] Lorentz: Think it just outright disconnects you when it catches it internally. [12:10] Lorentz: Actually [12:11] Lorentz: stream.addListener( 'timeout', do_disconnect.bind( this ) ) [12:11] Frush3: I found this: https://github.com/gf3/IRC-js/issues/closed/#issue/14 Isn't this the solution for my problem? I just don't know how to use it because there's no example. :( [12:11] jonaslund: piscisaureus: pong [12:12] dominictarr has joined the channel [12:12] piscisaureus: jonaslund: I e-mailed you already :-) [12:12] jashkenas has joined the channel [12:12] Lorentz: Frush3: I would hazard a guess that you do addListener('error') or addListener('error:network') [12:13] Lorentz: Or addListener('timeout' [12:14] Frush3: Lorentz: Okay, I already tried "error" but it didn't work. Now I'll try "error:network". Problem is that I get ping timeouts not very often, so it seems I have to wait for that to happen. ;) [12:14] Frush3: Lorentz: Thank you! I will try that. [12:14] broofa has joined the channel [12:14] jonaslund: piscisaureus: ok read it. yes, i think -static is probably the most sane thing. I read on some mailinglist about how the mingw team is doing things and it was encouraging (basically it seems some want to make it more unixy) [12:14] jonaslund: not encouraging.. discouraging [12:15] Lorentz: Frush3: Yeah, not too easy to test. I might try looking at modifying my firewall rules to simulate it, hrm. [12:15] piscisaureus: jonaslund: are they discouraging -static ? [12:15] jonaslund: (Nothing wrong with being unixy but cygwin does that just fine, mingw was always awesome because it was minimal and gave you a compiler and nothing else) [12:15] jonaslund: piscisaureus: no, they're not discouraging but they seem to be intent on making things more dynamically linked for some reason [12:16] piscisaureus: jonaslund: eventually I want to build a node.exe that is portable and has no dependencies that are not on windows by default [12:16] piscisaureus: ah :-) [12:16] piscisaureus: so i think -static is the more sane thing [12:16] piscisaureus: on posix things are baked into the binary by default as well [12:17] jonaslund: yes. i also think that a single exe will definetly be a preferable thing. (though module management,etc will need a look) [12:18] piscisaureus: jonaslund: modules, that's something I currently have no ideas about [12:18] piscisaureus: I think these would end up DLLs [12:19] piscisaureus: but I wonder what an api for extensions should look like [12:19] jonaslund: actually that part could get very messy [12:19] jonaslund: atleast with mingw [12:19] piscisaureus: jonaslund: loading dlls should be very doable [12:19] jonaslund: yes, but remember that v8 is c++ [12:19] piscisaureus: :-( [12:19] piscisaureus: yeah [12:19] piscisaureus: bleh [12:19] jonaslund: hence you will need to contend with c++ linking issues [12:20] piscisaureus: should be ok as long everyone uses the same compiler [12:20] jonaslund: and binary compability [12:20] piscisaureus: but building a dll with msvc and trying to use it with a mingw-built node will be problematic [12:20] jonaslund: yeah right :D [12:20] piscisaureus: hmm [12:20] emerleite has joined the channel [12:21] syntheze has joined the channel [12:21] piscisaureus: the other thing is that extension authors can do stuff to the event loop [12:21] piscisaureus: and I want to get rid of libeio and libev on windows [12:21] Frush3: Thanks, Lorentz! Gotta go. Have a nice time! Bye. [12:21] Frush3 has left the channel [12:21] jonaslund: hmm [12:21] tokumine has joined the channel [12:22] piscisaureus: plus node will provide it's own FD table on wnidows because the windows libc supports only 512 handles :-( [12:22] piscisaureus: so sharing an fd between extensions and node should be hard [12:22] jonaslund: i'm not really into new fangled build systems, why cmake/scons/waf ? [12:22] piscisaureus: nobody knows [12:22] tanepiper: PHP, the gift that keeps on giving: http://bugs.php.net/bug.php?id=42341 [12:23] piscisaureus: heh. everyone hates waf, including ryah [12:23] jdub: tridge doesn't hate waf :-) [12:23] piscisaureus: the cmake build is maintained by Tom, I think it is used for the webos port [12:23] matyr_ has joined the channel [12:23] Lorentz: A bug from 2007? [12:24] piscisaureus: that is much saner, maybe we should use it for the windows build as well [12:24] Lorentz: I thought we were way into 5.3 by now. [12:24] piscisaureus: jdub: who? [12:24] herenowcoder has joined the channel [12:24] jonaslund: piscisaureus: everything can appear sane when you're wrestling a common beast [12:25] piscisaureus: :-) [12:25] jonaslund: piscisaureus: I think msvc/mingw is going to be a big problem unless we find a way to harmonize compiler detection (or force scons to obey) [12:25] dominictarr has joined the channel [12:25] jdub: piscisaureus: author of samba. he might be a handy resource given they're using it quite ferociously. [12:25] jonaslund: or go with scons.. but i have no idea if that's preferable to [12:26] herenowcoder: does brianc's pg allow connecting client via unix socket? [12:26] herenowcoder: hi, btw. [12:26] piscisaureus_ has joined the channel [12:27] tanepiper: Lorentz: apparently still not fixed, they are using a hack [12:27] piscisaureus: jonaslund: we need to get scons to obey [12:28] piscisaureus: ACTION looking for a stick [12:28] DoNaLd`: herenowcoder: listen_addresses (string) [12:28] DoNaLd`: Specifies the TCP/IP address(es) on which the server is to listen for connections from client applications. The value takes the form of a comma-separated list of host names and/or numeric IP addresses. The special entry * corresponds to all available IP interfaces. If the list is empty, the server does not listen on any IP interface at all, in which case only Unix-domain sockets can be used to [12:28] DoNaLd`: connect to it. The default value is localhost, which allows only local "loopback" connections to be made. This parameter can only be set at server start. [12:29] altamic has joined the channel [12:29] altamic has joined the channel [12:30] jonaslund: piscisaureus: Maybe.. after looking at the code i have a loose idea about the code paths that forces MSVC to be used. The problem is that i have basically no experience with python [12:31] jonaslund: piscisaureus: Maybe you could possibly launch python with a script that "sets up" scons by subverting it internally before running the V8 maker or something like that but i don't have enough python knowledge to even begin looking at that [12:31] pgte has joined the channel [12:31] niklasfi has joined the channel [12:31] jonaslund: piscisaureus: and then we'll always have upstream changes from V8 and SCons to worry about [12:32] herenowcoder: Donald`: well it's not exactly what i asked, connecting to postgres tcp sock on loopback iface is one thing, and connecting to unix socket is another. My question was if there's a connectString syntax to choose unix socket. [12:33] DoNaLd`: herenowcoder: the answer is .. no :) [12:33] piscisaureus: jonaslund: ideally it should be fixed upstream [12:34] piscisaureus: mraleph knows about it but I don't think he's going to fix it himself [12:34] jonaslund: piscisaureus: apart from the fact that they don't really have a problem [12:34] jonaslund: V8 builds with scons, maybe chrome aswell? [12:34] Lorentz: tanepiper: Interesting [12:34] mraleph: nope, chrmoe uses gyp [12:35] Lorentz: Yep, still there. 5.3.3 btw. heh. [12:35] jonaslund: but chrome doesn't support cygwin/mingw ? [12:35] piscisaureus: ehm no [12:35] mraleph: piscisaureus: what's the problem? is it about building on mingw? [12:35] jonaslund: or how do they sync compilers if multiple compilers are present [12:35] piscisaureus: mraleph: it's the problem that when msvc is installed, scons goes haywire [12:35] mraleph: frankly me thinks it's the problem of scons [12:35] jonaslund: mraleph: mingw yes but i actually suspect that you could get trouble when building with cygwin aswell under the right/wrong circumstances [12:36] saschagehlich_ has joined the channel [12:36] piscisaureus: mraleph: you have a problem with floating patches on scons? [12:36] jonaslund: anyhow i was thinking [12:36] mraleph: well. we do not build or test V8 on mingw/cygwin so we can't even guarantee that V8 works. [12:36] jonaslund: can we adopt the scons compiler selection? detecting msvc isn't a bad idea if we want to go there eventually [12:37] jonaslund: then store a config.h for building modules [12:37] jonaslund: and compiler settings [12:37] jonaslund: that would solve alot of problems [12:37] mraleph: you can go to http://build.chromium.org/p/client.v8/console to see platforms we are officially build and test on. [12:37] Lorentz: tanepiper: Might be because stdClass is a bit special, and not to be used as a class in itself. [12:38] mraleph: piscisaureus: I don't have a problem with that. [12:38] piscisaureus: ok :-) [12:38] mraleph: I just think that both mingw and cygwin are not the way to go :-) [12:38] piscisaureus: mraleph: I don't think so either [12:38] pauls has joined the channel [12:38] piscisaureus: want to use msvc [12:38] chapel: mraleph: has node changed how v8 is developed, or at least what you guys decide to do with v8? [12:39] adambeynon has joined the channel [12:39] piscisaureus: mralepjh: although forcing ppl to get Visual Studio to be able to build node / extensions, that may be a significant entry barrier [12:39] jonaslund: mraleph,pisci: that's the reason using scons compiler settings would be a "good idea". If msvc is available then use it, otherwise go with mingw [12:40] piscisaureus: jonaslund: we should fix scons so that if you pass "toolchain=gcc" it picks gcc [12:40] piscisaureus: for the time being [12:40] jetheredge has joined the channel [12:40] mraleph: chapel: sometimes node.js community catches some nasty bugs :-) [12:40] mraleph: and I am happy with that [12:40] piscisaureus: currently toolchain=gcc only works half, gnu command line options are picked but msvc tools are called [12:41] Sembiance: Woot! Finally, what I've been waiting for. I'm so excited! http://www.amazon.com/FarmVille-Dummies-Angela-Morales/dp/1118016963 [12:41] jonaslund: mraleph: you have any idea if V8 is usable with iOS ? [12:42] mraleph: jonaslund: it will not work. no way to map executable memory. [12:42] dominictarr has joined the channel [12:42] mraleph: jonaslund: executable+writable. [12:43] jonaslund: ahh sucks [12:43] hellp has joined the channel [12:43] jonaslund: well maybe i should finish my hack-interpreter then :) [12:43] mraleph: jonaslund: one can probably manage to run V8 in simulator=arm mode, but running ARM simulator on top of ARM will be deadly slow :-) [12:43] jonaslund: did a small "js compiler" that generates C for a C compiler [12:44] jonaslund: eval isn't that important for the stuff i'd do on iOS [12:44] narayan82 has joined the channel [12:44] jonaslund: was 2-3x slower than V8 code, fairly acceptable [12:44] jimt has joined the channel [12:44] jetienne: jonaslund: it actually support js ? [12:44] jonaslund: a small subset, it was mostly a small hack to see what kind of performance i'd get [12:45] jetienne: or its a proof of concept compiler [12:45] jetienne: ok [12:45] jonaslund: same kind of property handling as v8 does [12:45] jonaslund: ie hidden classes [12:45] mraleph: jonaslund: \o/ I am slowly doing some research in that area (static compilation of JS subset; global type inference, cheep ffi, etc). [12:45] mraleph: nothing definitive yet though.... [12:46] jetienne: facebook did it with php. how much they gained because of this ? [12:46] jonaslund: mraleph: Cool, based on V8 code or just separate ? [12:47] mraleph: jonaslund: it is just in my head for now :-) [12:47] mraleph: I am thinking about it when walking to and from the office [12:47] dominictarr: php is much less dynamic then js. [12:47] jonaslund: mraleph: there would be 2 main awenues of improving performance in those cases i think. the first step would be to make some proper ssa forms to be able to statically infer integers,etc for loops and so on. the other would be to have profile guided opts [12:47] dominictarr: php has no closures. [12:47] eee_c has joined the channel [12:48] jetienne: dominictarr: do you know how much they gained ? it may be an estimation of upper bound [12:48] unomi has joined the channel [12:48] jonaslund: from my experience compiling JS will be "simpler" since PHP has ALOT of non-orthogonal cases [12:48] jonaslund: the only "wart" on the JS language itself imho is the length property on arrays [12:48] mraleph: jetienne: you can gain some nice things from that. no need to deal with C/C++ to write node extension, fast ffi with V8 = win [12:49] dominictarr: okay. no I don't know. [12:49] jonaslund: and the way my test interpreter works it doesn't matter [12:49] daniellindsley has joined the channel [12:50] jonaslund: mraleph: btw, how does V8 detect when an object is used like a hashmap instead of a normal object ? [12:51] jonaslund: using "hidden classes" for hashmaps feels kinda troublesome :) [12:51] danielzilla has joined the channel [12:52] jonaslund: just checking what type of property accessor is being used is one way... but it gets complicated by f.ex.: "for (var x in y) clone[x]=y[x];" [12:53] altamic has joined the channel [12:53] christophsturm has joined the channel [12:54] mraleph: "hidden classes" aka maps can describe many different object states. there is a state called SLOW, roughly speaking it corresponds to hashmap state of the object. [12:54] christophsturm: I know there's nvm to manage multiple node installs, but it seems that it does not handle different npm home directories. is there a multiple node manager that works with npm? [12:54] kubrow has joined the channel [12:55] jonaslund: mraleph: yeah same as me now kinda, i have an upper bound on the number of properties at 32 or something i think [12:55] mraleph: when you add to much properties, or you add property with non-indentifier name... bum... V8 switches object to this slow state. [12:55] jonaslund: mraleph: It's just that i realized that you might bomb that on the global object easily.. [12:55] jonaslund: hmm [12:56] dominictarr: christophsturm: if you install npm with the ~/.npmrc as describes on the npm github page it will be independant of node version [12:56] jonaslund: mraleph: So for (var x in y) clone[x]=y[x] will check if the string x is an identifier on every assign ? [12:57] jonaslund: mraleph: I put into my design now a type-tag as identifier, basically binarily interchangeable with strings but would allow for separate jump destinations in tables [12:58] dominictarr: ah... because by default nvm install the versions into nvm's folder in .npm [12:58] christophsturm: dominictarr: i only see "curl http://npmjs.org/install.sh | sh" on the github page. is that what you mean? [12:58] mraleph: jonaslund: global object is pretty special... it's properties are stored in special cells not in a generic dictionary other objects use. [12:58] dominictarr: scroll down to Option 3: Customize npm to your heart's content [12:59] mike5w3c has joined the channel [12:59] jonaslund: mraleph: ah right. yeah true, i had some thought about making a special object that just has all existing identifiers as separate cells [12:59] jonaslund: there's not that many global objects after all :) [12:59] dominictarr: ...and npm installs itself next to node by default. (so together they get confused) [13:00] christophsturm: dominictarr: thanks! [13:00] ianward has joined the channel [13:00] dominictarr: no problem. [13:01] mraleph: jonaslund: it will check if object is still in FAST mode. and depending on the string check might be pretty fast. [13:02] jonaslund: mraleph: hmm, interned strings for identifiers ? [13:03] azizlp has joined the channel [13:04] mraleph: jonaslund: I was wrong. Looking at the code check is done by simple scanning over string... [13:04] jonaslund: k [13:06] gallypette has joined the channel [13:06] mraleph: but we do have interned strings (they are called Symbols) [13:07] jonaslund: well i guess it's the same kind of problem that everyone will face when doing stuff like this :) [13:07] daniellindsley has joined the channel [13:08] jonaslund: i think the biggest disadvantage from having a statically compiled variant is when it comes to numerical performance [13:08] mraleph: you can infer a lot. [13:08] mraleph: at least it seems so. [13:08] margle has joined the channel [13:08] jonaslund: well you can make guesses and have corner-cases for them [13:08] jonaslund: right now i store type-tagged int32's for most things [13:09] mraleph: yep. [13:09] mraleph: in can also do some oldschool tricks like loop versioning. [13:09] jonaslund: the problem is that i need to allocate storage for a number if i get a floating point result [13:09] freakyfractal has joined the channel [13:09] mraleph: why not go with fatvalues? [13:10] jonaslund: struct { ptrdiff_t value; double num; } ? [13:10] mraleph: yep. or even NaN-tagging [13:10] jonaslund: ahh right.. NaN's are invalid regardless of mantissa. lotsa storage there :) [13:11] mraleph: yes. it's bit tricks all the way down :-) [13:11] daniellindsley has joined the channel [13:11] jonaslund: but are properties fatvalues aswell ? [13:12] piscisaureus: jonaslund = first noder who actually understands what v8 does :-) [13:13] dominictarr has joined the channel [13:13] mraleph: well you can make them fatvalues. This is what Mozilla's JS engine does IMHO. shaver can correct me if I am wrong. [13:14] FireFly|n900 has joined the channel [13:14] jonaslund: piscisaureus: The order i learned programming was c64, qbasic/VB, asm, C/C++, Java,JS (inbetween after Java a lot of small ventures into scheme/lisps, erlang,etc) [13:14] mraleph: V8 does not use fatvalues. [13:14] jonaslund: *ponders* [13:15] dominictarr has joined the channel [13:15] jonaslund: piscisaureus: I did alot of x86 asm coding and i've always had an eye for internals since that [13:16] hwinkel has joined the channel [13:17] FireFly has joined the channel [13:17] jonaslund: mraleph: hmm.. are FAST properties typed or just tagged values? (in essence.. are doubles allocated into separate memory from the tag itself) [13:17] stalled has joined the channel [13:17] dominictarr: no problem. [13:18] mraleph: jonaslund: values are typed (of course) but "fields" are not. [13:18] bradleymeck has joined the channel [13:19] dominictarr: catch you guys later. time for bed. [13:19] JulioBarros has joined the channel [13:19] dsirijus has joined the channel [13:21] mbrochh has joined the channel [13:21] piscisaureus: jonaslund: go work for v8 :-) [13:23] jetienne: http://vimeo.com/19465332 New built-in V8 debugger client for Node.js <- is this already included ? [13:23] pandeiro has joined the channel [13:23] scheibo has joined the channel [13:23] bradleymeck: i think it is on master [13:24] jetienne: ok [13:24] jonaslund: piscisaureus: hehe, thanks i guess. could be fun but i have my own dreams :) [13:24] tokumine has joined the channel [13:24] piscisaureus: write v9 [13:25] daniellindsley has joined the channel [13:27] dnolen has joined the channel [13:27] altamic has joined the channel [13:27] altamic has joined the channel [13:28] erwe has joined the channel [13:28] jonaslund: nah [13:29] danielzilla has joined the channel [13:30] broofa has joined the channel [13:31] broofa_ has joined the channel [13:31] heavysixer has joined the channel [13:34] broofa_ has joined the channel [13:35] jonaslund: actually i'm trying to focus on my main project [13:35] jonaslund: (a game) [13:35] broofa has joined the channel [13:36] kristsk: what kind of game? [13:36] jonaslund: been working on a small specific in-memory database to support it [13:36] jonaslund: web-strategy [13:36] erwe: hello world [13:36] erwe: \o/ [13:36] jonaslund: and i'm building node now since node is missing a sane way to serialize doubles [13:37] jonaslund: (it's more of a fallancy in JS itself) [13:37] kristsk: umm. what kind of precision do you want? [13:37] broofa_ has joined the channel [13:37] jonaslund: i just want to store those 8 bytes that define a long :) [13:37] jonaslund: erm [13:38] jonaslund: double [13:38] Aikar: jonaslund: use MessagePack :P [13:38] Aikar: for IPC and network transmission on server to server (not S2C) MP is better than jso [13:39] Aikar: json [13:39] Aikar: faster and smaller [13:39] jonaslund: and is there a good JS impl (or node impl?) [13:39] Aikar: npm install msgpack [13:39] kristsk: yea [13:39] Aikar: pgriess made a node wrapper to the official C++ implementation [13:40] case__: jonaslund, why do you need 64bits precision for a *game* ? [13:40] Aikar: and he also has a pure js implementation but its not as fast, but still faster than json [13:40] jonaslund: i don't care about the precision itself [13:40] kristsk: bitmaping of some sort, maybe [13:40] jonaslund: i just want fast storage to disk [13:40] Aikar: case__: games are srz business! [13:40] Aikar: jonaslund: msgpack would be better then [13:40] case__: Aikar, i'm aware of that, i'm in that buisness too :) [13:40] kristsk: i ended up gzipping my jsoned data and storing it that way [13:40] broofa_ has joined the channel [13:41] jonaslund: imho.. node buffers should have a new Buffer(8).writeIEEEDoubleBE(x) or something like that [13:41] kristsk: cpu overhead is negligible [13:41] Aikar: jonaslund: there is a binary module written by substack [13:41] jonaslund: Aikar: yes i saw it earlier, and back then it didn't support doubles [13:42] jonaslund: the core problem imho is that there is no standard way to extract the bits of a double or make a double from the bits that doesn't involve alot of operations that are going to take some time [13:43] matyr has joined the channel [13:45] dnolen has joined the channel [13:46] bradleymeck: jonaslund, NumberValue() in the C++ side doesnt work? [13:47] mraleph: I think the core problem is that JavaScript is bad programming language, and bad-bad systems programming language [13:47] djanowski has joined the channel [13:48] daniellindsley has joined the channel [13:48] jonaslund: depends on what you qualify as systems [13:48] kixxauth has joined the channel [13:48] bradleymeck: i agree with mraleph due to type coersion and numbers [13:49] jonaslund: bradleymeck: it prolly will, that's why i've been working on compiling node yesterday and today (todya mostly to try to find out how to make it compile reliably) [13:49] bradleymeck: otherwise the utf support ease is amazing [13:50] jonaslund: JS has some wonderful qualities and some horrendeous [13:50] arpegius has joined the channel [13:50] mraleph: jonaslund: when I say "systems" I mean something relatively low-level, wrong term perhaps (I've just blindly translated russian one). Say trying to write a high-throughput DB or in memory storage in JS is a bad idea. IMHO [13:51] bradleymeck: mraleph idk, low level is changing, couple of systems languages have memory management automated now [13:52] altamic has joined the channel [13:52] altamic has joined the channel [13:52] w3dot0 has joined the channel [13:52] jonaslund: bradleymeck: JS has other disadvantages, the biggest one would be that the language itself is basically impossible to get to work with threading in a reliable way [13:53] jonaslund: mraleph: depends on the setting, in many cases development time can be a bigger factor [13:53] broofa_ has joined the channel [13:53] mraleph: of course [13:54] mraleph: this is all about finding golden ratio between programmers time and CPU time :-) [13:54] Vertice has joined the channel [13:54] jonaslund: mraleph: in my case for example i have a lot of game-logic that involves handling data that i want to be persisted so round-trip times to an external database would be a big problem [13:54] Lorentz has joined the channel [13:55] jonaslund: mraleph: in my initial prototype i'll go all JS but the next logical step would be to move alot of the storage to C/C++ code [13:55] jano has joined the channel [13:55] daniellindsley has joined the channel [13:55] kristsk: what kind of improvement do you expect? [13:56] jonaslund: here is the kicker though [13:56] jonaslund: since V8 is so fast for most parts.. by the time i really would need to worry about moving code to C/C++ for performance i have a feeling i should already be starting to think about clustering [13:57] kristsk: my point [13:57] w3dot0: mraleph: look at memcouchd - about a week old, could use your help :) https://github.com/pcapr/memcouchd [13:57] fairwinds has joined the channel [13:58] mraleph: w3dot0: what kind of help? [13:58] w3dot0: embeddable couchdb (in-memory, no persistence - yet) [13:58] bradleymeck: jonaslund, i dont consider that a true disadvantage [13:58] w3dot0: finishing the btree implementation for example [13:59] w3dot0: it's not hooked up yet to the main codebase since some of the delete cases are not handled [13:59] matyr_ has joined the channel [13:59] w3dot0: https://github.com/pcapr/memcouchd/blob/master/lib/btree.js [13:59] jonaslund: bradleymeck: Depends on the setting, but yes erlang style soft-processes would be about as good in most cases [14:00] kristsk: umm, is node stable enought to trust it all in game data ? [14:00] freakyfractal has joined the channel [14:00] jonaslund: kristsk: i'm not counting on it [14:00] erwe has joined the channel [14:00] matyr_ has joined the channel [14:01] daniellindsley has joined the channel [14:01] bradleymeck: jonaslund, the only problem is people trying to mix a supervisor process and actor. delegate your commands to keep the illusion if you need those long running calculations. would be nice to have an easier way to share memory uni-directionally though. [14:02] altamic_ has joined the channel [14:02] altamic_ has joined the channel [14:02] jonaslund: kristsk: it's going to be an append-only db (kinda like couch, primebase,etc) so a crash will only affect recent changes [14:03] freakyfractal has joined the channel [14:03] mraleph: w3dot0: hehehe [14:03] mraleph: w3dot0: sorry can't help with that :-) [14:04] w3dot0: then it will take a bit longer to be ready - another week or so... [14:04] kriszyp has joined the channel [14:04] kristsk: "well, one more week then..." (tm) [14:04] bradleymeck: mmmm, is there a way to only run v8's gc once a certain memory amount is passed... guess i could poll... [14:05] kristsk: node --expose_gc and friends [14:05] mraleph: bradleymeck: why would you want that? [14:06] bradleymeck: building a templated pastebin, want to keep stuff in memory until it reaches a certain amount then prune [14:06] kristsk: uff. [14:06] mraleph: smells like weak reference to me [14:06] jonaslund: um yes [14:06] mraleph: or soft reference [14:06] jonaslund: i didn't know JS had that? :) [14:06] bradleymeck: i have my weakmap working, but its too aggressive [14:07] mraleph: and phantom reference [14:07] kristsk: it is a good idea for web facing node proceses to die of old age and spawn a child before that [14:07] bartt has joined the channel [14:07] bradleymeck: jonaslund couple implementations of harmony's weakmaps are about for node, mine isnt too maintained [14:07] kristsk: (or is it not) [14:07] kristsk: ((?)) [14:08] jonaslund: oh cool [14:08] kristsk: wait. keeping in memory garbage is poitnless [14:08] mraleph: bradleymeck: you can make it less aggressive. when your weak reference hits callback from GC you can check memory limit and resurrect your object by creating a non-weak reference [14:08] mraleph: or something along this lines... [14:08] bradleymeck: yea, would need to add a collection handler... ugg [14:09] bradleymeck: but good idea thanks [14:09] jonaslund: anyhow, i'm off now [14:09] mraleph: I am like a fish in GC waters :-) [14:09] jonaslund: need to do some shopping and finding a quiet working location before the kids gets home [14:09] bradleymeck: kristsk you dont keep memory, you cache things that may be useful or retrieved later but are not currently in use [14:09] bradleymeck: for example, the render functions for the templates you use [14:10] kristsk: oh, i see. [14:10] sveimac_ has joined the channel [14:10] jonaslund: cya guys [14:11] kristsk: add a dry run case for those functions and cycle them with setInterval heh [14:11] Mike_Rice has joined the channel [14:11] Mike_Rice: G' [14:11] Mike_Rice: mornin [14:12] mraleph: bradleymeck: btw the better idea is to kill your ref _before_ gc in GC prologue (I think there should be and API for that). [14:12] zigfrew has joined the channel [14:12] mraleph: so you have a strong ref. and then if you see in prologue that heap is to large then you just null it [14:13] mraleph: it's kinda like weak refs but more crude... [14:13] Mike_Rice: Has anyone run into this issue with mysql-native, "Error: ENOTFOUND, domain not found" [14:13] chrischris has joined the channel [14:13] Mike_Rice: any suggestions would be great [14:14] christophsturm: is there a utility method where i can pass an array of functions and a callback, and it calls the callback when all the functions in the array have called a callback? [14:14] bradleymeck: mraleph can i have multiple gc prologue handlers? [14:15] bshumate has joined the channel [14:15] bradleymeck: christophsturm, look into step [14:15] kristsk: Step ftw [14:16] piscisaureus: maybe node needs a to expose a GC prologue event [14:16] brianc: herenowcoder hey [14:16] bradleymeck: i will prolly add it to overload piscisaureus [14:16] devdazed has joined the channel [14:16] piscisaureus: bradlaymeck: I do not grok. restate [14:17] trotter has joined the channel [14:17] piscisaureus: bradleymeck: ^ [14:17] bradleymeck: node-overload needs updating and i will add a gc prologue listener [14:17] piscisaureus: ah ;-) [14:17] bradleymeck: anywho gtg to work [14:18] arnorhs has joined the channel [14:18] piscisaureus: I suggested it to ryah that it should be in core ages ago and he agreed, back then. But he wanted some smartness to avoid emitting those events when nobody's listening and I wasn't clever enough to get it done. [14:20] davidsklar has joined the channel [14:20] Aikar: if(events[event] && events[event].length) emit(event) ? :P [14:22] Aikar: ryan[WIN]: you here? [14:22] Aikar: whoa win o.o [14:22] torvalamo: winnar [14:23] matyr has joined the channel [14:23] Aikar: man ubuntu had a big update last night [14:25] fumanchu182 has joined the channel [14:25] zomgbie has joined the channel [14:28] danielzilla has joined the channel [14:29] aheckmann has joined the channel [14:29] matyr_ has joined the channel [14:31] jlecker has joined the channel [14:33] erwe has joined the channel [14:33] jchris has joined the channel [14:33] matyr has joined the channel [14:34] jtsnow has joined the channel [14:37] losing has joined the channel [14:38] TheJH has joined the channel [14:40] jherdman has joined the channel [14:41] sveimac_ has joined the channel [14:43] w3dot0 has joined the channel [14:43] perlmonkey2 has joined the channel [14:46] sveimac has joined the channel [14:53] devrim has joined the channel [14:54] jetienne: mape: you did something for live graph in js no ? where is that [14:54] mape: jetienne: a what what where? [14:55] mape: social proximity graph irc thiny? [14:55] jetienne: mape: i dunno. i remember a library doing smooth graph live in a webpage. a few days ago on this channel [14:55] mape: http://smoothiecharts.org/ ? [14:56] jetienne: mape: thats it, thanks [14:56] mape: np [14:56] mape: It is rather resource intensive though, better of hacking it and using scroll animation instead [14:56] mape: or css transitions [14:57] 13WAA33LS has joined the channel [14:57] piscisaureus: mraleph: this idea to create semi-weak references by hooking the gc prologue [14:57] piscisaureus: mraleph: how can that be done if no heap modifications are allowed in the prologue? [14:58] mraleph: ah. me being stupid. [14:58] eee_c has joined the channel [14:59] hwinkel has joined the channel [14:59] mraleph: you can null the reference without allocating anything. so it must work [14:59] piscisaureus: mraleph: hard to do that in js :-) [14:59] mraleph: yes [14:59] mraleph: need some C++ [14:59] piscisaureus: mraleph: is it not possible to receive a callback when v8 thinks it is a good idea to do gc, but before the actual prologue? [15:00] piscisaureus: *the actual gc [15:00] mraleph: no. [15:00] mraleph: well... [15:00] mraleph: getting gc in v8 [15:00] mraleph: usually means a failed allocation [15:00] stagas: I hate chrome reducing tab size to the point where nothing indicates what is what [15:00] mraleph: it executing JS after that is actually not the wisest decision :-) [15:01] piscisaureus: umm no not really no [15:01] Me1000 has joined the channel [15:01] daniellindsley has joined the channel [15:02] piscisaureus: maybe we should just have a callback in node that trigger when memory usage exceeds a certain limit [15:02] piscisaureus: ev_idle stuff [15:02] shaver: you really want a memory-pressure notification [15:03] shaver: either based on the whole system being under pressure, or approaching a specified hard/soft limit [15:03] jetienne: mape: is there something to avoid autoscaling ? [15:03] piscisaureus: ... especially when you do aggressive in-memory caching [15:04] mape: jetienne: don't think ther eis [15:04] mape: *there is [15:04] jetienne: mape: ok [15:05] figital has joined the channel [15:09] mitchell` has joined the channel [15:10] jetienne: mape: well it did the job well and fast. i got fancy report :) [15:10] mape: :) [15:11] shinmei has joined the channel [15:11] peol has joined the channel [15:11] peol has joined the channel [15:14] chris__ has joined the channel [15:15] chris__: hi, how do I append to a file? [15:15] chris__: fs.writeFile('message.txt', 'Hello Node', function (err) { if (err) throw err; console.log('It\'s saved!'); }); [15:15] chris__: doesn't seem to like to be appended to? [15:16] adambeynon has joined the channel [15:16] pgte: 2you have to open with [15:17] pgte: chris__: you have to open the file with fs.open(path, 'a', ...) [15:17] chris__: I see, thanks [15:17] boaz has joined the channel [15:17] pgte: then fs.write with pos = null [15:17] chris__: trying it now [15:17] akahn has joined the channel [15:20] logankoester has joined the channel [15:20] broofa has joined the channel [15:21] logankoester: This may seem like a strange question, but is it possible to run nodejs inside the browser? If not, why not [15:21] piscisaureus has joined the channel [15:22] broofa: logankoester: You mean, like Chrome? :) [15:22] piscisaureus: ACTION wishes for less memory leaks in firefox [15:22] TheJH: logankoester: only if you would integrate it as a plugin or patch the browser because it has filesystem access, can spawn processes, ... [15:22] broofa: logankoester You get the V8 engine,but you don't get all the OS-based APIs. [15:22] logankoester: interesting [15:22] TheJH: logankoester: V8, the JS engine of node, is used in Google Chrome [15:22] Z10x6k6h has joined the channel [15:23] logankoester: I ask because I'm interested in running node.js on Titanium Appcelerator Desktop (an RIA framework) [15:23] TheJH: logankoester: actually, V8 was developed by Google for Chrome [15:24] danielzilla has joined the channel [15:24] logankoester: It provides a "Workers" api, though I don't know how it is implemented, and a network api [15:24] TheJH: logankoester: because of the performance or because of filesystem access, ... ? [15:24] CrazyGoogle has left the channel [15:24] stephank has joined the channel [15:24] yhahn has joined the channel [15:24] julienXX: Hello! Does someone have a real world exemple of testing a node.js app with jasmine? I'm having a hard time figuring out how it should be written. [15:25] amacleod has joined the channel [15:25] logankoester: TheJH: Because I want to include a local websockets tcp server in my desktop application, ideally without bundling a binary [15:25] CrazyGoogle has joined the channel [15:25] chris__: is there something wrong with this format for opening a file, fs.open(somefile, 'a+', 'mode=0666'); [15:26] TheJH: logankoester: why a server and not a client (which is included in newer browsers)? [15:26] fallsemo has joined the channel [15:26] losing has joined the channel [15:26] logankoester: TheJH: The application interfaces with a page in the local user's web browser over websockets (the client is in the actual browser). [15:27] TheJH: chris__: yes, use fs.open(somefile, 'a+', 0666); [15:27] logankoester: Currently I'm using a remote server for the websockets connection and bouncing messages over it [15:27] logankoester: But this being a desktop application, it would be nice if it were functional without a centralized server [15:28] TheJH: logankoester: so a desktop application outside of the browser and somethng inside of it are talking to each other? [15:28] pgte: chris__ mode should be the octal value [15:28] pgte: 0666 is ok to test [15:28] logankoester: That's right TheJH [15:29] logankoester: It's a tool for developers that tells the browser to refresh a page when the files have changed [15:29] logankoester: If it makes more sense to give it some context... [15:29] logankoester: :) [15:30] TheJH: logankoester: and the application part was programmed in which language? [15:30] logankoester: The page in the browser listens on a websocket for "okay, refresh the page" signals [15:30] logankoester: JavaScript running on Titanium Desktop [15:30] logankoester: (similar to Adobe AIR, if you're not familiar with titanium) [15:31] sh1mmer has joined the channel [15:31] TheJH: don't know either of them. Titanium Desktop supports HTTP but not Websockets? [15:31] sivy_afk has joined the channel [15:31] logankoester: yeah, that's right [15:32] TheJH: in that case, you would propably get the best result with not too much work by using ajax long polling [15:32] TheJH: browser fires off GET request, server answers request when file has changed [15:33] jetienne: poll: suppose you get a file about superproject. how do you name it ? superProject ? SuperProject? superproject ? super_project ? [15:33] logankoester: Well, that would be an easy out, but I'd prefer the centralized (remote) server that does support websockets in that case [15:34] logankoester: I was thinking maybe node.js could help me get websocket support inside of titanium [15:34] jetienne: node.js is about server side websocket. [15:34] TheJH: logankoester: why would you prefer the centralized, web-socket-based approach? [15:35] logankoester: Well, with polling I'd have to make an AJAX request about every 1 seconds, even when idle [15:35] jetienne: you can timeout longer than that, no ? [15:36] logankoester: nah, the idea is that the page refreshes immediately when a file is saved [15:36] nonnikcam has joined the channel [15:36] logankoester: for previewing without bouncing out to the browser to click refresh [15:36] jetienne: logankoester: im not sure you understand long polling [15:36] jetienne: logankoester: the reaction is immediate [15:37] jetienne: logankoester: the server keeps the connection open, thus as soon as it get something to send to the browser, it does [15:37] logankoester: Ahh I just looked up long polling, I misunderstood [15:37] logankoester: that sounds excellent [15:37] jetienne: cool [15:37] Ari-Ugwu has joined the channel [15:37] logankoester: well thanks a lot guys, I'm glad you were able to set me off in the right direction even though nodejs wasn't what I was looking for [15:37] logankoester: much appreciated [15:38] jetienne: now why channelAPI doesnt do long polling ? :) [15:39] chris__: thanks guys [15:39] p4p4p4 has joined the channel [15:39] logankoester: I'll be back when I do need nodejs for something... looks like a great project [15:39] logankoester: thanks again! [15:40] jetienne: np [15:41] bradleymeck has joined the channel [15:41] daniellindsley has joined the channel [15:41] keyvan- has joined the channel [15:42] sivy has joined the channel [15:43] ceej has joined the channel [15:43] Poetro has joined the channel [15:44] emerleite has joined the channel [15:46] jano has joined the channel [15:51] neynenmo has joined the channel [15:51] rfay has joined the channel [15:52] void_ has joined the channel [15:53] softdrink has joined the channel [15:54] Blink7 has joined the channel [15:54] sveimac_ has joined the channel [15:55] sveimac_ has joined the channel [15:56] jdrannbauer has joined the channel [15:57] gautema has joined the channel [15:57] pt_tr has joined the channel [15:58] bradleymeck: grrr html encoding should be built in [16:00] lianj: huh? [16:01] dmcquay has joined the channel [16:01] gf3 has joined the channel [16:02] bradleymeck: lianj, encodeHTMLComponent alternative to URI etc [16:02] xla has joined the channel [16:03] lianj: oh, ok.. [16:04] colinclark has joined the channel [16:04] lianj: maybe ppl would enforce it too much :D [16:04] kennon has joined the channel [16:04] ericnakagawa has joined the channel [16:05] mr_daniel has joined the channel [16:07] sonnym has joined the channel [16:07] Mike_Rice has joined the channel [16:08] daniellindsley has joined the channel [16:08] mikekelly has joined the channel [16:09] narayan82 has joined the channel [16:10] mikekelly: do most people prefer Connect over JSGI? [16:10] sudoer has joined the channel [16:11] kennon has left the channel [16:11] luke` has joined the channel [16:12] indexzero has joined the channel [16:13] bradleymeck: mikekelly for any sort of streaming, much so, also just since express uses it, generally in node [16:13] kiddphunk has joined the channel [16:15] mikekelly: bradleymeck: interesting - what's the +s of connect wrt streaming? [16:15] bradleymeck: mraleph do you know if argument allocation is not viable during gc prologue? [16:16] bradleymeck: mikekelly, you can do it without a hacky .forEach which jsgi uses, you just stream out the data using .write [16:16] ryanfitz has joined the channel [16:16] mraleph: what do you mean by argument allocation? [16:16] ncb000gt has joined the channel [16:16] mikekelly: bradleymeck: would that be a foreach over the chunks? [16:16] bradleymeck: can i call js functions during prologue [16:16] mraleph: bradleymeck piscisaureus pointed out that no allocation is viable in our gc prologue :-( I completely forgot about that [16:16] mattly has joined the channel [16:16] mraleph: I would not recommend doing that [16:16] softdrink has left the channel [16:16] bradleymeck: bleh [16:17] bradleymeck: ill just leave it as during gc makeweaks then, but there was an oddity i found that i cant figure out [16:17] bradleymeck: will track down, but revived objects act oddly [16:18] bradleymeck: mikekelly, in jsgi you make an object with a forEach function that gets called as you stream data [16:18] bradleymeck: it somewhat acts like a delegated .write [16:19] CrazyGoogle: is there any github projekt with node-irc web interface ? [16:19] bradleymeck: in connect you just write to the response object's .write [16:19] mikekelly: are you talking up or down here? o.O [16:19] bradleymeck: crazygoogle a couple, forget the names [16:20] bradleymeck: mikekelly streaming to the client [16:20] bradleymeck: im not familiar with streaming to server in jsgi [16:21] Utkarsh has joined the channel [16:21] noahcampbell has joined the channel [16:21] Country has joined the channel [16:23] kriszyp: you stream with forEach() [16:24] strmpnk has joined the channel [16:24] bradleymeck: i hate that it is called forEach [16:24] bradleymeck: it seems misleading [16:25] kriszyp: which is quite elegant because you can use standard array iterators to map to a stream [16:25] mikekelly: foreach chunk? [16:25] kriszyp: databaseResults.map(JSON.stringify) -> a stream that you can send as a body [16:25] bradleymeck: kriszyp it might be convenient, but i personally dont feel it to be elegant [16:26] kriszyp: can't argue w/ subjectivity, of course ;) [16:26] bradleymeck: yup [16:26] chapel: whats elegant bradleymeck ? [16:26] bradleymeck: forEach streaming, i dont find it to be [16:26] kriszyp: what is beautiful? what is good?... :) [16:27] bradleymeck: i know SOAP is not [16:27] kriszyp: definitely agree on that one [16:27] mikekelly: I think the arguments against closures are a little bizarre in a js world, no? [16:27] bradleymeck: what arguments? in Internet Explorer? [16:28] mikekelly: As far as Apis go our exported methods are not perfect but more [16:28] mikekelly: abstract than requiring the use [16:28] mikekelly: Of a returned closure etc. [16:28] mikekelly: I wouldn't have thought anyone using node was worried about closures.. [16:29] mikekelly: that netsplit was _too_ well timed [16:29] mikekelly: :) [16:29] julienXX: anybody knows a node app that has a good test suite? [16:29] bradleymeck has joined the channel [16:30] langworthy has joined the channel [16:30] piscisaureus: ryah already here or is it too early? [16:30] remysharp has joined the channel [16:31] liar has joined the channel [16:31] dspree has joined the channel [16:31] aurynn has joined the channel [16:31] astoon has joined the channel [16:32] syntheze has joined the channel [16:32] jetienne has joined the channel [16:32] bradleymeck: too early [16:33] bradleymeck: and closures are lovely, but should be avoided when you just use them frivilously [16:33] mikekelly: .. are you saying jsgi is frivilous use? :) [16:34] mikekelly: honest question, btw [16:34] bradleymeck: no [16:34] bradleymeck: it made an API design to allow high level functions be the norm. [16:34] warz has joined the channel [16:35] bradleymeck: which could be better overall, but depends on how you view code i guess [16:35] mikekelly: apparently more performant [16:37] bradleymeck: mikekelly high level functions are generally less performant than procedural right now [16:38] mikekelly: ok i'm relatively new but I'm an http guy, and fwiw jsgi was much more intuitive [16:38] mikekelly: and I tried working with both [16:39] mikekelly: the 'branching delegation' stuff kriszyp has mentioned before was invaluable in the stuff I've done so far [16:39] bradleymeck: idk, i definately agree jsgi is better documented [16:39] bradleymeck: is that different than routing in connect? [16:39] CrazyGoogle has joined the channel [16:40] mikekelly: I think so, I have several jsgi components that delegate dynamically between one another dependant on the nature of the request [16:40] mikekelly: last time I tried to use connect I couldn't get it to do what I wanted [16:41] mikekelly: I can show you the code if you want.. :p [16:41] bradleymeck: would be easiest for me to understand [16:41] mikekelly: https://github.com/mikekelly/goo [16:43] zzak has joined the channel [16:43] tokumine has joined the channel [16:44] bradleymeck: are you talking about /goo/router.js? [16:45] sprout has joined the channel [16:45] mikekelly: well and /resource.js too which builds a jsgi component that then delegates to internal jsgi handlers [16:46] marcosvm has joined the channel [16:46] mikekelly: maybe it could be done with connect but I couldn't figure out how to approach it [16:46] mikekelly: seemed pretty obvious with jsgi [16:47] bradleymeck: that is very confusing to me, wish i had more time to figure it out [16:47] tjholowaychuk has joined the channel [16:47] amerine has joined the channel [16:51] devrim has joined the channel [16:51] Utkarsh_ has joined the channel [16:54] briznad has joined the channel [16:55] Lorentz: gf3: My irc bot does sweet sweet module loading now [16:55] Lorentz: Without bringing the bot down, that is. [16:56] gf3: Lorentz: oh yeah? [16:56] Lorentz: Yes. Uh, 30 minutes and I can migrate all my existing fixed modules to the new system, and I'll commit and show you. [16:57] Lorentz: Now you just add modulename.js into modules directory, and when bot is up, just call "load modulename" and done. [16:58] broofa has joined the channel [16:58] gf3: Lorentz: that's badass, can't wait to see it [16:58] gf3: Lorentz: is this in your bot or in a jerk fork? [16:59] Lorentz: Bot, I barely touched the jerk fork [16:59] Lorentz: Oh, on that note, only thing modified really was watch_for has a new param. [17:00] jakehow has joined the channel [17:00] Lorentz: I noticed jerk only listened on privmsg. Added join and part, since it's also very commonly used. [17:01] Lorentz: It's possible I'm underestimating jerk, and it didn't even need me to fork. [17:02] Lorentz: gf3: I'm _thinking_ that I should keep the fork away from dork as it is, since I have a feeling it'll get more and more features added as I keep writing for my bot. And you said you wanted jerk to be a very simple and clean bot. [17:02] Lorentz: I'm thinking something feature rich, closer to pircbot's level of detail. [17:02] Lorentz: Uh, jerk. dork is the forked name, because of that. [17:03] gf3: Lorentz: cool, if you have anything you think Jerk could benefit from send me a pull-req. [17:03] Lorentz: Sure [17:03] gf3: Lorentz: I can't wait to see what kinds of things you add [17:03] kiddphunk has joined the channel [17:04] mikeal: i love that we don't have ops in this channel [17:04] Lorentz: gf3: Bot right now can do tell, fortune, and choose. [17:05] tvon has joined the channel [17:05] Lorentz: Fortune and choose was easy enough, but tell uses join/part change, as well as uses mongoose to have a mongodb backend to store tells. [17:05] Lorentz: https://github.com/lorentzkim/misao-chan <--- that's the bot as it is [17:08] altamic has joined the channel [17:09] brapse has joined the channel [17:09] hij1nx has joined the channel [17:09] dspree has joined the channel [17:09] dspree has joined the channel [17:11] devrim has joined the channel [17:12] springmeyer has joined the channel [17:13] eee_c has joined the channel [17:14] Lorentz: Question, is require() cached? If require() is used once for a single module, and the module changes, and is then require()ed again, it seems to keep the old. [17:14] Lorentz: Is there a way to override this? [17:15] hij1nx_ has joined the channel [17:15] hjs has joined the channel [17:16] MrNibbles: think ive found a bug in safari/webkit [17:16] MrNibbles: http://jsfiddle.net/MrNibbles/BpBnp/6/ [17:16] MrNibbles: can anyone confirm this cant be overidden? [17:19] claudiu__ has joined the channel [17:21] erwe has joined the channel [17:21] BillyBreen has joined the channel [17:21] remysharp has left the channel [17:21] erwe: hi [17:22] Lorentz: ~ [17:25] banjiewen has joined the channel [17:26] qFox has joined the channel [17:27] kjeldahl has joined the channel [17:28] brianc: erwe: hi [17:30] kixxauth has joined the channel [17:31] w3dot0 has joined the channel [17:34] herbySk has joined the channel [17:34] eresair has joined the channel [17:34] aklt has joined the channel [17:34] Ond has joined the channel [17:34] w3dot0 has joined the channel [17:37] q_no has joined the channel [17:39] brianc: v8: false || undefined [17:39] v8bot: brianc: undefined [17:39] brianc: v8: '' || undefined [17:39] v8bot: brianc: undefined [17:41] vyvea has joined the channel [17:41] ryah: mraleph: http://skitch.com/bcantrill/rc28n/node.js-gcs-by-latency-and-type [17:42] mraleph: ryah: yeah saw that in your twitter. very nice thingy. [17:42] beawesomeinstead has joined the channel [17:42] beawesomeinstead has joined the channel [17:43] mraleph: ryah: though just pause length tells nothing. less is better... and that's all :-) [17:43] piscisaureus: ryah: that platform_win32_something stuff is really ugly [17:44] daniellindsley has joined the channel [17:44] mraleph: ryah: heap sizes, allocation speeds, promotion and survival ratios --- it is all very important :-) [17:44] piscisaureus: it suggests that the stuff in there has something to do with the platform/os module [17:44] Mike_Rice: Does anyone have experiance with mysql-native? [17:44] ryah: piscisaureus: you mean for abstracting the net stuff? [17:44] joelklabo has joined the channel [17:44] Mike_Rice: experience* [17:45] ryah: mraleph: if we had an API for allocation speeds, promotion and survival ratios; we'd use them [17:45] piscisaureus: ryah: in general. I put symlink() support in platform_win32_fs.cc, that's ugly too [17:46] ryah: piscisaureus: yeah... [17:46] ryah: well let's not do that then [17:46] mraleph: ryah: that's what I thought. GCTracer already collects all this info. exposing it through API should be piece of cake :-) [17:47] Mike_Rice: well, I'll ask anyways. :-) [17:47] Mike_Rice: I'm trying to use the example given for mysql-native [17:47] Mike_Rice: and I get this. [17:47] Mike_Rice: events:12 [17:47] Mike_Rice: throw arguments[1]; [17:47] Mike_Rice: ^ [17:47] Mike_Rice: Error: ENOTFOUND, Domain name not found [17:47] Mike_Rice: at IOWatcher.callback (dns:52:15) [17:47] Mike_Rice: at node.js:773:9 [17:47] fermion has joined the channel [17:47] ryah: mraleph: what's GCTracer? [17:47] kristsk: Mike_Rice: b0rk3d DNS ? [17:47] Mike_Rice: I'm using UP [17:47] Mike_Rice: IP* [17:47] Lorentz: Got it, module require() hotloading weee [17:48] Lorentz: Good thing require.cache is exposed now [17:48] ryah: i see, some class [17:48] mraleph: ryah: well. v8::internal::GCTracer (defined in heap.h), small class that collects data during GC for --trace-gc and --trace-gc-nvp [17:48] dgathright has joined the channel [17:48] wadey has joined the channel [17:48] ryah: mraleph: normally it is not run? [17:48] Mike_Rice: kristsk: I'm not sure why it would be initiating a DNS lookup with an IP [17:49] mraleph: ryah: yeah. but I doubt that it has anyoverhead. [17:49] Mike_Rice: kristsk: Also, I'm using request module, and that works fine for pulling in pages via URL [17:49] kristsk: hmm [17:50] Mike_Rice: kristsk: when I googled it, another guy had an issue connecting to localhost, he change to 127.0.0.1 and it worked. But I have a remote IP [17:51] kristsk: maybe it tries to check reverse dns ? [17:51] kristsk: (dunno just guessing, never have used mysql-native) [17:51] Mike_Rice: kristsk: I can't imagine why though [17:51] erwe: lol mongodb injection [17:51] fermion has joined the channel [17:52] erwe: i need to pay attention to that [17:52] Mike_Rice: kristsk: have you used any of the mysql modules? [17:52] kristsk: um [17:52] kristsk: https://github.com/Sannis/node-mysql-libmysqlclient <-- this one [17:52] daniellindsley has joined the channel [17:52] kristsk: not natvie js though [17:53] kristsk: it is being used in semi-production now [17:53] claudiu__ has joined the channel [17:53] Mike_Rice: kristsk: I would have to install the mysql libs right? [17:53] kristsk: umm yea [17:54] kristsk: it is node-wafishy and all. [17:54] kristsk: are libs a problem? [17:54] Mike_Rice: kristsk: trying to keep deployment to a minimum [17:55] kristsk: i see. [17:55] Mike_Rice: kritsk: but if I have to, I have to. [17:55] OSInet has joined the channel [17:55] OSInet has left the channel [17:55] matbee has joined the channel [17:56] perezd has joined the channel [17:57] brianc: Mike_Rice: I know a node-mysql is used in production [17:57] brianc: Mike_Rice: it's all js so there's no compile [17:58] brianc: https://github.com/felixge/node-mysql [17:58] vipaca has joined the channel [17:58] vipaca has joined the channel [17:59] julienXX: Can anyone give me some pointers on how to test this code https://gist.github.com/774628 ? [17:59] Mike_Rice: brianc: I'm getting ready to try that [17:59] brianc: Mike_Rice: it's used at http://transloadit.com [17:59] benburkert has joined the channel [17:59] EyePulp has joined the channel [18:01] Mike_Rice: brianc: Yeah, I saw that. I'm hopeful. Trying the example now [18:01] jetienne: brianc: are you the author of transloadit ? [18:01] brianc: jetienne: no, felixge is the author [18:01] jetienne: brianc: ok thanks [18:02] brianc: jetienne: why do you ask? [18:02] brianc: jetienne: did it seem like I was doing shameless self-promotion? [18:02] jetienne: brianc: because im interested in startup [18:02] Mike_Rice has joined the channel [18:03] jetienne: brianc: nope it didnt seems like that. in anycase i dont mind people telling about what they do when it is relevant to the discussion [18:03] void_ has joined the channel [18:03] ncb000gt: julienXX: You can use specific comments with specific data. and test that the results for those match [18:04] ROBOTARMY has joined the channel [18:04] ncb000gt: julienXX: that's how you could go about functional tests [18:04] julienXX: ncb000gt: ok thanks a lot! [18:04] EyePulp: anyone using uglifyjs ? [18:05] ncb000gt: EyePulp: yes [18:05] mape: EyePulp: jquery? :) [18:05] mape: And yeah, using it and loving it [18:05] EyePulp: heh - just wondering what the bin/uglifyjs file is referencing with it's var uglify = require("uglify-js") line [18:06] skm has joined the channel [18:06] hjs has joined the channel [18:06] EyePulp: I don't seem to get an uglify-js anywhere in the repo [18:06] ncb000gt: EyePulp: it's requiring the actual uglify-js module [18:06] EyePulp: you mean the dir of the actual repo? [18:06] ncb000gt: dir [18:07] EyePulp: directory? drawer? folder? =) [18:07] r has joined the channel [18:07] EyePulp: (drawer was for you Amiga kids) [18:07] Qbix1 has joined the channel [18:07] ncb000gt: :) [18:07] ncb000gt: ls /usr/local/lib/node/uglify* [18:07] ncb000gt: /usr/local/lib/node/uglify-js: [18:07] ncb000gt: index.js package.json.js parse-js.js process.js squeeze-more.js [18:08] zemanel has joined the channel [18:08] ncb000gt: when you install uglifyjs it sets that up. if you wanted to use it in your own code you'd do the same (don't have to use the command line tool) [18:09] mw has joined the channel [18:09] yozgrahame has joined the channel [18:09] EyePulp: ncb000gt: I think the confusion is the github repo is named UglifyJS - when cloning you're starting off with an improperly named directory [18:10] Guest97785 has left the channel [18:10] erwe has joined the channel [18:10] ncb000gt: EyePulp: yea, it used to be named that and then switched a bit ago [18:10] perlmonkey2 has joined the channel [18:10] ncb000gt: but renaming the github repo would cause issues with followers and forks [18:10] ncb000gt: so they probably left it alone for that reason [18:10] jano has joined the channel [18:10] EyePulp: argh. renames are the devil's work [18:10] zz_raja has joined the channel [18:11] EyePulp: as is not mentioning it someplace... visible [18:11] mape: any project with an upper case char is evil :) [18:11] EyePulp: okay, NPM guy [18:11] EyePulp: =P [18:12] mape: ? [18:12] sh1mmer has joined the channel [18:12] hjs has joined the channel [18:14] BHSPitMonkay has joined the channel [18:14] davidc_ has joined the channel [18:14] davidc_ has joined the channel [18:18] piscisaureus: ryah: what do you suggest I do then. move stuff to src/win32? [18:19] Mike_Rice: so... It looks like there's a bug in node.js DNS, when you try to connect to localhost, it has an issue, however, when you connect to 127.0.0.1 [18:20] brianc: Mike_Rice: I've never had a problem connecting to localhost via node. which version of node you on? which operating system? [18:21] mape: Mike_Rice: what are you connectiong to? [18:21] mape: *connecting [18:21] Mike_Rice: brianc: head 0.3.7, maybe, Windows7 64bit [18:21] brianc: Mike_Rice: cygwin? [18:21] Mike_Rice: mape: I was trying to connect to mysql [18:21] mape: k [18:21] Mike_Rice: brianc: yes, so it may actually be 0.3.1 [18:21] Mike_Rice: can node.js emit version? [18:21] ncb000gt: node --version [18:22] Mike_Rice: 0.2.6 [18:22] Mike_Rice: I have head on my other box, linux [18:22] mape: piscisaureus: Is your work towards getting node on win focused on dev or deployment? [18:22] kiddphunk has joined the channel [18:22] piscisaureus: mape: i do not understand you question [18:24] mape: piscisaureus: Is the reason you are putting time into node on windows for people developing on windows or people deploying on windows. Or just all around. [18:24] sechrist has joined the channel [18:24] jonaslund has joined the channel [18:24] Mike_Rice: mape: I dev on Windows and deploy to Ubuntu [18:25] jonaslund: dev on win, dep on fbsd [18:25] erwe has joined the channel [18:25] tsyd: dev on mac, dep on linux [18:25] piscisaureus: mape: erm, when I started I wanted to dev (well, I wanted to allow my coworkers to dev) on windows [18:25] mape: jonaslund: Isn't fsbd support so so on node? Or perhaps just npm, a friend of mine had great issues. Might have been solved. [18:25] mape: piscisaureus: Ah k :) [18:26] piscisaureus: mape: but my goals are more mixed now [18:26] Fuld_ has joined the channel [18:26] ryah: piscisaureus: not sure [18:26] Mike_Rice: I think what you'll find is there is a large enough user segment to qualify putting time into getting Windows working properly [18:26] erwe: lol @ piscisaureus [18:26] erwe: latin nickname XD [18:26] ryah: piscisaureus: i'd like there to be some symmetry between the posix and win32 stuff. [18:26] kylefox has joined the channel [18:27] dguttman has joined the channel [18:27] ryah: btw is win32 also win32 on x64? [18:27] piscisaureus: mape: I have to make it useful so it can be deployed on windows, although not for http server purposes [18:27] tfe_ has joined the channel [18:27] piscisaureus: ryah: I don't know. You should as WAF [18:27] piscisaureus: *ask [18:27] piscisaureus: I think so [18:27] Mike_Rice: ryah: if I understand your question, 32 bit run in it's own space on 64-bit [18:27] piscisaureus: Mike_Rice: node -e "process.platform" [18:28] ryah: that's not my question. I'm wondering about the term 'win32' [18:28] jonaslund: by the time x64 got into the mix MS was already pushing .net so they never bothered to rename the API [18:28] ryah: windows people seem to refer to all API as 'win32' [18:28] Mike_Rice: piscisaureus: cygwin [18:28] piscisaureus: ryah: yeah that is a legacy issue mainly [18:28] piscisaureus: ryah: because there used to be also win16 [18:28] ryah: piscisaureus: i see [18:28] jonaslund: ryah: apart from different pointer sizes it's mostly the same as win32 api i think. win16 was quite a bit more cludgy if i remember correctly [18:29] ryah: i assume windows runs natively on x64? [18:29] piscisaureus: yeah [18:29] jonaslund: yep [18:29] ryah: so, maybe you shouldn't use win32 in the filenames? [18:29] jonaslund: most non-lowend modern computers prolly run win64 [18:29] halfhalo: ACTION runs windows 2048 bit [18:29] blueadept has joined the channel [18:30] Mike_Rice: ryah: but 32 bit exe's run in WOW (Windows on Windows) [18:30] ryah: rather 'win' ? [18:30] jonaslund: it's mostly netbooks and other cheapo computers that still uses win7-32 [18:30] Mike_Rice: jonaslund: rumor from MS is Win 8 will be 64 bit only, like Windows Server 2008 R2 [18:30] piscisaureus: ryah: v8 calls it platform-win32 as well [18:30] statim has joined the channel [18:30] piscisaureus: ryah: but I like win even better because its short [18:31] ryah: piscisaureus: yes, i was confused by that [18:31] Mike_Rice: pisciasaureus: like your name [18:31] Mike_Rice: that I keep mistyping [18:31] piscisaureus: but you spelled it wrong [18:31] jonaslund: Mike_Rice: not really surprising, they'll prolly set a minimum of 4gigs of memory as a req for the certification so then they can as well go for 64bit [18:32] jonaslund: not to mention that all new signed drivers are 64bit.. it'll be far easier to push in DRM requirements now [18:32] jonaslund: alot worse for stuff like co-linux sadly [18:32] jonaslund: not that co-linux really matters much anymore with vbox and co being so good [18:32] piscisaureus: ryah: symmetry... [18:32] mape: jonaslund: KTH? [18:33] jonaslund: mape: studied media technology there, apperantly one guy named the same thing is studying comp-sci [18:33] ryah: piscisaureus: or not - we can reorganize at some point [18:33] nook has joined the channel [18:33] Mike_Rice: Does anyone have any suggestion for 0.2.6 as to why I'm getting a DNS error for localhost on Windows 7, cygwin? [18:33] mape: jonaslund: Ah k, just trying to keep track of other swedes in the community :) [18:33] ryah: piscisaureus: also - do you think you can get better than 100 MB/sec out of IOCP sockets? [18:33] hjs: hello everyone [18:33] Mike_Rice: Other than to upgrade. [18:33] jonaslund: mape: where did you get the kth part from? :) [18:34] piscisaureus: ryah: never had any doubt [18:34] mape: jonaslund: google and all that [18:34] jonaslund: hmm.. i'm feeling stalked :D [18:34] ryah: piscisaureus: because i'd like to write a general C layer on libev for doing completion-based I/O [18:34] mape: jonaslund: Wait ti'll I find your facebook and friend you [18:34] piscisaureus: ryah: I can write a test [18:34] jonaslund: ah yes, www.jonaslund.se is the comp-sci guy [18:34] jonaslund: NOT me [18:35] thermal has joined the channel [18:35] jonaslund: we actually have a group on facebook called jonaslund ;) [18:35] mape: hehe [18:35] piscisaureus: just a few socketpairs pumping stuff around should do [18:35] ryah: piscisaureus: i'd like to do this work in v0.5 [18:35] piscisaureus: yah. I understand that you don't want it in 0.4 [18:35] mape: ryah: 0.4 on track for next week? [18:36] piscisaureus: ryah: if we're going to shuffle around files, we should do in 0.5 too [18:36] piscisaureus: although it may make backporting more difficult [18:36] ryah: piscisaureus: something like this [18:36] ryah: https://github.com/ry/node/blob/v0.1.0/deps/liboi/oi_socket.h#L91-121 [18:36] ryah: mape: yes [18:36] bruse: <- is at KTH [18:36] halfhalo: ACTION wants the annoying http + self signed cert bug fixed in 0.4 so he can use it in an enterprise environment [18:36] mape: ryah: Great [18:36] admc has joined the channel [18:37] ryah: halfhalo: uh - i don't know about that? [18:37] MrNibbles: anyone got a mac with safari/ webkit nightly? [18:37] MrNibbles: trying to confirm this bug [18:37] MrNibbles: seems to only be on os x [18:37] erwe: i'm on iphone.. does that count? [18:37] MrNibbles: its a keyboard bug :P [18:37] erwe: lol [18:38] TheJH: MrNibbles: there's a #webkit channel with 292 users [18:38] Poetro1 has joined the channel [18:38] MrNibbles: theyre all bloody ignoring me and talking about far more important things that a bug thats ruining my game at the moment [18:38] jonaslund: My gf is occupying the mac right now [18:38] piscisaureus: ryah: seems like that could work [18:38] EyePulp: jonaslund: what is she, a settler? [18:38] MrNibbles: http://jsfiddle.net/MrNibbles/BpBnp/ <-- hold an arrow key to see scroll() magically cause an animation [18:38] MrNibbles: (only under webkit / safar [18:38] mape: bruse: Seems like having a swedish node channel might be neat, but also utterly worthless since they are usually silent [18:38] MrNibbles: i ) [18:39] jonaslund: EyePulp: nah.. it's a mac-mini connected to the tv.. she's watching some crappy show [18:39] langworthy has joined the channel [18:39] halfhalo: ryah: theres a ticket in github about it (related to node completely dying trying to to an http client to openid.com iirc), and I have the same thing happening when I try to connect to a local eucalyptus server and an internal cal state server [18:39] piscisaureus: ryah: although maybe I should not use that stuff / api on windows [18:39] piscisaureus: it is more important to me that we define the api for the C-JS barrier well [18:40] ryah: piscisaureus: yes [18:40] tvon has joined the channel [18:41] mape: ryah: Any plans on changing ticket system? [18:41] halfhalo: ryah: https://github.com/ry/node/issues#issue/504 [18:41] ryah: mape: no [18:41] mape: k [18:41] bruse: mape: i dont mind communicating in english :) [18:41] piscisaureus: ryah: although node becomes really funny this way :-) [18:41] piscisaureus: the core element, the event loop, is different between platforms [18:41] benburkert has joined the channel [18:42] piscisaureus: that should make writing portable extensions a crime [18:42] montylounge has joined the channel [18:42] hjs: hi everyone. i was just reading the npm source. hmm ... [18:43] jonaslund: piscisaureus: you're thinking of the iocp ports ? [18:43] piscisaureus: yeah. [18:43] pair has joined the channel [18:43] hjs: is there any reason why there are no semicolons other than to keep the parser busy guessing where to put them? [18:43] piscisaureus: for good performance you's have to use them [18:43] mape: bruse: hehe yeah, seems like that is the issue with swedes [18:43] tjholowaychuk: hjs: dont even bother with that discussion lol [18:44] piscisaureus: jonaslund: it will be iocp ports or a mixture of iocp and apc for timers [18:44] pair: anybody in here use node_redis? I'm getting some weird errors telling me that it doesn't know about the hset command [18:44] pair: node_redis: no callback to send error: Error: ERR unknown command 'hset' [18:44] pair: with redis@0.5.2 and on on redis 1.2.6 [18:44] tjholowaychuk: pair: HSET was added > 1.3.0x [18:44] tjholowaychuk: 1.3.0 * sorry [18:44] tjholowaychuk: oh no, 1.3.10 [18:44] hjs: tjholowaychuck: why not? [18:45] ryah: halfhalo: https://github.com/ry/node/issues/issue/504 [18:45] pair: ahhhh [18:45] Kingdutch has joined the channel [18:45] jonaslund: hmmm [18:45] tjholowaychuk: hjs: because it is irrelevant [18:45] bruse: mape: swedifying english expressions make me cringe anyway, so it might be for the best :) [18:45] tjholowaychuk: you wont gain anything from adding them (perf-wise) [18:45] pair: duh, see that on redis.io right now [18:45] jonaslund: piscisaureus: why would we need to separate the code with iocp ? [18:45] piscisaureus: jonaslund: what code? [18:45] jonaslund: *shudder* [18:46] fission6 has joined the channel [18:46] tjholowaychuk: hjs: that is pretty much the definition of micro-optimization :p [18:46] ryah: piscisaureus: any coe that creates sockets will need to go through JS [18:46] fission6: is there any glob functinality for instances i am using readdir but only one files wich end in *.whatever [18:46] piscisaureus: ryah: that seems reasonable [18:46] hjs: i am more concerned with readability quite frankly [18:46] jonaslund: piscisaureus: i'm reading a MSDN article on iocp, the asynchronous notifications should only be sent when the thread is in a "waiting state" [18:46] ajcates has joined the channel [18:46] jonaslund: piscisaureus: ie, you'll always get it in the "same" thread [18:46] piscisaureus: jonaslund: that's true [18:47] piscisaureus: that's exactly what we want :-) [18:47] fuzzy_ has joined the channel [18:47] ryah: halfhalo: i.e. it's already fixed [18:48] piscisaureus: ryah: when an extensions wants to share an fd with node that should go through js too [18:48] piscisaureus: because I will write a custom fd table that supports >512 fds [18:48] halfhalo: ryah: thanks. I'll test it against the internal stuff when I get into work tomorrow (no external network access). And iirc I tried it with 0.3.6 a week ago and it failed [18:49] piscisaureus: jonaslund: you can use apcs to set timers for example [18:49] hornairs has joined the channel [18:49] piscisaureus: jonaslund: you want those notification to arrive on the main thread [18:50] jamescarr has joined the channel [18:50] jonaslund: hmm, apcs ? [18:50] sveisvei: tjholowaychuk: where in stylus does all the files get compiled? I want to add a watcher with a cache, where does it make sense to put it.. or should I just make a layer on top of the api? [18:50] bartt has joined the channel [18:51] tjholowaychuk: sveisvei: via the cli? [18:51] tjholowaychuk: or the js api? [18:51] jonaslund: ah ok [18:51] jonaslund: async proc calls [18:52] sveisvei: was kind of a dual question... yeah, it should be via the cli... [18:52] ryah: halfhalo: maybe not - it doesn't seem to get the complete response. [18:52] tjholowaychuk: sveisvei: well the cli has --watch [18:52] hjs: tjholowaychuck: i was just curious about those semicolons because i'm starting to learn node. should i NOT use semicolons in my own programs to keep the style consistent with best practices? this is a serious question. [18:52] tjholowaychuk: hjs: most use them, but do whatever works for you [18:52] sveisvei: yeah, and I want to add a cache so my big projects compile faster [18:53] ryah: halfhalo: actually - hm [18:53] ryah: 0 0 ~/projects/node (master) curl -k https://www.myopenid.com/signin_password | wc -c [18:53] ryah: 9236 [18:53] ryah: 0 0 ~/projects/node (master) ./node test.js | wc -c [18:53] sveisvei: tjholowaychuk: just recompile files changed or files affected by changes... [18:53] ryah: 9236 [18:53] eee_c has joined the channel [18:54] tjholowaychuk: sveisvei: that is what it should be doing when --watch is used, it uses node's watcher to check the mtimes [18:54] hjs: tjholowaychuck: ok. thanks [18:54] mape: ryah: Think I asked this before, but the awsome stuff cantrill is doing, is it ever going public? [18:54] ryah: mape: yes [18:54] erwe has joined the channel [18:55] ryah: i think by the end of the month [18:55] ryah: for no.de [18:55] mape: hjs: Do whatever you prefer, which probly means keep the ; [18:55] tjholowaychuk: sveisvei: the interval is set to 50ms [18:55] mape: ryah: by public I meant the code. But perhaps that goes hand in hand? [18:55] eee_c1 has joined the channel [18:56] slpsys_: random question: i'm listening to a podcast with tim caswell, and he mentions bay area meetups, but i've only seen the one (on meetup.com, anyway) that has like 20 members [18:56] slpsys_: that's not really a question, i suppose; are there any others? [18:56] ryah: mape: oh - hm - i don't think so [18:56] neynenmo has joined the channel [18:56] mape: slpsys_: Keep track on twitter and there seems to be quite a few, mikael just had issues with 2 meetups being on the same day [18:56] slpsys has joined the channel [18:56] mape: ryah: Ah, that is too bad [18:57] sveisvei: tjholowaychuk: oki, ill have a stab at it. [18:57] slpsys: mape: hm, i'll pay more attention there then, thanks [18:58] mape: slpsys: http://twitter.com/#!/mape/nodejs could be decent start [18:59] mikeal: yeah [18:59] mikeal: two meetups in SF tonight [18:59] mape: Just pick people that seem interesting :) [18:59] mikeal: and i can't make it to either [18:59] mikeal: i've got a birthday party [18:59] sveimac has joined the channel [18:59] mape: mikeal: congrats/sorry :D [19:00] brapse has joined the channel [19:00] slpsys: yeah, i saw the one at 21st amendment (and i could use a beer), where's the other? [19:00] slloyd has left the channel [19:01] mikeal: it's someone else's birthday [19:01] mikeal: not mine :) [19:01] mape: Oh, the all congrats [19:01] tanepiper: ugh mape i feel so dissed :( [19:01] mape: *then [19:01] mape: tanepiper: ? [19:02] bradleymeck: tjholowaychuck, i was wondering why you chose to let colons be removed from stylus, and on that if it supports setting multiple properties at once? ie border-right=border-left=args or something [19:02] mikeal: slpsys: i posted the meetup links on my twitter yesterday [19:02] mape: http://www.meetup.com/Node-js-sfbay/events/16084839/?a=_grp&rv=cr1p [19:02] tanepiper: mape: i'm not in your list [19:02] mape: http://www.meetup.com/jsmeetup/events/16243344/?a=_yes&rv=md1p [19:02] mikeal: the one that isn't at 21st ammendment has like 160 RSVPs already [19:02] eee_c has joined the channel [19:02] tjholowaychuk: bradleymeck: because they are annoying to type lol but no that would not work [19:02] tjholowaychuk: bradleymeck: then border-right would become a var (same with border-left) [19:03] tjholowaychuk: not a prop [19:03] sprout has joined the channel [19:03] mape: tanepiper: Oh sry, just tend to keep people on that list that is low signal to noise, and didn't know about you :) [19:03] neynenmo has left the channel [19:03] tanepiper: oh mind you, you weren't in mine [19:03] tanepiper: mape: i was joking anyway ;) [19:03] slloyd has joined the channel [19:03] piscisaureus: /away for dinner [19:03] mape: tanepiper: This is the internets, my soul is hurt [19:05] daveyjoe has joined the channel [19:05] jchris has joined the channel [19:06] daveyjoe: Has anybody tried using localStorage from node? I'm imagine it's not very performant but does it work? [19:06] daveyjoe: *I'd [19:06] mape: daveyjoe: To reuse code? [19:06] tanepiper: I'm amazed at people on the mailing list still trying to push more into the node core :| [19:06] Country has joined the channel [19:06] void_ has joined the channel [19:07] mape: tanepiper: More is always better [19:07] daveyjoe: mape: Yeah, also just curious. [19:07] mape: daveyjoe: No reason you can't make a wrapper [19:07] tanepiper: mape: mehh, i agree with ryah on less in core, more in userland - although i do think nodejs should have a standard lib of userland stuff [19:08] daveyjoe: mape: Why would I need to make a wrapper? [19:08] mape: tanepiper: Make one good enough and it doesn't have to be "offical" :) Look at npm [19:09] bradleymeck: whats the pref way to get a filename that is not existant in a directory? just spray and pray random names? [19:09] tanepiper: yea, hence the point about node-debugger. i don't think it should or needs to be in core, which is what Jorge was on about [19:09] mape: daveyjoe: Choice of tech? [19:09] tanepiper: sure it's more powerful than the new core debugger, but i think they try to achive different things [19:10] ryah: we'll have an official package manager after v0.5 [19:10] mape: Better to keep core things core and have other things fight for dominance by being better [19:10] mape: ryah: How so? [19:11] ryah: mape: isaacs is going to make a very minimal version of npm that can be included [19:11] mape: Give push to devs to get their packages on the offical one? [19:11] jimt has joined the channel [19:11] ncb000gt: ryah: he already has a semi functional one called ryp iirc [19:11] ryah: ncb000gt: yeah, something like that [19:12] mape: What are the benefits of having a minimal npm standard rather then going all in on npm? Or just keeping it "standard" because it is awsome? [19:12] ncb000gt: stripped down npm that only pulls the latest [19:12] jano has joined the channel [19:12] mape: ncb000gt: That doesn't seem stripped, just configured different? [19:12] tanepiper: i think the best thing by the time we hit 0.5 will be node modules no longer being in global scope, but rather local packages [19:13] TheJH: bradleymeck: yes, why not? [19:13] jtsnow has joined the channel [19:13] ncb000gt: mape: that also*? [19:13] bradleymeck: TheJH just wondering [19:13] tfcoding has joined the channel [19:13] davidascher has joined the channel [19:13] daveyjoe: mape: take a look... https://github.com/isaacs/ryp/blob/master/ryp [19:13] TheJH: bradleymeck: if you're using 16 bytes or so, it should be enough [19:13] ncb000gt: yea, that [19:13] ryah: mape: because i think a minimal npm will teach people to develop code better [19:14] tanepiper: ryah++ [19:14] v8bot: tanepiper has given a beer to ryah. ryah now has 1 beers. [19:14] ncb000gt: ryah: you have a lot of faith in a package manager [19:14] mape: ryah: Minimal npm is different to npm how? npm doesn't seem bloated at all? [19:14] ryah: mape: just downloads packages into the cwd [19:14] sprout has joined the channel [19:14] sonnym has joined the channel [19:14] ryah: mape: instead of into a global directory [19:14] mape: oh k [19:14] maushu has joined the channel [19:16] christophsturm has joined the channel [19:17] liar has joined the channel [19:17] emacsen has joined the channel [19:18] jonaslund: sanity! [19:18] jonaslund: i so much hate packaging systems that make everything global [19:18] mape: ryah: btw, "i think a minimal npm will teach people to develop code better", care to share your thoughts on that? Don't think I've seem your thought on how that could be improved/what is the largest issue [19:18] jonaslund: it's the main problem i have with using linux,etc. Sure it might be ok for a userland system but once you want to develop stuff you always end up in dependancy hell [19:19] ncb000gt: jonaslund: there is an option to place your files into specific directory, but it's still global to the node install unless you're using something like nave or nvm [19:19] ryah: mape: we want to force people to consider their dependencies carefully [19:19] mape: *seen [19:19] mape: Ah k [19:19] mape: Yeah now it seems most are just, at least *** [19:19] ryah: one way to do that is to put all the files in the cwd so they see how much code they're including [19:19] ncb000gt: jonaslund: I've never ended up in dep hell with Ubuntu [19:20] ncb000gt: Using RPM yes... [19:20] mape: ryah: Are you talking of dependencies or the dependencies dependencies? [19:20] jonaslund: ncb000gt: the problem usually pops up for me when i'm trying to build something that isn't handled by the package managers that requires version xyz of lib 1 and 123 of lib 2 [19:21] ncb000gt: ryah: i don't think people are going to pay that much attention. as long as you are packaging the code, i don't have to know about it [19:21] erwe has joined the channel [19:21] jonaslund: ncb000gt: while the mainline system doesn't have that particular combinaton of versions [19:21] jimt_ has joined the channel [19:21] mape: so not the version dependency but the amount of dependencies? [19:21] ncb000gt: jonaslund: yea, i've never really had that happen using apt [19:21] Insanity5902 has joined the channel [19:22] jonaslund: ncb000gt: it's usually ok as long as you keep yourself to the package manager, i'm talking about when you need some tool outside the packaging system [19:22] bartmax has joined the channel [19:22] bartmax has joined the channel [19:22] ncb000gt: jonaslund: sure, what I'm getting at is that I rarely need something which isn't there, and if it's not there then I expect to have to get some other dependencies. [19:22] jonaslund: (most of my linux experiences has been with debian) [19:22] ncb000gt: that isn't a problem with package management though [19:23] ryah: mape: deps of deps [19:23] ryah: ncb000gt: maybe not [19:23] mape: ryah: k, and that being the deps of deps versions or the deps of deps count? [19:23] jonaslund: ncb000gt: depends.. if you need a different version of a lib that is already handled by the package manager it will usually mean problems [19:24] ncb000gt: mape: i think the point is dependency reduction and code bloat [19:24] ncb000gt: so probably a little of both [19:24] stagas has joined the channel [19:24] ncb000gt: or a lot of both :) [19:24] ncb000gt: jonaslund: true [19:24] mape: ncb000gt: Well it isn't really code bloat if it uses deps? If I'm using a module to parse xml I don't really care if it is 30k loc as long as it is fast? [19:25] jonaslund: ncb000gt: personally i actually see that as an advantage of windows.. yeah it might get bloated that every piece of software often ships the same dll's but atleast i can get everything running [19:25] nurb_ has joined the channel [19:25] ncb000gt: jonaslund: that has caused some issues before, but it's easy enough to work around...though I understand that "workarounds" shouldn't be required [19:25] piscisaureus has joined the channel [19:25] sh1mmer has joined the channel [19:25] tilgovi has joined the channel [19:26] devrim has joined the channel [19:26] jimt has joined the channel [19:26] ncb000gt: mape: i agree- in fact that was my point [19:26] ncb000gt: in an earlier comment [19:27] benburke_ has joined the channel [19:27] nurb_: herlo! when i listen like this res.on('data', function(chunk){...}) what is the type of "chunk"? what's the best practive to collect all chunks to a full response string? [19:27] ncb000gt: jonaslund: yes, i'm not sure i agree about the advantage part, but i know what you're saying [19:27] ncb000gt: nurb_: tis a buffer [19:27] mape: Yeah, seems like deps versioning is more of an issue rather then the deps count [19:28] ncb000gt: mape: possibly, but in those instances you can use one of the virtual environment tools [19:28] ncb000gt: nurb_: collect them into an array and then build a full buffer from them if you need to operate on the full buffer [19:28] ncb000gt: otherwise you can just pass the chunks around [19:29] mape: ncb000gt: Well, most modules right now just say "at least x.x.x version", and then break when unstable changes something [19:29] dnyy has joined the channel [19:29] mape: would probly be better if it stated current stable branch [19:29] o_o has joined the channel [19:29] andrzejsliwa has joined the channel [19:30] ncb000gt: mape: yea. tho that then requires more maintenance on the module dev side [19:30] ncb000gt: but you're right [19:30] mape: ncb000gt: sure, but then at least it works ;) [19:30] ncb000gt: the modules break because the deps are kinda wonky [19:30] admc has joined the channel [19:30] ncb000gt: mape: i don't disagree that it would be more stable. :) [19:31] Utkarsh has joined the channel [19:31] mikeal has joined the channel [19:31] jimt_ has joined the channel [19:31] nurb_: ncb000gt: ohai! thanks.. so how to i take the final buffer (in my case it represents a JSON) and convert it to a string (and then a JSON) ? [19:32] ncb000gt: JSON.parse(buf.toString()) [19:32] erwe has joined the channel [19:34] floby has joined the channel [19:34] floby has left the channel [19:34] DoNaLd`: plz. it is some bug or only i'm doing something wrong ? https://gist.github.com/808597 [19:36] nurb_: ncb000gt: yeah i tried that but for some reason its escaped weirdly like this: {\"timezone\":2,\"locale\":\"en_US\"} .. if i console.log(chunk) its not escaped.. is it something to do with the toString() method? [19:36] peol has joined the channel [19:36] peol has joined the channel [19:36] jimt has joined the channel [19:37] ncb000gt: nurb_: Hmm, you could try replacing \" in the string just before parsing... [19:37] stagas_ has joined the channel [19:37] nurb_: ncb000gt: yes fugly solution but ill do with it for now.. thanks again! [19:37] ncb000gt: DoNaLd`: It looks like you are getting output [19:38] ncb000gt: nurb_: sure, and yea it isn't the best...I'm not sure if there is a JSON parser that works on buffers directly [19:38] nurb_: ncb000gt: oh that would've been nice [19:38] ncb000gt: nurb_: but feel free to write one and release it to everyone if you do ;D [19:38] DoNaLd`: ncb000gt: yes, but this is wrong output [19:38] bradleymeck: DoNaLd` getDate not getDay if you want day of month, getDay is day of the week [19:38] nurb_: ncb000gt: hehe k [19:38] DoNaLd`: bradleymeck: and month ? [19:39] ncb000gt: month is based on 0-11 [19:39] hosh_work has joined the channel [19:39] ncb000gt: so add 1 to it [19:39] nurb_: ncb000gt: btw this buffer thing.. its a commonjs type? [19:39] bradleymeck: https://developer.mozilla.org/en/JavaScript/Reference/global_objects/date , everything is 0 based [19:39] bradleymeck: nurb_ nope, its a node.js thing [19:39] ncb000gt: nurb_: not afaik, it's a node type [19:39] DoNaLd`: ncb000gt: what ??? [19:40] DoNaLd`: omg [19:40] ncb000gt: bradleymeck: day is 1-31 [19:40] nurb_: ncb000gt: k kewl [19:40] dspree has joined the channel [19:40] dspree has joined the channel [19:40] ncb000gt: so mostly [19:40] ncb000gt: DoNaLd`: yea. :) [19:40] bradleymeck: bleh, they need to change the day to be 0 based for consistency... [19:41] ncb000gt: yea [19:42] sh1mmer has joined the channel [19:42] ncb000gt: nurb_: http://nodejs.org/docs/v0.3.7/api/buffers.html [19:42] ncb000gt: assuming you're using 0.3.7 [19:42] nurb_: ncb000gt: its where im at [19:43] nurb_: ncb000gt: yeah since today [19:43] DoNaLd`: perhaps it is not true ?! omg fuck [19:44] bradleymeck: what is not true? [19:44] sprout1 has joined the channel [19:44] DoNaLd`: that month is based on 0-11 [19:45] sh1m has joined the channel [19:46] bradleymeck: v8: for(var i = 1; i < 13; i++) {console.log((new Date(i+"/24/2000")).getMonth())} [19:46] v8bot: bradleymeck: CONSOLE: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], OUTPUT: undefined [19:46] bradleymeck: its 0 based [19:46] DoNaLd`: :( [19:47] nurb_: ncb000gt: well it wasn't escaped "weirdly", JSON.parse(chunk.toString()) worked. fanks. [19:48] Mike_Rice: Can you guys point in the right direction to throttle Request via connection pooling. I'm not finding anything via Google. [19:48] MrWarGames has joined the channel [19:48] pr2012 has joined the channel [19:48] mape: hmm [19:48] throughnothing has joined the channel [19:48] throughnothing has left the channel [19:48] throughnothing has joined the channel [19:49] ncb000gt: Mike_Rice: The new http client should have it built in [19:49] ncb000gt: And I believe you can customize it using Agents [19:49] ncb000gt: http.Agent [19:49] ncb000gt: if you're using 0.2.x [19:49] Mike_Rice: ncb00gt, I'm on 0.2.6 [19:49] ncb000gt: then you'd have to use someones (node-utils/pool) or roll your own [19:49] DoNaLd`: bradleymeck: ncb000gt: but thank you for your help and explanation [19:49] MrWarGames has joined the channel [19:50] Mike_Rice: if I was on 0.3.6, how would I configure it? [19:50] mape: hmm [19:50] mape: ncb000gt: sorry but I need to hilight [19:50] Mike_Rice: ncb000gt, if I was on 0.3.6, how would I configure it? [19:52] mikedeboer has joined the channel [19:52] keyvan- has joined the channel [19:53] skm has joined the channel [19:53] tc77 has joined the channel [19:54] sh1mmer has joined the channel [19:54] andriijas has joined the channel [19:55] ncb000gt: mape: highligh what? [19:55] mape: ncb000gt: Your name :) Just showing a friend http://wargamez.mape.me/ [19:55] ncb000gt: Mike_Rice: not sure, I haven't used it. It has it built in [19:55] ncb000gt: mape: aha! awesome :) [19:56] ncb000gt: mape: that is still so cool to me :) [19:56] hij1nx has joined the channel [19:56] mape: ncb000gt: Hehe yeah, beside the fact that it has been broken for weeks because I though I had a $$ selector cache in there :P [19:56] Lorentz: gf3: Finally implemented hotplugging, phew [19:56] andrzejsliwa has joined the channel [19:56] Lorentz: Done it right, had to refactor a lot. [19:56] ncb000gt: haha [19:56] gf3: BOOM [19:56] gf3: Lorentz: refactor Jerk or your bot? [19:56] Lorentz: My bot [19:57] ncb000gt: ryah: you're on the east coast? [19:57] ncb000gt: <-- stalker [19:57] ncb000gt: <.< [19:57] Lorentz: Hmm, needs authentication feature too [19:57] gf3: Lorentz: I added a very simple live reload to one of my bots recently [19:57] freakyfractal has joined the channel [19:57] gf3: Lorentz: it's not that robust though [19:57] gf3: Lorentz: https://github.com/gf3/protobot/blob/master/protobot.js#L230-258 [19:58] mjr_ has joined the channel [19:58] sprout has joined the channel [19:58] mape: ncb000gt: And yeah, I still think I should have saved that one for node knockout :P A lot of people seem to like it [19:59] Lorentz: gf3: I see, it does a git pull and restarts? [19:59] Lorentz: gf3: https://github.com/lorentzkim/misao-chan/blob/master/app.js#L60 [19:59] gf3: Lorentz: that's one of them, notice the one above reloads JSON [19:59] ncb000gt: mape: agreed. [19:59] ryah: ncb000gt: sf [20:00] ncb000gt: ryah: hmm, mape...found a bug... [20:00] pifantastic_ has joined the channel [20:00] mape: But then again I doubt it would have won node knockout, a lot of great entries [20:00] mape: ncb000gt: how so? [20:00] ncb000gt: mape: ryah is on the west coast of the US but on my screen it shows him right near me... [20:00] Lorentz: gf3: Ah, and reloads it [20:01] ryah: ncb000gt: oh - my server is in new jersey [20:01] ncb000gt: ryah: aha [20:01] ncb000gt: mape: scratch that [20:01] Lorentz: gf3: Mine's quite primitive too. It only does hotloading for modules too. line 77, is where it loads. [20:02] hij1nx_ has joined the channel [20:02] mape: ncb000gt: ryah has a shell on the east coast :) If I recall correctly [20:02] robotarmy has joined the channel [20:02] Lorentz: gf3: Will have to restart the bot if any of the code in app.js changes. And doesn't do git yet, but I figured I can leave the kernel alone usually, and git pull externally from it, unload module, load module, and it goes on from there again. [20:02] gf3: mmm [20:03] mape: ncb000gt: But yeah, the whole idea relies on geoip, which isn't always perfect [20:03] Bonuspunkt has joined the channel [20:03] tim_smart has joined the channel [20:04] Lorentz: gf3: This also seems to mean that my hard dependency to mongoose is gone too, as long as you don't try to load the modules that use it. [20:04] jamescarr: is there a version of jade that works on the client side? [20:04] hij1nx__ has joined the channel [20:04] awenkhh has joined the channel [20:04] Lorentz: And still got some cleaning up to do. Hrm. [20:05] ncb000gt: mape: yea i figured as much, and assumed that he was on a server somewhere [20:05] mape: Jup [20:05] ncb000gt: but i do like finding bugs [20:05] ncb000gt: :) [20:05] tjholowaychuk: jamescarr: nope [20:05] tjholowaychuk: i'd like to have some automated conversion stuff [20:05] tjholowaychuk: for stylus as well [20:05] tjholowaychuk: but I HATE maintaining both in one lib, its so ugly [20:05] MikhX has joined the channel [20:07] tim_smart: Is Anywhere the same as Plus? [20:07] tim_smart: Wrong chat [20:07] jpick has joined the channel [20:09] Bonuspunkt: anyone know a client js framework that is designed to handle high latancy out of the box [20:09] aslakhellesoy has joined the channel [20:10] malkomalko has joined the channel [20:10] hij1nx_ has joined the channel [20:10] ryanfitz has joined the channel [20:11] piscisaureus has joined the channel [20:12] caolanm has joined the channel [20:14] evanmeagher has joined the channel [20:15] chewybacon has joined the channel [20:17] kevwil has joined the channel [20:18] caolanm: is there any way to catch a SyntaxError from require()? [20:18] mape: Bonuspunkt: ie no timeouts? [20:18] caolanm: node just seems to exit [20:19] ryah: caolanm: no [20:19] caolanm: ryah: ok, didn't think there was [20:20] Bonuspunkt: mape no more like when u open a combobox and the data is not preloaded yet it displays a loading-img and so on [20:20] CIA-99: node: 03Ryan Dahl 07master * r97f7c06 10/ (4 files in 4 dirs): [20:20] CIA-99: node: TLS: fix throttling [20:20] CIA-99: node: Re-enable test-https-large-response.js [20:20] CIA-99: node: Closes GH-614. - http://bit.ly/eWSszS [20:20] ryah: ^-- :D [20:21] mape: Bonuspunkt: Oh, that seems.. handy but also constraining [20:21] fly__ has joined the channel [20:21] Utkarsh_ has joined the channel [20:21] Bonuspunkt: why how could that be constraining? [20:22] Remoun has joined the channel [20:22] mape: Bonuspunkt: the more magic things the more rules there are to follow [20:24] peol has joined the channel [20:24] yozgrahame has joined the channel [20:25] sprout has joined the channel [20:26] peol has joined the channel [20:26] peol has joined the channel [20:26] void_ has joined the channel [20:26] EyePulp: what's the current technique for applying an SSL cert now (from commits it looks like TLS is mostly a go, yes?) [20:27] ryah: EyePulp: tls is mostly ago [20:27] dgathright has joined the channel [20:27] ryah: s/ago/a go [20:28] EyePulp: a go some time ago? [20:28] Me1000 has joined the channel [20:28] tfe_ has joined the channel [20:28] ryah: there are still some corner bugs here and there [20:28] ryah: but it's mostly working [20:28] bradleymeck: nice [20:29] ryah: half-duplex ssl doesn't work [20:29] ryah: not sure if anyone cares about that. [20:29] malkomalko: question about node and memory.. I have a process that pivots large data files.. it seems like there are times when memory runs away in the node process and things start breaking.. does V8 have some type of max, or could I fix this problem by throwing more hardware at it, or using multiple node processes [20:29] bradleymeck: when do you use half duplex ssl @_@ [20:29] joelklabo has joined the channel [20:30] bradleymeck: past 1gb in memory it gets hairy in v8 [20:30] bradleymeck: use multiple processes [20:31] jonaslund: . [20:32] tim_smart: malkomalko: Try and never cache data inside of node itself [20:32] tim_smart: Just pump data through it [20:33] malkomalko: bradleymeck: interesting thanks [20:33] malkomalko: yah tim, for pivoting data there needs to be data collection [20:33] CIA-99: node: 03Ryan Dahl 07master * rf6e5b89 10/ lib/tls.js : Clean up - http://bit.ly/fipJAq [20:33] jonaslund: hmm [20:33] malkomalko: we have a good algorithm, but we're trying to come up with a cheap way without introducing something like redis [20:34] jonaslund: what's the problem with 1gb in v8 ? [20:34] malkomalko: some time intensive stuff [20:34] bradleymeck: jonaslund, stop the world GC [20:34] malkomalko: are there any nice cheap alternatives like dumping things to disk that you know of that we can use to query some quick sets of data? [20:34] jonaslund: ah ok [20:35] andrzejsliwa has joined the channel [20:35] jonaslund: hmm [20:36] jonaslund: would it be hard to extend buffers to support mmap ? [20:37] tim_smart: malkomalko: Redis could be a good option. Pretty easy to set up and run. [20:37] Evet has joined the channel [20:37] ossareh has joined the channel [20:37] tim_smart: I got a pretty fast client that is binary safe. [20:38] Evet: any news about 0.4? [20:38] Mike_Rice: Can anyone confirm if this should work on 0.2.6 (Request Pooling)? https://gist.github.com/810141 [20:39] Mike_Rice: It doesn't appearing to be receiving the response event [20:40] Mike_Rice: Evet: If I understand the mailing list 0.4 is next week [20:40] Mike_Rice: Ry: is that correct? [20:41] TheJH: off topic: is somebody here who can tell me about the approximate density of open WLANs in Berlin? [20:41] tim_smart: Mike_Rice: >0.3.6 gets pooling for free:) [20:41] Mike_Rice: TheJH: 12.82 [20:41] Mike_Rice: tim_smart: I'm on Windows, Cygwin [20:41] mraleph has joined the channel [20:41] TheJH: Mike_Rice: which unit? [20:41] Mike_Rice: TheJH: WAG [20:42] JojoBoss has joined the channel [20:42] tanepiper: Evet: it's coming! [20:43] TheJH: Mike_Rice: what's a WAG? [20:43] niklasfi has joined the channel [20:43] niklasfi: hi. what do i have to do to delete an object in js? https://gist.github.com/810154 [20:44] Mike_Rice: TheJH: Wild Ass Guess. In all honesty, if you can get a list of public access points with latitude and longitude, Google, you should be able to set bounds, determine area, and calculate [20:44] TheJH: niklasfi: remove all references [20:45] TheJH: Mike_Rice: from where can I get such a list? [20:46] dmcquay has joined the channel [20:46] TheJH: Mike_Rice: I'll be in Berlin for a few days and want to know whether taking my laptop with me would be a good idea [20:46] ezmobius has joined the channel [20:47] dgathright has joined the channel [20:47] hunterloftis has joined the channel [20:47] Mike_Rice: TheJH: I think this company has a bit of data, http://www.jiwire.com/, you might email them [20:47] TheJH: niklasfi: for storing many objects with unique values where objects in the middle of the range or so can be deleted, don't use an array [20:47] lianj: TheJH: try 'freifunk berlin' [20:48] TheJH: lianj: their map ( http://map.berlin.freifunk.net/ ) seems to be down (at least for me) [20:48] hellp has joined the channel [20:48] niklasfi: TheJH: well... how else would you implement a queue then? there may be people who drop out before they reach the end of the queue [20:49] TheJH: niklasfi: variable for the next id and an object instead of an array [20:50] niklasfi: TheJH so i should implement a list..? [20:50] TheJH: niklasfi: `var arr = []; arr[500000] = 5;` AFAIK allocates an array with the length of 500000 that really has that length in memory [20:52] niklasfi: TheJH: these drop-out events will be quite seldom. my current implementation is that the "cashier" (the function at the end of the queue) checks if the value of the queue entry is === null. if that is the case the cashier serves the next customer [20:52] brianc: tim_smart: can you point me in the direction of 'pooling' you're speaking of in >0.3.6 [20:52] mikeal has joined the channel [20:52] brapse has joined the channel [20:53] TheJH: niklasfi: I think that you should do something like this: https://gist.github.com/ce02a097320bc9f905c1 [20:53] tjholowaychuk: ryah: are there plans for a process.stderr Stream? [20:54] niklasfi: TheJH: that is a custom-build single-linked list [20:54] rjrodger_ has joined the channel [20:54] TheJH: niklasfi: I don't think that it is one, but I think that it would be a good idea [20:54] TheJH: to use one [20:55] hwinkel has joined the channel [20:55] niklasfi: TheJH: the problem is that i cannot assign the id in ascending order [20:56] TheJH: niklasfi: how do you assign it? [20:56] niklasfi: TheJH by random [20:56] piscisaureus has joined the channel [20:56] TheJH: niklasfi: and the random ids are long enough? [20:57] niklasfi: it's not about the length of the ids it's that customers might skip the queue once they find out they can just decrease their ticket number in order to get in front [20:58] lukegalea_ has joined the channel [20:59] colinclark has joined the channel [21:00] tykelewis has joined the channel [21:01] TheJH: niklasfi: well, sounds like a linked list plus an object for quick lookups would be a good solution for you [21:01] markwubben has joined the channel [21:01] benreesman has joined the channel [21:03] tim_smart: brianc: The Agent behind http.request has basic pooling. [21:03] Tom- has joined the channel [21:03] Tom-: Hi, I'm having a problem installing node on ubuntu. I followed the steps in https://github.com/ry/node/wiki/Installation (configure, make, make install, path) but when I try to run node it says node is not installed. [21:04] Tom-: I also cannot install npm (it says node is not installed). [21:04] Bonuspunkt: sudo make install ? [21:05] Lorentz: I certainly hope you didn't sudo make install. [21:05] tim_smart: Lorentz: For node that is fine [21:05] tim_smart: It installs to /usr/local/ [21:05] Tom-: I tried both make install and sudo make install [21:05] Tom-: They both seemed to work fine [21:06] Tom-: it says ' install' finished succesfully [21:06] tim_smart: Tom-: What does `which node` say? [21:06] Tom-: tim_smart: doesn [21:06] Tom-: doesn't return anything* [21:07] tim_smart: Tom-: What about `ls /usr/local/bin/node`? [21:07] Utkarsh has joined the channel [21:07] Tom-: tim_smart: no such file or directory [21:07] tim_smart: Tom-: Node isn't installed then. [21:07] Tom-: tim_smart: that is the problem [21:08] Tom-: yet make install says it installed succesfully [21:08] Tom-: I'm not getting any errors [21:08] tim_smart: Unless your prefix is set all weird, I'm not sure what is going on. [21:08] tim_smart: (I use ubuntu everytday) [21:08] Tom-: tim_smart: I set my prefix to $HOME/Applications/node [21:08] tim_smart: Well there is your issue [21:09] Tom-: tim_smart: hmm what is wrong with that folder? [21:09] tim_smart: Is it in your PATH? [21:09] Tom-: tim_smart: what do you mean exactly? [21:09] tim_smart: Tom-: Well linux looks in certain locations for files to run [21:10] tim_smart: This is usually set with the environmental variable PATH [21:10] Tom-: tim_smart: I did set PATH to this folder, but maybe that didn't go well? [21:10] tim_smart: Tom-: It would need to be $HOME/Applications/node/bin [21:11] Tom-: tim_smart: I did export PATH=$HOME/Applications/node/bin:$PATH [21:11] eee_c has joined the channel [21:11] Tom-: wait I might have made a typo [21:11] tim_smart: Tom-: What does `ls $HOME/Applications/node/bin` say? [21:12] Aikar: which node [21:12] tim_smart: Aikar: Already done that one [21:12] tim_smart: :) [21:12] Aikar: ah lol [21:12] ncb000gt: who's on first? [21:13] Tom-: tim_smart: it works now, there was a typo in my path. Thanks. [21:13] tim_smart: Tom-: OK cool [21:13] Tom-: By the way, isn't setting path with export a bad thing? [21:14] tim_smart: Tom-: Probably best to set it in ~/.profile [21:14] freakyfractal has left the channel [21:14] Gruni has joined the channel [21:14] Tom-: tim_smart: does export path not overwrite the default setting? [21:14] tim_smart: Tom-: It just does it for that session [21:15] Tom-: tim_smart: oh, so I need to set it in .profile [21:15] Tom-: thanks [21:16] tim_smart: Tom-: Ubuntu automagically adds ~/bin if it exists in .profile. You should get the idea. [21:17] Tom-: tim_smart: so for every application I build manually I need to update .profile and point to it's path in my Applications folder? [21:17] hij1nx_ has joined the channel [21:17] tim_smart: Tom-: Only for stuff you mess with PREFIX [21:18] Tom-: tim_smart: ah, so I can install node just fine without setting prefix? it told me to do so in the installation guide [21:18] hij1nx__ has joined the channel [21:18] tim_smart: Tom-: git clone git://github.com/ry/node.git && ./configure && make && sudo make install [21:19] tim_smart: That is the standard way to install node really. [21:19] TheJH: tim_smart: maybe also "cd node"? [21:19] tim_smart: TheJH: +1 [21:19] Tom-: tim_smart: how do you configure what version to use there? 2.x (stable) or 3.x ( unstable) ? [21:19] mjr_ has joined the channel [21:19] tim_smart: Tom-: git checkout v0.3.6 etc [21:20] dmcquay has joined the channel [21:20] Tom-: this is where I get punished for using SmartGit (a gui version of git) [21:21] tim_smart: The CLI for git is much faster to use than a GUI [21:21] philipharrison has joined the channel [21:21] Tom-: tim_smart: the learning curve seems quite steep though, especially for people who're not used to the console like me [21:21] Tom-: but you're right, I should get used to it [21:22] tim_smart: Tom-: Haha learn to <3 the CLI [21:22] tim_smart: But I'm bias. I use awesome window manager, gnu screen and vim [21:22] Tom-: tim_smart: yeah, I just cannot keep context with all the text - while with GUIs everything is positioned in a senseful manner, so that you can easily scan the screen and keep context [21:22] stalled has joined the channel [21:23] charlenopires has joined the channel [21:24] Tom-: tim_smart: if I set PATH twice in .profile, does it look in both directories? [21:24] Tom-: I want it to look in my node folder and the default one [21:24] tim_smart: Tom-: PATH = "/some/path:$PATH" [21:24] Tom-: (or does the second call overwrite the first one?) [21:25] tim_smart: That will prefix it to the origin PATH variable [21:25] Tom-: tim_smart: yes, I'm setting that twice now [21:25] tim_smart: original* [21:25] Jonasbn_ has joined the channel [21:25] Tom-: PATH="$HOME/bin:$PATH" PATH="$HOME/Applications/nodejs/bin:$PATH [21:25] jeromegn: hmm, so I upgraded from node.js 0.2.6 to 0.3.7, then rebuilt all my npm packages, seems to work fine, except for node-oauth that suddenly started throwing me "Cannot call method 'addListener' of undefined" - it's probably not node-oauth's fault, but I don't know where to look for an answer... any idea? [21:25] Tom-: that is what my .profile looks like now tim_smart [21:26] tim_smart: Tom-: Just try it and see if it works :) [21:26] Tom-: tim_smart: well how do I test if the default value is still active? [21:26] tim_smart: I have to return to some work. [21:26] stepheneb has joined the channel [21:27] tim_smart: Tom-: echo $PATH [21:27] Tom-: tim_smart: so I need to reboot? [21:27] robotarmy has joined the channel [21:27] tim_smart: Tom-: nope [21:27] tim_smart: Just restart your terminal [21:27] tim_smart: (Close and re-open) [21:28] Tom-: tim_smart: it says /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games [21:28] xla has joined the channel [21:28] Tom-: which does not include the path I added to .profile [21:28] prettyrobots has joined the channel [21:29] tim_smart: Tom-: Then you did something wrong. Is it in a conditional statement or something? [21:29] tim_smart: Tom-: Google environment variables and shell scripts [21:29] Tom-: tim_smart: no I merely added PATH="$HOME/Applications/nodejs/bin:$PATH to the bottom of the file [21:29] stephen_mcd has joined the channel [21:30] tim_smart: Tom-: Try logging out then back in [21:30] Tom-: tim_smart: alright, be back soon [21:32] mikeal has joined the channel [21:33] cainus has joined the channel [21:34] kordless_ has joined the channel [21:36] niklasfi has left the channel [21:38] sprout has joined the channel [21:39] sudoer has joined the channel [21:43] perlmonkey2 has joined the channel [21:44] Tom- has joined the channel [21:44] Tom-: tim_smart: I couldn't login anymore, had to go into safe mode and remove the line [21:46] Tom-: going to try it again.. back soon [21:48] Tom- has joined the channel [21:48] Tom-: tim_smart: cannot get it to show in echo $PATH [21:48] Tom-: I think I will reinstall node without a prefix [21:49] mikeal has joined the channel [21:51] vyvea has joined the channel [21:52] dekz has joined the channel [21:53] pr2012: anyone familiar with authenticate() and mongodb-native? [21:53] tim_smart: https://chrome.google.com/webstore/detail/dbepggeogbaibhgnhhndojpepiihcmeb# [21:53] tim_smart: Awesome [21:53] pr2012: not much in examples, but I can't seem to auth [21:53] bradleymeck: anyone know how to put "{{" into a mustache.js template? [21:54] pr2012: db.authenticate(username, password, function(){}); after open should do it no? [21:54] Tom-: Hmmm, getting cannot find config.h when I try to make node.js, even though ./configure was succesful [21:55] admc has joined the channel [21:55] niklasfi has joined the channel [21:55] stride has joined the channel [21:56] piscisaureus has joined the channel [21:56] niklasfi: is there any event emitted if the response stream is closed by the client side? [21:57] norviller has joined the channel [21:57] bradleymeck: req.socket.on("close") [21:58] bradleymeck: but if it doesnt actually close, but just hangs it wont fire [21:58] piscisaureus: ryah: ping [21:59] kordless has joined the channel [21:59] ryah: piscisaureus: pon [22:00] piscisaureus: ryah: https://github.com/piscisaureus/node/compare/ry...push [22:00] tim_smart: Chrome now has vim key bindings <3 [22:03] Tom-: Why would I get "cannot find config.h" when I perform "make" after ./configure was succesful? [22:03] niklasfi: bradleymeck: it closes in about 1 of 2 times [22:03] jamund has joined the channel [22:03] skm has joined the channel [22:03] niklasfi: bradleymeck: but the propability rises, when the download has been active for longer [22:04] tim_smart: Tom-: Try a make distclean fist. [22:04] bradleymeck: ryah, does socket.on("close") have any times it doesnt fire (ie hangup w/o a true close) [22:04] CIA-99: node: 03Ryan Dahl 07master * rbc23ec8 10/ (doc/api/process.markdown src/node.js): Add process.stderr stream - http://bit.ly/dMwZU0 [22:04] ryah: bradleymeck: 'close' always fires on net.Socket [22:04] k3yvn has joined the channel [22:04] ryah: tjholowaychuk: ^^ [22:04] tjholowaychuk: ryah: woot, thank [22:05] tjholowaychuk: s [22:05] ryah: piscisaureus: this is marc's fix? [22:05] Tom-: tim_smart: thank you, I really need to get used to building thing in linux [22:05] piscisaureus: ryah: yeah [22:05] jamund: Anyone expert with ExpressJS sessions? They don't appear to persist at all following the instructions on the express website [22:05] piscisaureus: it's in the commitmsg [22:05] malkomalko has joined the channel [22:05] Aikar: ryah: im willing to add the code for it (very minor), but wanted to ask if your ok with the idea first. currently npm does all this require.paths mangling for handling dependencies when it has a 'specific version requirement'. ie if foo depends on bar@latest, and baz depends on bar@1.2(max, ie due to some change that breaks baz), its tricky. So I was thinking of the idea of a 'module specific require.paths', ie require('bar', ['modules/dependencies']); so when b [22:05] Aikar: wow that was long, did it all go through lol? [22:06] tjholowaychuk: jamund: send a gist of your setup [22:06] jamund: k [22:06] CIA-99: node: 03Bert Belder 07master * rd8d627e 10/ (deps/libev/ev.c deps/libev/ev.h src/node_net.cc): [22:06] CIA-99: node: Revert "Workaround for libev handle caching bug on windows" [22:06] CIA-99: node: This reverts commit 25d0e38048592eccf15e73c26191395eb0ba85cf. - http://bit.ly/eKImRG [22:06] CIA-99: node: 03Bert Belder 07master * r8ee9c53 10/ deps/libev/ev.c : [22:06] CIA-99: node: Fix problem with libev/select on windows. [22:06] CIA-99: node: Patch by Marc Lehmann. [22:06] CIA-99: node: This fix should be included in the next libev release. - http://bit.ly/fOOi05 [22:06] dipser has joined the channel [22:07] ryah: Aikar: isaac and i have something like that in the works [22:07] malkomalko has joined the channel [22:07] dnyy has joined the channel [22:08] Aikar: ryah: ok [22:09] Aikar: ill implement it if ya want. i wanna help :P [22:09] jchris has joined the channel [22:10] ryah: i think isaac has already done it [22:10] bradleymeck: anyone here good with mustache.js templates? [22:11] jamund: bradleymeck: if been playing with hem today :) [22:11] throughnothing_ has joined the channel [22:11] jamund: them* [22:11] jeromegn: tjholowaychuk: evening :) so I'm wondering, if I have use(express.bodyDecoder()); in my app.configure(), then if I submit a form with fields that have name such as user[email], then I should be getting { user: {email: "something"} } in my req.body, right? [22:11] strmpnk has joined the channel [22:11] sh1mmer has joined the channel [22:12] Tom-: is there an eclipse addon for node.js? [22:12] statim has joined the channel [22:13] ncb000gt: Tom-: it's called Vim [22:13] ncb000gt: /duck [22:13] colinclark has joined the channel [22:13] ncb000gt: jeromegn: should be something similar to that [22:13] tjholowaychuk: jeromegn: yup [22:13] tjholowaychuk: jeromegn: not with 0.3.x though [22:13] tjholowaychuk: (yet) [22:14] jeromegn: ah! [22:14] jeromegn: explains everything [22:14] jeromegn: :) [22:14] Tom-: ncb000gt: I did not really like vim when I tried it, not sure if you can even attach a debugger etc. with vim [22:14] tjholowaychuk: i was working on that last night a bit but didnt have much time [22:14] tjholowaychuk: jeromegn: expect 0.3.x support within the next week or so hopefully [22:14] jeromegn: fair enough, going to figure out something out in the meanwhile. [22:16] ncb000gt: Tom-: depends on the plugins you use. [22:16] ncb000gt: you can even use eclipse's intellisense and such through vim with evlim [22:16] ncb000gt: erm eclim* [22:16] dipser has joined the channel [22:17] dhiGu has joined the channel [22:18] jonaslund has joined the channel [22:18] NYCNoder has joined the channel [22:18] jamund: So with ExpressJS sessions. I'm wondering what might cause them to fail quietly. It seems like there are no errors and it works within a method, but it doesn't seem to persist in any way. [22:18] Vekz has joined the channel [22:18] NYCNoder: Hey guys. Trying to bang out a project in node.js in a hurry, but I need postgres [22:19] NYCNoder: From npm, which postgresql module is going to give me the least trouble? [22:19] jamund: source code of my session fail: https://gist.github.com/810330 [22:19] NYCNoder: Like, something that you've known to work well. [22:19] vipaca has joined the channel [22:20] dhiGu: Hi! [22:20] dhiGu: I'm a first time node.js developer, trying to figure out something, need help. I'm using express for making a web app, and for a particular route I want to do an http call. I was thinking I'll use restler but it seems to require node.js 0.3.x and express is for 0.2.x. [22:20] tjholowaychuk: jamund: try the example in the repo first. ./examples/sessions/app.js [22:20] tjholowaychuk: if that fails let me know [22:20] jamund: thanks [22:20] Vekz: Hey any one associated with Soda.js in here? [22:21] jonaslund: NYCNoder: reading https://github.com/ry/node/wiki/modules the choice sounds clear [22:21] tjholowaychuk: dhiGu: express will support 0.3.x shortly [22:21] tjholowaychuk: Vekz: yeah [22:21] tjholowaychuk: whats up? [22:21] jonaslund: NYCNoder: the latter one seems to be more recently updated. [22:21] ericnakagawa has joined the channel [22:21] NYCNoder_ has joined the channel [22:22] jonaslund: NYCNoder: If you use windows as your dev env i think the JS only version will be easier to get working [22:22] TheEmpath has joined the channel [22:22] dhiGu: I want to call out to Google ajax api (images) and show the results in the view. What's the best way to do this? Should I use the default http.client? [22:22] jpick has joined the channel [22:22] Vekz: tjholowaychuk: I am building a new service using soda.js and I was planning on using the captureScreenshotToString() method however i am getting this TypeError: Object # has no method 'captureScreenshotToString' [22:22] pengwynn has joined the channel [22:22] Vekz: tjholowaychuk: I have an older app that I had created that used the method, did it get dropped or something? [22:22] NYCNoder_: jonaslund: I'm using Debian Linux [22:23] tjholowaychuk: Vekz: we have a whitelist of commands, definitely didnt drop it [22:23] piscisaureus has joined the channel [22:23] tjholowaychuk: Vekz: do $ npm edit soda [22:23] Tom-: ncb000gt: alright, might set it up when I am going to start on something bigger [22:23] dhiGu: Also, I'm not really sure how to handle the eventedness - I mean, I want to *trigger* the call to Google Images after I hit the /view_images route and I want to make the web view wait, while the request to google completes. [22:23] tjholowaychuk: add that, see if it works, if so I can add it [22:23] jonaslund: NYCNoder: look at the samples maybe ? [22:23] NYCNoder_: SO brianc's postgresql module is decent? [22:23] sprout has joined the channel [22:24] CIA-99: node: 03isaacs 07master * r2f1f22a 10/ lib/module.js : module: define functions only once. - http://bit.ly/fIG6m9 [22:25] pauls_ has joined the channel [22:28] muk_mb1 has joined the channel [22:32] sprout has joined the channel [22:33] dhiGu has left the channel [22:34] philipharrison has joined the channel [22:34] jamund: tjholowaychuk: problem solved, sort of. it looks like it's something wrong with my browser, because it works fine in other browsers. [22:34] jamund: thanks [22:34] jamund: ! [22:35] tjholowaychuk: jamund: hmm might be some cookie issue [22:35] tjholowaychuk: or cookies disabled i dunno [22:35] evanmeagher has joined the channel [22:35] NYCNoder_: Anyone who can recommend a postgresql module that work for them, I'd really appreciate hearing about it. :) [22:36] Tom-: where are node file flags explained? eg. difference r and r+ [22:36] NYCNoder_: I'm going with brianc's pure JavaScript module because the example code looked good. [22:36] Vekz: tjholowaychuk: I added captureScreenshotToString() to the whitelist. It works fine. I remeber I actually had to do this on the previous project as well [22:36] tjholowaychuk: Vekz: ah ok, I will add it :) [22:37] NYCNoder_: ACTION is in a huge hurry because he needs to have basic database access functionality in the CRM in 45 minutes :s [22:37] tjholowaychuk: Vekz: done [22:37] NYCNoder_: Like, the interface and everything [22:37] stagas: Tom-: http://stackoverflow.com/questions/2434195/php-what-is-the-difference-between-fopen-r-and-r-does-it-matter-if-i-used-r/2434288#2434288 [22:37] Vekz: tjholowaychuk: I did notice some different behavior though. In the old project I could .end(function(err, body, res, result) and the body parameter would contain the string from captureScreenshotToString() which i could then manipulate with node [22:38] Vekz: tjholowaychuk: however this now only returns "OK" upon success. Is this an update from node core or soda.js? [22:38] Tom-: stagas: thanks [22:38] tjholowaychuk: Vekz: hmm not positive [22:38] tjholowaychuk: been a while since i looked at soda, let me check [22:38] tjholowaychuk: the selenium protocol is TERRIBLE [22:38] tjholowaychuk: though [22:39] Vekz: possible that is is even on the sauce labs side of things [22:39] tjholowaychuk: selenium replies with "OK" [22:39] tjholowaychuk: but I remove it [22:42] nolan_d has joined the channel [22:42] konobi: tjholowaychuk: that's why we started injecting our own functions into selenium on the fly... much easier to do "sane" things [22:42] tjholowaychuk: selenium sucjs [22:42] tjholowaychuk: sucks* [22:42] tjholowaychuk: havent looked at 2 much though [22:42] Vekz: konobi: you have examples of this? [22:42] cloudhead: what's the current best practice for running multiple node processes? a proxy, or something like spark? [22:42] Draggor has joined the channel [22:42] AAA_awright: How efficent is JSON.stringify()? [22:43] konobi: Vekz: nope [22:43] konobi: it's documented though [22:43] tjholowaychuk: cloudhead: doing the unix fd passing trick so spark/multinode/blahblah [22:43] tjholowaychuk: they all do the same thing [22:43] AAA_awright: I'm taking a long time stringifyinginginging about 1MB of data [22:43] eee_c has joined the channel [22:43] cloudhead: tjholowaychuk: you'd say that's better than having a load balancer? [22:43] tjholowaychuk: cloudhead: well the kernel does the load balancing for you [22:44] cloudhead: right, ty [22:44] davidascher has joined the channel [22:45] konobi: Vekz: http://seleniumhq.org/docs/05_selenium_rc.html#adding-some-spice-to-your-tests (see the "Executing JavaScript from Your Test" section) [22:45] tjholowaychuk: cloudhead: im making a replacement for those tools right away [22:45] tjholowaychuk: with some nifty features [22:45] dgathright_ has joined the channel [22:45] hassox has joined the channel [22:46] cloudhead: tjholowaychuk: nice, they seem like they haven't been updated in a long time [22:46] tjholowaychuk: cloudhead: yeah they are all kinda half-assed [22:47] aheckmann has joined the channel [22:49] fission6: is somename = function () {} the same as function somename () {} [22:50] davidc_ has joined the channel [22:50] torvalamo: no [22:50] tjholowaychuk: fission6: one is anonymous so it wont have a name [22:50] torvalamo: but var somename is [22:50] tjholowaychuk: .name [22:50] fission6: wait whats the conclusion [22:50] torvalamo: var somename = function(){} [22:50] torvalamo: function somename(){} [22:50] torvalamo: are the same [22:50] bradleymeck: name every function pls, i beg [22:51] fission6: so then they are the same? [22:51] torvalamo: without the var it's not necessarily the same [22:51] fission6: oh ok [22:51] fission6: right [22:51] TheJH: fission: this works: `a(); function a(){alert()}` this doesn't: `a(); var a = function() {alert()}` [22:51] torvalamo: that too [22:52] torvalamo: well [22:52] TheJH: torvalamo: the second one doesn't alert(). [22:52] torvalamo: you can't call a function that hasn't been defined, even if it gets defined later... that's not guaranteed [22:52] TheJH: torvalamo: but it works. [22:52] torvalamo: what if you include two script files in an html page.. the first one executes while the second is downloaded [22:53] torvalamo: just don't do it, it's not very sexu [22:53] torvalamo: sexy [22:53] cloudhead: tjholowaychuk: have you looked at fugue? [22:53] niklasfi has left the channel [22:53] TheJH: torvalamo: what if I have two functions that have to call each other? [22:53] torvalamo: that's not the same [22:53] TheJH: then I need it [22:53] tjholowaychuk: cloudhead: yeah. it's ok, really sloppy code though [22:54] tjholowaychuk: still missing some features I want [22:54] torvalamo: the contents of the function is evaluated later [22:54] torvalamo: not at the same level as the function definition [22:54] w0rse_ has joined the channel [22:54] cloudhead: tjholowaychuk: yea the code is terrible [22:54] davida has joined the channel [22:55] torvalamo: v8bot: a();function a(){return b();}; function b(){return true;}; [22:55] v8bot: torvalamo: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [22:55] torvalamo: v8 a();function a(){return b();}; function b(){return true;}; [22:55] v8bot: torvalamo: v8 is no longer supported (except in PM). Try v8: or v8> [22:55] torvalamo: v8: a();function a(){return b();}; function b(){return true;}; [22:55] v8bot: torvalamo: true [22:55] NYCNoder has joined the channel [22:55] cloudhead: tjholowaychuk: what's the eta on your lib? [22:56] NYCNoder: I'm getting an error about crypto in node.js [22:56] tjholowaychuk: cloudhead: just started so probably a few days to finish and then another few to polish things up, get docs going etc [22:56] NYCNoder: How do I add the crypto module? [22:56] cloudhead: cool [22:56] cloudhead: NYCNoder: you might not have openssl installed [22:56] NYCNoder: :( [22:57] cloudhead: when you do ./configure in the node dir, it'll tell you if it finds openssl or not [22:57] AAA_awright: Isn't "debugger;" supposed to halt execution if --debug is enabled? [22:57] NYCNoder: How do you reinstall node.js with crypto support if you're building from source? Just configure and make again over the old node.js? [22:57] cloudhead: yea [22:57] cloudhead: you might have to `make clean` [22:57] Tom-: if I have a text file with JSON data, how can I properly read the file in an async streaming way? I need to know what intervals to use for the file position and how to detect whether a complete JSON object is available [22:57] NYCNoder: Does it make sense for the "pg" module to need crypto though? [22:58] NYCNoder: cloudhead: Okay, thanks. [22:58] cloudhead: NYCNoder: yea cause crypto isn't only encryption, it's alsa hashes [22:58] cloudhead: also* [22:58] NYCNoder: ah [22:58] dustinwhittle has joined the channel [22:58] NYCNoder: What are hashes for? Data integrity? [22:58] cloudhead: Tom-: fs.createReadStream [22:58] cloudhead: NYCNoder: ya [22:58] NYCNoder: I see [22:58] bradleymeck: hashes are for a lot of things [22:59] rbranson_ has joined the channel [22:59] Tom-: cloudhead: I am using the stable 2.x version, does it have that feature? [23:00] rbranson: ? [23:00] Tom-: http://nodejs.org/docs/v0.2.6/api.html does not list it [23:00] cloudhead: Tom-: I'm pretty sure it does [23:00] stagas: Tom-: if you just want the whole data just use fs.readFile [23:00] admc has joined the channel [23:00] gJ|Alex has joined the channel [23:00] Tom-: cloudhead: oh it does [23:00] Tom-: stagas: the file is too big to load into memory at once [23:01] NYCNoder: Hmm, where should I look in Debian? What would apt call openssl-dev? [23:02] konobi: libssl-dev [23:02] cloudhead: yea ^ should work [23:03] Tom-: cloudhead: how does createReadStream help me as opposed to fs.read? [23:03] cloudhead: Tom-: it reads the file as a stream [23:03] jqp has joined the channel [23:03] Tom-: cloudhead: alright, but I still need to know what offsets to use [23:04] NYCNoder: konobi: Cool thanks :) [23:04] cloudhead: Tom-: it'll emit the file as chunks of data [23:04] cloudhead: you don't need to keep offsets [23:04] NYCNoder: Sorry for all the questions, trying to use node.js in a rushed project with legacy perl code [23:04] Tom-: cloudhead: oh, so then I need to make a buffer of the chunks and see if a new complete json object is available? [23:05] NYCNoder: Replacing all the PHP also isn't easy on a deadline [23:05] cloudhead: Tom-: exactly [23:05] stagas: Tom-: you'd still need to combine all those chunks to a string in memory to parse the json [23:05] Tom-: stagas: well not all of them, only each object [23:05] Tom-: right? [23:05] cloudhead: yea, until it's parsable [23:06] cloudhead: then you can ditch it [23:06] cloudhead: start parsing the next object [23:06] konobi: Tom-: or... https://bitbucket.org/nikhilm/yajl-js [23:07] Tom-: cloudhead: alright thanks [23:07] NYCNoder: Is node.js most suitable for building a CRM on the scale of Salesforce? [23:07] shaver: no [23:07] NYCNoder: Why shaver? [23:07] AAA_awright: Alright this has been driving me up a wall, and I finally figured it out... why is "i" a global variable? [23:07] Tom-: konobi: hmm, doesn't node have inbuild json support? [23:08] shaver: because even ryah says it's not production-ready [23:08] shaver: lots of rough edges still [23:08] skm has joined the channel [23:08] NYCNoder: Such as? [23:08] cloudhead: Tom-: it does, but yajl is a stream parser, might be useful [23:08] konobi: Tom-: sure... but if you're wanting to do event pased parsing of JSON, then you can use that SAX-style parser [23:08] cloudhead: node.js is totally production ready [23:08] Tom-: oh alright, thanks konobi and cloudhead [23:09] AAA_awright: Anyone have any clue? Every time I define a one-letter variable like i, j, node-inspector tells me it's a global variable [23:09] AAA_awright: And it was getting modified by some process outside my function [23:10] cloudhead: `i` isn't a global [23:10] cloudhead: you must be defining it as a global [23:10] bradleymeck: did you declare the one letter variable in your function with 'var' [23:11] liar has joined the channel [23:11] NYCNoder: shaver: What do you mean by rough-edges, besides the fact that OpenSSL isn't ready? [23:12] shaver: I just don't think it's understood how it works (gc, etc.) at salesforce scale [23:12] shaver: and the multi-process stuff is immature [23:12] jqp: AAA_awright: are you defining a for-loop with for (i = 0; i < foo.length; i++) anywhere? [23:12] AAA_awright: cloudhead: I thought this was Javascript where you /can't/... any other unique variable is a local [23:13] AAA_awright: jqp: Yeah what's that about [23:13] shaver: but by all means give it a shot -- we will learn a lot [23:13] cloudhead: AAA_awright: heh no, in js `i = 1` declares a global [23:13] ryah: it just depends on how much you're willing to put up with. if you dev an app with node you'll hit bugs for sure [23:13] ryah: NYCNoder:--^ [23:13] jqp: (to be local, it should be var i = 0) [23:13] ryah: for some people that's fun - for some that's unacceptable [23:13] AAA_awright: Since when? I remember it being a syntax error [23:14] shaver: ACTION is on the fun side [23:14] cloudhead: since ever [23:14] ryah: we're definitely getting closer to a finished product. which we'll call 1.0 when we feel it is ready for the masses. [23:14] NYCNoder: ryah: Okay, well I'm building a production CRM so hopefully I can fix bugs when they come up [23:14] ryah: that's probably 6 months out still. [23:14] AAA_awright: NYCNoder: Do you have a link? [23:15] [[zz]] has joined the channel [23:15] NYCNoder: AAA_awright: We're very early [23:15] ryah: NYCNoder: okay [23:15] SubStack: 1.0 is only 6 months out? :o [23:15] bradleymeck: AAA_awright, getting the value of an undeclared variable is a syntax error, setting one is not [23:15] NYCNoder: So 6 months from the bugs being gone? [23:15] AAA_awright: bradleymeck: No that should return "undefined" [23:15] bradleymeck: nope [23:15] NYCNoder: Well, some of them :) [23:15] jqp: does changing the loop from "for (i = 0; i < foo.length; i++)" to "for (var i = 0; i < foo.length; i++)" remove i from the global scope? [23:15] bradleymeck: v8: var x = i [23:15] v8bot: bradleymeck: ReferenceError: i is not defined [23:15] AAA_awright: v8: notanywhere===undefined [23:15] v8bot: AAA_awright: ReferenceError: notanywhere is not defined [23:15] AAA_awright: bwah [23:16] bradleymeck: v8: typeof i [23:16] v8bot: bradleymeck: "undefined" [23:16] Bonuspunkt: v8 typeof notDefined === "undefined" [23:16] v8bot: Bonuspunkt: v8 is no longer supported (except in PM). Try v8: or v8> [23:16] Bonuspunkt: v8: typeof notDefined === "undefined" [23:16] NYCNoder: As far as bugs, are we talking like stability issues that make it hard to keep node running for a long time? [23:16] v8bot: Bonuspunkt: true [23:16] AAA_awright: Fine you win [23:16] AAA_awright: ACTION re-reads ECMAScript spec [23:17] pr2012: So I was deploying an app using express/ejs. Everything is great local (osx, node v3.7), but on my centos server (also node v3.7) my references to my locals are undefined from within partials. [23:17] konobi: http://wtfjs.com/ [23:17] Bonuspunkt: v8: ' \r \n \t ' == 0 [23:17] v8bot: Bonuspunkt: false [23:17] marcosvm: NYCNoder: CRM writen using node.js? [23:17] wilmoore has joined the channel [23:17] Bonuspunkt: v8: ' ' == 0 [23:17] v8bot: Bonuspunkt: true [23:17] awenkhh has joined the channel [23:17] Bonuspunkt: v8: ' \r\n\t ' == 0 [23:17] v8bot: Bonuspunkt: false [23:17] tjholowaychuk: pr2012: express is not ready for 0.3.x yet [23:17] Bonuspunkt: v8: ' \t ' == 0 [23:17] tjholowaychuk: im working on that this week when i have time [23:17] v8bot: Bonuspunkt: true [23:17] NYCNoder: marcosvm: Yes sir. [23:18] marcosvm: NYCNoder: that's awesome man :) [23:18] pr2012: tj- think that sounds like express though? It was running smooth in osx [23:18] bradleymeck: v8: {}+2==2+{} [23:18] v8bot: bradleymeck: false [23:18] sprout has joined the channel [23:18] Bonuspunkt: hmmm ' \r\n\t ' == 0 is true @ firebug console :/ [23:18] tjholowaychuk: pr2012: does sound kinda odd [23:18] NYCNoder: Yeah, I'm just hoping I don't run into a huge bug that's insurmountable and get fired. [23:19] NYCNoder: Especially with a 2 month hard deadline to beta [23:19] FireFly|n900: hm [23:19] FireFly|n900: How well does node work on windows? [23:20] pr2012: downgraded server to 2.6, same thing. [23:20] MikhX has joined the channel [23:20] tjholowaychuk: pr2012: did you just post on the mailing list (saw something like that) [23:20] pr2012: nope [23:20] tjholowaychuk: hmm [23:20] tjholowaychuk: i cant really think of how a different system would impact that [23:21] tjholowaychuk: if all the versions line up [23:21] pr2012: im going to run through my dependencies make sure there isn't anything else. [23:22] bradleymeck: FireFly|n900 not well enough [23:22] FireFly|n900: Hm, okay [23:22] FireFly|n900: not that it's a problem for me now, but might be some day [23:22] Bonuspunkt: use a linux vm then ;) [23:23] matbee has joined the channel [23:23] yozgrahame has joined the channel [23:27] astoon has joined the channel [23:28] mikeal has joined the channel [23:28] pr2012: So just confirmed. On osx, members of locals are automatically available to partials included via <%- partial('tags-cloud-widget')%> [23:28] pr2012: on centos they are undefined, and must pass in as <%- partial('tags-cloud-widget',{locals:locals})%> [23:29] pr2012: tried in 2.4, 2.6 and 3.7 on both [23:29] tjholowaychuk: pr2012: hmm if the filenames are both lowercase it should be fine [23:29] pengwynn has joined the channel [23:29] tjholowaychuk: pr2012: if you go into the view partial code you should see a place where the object name is derived from the filename [23:30] tjholowaychuk: maybe console.log() that out [23:31] mscdex has joined the channel [23:32] jqp: are there any books on node.js? [23:33] booths has joined the channel [23:33] tim_smart: jqp: There is nothing printed. I think there is a couple online books. [23:33] dmcquay has joined the channel [23:33] tim_smart: (They don't cover much material at this stage though) [23:34] chapel: specially since stuff is changed [23:35] rburhum has joined the channel [23:38] pyrotechnick has joined the channel [23:39] pyrotechnick: LONG LIVE WEBGL [23:40] NYCNoder: pyrotechnick: ? [23:40] NYCNoder: It died? [23:41] pyrotechnick: nah man [23:41] pyrotechnick: went in chrome 9 [23:41] pyrotechnick: in 2 weeks [23:41] pyrotechnick: 20%+ of the net will have webgl [23:41] pyrotechnick: yayyyyyyy [23:42] fission6: how would i sequential fetch pages from a list of urls ? [23:42] pyrotechnick: use request [23:42] pyrotechnick: npm install request [23:43] pyrotechnick: then use a flow library or use the callback of request to request the next url [23:43] pyrotechnick: check the github for request for usage [23:43] pyrotechnick: try just by making a request to ur first url [23:43] pyrotechnick: then in the callback make a request to urls[i+1] or something [23:43] pyrotechnick: until i is done [23:43] fission6: i am trying to not use libraris but understand hwo to properly do this in node [23:43] pyrotechnick: sure [23:43] pyrotechnick: then look at the docs [23:43] pyrotechnick: let me find it [23:44] astoon has joined the channel [23:45] boogyman has joined the channel [23:45] pyrotechnick: http://nodejs.org/docs/v0.3.7/api/http.html [23:45] fission6: i thought i had it working correctly with some code i got [23:45] pyrotechnick: the problem with that is it wont handle redirects or sessions or anything [23:45] pyrotechnick: so you should use something like `request`, the package [23:45] pyrotechnick: or RYO but it's alot of work [23:45] mikeal: ok [23:45] mikeal: https://github.com/mikeal/request [23:45] pyrotechnick: dont feel like you're cheating using request [23:45] mikeal: support for 0.3.6+ [23:46] tanepiper: mikeal++ [23:46] v8bot: tanepiper has given a beer to mikeal. mikeal now has 7 beers. [23:46] fission6: i am getting a little cranky, i love the notion of event loops but i am having a hard time being able write the code i want to write which is being able to do things in sequence [23:46] tanepiper: now i can finally take cradle out and replace it with request :D [23:47] pyrotechnick: fission6: use a flow library mate [23:47] fission6: i have a list of urls which i need to request in sequence, not sure why this is overly compelxt! [23:47] pyrotechnick: that's what they're there for [23:47] fission6: ok [23:47] fission6: can you rec me one [23:47] pyrotechnick: fission6: it's not as if it's overly complex, it's just different [23:47] ryanfitz has joined the channel [23:47] pyrotechnick: howtonode.org has a few articles and links to some good ones [23:47] tanepiper: Seq is good fission6 [23:47] pyrotechnick: also you will love fibres [23:48] pyrotechnick: let me find you the link [23:48] arpegius has joined the channel [23:48] cloudhead: I have no problem doing things in sequence, and have never used a flow library.. [23:48] fission6: its not complex its jsut complex to do what i want in seq an it feels silly to think i cant do it without the aid of a library [23:48] pyrotechnick: cloudhead: you may want to gist him some templates [23:48] mscdex: cloudhead: same [23:48] pyrotechnick: or snippets [23:48] fission6: cloudhead how would you handle this issue then [23:48] fission6: right [23:48] cloudhead: fission6: you just need to use recursion right [23:48] fission6: i have this code i crafted but it doesn't seem to be ultimately doing the requests in serial [23:48] fission6: hang on [23:48] tanepiper: cloudhead: oh hey, listen i may have to take cradle out of my app unless we can maybe solve an issue I have? [23:49] cloudhead: tanepiper: what's the issue? [23:49] pifantastic_ has joined the channel [23:49] fission6: http://pastie.org/1526743 this is close to working ut doesn't seem to actually wait to get the response before trying the next [23:50] tanepiper: cloudhead: well currently in my app, in couchdb I have a 'couchadmin' user that can create dbs + users. But when it comes to requests, I need to have the individual users do it. So when a user logs in, I store their _user record in the session [23:50] fission6: tanepiper: this is the code very similar to that used in the video you showed me [23:50] tanepiper: but because the way couchdb auth works, I have to store their password in plain text in the session to do requests [23:51] tanepiper: would it be possible to pass in the base64 auth header that i can store in the session instead? [23:51] tanepiper: (unless you can think of another way around this?) [23:51] cloudhead: I can't read coffeescript [23:51] tjholowaychuk: cloudhead: ditto [23:51] fission6: ill paste js [23:52] cloudhead: tanepiper: can you not use the 'auh' option in cradle? [23:52] fission6: here you go http://pastie.org/1526752 [23:52] fission6: this code was "suppose" to let me execute each test script which ultimately turns into a http request in serial [23:52] tanepiper: cloudhead: yes, but then how do i store the database in the session, you can't store a cradle instance in redis for example [23:53] tanepiper: it was working when i just used mem-based sessions, because it's just objects [23:53] cloudhead: hmmm [23:53] arpegius has joined the channel [23:53] cloudhead: so wait, you need to pass a custom header [23:53] tanepiper: the problem is storing the users plain text username/password in the session to pass to cradle to do a request [23:53] cloudhead: to all requests [23:53] geoffeg: I've seen many examples of creating node.js modules using 'var module = { exports: {} }; exports.methodName = function' and just as many using 'module.prototype.methodName = function'.. which one is "correct" or "preferred" [23:54] fission6: cloudhead: is that code any clearer [23:54] warz has joined the channel [23:54] jonaslund: geoffeg: a prototype is using when creating "classes" [23:55] tanepiper: yea, unless cradle can maybe get a cookie-based auth back that can be stored in the session? tbh i don't know the best solution here, but i don't want to carry about a users plain text auth details to do requests [23:55] booths: geoffeg: Creating something with the prototype will result in it being in the prototype instead of it being 'copied' each time you make a new something [23:55] fission6: i need a break ill bbl [23:55] chapel: geoffeg: var moduleName = module.exports = exports = function() {}; [23:55] cloudhead: fission6: yea, let me just give you an example of an async loop, it might help [23:55] booths: if you're not making new x then whatever. [23:55] ryanfitz has joined the channel [23:55] cloudhead: tanepiper: does having access to the response headers help at all? [23:55] booths: having trouble loading a tarball with fs.readFile... [23:56] cloudhead: booths: make sure the encoding is right [23:56] cloudhead: ie 'binary' [23:56] mitchell` has joined the channel [23:56] booths: ah that could be it, it defaults to utf8 doesn't it [23:57] tanepiper: But basically my app goes like this: in the settings file I store the auth details for the 'couchadmin' users because that is needed to do stuff like create new users, new databases per client (all my db's are segregated per client) and other stuff you need admin for [23:57] rjrodger_ has joined the channel [23:57] blueadept2 has joined the channel [23:58] tanepiper: when a DB and user is created, that user is added as a reader to the db, and i need to make requests using their auth details rather than the couchadmin because i don't want them to acceidently access something they shouldn't [23:58] davidascher has joined the channel [23:58] hellp has joined the channel [23:58] piscisaureus: ryah: ping [23:58] devrim1 has joined the channel [23:58] cloudhead: tanepiper: and their auth details have to be stored in a cookie [23:58] tanepiper: but the only way i can see to do that is on each incoming request from the clientside to the nodeapp, is to store the plain text details in the users session for those requests [23:59] tanepiper: cloudhead: possibly, since couchdb can provide a auth cookie for that session [23:59] strmpnk has joined the channel