[00:00] tjholowaychuk: pyrotechinck: yeah they are merged with anything passed to res.render() for options [00:00] pyrotechinck: cool [00:00] isaacs: piscisaureus: backslashes? [00:00] creationix: isaacs: sorry, I was afk [00:00] tjholowaychuk: something liek app.set('view options', { bodyLocal: 'yield' }) i dunno [00:00] piscisaureus: ryah: the problem is that on windows there are real relative paths and 'drive-relative paths' like "\program files\somedir" [00:00] pyrotechinck: bodyLocal [00:00] pyrotechinck: done. [00:01] pyrotechinck: where do i set the default [00:01] piscisaureus: isaacs: on windows paths are separated by backslashes [00:01] tjholowaychuk: pyrotechinck: sadly it should probably be something __body__ so that it is never globbered haha [00:01] isaacs: piscisaureus: right [00:01] tjholowaychuk: but that is ugly [00:01] isaacs: piscisaureus: seems like the path lib needs to be updated to handle that, then [00:01] meandi2 has joined the channel [00:01] pyrotechinck: yeah filthy [00:01] isaacs: piscisaureus: fs.realpath just uses the path.split, right? [00:01] isaacs: andpath.join? [00:01] pyrotechinck: im gunna make mine yeild [00:01] bmizerany has joined the channel [00:01] pyrotechinck: :p [00:01] pyrotechinck: oh you said that [00:02] pyrotechinck: damn [00:02] piscisaureus: isaacs: yep. but is also looks at the start of a path to see if it is relative or absolute [00:02] pyrotechinck: stole my joke [00:02] pyrotechinck: my funny rails joke [00:02] isaacs: piscisaureus: ok. so, it sounds like we need to abstract out the path stuff so that it works on windows. [00:02] isaacs: piscisaureus: Cygwin uses backslashes, right? [00:02] piscisaureus: isaacs: cygwin uses forward slashes [00:03] isaacs: er, right, Cygwin uses Correct Slashes. [00:03] pyrotechinck: tjholowaychuk wheres the defaults [00:03] piscisaureus: isaacs: it does really crazy path mapping stuff that breaks if you look the other way [00:03] isaacs: ok. [00:03] tjholowaychuk: pyrotechinck: I can patch it, just kinda lazy right now [00:03] tjholowaychuk: its like a one word thing but then I gotta back-port n crap [00:04] pyrotechinck: im almost done just need to know where to put 'body' back in [00:04] piscisaureus: isaacs: currently you can't tell if you're on windows or posix when you're in javascript [00:04] isaacs: piscisaureus: it sounds like the proper solution is to make fs.realpath work on windows, not to remove the realpath from module loading. [00:04] pyrotechinck: oh true [00:04] pyrotechinck: well i wanna just hack mine now anyway [00:04] isaacs: piscisaureus: yeah. [00:04] tjholowaychuk: pyrotechinck: haha k [00:04] isaacs: piscisaureus: so, there are issues. [00:04] pyrotechinck: where do i put body back in [00:04] isaacs: piscisaureus: if path.join doesn't work properly, i mean, you're gonna have issues anyhow [00:04] piscisaureus: isaacs: I already hacked that more or less [00:04] isaacs: it's not like you can do require("..\foo\bar.js"), even on windows, right? [00:05] piscisaureus: isaacs: but it needs some thorough review [00:05] isaacs: piscisaureus: i'd like a path.isAbsolute() [00:05] pyrotechinck: tjholowaychuk: where do i set the default [00:05] piscisaureus: isaacs: yeah!!! [00:05] isaacs: piscisaureus: since our usual technique is just path.charAt(0) === "/ [00:05] isaacs: piscisaureus: and that'll clearly fail on C:\foo [00:05] tjholowaychuk: pyrotechinck: you cant change it until I patch [00:05] isaacs: ACTION never stops hating windows. [00:05] pyrotechinck: no i mean [00:05] isaacs: it's just such a completely crap operating system. [00:05] pyrotechinck: im hacking mine [00:06] isaacs: i mean, seriously, completely awful. [00:06] pyrotechinck: tjholowaychuk: options[viewOptions['bodyLocal']] = str; [00:06] isaacs: it's like, every antipattern you could imagine, all in one place. [00:06] pyrotechinck: but where do i set the default [00:06] isaacs: windows is proof that marketing is more important than quality. [00:06] isaacs: i would call it shit, but that would be an insult to fecal material. [00:06] echosystm has joined the channel [00:06] SubStack: windows wasn't designed, it evolved [00:06] tjholowaychuk: pyrotechinck: viewOptions.bodyLocal || 'body' [00:06] tjholowaychuk: :p [00:06] pyrotechinck: ok so hardcode it in there? [00:06] pyrotechinck: right [00:06] tjholowaychuk: yeah [00:06] pyrotechinck: thought you might have somewhere [00:06] pyrotechinck: thats cool [00:06] echosystm: does anyone know of an RMI system other than Java RMI ? [00:06] isaacs: SubStack: evolution is a terrible way to build software. software should be intelligently designed. [00:06] pyrotechinck: all in good time [00:06] SubStack: or else, they found it in a swamp [00:07] pyrotechinck: cheers [00:07] piscisaureus: SubStack: the problem is that natural selection didn't do a proper job [00:07] isaacs: SubStack: otherwise its retinas get screwed on backwards. [00:07] pyrotechinck: works [00:07] SubStack: isaacs: creationist! [00:07] echosystm: basically what i want is an RPC system that has some concept of objects [00:07] SubStack: reptillian optics aren't actually so bad [00:07] SubStack: echosystm: :D [00:07] SubStack: echosystm: http://github.com/substack/dnode [00:07] piscisaureus: isaacs: I'm currently doing something like: [00:07] piscisaureus: if ('/\\'.indexOf(process.argv[1].charAt(0)) < 0 [00:08] piscisaureus: && process.argv[1].charAt(1) != ':') { [00:08] piscisaureus: // is relative [00:08] SubStack: EXACTLY what you are searching for [00:08] SubStack: better even [00:08] isaacs: piscisaureus: yikes. [00:08] jimt_ has joined the channel [00:08] isaacs: piscisaureus: i'd much prefer something that didn't add complexity to non-windows machines. [00:08] piscisaureus: isaacs: should be done [00:08] pyrotechinck: tjholowaychuk: you dont actually have any viewOptions lol [00:08] piscisaureus: isaacs: but it will still add complexity to realpath [00:09] tjholowaychuk: pyrotechinck: it is merged into options [00:09] pyrotechinck: blah [00:09] SubStack: echosystm: the fun part is you can embed functions arbitrarily into your data structures and they turn into rpc calls back to the other side of the connection, as if by magic [00:09] isaacs: piscisaureus: maybe like a: absoluteRegexp = isBullshitStupidAwfulHorribleExcuseForAnOSCalledWindows ? /^[A-Za-z]:/ : /^\// [00:09] isaacs: piscisaureus: and a pathSeparator character would be easy enough. [00:10] isaacs: just set to either "/" or "\\" depending on the above flag. [00:10] isaacs: getting that flag set properly is the hard part. [00:10] piscisaureus: isaacs: yeah. but forward slashes are also allowed on windows usually. we should support them [00:10] SubStack: sufficiently advanced magic is indistinguishable from technology [00:10] isaacs: piscisaureus: yeah [00:11] isaacs: piscisaureus: maybe it could always *write* correct slashes, but *respect* broken slashes if using the Broken OS [00:12] ryah: enough windows bashing, we all realize it sucks :) [00:12] isaacs: hahah [00:12] piscisaureus: isaacs: the thing is: [00:12] piscisaureus: if (path.charAt(0) === (back)slash && on windows) { [00:12] piscisaureus: prepend_the_first_two_characters_of_cwd(); [00:12] piscisaureus: } else if (path.charAt(1) === ':' || ( path.charAt(0) === '/' && on_posix)) { [00:12] piscisaureus: prepend_full_cwd(); [00:12] piscisaureus: } [00:12] ryah: piscisaureus is doing god's work [00:12] SubStack: the complexity, it hurts [00:12] isaacs: ryah: that is true. piscisaureus is indeed 2 parts saint for every part scholar. [00:13] isaacs: piscisaureus: you know, it's actually quite a bit like the url parsing logic, isn't it? [00:13] SubStack: if anything, piscisaureus is doing the work of apologists [00:13] SubStack: solving the problem of evil, in this case [00:13] piscisaureus: ryah: isaacs: we need to expose something like require('os').isPosix, and it must be available for built-in libs [00:13] isaacs: piscisaureus: but without a hostname [00:13] isaacs: piscisaureus++ [00:13] v8bot: isaacs has given a beer to piscisaureus. piscisaureus now has 1 beers. [00:14] isaacs: wait, i forget, is it C:\\foo or just C:\foo [00:14] piscisaureus: Thanks for all the feathers :-) [00:14] isaacs: C:\Windows\System\System32\win32\oh\mommy\make\the\bad\thing\stop [00:15] isaacs_ has joined the channel [00:15] chapel: pyrotechinck: you want the script? [00:16] pyrotechinck: im in link room [00:16] isaacs: piscisaureus: so, from there, if you did cd \foo\bar, you'd end up at C:\foo\bar, right? [00:16] pyrotechinck: #linkinus [00:16] piscisaureus: isaacs: yeah [00:16] piscisaureus: isaacs: more fun [00:17] isaacs: piscisaureus: so... it sounds like what we need is like a path.resolve() which is smart about windows as well as posix. [00:17] piscisaureus: isaacs: you mean realpath? [00:17] isaacs: piscisaureus: no, i mean just semantic stuff. [00:17] isaacs: piscisaureus: like, path.resolve("C:\foo\bar", "\baz") --> C:\baz [00:17] ryah: piscisaureus: sure [00:18] piscisaureus: isaacs: like realpath minus symlink handling? [00:18] isaacs: piscisaureus: but on posix, path.resolve("/foo/bar", "/baz") --> /ba [00:18] ryah: piscisaureus: i think process.platform is broken at the moment [00:18] isaacs: baz [00:18] ryah: but that's probably a good place [00:18] piscisaureus: ryah: what is wrong with it? [00:18] isaacs: piscisaureus: more like just a parallel to url.resolve [00:18] ryah: although, i'd like to move that to the os module... [00:18] ryah: *shrug* became broken [00:18] ryah: :) [00:18] piscisaureus: isaacs: okay. Yeah we need that. I'd like to have it available in C as well :-) [00:19] echosystm: SubStack: i'm looking at your dnode example [00:19] isaacs: piscisaureus: why do you need it in C? [00:20] piscisaureus: isaacs: because I'm also path munging in the child process implementation for windows [00:20] isaacs: (not saying it couldn't be done in C, just curious) [00:20] echosystm: when host A sends a function as a parameter in a call to host B, how does that happen? [00:20] piscisaureus: isaacs: maybe later tho [00:20] isaacs: ah [00:20] isaacs: yeah, js is more cozy to dev in [00:20] echosystm: is the function literally sent to host B and executed by host B, or is a reference sent and executed by host A ? [00:20] liar has joined the channel [00:21] piscisaureus: isaacs: on windows I need to manually scan the path environment variable because there is no api call for it [00:21] isaacs: piscisaureus: wait, what? [00:21] isaacs: piscisaureus: there's no execvp on windows?? [00:21] piscisaureus: isaacs: there is [00:21] elijah-mbp has joined the channel [00:21] isaacs: then why do you need to scan the path? [00:21] piscisaureus: isaacs: but no fork() thus no way to redirect stdin/stdout [00:21] ryah: pkrumins: yt? [00:22] isaacs: piscisaureus: whoa. [00:22] isaacs: piscisaureus: ok. [00:22] piscisaureus: isaacs: it can be done with CreateProcessEx but it will not scan the path [00:22] isaacs: right, forgot about that bit [00:22] SubStack: echosystm: it's a json protocol that keeps references to each of the callbacks [00:22] SubStack: echosystm: so the callbacks execute on the side they were defined on, but you can call them remotely [00:22] xla has joined the channel [00:23] pyrotechinck: tjholowaychuk: i think the whole "rails" vs express "metal" kinda just clicked to me [00:23] tjholowaychuk: haha [00:24] pkrumins: ryah: i am here [00:24] pyrotechinck: tjholowaychuk: it just occured to me how it it was to hack express to use .coffee's instead of .js [00:24] pyrotechinck: to do that in rails youd need an entire plugin [00:24] pyrotechinck: it wouldnt be easy [00:24] ryah: pkrumins: how do you test your node-png ? [00:25] tjholowaychuk: pyrotechinck: haha dont even get me started about rails plugins :p [00:25] pkrumins: i run the example programs manually [00:25] ryah: pkrumins: ok [00:25] pyrotechinck: im a fan [00:25] pkrumins: and see if the output matches what i expect. [00:25] pyrotechinck: tjholowaychuk++ [00:25] v8bot: pyrotechinck has given a beer to tjholowaychuk. tjholowaychuk now has 5 beers. [00:25] pkrumins: i dont have it automated. [00:25] echosystm: are there any nodejs databases? [00:25] echosystm: as in, databases that only depend on nodejs [00:26] tanepiper: dirty, nStore [00:26] aschw has joined the channel [00:26] tanepiper: https://github.com/felixge/node-dirty [00:26] echosystm: are they any good? [00:27] tanepiper: basically they are good for testing and throwing away [00:27] piscisaureus: I'm having problems following realpath logic (the async version) [00:27] tanepiper: you could run couchdb since it's not node, but only need HTTP to communicate with it [00:28] tanepiper: which nodejs is very good at doing [00:28] echosystm: the file format seems a bit weird... i would have thought it would be better to have each value in its own file, with the key being the file name [00:28] tanepiper: you can even sign up for a free hosted instance at http://couchone.com which means no setup [00:31] pyrotechinck: textmate needs to thread its searches [00:31] pyrotechinck: really [00:31] pyrotechinck: really badly [00:31] pyrotechinck: textmate needs to be async [00:32] pyrotechinck: ry you need to show textmate the light [00:32] kschzt: there is no saving TextMate [00:33] kschzt: it's over [00:33] pyrotechinck: you're too old, let go, it's over [00:33] kschzt: next editor pls [00:34] pyrotechinck: *waits 5 minutes for next editor to walk in the door* hello my name is aptana [00:34] kschzt: aptana has loads of issues too, running in Eclipse, that's just not gonna fly for me [00:35] kschzt: cd ; mate . [00:35] pyrotechinck: hence the waiting 5 minutes [00:35] pyrotechinck: for it to start [00:35] kschzt: :( rip mate [00:35] pyrotechinck: rm -Rf /Applications/Textmate.app [00:35] pyrotechinck: do it [00:35] pyrotechinck: i dare you [00:35] kschzt: ahh such a great editor. [00:36] pyrotechinck: such a lousy everything else [00:36] thebigbad: clocking in at 20Mb, vim is a little bit of a fatty. but you do get to join the ranks of crazed neckbeards if you use it. [00:36] thebigbad: ACTION is still waiting for his neckbeard to grow in [00:36] piscisaureus: what again was the env var I have to set to see debug(....) messages from builtin libs? [00:36] kschzt: yah, the boys is using vim [00:36] alathon has joined the channel [00:36] alathon: Hi [00:37] prettyrobots_ has joined the channel [00:37] thebigbad: piscisaureus: NODE_DEBUG Print additional debugging output. [00:37] thebigbad: is that it? [00:38] kschzt: NODE_DEBUG=8 [00:38] piscisaureus: thebigbad: hmm I just tried that but it didn't work. Maybe something else is worng [00:40] kschzt: macvim + dotfiles .. maybe [00:40] ryah: pkrumins: im porting node-png to v0.3 [00:40] echosystm: does anyone here use npm with homebrew? [00:40] ryah: almost done, i think [00:40] pkrumins: that's very cool ryah! [00:40] echosystm: node doesnt seem to be able to find anything i install [00:40] pkrumins: SubStack tired porting it too, but it was crashing. [00:40] SubStack: yeah, it was hard [00:40] ryah: piscisaureus: in latest NODE_DEBUG=module,net,http [00:40] SubStack: I got it to compile at least [00:41] ryah: piscisaureus: the bit flags went away [00:41] SubStack: I ported those other modules ok though [00:41] mjr_: echosystm: I don't think npm works with homebrew node yet, sadly. I hear this is nearing a resolution, however. [00:41] piscisaureus: ryah: what if I want node.js? [00:42] mjr_: echosystm: at the moment, if you want npm to work right, you need to install node from source. [00:42] piscisaureus: I mean debugging statements in node.js [00:42] echosystm: damn [00:42] ryah: piscisaureus: 'module' [00:43] piscisaureus: ryah: ah! thnx [00:43] echosystm: why is npm on homebrew then mjr_ ? [00:43] echosystm: doesnt really make much sense [00:43] mjr_: echosystm: wishful thinking? Sad, I know. [00:43] bmizerany has joined the channel [00:43] SubStack: it sort of works I thought? [00:43] mjr_: echosystm: it should really be removed until this stuff gets fixed. [00:43] SubStack: just npm upgrade npm didn't work I thought [00:44] SubStack: ACTION doesn't use a mac, so this is all hearsay [00:45] mjr_: I'm pretty sure npm is completely broken if you install node from homebrew. [00:46] mjr_: You'll install a package with npm, it'll look like it works, and then node won't be able to find it. [00:46] isaacs has joined the channel [00:46] SubStack: ah [00:46] mjr_: Which is dumb, right isaacs? [00:49] skm has joined the channel [00:51] echosystm: apparently i have a non-brew pkg-config in my path... which happens to be in my homebrew... [00:51] echosystm: wtf [00:52] zemanel has joined the channel [00:52] echosystm: is homebrew largely just some random crap a bunch of tards cooked up or what? [00:52] ryah: pkrumins: how do i know if it worked? [00:52] ryah: pkrumins: the tests? [00:52] pkrumins: 1 sec [00:53] MikhX has joined the channel [00:54] pkrumins: ryah: the examples/png-example.js - when you run it, it produce png.png with a 800x600 terminal png image [00:54] SubStack: pkrumins: is it the same binary output each time? [00:54] ryah: Error: ENOENT, No such file or directory './rgba-terminal.dat' [00:54] SubStack: if so you could make an expresso test to check the md5 hash [00:55] pyrotechinck: tjholowaychuk: is this where locals are passed into views? [00:55] pyrotechinck: https://github.com/visionmedia/express/blob/master/lib/express/view.js#L258 [00:55] pkrumins: ryah: cd into examples/ dir [00:55] ryah: pkrumins: does that look familar? [00:55] mjr_: echosystm: homebrew has a lot of smart folks behind it, but it has a few things that aren't quite right. Probably still better than macports. [00:55] CrypticSwarm has joined the channel [00:55] pkrumins: SubStack: no the binary output depends on libpng version [00:55] piscisaureus: ryah: any chance that we might hack os.isPosix (or os.isWindows) quickly [00:55] softdrink has joined the channel [00:55] ryah: pkrumins: okay works [00:55] pkrumins: sweet. [00:55] SubStack: oh annoying! [00:55] ryah: pkrumins: want the diff? [00:55] tjholowaychuk: pyrotechinck: yup [00:55] pkrumins: sure! [00:56] tjholowaychuk: in 2.0.0-pre the options ARE the locals [00:56] ryah: pkrumins: should i test something else before i send it to you? [00:56] tjholowaychuk: they serve as both [00:56] ryah: and while im in the mood? [00:56] ryah: :) [00:56] pyrotechinck: tjholowaychuk: when i log them out there's no 'body' [00:56] pkrumins: ryah: actually, cd tests/ [00:56] tjholowaychuk: pyrotechinck: only the layout gets body [00:56] piscisaureus: ryah: realpath uses lstat which doesn't work on windows, have to skip it [00:56] pkrumins: ryah: and run `node dynamic-png-stack.js` [00:56] tjholowaychuk: pyrotechinck: v [00:56] tjholowaychuk: https://github.com/visionmedia/express/blob/master/lib/express/view.js#L267 [00:56] ryah: piscisaureus: just revert that patch, we can do it later [00:56] pkrumins: ryah: it should produce dynamic.png which is like 112x13 or something [00:56] ryah: piscisaureus: realpath changes were the last commit today [00:57] softdrink: ok i'm thoroughly confused. i can sync my iphone at home, but not at work… using the same machine. [00:57] ryah: pkrumins: [00:57] ryah: ryan@ryan-laptop:.../projects/node-png/tests% node dynamic-png-stack.js [00:57] ryah: 4 Jan 16:56:59 - PNG located at (80,386) with width 112 and height 13 [00:57] ryah: ryan@ryan-laptop:.../projects/node-png/tests% file dynamic.png [00:57] ryah: dynamic.png: PNG image, 112 x 13, 8-bit/color RGBA, non-interlaced [00:57] ryah: look good? [00:57] pkrumins: looks cool [00:57] pkrumins: ryah: and then `node fixed-png-stack.js` which will produce 800x600 image which will contain stuff dynamic.png has, only at the bottom [00:57] dgathright has joined the channel [00:58] ryah: % file fixed.png [00:58] ryah: fixed.png: PNG image, 720 x 400, 8-bit/color RGBA, non-interlaced [00:58] pkrumins: oh 720x400, hmm.. [00:58] ryah: the image doesn't look very good [00:58] pkrumins: ryah: put it on imgur [00:58] pkrumins: put dynamic.png on imgur too [00:59] piscisaureus: ryah: ok, merge done [00:59] ryah: pkrumins: http://imgur.com/ND5ve&UoKex [01:00] micheil: pyrotechinck: fwiw, kod when it's working fully :D [01:00] micheil: pyrotechinck: that's re text-editors [01:01] alek_br has joined the channel [01:01] CrypticSwarm has joined the channel [01:02] teemow has joined the channel [01:03] pkrumins: ryah: http://imgur.com/ND5ve looks good - dynamic.png [01:03] pkrumins: sweet [01:03] pkrumins: ryah: UoKex also looks cool [01:03] pkrumins: all great [01:03] ryah: pkrumins: good [01:03] ryah: piscisaureus: okay. im landing it. [01:04] piscisaureus: ryah: did you test it on linux? [01:04] pkrumins: ryah: is there a way to make module work both, if compiled on 0.2.x and 0.3.x? [01:04] ryah: piscisaureus: yes [01:04] pkrumins: or should i just put the path in 0.3.x branch [01:04] piscisaureus: ryah: phew :-) [01:04] ryah: piscisaureus: good job :) [01:04] CrypticSwarm has joined the channel [01:04] robrighter has joined the channel [01:04] pkrumins: s/path/patch/ [01:05] ryah: pkrumins: you'll need to #ifdef it [01:05] pkrumins: roger [01:05] ryah: pkrumins: i can do that. [01:05] pkrumins: :D [01:05] pkrumins: thanks [01:05] possibilities has joined the channel [01:05] ryah: pkrumins: will you review my changes first? [01:06] pkrumins: i will [01:06] pkrumins: oh did you send a pull already [01:06] pkrumins: didnt check github yet [01:06] CrypticSwarm has joined the channel [01:06] ryah: pkrumins: https://gist.github.com/765761 [01:06] pkrumins: ah, looking [01:07] ryah: i haven't figured out how to do the whole github fork thing yet [01:08] pkrumins: really easy, fork my repo, then git clone it locally, apply the patch, git push it back to your repo, then go to your repo, push pull button. [01:08] piscisaureus: brb [01:08] pkrumins: press button, get bacon. it's that simple ;) [01:08] CrypticSwarm has joined the channel [01:08] CrypticSwarm has joined the channel [01:08] CIA-121: node: 03Bert Belder 07master * r3c330b0 10/ (23 files in 7 dirs): [01:08] CIA-121: node: Merge branch 'master' of git://github.com/ry/node [01:08] CIA-121: node: Conflicts: [01:08] CIA-121: node: src/node.cc [01:08] CIA-121: node: src/node.js - http://bit.ly/hYQydW [01:08] CIA-121: node: 03Bert Belder 07master * rb7b0c92 10/ src/node.cc : Don't attempt to capture SIGUSR1 - http://bit.ly/hPxIqD [01:08] CIA-121: node: 03Bert Belder 07master * rfe6f363 10/ src/node.js : [01:08] CIA-121: node: Revert "realpath files during module load" [01:08] CIA-121: node: This reverts commit 131546e7339d6960ea91629915468c6f04a33cf7. [01:08] CIA-121: node: Doesn't work on windows, coming back soon. - http://bit.ly/fJkcLF [01:09] pkrumins: ryah: why is there `Local buf_val = handle_->GetHiddenValue(String::New("buffer"));` in `Png::PngEncodeSync` but nowhere else? [01:10] ryah: i probably should have done that --no-ff [01:10] ryah: but whatever [01:10] ryah: pkrumins: there's a SetHiddenValue in there too [01:11] pkrumins: what are those for? [01:11] ryah: pkrumins: you can't store Buffer objects in the Png object [01:11] ryah: because Buffers are js objects now [01:11] ryah: so you need to mke js references [01:11] pkrumins: oic [01:11] KrisJordan has joined the channel [01:11] pkrumins: ryah: patch looks ok! [01:12] pkrumins: add the ifdefs now :) [01:12] ryah: pkrumins: okay [01:13] isaacs: mjr_: actually, if you install node from homebrew, current npm works by default. [01:13] pkrumins: SubStack's patch was almost the same, except for Hidden Values. [01:13] isaacs: mjr_: if you install npm from homebrew, that's still broken [01:13] davidwalsh has joined the channel [01:13] mjr_: isaacs: well, at least that's some progress [01:14] isaacs: echosystm: i have no comment on why npm is in homebrew. what i can say is that "brew install npm" should function properly soon. [01:14] echosystm: no worries [01:14] piscisaureus: ryah: now we need to `make plans` [01:15] echosystm: does anyone know if there are any plans for websocket to support binary data? [01:15] echosystm: (without base encoding) [01:15] Squax has left the channel [01:15] rpbertp13 has joined the channel [01:16] dgathright has joined the channel [01:16] isaacs has joined the channel [01:17] sveimac has joined the channel [01:17] alek_br has joined the channel [01:18] sveimac_ has joined the channel [01:19] sprout has joined the channel [01:19] CrypticSwarm has joined the channel [01:20] paulrobinson has joined the channel [01:21] KrisJordan has joined the channel [01:22] CrypticSwarm has joined the channel [01:22] CrypticSwarm has joined the channel [01:23] CrypticSwarm has joined the channel [01:24] CIA-121: node: 03Ryan Dahl 07master * r468042f 10/ src/node_buffer.h : Add C++ Buffer migration tips - http://bit.ly/dPCn5O [01:24] CrypticSwarm has joined the channel [01:24] ph^ has joined the channel [01:24] paulrobinson has joined the channel [01:25] creationix: do we have zlib for node (or in node hidden)? [01:25] creationix: I want to write a node program that generated debian packages without shelling out to the command line [01:27] ryah: not yet [01:28] ryah: piscisaureus: have you looked at cmake? [01:28] piscisaureus: ryah: not really, no [01:28] ryah: supposedly it can generate the files for msvc [01:28] ryah: so can scons [01:28] Tprice has joined the channel [01:28] isaacs: yikes. npm view tobi dist.tarball | xargs curl -s | tar zt [01:29] isaacs: ryah: this is why bundling can be problematic ^ [01:29] piscisaureus: ryah: will look into it [01:30] piscisaureus: ryah: but garrett tells me he has a tool that will do the same by monitoring the build process [01:30] ryah: piscisaureus: ok [01:30] creationix: isaacs: now that I think about my question, if there was tar and zlib for node nativly, you would probably use it for npm [01:30] ryah: isaacs: ? [01:31] ryah: piscisaureus: let's open a thread on the ML [01:31] ryah: i know tom hughes at palm has some opinions on build things [01:31] piscisaureus: ryah: okay. about what? [01:32] isaacs: ryah: everything is bundled in that package, resulting in there being multiple copies of node binaries, compiled addons, and a bunch of other stuff. [01:32] isaacs: cloud9 is way worse [01:32] Blackguard has joined the channel [01:32] piscisaureus: ryah: but it's not like msvc will compile node just like that [01:33] banjiewen_ has joined the channel [01:33] Blackguard has joined the channel [01:33] creationix: isaacs: have you looked into being to create .tar.gz files with node without shelling out? [01:34] isaacs: creationix: well, the first step would be to write a tar module in js. [01:34] creationix: right, but that's not hard is it [01:34] isaacs: creationix: i got about 3 hours into that, and then got distracted. [01:34] paulrobinson has joined the channel [01:34] piscisaureus: ryah: the last time I tried (well quite some time ago) it complained about syntax [01:34] creationix: I mean tar seems like a really simple format [01:34] isaacs: creationix: it is. [01:34] isaacs: creationix: but *reading* tarballs is tricky, because it's also a very old format. [01:34] creationix: and I think zlib would be a good thing to bundle with node, maybe as an optional compile flag [01:34] isaacs: creationix: adn different systems do things differently. [01:35] isaacs: creationix: yes, then the next step would be to have a streaming zlib (de)compression thing in node [01:35] creationix: isaacs: well, then my case is easier, I'm only interested in creating debian archives [01:35] isaacs: creationix: npm would still have to be able to install a tarball from github, or a tarred up folder on your machine, or on a mac, or whatever. [01:35] isaacs: creationix: bsdtar and gnutar can do that [01:35] SubStack: binary parsing! [01:35] creationix: SubStack: feel like making a tar module [01:35] creationix: pretty please? [01:36] SubStack: maybe [01:36] isaacs: creationix: in which case, i mean, you might as well write node-tar.js and just setting the npm "tar" config to point at it [01:36] SubStack: I can just throw node-binary at it [01:36] creationix: the thing is I can't use a binary extension, I'd much rather it be built into the node binary [01:36] creationix: or be pure js [01:37] creationix: but I need this cross-platform (even windows) [01:37] SubStack: node-binary is pure js [01:37] creationix: SubStack: nice [01:37] creationix: what all does it do? [01:37] bentruyman has joined the channel [01:37] arpegius has joined the channel [01:37] SubStack: it makes writing binary parsers not so hard [01:38] meso has joined the channel [01:38] SubStack: like bufferlist but with a static buffer [01:38] tjholowaychuk: isaacs: what was bundled with tobi? [01:38] SubStack: keeps track of all that pesky multibyte endianness business [01:38] SubStack: and asynchronous reading from a buffer stream [01:38] tjholowaychuk: I just added .npmignore a second ago [01:39] creationix: SubStack: oh, so kinda like pgriess's strtok library [01:39] piscisaureus: ryah: I think cmake is broken now, it doesn't define __POSIX__ [01:39] SubStack: yeah [01:39] isaacs: tjholowaychuk: npm view tobi dist.tarball | xargs curl -s | tar zt | grep support [01:39] paulrobinson_ has joined the channel [01:39] hornairs has joined the channel [01:39] tjholowaychuk: ah fun [01:39] tjholowaychuk: lol [01:39] SubStack: creationix: except node-binary has a niftier chainable interface [01:39] isaacs: tjholowaychuk: express, which has jade bundled, which has expresso bundled, which has jscoverage bundled, and express also has expresso bundled, which has... [01:39] tjholowaychuk: that is why you should use .gitignore as well :p [01:39] tjholowaychuk: but now I know about .npmignore [01:40] isaacs: tjholowaychuk: except that there are cases where people (here, in this office, who are my coworkers and boss) need to *not* npm ignore things that *are* part of the git ignore. [01:40] tjholowaychuk: yeah [01:40] tjholowaychuk: maybe you should warn about large sizes on publish [01:40] isaacs: yeah, planning on it [01:40] creationix: I always wondered why sometimes npm publish would take a long time [01:40] isaacs: i'm also gonna warn on un-controlled publish [01:40] creationix: maybe a progress meter showing the bytes uploaded [01:41] dspree has joined the channel [01:41] creationix: isaacs: ok, so I just create a file called .npminclude and put the files I want, one per line? [01:42] isaacs: creationix: yeah, same format as .npmignore [01:42] creationix: ACTION is still trying to fix nvm's file size [01:42] isaacs: creationix: see "man tar" for an explanation of --exclude and --include files [01:42] creationix: hmm, npm publish takes ages and my cpu is stuck in the gzip process [01:42] creationix: how can I make npm echo the tar line it's using? [01:42] isaacs: creationix: -vv [01:42] creationix: ok [01:42] isaacs: creationix: or --loglevel verbose [01:42] jimt has joined the channel [01:43] creationix: it's trying to download the --loglevel file over http [01:44] creationix: npm -vv publish . ? [01:44] isaacs: creationix: weird... [01:44] isaacs: oh, wait, it's -dd, not -vv [01:44] eric_f has joined the channel [01:44] isaacs: whoops [01:44] isaacs: creationix: also, what version of npm? [01:45] isaacs: 0.2.13-3? [01:45] creationix: 0.2.12-1 [01:45] isaacs: oh, ok, update first [01:45] creationix: says there is nothing to update [01:45] creationix: I tried that already [01:45] creationix: "npm update" and "npm update npm" [01:45] isaacs: creationix: npm i npm [01:45] sudoer has joined the channel [01:45] isaacs: creationix: then update will work [01:46] creationix: so it needs install to update itself? [01:46] eric_f: I ran into an error when installing something with a dependency on base64: npm ERR! Error: base64@1.0.1 install: `node-waf configure build` [01:46] isaacs has joined the channel [01:46] isaacs: creationix: no, not normally. only when there's a bug in update in the version you're using ;) [01:46] eric_f: not totally sure what to do… [01:47] creationix: isaacs: fair enough [01:47] aho has joined the channel [01:47] marcab has joined the channel [01:47] creationix: isaacs: hmm, still trying to include everything [01:47] creationix: did I spell it right ".npminclude" [01:47] isaacs: creationix: yeah. [01:48] isaacs: creationix: it's possible you're using a version of tar without --include file support or something? [01:48] paulrobinson_ has joined the channel [01:50] creationix: isaacs: yep, I guess .npmignore it is [01:50] isaacs: creationix: weird. [01:50] creationix: I would have though ubuntu 10.10's tar would have it [01:51] bingomanatee__: <--- proud owner of ordinography.com [01:51] creationix: tar (GNU tar) 1.23 [01:51] cafesofie has joined the channel [01:51] creationix: isaacs: is it evil to remove the old versions of nvm [01:51] creationix: I'm pretty sure nothing depends on them [01:51] gabeh has joined the channel [01:51] creationix: I don't want to bloat the registry [01:52] creationix: and I didn't tag the versions, so I can't go back and re-publish them [01:52] siong1987 has joined the channel [01:53] pyrotechinck has joined the channel [01:54] pyrotechinck: did tj go? [01:55] seangrove has joined the channel [01:55] heavysixer has joined the channel [01:55] paulrobinson has joined the channel [01:56] isaacs: creationix: not at all [01:56] creationix: hmm, unpublish doesn't seem to do anything [01:56] jchris has joined the channel [01:56] creationix: caches maybe? [01:56] isaacs: creationix: yeah [01:56] isaacs: creationix: npm cache clean [01:57] isaacs: creationix: unpublish works, it just doesn't show up in ls right away as being gone. [01:57] isaacs: ls is lazy [01:57] isaacs: so, apparently .npminclude doesn't work like i think it does [01:57] montylounge has joined the channel [01:57] creationix: ok, after clearing caches it's gone [01:57] isaacs: it includes those files, but then *also* includes everything. [01:57] creationix: isaacs: that's less useful [01:57] chapel: pyrotechinck: did you try my script? [01:57] seangrove: hmm, I can't seem to get the home directory in node... [01:57] isaacs: creationix: indeed [01:57] isaacs: i mean, it definitely does include it [01:57] seangrove: fs.readdirSync('~/') seems to not work [01:57] isaacs: man, screw this noise. i just need a "files" array. [01:57] isaacs: that'd be so much nicer. [01:58] creationix: isaacs: how often does howBigIsYourPackage get updated [01:58] SubStack: ACTION wishes npm ls worked for local packages without network [01:58] creationix: seangrove: ~ is a bash thing [01:58] isaacs: SubStack: it doesn't? [01:58] creationix: you're not in bash [01:58] creationix: though you do have process.env.HOME [01:58] seangrove: creationix: Fair enough, happy to learn [01:58] isaacs: creationix: every time any of the documents change. [01:58] seangrove: Great [01:58] seangrove: Thank you [01:58] creationix: so it's just a couch view thingy [01:58] SubStack: isaacs: is there some magic flag I can pass? [01:58] SubStack: I didn't see anything in the man page about it [01:58] mikeal has joined the channel [01:59] ajpiano has joined the channel [01:59] isaacs: creationix: yeah. looks like the attachments didn't get detached tho. i'll take a look [01:59] skm has joined the channel [01:59] creationix: isaacs: cool [01:59] creationix: I take pride in my stuff being lightweight, in software a big package isn't a good thing [01:59] isaacs: creationix: ok, you're way down on the list now :) [02:00] creationix: sweet, much better [02:00] isaacs: creationix: they're lying when they say that the size doesn't matter, but bigger is only better up to a point. [02:02] seangrove: What's the best way to load json from a local file? [02:02] siculars_ has joined the channel [02:03] JojoBoss has joined the channel [02:03] creationix: seangrove: JSON.parse(fs.readFile(filename, 'utf8')) [02:03] creationix: err, ignore that [02:03] creationix: readFile is async [02:03] isaacs: readFileSync [02:03] SubStack: but only do readFileSync at startup [02:03] creationix: or if you want full streaming, you can try my new jsonparse stuff [02:03] isaacs: fs.readFile(filename, "utf8", function (er, data) { JSON.parse(data) }) if you wanna be async [02:03] themiddleman has joined the channel [02:03] Yuffster has joined the channel [02:04] gkatsev: async ftw [02:04] SubStack: probably data.toString() [02:04] SubStack: 'cause you get a buffer otherwise [02:04] SubStack: oh wait utf8 >_< [02:04] montylounge has joined the channel [02:04] creationix: stream = fs.createReadStream('file'); p = new Parser(); stream.pipe(p); p.onValue = ... [02:04] MikhX has joined the channel [02:04] seangrove: I'm just doing a cli tool, don't need to worry too much about async stuff right now (I think) [02:04] seangrove: It'll come I'm sure [02:05] creationix: yeah, if performance doesn't matter and it's cli, then sync is a lot easier if you're not used to the async stuff [02:05] seangrove: Getting more used to it [02:05] SubStack: s/if you're not used to/than/ [02:06] paulrobinson_ has joined the channel [02:06] SubStack: async requires more thinking, but it's worth it for server code [02:06] creationix: SubStack: lol [02:06] creationix: I'm starting to think it's worth is for local stuff too [02:07] creationix: at least when performance matters [02:07] SubStack: well when multiple things are going on at once [02:07] mikeal: i use sync in my tests [02:07] creationix: it orders of magnatude, disks are about the same as a good net connection [02:07] mikeal: cause like, who cares! [02:07] piscisaureus: ryah: still here? [02:07] creationix: mikeal: if your tests took 5 minutes to run you would care [02:08] ben_alman has joined the channel [02:08] mikeal: it's only in the setup phase [02:08] mikeal: network tests are still run in parallel :P [02:08] creationix: if it's 500ms vs 300ms and it's cli, then right, who cares [02:08] ryah: piscisaureus: yes [02:08] SubStack: and there's flow control libs if you're feeling lazy :p [02:09] twoism has joined the channel [02:09] creationix: ACTION knows a flow control library or two... [02:09] SubStack: everybody should write one! [02:10] creationix: though I haven't used them in a while [02:10] piscisaureus: ryah: isaacs: path handling really needs to be fixed [02:10] creationix: piscisaureus: how so? [02:11] piscisaureus: we need an api to detect windows (os.isWindows) and maybe path.isAbsolute and path.resolve as isaacs proposed [02:11] paulrobinson has joined the channel [02:11] ryah: pkrumins, SubStack: can you please test this https://gist.github.com/765827 [02:11] SubStack: I usually write it the regular nested way first then when it looks ugly I normalize it or rewrite it with seq [02:11] ryah: piscisaureus: ok [02:11] SubStack: ryah: on it [02:12] ryah: piscisaureus: in node_os.cc you can define that isWindows [02:12] jamesarosen has joined the channel [02:13] piscisaureus: ryah: okay, then that will be the api :-) [02:13] creationix: so are we getting a native windows port soon? [02:13] sveimac_ has joined the channel [02:14] creationix: just wondering because I want to deploy some stuff on windows, and it would be nice to be able to use node [02:14] piscisaureus: what is the proposition for path.resolve? [02:14] piscisaureus: and where are paths handled apart from the path module and fs.realpath? [02:15] pkrumins: ACTION checking, oh i dont have node-0.3.x [02:15] pkrumins: installing 0.3.x [02:15] piscisaureus: I can think of module loading [02:15] piscisaureus: it is all quite opaque to me [02:16] piscisaureus: creationix: there's a lot to be done before the windows port is stable, but it's coming along [02:16] SubStack: oh pkrumins you got this? [02:16] JojoBoss: I would love a native windows port. [02:16] pkrumins: no just started [02:16] creationix: ok, that's what I last heard, just wondering if there was some breakthrough I hadn't heard of [02:16] pkrumins: are you checking it already? [02:16] creationix: piscisaureus: keep up the good work [02:17] SubStack: I don't have 0.3 either >_< [02:17] pkrumins: cuz i just wgetted 0.3.3 [02:17] SubStack: kk [02:17] isaacs has joined the channel [02:17] pkrumins: ok i'll handle this from here [02:17] SubStack: acknowledged [02:17] paulrobinson has joined the channel [02:18] smtlaissezfaire has joined the channel [02:19] hdon has joined the channel [02:20] JojoBoss: anyone know if v0.3.2 or v0.3.3 will run in cygwin? the last one i was able to get working was v0.3.1 [02:21] tlrobinson has joined the channel [02:22] paulrobinson has joined the channel [02:22] ryah: pkrumins: check on v0.2 too [02:23] ezmobius has joined the channel [02:23] creationix: ryah: Do you think it will be possible some day for fs.createReadStream(someFile).pipe(response) to use sendfile or other optimizations under the hood [02:24] pkrumins: ryah: yep [02:24] pkrumins: 0.3 just finished compiling, checking. [02:24] creationix: cool, that's what I'm using for my new static file server [02:24] piscisaureus: ryah: isWindows or isWindows() [02:24] creationix: creationix.com is now a streaming server running v0.3.3 [02:25] jimt has joined the channel [02:25] paulrobinson_ has joined the channel [02:25] ryah: piscisaureus: target->Set(String::New("isWindows"), True()) [02:27] pkrumins: isaacs: got a suggestion, put that one-liner string of how to install npm on npmjs.org website as well :) [02:27] pkrumins: isaacs: cause each time i upgrade my node.js, i have to go looking for it, and it always takes one more click to get to github's npm page [02:27] pkrumins: OH! [02:27] pkrumins: it's there [02:27] pkrumins: isaacs: good job ;) [02:28] esigler has joined the channel [02:28] ryah: i think i requested that already :) [02:29] mgutz has joined the channel [02:30] ezmobius has joined the channel [02:30] matt_c has joined the channel [02:31] creationix: pkrumins: also isaacs showed me a neat trick where you install node and npm at use/local and then install specific node versions on $HOME [02:31] creationix: and the global npm will work against the local node's [02:31] seangrove: Heh, if I want to prompt the user for input from the cli, am I going to have to go all out async? [02:31] ryah: pkrumins: oh, you need a node_version.h in buffer_compat.cpp [02:31] ryah: pkrumins: osrry [02:32] langworthy has joined the channel [02:32] SubStack: seangrove: npm install prompt [02:32] MattDiPasquale has joined the channel [02:32] piscisaureus: ryah: https://gist.github.com/765839 [02:34] SubStack: seangrove: or else require('lazy')(process.openStdin()).lines.take(1).join(function (lines) { var line = lines[0]; /* ... */ }) [02:34] SubStack: or there are a few more line-buffering modules [02:34] creationix: oh the joys of chaining [02:34] seangrove: SubStack: Thank you very much :) [02:34] creationix: makes async look sync [02:34] pkrumins: chain or die [02:34] sprout has joined the channel [02:34] creationix: for some reason, I never got into chaining, I just like taking functions as arguments [02:35] SubStack: pkrumins: chain().or(function () { /* ... */ }).die(), you mean [02:35] pkrumins: /o\ [02:35] creationix: and using LOTS of composition [02:35] pkrumins: hahahaha. [02:35] pkrumins: creationix: i see, well chaining is cool [02:35] pkrumins: tias! [02:35] pkrumins: i bet you have tried, but you have to try more [02:35] SubStack: chaining appeals to my aesthetics so much [02:35] SubStack: must be all the haskell [02:35] creationix: chaining it cool, I guess I just worry about the overhead (it's an irrational fear) [02:35] SubStack: it warps your brains [02:35] elijah-mbp1 has joined the channel [02:35] creationix: haskell is a good warp [02:36] creationix: java is a bad warp [02:36] SubStack: creationix: I just tell myself: "cpu is fast, disk is slow" [02:36] elijah-mbp1 has joined the channel [02:36] creationix: s/cpu is fast/cpu is fast unless youre running an interpreted language on a phone!/ [02:37] SubStack: hah, silly phones [02:37] creationix: course, I'm sure phone disks aren't very fast either [02:37] SubStack: I dunno, they're mostly flash ram [02:37] creationix: yep [02:37] creationix: some flash is fast, some, not so much [02:37] SubStack: yeah true [02:37] creationix: my eeepc 701 was pretty slow [02:37] creationix: my mbp I7 with ssd was fast [02:38] SubStack: ACTION will get a phone someday [02:38] SubStack: not to call people with, of course, but for mobile internet [02:38] creationix: SubStack: http://developer.palm.com/index.php?option=com_content&view=article&id=2129 [02:38] creationix: comes with node preinstalled ;) [02:38] pkrumins: i'll get an iphone [02:38] pkrumins: when i get back to latvia [02:38] creationix: meh, you can't hack those [02:38] pkrumins: i dont really want to mess with my phone too much [02:39] pkrumins: that's why i have laptop now! [02:39] CIA-121: node: 03Bert Belder 07master * r9e31e08 10/ (doc/api/os.markdown lib/os.js src/node_os.cc): Implement os.isWindows - http://bit.ly/hCPV1K [02:39] ryah: piscisaureus: thanks [02:39] SubStack: neat [02:39] creationix: wow, that was fast [02:39] SubStack: creationix: oh it'd be cool to have webos running in browserling too [02:40] pkrumins: hah cool. [02:40] creationix has left the channel [02:40] SubStack: left! [02:40] creationix has joined the channel [02:40] SubStack: oh there he is [02:40] pkrumins: he didnt like what you said haha [02:41] creationix: playing with my cr48 all christmas really warped my keybinding memory [02:41] springmeyer: so "standard modules" are compiled into the node binary? like 'util.js' ? [02:41] creationix: keep closing the wrong windows today [02:41] ryah: springmeyer: yes [02:41] ryah: ACTION away [02:41] springmeyer: ryah: thx [02:42] pydroid has joined the channel [02:42] springmeyer: ACTION thinking about packaging an addon as binary [02:42] springmeyer: whether to bundle it with a specific node version or provide the addon compiled against several node versions [02:43] springmeyer: hmmm [02:47] pyrotechinck: jquery is down [02:47] pyrotechinck: JQUERY IS DOWN [02:47] pyrotechinck: http://code.jquery.com/jquery-1.4.3.min [02:49] bentruyman has joined the channel [02:51] pkrumins: ryah: ok so i now applied the patch, but how do i make the node-png package, does it use cmake now? do i need a new makefile? [02:52] pkrumins: i mean how do i compile it [02:52] andrewfff has joined the channel [02:52] SubStack: node-waf went away? [02:52] pkrumins: oh sorry [02:52] pkrumins: i was trying waf [02:53] SubStack: pkrumins: just npm link it :p [02:53] pkrumins: ah! [02:53] piscisaureus: my brain stopped working. going to bed. [02:54] pkrumins: tried turning it off, and... oh wait. [02:55] skm has joined the channel [02:56] jamesarosen has joined the channel [02:57] AAA_awright_ has joined the channel [02:57] softdrink has joined the channel [02:58] chapel: hmm [02:59] chapel: pyrotechinck: you there? [03:01] evanmeagher has joined the channel [03:02] siong1987 has joined the channel [03:02] rwaldron_ has joined the channel [03:04] funkatron has joined the channel [03:04] arlolra has joined the channel [03:05] springmeyer has joined the channel [03:06] pkrumins: i have no idea how i got node-png installed the previous time, i cant get libpng installed on osx [03:07] arlolra: homebrew? [03:07] pkrumins: unlikely, cause then i'd have it installed on the system. [03:07] tlrobinson has joined the channel [03:08] pkrumins: i have it installed locally but i have no idea how to pass the path to node-waf in easy way [03:08] pkrumins: i have it at /Users/pkrumins/src/libpng-1.4.4/ [03:09] falconair: path.exists takes a callback, does that mean that it is an async method? [03:09] pkrumins: that's correct [03:10] falconair: is there a higher level file system library which allows more synchronous functionality? [03:10] pkrumins: try fs.statSync if you want it sync. [03:10] falconair: pkrumins, thanks i'll look at it [03:10] pkrumins: yw [03:11] pkrumins: a combinator library would be cool that would turn arbitrary async calls into sync ones [03:12] pkrumins: not sure how useful but cool. [03:12] pkrumins: somewhat useful. [03:12] falconair: am i reading this right that fs.statSync retuns an object on which I can call isFile() to see if the file exists? [03:12] pkrumins: try it and see! [03:12] pkrumins: tias. [03:13] falconair: hm...then why would anyone call me lazy? kidding, i'm in the middle of a few hundred lines of fragile code :) I'll try it though [03:15] RockShox has joined the channel [03:17] falconair: ok, just found out about the REPL! when I do require('fs').statSync("xyz").isFile(), i get an error (xyz doesn't exist) [03:17] falconair: is there something that returns a simple "no" to signify that the file doesn't exist? [03:20] c4milo1 has joined the channel [03:21] aho: falconair, there is path.exists [03:21] jherdman has joined the channel [03:22] falconair: aho: that's what I looked at earlier, i need to synchronous call [03:22] falconair: the result of path.exists will determine how i execute rest of the code, and putting all the code in path.exists' callback will make the code extremely messy [03:23] markstory has joined the channel [03:23] chapel: has anyone used http://www.telehash.org/? [03:24] derferman has joined the channel [03:26] iFire has joined the channel [03:27] SubStack: falconair: there's path.existsSync [03:27] falconair: SubStack: I don't see it in http://nodejs.org/docs/v0.2.6/api.html [03:27] SubStack: falconair: and you can always use a flow control module to make it pretty [03:28] falconair: where can I read about flow control module? [03:28] SubStack: there are lots of flow control libs on http://github.com/ry/node/wikis/modules [03:29] SubStack: but if you're just starting out it's good to get a feel for organizing your code asynchronously without libs first [03:30] falconair: is there a version of node that supports path.existsSync? [03:30] SubStack: falconair: try require('path').existsSync in the repl [03:30] jakehow has joined the channel [03:31] falconair: SubStack: wow, it is there! is it undocumented for a reason? is it safe to use or did I just not search it correctly in the docs? [03:31] SubStack: it's probably not in the docs because you shouldn't use it :p [03:31] SubStack: at least, shouldn't use it in code where performance matters [03:31] jimt has joined the channel [03:33] admc has joined the channel [03:34] KyleXY has joined the channel [03:35] sveimac has joined the channel [03:39] joelklabo has joined the channel [03:40] Slartan has joined the channel [03:41] eric_f: Was curious if someone had a direction to point me in to fix this issue with base64 package when installing it via npm? https://gist.github.com/765894 [03:41] bmizerany has joined the channel [03:45] pkrumins: eric_f: seems like you're using my base64, and the problem is it only works on node 0.2.x [03:46] SubStack: i had a patch for that [03:46] SubStack: for 0.3 [03:46] pkrumins: oh sweed, did the tests pass [03:46] SubStack: pretty sure [03:46] pkrumins: cool, i'll merge it in [03:46] pkrumins: via ry's buffer_compat thing. [03:46] pkrumins: so it works on both node versions [03:46] SubStack: yep, commits say it all passes [03:47] pkrumins: eric_f: if you can waitlike 2hrs, i'll have it in. [03:47] SubStack: but no ifdefs for the old 0.2 style [03:47] SubStack: https://github.com/substack/node-base64 [03:47] SubStack: so it only works on 0.3 [03:47] pkrumins: eric_f: yeah or use Substizzy's 0.3 patch [03:47] eric_f: pkrumins SubStack excellent! [03:48] eric_f: pkrumins: you plan to merge in SubStack's changes onto a 0.3 branch then? [03:48] pkrumins: sure, in 2hrs [03:48] SubStack: oh yeah and I wrote more tests ^_^ [03:48] SubStack: forgot about those [03:48] pkrumins: :D [03:48] SubStack: uses perl's base64 module to test [03:48] SubStack: as a reference [03:48] pkrumins: i think i used that already [03:49] pkrumins: use MIME::Base64 qw(encode_base64); [03:49] pkrumins: checking your stuff out [03:49] chrischris has joined the channel [03:49] SubStack: pkrumins: yes but I bundled it all up into an expresso test [03:50] SubStack: so you don't have to have perl installed or anything [03:50] eric_f: SubStack: cool, using your fork worked, installed and built without issue for me [03:50] TheEmpath2 has joined the channel [03:50] TheEmpath2: hail nodites [03:50] pkrumins: SubStack: got it. [03:50] pkrumins: eric_f: nice. [03:50] SubStack: \o/ [03:50] pkrumins: `-/ [03:50] pkrumins: | [03:50] TheEmpath2: i need to make a raw/custom socket connection to a node.js server using socket.io. anyone ever walk that lonely path before? [03:50] pkrumins: hyaaaaaaaa [03:51] SubStack: TheEmpath2: you mean a websocket client? [03:51] TheEmpath2: websocket infers http overhead, ya? im interested in a low-level or near-low-level socket [03:52] SubStack: what [03:52] TheEmpath2: :( [03:52] SubStack: between what kinds of clients? [03:52] SubStack: are they both node.js processes? [03:52] TheEmpath2: naw [03:53] TheEmpath2: node.js server w/ socket.io -> custom client in any language [03:53] SubStack: also socket.io is pretty fast [03:53] TheEmpath2: it is [03:53] SubStack: ACTION uses it to push out base64 encoded image data in realtime [03:53] TheEmpath2: which is why i wanna learn how to make agnostic clients [03:53] chapel: hmm [03:54] TheEmpath2: i figured the easiest way is to just open up abasic host/port socket call and go from there [03:54] SubStack: TheEmpath2: how about, what are you trying to solve? [03:54] SubStack: instead of how you are trying to solve it [03:54] jimt has joined the channel [03:54] TheEmpath2: but i am unsure how to negotiate with the socket.io port listeners [03:54] TheEmpath2: sure [03:54] TheEmpath2: i got a node.js server [03:54] chapel: question, if I were to have a couchdb based couchapp could I use node and socket.io for specific features in the couchapp? [03:54] TheEmpath2: and i got some guy using WebGL [03:54] mikew3c has joined the channel [03:55] TheEmpath2: i want WebGL to connect to a node.js server [03:55] TheEmpath2: ACTION is a forward-thinking tyrant. [03:55] SubStack: TheEmpath2: I am not sure why you find socket.io unacceptable for that task [03:56] TheEmpath2: i dont [03:56] TheEmpath2: its just WebGL doesn't use javascript [03:56] TheEmpath2: so i can't use the javascript client [03:56] SubStack: oh [03:56] TheEmpath2: and that be my conundrum [03:57] SubStack: I bet there is a way to call javascript from inside webgl [03:58] TheEmpath2: :/ [03:58] pkrumins: WHAT ARE YOU TRYING TO DO [03:59] TheEmpath2: :O [03:59] TheEmpath2: I want a WebGL client to just open connections to a socket.io server [03:59] SubStack: from what I read webgl is javascript [04:00] TheEmpath2: what about standalone clients that use DirectX? [04:00] SubStack: and it's just another DOM element like canvas [04:00] SubStack: standalone... webgl? [04:00] TheEmpath2: no.. different client [04:01] TheEmpath2: say some game writetn in DirectX wants to leverage a socket.io server [04:01] pkrumins: well try it [04:01] pkrumins: try hacking it up [04:01] SubStack: so you want different types of clients hitting the same server? [04:01] TheEmpath2: thats what im asking [04:01] pkrumins: no one has tried that before [04:01] pkrumins: i guarentee you [04:01] TheEmpath2: ah [04:01] TheEmpath2: damn it [04:01] pkrumins: just try it yourself [04:01] pkrumins: like hack it up [04:01] TheEmpath2: if i can hack it, i can also create stand alone load testing of a server [04:01] falconair: as far as I can tell, if I want to clone an object in node.js/javascript, I pretty much have to do it manually...no built in function...correct? [04:01] SubStack: just pass the socket.io data through the same interface that regular network sockets go to for standalone clients [04:01] pkrumins: falconair: require('traverse/hash').Hash [04:01] TheEmpath2: falconair: I tend to json the object, then unJSON it to something new [04:02] bart2 has joined the channel [04:02] pkrumins: falconair: use SubStack's traverse module. [04:02] TheEmpath2: is that faster than JSON stringify/parse? [04:02] pkrumins: it doesnt matter. [04:02] SubStack: actually you can just require('traverse').clone [04:02] pkrumins: ah [04:02] TheEmpath2: k i'll just try to find out how sockiet.io clients establish connections [04:02] sechrist has joined the channel [04:03] TheEmpath2: JS lacks a native deep copy, and its a crucial part of my Imhotep project, so im open to the best and fastest object deep copy ever found [04:04] falconair: pkrumins: traverse doesn't seem to be at https://github.com/ry/node/wiki/modules, are you referring to this: https://github.com/substack/js-traverse? [04:04] pkrumins: falconair: yes I am. also see what SubStack said above [04:04] SubStack: falconair: yes, it's listed as 'traverse' on npm [04:04] SubStack: npm install traverse [04:04] pkrumins: falconair: < SubStack> actually you can just require('traverse').clone [04:04] SubStack: and traverse.copy() for shallow copies [04:04] falconair: cool, thanks! [04:06] SubStack: pretty much everything I write depends on traverse [04:06] SubStack: useful grab-bag of hash functions [04:06] TheEmpath2: SubStack: ever jsperf your traverse vs. json stringify/parse? [04:06] SubStack: and occasionally I actually use it to traverse data structures [04:06] SubStack: TheEmpath2: nope [04:07] SubStack: I don't really care about performance until I can demonstrate that something is actually slow [04:07] TheEmpath2: i use JSON for my deepcopies, and its slow [04:07] TheEmpath2: im trying to find efficient replacements [04:07] SubStack: but here I can make a quick test [04:09] jchris has joined the channel [04:09] SubStack: > var clone = require('traverse').clone; var t0 = Date.now(); for (var i = 0; i < 1000; i++) clone({ a : 1, b : [ 2, 3, { c : [ 4, 5, 6 ] } ], d : [ 7, 8 ], e : 9 }); Date.now() - t0 [04:09] SubStack: 24 [04:09] SubStack: now doing JSON.{stringify,parse} [04:09] pkrumins: JSON will be slower [04:10] wapcaplet has left the channel [04:10] pkrumins: 5x slower i predict. [04:10] TheEmpath2: ACTION npm's traverse [04:10] SubStack: > var t0 = Date.now(); for (var i = 0; i < 1000; i++) JSON.parse(JSON.stringify({ a : 1, b : [ 2, 3, { c : [ 4, 5, 6 ] } ], d : [ 7, 8 ], e : 9 })); Date.now() - t0 [04:10] SubStack: 53 [04:10] TheEmpath2: hrmmm [04:10] SubStack: hah! [04:10] pkrumins: 2x! [04:10] SubStack: only 2x slower [04:10] pkrumins: umpossible [04:11] SubStack: hooray I win the performance test without caring about performance [04:11] pkrumins: haha. [04:11] SubStack: that is the best way to win: without caring [04:11] pkrumins: so much win! [04:12] AAA_awright: Oh wow, is that a faster way to check the type of an object? "".constructor===String [04:12] SubStack: oh hah, I scaled up to 100000 and it's a bit wider of a gap: 1781 to 4644 [04:12] SubStack: ACTION wins [04:12] SubStack: AAA_awright: typeof s === 'string' [04:12] SubStack: v8: typeof 'moo' [04:12] v8bot: SubStack: "string" [04:12] AAA_awright: But that's a string comparison [04:12] AAA_awright: I doubt it's faster [04:12] AAA_awright: v8: "".constructor===String [04:12] v8bot: AAA_awright: true [04:13] AAA_awright: v8: "".constructor===Array [04:13] v8bot: AAA_awright: false [04:13] SubStack: it's going to be crazy fast no matter what you do [04:13] AAA_awright: Is it optimized down? [04:13] SubStack: best to not optimize that kind of thing [04:13] AAA_awright: ACTION writes a test [04:13] AAA_awright: Well not unless it's 50% of your logic [04:13] Moominpapa has joined the channel [04:13] SubStack: check this: [04:13] SubStack: v8: var t0 = Date.now(); for (var i = 0; i < 100000; i++) typeof 's' === 'string'; Date.now() - t0 [04:13] v8bot: SubStack: 0 [04:14] SubStack: blazing fast [04:14] jimt has joined the channel [04:14] SubStack: I wouldn't worry about it [04:14] SubStack: oh hah [04:14] SubStack: > var t0 = Date.now(); for (var i = 0; i < 100000; i++) typeof 's' === 'string'; Date.now() - t02 [04:14] TheEmpath2: wow.. at 1e6 iterations, traverse is at 12847ms... json is at 30656ms :O [04:14] hobodave has joined the channel [04:14] SubStack: whoops, that is a 2 [04:14] muk_mb: does anyoen know why my node can find it's views directory just fine locally, but when I run it on the server it crashes and can't find it? [04:14] pkrumins: 2 :D [04:14] SubStack: and with 's'.constructor === String it takes 25 ms [04:15] SubStack: so typeof s wins by like 12x [04:15] pkrumins: muk_mb: how do we know what is your 'views directory'? [04:15] chapel: v8: var t0 = Date.now(); for (var i = 0; i < 10e10; i++) typeof 's' === 'string'; Date.now() - t0 [04:15] SubStack: AAA_awright: so probably .constructor is much slower because it does a property lookup [04:16] v8bot: chapel: Error: Timeout [04:16] chapel: :) [04:16] chapel: v8: var t0 = Date.now(); for (var i = 0; i < 10e5; i++) typeof 's' === 'string'; Date.now() - t0 [04:16] v8bot: chapel: 10 [04:16] echosystm: are people mainly using 2.6 or 3.3 now? [04:16] echosystm: i see 3.3 is not "stable" [04:16] SubStack: whereas typeof can cheat and check v8's object struct directly [04:17] AAA_awright: - string.constructor===String: 4845591 Hz [04:17] AAA_awright: - typeof(String)=='string': 23376410 Hz [04:17] AAA_awright: SubStack: Huh guess you're right [04:18] SubStack: ==='string' might be a little faster still [04:18] AAA_awright: - typeof(String)==='string': 32457777 Hz [04:18] SubStack: since === has less silly boundary cases [04:18] SubStack: surprising! [04:18] TheEmpath2: traverse integrated into my elaborate project seemlessly [04:18] SubStack: \o/ [04:18] TheEmpath2: i can feel its speediness uplift my spirit [04:19] AAA_awright: Actually it's not typeof(String) it's typeof(string) where string="some string" [04:19] AAA_awright: but yeah [04:19] SubStack: v8 does all sorts of crazy stuff under the hood [04:19] SubStack: it's hard to predict performance without testing [04:20] SubStack: AAA_awright: also you can clone structures with functions in them with traverse [04:20] SubStack: although those references are kept the same3 [04:20] pkrumins: v8bot: [2] == "2" [04:20] v8bot: pkrumins: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [04:20] SubStack: I can't remember if it checks function prototypes or not [04:20] SubStack: s/prototypes/attributes/ [04:21] jimt_ has joined the channel [04:21] joelklabo has joined the channel [04:21] SubStack: right, supposed to be integrating this new payment code I wrote [04:22] AAA_awright: Wow typeof()==="" is actually /faster/ than i++ [04:22] echosystm: SubStack: with DNode, what happens when a client is disconnected? are object references held by the server automatically purged? [04:22] AAA_awright: hmm something isn't right here [04:22] AAA_awright: with my test [04:22] SubStack: echosystm: yep, v8's GC takes care of all that for the most part [04:23] SubStack: I've had dnode servers running for months and haven't had memory issues [04:23] echosystm: nah i mean like [04:23] echosystm: hang on, i think im missing something [04:23] TheEmpath2: echosystem: i tend to do manual cleanups of resources from clients that disconnect since the GC is stop-the-world [04:23] skm has joined the channel [04:23] echosystm: can a server have a reference to an object held on the client? [04:23] TheEmpath2: espeically in my queues [04:24] SubStack: echosystm: yes, you can get really crazy with it [04:24] Tprice: anyone know how the "Readline" works? [04:24] TheEmpath2: ACTION pokes TheEmpath. Clearly, someone forgot to logout at work.:X [04:24] SubStack: I don't even know what side of the connection a lot of my functions are on anymore [04:24] SubStack: it all just magically works [04:24] echosystm: ok [04:25] echosystm: lets say i have object Y on the server, with a function x()... which returns object A [04:25] echosystm: client goes Y.x() and gets a remote object reference, correct? [04:25] arrty has joined the channel [04:25] SubStack: echosystm: well in dnode you don't return, you call a callback supplied in the arguments list [04:25] SubStack: continuation-passing style [04:26] muk_mb: pkrumins: the one that express uses to find my template files [04:26] echosystm: ok, well i mean regardless of how the object reference comes back [04:26] echosystm: the client actually gets a remote object reference, right? [04:26] SubStack: echosystm: but sure, Y.x() gets an object with wrapped functions [04:26] SubStack: so you can call A's functions and they turn into RPC requests back to the side that defined them [04:27] echosystm: right [04:27] echosystm: ok, now say the connection dies [04:27] echosystm: how does the client/server know which remote objects are now dead? [04:27] echosystm: it wont know until it tries to do something with them, right? [04:27] SubStack: echosystm: dnode does this: delete clients[conn.id] [04:28] SubStack: and then the GC culls the remote once all the ref counts hit 0 [04:28] echosystm: ok [04:28] SubStack: or whenever the GC feels like it because that is how GCs roll [04:28] SubStack: in practice it's really not a problem [04:29] SubStack: also you can conn.on('end', function () { /* ... */ }) if you want to clean up some structures with client functions in them [04:29] SubStack: echosystm: this article might be useful: http://substack.net/posts/9bac3e/Roll-your-own-PubSub-with-DNode [04:29] perezd has joined the channel [04:29] echosystm: ok, thanks [04:30] perezd: pyrotechinck: yo! [04:31] echosystm: i'm trying to build node 3.3, how can i get it to install in my home/ [04:31] SubStack: --prefix=... [04:31] SubStack: ./configure --prefix=... I should say [04:35] echosystm: ah, ok i see it now [04:35] echosystm: thanks [04:36] andrewfff has joined the channel [04:38] technoweenie has joined the channel [04:43] ajpiano has joined the channel [04:45] AAA_awright: SubStack: Actually it could just be my testing method: [04:45] AAA_awright: - typeof(list[i%s])==='string': 11196825.396825397 Hz (0.17499976372743598) [04:45] AAA_awright: - list[i%s].constructor===String: 12536676.38483965 Hz (0.17499976744618706) [04:46] yozlet has joined the channel [04:47] SubStack: well here are my results: https://gist.github.com/765939 [04:48] alexfner has joined the channel [04:48] pkrumins: here are mine https://gist.github.com/765940 [04:48] pkrumins: they match SubStack's [04:49] SubStack: well, using the same test [04:49] SubStack: not sure what AAA_awright's tests are on about with that Hz business [04:50] AAA_awright: SubStack: How many times the loop can be run in half a second, or rather, it calculates how many runs will be about half a second, then calculates the s^-1 from that [04:50] Aria has joined the channel [04:51] AAA_awright: SubStack: It's probably optimizing typeof s === 'string' down because it's known before runtime [04:51] SubStack: possible [04:52] AAA_awright: SubStack: That's why I have it iterating through an Array, only one of eight of which is a String [04:52] echosystm: anyone know how to install npm somewhere in home? [04:52] AAA_awright: (that's what the 0.175 is, the percentage of strings it finds) [04:52] AAA_awright: I have it add to a variable so I know it's not skipping the statement entirely [04:52] pkrumins: echosystm: just copy the string from npmjs.org and run it [04:52] pkrumins: echosystm: it will put npm in the same place your node is. [04:52] AAA_awright: SubStack: Working around the optimizer like that is important [04:53] echosystm: ok [04:53] echosystm: i thought it only does that if it is in ~/local [04:53] pkrumins: why is it important [04:53] SubStack: AAA_awright: check this then: https://gist.github.com/765944 [04:53] SubStack: pkrumins: no idea! [04:53] SubStack: at any rate it doesn't matter because it's crazy fast [04:54] AAA_awright: SubStack: `typeof("string")=="string"` is as fast as `true`! [04:54] bingomanatee_ has joined the channel [04:54] AAA_awright: That can't be right [04:54] pkrumins: it doesnt matter [04:54] pkrumins: get a life. [04:55] SubStack: hey now pkrumins [04:55] pkrumins: yes? [04:55] SubStack: experiments! [04:55] pkrumins: ah. [04:55] pkrumins: ok! [04:55] pkrumins: carry on! [04:55] SubStack: experiments can teach us surprising things [04:55] pkrumins: oh right [04:55] pkrumins: i forgot [04:55] SubStack: if this were mere speculation I would agree [04:56] echosystm: what should NODE_PATH be? {installdir}/lib or {installdir}/lib/node/npm..... [04:56] echosystm: ? [04:57] pkrumins: nodelib/bin [04:57] echosystm: you mean {installdir}/bin ? [04:58] echosystm: that doesnt make a lot of sense [04:58] jamesarosen has joined the channel [04:58] SubStack: mine is /home/substack/.npm/lib [04:59] echosystm: ah, hidden [04:59] echosystm: found it, thanks :) [04:59] SubStack: same as `npm config get root` [05:04] sechrist: I absolutely love airplay [05:05] sechrist: I was literally going to write some small service to be remote speakers -- then I realized the apple devices I already own do this [05:07] echosystm: i must say SubStack, i am mighty impressed with dnode [05:07] SubStack: :D [05:07] echosystm: good work [05:08] SubStack: ACTION uses it for everything [05:08] echosystm: this is going to get used on the project ive been pulling my hair out over for the last month hah [05:08] TheEmpath2: ACTION guts the socket.io client. [05:09] TheEmpath2: I need to write a transport for socket.io that allows two node.js instances to talk to each other :X [05:09] SubStack: TheEmpath2: well there's dnode :p [05:09] noahcampbell has joined the channel [05:10] SubStack: dnode talks socket.io and also does regular sockets [05:13] TheEmpath2: incharesting [05:13] TheEmpath2: how does dnode scale as a message queue solution like rabbit/AMPQ? [05:14] SubStack: I'm not familiar with how those work. [05:14] SubStack: dnode is a lot like drb, if you've used that [05:14] smtlaissezfaire has joined the channel [05:15] TheEmpath2: message queues allow multiple servers to pass data between each other in a queue-like fashion [05:15] TheEmpath2: in case one server goes down, the message queue will route requests intelligently to whatever is still running [05:15] TheEmpath2: could i use dnode to brute my server for load tests? [05:16] SubStack: you can build something like that on top of dnode [05:16] SubStack: dnode doesn't do that itself though [05:16] SubStack: I don't see how that would be very useful actually [05:16] bingomanatee_: They also offer task synchronization a la Java [05:16] SubStack: unless you are twitter or something [05:17] TheEmpath2: im trying to get to big scales :D [05:17] SubStack: I have a project on the back burner that is a little bit like that [05:17] SubStack: role-based task delegation [05:18] Ond: To separate node servers? [05:18] jimt has joined the channel [05:18] SubStack: separate or the same it doesn't matter [05:19] smtlaissezfaire has joined the channel [05:24] bingomanatee_: Queues are great for cloud based workers. They also give you the opportunity to use transaction or transaction-like flow control. [05:24] prettyrobots_ has joined the channel [05:24] _richardJ has joined the channel [05:25] davidascher has joined the channel [05:27] smtlaissezfaire has joined the channel [05:27] eric_f: Curious what the general feeling about the url.js module is from people who've used it a lot? [05:28] mjr_: I have a general feeling of adequacy for url.js [05:29] SubStack: if it's on npm then it's most likely reasonably adequate [05:29] TheEmpath2: step 1.) start a node server with the HTTP server too 2.) net.createConnection to that server/port 3.) crash the server! [05:29] SubStack: good self-selection at work [05:30] SubStack: TheEmpath2: .listen() can take a callback [05:30] SubStack: gets called when the server has been bound to a port [05:30] SubStack: if that's what you mean [05:31] TheEmpath2: i mean i start an httpserver on an instance of node [05:31] TheEmpath2: then i open another instance of node and net.createConnection to that poort and 127.0.0.1 [05:31] TheEmpath2: that will bring down my first instance of node [05:31] eric_f: I've been thinking about URL and JavaScript APIs for some time now. Both for use in the browser dealing with user input, and on YQL. I read through the node url.js module and I guess it's just a pretty different approach from what I've been writing. [05:31] TheEmpath2: if i access 8000 in a browser, it works. if i access it via a net.createConnection, the sever goes down [05:35] pkrumins: ryah: bad: $ node png-example-async.js [05:35] pkrumins: Segmentation fault [05:35] pkrumins: ryah: on 0.3 [05:36] pkrumins: ryah: in examples/ directory [05:36] sveimac has joined the channel [05:36] SubStack: there should be a res.render shortcut that only sets locals [05:36] SubStack: in express [05:36] pkrumins: ryah: all async examples broken in 0.3 :( [05:36] pkrumins: pkrumins@Peteris-Kruminss-MacBook-Air:610:110:~/tests/node-packages/node-png/tests$ node dynamic-png-stack-async.js [05:36] pkrumins: Segmentation fault [05:36] andrewfff has joined the channel [05:36] crodas has joined the channel [05:36] pkrumins: trying 0.2 now. [05:36] SubStack: res.show, maybe [05:38] cafesofie has joined the channel [05:41] joelklabo has joined the channel [05:42] pkrumins: ryah: i can confirm that it works on 0.2, but crashes on 0.3. So please try the async tests for 0.3! [05:43] slaskis has joined the channel [05:44] TheEmpath2: and now it works :X [05:44] TheEmpath2: spooky [05:44] Aria: Gamma rays. [05:46] cwo has joined the channel [05:49] echosystm: ok SubStack, back to the issue i was talking about before... [05:49] echosystm: when machine A has a reference to an object on machine B, and machine B disconnects, whats the best way to ensure all those referenced objects are purged? [05:49] echosystm: is there some kind of ondisconnect event? [05:49] SubStack: yep [05:50] SubStack: conn.on('end', function () { /* ... */ }) [05:50] echosystm: ah, cheers [05:50] SubStack: the pubsub article has a good example of that on it [05:50] SubStack: also you can do conn.id to get a unique key to index clients by [05:51] brainproxy: for GET requests, is it ever important to watch for the 'end' event on the req object? [05:51] matjas has joined the channel [05:58] ezmobius: anyone have a node.js chef cookbook for ubuntu 10.04? [06:00] linac has joined the channel [06:03] mgutz has left the channel [06:07] kawaz_work has joined the channel [06:07] sriley has joined the channel [06:09] echosystm: SubStack: howcome a connection doesnt have an id immediately after connection? [06:09] echosystm: DNode(function(client, connection) { console.log(connection); }); [06:09] echosystm: is undef [06:10] echosystm: err, connection.id i mean [06:10] echosystm: console.log(connection.id); [06:11] TheEmpath2: connections are verified via a callback [06:11] TheEmpath2: connections take time, and when the computer is done, it will let oyu know at a later time by calling you back [06:11] TheEmpath2: via a callback [06:12] evanmeagher has joined the channel [06:12] echosystm: oh [06:12] TheEmpath2: dunno how dnode works thou [06:12] TheEmpath2: but thats the general theory [06:13] grahamb has joined the channel [06:13] sveimac_ has joined the channel [06:14] derren13 has joined the channel [06:15] sveimac has joined the channel [06:17] TheEmpath2: night, nodites [06:17] SubStack: echosystm: you have to .connect() or .listen() before the constructor you pass to DNode() fires [06:17] SubStack: oh hmm! [06:18] SubStack: what! [06:18] SubStack: ah, conn.id only exists if you .listen() [06:18] SubStack: wait, crap! [06:19] SubStack: ah, it's not defined right away [06:19] SubStack: but you can conn.on('ready', function () {}) [06:19] SubStack: and it'll be defined inside there [06:20] SubStack: but this seems like a bug [06:20] robotarmy has joined the channel [06:21] SubStack: odd, my unit tests check for that [06:23] tpryme has joined the channel [06:23] SubStack: wtf, this is all wrong [06:24] paulrobinson has joined the channel [06:24] tfe1: is persistence.js the going ORM for mysql right now? [06:25] pkrumins: permafrost! but it's not yet finished. [06:25] SubStack: nah permafrost is not a very good fit for mysql [06:26] pkrumins: oh [06:26] MikhX has joined the channel [06:28] SubStack: echosystm: pow, just pushed dnode 0.4.3 [06:28] SubStack: should fix your issue [06:28] SubStack: thanks for the find, that is a pretty serious bug! [06:30] echosystm: cool, i'll give it a suss tomorrow [06:30] echosystm: thanks [06:30] mikeal has joined the channel [06:30] echosystm: home time now! ciao [06:33] sudoer has joined the channel [06:35] pkrumins: ACTION npm install dnode [06:40] tpryme: pkrumins: is permafrost a general purpose orm? [06:40] pkrumins: it's permanent object store [06:40] SubStack: permanent? no [06:40] pkrumins: via js proxies. [06:40] pkrumins: oh [06:40] pkrumins: SubStack knows better [06:40] pkrumins: he wrote it [06:40] SubStack: well it is sort of, but that's not the point of it [06:40] tpryme: pkrumins: lol, ok [06:40] tpryme: pkrumins: asking the wrong person [06:40] SubStack: it's transparent persistence [06:40] tpryme: SubStack: What's permafrost? [06:41] SubStack: with permafrost you just update data structures and the changes are saved to disk automatically [06:41] SubStack: and completely transparently [06:41] SubStack: store.foo.baz.push(5) or whatever [06:41] herbySk has joined the channel [06:42] tpryme: SubStack: I see. What are you guys using it for? Not your primary data store, right? [06:42] SubStack: not using it for anything yet since it has some pretty critical bugs with supermarket [06:42] SubStack: actually supermarket has the bugs and I haven't written adapters for other data stores yet [06:43] SubStack: it might be a pretty good fit for couch [06:43] tpryme: SubStack: what's the current default adapter for supermarket? [06:43] SubStack: supermarket is just a key/value thing that sits on top of sqlite [06:43] SubStack: pkrumins wrote that [06:43] chapel: SubStack [06:44] chapel: why not use chaos [06:44] SubStack: chapel: 'cause I haven't gotten around to it yet! [06:44] chapel: :) [06:44] SubStack: ACTION <-- crazy busy [06:44] chapel: I know [06:44] pkrumins: chaos! [06:44] chapel: and you still have time to help in here [06:44] pkrumins: click. chaos. [06:44] SubStack: well because I always have irc open [06:45] SubStack: it is not the same kind of time investment as writing code [06:45] tpryme: SubStack: Where are you based? Close to pkrumins? [06:45] SubStack: Oakland [06:45] smtlaissezfaire has joined the channel [06:45] SubStack: pkrumins is staying on my couch [06:45] tpryme: SubStack: No way. did not know he was in the area [06:45] tpryme: pkrumins: welcome [06:46] pkrumins: thanks! [06:46] tpryme: pkrumins: How long are you here for? [06:46] pkrumins: 2 months! [06:47] pkrumins: oh [06:47] tpryme: tpryme: nice! I hope it's a comfy couch. [06:47] tpryme: pkrumins: nice! I hope it's a comfy couch [06:47] SubStack: 4 /more/ months, you mean :p [06:47] SubStack: it is a very comfy couch [06:47] SubStack: I found it. [06:47] pkrumins: well i have been here for 2 months, and i'll be here for 4 more! [06:47] pkrumins: like that. [06:47] pkrumins: it's a comfy couch [06:47] pkrumins: i sit on it all day, and sleep all night [06:48] SubStack: also an air matress but the couch is way comfier [06:48] SubStack: ACTION envies the couch [06:48] tpryme: lol [06:48] pkrumins: need another couch [06:48] SubStack: this couch: http://browserling.com/images/sofa.png [06:48] pkrumins: :D [06:48] SubStack: yes, another couch! [06:49] SubStack: but first, need cashflow [06:49] SubStack: unless I find another one [06:49] SubStack: that was so lucky finding that awesome couch [06:50] tpryme: that's one funky couch [06:52] bitdrift has joined the channel [06:53] starfox has joined the channel [06:54] tlrobinson_ has joined the channel [06:55] ryah: pkrumins: you sure - i think it's working in v0.3 [06:55] ryah: (it has to be recompiled) [06:55] tlrobinson_ has joined the channel [06:56] ryah: oh - maybe i didn't do the async tests. [06:56] pkrumins: ryah: do the async [06:56] ryah: ryan@ryan-laptop:.../projects/node-png/tests% node -v [06:56] ryah: v0.3.4-pre [06:56] ryah: ryan@ryan-laptop:.../projects/node-png/tests% node dynamic-png-stack-async.js [06:56] ryah: 4 Jan 22:56:48 - PNG located at (80,386) with width 112 and height 13 [06:57] pkrumins: trying again [06:57] ryah: ryan@ryan-laptop:.../projects/node-png/tests% file dynamic-async.png [06:57] ryah: dynamic-async.png: PNG image, 112 x 13, 8-bit/color RGBA, non-interlaced [06:57] SubStack: pkrumins: node-waf clean maybe? [06:57] pkrumins: maybe [06:58] Jezek has joined the channel [06:58] Jezek: what kind of frameworks do people use [06:58] SubStack: could be versions crossing if you've got 0.2 and 0.3 on the same machine [06:58] dspree has joined the channel [06:58] pkrumins: everything is possible [06:58] SubStack: Jezek: testing frameworks, web frameworks [06:58] Jezek: oh i mean [06:58] Jezek: what are some recommended web frameworks [06:59] SubStack: module would be pretty sweet for setting up 0.2 and 0.3 [06:59] tpryme: Jezek: express [06:59] pkrumins: everything is possible at zombo com. [06:59] SubStack: or I could actually implement hackman one of these days [06:59] muk_mb: express is cool, unless you want to do file uploads, haha [07:00] bitdrift: Jezek: I second express [07:00] pkrumins: bah, it can't find libpng again [07:00] Jezek: people use express for production apps? [07:00] pkrumins: i forgot how i fixed that [07:00] SubStack: pkrumins: you just said CPPFLAGS [07:00] pkrumins: oh right! [07:00] muk_mb: I'm using express for http://appengine.goodwinlabs.com [07:00] EyePulp has joined the channel [07:00] konobi: pkgconfig++ [07:00] v8bot: konobi has given a beer to pkgconfig. pkgconfig now has 1 beers. [07:01] Jezek: what if i need to use oauth [07:01] tpryme: Jezek: yes [07:01] tpryme: Jezek: provide oauth? [07:01] tpryme: Jezek: or consume oauth? [07:01] Jezek: consume [07:01] Jezek: nomnomnom [07:02] tpryme: Jezek: then use connect-auth with express [07:02] tpryme: Jezek: Express is built on connect, so you can drop in any connect middleware [07:02] pkrumins: ryah: crashing for me :( [07:02] pkrumins: $ node png-example-async.js [07:02] Jezek: ok [07:02] pkrumins: Segmentation fault [07:02] pkrumins: ACTION investigates [07:02] pkrumins: with debugging tools, like gdb [07:02] Jezek: will it scale well? [07:02] RockShox: what are some recommendations for rendering engines [07:03] RockShox: im looking at jade and ejs [07:03] tpryme: RockShox: jade [07:03] Jezek: im planning on using mongodb + node.js [07:03] tpryme: Jezek: Yes [07:03] Jezek: + express it looks like [07:03] tpryme: Jezek: Look at mongoose 1.0, which is almost released [07:03] RockShox: im trying to do couch + node + express + jade [07:03] pkrumins: ryah: http://pastebin.com/PK1CAGzh [07:04] SubStack: silly pastebin [07:04] SubStack: gist ftw [07:04] tpryme: RockShox: I prefer jade over ejs [07:04] pkrumins: i am not logged in github all the time -_- [07:04] RockShox: jade is being a whore though [07:04] pkrumins: requires being logged in [07:04] pkrumins: i hate that [07:04] Jezek: what if i want to modify files without the server going down, can i do that [07:04] RockShox: theres something im clearly missing [07:04] tpryme: RockShox: ?? how so? [07:04] SubStack: not logged in! whycome? [07:05] pkrumins: i dont like being logged in [07:05] tpryme: Jezek: You mean hot code? [07:05] jankoprowski has joined the channel [07:05] SubStack: that is a silly reason pkrumins! [07:05] chapel: pkrumins: what irc client do you use? [07:05] tpryme: Jezek: like in erlang? [07:05] RockShox: db.view('user/all', { key: req.params.user }, function(e, r) { [07:05] RockShox: jade.renderFile('post.jade', function(err, html) { [07:05] pkrumins: i always clean my cache and history. [07:05] pkrumins: chapel: irssi [07:05] RockShox: but it says r is not defined [07:05] chapel: oh [07:05] Jezek: i don't know.. i'm just saying maybe i want to add a field to a form or something, etc [07:05] chapel: I have an irc script I made for gists :) [07:05] Jezek: do i have to restart the server for that [07:06] RockShox: am i doing that right? [07:06] tpryme: RockShox: The problem is not with jade [07:06] tpryme: RockShox: The problem would be with view(...) [07:06] RockShox: well r is defined [07:06] tpryme: RockShox: Apparently not [07:06] RockShox: ReferenceError: /home/rox/bookmarks/post.jade:4 [07:06] RockShox: 2. ' - each post in r' [07:06] RockShox: r is not defined undefined [07:07] RockShox: but i can print r with console.log [07:07] tpryme: Jezek: yes, you have to restart. but there are node libraries that auto-restart the server for you in development mode, like in Rails. [07:07] Jezek: i haven't used rails, what do you mean [07:08] tpryme: RockShox: If you're using express [07:08] tpryme: RockShox: You don't have to do jade.renderFile [07:08] tpryme: RockShox: There's an easier way to use jade with express [07:08] Jezek: i guess i should just have a development server where i wont worry about downtime? [07:08] RockShox: i didnt think res.render would work within the db query [07:09] tpryme: Jezek: So if you add a field to your form and save the file, and you have one of these restart modules installed, when you refresh the browser, then you'll see the new field with the form [07:09] tpryme: RockShox: It will [07:09] Jezek: oh nice [07:09] tpryme: RockShox: it works because of js closures [07:09] RockShox: im still struggling to grasp closures [07:10] RockShox: db.view('user/all', { key: req.params.user }, function(e, r) { [07:10] RockShox: res.render('post.jade'); [07:10] RockShox: }); [07:11] RockShox: jade still says r is not defined [07:11] Aria: And how would jade get ahold of r? [07:12] Aria: It's only inside of that function, which only has one line. [07:12] RockShox: thats the part im missing [07:12] RockShox: im assuming jade executes in that scope [07:12] RockShox: because i didnt see any way to pass it data [07:12] Aria: That's a wrong assumption. [07:13] Aria: I imagine there's a greater closure around all this, and THAT might be in the right scope, so variables defined out there would show. [07:13] RockShox: the docs are a little short on examples. could you show me how i ight fix that [07:13] Aria: I don't have context (I don't know jade) [07:13] tpryme: RockShox: [07:13] tpryme: RockShox: You have to pass in r in an extra options hash [07:13] tpryme: RockShox: Read the express documentation [07:14] Aria: But Javascript's scoping is lexical — you can see what things can access a variable. It's only inside the block that defines them. [07:14] tpryme: RockShox: http://expressjs.com/guide.html#View-Rendering [07:14] tpryme: RockShox: See the {locals: ...} object [07:15] tpryme: RockShox: res.render('post [07:15] tpryme: ', {locals: {r: r}}) [07:15] RockShox: interesting [07:15] RockShox: you have to pass it all via locals then [07:15] tpryme: RockShox: Get a good book on javascript, read it over a wknd, and you'll come away with a good understanding of closures, among other things [07:15] tpryme: RockShox: Just like in Rails [07:16] chapel: tpryme: I learned the hard way :) [07:16] RockShox: thanks [07:16] chapel: I've rewritten a script like 4 times because I didn't understand them, now its not as much of an issue [07:17] joelklabo has joined the channel [07:17] tpryme: chapel: I used to be the same way with `this` and context before I took the time to learn js, instead of just using jquery when I needed it [07:17] chapel: yeah [07:17] chapel: this seems pretty clear to me [07:17] evanmeagher has joined the channel [07:17] chapel: once I got closures [07:18] ryah: pkrumins: i think you've not completely cleaned the folder [07:19] ryah: pkrumins: node-waf clean configure build [07:19] ryah: or you have png.node somewhere in your NODE_PATH already [07:19] creationix has joined the channel [07:19] RockShox: res.render('post.jade', { locals: { hi: "test", } }); [07:19] RockShox: ReferenceError: Jade:2 [07:19] RockShox: hi is not defined [07:19] ryah: somehow it's trying to link to your old one [07:19] SamuraiJack has joined the channel [07:20] creationix: hey, how do I translate uid and gid to string names in node? [07:20] creationix: and what's the chance of that working in windows [07:20] ryah: creationix: we don't have bindings for getpwnam() [07:20] creationix: ryah: ok, thanks [07:20] ryah: getpwuid() rather is what is needed [07:20] creationix: ryah: I *think* that's optional in the tar format [07:20] derferman has joined the channel [07:21] creationix: I guess I'll find out [07:21] ryah: i want to add bindings though... [07:21] creationix: yeah, would be nice [07:21] shaver: wonder if you should just do ctypes [07:21] shaver: so you can write the bindings in JS [07:21] ryah: yeah... [07:22] ryah: i've considered bundling libffi [07:22] shaver: we did that [07:22] shaver: it works pretty well [07:22] shaver: some grotty code to write the libffi bindings [07:22] creationix: shaver: where is yours [07:22] creationix: I saw one way back, but it doesn't work now [07:22] shaver: ours is for spidermonkey, not v8 [07:22] creationix: someone had made one for node early on [07:23] ryah: there's a node-ffi [07:23] sveimac has joined the channel [07:23] creationix: it was pretty neat even though generating the config structures was a pain [07:23] ryah: https://github.com/orlandov/node-ffi [07:23] lianj: ffi ftw! [07:23] creationix: nice, it looks like he updated it again [07:24] creationix: does that work on windows too? (assuming the libraries are different there of course) [07:24] cafesofie has joined the channel [07:24] shaver: libffi does [07:24] shaver: at least with the MSVC ABI [07:24] void_ has joined the channel [07:24] creationix: looks like his version only supports osx and linux [07:24] shaver: which I guess is the same [07:24] shaver: yeah, building libffi on windows was a source of adventure, IIRC [07:28] mikedeboer has joined the channel [07:29] mgutz has joined the channel [07:32] skm has joined the channel [07:32] daglees has joined the channel [07:32] fangel has joined the channel [07:33] jsnoob has joined the channel [07:34] skohorn_ has joined the channel [07:35] twoism has joined the channel [07:37] ph^ has joined the channel [07:37] tpryme: pkrumins: SubStack: Are you guys going to be in sf any time soon? [07:38] SubStack: tpryme: we can come over whenever probably [07:38] SubStack: except for next tuesday since we've got a video conference [07:39] tpryme: SubStack: Would love to meet you guys in person and chat over a bite or coffee [07:39] tpryme: SubStack: I'll message you via github to exchange emails [07:40] felixge has joined the channel [07:40] SubStack: busy until the 8th though, got to launch these paid plans already [07:41] pkrumins: i can come after 15th [07:42] pkrumins: on 11th actually we go to mountain view [07:42] pkrumins: we could meet then! we could just hop out in SF [07:42] tpryme: pkrumins: SubStack: Cool, let's figure it out over email. [07:42] pkrumins: sure ok! [07:42] tpryme: SubStack: Just sent you a github msg [07:43] pkrumins: you could come with us to hackers & founders meetup [07:43] pkrumins: it's cool. [07:43] pkrumins: www.hackersandfounders.com [07:46] RockShox: anyone recommend a library for managing user authentication for use with express [07:47] tpryme: RockShox: connect-auth [07:47] tpryme: pkrumins: Yea, I may go to that [07:47] tpryme: RockShox: Comes with facebook connect + twitter oauth support [07:47] RockShox: thanks [07:49] teemow has joined the channel [07:50] dguttman has joined the channel [07:51] case__ has joined the channel [07:53] ph^ has joined the channel [07:53] peutetre has joined the channel [07:54] evl has joined the channel [07:58] evl: What's the easiest way to interface with a database such as couch or sqlite through node.js? My database is mostly comprised of key => complex value, where the biggest table contains about 35k rows, fast key access would be nice [08:00] shaver: node-redis, IMO [08:04] evl: shaver: I'll take a look at that, what about CouchDB? A lot of people seem to think it's easier to start with [08:04] chapel: well couchdb is great [08:04] chapel: but it isn't for speed [08:04] chapel: :) [08:05] chapel: mind you, couchdb itself is fast [08:05] chapel: but it really depends on how you connect to it [08:05] shaver: redis is the easiest software ever [08:05] chapel: there is that [08:05] chapel: :) [08:06] evl: do I need a to run a server for any of these? [08:06] chapel: well [08:06] chapel: for simplicities sake [08:06] chapel: couchdb is simple if you goto couchone.com [08:06] evl: this isn't really going to have large loads at all [08:06] chapel: and sign up for one of their free ones [08:06] shaver: sqlite is easy that way [08:06] evl: it's just the tables might get pretty huge [08:07] evl: yeah the current db is in sqlite [08:10] fjakobs has joined the channel [08:12] crohr has joined the channel [08:18] RockShox: i love sqlite but if youre just storing tuples its kind of a waste [08:21] mAritz has joined the channel [08:22] ezmobius_ has joined the channel [08:23] sveimac_ has joined the channel [08:23] arlolra has joined the channel [08:24] kolor has joined the channel [08:24] sonnym has joined the channel [08:25] ewdafa has joined the channel [08:25] daglees has joined the channel [08:26] desaiu has joined the channel [08:27] mikedeboer has joined the channel [08:28] chapel: evl: if you want simple, get up and go storage, check out node chaos [08:28] chapel: it is a simple file store based solution [08:28] chapel: really simple, works [08:29] Gruni has joined the channel [08:30] Fullmoon has joined the channel [08:33] virtuo has joined the channel [08:34] guid has joined the channel [08:35] sechrist: has anybody written a dns server in nodejs? [08:35] sechrist: that anybody is aware of.. anyway? [08:36] isaqual has joined the channel [08:36] chapel: umm, not that I know of [08:37] chapel: though I would be interested partly [08:37] rjack: does the API page (http://nodejs.org/docs/v0.2.6/api.html) freeze Firefox or it's me? [08:37] chapel: never liked the old api pages [08:37] chapel: it made chrome weird too [08:38] pkrumins: rjack: try it and see - www.browserling.com [08:38] pkrumins: rjack: you can load websites in real browsers on that website. [08:38] MikhX has joined the channel [08:38] rjack: pkrumins: nice, thanks [08:38] pkrumins: yw [08:38] chapel: pimping your own stuff [08:39] pkrumins: hahaha. [08:39] chapel: how uncool [08:39] chapel: :P [08:39] chapel: get back on the couch [08:39] pkrumins: you mean how cool [08:39] pkrumins: i am on the couch man [08:39] chapel: it is pretty cool [08:39] chapel: I sleep on a couch [08:39] chapel: while my bed sits unused [08:39] pkrumins: its not like i do it every day all the time [08:39] pkrumins: this is actually the first time it was appropriate to suggest to use browserling [08:39] micheil: rjack: you can also use the 0.3.0 docs, which have similarities [08:39] pkrumins: :) [08:42] chapel: I know pkrumins [08:42] chapel: just giving you shit [08:43] tlrobinson has joined the channel [08:48] JimBastard has joined the channel [08:49] peritus_ has joined the channel [08:53] creationix: oh yeah, implemented just enough tar for my proof of concept https://github.com/creationix/node-tar [08:53] sveimac has joined the channel [08:54] creationix: now to tackle ar [08:54] mraleph has joined the channel [08:58] devdrinker has joined the channel [09:00] altamic has joined the channel [09:02] dthompson has joined the channel [09:04] devdrinker has joined the channel [09:05] mikeal has joined the channel [09:07] devdrink_ has joined the channel [09:07] evl: chapel: thanks, that will be tried :) [09:08] teemow has joined the channel [09:10] creationix: on second thought, I'll tackle ar tomorrow, one arcane unix file format a day is plenty [09:12] creationix: has anyone made a zlib extension for node? [09:13] pdelgallego has joined the channel [09:14] peritus_ has joined the channel [09:15] richcollins has joined the channel [09:16] pdelgallego has joined the channel [09:16] ryah: creationix: https://github.com/waveto/node-compress [09:16] saschagehlich has joined the channel [09:17] creationix: ryah: is that still active [09:17] creationix: no update for a year according to github [09:17] creationix: and I get compile errors when I try it [09:18] creationix: well, it seems to compile for v0.2.5, must not be 0.3.x compat yet [09:19] devdrinker has joined the channel [09:20] evl: chapel: chaos looks pretty good for what I want, but where can I read up on jset/hset and that other voodoo? [09:22] RichardJ: v8: throw SyntaxError [09:22] v8bot: RichardJ: SyntaxError: undefined [09:22] RichardJ: what? [09:23] RichardJ: v8: throw new Error [09:23] v8bot: RichardJ: Error: [09:23] RichardJ: v8: throw new SyntaxError [09:23] v8bot: RichardJ: SyntaxError: [09:23] RichardJ: hmm, alright [09:23] romainhuet has joined the channel [09:24] creationix: ryah: how hard would it be to make a custom build of node with zlib bindings built-in? [09:24] sveimac has joined the channel [09:26] creationix: v8: (new Error).stack [09:26] v8bot: creationix: at IOWatcher.callback (net:471:53) [09:26] v8bot: creationix: at IOWatcher.callback (net:471:53) [09:26] v8bot: creationix: at IOWatcher.callback (net:471:53) [09:26] v8bot: creationix: at IOWatcher.callback (net:471:53) [09:27] v8bot: creationix: at IOWatcher.callback (net:471:53) [09:27] v8bot: creationix: [Output truncated...] [09:27] creationix: v8: (new Error).stack.split("\n").length [09:27] v8bot: creationix: 1 [09:27] creationix: hmm [09:27] sriley has joined the channel [09:28] creationix: clearly I'm too tired to understand this [09:28] creationix: g;night everyone [09:28] creationix has left the channel [09:36] dsirijus has joined the channel [09:36] yene has joined the channel [09:38] pietern has joined the channel [09:40] SamHasler has joined the channel [09:42] JimBastard has joined the channel [09:42] JimBastard: mape: do you have any idea if there is a real format being used for the irc logs here? i cant figure out the format [09:42] JimBastard: i mean, if its a "real" one [09:42] JimBastard: that i can feed into pisg [09:42] TomY_ has joined the channel [09:43] JimBastard: [16:33] nodelog has joined the channel [16:33] the_undefined: !log [09:43] JimBastard: wtf format is that [09:46] markwubben has joined the channel [09:47] Tim_Smart has joined the channel [09:47] mape: JimBastard: raw output from the client? [09:48] JimBastard: mape: im trying to run the stats through a standard irc log parser [09:48] JimBastard: the format felix picked doesnt seem standard [09:48] JimBastard: also, some of the days are logged as html [09:48] JimBastard: its just messy [09:48] mape: jup [09:48] mape: can't be that hard to parse though, I'm doing it :) [09:48] JimBastard: yeah, you wrote new parsers for it [09:48] JimBastard: great [09:49] mape: write a shim and be done with it? [09:49] chapel: well [09:49] JimBastard: thats what im doing [09:49] chapel: time is usually [00:00:00] [09:49] JimBastard: its just annonying [09:49] JimBastard: why not use a fucking standard format [09:49] romainhuet_ has joined the channel [09:49] chapel: names are and [09:49] mape: ork o bry [09:50] chapel: JimBastard [09:51] JimBastard: yo [09:51] chapel: why not model a new node based stat parser [09:51] chapel: :) [09:51] chapel: could output prettier html [09:52] dspree has joined the channel [09:52] xla has joined the channel [09:53] cafesofie has joined the channel [09:54] gJ|Alex has joined the channel [09:54] sveimac has joined the channel [09:57] chapel: hmm [09:57] chapel: I like not having to see people come and go [09:57] chapel: by ignoring join/parts [09:57] chapel: but it really is annoying when you are talking to someone [09:58] chapel: :( [09:58] chapel: https://gist.github.com/766115 [09:58] chapel: notice the difference to anyone that cares [09:58] chapel: https://gist.github.com/766117 [09:59] chapel: who runs the logger bot? [09:59] bzinger has joined the channel [10:01] romainhuet_ has joined the channel [10:02] viirya has joined the channel [10:06] saikat has joined the channel [10:06] romainhuet has joined the channel [10:08] Tprice has joined the channel [10:10] xSmurf: wtf [10:10] xSmurf: I'm receiving data with a net stream [10:10] xSmurf: receiving a hash, and in the data buffer, all the letters are replaced with 0s [10:10] xSmurf: but all the numberic value are passed consistently [10:10] hellp has joined the channel [10:11] vborja has joined the channel [10:11] chapel: gamma rays? [10:11] Tprice has joined the channel [10:12] stagas has joined the channel [10:12] xSmurf: chapel: more like solar flares I think [10:12] xSmurf: srs wtf [10:13] xSmurf: [10:13] xSmurf: 8ded7c188bd298381d5042a9565825785f3c0ccc [10:13] xSmurf: there's 4 chars of padding, one byte for the length (4) then then hash (the two padding 0s) [10:14] xSmurf: it consistently matches the numbers of the generated hash, every time [10:14] vborja has joined the channel [10:15] chapel: are you talking about the 3 in the way it stored the local handles on the stack [12:22] mraleph: pietern: no problem. I should spot such things faster. [12:22] pietern: this should have failed a lot earlier [12:22] flowlo: micheil: yeah ... but it was a nice gimmick [12:22] pietern: this is why I should use explicit casts less.... [12:22] micheil: flowlo: okay, whatever, but afaic, it looks plain weird. [12:23] pietern: mraleph: big lesson for me as well: when printf changes behavior --> stack corruption [12:23] yene has left the channel [12:24] herbySk has joined the channel [12:25] mraleph: pietern: i was incorrect about local handle though. it corrupts something but no the local handle. looking at the disassembly will explain it but I have no time for it right now. [12:25] evl has joined the channel [12:25] mraleph: in any case using type of right size for index removes the assertion failure [12:26] pietern: you mean that it *can* be used further up the stack without a scope? [12:26] pietern: in any case, thanks a million! [12:27] mraleph: pietern: who can? [12:27] pietern: local handles (re: incorrect about local handle) [12:29] MattDiPasquale has joined the channel [12:29] mraleph: pietern: I said that writing *((void**)&index) = NULL will corrupt local handle, it does not. It seems to corrupt something else. [12:29] pietern: ah, I see [12:30] mraleph: but the cause is definitely a memory corruption. [12:30] pietern: mraleph: looking at the code, it should corrupt the first 4 bytes of the handle though [12:31] pietern: but maybe the c++ orders the stack differently [12:31] pietern: with all its magic [12:31] mraleph: pietern: I also noticed a minor logic error with you handles -> persistent handles, persistent handles -> handles thingy [12:31] mraleph: pietern: it probably does not allocate stack slots for i at all [12:31] mraleph: pietern: keeps it in the register. [12:32] KyleXY has joined the channel [12:32] mraleph: pietern: stack grows down in memory [12:32] m64253 has joined the channel [12:33] pietern: mraleph: what's the error with the persistent <--> local conversion? [12:37] mraleph: pietern: you don't clear handles across Get calls. so if one Get call used both handle[1], handle[2] and returned result, some garbage will stay in handle[1] and handle[2]. now assume next Get invocation does not have enough data inside reader, it will try to persist handle[1] and handle[2] [12:37] mraleph: probabably even without initializing them [12:39] pietern: mraleph: right, thanks for spotting this [12:40] mraleph: pietern: have fun :-) I am going back to work. see ya around. [12:40] pietern: I'm going to do some benchmarks and see if I use persistent handles everywhere instead of the conversion trick it will be speedyer [12:40] pietern: mraleph: again, thanks a million man, you're a lifesaver! [12:41] mraleph: pietern: I just want V8/node.js to be popular. that means I have to help ecosystem grow :-) [12:49] evl: Anyone here coding node.js in TextMate? [12:51] chapel: I do, am looking into vim, but it isn't just a quick switch over [12:52] evl: i managed to solve it now actually, forgot to add NODE_PATH to env [12:52] evl: chapel: you mentioned chaos earlier and it's features contain something called hkeys and jkeys, any idea what that is or where I can read up on it? I've googled but alas nothing came up [12:53] chapel: jkeys are small keys [12:53] chapel: somewhat experimental [12:53] chapel: update only [12:53] chapel: or, not just update, but add to [12:53] chapel: blanking on the right word [12:54] evl: and hkeys are complex values or? [12:54] chapel: hkeys use directories and handle sets of data [12:54] chapel: stagas: wrote chaos [12:55] chapel: he can answer any specific questions [12:55] chapel: but just so you know [12:55] evl: okay, thanks ) [12:55] chapel: you can write whatever you want to a chaos db key [12:55] chapel: I write json [12:55] chapel: so a key could contain a large json object [12:56] evl: I see [12:57] stagas: evl: hkeys are like sets of keys, hkey -> field -> value jkeys are append only json, like node-dirty but distributed in many files and not loaded in memory, usually faster for small values [12:58] unomi has joined the channel [12:58] stagas: it's very similar to redis, but you can't query it, it's store and retrieve only [12:58] flowlo1 has joined the channel [12:59] evl: yes, my needs exactly [12:59] evl: except i have some 30k keys, that might be a problem with the number of inodes? [12:59] stagas: should be ok [13:01] chapel: I think you have something with chaos stagas, trying to get SubStack to use it with permafrost [13:02] stagas: what do you mean? [13:02] chapel: well he is using supermarket or whatever [13:02] chapel: and supermarket has bugs [13:02] evl: stagas: I can't store complex data with hset right? [13:03] adambeynon has joined the channel [13:03] stagas: evl: you can, just the field value should be filename safe chars, it's still a utf8 value, store whatever [13:03] evl: i tried something like this: db.hset('users', 'someone', {bar: 'foo'}, function(err) { [13:04] stagas: JSON.stringify({bar: 'foo'}) [13:04] evl: got it, it treats everything as a string :) [13:04] stagas: yeap [13:05] d0k has joined the channel [13:05] okuryu has joined the channel [13:06] stagas: db.hgetall('users', function(err, userdata) {}) to get all users with their values [13:06] stagas: :) [13:06] evl: coolio :=) [13:06] evl: so I should generally use hset if I need more complex sets [13:07] stagas: sets of stuff yeap [13:09] mbrochh has joined the channel [13:12] stagas: if it had a memory cache on top it would be redis v2.4 in reverse [13:12] stagas: :P [13:13] KyleXY has joined the channel [13:13] siong1987 has joined the channel [13:14] chapel: well get on it :) [13:15] meandi has joined the channel [13:17] stagas: and a repl and a net interface [13:17] stagas: :P [13:18] c4milo1 has joined the channel [13:19] hornairs has joined the channel [13:19] prettyrobots has joined the channel [13:24] piscisaureus has joined the channel [13:25] piscisaureus: v8bot: require [13:25] v8bot: piscisaureus: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [13:25] piscisaureus: v commands [13:25] augustl has joined the channel [13:25] piscisaureus: v8: commands [13:25] v8bot: piscisaureus: ReferenceError: commands is not defined [13:26] piscisaureus: v8: require [13:26] v8bot: piscisaureus: ReferenceError: require is not defined [13:28] mischievious has joined the channel [13:30] unomi has joined the channel [13:30] unomi has joined the channel [13:30] paulrobinson has joined the channel [13:32] mischief__ has joined the channel [13:33] mischievious has joined the channel [13:35] mfernest has joined the channel [13:36] mischief has joined the channel [13:36] Druid_ has joined the channel [13:40] hornairs has joined the channel [13:42] tjholowaychuk has joined the channel [13:47] funkatron has joined the channel [13:49] leepa_ has joined the channel [13:51] Gruni has joined the channel [13:51] fumanchu182 has joined the channel [13:55] Ari-Ugwu has joined the channel [13:56] flowlo1 has left the channel [13:57] arpegius has joined the channel [13:59] KrisJordan has joined the channel [13:59] mischief has joined the channel [14:00] sivy has joined the channel [14:04] Garo_ has joined the channel [14:04] alathon has joined the channel [14:04] Garo_: I have a complex object which contains Date objects. serializing it with JSON.stringify makes it a string but how can I deserialzie it back to a complex object which contains the same Date objects? [14:06] ianward has joined the channel [14:06] SamHasler has joined the channel [14:07] evl: can anyone recommend a higher level http library for node that handles redirects etc? [14:08] tjholowaychuk: evl: npm install request [14:08] tjholowaychuk: i believe [14:10] Sembiance: hehe [14:19] stagas: Garo_: you have to parse them again with new Date(string) [14:20] amacleod has joined the channel [14:21] chapel: v8: JSON.stringify(Date.now()); [14:21] v8bot: chapel: "1294237263555" [14:21] tanepiper: yea, request is a good HTTP lib [14:23] MattJ has joined the channel [14:23] evl: Hmms only one shortcoming, it doesn't store the resulting url after you get redirected a bunch of times, hacking! [14:24] RichardJ: v8: JSON.stringify(+new Date()) [14:24] v8bot: RichardJ: "1294237442345" [14:24] RichardJ: or without the parentheses [14:24] RichardJ: v8: JSON.stringify(+new Date) [14:24] v8bot: RichardJ: "1294237456441" [14:24] Sembiance: v8: good morning [14:24] v8bot: Sembiance: SyntaxError: Unexpected identifier [14:24] Sembiance: v8: "good morning" [14:24] v8bot: Sembiance: "good morning" [14:24] Sembiance: aww, thanks v8bot :) [14:24] davidsklar has joined the channel [14:24] RichardJ: how nice of him :) [14:25] beta_ has joined the channel [14:26] chapel: v8: throw Error(" Sembiance has too many good mornings") [14:26] v8bot: chapel: Error: Sembiance has too many good mornings [14:26] Garo_: :) [14:26] RichardJ: v8: throw "yeah, totally" [14:26] v8bot: RichardJ: undefined: undefined [14:26] RichardJ: bah :) [14:27] RichardJ: v8: throw {"": "yeah, totally"} [14:27] v8bot: RichardJ: undefined: undefined [14:27] RichardJ: ah yes, forgot about that [14:27] Garo_: stagas: chapel: yeah, i was thinking about a recursive function which would convert them over, but im hoping that there would be a better way [14:28] RichardJ: v8: throw {name: '', message: 'hah'} [14:28] v8bot: RichardJ: : hah [14:28] RichardJ: v8: throw {name: '(', message: 'hah'} [14:28] v8bot: RichardJ: (: hah [14:28] Sembiance: hehe [14:28] RichardJ: the list goes on :) [14:28] RichardJ: v8: throw {name: 'o', message: ' really?'} [14:28] v8bot: RichardJ: o: really? [14:28] Garo_: v8: JSON.parse("new Date()"); [14:28] v8bot: Garo_: SyntaxError: Unexpected token ILLEGAL [14:29] Garo_: v8: JSON.parse("[new Date()]"); [14:29] v8bot: Garo_: SyntaxError: Unexpected token ILLEGAL [14:29] Garo_: crap, that doesnt work [14:29] RichardJ: no, that's not supported [14:30] RichardJ: http://json.org/ <- you can find the complete syntax there [14:30] chapel: v8: throw {name: 'D', message: 'WAT??!'} [14:30] v8bot: chapel: D: WAT??! [14:30] RichardJ: http://www.ietf.org/rfc/rfc4627.txt <- and that's the RFC [14:31] RichardJ: v8: throw {name: 'd', message: ''} [14:31] v8bot: RichardJ: d: [14:31] roaet has joined the channel [14:31] roaet: hello. [14:31] Garo_: yeah well the S in json stands for Simple... [14:31] RichardJ: Garo_: no it doesn't [14:31] dbrock has joined the channel [14:31] RichardJ: JavaScript Object Notation [14:32] RichardJ: the S is for Script in JavaScript :) [14:32] roaet: I'm unfamiliar with node.js but before I spend time learning it I have a simple question. Is it possible for the script to have state? Such as, client X connects and I have history and a running state of client X until disconnect? [14:32] RichardJ: roaet: yes. [14:32] roaet: I know node.js is event driven, so I am concerned that it will not be able to assist me without some sort of database or file. [14:33] dbrock: is there a standard way to deal with circular dependencies of modules? [14:33] Garo_: oh youre right [14:34] evl: is MD5 hashing built in or do I need a module`? [14:34] Garo_: it doesnt have to be json, just any serialization will suffice if it works [14:34] roaet: RichardJ: I can have state of multiple clients and possible interactions? And, if it off the top of your head, could you tell me which portion of the Docs i should look under? [14:35] dbrock: what I mean my circular dependencies of modules is that module A does require("b") and module B does require("a") [14:35] evl: roaet: i've written a multi user chat/tadpole swimming thingy that you might want to take a peek at: https://github.com/sbrekken/Rumpetroll/blob/node/node/server.js [14:36] roaet: tadpole swimming. Curious. [14:36] leepa has joined the channel [14:37] RichardJ: evl: yes, exactly like that [14:37] leepa has joined the channel [14:37] RichardJ: but it'd be even better to save the state in local variables [14:38] roaet: evl: is there a demo of this? [14:38] roaet: evl: nevermind.. just found it [14:38] kolor has joined the channel [14:39] roaet: evl: it's cute :) [14:40] evl: thanks thanks, it was mostly a canvas experiment [14:41] ajpiano has joined the channel [14:41] roaet: evl: so multiple people can swim around and the server updates their positioning? [14:41] evl: yeah [14:41] evl: we had about 2000 concurrent at a point [14:42] roaet: oh this is exciting [14:42] roaet: was that you? [14:42] evl: yeah [14:43] davglass has joined the channel [14:43] roaet: ah that's happy [14:45] herbySk74 has joined the channel [14:46] cferris has joined the channel [14:46] hornairs has joined the channel [14:49] aheckmann has joined the channel [14:49] rsms has joined the channel [14:50] andrewfff has joined the channel [14:51] litenjacob has joined the channel [14:53] lightharut has joined the channel [14:53] jetienne: evl: md5 is in by default [14:53] alathon: evl: That looks pretty cool [14:56] jetienne: evl: nice impression of volume with the stars [14:56] evl: people have hacked it to bits [14:56] evl: in fun ways [14:56] evl: like follow mods, speed hacks, formation swimming, games [14:56] chrischris has joined the channel [14:57] litenjacob: Hey folks! I'm about to make a word game in node, and would love some input on the setup of the wordlist. The wordlist itself is ~12mb in plaintext and the game will be hosted on no.de. I only need pure hash lookups to se if an inputted word is valid. How to store the wordlist? nStore, redis, mysql or what? When I import it into node as an object, node peaks at 250mb which might be too much for no.de :S [14:58] evl: litenjacob: i'm trying out chaos atm, looks really good for that kind of stuff [14:58] Sembiance: evl: I had seen your tadpole thing before, it's neat ;) [14:59] litenjacob: evl: thx! Didn't know about that - checking it out now :) [14:59] stepheneb has joined the channel [15:01] creationix has joined the channel [15:01] Connorhd has joined the channel [15:02] chrischris has joined the channel [15:02] aho has joined the channel [15:03] davidascher has joined the channel [15:06] litenjacob: evl: Is it correct that chaos stores every record in separate files? Since the wordlist is ~1m rows, that might make an unhappy filesystem. Or how would you do it? [15:08] stagas: litenjacob: you can try jkeys, jset and jget it's good if you have a lot of small values [15:09] thinkingpotato has joined the channel [15:10] slaskis has joined the channel [15:10] litenjacob: evl: oh. thx again! :) [15:12] alathon: Anyone who can link to something related to designing transparent RPC calls in JS? [15:12] void_ has joined the channel [15:16] tilgovi has joined the channel [15:17] jpiche has joined the channel [15:19] akahn has joined the channel [15:23] jakehow has joined the channel [15:23] masahiroh has joined the channel [15:23] beta_ has joined the channel [15:24] ttpva has joined the channel [15:25] crohr has joined the channel [15:26] garrensmith has joined the channel [15:26] garrensmith: hi all [15:26] davidascher has joined the channel [15:26] garrensmith: does anyone know if you can embed straight html into jade? [15:28] tjholowaychuk: garrensmith: not really no [15:28] tjholowaychuk: you can do a single line of html [15:28] tjholowaychuk: if it's indented properly [15:28] tjholowaychuk: or you can place html in the text blocks [15:28] Aria has joined the channel [15:28] garrensmith: tjholowaychuk damn, I want to use videojs (www.videojs.com) but converting it to jade is quite tricky [15:29] tjholowaychuk: chuck it in a text block or something [15:29] tjholowaychuk: what is the markup? [15:29] garrensmith: whats the best way of serving video on a page? [15:29] garrensmith: tjholowaychuk: see http://videojs.com/#getting-started [15:29] tjholowaychuk: ah I see [15:29] tjholowaychuk: yeah try just using a text block [15:30] tjholowaychuk: im sure I can support raw html though, maybe open an issue I will see what I can do when I ave some time [15:30] garrensmith: would be cool to do a filter like :html -> and then renders all the html... [15:30] tjholowaychuk: looks like a cool lib [15:30] garrensmith: yeah it looks great how would I use a text block? [15:31] tjholowaychuk: | foo\n| bar [15:31] ceej has joined the channel [15:31] davidascher has joined the channel [15:31] garrensmith: ok cool let me try thanks [15:31] tjholowaychuk: just do a column select before that html and insert | [15:33] garrensmith: tjholowaychuk: text block works great awesome thanks [15:34] tjholowaychuk: np [15:34] garrensmith: maybe chat to you later would you be keen on a :html filter to do raw html? [15:34] tjholowaychuk: I can probably do it without a filter, I dont think it will clash with the grammar [15:34] garrensmith: tjholowaychuk: ok cool [15:35] qnt4b has joined the channel [15:35] jchris has joined the channel [15:36] booths has joined the channel [15:37] leepa has joined the channel [15:40] booths: anyone familiar with node_mailer [15:40] softdrink has joined the channel [15:40] beawesomeinstead has joined the channel [15:40] beawesomeinstead has joined the channel [15:41] matt_c has joined the channel [15:42] cronopio has joined the channel [15:45] Kryckan has joined the channel [15:45] softdrink: http://twitter.com/#!/jussil/status/22670429118267392 [15:46] dspree: I'm giving away some beta invites for Duostack, my company that does Node PaaS... if anyone's interested, please msg me :) [15:47] unomi has joined the channel [15:48] jherdman has joined the channel [15:48] tapwater has joined the channel [15:49] tanepiper: go on then :) [15:49] mischief has joined the channel [15:50] KrisJordan has joined the channel [15:50] alek_br has joined the channel [15:50] mischief has joined the channel [15:53] kriskowal has joined the channel [15:56] shinmei has joined the channel [15:57] matt_c_ has joined the channel [15:57] charlenopires has joined the channel [15:57] gakusei has joined the channel [15:57] perezd has joined the channel [15:58] booths: Are there any known issues w/ node_mailer sending without authentication on an internal network? [15:59] bingomanatee_ has joined the channel [16:00] bingomanatee_: Morning noders [16:00] GarrettS-MSFT has joined the channel [16:00] GarrettS-MSFT has joined the channel [16:00] gakusei: I have a question regarding exports. When I want to use existing Javascript code in node I have to scatter them with "exports." and "require('..')" statements. Is there a way around it? [16:01] cronopio: booths: check https://github.com/weaver/node-mail its really easy setup with google accounts [16:01] tjholowaychuk: gakusei: you can still require() them and use the globals [16:01] joelklabo has joined the channel [16:01] tjholowaychuk: if you really need to [16:01] bingomanatee_: gakusei: while modules are self-sufficient by design there is a workaround. ... what TJ said [16:02] booths: cronopio: Alright, I'll give it a try. It's all internal emails though, no google. [16:02] bartmax has joined the channel [16:02] bartmax has joined the channel [16:02] gakusei: tjholowaychuk: could you please make this a little more explicit? [16:03] tjholowaychuk: gakusei: if you have say jquery.js you can still require('jquery') and use the globals [16:03] tjholowaychuk: instead of exports [16:03] cronopio: booths: its seem with node-mail you can't use without auth [16:03] tjholowaychuk: bad example since jquery will break, but still [16:03] gakusei: tjholowaychuk: var a = require('./a'), [16:03] gakusei: sys = require('sys'); [16:04] booths: cronopio: Yeah, which may be the problem with node_mailer too... It's saying it connects and not throwing an error, but no email is actually recieved. [16:04] gakusei: exports.func_b = function () { [16:04] gakusei: a.func_a(); [16:04] gakusei: sys.print('Hello from b\n'); [16:04] gakusei: } [16:04] gakusei: tjholowaychuk: lets say I want to use func_a() is this what you mean when you say globals? [16:04] bingomanatee_: OFF TOPIC - anyone have a good visio-like wireframe tool for Linux? [16:05] bentruyman has joined the channel [16:07] gakusei: tjholowaychuk: do I have to switch on globals in node, it seems not to work on my machine? [16:07] bingomanatee_: gakusei - its core [16:07] zomgbie has joined the channel [16:08] bingomanatee_: try write a module with only one line : globals.foo = "bar" [16:08] tjholowaychuk: i dont think you need globals. [16:08] tjholowaychuk: only if you use that context-per-module thing [16:08] bingomanatee_: write a second module that requires the first module then console.log(foo); [16:09] gakusei: bingomanatee_: I can not see the benefit of exchanging "exports." with "globals.". I still have to modify all code [16:10] tjholowaychuk: gakusei: I dont think you have to [16:11] Yuffster has joined the channel [16:12] hornairs has joined the channel [16:13] gakusei: tjholowaychuk: I had the same hopes when I stared out with node. I guess this is node specific? The underlying V8 does not have the problem? [16:13] tjholowaychuk: gakusei: there should not be a problem :s I have done it [16:13] tjholowaychuk: quite a few times [16:14] litenjacob has joined the channel [16:14] gakusei: tjholowaychuk: ok, I will try again [16:14] matt_c has joined the channel [16:14] femtoo has joined the channel [16:14] tjholowaychuk: node does/did have some kind of option to lock each module to its own global scope [16:14] tjholowaychuk: im not sure what happened to that [16:14] tjholowaychuk: s/scope/context/ [16:14] bingomanatee_: That sounds like a corruption of the concept of global. [16:15] bingomanatee_: I mean what't the point? anything you put in a module is "global" to that module anyway. [16:15] mikew3c_ has joined the channel [16:16] bingomanatee_: o/" Don't go changing... your Namespaces.... o/" [16:16] heavysixer has joined the channel [16:17] froots has joined the channel [16:18] JusticeFries has joined the channel [16:18] HAITI has joined the channel [16:18] HAITI has joined the channel [16:19] bingomanatee_: I mean, at least not until you've changed the NPM INSTALLER TO WORK WITHOUT BITCHING AT YOU [16:19] bingomanatee_: ahem [16:25] m64253 has joined the channel [16:25] meandi2 has joined the channel [16:26] slaskis has joined the channel [16:26] slaskis: tjholowaychuk: could i use tobi for scraping an external webpage? [16:26] dguttman has joined the channel [16:26] gakusei: tjholowaychuk: global works now with a simple example \o/ but stillnode.js:63 [16:26] gakusei: throw e; [16:26] gakusei: ^ [16:26] gakusei: ReferenceError: classCreate is not defined [16:26] gakusei: at Object. (/home/mark/devel/SeleniumFullSpeed/se_on_node/core/scripts/selenium-testrunner.js:23:22) [16:26] gakusei: at Module._compile (node.js:462:23) [16:26] gakusei: at Module._loadScriptSync (node.js:469:10) [16:26] gakusei: at Module.loadSync (node.js:338:12) [16:26] tjholowaychuk: slaskis: not really, you misewell just use jsdom straight-up for that [16:26] gakusei: at loadModule (node.js:283:14) [16:26] gakusei: at require (node.js:411:14) [16:26] gakusei: at Object. (/home/mark/devel/SeleniumFullSpeed/se_on_node/se_on_node_v3.js:43:27) [16:26] gakusei: at Module._compile (node.js:462:23) [16:26] tjholowaychuk: durr [16:26] gakusei: at Module._loadScriptSync (node.js:469:10) [16:26] gakusei: at Module.loadSync (node.js:338:12) [16:27] tjholowaychuk: dont do that [16:27] tjholowaychuk: lol [16:27] gakusei: Does this mean there is another problem [16:27] daniellindsley has joined the channel [16:27] slaskis: tjholowaychuk: allright, it just looked so convenient to login with [16:27] tjholowaychuk: slaskis: true yeah with some tweaking you could [16:28] tjholowaychuk: right now it accepts the server instance so it can track things but yeah that is possible [16:28] slaskis: tjholowaychuk: i guess some kind of proxy could be written? [16:28] tjholowaychuk: nah just would have to issue requests to the host instead of loopback [16:29] aro has joined the channel [16:29] oal has joined the channel [16:29] aro: how do i set a cookie within nodejs? [16:29] tjholowaychuk: maybe new Browser('mysite.com') [16:29] jakehow has joined the channel [16:30] tjholowaychuk: new node version manager (because we dont have enough already :p ) - http://bit.ly/f3kl58 [16:30] EyePulp has joined the channel [16:30] EyePulp: yo ho ho [16:31] omni5cience has joined the channel [16:31] aro: has anyone used AjaxIM using nodejs? - i also have a question about that :) [16:31] slaskis: tjholowaychuk: yeah, looks like it's hard coded to 127.0.0.1? [16:31] tjholowaychuk: slaskis: yeah [16:31] EyePulp: So I saw a bunch of references yesterday to require.registerExtension('.js') but couldn't figure out it's implication - what's it meant to do? [16:31] tjholowaychuk: speed [16:31] tjholowaychuk: EyePulp: that was me [16:32] tjholowaychuk: it means you can instrument your library with say profiling or debugging, with no overhead [16:32] slaskis: tjholowaychuk: will it keep the a session within the Browser instance? [16:32] tjholowaychuk: no function calls, only when the file containing that registerExtension call are the comments replaced [16:32] tjholowaychuk: by the code [16:33] EyePulp: tjholowaychuk: I almost follow that. I read your gist [16:33] tjholowaychuk: slaskis: yeah I have a cookie jar implemented [16:33] tjholowaychuk: EyePulp: its a little hard to explain, but for example I have a redis lib with //debug: console.log(state) etc [16:33] slaskis: brilliant [16:33] tjholowaychuk: and when I pass { debug: true } [16:33] tjholowaychuk: it require('./debug') which has that extension, so anything require()d after will replace //debug: with the code following it [16:34] tjholowaychuk: so no overhead for " if (debug) dosomething()" [16:34] tjholowaychuk: :) [16:34] tjholowaychuk: and I instrument //start: parse //end: parse which get swapped with console.time[End]() [16:34] EyePulp: tjholowaychuk: is that the primary goal of registerExtension? I mean are you just finding a better use for something more mundane? [16:34] tjholowaychuk: EyePulp: oh, no that is just a weird use-case [16:35] EyePulp: *just* <-- it's a pretty good use [16:35] tjholowaychuk: you can use it to compile .coffee to coffeescript etc [16:35] tjholowaychuk: or .js to alter the js [16:35] tjholowaychuk: which is pretty rad / powerful [16:35] dahankzter has joined the channel [16:35] tjholowaychuk: kinda scary [16:35] tjholowaychuk: haha [16:35] EyePulp: I see - your overriding or appending an event to do when requiring files of specific extensions [16:36] tjholowaychuk: yeah [16:36] tjholowaychuk: overriding, kinda sucks you cant layer them [16:36] tjholowaychuk: but i guess that is not the intention [16:36] sth: jsdom is enough to make a grown man cry :x [16:37] dylang has joined the channel [16:38] dthompson has joined the channel [16:38] sprout has joined the channel [16:40] squeek has joined the channel [16:41] teddy_ has joined the channel [16:41] aro: anyone know if you can do that? [16:42] Aria: Do what? [16:43] jessica-m has joined the channel [16:43] proppy has joined the channel [16:43] jessica-m: damnit [16:43] Aria: You don't say! [16:43] paulrobinson has joined the channel [16:43] Aria: "Do what?" [16:44] squeek: Is there a recommended package on npm for configuration file parse/writing? Or is it better to just use a file with a lot of JSON in it? [16:44] herbySk has joined the channel [16:45] case__: squeek, json is good for you [16:45] case__: (in doubt, use json) [16:45] jpld has joined the channel [16:46] squeek: JSON is horrible for configuration files since you can't embed comments iirc. At least with YAML, Windows ini style, apache style you can explain things. [16:46] Aria: {comment: "This is neat stuff."} [16:46] case__: Aria, +1 [16:47] tjholowaychuk: json would be a lot nicer if you didnt have to quote keys [16:47] tjholowaychuk: for config files [16:47] kkaefer: non-quoted keys++ [16:47] Aria: Yeah, but 'cest la vie. [16:48] case__: squeek, or up to you to strip //.*\n before giving it to JSON.parse ... [16:48] jetienne: case__: non trivial to do tho [16:49] squeek: more to the point, the format of choice for configuration files should just support commenting. sysadmins like leaving comments, notes etc. [16:49] jetienne: or you rewrite JSON.parse [16:49] jetienne: squeek: agreed. but json is everywhere [16:49] case__: squeek, { "#" : "here be comments" } [16:50] jetienne: squeek: you could use xml if you want. there is comment :) [16:50] case__: oh god, xml... [16:50] hornairs has joined the channel [16:50] bingomanatee_: why not go ini baby ... BLA.BLA.BLA!!!!! [16:50] squeek: sorry, using XML for configuration is like using a cannon on a mosquito. [16:50] jetienne: ini is readable [16:51] squeek: ini is far more human parseable than json, for sure. [16:51] boaz has joined the channel [16:51] jetienne: https://github.com/shockie/node-iniparser [16:51] jetienne: json is readable ok [16:51] bingomanatee_: squeek: yeah, it really is a good way to deal with them pesky varmints [16:51] jetienne: but no comment is a pain i agree [16:51] jetienne: i dont have a better alternative than json tho [16:52] booths: Stupid Question: How do I post data via http.createClient [16:52] bingomanatee_: squeek: My coworker is fond of saying, "XML is like violence. If its not working for you its because you're not using enough of it. " [16:52] jetienne: xml never works :) [16:52] squeek: I can think of more convoluted and stupid formats. That's not to say I think XML is ever the best option. [16:53] strmpnk has joined the channel [16:53] bingomanatee_: It's "Mature". [16:53] case__: bingomanatee, and like everything mature, i won't have sex with it [16:53] jetienne: squeek: eval('var conf = {}'); could support comment [16:53] bingomanatee_: like Wilford Brimley [16:53] jetienne: squeek: thinking about it. write the config file in javascript instead of json [16:54] tjholowaychuk: did node 0.2.x have raw mode? [16:54] tanepiper: if you can't read JSON, you shouldn't be doing javascript :p [16:54] case__: jetienne, +1, module.exports = { your config file here... } [16:54] jetienne: squeek: js got comment [16:54] bingomanatee_: well "Mature" packages have at least one big plus and one big liability: You get guaranteed results. [16:54] bingomanatee_: And you are guaranteed to hate them. [16:55] Aria has left the channel [16:55] jetienne: case__: module.exports is a good idea too [16:55] squeek: tanepiper: by that reason, if you don't know anything about fixing cars, you should never drive one. What if I want to just get from A<->B? [16:55] case__: your config file is just another module, no quotes, comment, everything [16:56] tjholowaychuk: yeah that is what i do as well usually [16:56] case__: and you can trap errors. [16:57] sriley has left the channel [16:57] squeek: Also I see lots of udp4 support in dgram, does it support udp6? [16:57] jetienne: btw when you require() a file, it is cached. But is the cache invalidated if the file is modified on disk ? [16:57] shaver: no [16:57] jetienne: shaver: ok [16:58] eric_f has joined the channel [16:58] springmeyer has joined the channel [16:59] bingomanatee_: Personally I like the "literal" nature of ini files - you never have to guess scope. [16:59] unomi has joined the channel [16:59] tjholowaychuk: yeah i dont mind ini files either [16:59] tjholowaychuk: kinda nice [17:00] arpegius has joined the channel [17:00] briznad has joined the channel [17:01] siong1987 has joined the channel [17:01] Max-Might has joined the channel [17:01] robotarmy has joined the channel [17:01] shaver: they're easier to parse incrementally, too [17:02] mape: Best mongob out there? [17:03] mape: or well, module :) [17:05] stagas: mape: dunno really but I'm hearing a lot of mongoose [17:05] gakusei: is a port of prototype.js available for node.js? I could not find one on google [17:05] mape: Isn't that ORM kinda thingymadoo? [17:05] stagas: yeap [17:05] mape: stagas: I just want something.. That is fast, fast is what I really need [17:06] gakusei: mape: redis [17:06] mape: gakusei: need to be able to do some finding of things [17:07] mape: not get 1.3million objects from redis and regex check if things match [17:07] gakusei: mape: I think they call it matching [17:07] mape: gakusei: With regex? [17:07] alathon has joined the channel [17:08] hobodave has joined the channel [17:08] gakusei: mape: yes, I guess so [17:08] bingomanatee_: mape: I'd look at redis, mongodb, and couchdb [17:08] bingomanatee_: both redis and mongodb are memory resident putting them in the nigh-on unbeatable realm for speed [17:08] mape: bingomanatee_: yeah that is why I'm looking at mongodb [17:08] BillyBreen has joined the channel [17:08] mape: gakusei: Guess so? [17:09] bingomanatee_: MongoDB has some sharding and replication features that give you very fast scaling - that being said if you don't see your store growing bigger than one server's worth of crap then MongoDB is in some ways neck and neck with other noSQL. [17:09] mape: gakusei: Isn't redis centred around finding keys? And then doing group thingys to them? [17:09] creationix has joined the channel [17:09] bingomanatee_: CouchDB gives you transactions and automatic archiving as it doesn' t overwrite data but appends them to a history stream by default. [17:10] gakusei: mape: if you need real queries you have to go relational [17:10] slaskis has joined the channel [17:10] bingomanatee_: Also its worth considering what SQL does have as you decide to give it up - as Gakusei is saying, if you want a totally nondeterministic graph, SQL is still your best bet. [17:10] benburkert has joined the channel [17:10] gakusei: mape: in this situation couchdb might be of little help since you have to compile your queries first [17:10] Thorn has joined the channel [17:11] bingomanatee_: However its worth considering a hybrid wherein you use SQL as your system of record, and store aggregate data in a noSQL like Mongo/Redis/Couch. [17:11] tbeseda has joined the channel [17:11] gakusei: mape: sqlite3 might also be a candidate but I do not know if there is a node interface jet [17:11] bingomanatee_: mape: what kind of business/data model are you constructing here? [17:11] mape: gakusei: sqlite? 1.3 million records? regex match? [17:12] mape: bingomanatee_: analytics, clicks, getting x,y based on time and path with is url split on / [17:12] slaskis: what does this error mean? Error: EAFNOSUPPORT, Address family not supported by protocol family [17:12] dguttman has joined the channel [17:12] mape: Find clicks that are between x and y and contains z path [17:12] bingomanatee_: mape: Yeah that is kind of a noSQLy space. [17:13] bingomanatee_: NoSQL are comfortable in the billion record zone [17:13] bingomanatee_: Also with MongoDB you can easily shard by date, meaning you do a lot of writing to one small repo while map/reduce searching all of them. [17:13] mape: bingomanatee_: Yeah, that is why I'm thinking mongo, since it seems faster then couch (even though people treat it like the devil) [17:13] bingomanatee_: For instance I am logging mail with MongoDB and its quite fast. [17:13] gakusei: anybody on prototype.js? [17:14] mape: gakusei: Why use prototype? What is there is useful? [17:14] mape: *in [17:14] bingomanatee_: I presonally have invested in Mongo deeply. The fact is that it gives you a very comprehensible JSON model of data to work with, and you can index, shard, replicate and even store large hunks of binary in seperate stores all out of the box. [17:15] gakusei: mape: unfortunately I am not greenfield and I do not want to rewrite everything [17:15] bingomanatee_: If you go that route feel free to tap me when you hit a wall - also at bingomanatee@me.com [17:15] mape: bingomanatee_: Awsome, don't hang around irc much? [17:16] bingomanatee_: way too much. [17:16] bingomanatee_: mongo channel as well sometimes. [17:16] bingomanatee_: but this is where I'm investing my energy. [17:16] mape: Hehe, k, so what module are you using for mong? [17:16] isaacs has joined the channel [17:17] bingomanatee_: I am using the core cristkov for extraction. I was using PHP - in fact I have a full fledged Mongo ORM in PHP on google code - but until mongoose pops its head above the ground christkv is the only game in town [17:17] lightharut has joined the channel [17:17] mape: So no mongodb action? [17:17] mape: On node that is [17:18] bingomanatee_: oh no - chritskv is good - at least good enough - [17:18] ph^ has joined the channel [17:18] herbySk has joined the channel [17:18] noahcampbell has joined the channel [17:18] mape: great how I google cristkov and get the log of this channel >_< [17:18] bingomanatee_: I mean yoiu can do all basic CRUD with it and send striaght commands to the db -- haven't hit a wall I jsut find its way of doing things kind of difficult for me [17:19] bingomanatee_: but keep in mind that I am still getting my head around callback centric coding in any context so its probably subjective. [17:19] mape: Oh [17:19] bingomanatee_: github christkv - or christkv [17:20] mape: Well it makes sense so yeah.. Welcome to node :) [17:20] litenjacob has joined the channel [17:20] bingomanatee_: One caveat that confused me at first - there is a "make" command to make the christkv modue -- however its not NECESSARY to make it [17:20] bingomanatee_: tape me back when you are there and I'll explain more. [17:20] mape: Aww, no npm :/ [17:20] ph^ has joined the channel [17:20] bingomanatee_: yeah . ha. [17:22] qFox has joined the channel [17:23] mape: Owell, added my second ticket for adding things to npm [17:23] mape: hope it works out well [17:23] isaacs: mape: oh? [17:24] cafesofie has joined the channel [17:24] msekimura has joined the channel [17:25] dsirijus has joined the channel [17:25] mape: isaacs: Fo sure, first one turned out shite.. [17:25] mape: isaacs: so if you do npm ls uglify you see my dirty work [17:26] mgutz: @squeek I have a rails-like settings module using javascript. Returns environment based on $NODE_ENV. config example: https://gist.github.com/766621 [17:26] mape: Asked the dude to add it to npm, he had a working package.json and all, then some other dude added it twice.. but never updates it [17:26] eric_f has joined the channel [17:26] ezmobius has joined the channel [17:26] mape: So I added it to make deployment easier with a suffix.. which I guess is really shitty, but yeah, It works [17:26] mape: And there is no "this is old, let me fix things" npm command [17:26] isaacs: mape: yeah, that's not a great situation [17:27] isaacs: mape: well, there's "npm owner add" [17:27] isaacs: mape: is "uglify" or "uglify-js" the newest? [17:27] mape: isaacs: That the dude that doesn't respond to issues, added it twice and doesn't update own? [17:27] jamesarosen has joined the channel [17:27] mape: isaacs: the unofficial one, that has my name.. ;) [17:28] mape: isaacs: The other two are 2 months old [17:28] isaacs: mape: right, but i mean, if i were to delete yours, and one of the others, and then add you as an owner, which one should end up remaining? [17:28] mape: And he added the uglify-js one since the owner didn't like uglify [17:28] isaacs: ?? [17:29] isaacs: "the owner didn't like uglify"? [17:29] mape: isaacs: Oh, well, I guess uglify-js ends up being "offical" since the creator of the module wanted that name but doesn't update it [17:29] isaacs: ah, i see [17:29] isaacs: well, this sort of thing has happened before. it's not particularly hard to resolve usually. [17:30] mape: As long as the module owner doesn't care and I don't add things to the code I guess it works [17:30] mape: But seems like that isn't an awsome generic fix [17:31] sth: Anyone know of anything like jsdom that works well? [17:31] mape: sth: What doesn't work? [17:31] sth: Apparently, parsing docs. [17:31] mape: sth: Which doc? [17:31] sth: https://developer.mozilla.org/en/DOM/element [17:32] sprout has joined the channel [17:32] mape: isaacs: So how bad of an idea is this, add a github account that isn't on npm, has a package.json and that is croned to update [17:32] jakehow has joined the channel [17:34] nonnikcam has joined the channel [17:36] mape: isaacs: So yeah, that is worse then my download count idea? :P [17:36] wilken has joined the channel [17:36] isaacs: well, there's that npm-github-hook thing [17:36] isaacs: are you trying to work out a way to automatically send the version to npm when the code changes? [17:39] mape: isaacs: Not so much my packages, I keep em up to day like a neat little thing on a plane. More the people that don't care much about npm but still update it on github but forget to update it. [17:39] aconbere has joined the channel [17:39] sriley has joined the channel [17:39] xSmurf: mroing nodites [17:39] tjholowaychuk: isaacs: I dont really need this right now, but was curious. say I have 2.0 support 0.3.x and 1.0 support 0.2.x if I npm install foo with 0.2.x will it fallback to the older compatible version? or just complain about the node --version? [17:39] mape: And that was suppose to be date.. Spoiled bad joke :( [17:40] Sembiance: creationix++ [17:40] v8bot: Sembiance has given a beer to creationix. creationix now has 1 beers. [17:40] isaacs: tjholowaychuk: npm install is smart about engine versions. [17:40] isaacs: tjholowaychuk: it'll only consider packages that match the engine version. [17:40] tjholowaychuk: isaacs: sweet :D [17:40] tjholowaychuk: sounds good [17:40] isaacs: tjholowaychuk: now, if you do `npm install express@2.0.0` and you're on node 2.x, then it'l fail [17:40] isaacs: of course [17:41] pquerna: any noders in san antonio? [17:41] isaacs: mape: for that situation, i'm afraid i don't have any great solution. so far the way around that has been for someone else (sometimes me) to maintain a fork, and update npm for them. [17:41] wilken has joined the channel [17:41] lightharut: I have installed node.js on windows, but it can't resolve DNS nameservers. Is there some file on windows 7 where I can put this information? [17:42] isaacs: lightharut: you using cygwin? [17:42] eee_c has joined the channel [17:42] lightharut: no [17:43] lightharut: there was direct installer. [17:43] antares_ has joined the channel [17:43] isaacs: lightharut: ah. yeah, see, that's an issue at the moment. cares uses /etc/resolv.conf, and i don't know where/if that file exists on regular windows [17:43] isaacs: lightharut: on cygwin, it's at /etc/resolv.conf [17:43] isaacs: lightharut: https://github.com/ry/node/wiki/Building-node.js-on-Cygwin-(Windows) [17:44] sivy has joined the channel [17:44] mape: isaacs: So about the download thingy, your main issue with it was gaming no? [17:44] lightharut: isaacs:thanks. [17:45] antares_ has joined the channel [17:45] xSmurf: MattJ: you around? Could I bug you some more? Trying to implement proxy support and getting some oddities again ;/ [17:45] isaacs: mape: well, a little, but it's also more complicated than it seems. [17:45] MattJ: xSmurf: I'm here, a little busy at the moment [17:45] MattJ: PM me or ask in jdev [17:45] svnlto has left the channel [17:45] MattJ: I'll answer when I can [17:46] xSmurf: oki, well I'll do some more tests first if all else fails I might pm you some pastie :] [17:46] mape: isaacs: Seems like the one person thing I want added to github is a count of how many people cloned my projects. If I have a project I would rather see that 0 issues with 300 clones is good then 0 issue that could mean no one cares. Is it that hard (keeping it to the official repo) to keep a personal install count? [17:46] yozlet has joined the channel [17:47] xSmurf: mape: I like the idea [17:47] svenlito has joined the channel [17:47] xSmurf: makes sense [17:47] mape: *personal [17:47] isaacs: mape: well, i mean, it'd mean that i have to write on every read [17:48] mape: isaacs: Well node is fast no? And it can't be that big off an issue? [17:48] isaacs: mape: which, i'm not sure if couchdb can do, write a record in a show function. another alternative would be have npm "phone home" when you install something, which is problematic from a security/privacy pov [17:49] xSmurf: isaacs: cache the writes to memcached and batch write them once in a while? [17:49] xSmurf: it's not like it would be a big loss if some data is lost [17:49] isaacs: xSmurf: right, so, the write would have to be done by the npm client [17:50] mape: isaacs: well there is no privacy issue if it is just install count? [17:50] isaacs: xSmurf: it's not network latency i'm worried about [17:50] isaacs: mape: so says you :) [17:50] xSmurf: right [17:50] isaacs: mape: what about when you install a url or a tarball? should it phone home then, too? [17:51] mape: isaacs: nope, just registered [17:51] softdrink: does anyone know what "DOM Breakpoints" are in the WebKit Inspector? [17:51] isaacs: mape: ok, what if you just do `npm cache add foo@version` [17:51] mape: isaacs: nope [17:51] isaacs: mape: that'd phone home too, then? [17:51] mape: just and only npm install [17:52] isaacs: yeah, i don't like it. [17:53] isaacs: i mean, it's not so bad for your use case, but there are others. we install things from a registry at joyent, via a script. sending pings back to that registry would be extra complexity and io that isn't needed. [17:53] alathon: Anyone around a JS ninja? ^^ [17:53] isaacs: this is something that should be done via a plugin once npm has plugins [17:53] mikeal has joined the channel [17:53] unomi has joined the channel [17:53] isaacs: and someone else should maintain the installation count data in a different db, and the code, and everything should be completely opt-in and out of my hands. [17:54] zemanel has joined the channel [17:54] mape: isaacs: Well then it makes no sense. But yeah, nm. Just think people adding packages on npm would care more if they knew there were actual people using it [17:54] devdrink_ has joined the channel [17:55] sudoer has joined the channel [17:55] isaacs: mape: an explicit "I use this" option might be better. [17:55] isaacs: mape: like, log into the registry, click a little vote-up button or something [17:56] isaacs: and then have it show the list of registered users who use it [17:56] spetrea_ has joined the channel [17:57] shaver: yeah [17:57] shaver: you really care about "who thinks it works well", not "who installed it and found that it didn't work and didn't bother to remove it" [17:57] sechrist has joined the channel [17:58] mape: shaver: Those people file an issue [17:58] shaver: not universally, I assure you [17:58] mape: They don't download it, it doesn't work and they just don't use it [17:58] isaacs: mape: a "i use this" button wouldbe closer to your fork count [17:59] hornairs has joined the channel [17:59] mape: Jup, and fork count doesn't mean anything [17:59] isaacs: a download count would also track non-users, and if someone installs it multiple times on multiple servers, it'd count them multiple times. [17:59] mape: isaacs: Wouldn't matter, it is an general analytics count [18:00] SubStack: I like the "I use this" way [18:00] mape: SubStack: Isn't that watch on github? [18:01] mape: But that is like a facebook like [18:01] TooTallNate has joined the channel [18:01] SubStack: mape: not everyone who watches a github repo uses the code [18:01] TobiasFar has joined the channel [18:01] mape: You think, aww neat, "Awsome node.js talk from ryah that is awsome", click like, then check it and it ends up being a redirect to the ruby page.. And then you do what? [18:02] mape: SubStack: That is what I'm saying :) [18:02] SubStack: but "I use this" would be more explicitly about who uses what [18:02] mape: For sure, if every user of npm cared [18:02] Me1000 has joined the channel [18:03] mape: Most just use npm since it is easy, which is the point. [18:03] mape: So you end up with a low % taking the time to vote [18:03] isaacs: mape: if there was a web endpoint to say "i use this" then we could script it with an npm command, or even have a hook to have install do that automatically [18:03] slaskis has joined the channel [18:03] isaacs: mape: a low percentage taking the time to vote is fine. it's a relative number. [18:03] davidascher has joined the channel [18:03] kriszyp has joined the channel [18:03] SubStack: github probably over-reports anyhow [18:03] isaacs: one repo has 5, the other has 50, you know which one is more important. [18:04] SubStack: so take both figures in combination and that'll give you a good idea [18:04] SubStack: yeah also relative use [18:04] mape: isaacs: Which means nothing unless I know the % of people voting [18:04] isaacs: mape: if you need an absolute number, sure, but you don't. [18:04] elijah-mbp has joined the channel [18:04] isaacs: you just need to know relative to yours and other packages. [18:04] mape: isaacs: Well that depends on the spread [18:04] SubStack: ah yeah, to choose between packages [18:04] isaacs: is your goal to inform action, or to boost your ego" [18:05] isaacs: ?? [18:05] isaacs: if it's to inform action, then a relative number is enough. [18:05] slaskis: tjholowaychuk: strange, the jquery instance i get from Browser seems to loose its context in an $("p").each(function(){this is document all the time}) [18:05] SubStack: to answer questions like "what is the most popular web framework" [18:05] kolor has joined the channel [18:05] isaacs: if it's to boost your ego, then you jjust need more votes than the next guy, so a relative number is still fine :) [18:05] sechrist has joined the channel [18:05] SubStack: to help people who don't want to take so much time to decide which one to start with [18:05] slaskis: mape: is there a reason why you use jsdom.jQuerify? [18:05] isaacs: again, just sorting by votes would be fine. [18:05] slaskis: in node-scraper [18:05] isaacs: SubStack: ^ [18:05] mape: isaacs: I want to know how many people use my package, so I can use that in relations to issues on github so I know if I'm having issues or if people are just not using it [18:06] mape: Or random other service that shows engagement is some way or another [18:06] tjholowaychuk: slaskis: hmm that is odd [18:07] mape: slaskis: Any reason I shouldn't? [18:07] iszak has joined the channel [18:07] KyleXY has joined the channel [18:08] gkatsev_ has joined the channel [18:08] slaskis: mape: i don't know, i'm suspecting it's the difference between tjs browser and your scraper, which makes it work [18:08] mape: slaskis: Huh? And what difference is that? [18:09] mape: SubStack: The thing is that I don't care about other packages, I want to know how many people downloaded my package to reference it to other things. [18:09] shaver: http logs from the npm service, post-processed? [18:09] shaver: like, awstats or something should be enough [18:10] twoism has joined the channel [18:10] isaacs: shaver: those are in couchone's posession. i don't keep or look at them [18:10] stephank has joined the channel [18:10] shaver: fair enough [18:11] slaskis: mape: well, Browser uses jsdom like this: https://github.com/LearnBoost/tobi/blob/master/lib/browser.js#L74 as compared to https://github.com/mape/node-scraper/blob/master/lib/scraper.js#L56 and seems to loose context [18:11] springmeyer: anyone know why process.platform returns 'PLATFORM' with node 0.3.3? Bug, intended? [18:11] springmeyer: (this is on osx) [18:12] mape: slaskis: And the difference cause? [18:12] tjholowaychuk: slaskis: this.context is what everything is applied to [18:12] tjholowaychuk: and is passed to the callbacks as $ [18:13] tjholowaychuk: so you can have scoped blocks to operate on a specific form etc [18:14] ph^ has joined the channel [18:14] funkatron has joined the channel [18:14] slaskis: sorry, i'm probably not making any sense. but the problem i'm having is basically that when using node-scraper and running $("p").each() in the callback 'this' is each p (as it should be) while with Browser 'this' in the callback always seems to go back to the document. [18:14] sivy has joined the channel [18:14] Tidwell has joined the channel [18:15] slaskis: and jsdom.jQueryify was the main difference i saw in the two implementations [18:15] tjholowaychuk: ohh [18:15] mape: slaskis: If anything you should look at https://github.com/mape/node-scraper/blob/master/lib/scraper.js#L57 and tell me how bad that is for performance :) [18:15] slaskis: but, i'm rewriting Browser to as scraper now instead so it could be something i've messed up as well [18:16] hornairs has joined the channel [18:16] xSmurf: anyone very familiar with SOCKS5? Trying to implement XMPP S5B (XEP-0065) [18:16] tjholowaychuk: slaskis: let me know if it's a tobi bug, I dont have any tests using each() [18:16] slaskis: mape: haha, yeah that's loading jquery from code.jquery.come everytime? [18:16] tjholowaychuk: could be a jsdom thing [18:16] tjholowaychuk: i dunno [18:16] xSmurf: hi hornairs, nice to see fellow mtlers ;) [18:17] slaskis: tjholowaychuk: will do [18:17] Phyllio has joined the channel [18:17] hornairs: xSmurf indeed! im at mcgill so im not a true native [18:17] mape: slaskis: nope, but it parses the content once just to find the body so jsdom doesn't break, and inserts it and then parses it again to pass @ [18:17] mape: *$ [18:17] xSmurf: hornairs: hahaha well said :P [18:17] mape: Worked find before but it broke jsdom in later updates so I had to change it [18:18] xSmurf: this is the code btw http://pastie.textmate.org/private/33wnt4tyitidbezfnygq and one thing I cannot figure out is why the data buffer matches the hash, but only the numerical values [18:18] slaskis: tjholowaychuk: changing to jQueryify seems to have got it working again [18:18] tjholowaychuk: slaskis: weird [18:18] mape: guess the adding * within jsdom breaks things [18:18] pvormittag has joined the channel [18:18] slaskis: tjholowaychuk: also, using jsdom like that does not work anymore (probably an update to jsdom?) [18:18] devdrinker has joined the channel [18:18] tjholowaychuk: dunno [18:18] tjholowaychuk: jsdom == fail [18:19] mape: tjholowaychuk: Hey, don't be stepping on people. Fork and fix :) [18:19] tjholowaychuk: neat idea, but I think its a little to early to actually use haha [18:19] slaskis: https://github.com/LearnBoost/tobi/blob/master/lib/browser.js#L74 should simply be jsdom.createWindow(wrap(html)) [18:19] dguttman has joined the channel [18:19] tjholowaychuk: ah api change, k cool [18:19] tjholowaychuk: mape: if it was important I would [18:20] tjholowaychuk: but its not a huge issue right now [18:20] slaskis: jsdom is really powerful stuff though [18:20] mape: tjholowaychuk: So creating a dom in node isn't an big issue? ;) [18:20] mgutz has left the channel [18:20] tjholowaychuk: mape: us barely needing it right now :p [18:20] tjholowaychuk: is what I meant [18:21] tjholowaychuk: priorities! :D [18:21] mape: tjholowaychuk: Hehe k [18:21] stride: hey guys :) [18:21] mape: tjholowaychuk: but yeah, my shitty wrapper got almost 50% of the watchers of node-canvas which is a ton more work. So people really want it. [18:22] tjholowaychuk: wrapper? [18:22] tjholowaychuk: node-canvas doesnt have to many watchers [18:22] mape: Despite smashing magazine twittering it to 313k peeps with the wrong spelling :P [18:22] tjholowaychuk: hahha [18:22] tjholowaychuk: node-scraper or whatever? [18:22] slaskis: yay, so now my tobi browser works as a scraper [18:23] mape: tjholowaychuk: Yeah, all node-scraper does is wrap other peoples awsome work in 80 or so lines [18:23] tjholowaychuk: hahha [18:23] tjholowaychuk: sweet [18:23] mape: Hehe, guess people like easy APIs, guess that is a lesson if anything [18:23] CrypticSwarm has joined the channel [18:23] slaskis: it's great for scraping a website with login [18:23] stride: https://github.com/tautologistics/node-htmlparser is that any good as a lightweight alternative to jsdom (I just need a forgiving parser that results in a DOM / structure I can query for stuff) [18:23] yene has joined the channel [18:23] davidwalsh has joined the channel [18:24] mape: Guess it is the mcdonalds of modules [18:24] mape: slaskis: Whichone? [18:24] slaskis: stride: don't they do different things? [18:25] slaskis: mape: the tobi browser, as it keeps a session and has the fill() api which is very convenient [18:25] mape: slaskis: Ah yeah [18:25] slaskis: hmm, actually i couldn't get the fill thing to work, it didn't submit anything [18:26] mape: In the end it is all jsdom :) That is the project that needs more eyes [18:26] tjholowaychuk: its to slow to do anything real with [18:26] tjholowaychuk: aside from scraping [18:26] mape: Mostly for performance, and after that making it fork for really really bad pages [18:26] slaskis: agreed [18:26] tjholowaychuk: which would probably be faster with nokogiri [18:26] tjholowaychuk: well would be [18:27] mape: tjholowaychuk: Yeah, I totally want scraping to be slow so that is awsome.. :P [18:27] stride: slaskis: jsdom does more stuff and offers a client-like API and stuff I guess. not really what I need :) that's why I asked [18:28] mape: tjholowaychuk: (What happened to tj?) Scraping a site with 2k sites takes time. So faster jsdom is neat :) [18:28] tjholowaychuk: dunno haha. yeah having it faster would help alot [18:28] tjholowaychuk: tobi/zombie == super slow thanks to jsdom/htmlparser [18:28] mape: Then don't be hating! :) [18:29] tjholowaychuk: im not hating lol just saying its not ready [18:29] mape: And still, whatup with the long nick? :P [18:29] tjholowaychuk: like I had thought/hoped [18:29] tjholowaychuk: i didnt register tj its used i guess [18:29] mape: Aww :( [18:29] tjholowaychuk: lameeeEE [18:29] ph^_ has joined the channel [18:30] tfe1 has joined the channel [18:30] mape: tjholowaychuk: Yeah, there are rules for the internetz, a nick with more then 6 chars is bad, and if those chars have [zq0-9] that is bad [18:30] fil`wrok has joined the channel [18:30] mape: If I started a company that would probly be in the description :P [18:30] tjholowaychuk: haha [18:30] fil`wrok has left the channel [18:31] mape: tjholowaychuk: I would totally not hire you, unless you paid for beer ;D [18:31] nook has joined the channel [18:31] mape: Although the parrots? would help <3 [18:31] altamic has joined the channel [18:32] ph^ has joined the channel [18:32] mape: tjholowaychuk: Btw how does that work? Are they free to walk or just chill in the cage? [18:32] stride: how forgiving is jsdom currently? can it handle HTML that was written in the late 90s? :) [18:33] mape: slaskis: I've thrown some shitty sites at it and it seems to work fine now, earlier I had to exec tidy html on it [18:33] tjholowaychuk: mape: I dont have a parrot :p I have 4 ferrets [18:33] tjholowaychuk: used to have a bird [18:33] previsuals has joined the channel [18:34] mape: tjholowaychuk: Oh yeah, sorry, toby the ferret. Just remembered the bird sound from a screencast and assumed :( [18:34] yene has left the channel [18:34] mape: tjholowaychuk: But yeah, so how are ferrets? House trained awsome? Or more like mice? [18:34] tjholowaychuk: ahaha nope we gave the canary to some lady that really lieks them. ferrets are really smart actually, they go on puppy training pads haha [18:34] meandi has joined the channel [18:34] tjholowaychuk: but they mess up anything they can reach [18:36] mape: tjholowaychuk: hehe k, but ferrets are more like dogs? cats? random wild animals? [18:36] previsuals has left the channel [18:36] aguynamedben has joined the channel [18:37] tjholowaychuk: probably more like cats, they are pretty independant [18:37] tjholowaychuk: we have a blind cat lol, our fat baby ferret was jumping on him last night [18:37] montylounge has joined the channel [18:37] mape: house trained? [18:37] tjholowaychuk: i need a camera [18:38] mape: tjholowaychuk: don't you have them mac? [18:38] jtoy has joined the channel [18:40] previsuals has joined the channel [18:40] tjholowaychuk: drudge: can you step through pane things via keys? [18:40] Sembiance: tjholowaychuk++ [18:40] v8bot: Sembiance has given a beer to tjholowaychuk. tjholowaychuk now has 6 beers. [18:40] tjholowaychuk: I dont use a mouse :( [18:41] meandi2 has joined the channel [18:41] gkatsev: tjholowaychuk: what browser do you use? [18:42] tjholowaychuk: chrome [18:42] ph^ has joined the channel [18:42] gkatsev: ah, ff has vimperator & pentadactyl for mouseless vim-like browsing goodness. [18:42] tjholowaychuk: im just talking about linkinus [18:43] gkatsev: yeah, but with that you don't need the mouse ever [18:43] ecto has joined the channel [18:43] ecto: hey all [18:43] gkatsev: well, almost [18:43] tjholowaychuk: i dont really use the pad at all [18:43] ecto: have a question [18:44] tjholowaychuk: ecto whats up [18:45] ecto: I'm scraping my local jail website every hour with node and throwing it in redis, then I have a page with a slider that runs through all of them. How can I monetize this idea? [18:45] tjholowaychuk: oh [18:45] tjholowaychuk: haha [18:45] tjholowaychuk: wrong type of question [18:45] tjholowaychuk: for me at least [18:45] ecto: also, in a general sense, how can I make the scraper more resilient? It relies on a set of rules specifically for the page [18:46] ecto: which may change with their whims [18:46] tjholowaychuk: i dont monetize things, unfortunately lol [18:46] ecto: i figured haha [18:47] ecto: #startups are all arguing with each other so I figured I would come here [18:47] ph^_ has joined the channel [18:48] ecto: I was just let go from my software job, this is my most complete idea so I thought I should roll with it :) [18:48] EyePulp: ecto - let people pay remove their name from the list, or pay to put someone onto the list. [18:49] tjholowaychuk: i dont really get it though lol a jail? wtf [18:49] joelklabo has joined the channel [18:49] tjholowaychuk: build me a better site to *borrow* movies from [18:50] statik has joined the channel [18:50] ecto: EyePulp: I feel like that would cross some legal boundaries? [18:50] EyePulp: ecto: your market for potential interest is *extremely* limited, mostly by the very specific nature of what you're storing. Unless your jail covers a *huge* geographic area. [18:51] jakehow has joined the channel [18:51] ph^_ has joined the channel [18:51] tjholowaychuk: you can plot them on google maps [18:51] tjholowaychuk: haha [18:51] tjholowaychuk: jk [18:51] Sembiance: v8: 0.1 + 0.2 [18:51] v8bot: Sembiance: 0.30000000000000004 [18:51] boaz has joined the channel [18:51] ecto: That's a really good point [18:51] EyePulp: ecto: start storing jail data from lots of jails, from lots of areas, and as tj said, mash it up on maps, and then you start to get more general interest. [18:51] tjholowaychuk: build a really good global public transit system app and sell it to google [18:52] tjholowaychuk: i bus, its a PITA to figure shit out [18:52] tjholowaychuk: then sell it to every city on the planet [18:52] EyePulp: Maybe start to normalize the crime data a bit, too (or the alleged crimes) [18:52] boaz has joined the channel [18:52] ecto: That's what I was aiming for [18:53] ecto: I'm going to start visualizing the data after I accumulate enough [18:53] broofa has joined the channel [18:53] ecto: I've been looking for a good project to use that new canvas graph library on haha [18:54] stride: Error connecting to server http://registry.npmjs.org/ <- does npm need anything special to run in cygwin? [18:54] jchris has joined the channel [18:54] ecto: My only problem with expanding to different areas is the terrible markup.. If there was some way to make an adaptive scraper it would be much easier [18:55] stride: hm. nvm [18:55] EyePulp: ecto: if you don't have a product people want to buy, build something that pulls in the eyeballs and put adwords on the site. Your product becomes the interesting thing you show, and you're exchanging that for visits and possibly adwords revenue. Otherwise, build something people want to pay for. [18:55] mape: ecto: What do you solve? [18:56] KrisJordan has joined the channel [18:56] richcollins has joined the channel [18:57] EyePulp: ecto: node probably isn't the right hammer for this nail. There are a lot of better (read older and more robust) html parsers already built in other languages. [18:57] ecto: mape: What do you mean? [18:57] drudge: tjholowaychuk: yes [18:57] mape: ecto: Why would I pay you for your service? I don't really care [18:57] drudge: cmd-shift-up / cmd-shift-down [18:58] tjholowaychuk: drudge: wahoo! awesome thanks [18:58] drudge: tjholowaychuk: there are lots of keyboard shortcuts if you look at the View menu [18:59] tjholowaychuk: drudge: haha sweet, added cmd-k so I can stop spelling /clear wrong haha [18:59] tjholowaychuk: rad [18:59] ecto: ecto: I'm basically archiving the inmates in the local jail. Once the official page updates, there's nowhere to see previous bookings. Also the mugshots in my area are pretty funny [19:00] ecto: I meant mape, still haven't had my coffee [19:00] drudge: tjholowaychuk: you can actually assign any command a keyboard shortcut under preferences > aliases & s shortcuts [19:00] tjholowaychuk: i did :) [19:00] drudge: ha cool :D [19:00] drudge: tjholowaychuk: also try cmd-1 :) [19:00] mape: ecto: So yeah, why would I ever pay for that? [19:01] tjholowaychuk: drudge: ah cool [19:01] drudge: it toggles, you can switch the pane with tab [19:02] tjholowaychuk: drudge: i broke it [19:02] tjholowaychuk: haha [19:02] tjholowaychuk: somehow [19:02] drudge: how so [19:02] ecto: mape: I was hoping not to have a paywall but look for other unique income streams. The traffic is so localized I probably wouldn't make money from text ads. I was thinking about going to bail bondsmen and seeing if they want to advertise. Otherwise I may just link it off to my portfolio for the traffic [19:02] tjholowaychuk: not sure haha [19:02] tjholowaychuk: its all good now, jsut crashed it [19:03] drudge: :-o send me the log please [19:03] briznad1 has joined the channel [19:03] Me1000 has joined the channel [19:04] tjholowaychuk: drudge: didnt get one, it hung so I `kill -KILL`d it [19:04] creationix has joined the channel [19:04] mape: ecto: Well it is niche, question is just finding people with case in that niche. Bondsmen might be a good idea (if they want to spend cache) but yeah. Hard to make a profit unless you have a clear set of users or a sales person that is really great. [19:07] ecto: You are gentlemen and scholars. I bid you adieu [19:08] mape: ecto: take care [19:08] ecto has left the channel [19:08] zomgbie has joined the channel [19:09] sechrist has joined the channel [19:11] Aria has joined the channel [19:11] antares_ has joined the channel [19:11] garrensmith has joined the channel [19:12] ossareh has joined the channel [19:12] montylounge has joined the channel [19:14] V1_ has joined the channel [19:15] cafesofie has joined the channel [19:15] richcollins has joined the channel [19:16] ceej_ has joined the channel [19:17] vineyard has joined the channel [19:18] aconbere has joined the channel [19:18] joelklabo has joined the channel [19:22] isaacs: piscisaureus: hey [19:22] isaacs: piscisaureus: this seems to break some stuff: https://github.com/ry/node/commit/fe804d9b [19:23] isaacs: piscisaureus: in particular, if you just do `node`, it'll glom it onto the cwd, which it should only do if there's a / somewhere in there. [19:23] tomhsx has joined the channel [19:24] podman has joined the channel [19:24] langworthy has joined the channel [19:25] podman has left the channel [19:25] podman has joined the channel [19:26] funkatron has joined the channel [19:27] podman has left the channel [19:27] CIA-121: node: 03Bert Belder 07master * r9ddfcfe 10/ (lib/path.js test/simple/test-path.js): Remove keepBlanks flag from path functions - http://bit.ly/gDzf16 [19:27] CIA-121: node: 03Bert Belder 07master * raf15b4e 10/ lib/url.js : [19:27] CIA-121: node: Remove path module dependency from url module [19:27] CIA-121: node: Now the path module can be adapted to support windows paths without breaking [19:27] CIA-121: node: the url module. It also allows the undocumented keepBlanks flag to be [19:27] CIA-121: node: removed from path.join and path.normalizeArray. - http://bit.ly/fkWgRA [19:31] hornairs has joined the channel [19:37] d_low has joined the channel [19:38] cnus8n has joined the channel [19:39] augustl has joined the channel [19:42] webr3 has joined the channel [19:42] jpiche has joined the channel [19:44] dthompson has joined the channel [19:44] mraleph has joined the channel [19:45] HAITI has left the channel [19:45] elux has joined the channel [19:46] elux has joined the channel [19:46] ryah: so i want to rename net.Stream to net.Socket [19:46] ryah: objections can be filed in the next 30 seconds. [19:46] ryah: ACTION looks at his watch [19:47] Aria: Please, do it. [19:48] elux: crazy [19:48] elux: so many people in here [19:48] Kryckan: looks like it's going to be renamed [19:48] elux: does anyone here use node.js in production? [19:48] BillyBreen has joined the channel [19:48] garrensmith: ryah whats the advantage of renaming it? [19:49] pquerna: 100% incompat api upgrade between 0.2 and 0.3 [19:49] ryah: :) [19:49] pquerna: oh, advantage, right :) [19:49] garrensmith: lol [19:49] ryah: i'll leave the existing name [19:49] Aria: Aw. [19:49] pquerna: its not a socket though [19:49] ryah: because there is stream.Stream [19:49] pquerna: sockets can be streams [19:49] wilken has joined the channel [19:49] pquerna: or datagrams [19:49] pquerna: anyways [19:49] ryah: pquerna: yeah. [19:50] ryah: that's why it wasn't named that before [19:50] pquerna: but now its okay.. because its.. wednesday [19:50] ryah: and i get your reason to want net to be named stream too - but - well [19:50] ryah: that's to hard to change [19:50] ryah: too [19:51] eddanger has joined the channel [19:53] teemow has joined the channel [19:55] V1: That will be a... painfull upgrade path if you rename it. [19:55] ryah: just renaming the docs - no worries [19:56] CIA-121: node: 03Ryan Dahl 07master * rb62152b 10/ (doc/api/net.markdown lib/net.js): Rename net.Stream to net.Socket - http://bit.ly/gSFxMu [19:56] CIA-121: node: 03Ryan Dahl 07master * r4e108ef 10/ doc/api/net.markdown : Remove legacy TLS api from docs - http://bit.ly/gIFl8z [19:57] bingomanatee_ has joined the channel [19:59] CIA-121: node: 03Ryan Dahl 07master * rbb7bf58 10/ TODO : Update TODO items - http://bit.ly/fRbtGr [20:01] stride: hm.. google is so weird at times.. node-actors: "Did you mean: nude-actors?" [20:01] alexandere has joined the channel [20:01] mjr_ has joined the channel [20:02] femtooo has joined the channel [20:02] BillyBreen: i'm sure that query is made far more often than node actors (since iirc google would ignore the '-' unless the whole search was in quotes) [20:03] comster has joined the channel [20:06] briznad has joined the channel [20:06] mjr_: isaacs: have you seen this "Maximum call stack size exceeded" thing before? https://gist.github.com/766921 [20:06] isaacs: mjr_: wowzers [20:07] mjr_: It's only on one machine so far. [20:07] mjr_: "so far" [20:07] mjr_: How ominous [20:07] isaacs: indeed [20:07] isaacs: works for e [20:07] mjr_: Should I remove all of npm's things and start over, or this useful for you to look into? [20:08] isaacs: try `npm cache clean` and try again? [20:08] mjr_: work [20:08] mjr_: s [20:08] mjr_: wtf? [20:08] isaacs: mjr_: the last i ever saw that, it happened when the "latest" dist-tag was missing [20:08] isaacs: mjr_: so it'd say "i don't have a version, let's install pcap@latest", then there was no latest, so that resolved to pcap@, and then it sayd "i don't have a version..." [20:09] mjr_: hmm [20:09] isaacs: btw. it'd be REALLY FREAKING NICE if call stack errors would show you at least *some* of teh call stck [20:09] isaacs: maybe even, like, the last point where it gave up [20:09] mjr_: heh, yeah [20:09] mjr_: too large, great. Why? [20:09] isaacs: like, i KNOW you have the call stack [20:10] isaacs: because you know it was too big [20:10] isaacs: give it to me [20:10] mjr_: All you have is call stack [20:10] isaacs: right [20:10] mraleph: it's a bit hard to do anything when you learned that you callstack is too deep --- can't call anything in that state [20:10] jchris has joined the channel [20:10] mjr_: OK, well that sucked. Dunno that there's much else we can do now. Something is the cache was making npm sad. [20:11] piscisaureus: isaacs: windows detection landed already, though I'm not sure whether it is usable at that point in node.js [20:11] piscisaureus: https://github.com/ry/node/commit/9e31e0837ec3c5a88ed477bec3980dd4608046be [20:11] admc has joined the channel [20:11] isaacs: piscisaureus: ah, nice [20:11] isaacs: piscisaureus: lemme see if i can roll back my non-fix-bandaid and then do something that preserves the intent for both windows and posix [20:11] cferris has joined the channel [20:12] mjr_: mraleph: I'm sure it is actually hard. It would be really handy to even know the name of even the last function you were in when it bailed. [20:12] mraleph: yeah. I agree with you. [20:12] robotarmy has joined the channel [20:12] mjr_: hey, so you fixed pietern's redis thing then? [20:12] mraleph: yeah i fixed something [20:13] mraleph: there was stack corruption in his code on x64 [20:13] piscisaureus: isaacs: great. btw I'm trying to move to path.resolve kind of thing and keep the windows/posix differences wrt to path handling in path.js [20:13] piscisaureus: isaacs: though a temporary bandaid is good because I don't like breaking npm [20:14] isaacs: nice [20:14] piscisaureus: isaacs: but in the end npm should work on windows too [20:14] piscisaureus: isaacs: not that it can be done already. stdio is still borked [20:15] amerine has joined the channel [20:16] mjr_: mraleph: oh, interesting. Glad you figured it out. [20:18] dgathright has joined the channel [20:18] mraleph: mjr_: if you want to know what is causing stack overflow you can throw it into the gdb and set breakpoint in Runtime_StackOverflow. [20:18] mjr_: oh, cool [20:19] mjr_: That's really great to know. [20:19] maushu has joined the channel [20:20] mraleph: then you have either to decode stack manually or use gdbjit branch to see javascript symbols in backtrace. [20:21] mraleph: there are actually some other places where stackoverflow can happen (e.g. in js parser) which do not call Runtime_StackOverflow... but they are rare. [20:23] markwubben has joined the channel [20:23] dmcquay has joined the channel [20:25] funkatron has joined the channel [20:27] MikhX has joined the channel [20:28] isaacs: piscisaureus: https://github.com/isaacs/node/commit/691357f7c36004df95a9f2c072c1168b29dd32d4 [20:30] yene has joined the channel [20:32] piscisaureus: isaacs: does that work? it seems to me that on posix you will join with cwd *only if* there is a slash in argv0 [20:32] piscisaureus: if (!isWindows && argv0.indexOf('/') !== -1) [20:32] piscisaureus: did you really mean to do that? [20:32] isaacs: piscisaureus: yes, that is the intent. [20:32] isaacs: piscisaureus: if you just type "node", you don't want cwd+node [20:32] isaacs: piscisaureus: since "node" might be anywhere in the PATH. [20:33] herbySk has joined the channel [20:33] piscisaureus: isaacs: ah! [20:33] isaacs: piscisaureus: that's the bit that breaks npm [20:33] isaacs: piscisaureus: since it thinks you'er running node from /Users/isaacs/dev/js/npm/ so it installs stuff to /Users/isaacs/dev/js/lib/node [20:33] isaacs: which is so not right [20:34] piscisaureus: isaacs: that sucks. on windows it is no different of course [20:34] jchris1 has joined the channel [20:34] isaacs: piscisaureus: doesn't windows have a %PATH% environ? [20:34] piscisaureus: isaacs: it does [20:35] xSmurf: does there exist any reflection in node?? wondering about annotations specifically... [20:35] isaacs: piscisaureus: so, if you drop node.exe into C:\Windows\bin or whatever, and type "node", it'll pick it up? [20:35] piscisaureus: isaacs: i think i misinterpreted the original intent of that piece of code [20:35] isaacs: ahh, i see [20:35] SubStack: reflections what [20:35] isaacs: i've forgotten so much about how windows works, i figured that you'd translated the intent to how it works there. [20:35] piscisaureus: isaacs: the comment `// Make process.argv[0] and process.argv[1] into full paths.` is kinda misleading [20:35] stride: xSmurf: as in java? nope [20:35] isaacs: yeah [20:35] isaacs: it should be "unless it's being run from the PATH lookup" [20:35] xSmurf: stride: or php or something [20:36] stride: php has annotations? [20:36] xSmurf: it has reflection [20:36] SubStack: xSmurf: javascript is crzy mutable [20:36] SamuraiJack_ has joined the channel [20:36] xSmurf: and some external class for annotations [20:36] xSmurf: though annotations are coming! [20:36] SubStack: I'm not sure what this reflection thing is though [20:36] saschagehlich has joined the channel [20:36] xSmurf: it's a big thread on php-dev list [20:36] SubStack: classes are silly [20:36] isaacs: piscisaureus: so, if you have node.exe in the path, and node.exe in the cwd, and you type "node", which one do you get? [20:37] piscisaureus: the cwd one [20:37] isaacs: piscisaureus: yikes. [20:37] saschagehlich: ryah: my project is up and running, 200 beta users are using it at the same time - but after an hour or so the process gives me a segfault or tells me that there is no more memory. what's the best way to debug it and to find the leak(s)? [20:37] felixge has joined the channel [20:37] felixge has joined the channel [20:37] SubStack: xSmurf: just Object.keys() your way into whatever runtime introspection you need [20:37] isaacs: piscisaureus: in sh, you'd have to do ./node to pick up the local one [20:37] piscisaureus: isaacs: i know. on windows that behaviour is optional and off by default. [20:37] mfernest: saschagehlich: DTrace [20:37] stride: xSmurf: google shows me stupid @annotations encapsulated in comments for php, is that what you think of? [20:37] xSmurf: SubStack: I don't think that returns comments ;P [20:38] xSmurf: yep [20:38] xSmurf: stupid to you maybe [20:38] isaacs: piscisaureus: ok... so... you'd have to actually *stat* cwd+node.exe to know if you should resolve to that one? [20:38] stride: what's the name of the thread? how to make php even uglier? :) [20:38] SubStack: xSmurf: what do you need comments for? A documentation generator? [20:38] piscisaureus: isaacs: yup [20:38] isaacs: off-by-default = almost never ever turned on [20:38] xSmurf: they can be a nice way to implement metadata at the function/method level [20:38] xSmurf: SubStack: pretty much [20:39] djanowski has joined the channel [20:39] xSmurf: internally generated usage documentation [20:39] mfernest: saschagehlich: semi-kidding aside, a bit of code review is probably your best first step [20:39] SubStack: well functions are just objects that you can set attributes on [20:39] piscisaureus: isaacs: I think there are other ways to detect the full path of the current executable on windows [20:39] xSmurf: SubStack: I know [20:39] isaacs: piscisaureus: i'd almost prefer to just say "whatever" and not do it on Windows. [20:39] saschagehlich: mfernest: so what should I look for in my code? [20:39] xSmurf: it's not very pretty, it's metadata it's unrelated to processing [20:39] isaacs: piscisaureus: so, oyu might have an argv[0] like "subfolder\node" [20:40] djanowski: anyone using zombie.js and dealing with window.open's? [20:40] isaacs: piscisaureus: or maybe only do it if it's got a \ or / in it? [20:40] xSmurf: anyway, brb [20:40] jtrally has joined the channel [20:40] SubStack: self.foo = annotate('foo bar bazzle', function () { /* implementation /* }) [20:40] SubStack: could do something like that [20:40] stride: xSmurf: so they don't actually do anything in php? in java they're used for dependency injection, aspects, etc. [20:41] jtrally: Does anyone know if the videos of the talk Ryan gave at Sencha conf are up anywhere (they aren't at the Sencha site) [20:41] SubStack: or make a javascript preprocessor that turns specially formatted comments before a function definition into annotated blocks [20:41] bartt has joined the channel [20:41] mfernest: saschagehlich: could be several things, esp. of your segfault is not a consequence of running out of heap [20:41] piscisaureus: isaacs: hold on. what if you call /usr/node/node on posix. it will join with cwd in your solution right?. that's not correct [20:42] isaacs: piscisaureus: no. [20:42] isaacs: piscisaureus: yeah, it should also detect charat(0) !== '/' [20:42] isaacs: that's a bug :) [20:42] mfernest: saschagehlich: but a quick way to get started might be to insert process.memoryUsage() calls in your code and see if you can't localize the problem [20:42] isaacs: thanks [20:42] KrisJordan: stride: in PHP you can reflect over a construct's doccomments .. this is what the Recess Framework does to get annotations ... doccomments are language constructs attached to classes/functions/methods/properties unlike regular old comments which are ignored at runtime [20:42] stride: xSmurf: if you want this for documentation only, I think there's a javadoc clone for js that might offer something similar [20:42] piscisaureus: isaacs: just don't do anything on windows for the time being. [20:43] montylounge has joined the channel [20:43] jtrally has left the channel [20:43] KrisJordan: example of php annotations in doc comments: http://www.recessframework.org/page/routing-in-recess-screencast [20:43] jtrally has joined the channel [20:43] jpld has joined the channel [20:43] saschagehlich: mfernest: okay thanks so far [20:44] jtrally has left the channel [20:44] piscisaureus: isaacs: my head is overflowing with edge cases such as [20:44] piscisaureus: /program files/node/node.exe [20:44] piscisaureus: d:../node.exe (yeah that is valid. it depends on what the cwd on d: would be) [20:44] siculars has joined the channel [20:45] piscisaureus: I think i will resurrect os.getExecutablePath and use that one in the end. [20:45] xSmurf: stride: no they don't do anything in PHP you implement the usage. My goal was internal generation of usage docs, not dev docs [20:45] stride: KrisJordan: do people use that? maybe I'm a spoilt java child but that just doesn't look very nice :) [20:46] jbpros has joined the channel [20:46] stride: xSmurf: I see. but I think comments are simply dropped [20:46] isaacs: piscisaureus: how's this look to you? https://github.com/isaacs/node/commit/e047cc4ea1dfbcf734b3491125f6ba4b3dd0e6ec [20:46] piscisaureus: isaacs: lgtm [20:47] isaacs: kewl, i'll send to ryah and dev list [20:48] eddanger_ has joined the channel [20:49] KrisJordan: stride: yes and no -- not much different than the way Java annotations worked prior to annotations being supported in the language (I think pre 1.5) -- the difference between /** and /* is significant in PHP -- first is a doc comment second isn't -- at the end of the day where the line gets drawn between what's code and what's data is moot, esp in dynamic languages, PHP's doccomments are equivalent to annotations in java returning [20:49] KrisJordan: string for you to do with what you wish -- there've been proposals to have first class annotation support in 5.4+ [20:49] piscisaureus: isaacs: just for my understanding. If argv[0] would always be resolved to a full absolute path, would that break npm? [20:49] isaacs: piscisaureus: not if it was the correct path :) [20:49] jbpros: hi everyone -- what's the best spec lib for node out there (Rspec fan here)? there seems to be a lot of possibilities, following the wiki [20:49] isaacs: piscisaureus: actually, that'd be super handy [20:49] isaacs: piscisaureus: but when run from the $PATH, it would have to be the actual one that was found on teh $PATH [20:50] isaacs: which may be different than process.execPath [20:50] stride: KrisJordan: hmkay, guess I just haven't done anything in php for too long :) doesn't look _that_ bad on a second glance.. [20:50] pdelgallego has joined the channel [20:50] isaacs: and i have to respect the executable that was found, not the binary it resolved to. [20:51] isaacs: otherwise npm modules get installed into /usr/local/Cellar/node/0.2.4/lib/node [20:51] isaacs: which clearly is not right [20:51] piscisaureus: brb [20:51] KrisJordan: stride: xdoclet pre jdk annotations: http://xdoclet.sourceforge.net/xdoclet/using.html [20:52] stride: KrisJordan: funny. I changed one of those just today.. :) [20:52] yene has left the channel [20:53] kevwil has joined the channel [20:53] jchris has joined the channel [20:53] rdeshpande has joined the channel [20:53] rdeshpande: hi all [20:53] rdeshpande: is there a solution for distinguishing between environments using node.js? i haven't found anything promising from google yet.. [20:53] iFire has joined the channel [20:53] iFire has joined the channel [20:53] rdeshpande: by environments i mean production, stage, development, etc [20:53] tjholowaychuk: NODE_ENV [20:54] tjholowaychuk: NODE_ENV=production etc [20:54] tjholowaychuk: pretty standard stuff [20:54] perezd has joined the channel [20:56] tekky has joined the channel [20:56] rdeshpande: thanks [20:56] rdeshpande: ! [20:57] gakusei has joined the channel [20:58] piscisaureus: isaacs: you mean process.execPath != the one found in path because you might find a symlink in the path? [20:58] isaacs: piscisaureus: yes [20:58] isaacs: piscisaureus: and i need to pretend (for npm's purposes) that that's the "real" node [20:59] gnrfan has joined the channel [20:59] danielrmz has joined the channel [20:59] lirel has joined the channel [20:59] piscisaureus: isaacs: argh. to do that 100% correctly on windows will be really really painful. [20:59] stride: xSmurf: just glanced at the scanner code in v8, I think it just discards comments as whitespace right there [21:00] isaacs: piscisaureus: yeah [21:00] isaacs: piscisaureus: i think it's best to just kinda not do it [21:00] isaacs: piscisaureus: so you might get an argv[0] of d:..\node. oh well. deal with it. [21:00] piscisaureus: isaacs: yeah. but how will we ever make npm work on windows then? [21:00] piscisaureus: isaacs: however on windows file symlinks are rarely used so it should be easy to do that correctly 99% of the time [21:01] slaskis: why do i get Socket is not connected after a while from my http client? [21:01] isaacs: piscisaureus: well, yeah, but it might be a batch file or shortcut or something [21:01] isaacs: piscisaureus: you might have node.lnk, which is about the same as a symlink [21:01] slaskis: kan i tell it to stay connected somehow? [21:01] xla has joined the channel [21:01] isaacs: or node.bat which does node %@ or however you spell "$@" in windowsese [21:01] lirel: hi, how can i create stream instances to recieve data from cleartext cryptostreams via pipe? [21:01] alek_br has joined the channel [21:01] isaacs: *windowsease [21:02] isaacs: cuz it's a disease [21:02] isaacs: ACTION rimshot [21:02] lirel: is there something like new Stream() ? [21:02] piscisaureus: isaacs: .lnk not really like that. they're handled only by the windows shell. we should not deal with them. you might end up installing npm libs in your start menu [21:02] femtoo has joined the channel [21:02] isaacs: ack [21:02] isaacs: yeah... [21:02] isaacs: but a batch file, for instance [21:03] piscisaureus: isaacs: argv[0] of d:../node is annoying because spawn(argv[0]) is super handy if you want to run node as a child process, but if it isn't resolved to a full path you'd need to trust the cwd to be unchanged [21:03] isaacs: or maybe npm on windows could have some hard-coded "install stuff in C:\Program Files\node\lib" or something [21:03] slaskis: kan i tell it to stay connected somehow? [21:03] slaskis: wrong window [21:03] isaacs: piscisaureus: if you're going to spawn, you should spawn process.execPath [21:03] piscisaureus: isaacs: batch file is one thing. but argv[0] will not point to the batch file if you run node, it will hold the command that the batch file executed [21:03] Aria: lirel: Readable and Writable Streams are more an interface than a thing — if an object emits the right events and has pause and such, it works. You can, however, create a new net.Stream / net.Socket with the functions in the net module. [21:03] isaacs: piscisaureus: which should always be the actual bin [21:03] piscisaureus: isaacs: ah! [21:04] piscisaureus: isaacs: that should be documented. I'm seeing (and using) argv[0] all the time. [21:04] isaacs: lirel, Aria: stream = require("stream"); myStream = new stream.Stream() [21:04] Aria: This is why I want argv to not include that, and have them be separate. [21:04] lirel: Aria: does net.Stream have setEncoding, because is ust wanted to use it as workacound for CryptoStream not having this method [21:04] isaacs: Aria: i do have to use argv[0], though [21:04] Aria: Oh. Hm. [21:04] isaacs: Aria: which is not the same as execPath [21:05] Aria: Indeed, but the uses for such things are separate. And platform-specific, only one of which puts it in argv [21:05] isaacs: piscisaureus: actually, though, assuming that there's a valid path.resolve() and a path.isAbsolute() that works on windows, then i can get all that platform-specific stuff done there. [21:06] isaacs: piscisaureus: and we could do path.resolve(cwd, argv[0]), and it could be smart enough to knwo that / means "absolute" on posix, but not on windows, etc. [21:06] isaacs: piscisaureus: though the %PATH% craziness makes it still hrut on windows [21:06] piscisaureus: brb [21:08] akahn has left the channel [21:09] bentruyman has joined the channel [21:09] lirel: isaacs: according to the documentation the created streamobject should have the method setEncoding. with your example, node tells me, that it doesn't have such a method [21:10] jbpros: what's the best spec lib for node out there (Rspec fan here)? there seems to be a lot of possibilities, following the wiki... [21:10] isaacs: lirel: net streams have setEncoding. i don't know if the stream.Stream base interface does, though [21:10] Aria: Yeah, it doesn't. [21:13] Aria: … Stream doesn't implement the whole Readable nor Writable stream interface, in fact. It just handles the events. [21:13] Aria: And only barely at that. [21:13] lirel: is there a way to provide setEncoding to tls.connect's data events output except using a buffer [21:14] galaxywatcher has joined the channel [21:15] bentruyman_ has joined the channel [21:16] svnlto has joined the channel [21:16] cafesofie has joined the channel [21:18] yozlet has joined the channel [21:18] saschagehlich_ has joined the channel [21:19] cronopio: Im trying to upload an image using connect-form, but when submit form i get "Cannot call method 'onComplete' of undefined [21:19] saschagehlich_: if http.ClientResponse's "end" event is called, hsa the connection automatically been closed or do I still have to close it? [21:19] tjholowaychuk: cronopio: req.form.complete(function(){}) [21:20] piscisaureus: isaacs: I'll work on path.resolve. I think I prefer leaving argv[0] untouched on windows and provide another way to detect the node installation dir. IMHO argv[0] shouldn't be used for that. [21:20] cronopio: the line say req.form.onComplete(function(e,c,a){..........}); [21:20] cronopio: tjholowaychuk: ok [21:20] cronopio: tjholowaychuk: same thing Cannot call method 'complete' of undefined [21:21] pyrotechinck has joined the channel [21:22] cronopio: tjholowaychuk: im using route separation [21:22] cronopio: tjholowaychuk: maybe that? [21:23] cronopio: Im require connect-form in app.js and models/img.js [21:23] tjholowaychuk: should be fine [21:23] cronopio: but req.form are undefined [21:24] wink_ has joined the channel [21:26] slaskis: anyone knows of any streaming string reader? i'd like to stream the objects in an json file and only emit each object [21:26] cronopio: tjholowaychuk: its necesary pass form({ keepExtensions: true }) to createServer()?? for work?? or other parameter?? [21:27] tjholowaychuk: cronopio: nope [21:27] Aria: slaskis: As far as I know, it doesn't fully exist yet — handling it generally for all JSON is hard (object as top level would only emit once, for example, or emit for each node in the tree.) [21:28] cronopio: tjholowaychuk: ok :) [21:28] alexfner has joined the channel [21:28] mbrochh has joined the channel [21:28] mbrochh has joined the channel [21:29] slaskis: Aria: true, fortunately my json is rather flat (just one array with plain objects), so i could just seek to },{ but i'm curious if theres any generic string reading module [21:29] cronopio: the form have the correct enctype, no where else to look [21:30] charlenopires has joined the channel [21:34] romainhuet has joined the channel [21:35] eddanger: what is the max number of files node can have open? I'm trying to open -> write -> close around 500 files. [21:35] eddanger: Getting the error: Error: EMFILE, Too many open files [21:36] hellp has joined the channel [21:37] Kudos: is it just me, or is any kind of complex data storage in node a nightmare? [21:37] previsuals has left the channel [21:38] Kudos: is callback hell mandatory, or ami just doing it wrong? [21:39] hober: one man's cb hell is another man's cps heaven :) [21:39] rtuin has joined the channel [21:39] Kudos: cps? [21:41] alek_br has joined the channel [21:41] SubStack: yay there's an strftime on npm [21:42] FMJag has joined the channel [21:43] Tim_Smart has joined the channel [21:43] roger_raymond: want: http://www.ubertorso.com/products/Encom.html [21:44] roger_raymond: sorry... wrong irc channel :( [21:44] roger_raymond: great wat to introduce myself tho, right :) [21:46] cafesofie has joined the channel [21:47] fumanchu182: Who can I throw money at for making node.js a pleasure to work with. I've rolled a realtime event server, a instant messenger server and realtime server status application that interfaces with my android tablet in about a week. Node.js kicks major ass. [21:47] hornairs has joined the channel [21:47] ryah: eddanger: ulimit -n [21:48] ryah: fumanchu182: glad you like it [21:48] fumanchu182: It has made working with things that would traditionally be done with long polling or other ajax request no longer a nightmare. [21:49] fumanchu182: Especially coupled with socket.io you can do some really cool things. [21:49] eddanger has joined the channel [21:49] eddanger: ryah: 256 ... I guess it is an OS specific limit. Thanks. [21:49] m14t has joined the channel [21:49] ryah: eddanger: it can be increased [21:50] bmizerany has joined the channel [21:50] faure has joined the channel [21:51] twoism has joined the channel [21:51] faure: anyone know how i can call the render method from the end method? for example res.end("a call to res.render in here") [21:51] omni5cience has joined the channel [21:51] cronopio: crazy thing, ryah eddanger ulimint -n on gentoox32 get 1024 and OpenSolaris x32 get 65536 [21:52] saschagehlich_: f http.ClientResponse's "end" event is called, hsa the connection automatically been closed or do I still have to close it? [21:52] saschagehlich_: *if [21:52] tjholowaychuk: faure: if you pass a callback to render() you can control the output better [21:52] tjholowaychuk: if that is kinda what you are going for [21:52] ryah: cronopio: on joyent, you mean - i made it high [21:53] tjholowaychuk: faure: then you get the template, but it does not write/end [21:53] cronopio: ryah: not, in my friend's laptop beside me lol [21:53] jbpros_ has joined the channel [21:53] ryah: oh really? [21:53] cronopio: ryah: yeah! xD [21:54] ryah: hm, in our builds it defaults to 1024 [21:54] ryah: but we bumped it [21:54] faure: tjholowaychuk: i have to call res.end though because i'm doing an authentication on the page... so would it be possible to call render() as the callback to end() ? [21:54] tjholowaychuk: uhh [21:54] tjholowaychuk: that doesnt really make sense [21:54] alathon: Hm [21:55] cronopio: ryah: its a amd turion with snv_134 i386 [21:56] ryah: tjholowaychuk: n looks nice [21:56] tjholowaychuk: ryah: thanks man [21:56] ryah: cronopio: we run 121 [21:56] tjholowaychuk: the others kinda did a combination of what I wanted haha [21:56] tjholowaychuk: but not quite [21:56] cronopio: ryah: why so old? [21:56] alathon: Anyone who can redirect me to a general JS questions IRC channel ? [21:57] ryah: cronopio: long story [21:57] ryah: cronopio: we're upgrading currently... [21:57] ryah: alathon: #javascript [21:57] alathon: ryah: Thanks [21:58] Ond has joined the channel [21:58] ryah: tjholowaychuk: you should default the prefix to $HOME/.n or something [21:58] ryah: :) [21:58] tjholowaychuk: yeah maybe [21:58] saikat_ has joined the channel [22:01] cronopio: ryah: rumor says it is for the major changes made to opensolaris by Joyent [22:01] ryah: joyent has its own fork of opensolaris, yes [22:02] losing has joined the channel [22:03] femtooo has joined the channel [22:03] SubStack: my terrible hack for payments just might work [22:03] SubStack: even though it requires manual confirmation [22:03] SubStack: the irc bot will alert us when somebody signs up at least [22:04] vineyard has joined the channel [22:05] piscisaureus: ryah: isaacs: do path.split and path.normalizeArray really need to be exposed as public APIs? [22:05] banjiewen has joined the channel [22:06] cronopio: ryah: I guess that makes it much more complicated to upgrade the fork to the same speed as opensolaris [22:07] cferris has joined the channel [22:07] ryah: piscisaureus: not as far as i'm concerned [22:07] piscisaureus: ryah: any clue who might be concerned? [22:07] ryah: piscisaureus: isaacs [22:08] ryah: cronopio: yes, we'll be rebased soon. [22:08] piscisaureus: ryah: and what about path.join -- given that a correct path.resolve is implemented [22:08] isaacs: piscisaureus: i'm not sure if i use path.split [22:08] isaacs: piscisaureus: path.join is used by a lot of people [22:08] isaacs: (judging by the amoutn of feedback we got about changing it) [22:08] ryah: nod [22:08] isaacs: i use path.join everywhere in npm [22:09] isaacs: and normalizeArray is handy, if you have an array, but for my purposes, join() or resolve() would be fine [22:09] piscisaureus: isaacs: okay. I'll not touch path.join then [22:10] isaacs: piscisaureus: for the most part, "join" is like a poor man's "resolve" [22:10] isaacs: but it's also got some niceties [22:10] piscisaureus: isaacs: that's what i was thinking [22:10] isaacs: like, resolve("foo", "/bar") should be "/bar" [22:10] isaacs: but join("foo", "/bar") should be "foo/bar" [22:10] isaacs: join("foo", "/bar", "baz////asdf") --> foo/bar/baz/asdf [22:10] piscisaureus: isaacs: yes, and the latter is kinda stupid [22:11] piscisaureus: isaacs: join("d:", "windows", "folder") should give what? [22:11] isaacs: piscisaureus: d:/windows/folder [22:11] piscisaureus: isaacs: why not d:windows/folder? [22:11] isaacs: piscisaureus: becuase it's just joining by / ;) [22:11] ryah: piscisaureus: you mean currently or in the future? [22:12] isaacs: but i'd expect that join("d:","windows","folder") would be absolute, yes [22:12] piscisaureus: ryah: future [22:12] ryah: piscisaureus: i think join should do what makes sense to do on windows [22:12] isaacs: piscisaureus: if you want it to not be joined, then don't make them separate pathparts. do join("d:windows", "folder") [22:12] ryah: if d:windows\folder is the proper path, then let's have that [22:13] isaacs: ryah: they both are. and they're both pretty easy to justify expecting [22:13] isaacs: how does it work on python? php? ruby? [22:13] isaacs: not that we should necessarily maek their mistakes, but it'd be good to know what their mistakes are, if we're going to make new mistakes. [22:13] ryah: good question [22:13] piscisaureus: that's why I want path.split gone. It will have crazy semantics [22:13] ryah: it would also be good to be able to test the windows path stuff in linux [22:13] isaacs: piscisaureus: i see. i'm sold. [22:13] ryah: so that know if i break something [22:14] ryah: piscisaureus: do you think that'd be possible? [22:14] isaacs: ryah: sholdn't be terribly hard. i mean, if it's just switching on the os.isWindows flag, you can set that [22:14] isaacs: path doesn't do any stats or anythig. [22:14] isaacs: just string munging [22:14] ryah: yeah [22:14] ryah: well maybe that's a longer goal [22:15] SubStack: there's a resolve() in the workd? [22:15] SubStack: *works [22:15] wilken: has anyone tried to do a http client put to post a file? i create the request, use req.write and req.end.. and then i get a broken pipe error [22:15] SubStack: If so, rockin', I've had to write that by hand. Not fun. [22:15] webr3: join("foo", "/bar", "baz////asdf") --> foo/bar/baz/asdf | should probably be /bar/baz/asdf [22:16] webr3: seems more of a resolve than a join.. the URI rfc has this defined well [22:16] webr3: 3986 i think [22:17] webr3: see: http://tools.ietf.org/html/rfc3986#section-5.2.2 and 3.2.3 [22:17] webr3: 5.2.3* even [22:18] piscisaureus: resolve ftw [22:19] jpick has joined the channel [22:20] webr3: ACTION has implemented uri rfc in js before, snip what you want/need from https://github.com/webr3/URI if it's any use [22:20] tanepiper: webr3: what module is this? [22:20] tanepiper: your module? [22:20] webr3: path.join discussion afaict, just saw it above and commented that the example of join proposed looked wrong [22:21] c4milo: tjholowaychuk: what is the last stable version of express? [22:21] tjholowaychuk: c4milo: 1.0.1 [22:21] c4milo: tjholowaychuk: btw, happy new year :) [22:21] tjholowaychuk: master is 2.0.0-pre [22:21] benburkert has joined the channel [22:21] piscisaureus: isaacs: just found this interesting comment: http://www.php.net/manual/en/function.realpath.php#85388 [22:21] tjholowaychuk: thanks man, you too [22:21] prettyrobots has joined the channel [22:21] isaacs: piscisaureus: ah, one of my first url parsers. [22:22] tjholowaychuk: GAH why does TM put bundles all over the place lol [22:22] tjholowaychuk: fuck [22:22] tjholowaychuk: rage [22:22] piscisaureus: seems like php doesn't do resolve or split or join [22:22] isaacs: piscisaureus: no, php's pretty ghetto [22:23] admc1 has joined the channel [22:23] admc2 has joined the channel [22:23] FMJag has joined the channel [22:24] mikew3c has joined the channel [22:25] evl has left the channel [22:25] piscisaureus: python has it covered pretty well [22:30] piscisaureus: isaacs: can posix paths contain a backslash or a colon? [22:31] isaacs: piscisaureus: yp [22:31] isaacs: piscisaureus: if escaped. [22:31] wdperson has joined the channel [22:31] piscisaureus: isaacs: thnx [22:32] isaacs: piscisaureus: [14:31:41] $ touch foo\\bar ; touch foo:bar ; ls -laF foo*bar [22:32] isaacs: -rw-r--r-- 1 isaacs staff 0 Jan 5 14:31 foo:bar [22:32] isaacs: -rw-r--r-- 1 isaacs staff 0 Jan 5 14:31 foo\bar [22:32] piscisaureus: isaacs: I'm convinced :-) [22:32] isaacs: :) [22:34] saschagehlich_: if http.ClientResponse's "end" event is called, hsa the connection automatically been closed or do I still have to close it? [22:34] saschagehlich_: help please. [22:35] Twyndyllyngs has joined the channel [22:35] Twyndyllyngs has joined the channel [22:38] svnlto has joined the channel [22:39] KrisJordan has joined the channel [22:40] sudoer has joined the channel [22:41] xSmurf: ACTION ranges some more at XMPP S5B [22:44] vacuoustruth has joined the channel [22:44] dgathright has joined the channel [22:46] bartt has joined the channel [22:46] Tim_Smart has joined the channel [22:49] googol has joined the channel [22:50] bingomanatee_: TJ: thanks for your help with express - finally found the problem area. [22:51] zemanel_ has joined the channel [22:52] vacuoustruth has left the channel [22:52] jchris has joined the channel [22:55] jbpros: would you recommend nodeunit ou expresso for unit testing? [22:56] aguynamedben has joined the channel [22:57] prettyrobots has joined the channel [22:58] tjholowaychuk: bingomanatee_: what was it [22:59] tjholowaychuk: ? [23:01] astoon has joined the channel [23:02] ryan[WIN] has joined the channel [23:04] pkrumins has left the channel [23:05] Me1000 has joined the channel [23:06] piscisaureus: isaacs: ryah: API could be path.resolve(path, [root, [root2 ...]], [useCwd = true]) ? [23:06] isaacs: piscisaureus: i was imagining something like url.resolve [23:06] isaacs: path.resolve(from, to) [23:06] isaacs: from is where you are, to is where you went. [23:06] isaacs: should be like "cd $to" if you were in "from" already [23:07] herbySk has joined the channel [23:08] piscisaureus: isaacs: so more like path.resolve(root, path) == path.resolve(from, to) [23:08] isaacs: piscisaureus: sure [23:08] piscisaureus: isaacs: but there must be something like a 'usewd' option because: [23:08] isaacs: piscisaureus: path.resolve() shouldn't require any sys calls. [23:09] piscisaureus: path.resolve('c:/node', 'd:../somewhere') [23:09] piscisaureus: goes where? [23:09] isaacs: oh, right.. [23:09] piscisaureus: depends on the cwd on drive d [23:09] isaacs: you have multiple cwd's in windows [23:09] piscisaureus: i love windows [23:09] piscisaureus: yep [23:10] piscisaureus: fetching them is another story [23:10] derferman has joined the channel [23:10] isaacs: yeah, i don't see how you're going to get around making system calls, then [23:10] piscisaureus: so i thought [23:10] twoism has joined the channel [23:11] piscisaureus: resolve(from, to) just joins `to` to from if to is not an absolute path [23:11] piscisaureus: resolve(from, true) uses cwds [23:11] piscisaureus: or maybe just resolve(to) does that [23:12] piscisaureus: but likely use case may be: resolve('images/icon.gif', '../www/static_files') [23:12] piscisaureus: ehm in reverse in case of your api [23:13] piscisaureus: so then you want to append cwd as well [23:14] saschagehlich_: ryah: when exactly are ClientRequests / ServeResponses being closed? [23:14] jamesarosen has joined the channel [23:18] boaz has joined the channel [23:20] iFire has joined the channel [23:22] ryah: saschagehlich_: well - depends [23:22] clarkfischer has joined the channel [23:24] matjas has joined the channel [23:24] echosystm has joined the channel [23:24] [[zzz]] has joined the channel [23:25] robotarmy has joined the channel [23:26] saschagehlich_: ryah: well, shouldn't they be closed when the "end" event is called? [23:26] alek_br has joined the channel [23:26] saschagehlich_: it looks like all my connections to remote servers are left open after the end event has been called [23:29] lakin has joined the channel [23:29] mfernest has joined the channel [23:30] eggsby has joined the channel [23:30] eggsby: hola hombres.... what is a good starting point for writing an node.js irc bot? [23:30] [[zz]] has joined the channel [23:31] eggsby: I was looking at... https://github.com/felixge/nodelog is there a better alternative? [23:31] herbySk has joined the channel [23:34] softdrink: quick, someone build me a data vis tool on top of three.js [23:37] aconbere: anyone had trouble building node-base64? [23:37] skm has joined the channel [23:39] hunterloftis has joined the channel [23:39] SubStack: aconbere: it doesn't build on 0.3 yet [23:39] SubStack: aconbere: but my fork does: https://github.com/substack/node-base64 [23:40] aconbere: yeah [23:40] alathon has joined the channel [23:40] aconbere: I just grabbed yours :) [23:40] aconbere: saw the issue [23:40] aconbere: I was having it fail in 2.4 as well [23:40] aconbere: so it seems like it might be just a little bit generally f'ed [23:40] SubStack: oh strange [23:40] SubStack: works on v0.2.5 here [23:41] SubStack: pkrumins's build [23:42] aconbere: heh [23:42] aconbere: well your build works for me [23:42] aconbere: so I'll just watch for that to hit master [23:44] SubStack: might be a month or two before we migrate to 0.3 [23:44] SubStack: need to get node-png working too, but ryah has been pitching in with that [23:47] stepheneb has joined the channel [23:50] zemanel_ has joined the channel [23:53] opengeard has joined the channel [23:55] eDave has joined the channel