[00:01] ryah_: is anyone doing i18n stuff with node? [00:02] malkomalko has joined the channel [00:02] hoffa_ has joined the channel [00:02] malkomalko: tjholowaychuk: you around? [00:03] mattly has joined the channel [00:04] aubergine has joined the channel [00:05] PyroPeter has joined the channel [00:05] isaacs: hey, irc people [00:05] davidascher has joined the channel [00:05] isaacs: who wants to paint my latest bikeshed? [00:06] isaacs: http://github.com/isaacs/node/commit/1c3ffb2672c9fc7dec0c08d1fe5753bf00230d49 [00:06] isaacs: anything missing? any of those that you think should behave differently? (note: a lot of these don't pass right now, the question is whether or not they *should* all pass) [00:06] synthomat: okay, on this tutorial, they connects to the db when they use the model :( [00:06] synthomat: http://howtonode.org/f8553a94aea5117c7236bb73cf85340269ea6602/express-mongodb [00:07] jashkenas: you're fixing the path.join "./" goes to "/" problem? hallelujah. [00:08] isaacs: jashkenas: well, that and a few others. [00:09] isaacs: jashkenas: also the path.join("", "foo") goes to "/foo" "problem" [00:09] isaacs: ACTION kinda likes that, but whatevs [00:09] hzin has joined the channel [00:09] isaacs: just means you have to do path.split(/^|\//) instead of path.split("/") [00:10] jashkenas: interesting way to set up the tests... looks good to me after a quick read. [00:10] jashkenas: One thing that seems a little strange is that ... ('', 'foo') is 'foo' but ('foo', '') is 'foo/' [00:11] [[zz]] has joined the channel [00:11] jashkenas: perhaps only add the slash if its necessary? and just just if you happen to have a joined anything to the right? [00:11] jashkenas: *not just [00:11] tjholowaychuk: malkomalko: hey kinda [00:11] tjholowaychuk: whats up [00:12] isaacs: jashkenas: the logic there is that any preceding '' elements are dropped, but trailing '' elements turn the dir-path in to a dir-contents-path [00:12] malkomalko: nm, I saw your note in jade that said block expansion wasn't done yet [00:12] isaacs: jashkenas: which are subtly different [00:12] malkomalko: thought it was by the examples in the folder, my bad [00:12] synthomat: WOHOOOO!! [00:12] isaacs: just ask ls, ln, rsync, scp, cp, etc [00:12] jashkenas: isaacs: think that joining an empty string on the end should trigger that behavior? [00:13] jashkenas: do you accept "null" instead, to keep the dir-path? [00:13] isaacs: jashkenas: if you can think of a better way, sure [00:13] isaacs: jashkenas: (just emailed to the list,too) [00:13] synthomat: Validatorian: http://gist.github.com/637550 [00:13] synthomat: this is evil anyway [00:13] dquestions has joined the channel [00:13] synthomat: but it works [00:13] tjholowaychuk: malkomalko: ah :) yeah not yet [00:13] tjholowaychuk: hopefully soon [00:14] jashkenas: I just mean -- if I had to pass a value to path.join() that I wanted to be a no-op, I'd probably pass an empty string... [00:14] jashkenas: anyhow, great job. [00:14] isaacs: jashkenas: i didnt' do anything except point out the problem :) [00:14] isaacs: jashkenas: but thanks anyway :D [00:14] isaacs: ooh!! noop! that's a great point! what should path.join() do? [00:14] isaacs: (like, with no args() [00:15] jashkenas: barf. [00:15] jashkenas: or "." [00:15] jashkenas: but barf is best, I think. [00:15] isaacs: yeah, i'm thinking path.join() should === path.join("") [00:15] pquerna: what every python path join does [00:15] pquerna: is the right answer [00:15] jashkenas: alright. [00:15] isaacs: GAGAAAHHH!!!! NOOOOO!!! [00:15] isaacs: pquerna: go wash your brain out with something. [00:15] isaacs: python's path.join is redonkulous [00:15] jashkenas: In Ruby, its "" [00:16] jashkenas: The Omega Path. [00:16] isaacs: haha [00:16] mikew3c_ has joined the channel [00:16] isaacs: could just return Ω [00:16] isaacs: currently path.join() is "" [00:16] isaacs: as is path.join("") [00:16] isaacs: but i think returning "" is probably never a good answer. [00:16] Validatorian: synthomat: well done :) [00:16] indexzero has joined the channel [00:17] synthomat: Validatorian: but it still doesn't feel right :D [00:17] synthomat: hehe [00:17] isaacs: btw, jashkenas, "but barf is best, I think." is so very tweetable. [00:17] indexzero: isaacs: You around? [00:17] indexzero: oh there you are [00:17] pquerna: the choice are throw an exception or return an emptry string for a whole set of path join operations [00:17] isaacs: indexzero: yep :) [00:17] pquerna: pick one pattern and just use it [00:17] jashkenas: especially because it's the one true falsy path, in JavaScript. [00:17] jashkenas: if (path.join(arg)) { ... } where arg is null... but who would ever write that? [00:17] isaacs: pquerna: tell that to python and perl and c# and php [00:18] isaacs: pquerna: path.join is an airplane on a treadmill. [00:18] pquerna: isaacs: enjoying all the anecdotes about python's broken path.join, but I have to say I've never had that much pain from it; Its seemed to done what iv'e expected of it whenever I use it. [00:19] isaacs: pquerna: path.join("foo", "/bar") is retarded. [00:19] Validatorian: synthomat: I hear ya -- You might post on the node google group, get some opinions on best practice and such [00:19] isaacs: pquerna: er, python's answer to that is retarded. [00:19] isaacs: it should be foo/bar, not /bar [00:19] pquerna: the implication is that the first argument should always be an absolute path [00:20] pquerna: if its relative, and the second is absolute [00:20] pquerna: use the absolute [00:20] pquerna: just like urls really [00:20] isaacs: pquerna: the problem with python's is that ANY absolute path anywhere in the list drops everything that comes before it. [00:20] pquerna: yes [00:20] isaacs: path.join("foo", "/bar", "baz" , "/quux") [00:20] isaacs: that is wonky [00:20] synthomat: Validatorian: good idea. will do it after some sleep. we have 2.20am :-/ [00:20] isaacs: pquerna: join is not supposed to be a resolve. [00:20] synthomat: thanks for your and the others guy help [00:20] pquerna: mixed use of absolute and relative paths is what seems wonky to me [00:20] MikhX has joined the channel [00:20] Validatorian: synthomat: That's prime coding time! [00:21] nerdEd has joined the channel [00:21] necrodearia has joined the channel [00:21] Validatorian: you're welcome :) Enjoy node! [00:21] synthomat: oh not realy. have to stand up at 8am, cook something and then go to work :D [00:21] echosystm has joined the channel [00:22] synthomat: i think i will join this chan permanently :-) [00:22] synthomat: see you [00:23] echosystm: whats the difference between Nodules and NPM ? [00:23] isaacs: echosystm: nodules is a module loader. npm is a package manager. [00:23] echosystm: ah [00:23] echosystm: i see [00:23] creationix has joined the channel [00:23] hoffa_ has joined the channel [00:23] isaacs: echosystm: ie, nodules does stuff at run time. you start your program with it [00:23] isaacs: npm sets things up, and then goes away [00:23] echosystm: yep [00:23] echosystm: i understand [00:23] echosystm: thanks [00:23] isaacs: np [00:24] creationix: isaacs: though the npm generated shims do a little at runtime right? [00:24] creationix: but that's transparent to the end user, so it's not the same thing [00:24] isaacs: creationix: yeah, but very very little. they're basically symlinks, except with a bit of require.paths shuffling. [00:24] creationix: true [00:24] MikhX has joined the channel [00:25] rcy has joined the channel [00:25] isaacs: creationix: and once the node_modules folder thing is more widespread, they'll literally be just module.exports = require("whatever") [00:26] creationix: yeah, that will be nice [00:27] charlenopires has joined the channel [00:28] Validatorian: isaacs: http://gist.github.com/637660 <-- this npm or html5 acting up? Or me? [00:29] isaacs: Validatorian: hmm.... just a sec. that looks like a bug i just fixed... [00:30] isaacs: oh, no, i mean... a regression i just introduced *^_^* [00:30] Validatorian: :) [00:30] isaacs: just a sec, i think i can tinker with the data and make it start working [00:30] Validatorian: out of the 90 or so npm issues I've had, I think this is the first time it's not been entirely my fault [00:31] isaacs: hehe [00:33] mif86 has joined the channel [00:36] isaacs: ok, should work now [00:36] banjiewen_ has joined the channel [00:36] isaacs: i should clean that data up on the way in, too [00:36] AAA_awright: Why is it everyone attributes every new feature addition to Javascript to HTML5? [00:37] halfhalo: because [00:37] AAA_awright: SQL Database in webpages! HTML5! [00:37] AAA_awright: Huh/ [00:37] halfhalo: be glad its not xml [00:37] aurynn: XML5! [00:37] AAA_awright: Native audio playing in Javascript! That's HTML5! >_< [00:38] Validatorian: worked, thanks isaacs [00:39] hober: aurynn: dunno if you're joking, but anne was working on that... [00:41] evanmeagher has joined the channel [00:42] c4milo has joined the channel [00:42] kgf: AAA_awright: maybe I'm mistaken, but at least in the case of audio, it /IS/ HTML5, it's just made accessible via javascript's DOM API. [00:43] echosystm: anyone here used persevere? [00:43] Aria: kgf: Which is HTML5! [00:43] benreesman has joined the channel [00:43] AAA_awright: The DOM is an entirely seperate spec, so is the audio and image (including video) API [00:44] kgf: Aria: that was kinda my point lol [00:44] kgf: or was that sarcasm? [00:44] AAA_awright: There's no reason you can't use audio and image with [00:44] Aria: Yes, but if you say it that way it's not buzzword 2.0 compliant! [00:44] AAA_awright: The fact that browsers waited for a dedicated