[00:00] jerrysv_: i was always a fan of 0xdeadbeef [00:00] bnoordhuis: and let's not forget that classic, 0xdeadbabe [00:00] jerrysv_: which used to be the default memory address set in dbx back in the day [00:00] jerrysv_: the beef, not the babe [00:01] willwhite has joined the channel [00:01] jerrysv_: don't initialize your pointers? it's ok, they'll be 0xdeadbeef [00:01] bnoordhuis: i think gdb still does that [00:01] bnoordhuis: maybe not 0xdeadbeef [00:01] jerrysv_: wouldn't surprise me :) [00:01] wadey: SubStack: why can't I do `browserify -r ./localfile.js`, but `browserify -r $PWD/localfile.js` works? [00:01] jerrysv_: last time i used dbx was the 80's though [00:02] jellosea has joined the channel [00:02] jerrysv_: and gdb has gone through a million changes since last i used it [00:02] DrMcKay: I feel so young and unexperienced now [00:03] bnoordhuis: DrMcKay: that feeling passes with time i can assure you :) [00:03] bnoordhuis: well, the young part anyway [00:03] jellosea: hey, i have a problem. x = {cat: '\u0000meow\u0000'}, but x.cat == 'meow'.. the null characters seem to be getting dropped [00:03] DrMcKay: bnoordhuis: :D [00:03] vns has joined the channel [00:03] jerrysv_: i dunno, i still feel young sometimes [00:03] DrMcKay: bnoordhuis: but seriously, being that young is a problem [00:04] DrMcKay: google didn't want me because of that [00:04] jonaslund_ has joined the channel [00:04] DrMcKay: I feel like GitHub should have a date of birth field [00:04] bnoordhuis: DrMcKay: maybe next year? [00:04] DrMcKay: bnoordhuis: well, they asked me to come back with more experience [00:05] DrMcKay: but I seriously felt apprieciated when they emailed me [00:05] bnoordhuis: they did? how... non-technocratic [00:05] DrMcKay: I remember spending first few minutes looking at headers [00:05] bnoordhuis: hah yes, i did that too :) [00:05] bnoordhuis: 'must be a fishing mail' [00:06] DrMcKay: I guess that's what everybody does :) [00:06] konobi: they just phone me instead of email... no idea how they got my number [00:06] _root_ has joined the channel [00:07] DrMcKay: konobi: that's higher level, I guess :) [00:07] CIA-65: node: 03Ryan Dahl 07master * rc2ae39b 10/ node.gyp : gyp: -ldl on linux - http://git.io/DZKRcg [00:07] DrMcKay: konobi: oh, and they're google [00:08] jellosea: hey, i have a problem. x = {cat: '\u0000meow\u0000'}, but x.cat == 'meow'.. the null characters seem to be getting dropped [00:08] DrMcKay: .. '\u0000meow\u0000' [00:08] catb0t: ' [00:08] DrMcKay: oh... [00:08] zcopley has joined the channel [00:08] bnoordhuis: jellosea: yes, v8 strips out chars < 32 [00:08] DrMcKay: but look at that: [00:08] jellosea: how do i stop it from doing that [00:08] DrMcKay: .. '\u0000meow\u0000' [00:08] catb0t: ' [00:09] DrMcKay: .. 'a' [00:09] catb0t: 'a' [00:09] bnoordhuis: jellosea: only in some cases though, check the issue tracker for details [00:09] DrMcKay: hah, catb0t does it wrong [00:09] catb0t: wrong order but it shouldn't be hard to implament a basic routing schema to get the MySQL in Node 's module page [00:10] DrMcKay: who wrote him? [00:10] bnoordhuis: jellosea: this is part of it: https://github.com/joyent/node/issues/394 [00:10] jerrysv_: !issue sleep [00:10] CIA-65: node: 03Ryan Dahl 07master * r80dd818 10/ (10 files in 3 dirs): Upgrade GYP to r1010 - http://git.io/A55c3w [00:11] DrMcKay: !issue search sleep [00:11] jhbot: found issues: 2 [00:11] jhbot: Issue: #818: child processes should not wait for stdio before terminating [00:11] jhbot: Issue: #1157: `child_process` module should read / write password prompts [00:11] bnoordhuis: is there also a bot that searches the docs? that'd be awesome [00:12] DrMcKay: bnoordhuis: my does link [00:12] DrMcKay: !doc link fs [00:12] dmkbot: http://nodejs.org/docs/latest/api/fs.html [00:12] DrMcKay: !doc link fs#readSync [00:12] dmkbot: http://nodejs.org/docs/latest/api/fs.html#fs.readSync [00:12] jellosea: thanks a lot bnoordhuis [00:12] DrMcKay: !doc link fs v0.3.2 [00:12] dmkbot: http://nodejs.org/docs/v0.3.2/api/fs.html [00:12] AvianFlu: nice drmckay [00:12] DrMcKay: bnoordhuis: but true, searching is a nice-to-have [00:13] bnoordhuis: DrMcKay: can it link to sections? e.g. dgram.bind? [00:13] tjholowaychuk: DrMcKay index node's docs with https://github.com/visionmedia/reds [00:13] tjholowaychuk: trivial to implement [00:13] DrMcKay: bnoordhuis: no, and I know I need it [00:13] jellosea has joined the channel [00:13] DrMcKay: tjholowaychuk: nice one :) [00:13] jellosea: bnoordhuis: can u send that link again? my client crashed :( [00:14] bnoordhuis: jellosea: https://github.com/joyent/node/issues/394 <- that one? [00:14] DrMcKay: tjholowaychuk: I think I will also use it for xkcd search [00:14] jellosea: yeah thanks [00:14] jellosea: so.. how do i get around this? i'm not using it in a buffer though, just an object [00:15] Twelve-60` has joined the channel [00:15] DrMcKay: also, linking to github stuff would be useful [00:16] isaiah_ has joined the channel [00:16] bengrue_ has joined the channel [00:16] juyeong__ has joined the channel [00:16] desaiu has joined the channel [00:16] odyniec_ has joined the channel [00:17] Dreamer3__ has joined the channel [00:17] scottschecter has joined the channel [00:17] telemachus_ has joined the channel [00:18] mjr__ has joined the channel [00:18] mavinf has joined the channel [00:18] mavin has joined the channel [00:19] tedeh_ has joined the channel [00:19] nicobn_ has joined the channel [00:19] visnup_ has joined the channel [00:19] tomilain1 has joined the channel [00:19] aspect_ has joined the channel [00:19] bsutt_ has joined the channel [00:19] _mdp_ has joined the channel [00:19] FearOfMu1ic has joined the channel [00:19] wang_ has joined the channel [00:19] deedubs_ has joined the channel [00:19] wang_ has joined the channel [00:19] kloeri_ has joined the channel [00:20] larsemil_ has joined the channel [00:20] jakeskik_ has joined the channel [00:20] joelio_ has joined the channel [00:20] ay_ has joined the channel [00:20] nksmith has joined the channel [00:20] unlink_ has joined the channel [00:20] jellosea: bnoordhuis: do you know how to get v8 to stop dropping the nullchar? [00:20] admc has joined the channel [00:21] admc has joined the channel [00:21] mikeal has joined the channel [00:22] ttpva has joined the channel [00:22] jakehow_ has joined the channel [00:22] jakehow has joined the channel [00:22] mdz has joined the channel [00:22] mdz has joined the channel [00:23] perezd has joined the channel [00:23] jj0hns0n has joined the channel [00:23] DrMcKay: v8: '\u0000meow\u0000' [00:23] v8bot_: DrMcKay: " [00:23] optixx has joined the channel [00:23] DrMcKay: that's a bit weird [00:23] matbee has joined the channel [00:23] DrMcKay: I think it actually doesn't strip them [00:24] tjholowaychuk: it doesnt [00:24] tjholowaychuk: but if you try and use that as a filename etc [00:24] tjholowaychuk: you're potentially fucked [00:25] DrMcKay: tjholowaychuk: PHP did that :D [00:25] zorzar has joined the channel [00:25] DrMcKay: or, at least let people do it [00:25] DrMcKay: it was soo fun [00:27] bnoordhuis: tjholowaychuk DrMcKay: https://github.com/joyent/node/pull/1493 [00:27] secoif has joined the channel [00:28] emattias has joined the channel [00:28] tjholowaychuk: not sure i love the implementation [00:28] tjholowaychuk: but +1 in general [00:28] tjholowaychuk: cant see anyone really intentionally using it [00:28] bnoordhuis: nul bytes in filenames? no [00:28] mdaisuke has joined the channel [00:29] DrMcKay: tjholowaychuk: implementation looks a bit dirty, you're right [00:30] tjholowaychuk: probably not a bad idea to expose whatever the util is too for addons etc [00:30] matthijs has joined the channel [00:30] jvdev has joined the channel [00:30] DrMcKay: but, well, it was really fun thing to exploit in PHP [00:30] DrMcKay: but they fixed it :( [00:31] ncb000gt has joined the channel [00:31] DrMcKay: this issue is a bit old now, I don't think it's merged... [00:32] jellosea: so i can have var c = {'cat': '\u0000meow'} [00:32] jellosea: and console.log(c) will be okay [00:32] jellosea: but if i do console.log(c.cat) i just get moew [00:32] jellosea: *meow [00:32] DrMcKay: jellosea: yes, console.log(c) inspects the object [00:32] tjholowaychuk: DrMcKay probably because of the weird unnecessary closure wrapping thinger [00:33] CarterL has joined the channel [00:33] jellosea: DrMcKay: so how can i pull the value out without it dropping the nullbytes [00:33] niftylettuce has joined the channel [00:34] DrMcKay: jellosea: but are you sure it's stripped always? [00:34] DrMcKay: jellosea: and, well, why would you want an value like that? [00:34] jellosea: DrMcKay: yeah its always getting stripped for me [00:35] jellosea: and i need it for php object serialization compatibility [00:35] jellosea: because php does it [00:36] desaiu: http://jsbin.com/uvowoz/2 [00:36] desaiu: How would I retrieve this data? [00:36] DrMcKay: jellosea: oh... [00:36] nude_tree has joined the channel [00:36] desaiu: I have tried, tried, tried some more, and failed [00:36] desaiu: ...for a couple of weeks now [00:36] DrMcKay: jellosea: I'm not sure how to stop that [00:37] desaiu: I can fetch the data, but I want to save it to a file [00:37] DrMcKay: jellosea: maybe you should make it an array of ints and use fromCharCode? [00:37] desaiu: Maybe open a writeStream and write as the data updates [00:37] jellosea: i think i'l try and just keep a placeholder char [00:37] jellosea: and try and replace it back in [00:37] DrMcKay: jellosea: or in this way [00:41] losing has joined the channel [00:41] bnoordhuis: jellosea: if you read in the data as a buffer you won't have this problem [00:41] bnoordhuis: jellosea: buffers are agnostic to nul bytes [00:41] rgl has joined the channel [00:43] soapyillusions has joined the channel [00:45] brianseeders has joined the channel [00:48] descipher has joined the channel [00:49] ryan[WIN] has joined the channel [00:49] charleyd has joined the channel [00:50] DrMcKay: good practice question, test should go to /test directory for an project? [00:50] DrMcKay: or to /lib/test? [00:51] tjholowaychuk: DrMcKay ./test [00:52] DrMcKay: tjholowaychuk: thanks [00:52] charleyd has joined the channel [00:53] achiu has joined the channel [00:53] dgathright has joined the channel [00:56] postwait has joined the channel [00:56] micheil has joined the channel [00:56] progme has joined the channel [00:58] k1ttty has joined the channel [00:59] vidi has joined the channel [01:01] gnrfan has joined the channel [01:02] hij1nx has joined the channel [01:03] Waha has joined the channel [01:04] frodenius has joined the channel [01:04] frodenius has joined the channel [01:04] mosen has joined the channel [01:06] mikeal has joined the channel [01:06] nude_tree has joined the channel [01:07] esteth has joined the channel [01:09] jacobolus has joined the channel [01:12] Druide_ has joined the channel [01:12] desaiu: I would really appreciate it if someone were to help me, I'm a little desperate at this point [01:12] boaz has joined the channel [01:13] esteth: desaiu: State your problem and people might be able to help [01:13] CarterL: desaiu: wish i could help, i know nothing :\ [01:15] Renegade001 has joined the channel [01:16] desaiu: 19:36 < desaiu> http://jsbin.com/uvowoz/2 [01:16] desaiu: 19:36 < desaiu> How would I retrieve this data? [01:16] desaiu: 19:36 < desaiu> I have tried, tried, tried some more, and failed [01:16] desaiu: 19:36 < desaiu> ...for a couple of weeks now [01:16] desaiu: 19:37 < desaiu> I can fetch the data[and even display it using console.log], but I want to save it to a file [01:16] desaiu: 19:37 < desaiu> Maybe open a writeStream and write as the data updates [01:17] Peniar has joined the channel [01:17] freeformz has joined the channel [01:18] enhydra has joined the channel [01:20] mikeal has joined the channel [01:21] esteth: desaiu: I'm confused as to what you mean by retreiving that data. Don't you just want to do a http request to the site and concat the results? [01:21] havenn has joined the channel [01:21] necrodearia has joined the channel [01:22] havenn has joined the channel [01:24] Wa has joined the channel [01:24] thepatr1ck has joined the channel [01:25] unlink has joined the channel [01:25] seivan has joined the channel [01:26] nevir has joined the channel [01:27] desaiu: esteth: I want to be able to use the data in my program, so if I could continually write what data is retrieved to a json file, I think hat would be helpful [01:27] Drakonite has joined the channel [01:27] reid has joined the channel [01:27] e6nian has joined the channel [01:28] esteth: the data which is received? To me it looks like you just read a file from disk and run a server which responds to every request with the contents of that fiel. [01:29] thepatr1ck has joined the channel [01:30] desaiu: The server serving up the data is me simulating what I might get from mtgox [01:31] desaiu: I want to retrieve data from mtgox, and it is presented in the exact same way my little server works [01:32] desaiu: I was thinking the way to go would be to continuously write to a file [01:32] esteth: so you want to make a request to a server, then write the response to a file? [01:32] desaiu: Yes [01:32] esteth: or is there some fancy comet stuff going on here? [01:32] desaiu: Nothing fancy [01:33] WarriorSl has joined the channel [01:33] jerrysv has joined the channel [01:33] torsd has joined the channel [01:34] jerrysv: isaacs: ping [01:34] guidocalvano has joined the channel [01:35] mundanity has joined the channel [01:36] argo_ has joined the channel [01:36] argo_: hey all [01:37] argo_: I'm trying to solve the issue of nested schemas for mongoose, what is the best place to store and reference them from, mongoose.Schemas, for example? [01:38] desaiu: esteth: You think you might know? [01:39] esteth: dasaiu: I'm just putting something together onjsbin for you :) [01:39] esteth: trying to make sure I've got something that works and is idiomatic before I confuse you more [01:40] aoberoi has joined the channel [01:40] mosen: when do you consider something finished enough for npm publishing? :) [01:40] isaacs: mosen: when `npm install` works [01:41] isaacs: jerrysv: whassup? [01:41] mosen: isaacs, thanks I was holding back until the code was pristine [01:41] jerrysv: isaacs: um. well. i just realized that i kind of gave away the last of my npm stickers, the cool ones, and was about to start adorning my personal laptop [01:41] argo_: anyone here is familiar with restmvc.js module? [01:41] DrMcKay: argo_: it's good when it looks clean :) [01:41] jerrysv: was wondering if you could either hook me up, or help me hook up [01:42] argo_: DrMcKay: still new to node.js, any advice tho? [01:42] isaacs: jerrysv: those shaped ones i got from stickermule.com [01:42] neoesque has joined the channel [01:42] isaacs: jerrysv: the round red ones are from http://www.zazzle.com/isaacschlueter [01:42] jerrysv: yeah, wasn't as hip on the round red ones [01:43] DrMcKay: argo_: I would put every schema into separete variable [01:43] isaacs: the sticker mule ones are textured and thick [01:43] DrMcKay: argo_: just to keep it clean [01:43] isaacs: very high quality [01:43] theCole has joined the channel [01:43] jerrysv: yup, there is one on my work laptop [01:44] Sorella_ has joined the channel [01:44] argo_: DrMcKay: I tried doing it with restmvc.js, but apparently when model A includes model B it breaks since B isn't loaded yet [01:44] jerrysv: but apparently i handed the couple i had out like candy [01:44] jerrysv: out of js stickers too [01:44] argo_: DrMcKay: so now trying to find a place to stick mongoose schemas in so that I can access them when declaring models [01:45] DrMcKay: isaacs: do you have an idea if they ship to Europe? [01:45] DrMcKay: argo_: another module, probably [01:46] esteth: desaiu: http://jsbin.com/uxitik/5/edit#source [01:46] esteth: desaiu: That fetches a page from the web, waits to get the entire page, buffering it as it receives, then saves the entire result to a file [01:47] isaacs: well, i've apparently forgotten my password with stickermule, and their reset link isn't sending me anything [01:47] jerrysv: d'oh [01:47] jacobolus has joined the channel [01:47] galaxywatcher has joined the channel [01:47] argo_: DrMcKay: so I basically cannot dynamically declare module.exports.Schemas inside module.exports, right? [01:48] esteth: desaiu: If you have a large file to fetch, you might have to append directly to disk instead of buffering, but that should be a relatively simple change [01:48] desaiu: Is appending in the API? [01:48] DrMcKay: argo_: you can, I think [01:49] sirdancealot has joined the channel [01:49] argo_: Attempted to do that but inside app.js it reports as undefined [01:49] isaacs: the image i used is this, though: http://npmjs.org/npm-large.png [01:49] isaacs: DrMcKay, jerrysv ^ [01:49] esteth: desaiu: var file = fs.createWriteStream('log.txt', {'flags': 'a'}); file.write("new stuff"); [01:49] jerrysv: isaacs: awesome, thanks a lot! [01:49] CStumph has joined the channel [01:50] DrMcKay: isaacs: awesome, thanks :) [01:50] desaiu: This is very helpful! Thank you so, so much esteth for taking the time to help me [01:50] DrMcKay: isaacs: but do they ship to Europe? [01:50] isaacs: DrMcKay: no idea [01:50] esteth: desaiu: No problem :) For future reference, stackoverflow.com has lots of great help for nodejs issues :) [01:50] DrMcKay: isaacs: I see free shipping to US [01:50] isaacs: DrMcKay: i know that zazzle does [01:50] isaacs: DrMcKay: i sent mape an npm shirt, as a thanks for making the logo [01:51] esteth: desaiu: Searches for stuff like "how to download file http nodejs" tend to come up with good results for simple stuff :) [01:51] mape: DrMcKay, isaacs: and it was awsome :D [01:51] jerrysv: ha. $60 minimal order [01:51] DrMcKay: isaacs: so I will try with zazzle :) [01:51] desaiu: esteth: Thanks :) [01:52] DrMcKay: ACTION thinks about some geeky text about node.js to put on a shirt [01:53] e6nian has joined the channel [01:53] mikey_p: Javascript turtles, all the way down [01:54] mikey_p: DrMcKay: anything with a project logo by SubStack ;) [01:54] smtlaissezfaire has joined the channel [01:55] DrMcKay: mikey_p: :D [01:55] mosen: front: emit('evented io') back: on('for v8 javascript') ? [01:55] DrMcKay: mosen: oh, that's cool :D [01:55] DrMcKay: or shirt.emit(...) :) [01:55] mosen: haha shirt.emit [01:57] jacobolus has joined the channel [01:57] mikey_p: ACTION LOLs at https://github.com/substack/npmtop [01:57] DrMcKay: :D [02:01] DrMcKay: you guys think we could make SubStack prepare some artwork for t-shirts and things? [02:01] Emmanuel` has joined the channel [02:01] TheFuzzball has joined the channel [02:01] sechrist: man, vncing into my iPhone, and having a webapp(hosted on the phone) to use the sms on the phone [02:01] sechrist: is awesome [02:02] Nuck: Can somebody help me figure out how to use bcrypt-node? [02:02] SubStack: DrMcKay: you can try, but you'll have to trick me [02:02] sorensen: oh thats awesome [02:02] DrMcKay: sechrist: um, what? [02:03] SubStack: starting a flame war on the mailing list about logos is a good way to trick me [02:03] sorensen: i would buy those shirts [02:03] DrMcKay: sechrist: oh, vnception? [02:03] Nuck: SubStack: Your logo is the best. [02:03] DrMcKay: NERDRAGE! [02:03] Nuck: SubStack: I think it ought to be official, but I guess there must be somebody out there who disagrees. [02:04] ceej has joined the channel [02:04] Nuck: So, can somebody please explain how to use bcrypt? [02:04] trepan has joined the channel [02:05] Nuck: Specifically, WTF is gen_salt doing? [02:06] Nuck: If I'm gonna have numerous instances of my server, how do I ensure the salts are the same? [02:06] Nuck: Before, I used a constant salt hard-coded in, a random salt per-user, and then I tossed their username in for good measure [02:07] Nuck: But with bcrypt, I don't know what I'm doing. [02:07] bnoordhuis: Nuck: google 'key stretching' [02:08] Nuck: ACTION does so and hopes it's not a cryptographic blue waffle [02:09] DrMcKay: blue waffle? sounds tasty ;) [02:09] bnoordhuis: just wait till Nuck finds out it's slang from the gay scene [02:10] bnoordhuis: Nuck: don't forget to browse with safe search off! [02:10] Nuck: lol I know what a blue waffle is :P [02:10] DrMcKay: bnoordhuis: :D [02:10] Nuck: bnoordhuis: So does this function have anything to do with the salts I'm used to? [02:10] bnoordhuis: Nuck: not really [02:11] jellosea: bnoordhuis: the buffer approach doesn't seem to work [02:11] jellosea: bnoordhuis: if i try and toString it, it throws away the null byte again [02:11] tim_smart has joined the channel [02:11] bnoordhuis: jellosea: make sure it's buffers all the way, strings are fundamentally handicapped that way [02:12] CIA-65: node: 03Ryan Dahl 07master * rc4454d2 10/ (Makefile lib/net_uv.js): [02:12] CIA-65: node: net_uv: Don't error on ECONNRESET [02:12] CIA-65: node: Fixes #1571. - http://git.io/0Kw-nw [02:12] mape: mjr_: any way to set ttl on .set using node_redis? [02:12] jellosea: bnoordhuis: var x = new Buffer(1); x[0] = 0x00; console.log(x.toString('binary')); [02:12] bnoordhuis: jellosea: that's not buffers all the way [02:13] jellosea: bnoordhuis: i need to get a toString of it though [02:13] jellosea: since i'm doing this for php serialization [02:13] bnoordhuis: jellosea: where are you going to print it to? [02:13] Nuck: bnoordhuis: ... Then why the fuck is it called "gen_salt"? [02:14] jerrysv has joined the channel [02:14] mrchess` has joined the channel [02:15] Nuck: Also, how does compare work when it doesn't accept a salt? [02:15] mape: mjr_: nm seems SETEX worked fine :) [02:15] bnoordhuis: Nuck: well, it's a salt - but it's not to ward off rainbow table attacks [02:15] jellosea: bnoordhuis: well, i have to write it to memcache [02:15] Nuck: encrypt takes a salt param, compare doesn't? [02:15] bnoordhuis: jellosea: memcache only accepts strings? [02:16] jellosea: bnoordhuis: when i pull it from memcached it prints out as \u0000 [02:16] bnoordhuis: Nuck: the salt is appended (or prepended) [02:16] bnoordhuis: Nuck: to the encrypted value, that is [02:16] jellosea: bnoordhuis: no i can write a buffer to it, but its gonna be far more of a hassle to create the buffer i need [02:16] Nuck: bnoordhuis: Well that's silly :/ [02:17] shipit_ has joined the channel [02:17] bnoordhuis: Nuck: yes? why? [02:17] jellosea: i guess i will create the buffer then :) [02:17] jellosea: i mean :( [02:17] Nuck: bnoordhuis: It just seems extremely insecure to me : [02:18] Nuck: :/ [02:18] bnoordhuis: Nuck: why? [02:19] jerrysv has joined the channel [02:19] Nuck: bnoordhuis: Well, that seems like it would make it easier on attackers [02:19] Nuck: Most attacks are done through injection, where they get it to spit out a database [02:19] trepan: what's currenty the best option for a reverse-proxy setup that supports socket.io? [02:19] Nuck: But I could name all my columns gibberish [02:20] Nuck: And hide the salt among them [02:20] bnoordhuis: Nuck: bcrypt derives its strength from key stretching, the salt is insignificant [02:20] Nuck: bnoordhuis: Fair enough :/ [02:21] bnoordhuis: Nuck: if you have the salt, you still have to run the derivation algorithm which is very, very slow [02:21] bnoordhuis: Nuck: that's what makes bcrypt secure [02:21] Nuck: I'll keep my own salts still [02:21] Nuck: And just add those of bcrypt :D [02:21] Nuck: The more the merrier :P [02:22] mjr_: mape: glad I could help. :) [02:22] mape: hehe [02:22] Nexxy has joined the channel [02:22] bnoordhuis: Nuck: er, maybe you should read up on bcrypt some more [02:22] smathy has joined the channel [02:24] whoops has joined the channel [02:24] JakeyChan has joined the channel [02:25] igl1 has joined the channel [02:25] nevir: Nuck: You might also want to considering storing a digest identifier along with it, so you can switch down the road if you want to (without breaking existing users) [02:25] Nuck: nevir: already switching from triple-salted SHA-256 to bcrypt [02:26] binaryjohn has joined the channel [02:26] nevir: triple-salted? o.O [02:26] ngs has joined the channel [02:26] Nuck: bnoordhuis: I understand the concepts and I know it has adjustable slowness, etc. [02:26] nevir: But yeah, case in point! If you had wanted to do that after you had users, it could have been a pain :P [02:26] Nuck: nevir: I know :P [02:26] Nuck: So I've already thought about that [02:26] Nuck: I can just add another field, I'm on NoSQL [02:27] nevir: (and take a look at other libraries that do this sort of thing for inspiration! Ruby's devise, and Django's auth module are good examples) [02:27] sirdancealot has joined the channel [02:28] ryanj has joined the channel [02:29] CIA-65: libuv: 03Ryan Dahl 07master * rbdd880e 10/ src/uv-unix.c : unix: add a few asserts, cosmetic touch ups - http://git.io/FGgR5g [02:29] CIA-65: libuv: 03Ryan Dahl 07master * rce9171d 10/ src/uv-unix.c : unix: uv_read_start should fail if UV_CLOSING set - http://git.io/n78S7g [02:31] d0k has joined the channel [02:36] nevir: pedantry & terminology: There are node >packages<, which contain one or more >modules< (and a module has a 1:1 mapping to a file?) Does the term >submodule< come into play? And anything else I might be forgetting when trying to describe pieces of a node project? [02:38] Nexxy: modules don't have 1:1 mapping [02:38] asabil has joined the channel [02:38] d0k has joined the channel [02:39] nevir: Nexxy: Depending on how you structure your exports? (What would you call ancillary source files, if there's a specific term for 'em?) [02:39] Nexxy: "the other files i hasta include for mah module to work" [02:40] nevir: Hah, fair enough [02:40] nevir: Thanks :) [02:40] Nexxy: I'm sure there's a fancy term for it but [02:40] Nexxy: I don't think there is any standard one yet [02:40] nevir: Yeah, if it's not something that's used often, it probably doesn't matter yet [02:41] ryan0x2 has joined the channel [02:42] dgathright has joined the channel [02:42] iammerrick has joined the channel [02:45] CStumph has joined the channel [02:47] amigojapan has joined the channel [02:47] TooTallNate has joined the channel [02:47] ryan0x2_ has joined the channel [02:48] TooTallNate has joined the channel [02:49] TooTallNate has joined the channel [02:50] Nuck: nevir: Call them whoozersnappers. [02:50] nevir: You have just made my day [02:50] Nuck: You must've had a pretty sorry day :P [02:50] sirdancealot has joined the channel [02:54] antono has joined the channel [02:54] antono has joined the channel [02:58] sirdancealot has joined the channel [02:59] sirdancealot has joined the channel [03:01] meso has joined the channel [03:02] brianseeders has joined the channel [03:02] eazyigz has joined the channel [03:02] harthur has joined the channel [03:03] mikeal has joined the channel [03:03] boehm has joined the channel [03:03] springmeyer has joined the channel [03:03] antono has joined the channel [03:06] some1else has joined the channel [03:06] aconbere has joined the channel [03:07] tmzt has joined the channel [03:08] tmzt: can somebody tell me what happens if you have a buffer that is not utf-8 and attempt to convert it to a string in utf-8? an exception or something else [03:08] chrisdickinson: tmzt: it'll try to coerce it to utf-8 as near as possible, but there might be some weird characters floating around in there? [03:08] some1else has left the channel [03:09] kenperkins has joined the channel [03:10] tmzt: I'm wondering if it would be a solution to the ws text vs. binary argument, if there's a precident of a js api that handles without security risk binary data being treated as text [03:10] kenperkins: does anyone know of any analytics providers that allow you to submit past data in? [03:11] tmzt: kenperkins: could always run your own with piwik or one of the node.js based codebases [03:11] apanda has joined the channel [03:11] kenperkins: hmm [03:12] kenperkins: what are the nodejs ones? [03:12] Nexxy has joined the channel [03:12] Nexxy has joined the channel [03:12] tmzt: hummingbird, not sure of it's post processing though, I think it's more real time [03:13] antono has joined the channel [03:14] zeade has joined the channel [03:15] kenperkins: man [03:15] kenperkins: what I really want is a client and server platform that is processed in real time, but I can send old events to (i.e. I can set the timestamp) [03:15] kenperkins: I have months of data :( [03:15] racar has joined the channel [03:16] justinTNT has joined the channel [03:16] tmzt: piwik is that, but it's in php [03:16] Wa has joined the channel [03:16] tmzt: I'm looking to combine it and hummingbird to use hummingbird for dispatching events and piwik for archiving and processing them [03:16] kenperkins: but piwik doesn't seem to have much in the way of events, it's more page focused [03:16] micheil: kenperkins: you could always write it yourself? [03:17] kenperkins: [03:17] kenperkins: I know. [03:17] kenperkins: but I hate writing my own shit [03:17] micheil: cmon' it'll be fun.... [03:17] tmzt: it has events, they aren't very well documented though [03:17] micheil: :P [03:17] igl has joined the channel [03:17] kenperkins: ACTION worked on Pivot (http://www.ted.com/talks/gary_flake_is_pivot_a_turning_point_for_web_exploration.html) so visualizations are obviously not a problem [03:17] tmzt: the latest thing I've been doing is adding third level views to it to break down data further [03:17] kenperkins: but I hate having to do it when people *should* be solving it for me [03:18] kenperkins: tmzt: I greped the FAQ for events with no dice [03:18] tmzt: like pivot tables? [03:18] kenperkins: tmzt: look at the video real quick [03:18] Nexxy: lol [03:18] Nexxy: people should be solving your problems for you? [03:18] tmzt: way too slow on here, I'll look tomorrow [03:18] tmzt: since it should be relevant :) [03:18] kenperkins: basically, it's a visualization engine for highly structured data (like analytics) [03:19] kenperkins: it was pretty groundbreaking in terms of visual fidelity [03:19] tmzt: what is it built on? [03:19] kenperkins: lol [03:19] kenperkins: it was when I was at microsoft. so c#, and xaml [03:19] tmzt: like vml [03:19] tmzt: hah, ok [03:19] kenperkins: with the underlying rendinger engine being Seadragon [03:19] kenperkins: rendering even [03:20] Wizek has left the channel [03:22] kenperkins: ugh, events are "Downloads" in piwik? [03:22] tmzt: no just generic events in a database table [03:22] Nexxy: mixpanel>piwik [03:24] kenperkins: Nexxy: mixpanel won't let me import or replay my old events [03:24] Nexxy: hm [03:24] Nexxy: email them? [03:25] ryanj has joined the channel [03:25] neilk_ has joined the channel [03:26] ryanfitz has joined the channel [03:26] qcom_ has joined the channel [03:27] kenperkins: http://www.clipboard.com/clip/LR3QnHogAllng_92 [03:27] bradleymeck has joined the channel [03:27] qcom_: why should I use express-resource over plain old express? [03:27] binaryjohn has joined the channel [03:29] prettyrobots has joined the channel [03:29] rchavik has joined the channel [03:29] rchavik has joined the channel [03:30] tobmaster has joined the channel [03:30] binarypie has joined the channel [03:30] binarypie has joined the channel [03:31] jerrysv has joined the channel [03:32] ditesh|cassini has joined the channel [03:35] nevir has joined the channel [03:35] Spion has joined the channel [03:40] antono has joined the channel [03:41] Guest65982 has joined the channel [03:42] Guest65982 has left the channel [03:42] devrim1 has joined the channel [03:42] unlink has joined the channel [03:43] devrim1: hi guys - any good module that reads xml, can change and save it back ? [03:44] devrim1: xml2json fails on a big file.. node-o3-xml doesn't seem to have save.. [03:45] Circlefusion has joined the channel [03:46] Nexxy: "have" save? [03:46] Nexxy: isn't the code that saves things your responsibility? ;o [03:46] devrim1: -) [03:46] devrim1: save the xml not the code [03:46] bradleymeck: tight coupling ftw? [03:46] Nexxy: well write the code that saves the XML [03:47] Nexxy: it seems fairly straightforward to me unless I'm missing something about your problem [03:47] apanda has joined the channel [03:47] aoberoi has joined the channel [03:47] devrim1: library should implement .save() not me [03:47] Nexxy: lol [03:47] Nexxy: ah huh. [03:47] Nexxy: "I'm sorry, this library isn't quite doing enough of my work for me." [03:47] bradleymeck: do you mean parse *and* stringify, not save? [03:48] devrim1: right [03:48] Nexxy: my solution has not been solved by simply requiring these modules! [03:48] Nexxy: LIBRARY FAILURE [03:48] bradleymeck: devrim1, have you looked at JUP? (not sure the syntax matches xml2json) [03:48] eazyigz has joined the channel [03:49] Nexxy: devrim1, have you looked at http://nodejs.org/docs/v0.4.11/api/fs.html#fs.writeFile ? [03:49] Nexxy: ;3 [03:49] devrim1: no i havent - do u have a link for me ? [03:49] Nexxy: oh my god [03:49] jyu322 has joined the channel [03:50] Nexxy: devrim1, shall we just cut to the chase and write the entire application for you? ;3 [03:50] Nexxy: it would probably save all of us some time [03:51] devrim1: bradleymeck: do u mean this one ? http://jsoup.org/news/release-0.2.2 [03:52] vidi has joined the channel [03:52] mikeal has joined the channel [03:52] DevX101 has joined the channel [03:52] ryantm has joined the channel [03:54] CoinOpeBoy has joined the channel [03:54] jyu322 has left the channel [03:54] jerrysv: devrim1: input/output is actually pretty easy in node.js -- a lot of the philosophy is to keep things pretty simple and as modular as possible [03:54] jerrysv: devrim1: so, parsing some xml -- just do a quick write ... do you have any c or c-like language experience? [03:56] ceej has joined the channel [03:57] devrim1: sorry, just got it [03:57] devrim1: https://github.com/polotek/libxmljs/blob/master/docs/api/XmlDocument.md [03:57] devrim1: doc.toString() [03:57] devrim1: this one has it.. [03:57] jerrysv: and polotek's code is usually pretty solid [03:58] jerrysv: awesome [03:58] devrim1: thx jerry [03:58] jerrysv: np [03:58] mattcodes has joined the channel [03:59] mattcodes: can someone recommend a settings modules? (preferable one with plugin storage backend, initially simple text file, later I can point a redis or mongodb instance etc for frontend farm) [03:59] mattcodes: i wish github modules page had reviews/ratings [03:59] prettyrobots has joined the channel [04:00] copongcopong has left the channel [04:01] DevX101 has joined the channel [04:05] SubStack: mattcodes: JSON.parse() works pretty well [04:05] SubStack: if you want to programmatically update your json configs you could use jsup [04:05] jerrysv: mattcodes: or exports.settings = { ... } [04:06] SubStack: yeah just a config.js works too [04:06] jesusabdullah: mattcodes: nconf might be what you're looking for? [04:06] jerrysv: either way, you can write to a file, or write to a data store [04:06] mattcodes: thanks guys I think I'll go with exports.settings for now. JSON.parse works well but cant be bother with strict json rules of quoting the key tooo... [04:07] mattcodes: ohhh la la nconf seems ideal [04:09] AvianFlu: nconf++ [04:09] v8bot_: AvianFlu has given a beer to nconf. nconf now has 1 beers. [04:10] jerrysv: cool cool [04:10] jerrysv: jerrysv++ [04:10] v8bot_: jerrysv: Don't cheat! You can't give a beer to yourself. [04:10] catb0t: jerrysv now has 1 beer [04:10] jerrysv: bot wars :) [04:10] mattcodes: ..reachs for the tower of chang [04:10] jerrysv: .. 'reaches for the tower of chang' [04:10] catb0t: 'reaches for the tower of chang' [04:11] jesusabdullah: I haven't actually used nconf directly yet [04:11] jesusabdullah: I just read a lot [04:11] Nuck: jerrysv: v8bot_ is better. [04:11] jesusabdullah: It LOOKS sweet though [04:12] jesusabdullah: YOU're better than catb0t [04:12] Nuck: It looks alright, a tad awkward for me. [04:12] Nuck: I am. [04:12] catb0t: YOU're supposed to emit from within the callback of the first query , I got mine, i oh, when i bought it [04:12] Nuck: Anything is better than catb0t. [04:12] catb0t: Anything like that in npm, ey are better [04:12] Nuck: catb0t: You suck. [04:12] catb0t: suck at css , I guess i 'm assuming I need to look at [04:12] orbz has joined the channel [04:13] jerrysv: catb0t apparently sasses more [04:13] catb0t: apparently I yell code in a newer, ems to sasses [04:13] Nuck: Nah, probably LESS [04:13] Nuck: Because SASS sucks, right catb0t? [04:13] catb0t: Because it only started happening when I use it as a module [04:13] AvianFlu: jesusabdullah: nconf is boss [04:13] jerrysv: ouch :) [04:14] jesusabdullah: AvianFlu: Good to hear XD [04:15] jerrysv: jesusabdullah: just ordered one of those maple boards [04:15] Nuck: nconf is a cool concept, but I'm not a fan of the .load and .save setup [04:15] jesusabdullah: jerrysv: maple boards? [04:15] jesusabdullah: Nuck: What would YOU do? I mean, I haven't squinted at the api but .load and .save sound reasonable from here [04:15] jerrysv: jesusabdullah: the arm boards that are arduino compatible [04:16] jesusabdullah: Oh, word [04:16] jerrysv: .read, .write ? [04:16] ryanfitz has joined the channel [04:16] jesusabdullah: sheah [04:16] jesusabdullah: Well [04:16] antono has joined the channel [04:16] jerrysv: yeah, should be interesting, looking forward to getting it [04:16] orbz_mkII: qq: anyone have an interest in an MSI installer for node on windows? [04:16] jesusabdullah: a rose by any other name? [04:16] jerrysv: (just playing devils advocate) [04:17] jesusabdullah: I was expecting an answer that indicated a significantly different api [04:17] jerrysv: jesusabdullah: seems pretty sane to me, so ... [04:17] febits has joined the channel [04:18] nevir: Hmm, I'm confused what the reasoning for the module.exports = stuff pattern, when (by default) all node modules are evaluated with exports as _this_. Aka, why don't we see more this.foo = thing to export values? [04:18] nevir: (NODE_MODULE_CONTEXTS seems almost completely unused?) [04:19] jesusabdullah: Nuck: ANSWER MEEEE [04:20] cpetzold has joined the channel [04:21] mike5w3c has joined the channel [04:24] kenperkins has joined the channel [04:25] blkcat: gah, mongoose. [04:25] blkcat: sometimes i think you're more trouble than you're worth. :( [04:26] sirdancealot has joined the channel [04:28] vikstrous has joined the channel [04:29] pen has joined the channel [04:29] visnup: to run node on port 80, is it best to run as root, then process.setuid after binding to the port? [04:30] visnup: like so: https://github.com/nko2/website/blob/master/config/app.js#L175 [04:33] vikstrous: does anyone use mustache here? [04:34] Ratty_: I have a beard, does that count? [04:35] vikstrous: :( [04:36] stagas_ has joined the channel [04:38] CarterL has joined the channel [04:38] mark___ has joined the channel [04:38] mikeal has joined the channel [04:43] seivan has joined the channel [04:43] boaz has joined the channel [04:44] wookiehangover has joined the channel [04:45] ceej has joined the channel [04:47] nevir: vikstrous: I've got some experience w/ it - what are you trying to do? [04:47] JakeyChan has joined the channel [04:48] mark___: paypal's IPN test keeps returning 404 on my nodejs express page, which gives me a 200 OK whenever I view it. Anybody know why? [04:49] mark___: I've spent two days trying to solve this. [04:49] Guest65982 has joined the channel [04:50] nevir: Compare the headers against your direct request & the ones you're sending via express (maybe the Accept: header?) [04:50] statico: Yep. Install WireShark. [04:50] mark___: stupid question, how do I compare? [04:51] mark___: my nodejs Express doesn't log *anything* whenever PayPal IPN sends me something. [04:51] mark___: yet the exact same URL gives me all the expected request logs when I access it normally. [04:52] nevir: I'm not sure on that front :( - Firebug or the WebKit inspector will show you the outgoing headers for your in-browser requests, though [04:52] mark___: do you know if Express performs automatic redirects in order to handle express.get('/',...) stuff? [04:53] JakeyChan has joined the channel [04:53] unlink has joined the channel [04:54] nevir: Not sure at all - I haven't dug into express yet :( [04:55] fmeyer has joined the channel [04:55] springmeyer has joined the channel [04:56] mark___: mmkay. Thanks. ...so I see the webkit request (GET/200/text/plain) ... but I can't see the PayPal one if my server doesn't even receive a request that can be logged :( [04:56] tmzt: mark___: express does what you do [04:56] tmzt: what do you mean? [04:56] tmzt: how would it redirect? [04:57] mark___: I'm testing PayPal IPN ... and it gives me a 404 error but when I go to my the URL (which is pointed at EC2, NodeJs, Express) it gives me a 200 OK [04:57] tmzt: test against nc -l [04:57] JakeyChan: who have document for node.js in node.js src ? [04:57] tmzt: see what it's looking for [04:57] mark___: what is nc -1 ? [04:57] tmzt: get won't handle post, doesn't IPN do post? [04:57] tmzt: netcat listen on a socket [04:58] mark___: hmm. wow, I actually didn't think about that. [04:58] mark___: 2 days of trying to figure out what is wrong... and I missed that. [04:58] mark___: going to test now. Thank you, you may have just saved me :P [05:00] gartenstuhl has joined the channel [05:02] mark___: tmzt: thank you so much, it works. I've been going crazy mad for 2 days trying to figure out what is wrong. [05:03] tmzt: mark___: just curious, what did you mean by redirect? [05:04] mark___: tmzt: I had figured out that PayPal IPN fails if the URL redirects. So I was wondering if the express.get(REGEXP,function()...) was performing some type of hidden redirect that I didn't know about. Obviously I see it wasn't. [05:04] tmzt: express is as simple as you could possibly imagine, if you want a redirect you do res.redirect(url, status) [05:04] mark___: I just entirely missed not doing a express.post() [05:04] tmzt: right, ok [05:05] mark___: again, thanks. 2 days of frustration - with the most obvious error that I missed. [05:05] dominictarr: you can also do app.all(... that responds to all method types, I believe. [05:05] chrislorenz has joined the channel [05:05] mark___: dominictarr: thanks, I didn't know that. I'll probably start using that instead to save me any future pains if I happen to forget again :P lol. [05:06] amigojapan has joined the channel [05:06] kenperkins: i hate analytics [05:07] mark___: kenperkins: google analytics? [05:07] kenperkins: not realtime [05:08] mark___: shripad (idk if he is on IRC much anymore) is working on a realtime analytics app, has everything GA does and more. [05:08] mark___: are you trying to build one, or looking for a service? [05:08] nibblebot has joined the channel [05:08] kenperkins: i'd rather not build one [05:09] kenperkins: so I have all actions that have ever been done in my app in a datastore (unaggregated) [05:09] kenperkins: I want to be able to replay those into an analytics framework plus new events [05:09] kenperkins: all visualized [05:09] mark___: oh, hmm. I don't know about importing them into anything. [05:10] mark___: but you should check out beehopping.com (he just launched it the other week) and send him an email, he's super friendly. [05:10] argo_ has joined the channel [05:11] chrislorenz has joined the channel [05:11] argo_: Is there a way to load file module dependencies recursively, i.e. if I say 'require('A.js') which inside does 'require('B.js')'? [05:13] mark___: argo_: I know you can, I read it somewhere, I just don't recall. [05:14] argo_: theres http://blog.nodejitsu.com/analyze-nodejs-dependencies-like-magic, but its for modules [05:15] tmzt: argo_: re export it [05:15] robotarmy has joined the channel [05:15] tmzt: liek exports.b = require('B') // no .js [05:15] tmzt: in the a module [05:15] tmzt: then it's a = require('A'); a.b [05:16] tmzt: don't think of require like it is in php, it's not into the global scope [05:16] argo_: yes, pretty much like it [05:17] argo_: trying to figure out model/schemas conundrum for mongoose [05:17] foxkid has joined the channel [05:17] argo_: got a pretty complex schema but cannot access them from external model file [05:17] mark___: argo_: mongoose is great if you are using schema... but there are simpler alternative connectors to mongodb. [05:18] argo_: lets say I wanted to store schemas under module.exports.Schemas['SchemaA'], what's the approach? [05:18] argo_: mark____: I'm trying to figure it with restmvc.js [05:18] tmzt: you don't store under exports [05:18] mark___: meh, haven't used restmvc.js :/ sorry [05:18] tmzt: I used a module.exports = function(models) { models.Schemas['SchemaA'] = {}; } [05:19] kenperkins: fuck it, rrdtool here i come [05:19] tmzt: restmvc? there's antoher one [05:19] tmzt: ? [05:19] tmzt: argo_: with that approach you basically call the function for each schema you load [05:19] tmzt: and it aggregates them on one object [05:20] radiodario has joined the channel [05:20] nevir: Anyone know if there are many major packages that make use of _global_, and/or might be broken if they're run w/ sandboxing on? [05:20] nevir: (broad question, sorry ><) [05:21] jesusabdullah: nevir: No, it's a good question [05:21] radiodario has joined the channel [05:21] jesusabdullah: nevir: I can't think of any major node ones, since it's a major faux-pas and runs counter to how require works [05:21] Nexxy: I certainly hope not [05:21] jesusabdullah: That said, a lot of old client-side code depends on that sort of behavior [05:21] nevir: jesusabdullah: That's good to hear [05:21] jesusabdullah: Yeah [05:22] jesusabdullah: Oh, actually [05:22] jesusabdullah: I can think of one [05:22] jesusabdullah: colors.js [05:22] argo_: tmzt: that is true, restmvc.js approach is a bit convoluted because I couldn't go with 'require('./models/A.js').A.schema' within B [05:22] shapeshed has joined the channel [05:22] nevir: Aha! [05:22] jesusabdullah: require("colors") modifies the global string prototype [05:22] jesusabdullah: but it's pretty uncommon [05:22] ollie has joined the channel [05:22] jesusabdullah: and, in colors' case, you can do "purple".magenta [05:22] jesusabdullah: It's pretty handy [05:23] nevir: Aha [05:23] mosen: yeah cloudhead has some neat code :) [05:23] jesusabdullah: For an alternate approach, look at node-charm. It uses ANSI codes as well but has a significantly different api [05:23] tmzt: anybody know if you can reattach a bg'd process that lost ctty? [05:24] kenperkins: jesusabdullah: how are you liking clipboard [05:24] jesusabdullah: I really like it actually! [05:24] kenperkins: :) [05:24] jesusabdullah: I'd been meaning to tell you but forgot your nick [05:25] kenperkins: no biggie [05:25] jesusabdullah: Sometimes it's a bit slow to load up on my laptop but I suspect a computer with moar rams wouldn't have these issues [05:25] kenperkins: browser? [05:25] jesusabdullah: Yeah [05:25] jesusabdullah: the bookmarklet [05:25] jesusabdullah: Oh, which browser? Chrome [05:25] kenperkins: ok good [05:25] jesusabdullah: but I'm using an olde laptop [05:25] kenperkins: it's wickedly slow in ie8 :D [05:25] jesusabdullah: Oh, is it? Funny! XD [05:26] kenperkins: are you clipping much private? or mostly public [05:26] jesusabdullah: Mostly public [05:26] kenperkins: I'm kind of 50/50 [05:26] jesusabdullah: there are some things I'd share but they're facebook clippings so they have real names [05:26] kenperkins: I think that's hilarious (clipping private conversations from facebook) [05:27] jesusabdullah: http://www.clipboard.com/jesusabdullah [05:27] kenperkins: yea I know [05:27] jesusabdullah: Oh, yeah, I had a really good one in there too [05:27] jesusabdullah: "My vacuum just caught on fire.....its gonnna be a GOOD day!" [05:27] kenperkins: have you see that you can view your tags as well? (we're not linking this in the ui yet) [05:27] jesusabdullah: hahahaha [05:27] kenperkins: www.clipboard.com/jesusabdullah/programming [05:27] kenperkins: also www.clipboard.com/tag/programming [05:27] jesusabdullah: Haha, I have actually [05:27] kenperkins: we'll wrk that in soon [05:28] kenperkins: (into the ui) [05:28] tmpvar has joined the channel [05:28] kenperkins: btw, anyone want an invite say so [05:28] jesusabdullah: Oh, whoa, comments [05:28] tmzt: what's clipboard? [05:28] jesusabdullah: This thing I'm linking [05:28] kenperkins: the startup i work at [05:28] jesusabdullah: It's neat! You use this bookmarklet to "clip" divs wholesale [05:28] mark___: kenperkisn: nodejs based? [05:28] tmzt: right, but what does it do [05:28] kenperkins: clip the web: just for you, or share it, or make public [05:28] kenperkins: mark: yep [05:29] tmzt: oh, I was working on something like that, couldn't figure out how to put a transparent div over a page cross domain [05:29] kenperkins: tmzt: i clip recipes, prgramming tips, things to buy my wife [05:29] kenperkins: all kinds of random shit [05:32] kenperkins: mark: we're using node, nginx, riak and redis [05:33] Nexxy: kenperkins, redis for messaging? [05:33] kenperkins: redis for lots of things [05:33] mark___: kenperkins: hey, how's loadbalancing websockets via nginx? [05:33] kenperkins: anything require atomicicity [05:33] kenperkins: we't not using websockets yet [05:33] Nexxy: ACTION gasps [05:33] kenperkins: mostly ephemeral stuff tho Nexxy [05:33] mark___: kenperkins: lol, ** gasps ** as well, but I just had to turn it off because of the retarded Chrome 14 update. [05:34] Nexxy: kenperkins, interprocess stuff? [05:34] kenperkins: link? (or clip! :)) [05:34] kenperkins: well, sessions, invitations, tokens, minimal aggregations [05:34] kenperkins: longer term it'll change [05:34] kenperkins: ACTION waits patiently for redis cluster [05:34] argo_: if I do 'var myTest = require(__dirname + '/File.js') and inside File.js add 'var Test = 'Blah', then myTest.Test is valid? [05:36] argo_: sorry, Test is without var [05:36] mark___: oh hey, ken, where is Clipboard based out of? [05:37] Nexxy: kenperkins, why not use riak protobuff for that stuff? ;o [05:37] mark___: actually, everybody here that is working at a startup - where are ou out of? [05:37] mark___: *you [05:37] Nexxy: clustering would be all snappy and easy [05:37] Nexxy: mark___, PDX [05:37] kenperkins: Seattle :) [05:37] random123: Pittsburgh [05:38] mark___: hmm, I'm SD/LA. How is the node community in those areas? [05:38] mark___: existent at all? [05:39] random123: Probably 10 people [05:39] argo_: all good, figured it [05:39] Nexxy: and on what source do you base this estimate, random123 [05:40] kenperkins: nexxy: stuff like built in expire in redis is really nice [05:40] Nexxy: ohh [05:40] kenperkins: object store vs doc store and all that [05:40] Nexxy: yaa [05:40] Nexxy: I'm only vaguely familiar with redis so I was curious [05:40] kenperkins: we actually find redis and riak quite complimentary [05:40] Nexxy: yeah it sounds liek it [05:40] Nexxy: ACTION takes notes [05:41] kenperkins: re: protobuf, we'll look at that as we hit bottlenecks [05:41] Nexxy: are you using the protocol buffers with riak? [05:41] kenperkins: we're so far from that right now [05:41] kenperkins: (no) [05:41] Nexxy: oh okay [05:41] Nexxy: yeah I'm interested to see if others are using it in production [05:41] Nexxy: I'd like to but I'm scared [05:41] kenperkins: our problems with riak are going to be related to search perf/scale [05:41] kenperkins: search does not scale nicely with riak :) [05:41] kenperkins: we're working with them to rearchitect it :) [05:42] Nexxy: riak search? [05:42] kenperkins: yes [05:42] Nexxy: or link walking? [05:42] Nexxy: oh [05:42] kenperkins: riaksearch [05:43] phoe6 has joined the channel [05:43] phoe6 has left the channel [05:43] kenperkins: riaksearch is optimized for a relatively even and uniform distribution of both keywords and queries [05:43] phoe6 has joined the channel [05:43] kenperkins: i.e. the data is partitioned on the keyword instead of the server [05:43] kenperkins: (Bad) [05:43] random123: Well, supposed 1 in 200 workers are programmers that leaves 5K in Pittsburgh, if you said 2K of them were web devs, then what percentage of web devs are using Node? If it were 1% then it would be 20 people [05:44] kenperkins: huh [05:45] kenperkins: :P [05:45] jamonkko has joined the channel [05:46] random123: I'll bet 75% probably use PHP and if you let Python, Ruby, and Perl, JSP, take a bite there isn't much left [05:46] random123: ASP, Coldfusion, etc. [05:47] Nexxy: random123, that would imply a 42% unemployment rate in pittsburgh [05:47] harthur has joined the channel [05:47] chjj: loljsp [05:48] mikeal has joined the channel [05:49] random123: Well, I gave you 1,000,000 workers when I said 5K, if you type "pittsburgh population" into Google you will get 334,563 total, without even subtraction people who do not work, so I think I was generous [05:49] random123: I was figuring in 1 mill metro workers [05:50] Nexxy: but there is a population of 2.3m MSA [05:50] Nexxy: in pittsburgh ;P [05:52] hekkwan has joined the channel [05:52] algopats has joined the channel [05:53] algopats has joined the channel [05:53] random123: Nexxy: Well, in 2008 there were 155.2 mill workers in the US compared to 307 million people [05:54] Nexxy: lol [05:54] random123: so if half of people work then you can say 1.15 mill in metro work [05:54] random123: ;p [05:54] Nexxy: all I was trying to say is that you were pulling #s out of your ass, that's all ;P [05:55] ckpcw has joined the channel [05:56] random123: Yes, I was actually, probably over 100 have used Node.js, CMU is here [05:56] apanda has joined the channel [05:56] random123: Probably hundreds [05:56] ckknight has joined the channel [05:56] FearOfMusic has joined the channel [05:56] random123: ;p [05:57] stephank has joined the channel [05:58] ckknight: so turns out if I run a while loop in Mac OS 10.6 Terminal, it crashes my comp :P [05:58] ckknight: infinite loop, that is [05:59] random123: Looking at the alexa ratings, Node is growing fast, but if you look at PHP, its like China compared [05:59] random123: And its still doubled since last year [06:00] meso has joined the channel [06:01] Bogh has joined the channel [06:02] fson_ has joined the channel [06:03] xAt has joined the channel [06:07] pizthewiz_ has joined the channel [06:10] guidocalvano has joined the channel [06:11] admc has joined the channel [06:12] ckknight has joined the channel [06:12] eazyigz has joined the channel [06:13] zomgbie has joined the channel [06:14] erikfrey has joined the channel [06:16] isufy has joined the channel [06:18] mdaisuke_ has joined the channel [06:19] zastaph has joined the channel [06:19] zastaph has joined the channel [06:20] SamuraiJack has joined the channel [06:22] erikfrey: hi all. i've written a small node program that echoes a line at a time from a pipe via stdin to stdout [06:22] erikfrey: i'm trying to understand why it's close to 100x slower than python. am i doing it wrong? [06:22] erikfrey: https://gist.github.com/1164469 [06:23] H4ns: erikfrey: my guess is that it is because you do your line parsing in javascript, where c++ and python do it in c. [06:25] bosky101 has joined the channel [06:26] jesusabdullah: I'll also throw out there that printing to screen is surprisingly time-consuming [06:26] H4ns: erikfrey: also, you are using asynchronous i/o in node where the other two programs use synchronous i/o in tight loops. there are many ways how you could optimize the node program, but first question you should ask yourself is what you want to achieve. [06:26] H4ns: erikfrey: if you want to write programs that do batch processing of text files, node is not necessarily the best environment that you can choose. [06:26] isufy has joined the channel [06:26] FireFly|n900 has joined the channel [06:27] erikfrey: H4ns: thanks. i wanted to use node to wrap programs and communicate with them over pipes [06:27] bosky101 has joined the channel [06:27] robotmay has joined the channel [06:27] nevir: Does V8 give the ability to freeze an Array? Or should I just stick to defining such a thing as an Object? [06:28] some1else has joined the channel [06:28] H4ns: erikfrey: if all that matters to you is speed and if you only want to talk to one program at a time, node is not the best environment. [06:28] nevir: Google is proving fruitless [06:28] bosky101 has left the channel [06:29] zomgbie has joined the channel [06:30] erikfrey: H4ns: thanks. i have a few other considerations but yeah, throughput is important and it's possiblet that the messages will be very fine-grained [06:32] erikfrey: H4ns: in the interest of experimenting, do you think that if i wrote a c lib that did the scanning for newlines and emitting chunks, the node benchmarks would be a little more on par? [06:32] tnlogy has joined the channel [06:32] H4ns: erikfrey: possible, but you'd also need to consider how node handles files internally. i'm not exactly sure myself, but i don't think that node uses stdio, so you'll have to interface to the buffering code. [06:33] H4ns: erikfrey: there is a ReadLine object, did you look at that yet? [06:33] erikfrey: i did [06:33] erikfrey: i think it had pretty much the same perf [06:33] erikfrey: but let me try again, sec [06:35] H4ns: erikfrey: btw, for the 100x figure, you need to consider that your python program does not print the data. [06:35] yogurt_truck has joined the channel [06:35] gyeh has joined the channel [06:35] erikfrey: yeah that was a typo [06:36] erikfrey: but you're right, that drops it to 50x [06:36] AvianFlu_ has joined the channel [06:36] H4ns: \o/ [06:36] erikfrey: let me try readline [06:36] clu3 has joined the channel [06:37] samj has joined the channel [06:38] H4ns: erikfrey: just verify that the problem is the async i/o and not the buffering, i'd also try a synchronous node version [06:40] simenbrekken has joined the channel [06:41] erikfrey: so, this is interesting [06:41] erikfrey: perhaps i've done something wrong [06:41] erikfrey: but using readline seems to have mangled the output [06:41] erikfrey: https://gist.github.com/1164496 [06:41] H4ns: erikfrey: frankly, readline seems to be meant for terminal i/o anyway [06:42] andree has joined the channel [06:42] erikfrey: H4ns: apologies i'm very new to node.js, there is a synchronous version? [06:42] H4ns: erikfrey: yeah, of read, that is. readSync() [06:42] erikfrey: oh okay [06:43] mape: stagas: damit, why do we keep doing the same things? :P [06:44] rfay has joined the channel [06:44] stagas: mape: haha [06:45] mape: stagas: yours can't do redis because it has to be sync? [06:46] amerine has joined the channel [06:46] mikeal has joined the channel [06:46] meso has joined the channel [06:49] stagas: mape: no it's async but currently stores in sync. it's only a few lines to change to support any kv [06:49] mape: ah k, could be a neat thing to add [06:50] konobi: readline by it's nature is rather async [06:50] Yoric has joined the channel [06:51] H4ns: konobi: not more than read() [06:52] konobi: H4ns: gnu readline like bsd editline? [06:53] H4ns: konobi: i mean "readline" in the sense of "read a line". [06:53] H4ns: konobi: anyway, it does not seem to be the right tool for the job at hand anyway [06:54] erikfrey: H4ns: not sure i'll be able to readSync from stdin: http://stackoverflow.com/questions/3430939/node-js-readsync-from-stdin [06:55] AvianFlu: why would you want to read synchronously from stdin? [06:55] H4ns: erikfrey: that is because there already is a suspended input stream on stdin by default. you need to get rid of that first. [06:55] JakeyChan: what is __defineGetter__ ??? [06:55] H4ns: AvianFlu: he wants to do a performance comparison with other synchronous programming languages. [06:56] konobi: JakeyChan: part of the JS specs [06:56] JakeyChan: oh :) [06:56] AvianFlu: ...node isn't synchronous? [06:56] simenbrekken: JakeyChan: http://lmgtfy.com/?q=__defineGetter__ [06:56] H4ns: erikfrey: to keep it simple for the measurement, you could just operate on a file that you open explicitly instead. [06:56] H4ns: AvianFlu: node supports asynchronous i/o, but it can do synchronous, too. [06:56] simenbrekken: AvianFlu: some operations are but most aren't [06:56] AvianFlu: I realize we have synchronous methods, but why use node for that? [06:56] AvianFlu: I was being facetious [06:57] rgl has joined the channel [06:57] simenbrekken: well when you're reading tiny files like configs etc it would be a bit of a pain having to wrap them all in a callback :/ [06:57] JakeyChan: member:simenbrekken: thanks ! [06:57] H4ns: AvianFlu: he does it for a performance comparison as he's disappointed by the measured speed of node (async) vs. other languages (c++ and python, sync) [06:57] simenbrekken: speaking of asynchronous, any tips for a module that does chaining and parallell execution? [06:57] butu5 has joined the channel [06:57] groom has joined the channel [06:58] lightcap_ has joined the channel [06:59] nevir: simenbrekken: Something like https://github.com/chrislewis/monad.js, maybe? [07:00] simenbrekken: I was more thinking I'm reading 1000 urls and I'd like to get notified as each completes but also when all of them completes either sequentially or in parallell [07:02] smtlaissezfaire has joined the channel [07:02] raphdg has joined the channel [07:04] CrypticSwarm has joined the channel [07:04] shapeshed has joined the channel [07:05] markwubben has joined the channel [07:06] mraleph has joined the channel [07:06] fmeyer has joined the channel [07:06] SubStack: simenbrekken: sounds like you could use some rate-limiting [07:06] simenbrekken: SubStack: maybe that too :) [07:07] SubStack: my flow control lib does that: https://github.com/substack/node-seq [07:07] euforic has joined the channel [07:07] euforic: any one know of a good node module for ofx retrieval and parsing form banks ? [07:07] SubStack: Seq(urls).parEach(10, fetchFn).seq(allDoneFn) [07:08] SubStack: will fetch 10 urls at a time [07:08] SubStack: with fetchFn [07:08] SubStack: and call allDoneFn when everything is done [07:08] simenbrekken: brilliant, thanks! [07:08] simenbrekken: can you tell it to continously run 10 tasks and fill up with new ones as the previous completes or is that how it works now? [07:09] SubStack: that's how it works now [07:09] mdaisuke has joined the channel [07:09] SubStack: well new ones from the urls array you give it at least [07:10] igl: require('hashish') :S [07:10] SubStack: igl: what of it? :p [07:10] paulwe_ has joined the channel [07:11] mokane: hi all [07:11] igl: i would call it skuff :> [07:11] igl: morning [07:11] cosmincx has joined the channel [07:13] er1c_ has joined the channel [07:13] jhurliman has joined the channel [07:14] mokane: i kind of googled a lot about error handling patterns in node and still cant wrap my head around it, could someone point me to some node module? or better a pattern ... [07:14] ohtogo has joined the channel [07:14] mokane: what would be a best practice if there is one ... [07:14] simenbrekken: mokane: From my modest experience: Usually throwing errors is a bad idea' [07:15] topaxi has joined the channel [07:15] simenbrekken: mokane: you'll want to do Blah(function(err, result) { if (err) handleError(err) } for async cases atleast [07:15] jesusabdullah: well [07:15] stonebranch has joined the channel [07:15] jesusabdullah: I'm hardly an expert, but it's largely the same as with anything else [07:15] mokane: ok [07:15] H4ns: node mostly renders javascripts exception handling useless. [07:16] jesusabdullah: except that there's a convention for async stuff to return [07:16] jesusabdullah: (err, thingYouActuallyCareAbout) [07:16] jesusabdullah: or, rather, apply those to your callback [07:16] jesusabdullah: so, thing(function(err, data) { ... } ) [07:16] jesusabdullah: and if there's no error, then err === null [07:16] mokane: it would be awsome to have one single point in the whole app [07:16] Nss has joined the channel [07:17] mokane: and then handle adecuately [07:17] aspect_: s/s exception handling// [07:17] jesusabdullah: so then you do, if (err) { /*do something*/ } else { /*what you actually wanted to do*/ } [07:17] jesusabdullah: There *is* a way to catch uncaught exceptions [07:17] jesusabdullah: but generally, an exception is bad right? [07:17] H4ns: mokane: you can always use an EventListener to consume your errors and have all your callbacks forward errors to that listener. [07:18] versicolor has joined the channel [07:18] Druide_ has joined the channel [07:18] H4ns: jesusabdullah: exceptions are useless in node because more often than not, you don't have a connection between your lexical and your execution context. [07:18] mokane: h4ns: you mean using the eventemitter stuff? [07:18] jesusabdullah: I prefer my stuff to crash and burn on fuckup [07:18] H4ns: mokane: right. [07:18] jesusabdullah: What do you mean, H4ns ? [07:18] aspect: jesusabdullah: how do you catch uncaught exceptions from callbacks? [07:19] aspect: .. essentially, what H4ns said [07:19] catb0t: SyntaxError: Unexpected identifier [07:19] dob_ has joined the channel [07:19] H4ns: jesusabdullah: with synchronous javascript (or java without anon inner classes, or c++ before lambdas), you have a correlation between your lexical context and your exception handling context. that is: [07:20] jesusabdullah: aspect: http://nodejs.org/docs/v0.4.10/api/process.html#event_uncaughtException_ [07:20] mokane: ok thanks folks, I got it clearer now [07:20] jesusabdullah: Basically, H4ns, idk what "lexical context" means [07:20] H4ns: jesusabdullah: if you look at some code and it throws an exception somewhere, you can visually unwind to the top level until you find a handler, or you can assume that the top-level function raises the exception. [07:20] versicolor has joined the channel [07:20] mrtrosen has joined the channel [07:20] aspect: jesusabdullah: noted for future reference, thanks [07:21] jesusabdullah: I can read stack traces in node too..? [07:21] jesusabdullah: Usually, anyway [07:21] jesusabdullah: I've seen some squirrely errors [07:21] jesusabdullah: but those are mostly due to not catching garbage early on and having it *not* error until much later than the original cause [07:21] groom has joined the channel [07:21] jesusabdullah: it's because js is *too* good at mashing together ridiculous types [07:23] seivan has joined the channel [07:24] robotmay has joined the channel [07:25] NetRoY has joined the channel [07:26] mokane: I got another question: if something bad happens, and my programm decides that its time to restart itself... how would one handle this gracefully? I mean, could one have two node instances running, one doing the actual stuff and one guarding/monitoring over. I this a good idea? [07:26] jesusabdullah: mokane: It sounds like you want a process monitor. [07:26] H4ns: mokane: depends on what your availability requirements are [07:26] aspect: how is your process normally started? [07:26] jesusabdullah: mokane: Check out https://github.com/indexzero/forever perhaps. [07:26] AvianFlu: mokane: npm install forever -g [07:27] jesusabdullah: indeed [07:27] aspect: a simple approach is to just run it from a shell script with a while loop [07:27] AvianFlu: jesusabdullah++ [07:27] v8bot_: AvianFlu has given a beer to jesusabdullah. jesusabdullah now has 2 beers. [07:27] catb0t: jesusabdullah now has 1 beer [07:27] jesusabdullah: You can use it both as a cli tool and programmatically [07:27] AvianFlu: catb0t you suck. [07:27] catb0t: suck , real 'm doing a site I'm working on went live on a page with Jade h 'jade' you [07:28] JP- has joined the channel [07:28] jesusabdullah: jade YOU [07:30] erikfrey: H4ns: okay so the plot thickens a bit [07:31] mokane: aspect: I think Im going to start as daemon in /etc/init.d/... but maybe forever module does it as jesusabdullah and AvianFlu pointed out [07:31] H4ns: erikfrey: how? [07:31] erikfrey: i wasn't able to figure out how to get node to do syncronous reads but i was able to write an async stdio echo client in c++/asio to see if it was really the async stuff that was slow [07:31] jacobolus has joined the channel [07:31] erikfrey: here are the results [07:31] erikfrey: https://gist.github.com/1164568 [07:32] AvianFlu: mokane: forever daemonizes your processes [07:32] erikfrey: the thing that is a bit confusing to me is that if i pipe files to node, it's 4x slower than if i pipe cat [07:32] aspect: mokane: forever's probably a good way to handle it if you're providing an init script -- the init script can also provide stop/restart by sending messages to the forever process [07:32] AvianFlu: forever start myapp.js [07:32] bengrue has joined the channel [07:32] mokane: yes [07:33] H4ns: aspect: node always sets up asynchronous i/o on stdin, so there is some unevitable overhead. [07:33] H4ns: not aspect , erikfrey [07:33] aspect: had me confused for a moment [07:33] MUILTFN has joined the channel [07:34] H4ns: erikfrey: if you want to measure raw synchronous i/o speed, you need to use readSync. that is why i suggested opening the file rather than using stdin for measurement if you can't quickly find out how to convince node not to open stdin itself. [07:34] H4ns: erikfrey: without seeing the source of your test program, it is hard to judge why you still see such a large performance difference between node and c++ (supposedly) [07:35] erikfrey: sure, let me paste, sec [07:35] jacobolu_ has joined the channel [07:35] [AD]Turbo has joined the channel [07:36] erikfrey: this is a bastardization of an asio example. not apples and apples but i wanted to test your idea that async isn't an ideal way to communicate to processes: [07:36] erikfrey: https://gist.github.com/1164576 [07:36] cosmincx has joined the channel [07:37] [AD]Turbo: hi there [07:38] H4ns: erikfrey: ok, and your node program still does its own line parsing as before? [07:38] H4ns: erikfrey: how large are the buffers that your "data" callback receives? [07:38] erikfrey: H4ns: yes. i'm hoping this means that the slow part is the line parsing in javascript [07:38] H4ns: erikfrey: that's what i would assume, but you'll have to measure to be sure. [07:40] __doc__ has joined the channel [07:41] erikfrey: H4ns: node seems to be bringing in around 40k per chunk of data [07:41] H4ns: erikfrey: sounds good. [07:42] tbassetto has joined the channel [07:42] whitman has joined the channel [07:44] hybsch has joined the channel [07:45] Nss has joined the channel [07:46] ckknight has joined the channel [07:48] bosky101 has joined the channel [07:48] bosky101 has left the channel [07:50] Bogh has joined the channel [07:51] Bogh has left the channel [07:52] stonebranch has joined the channel [07:52] ccare has joined the channel [07:54] jomoho has joined the channel [07:56] alek_br has joined the channel [07:57] meso_ has joined the channel [08:01] Nuck: It's funny. I actually don't know how many salts my passwords have [08:01] Nuck: And it's probably for the best, too. [08:01] Nuck: But it's something like 4. [08:01] dob_ has joined the channel [08:01] mokane has left the channel [08:03] bzinger has joined the channel [08:03] rfay has joined the channel [08:04] JakeyChan: what is the process.nextTick ?? [08:04] JakeyChan: is it multi-thread ? [08:04] uchuff has joined the channel [08:04] SubStack: it's like setTimeout(fn, 0) [08:04] stagas: mape: added persistence :P https://github.com/stagas/memoize/commit/7be4bdbd19edd931de086631a5178c436d9b2dfd [08:04] SubStack: (except in node that hangs) [08:04] SubStack: oh wait! [08:04] SubStack: that got fixed, awesome [08:05] SubStack: used to not execute [08:05] unlink has joined the channel [08:05] unlink has joined the channel [08:05] JakeyChan: but it is like not same as :) [08:05] JakeyChan: not equal :D [08:05] mape: stagas: so now I can cache redis in redis? :P [08:05] SubStack: JakeyChan: well it executes first thing after the event queue fires up [08:06] stagas: mape: haha yeah [08:06] Ned_ has joined the channel [08:06] mpavel has joined the channel [08:07] JakeyChan: the process object is supported by node.cc ? [08:07] stagas: mape: still has an issue that it doesn't auto delete on expiry, so you need to take care of clearing the db otherwise it may grow [08:07] hellp has joined the channel [08:07] sfoster has joined the channel [08:08] dob_: did somebody try to use now.js with jquery ui autocomplete? [08:09] rgl has joined the channel [08:11] Nexxy has joined the channel [08:11] DrMcKay has joined the channel [08:14] tylerstalder has joined the channel [08:14] Shrink has joined the channel [08:14] Shrink has joined the channel [08:15] Shrink has joined the channel [08:15] Shrink has joined the channel [08:17] i42n has joined the channel [08:21] rphillips has joined the channel [08:23] bergie has joined the channel [08:24] FireFly|n900 has joined the channel [08:24] FireFly|n900 has joined the channel [08:26] djcoin has joined the channel [08:27] jzacsh has joined the channel [08:28] chrisumbel has joined the channel [08:28] indexzero has joined the channel [08:28] chrisumbel has joined the channel [08:28] jzacsh: mongoosejs question: not sure how to access methods i've created like, "Schema.methods.myMethod = function () {};" -- i'm not sure where I can get to myMethod() -- any thoughts? (access mongoose.Schema.methods.myMethod() doesn't work) [08:29] tnlogy has joined the channel [08:30] mts001 has joined the channel [08:31] devaholic: jzacsh: what about Schema.methods.myMethod [08:32] aabt has joined the channel [08:33] junkee[] has joined the channel [08:34] sgimeno has joined the channel [08:34] bergelmir has joined the channel [08:35] sourcode has joined the channel [08:37] robhawkes has joined the channel [08:37] bergelmir has joined the channel [08:38] bosky101 has joined the channel [08:38] jzacsh: devaholic: no luck... trying to figure out where it is [08:38] mikedeboer has joined the channel [08:38] knirhs has joined the channel [08:39] jzacsh: i've exported var mongoose (which is the result of require('mongoose');) and also exported my schemas like: exports.Card = mongoose.model('Card', Card); [08:39] jzacsh: so both myModule.Card and myModule.mongoose don't seem to have this path in them [08:40] devaholic: youre using Schema or Card to set myMethod [08:40] ryanj has joined the channel [08:40] nevir has joined the channel [08:40] jzacsh: devaholic: using Card [08:41] jzacsh: so: Card.methods.getStack = function (callback) {}; (10 lines above the export.Card = Card;) [08:43] kulor-uk has joined the channel [08:44] jzacsh: devaholic: so should i be using the actual Schema object that i used to create my schema? var Schema = mongoose.Schema; ? [08:46] devaholic: sorry, it's been a while since ive worked with mongoose [08:48] jzacsh: yeah, i'm searching everywhere using util.inspect(/*depth of 6*/) and i'm not seeing anything. [08:48] Shrink has joined the channel [08:49] markwubben has joined the channel [08:49] mpavel has joined the channel [08:51] tim_smart has joined the channel [08:55] piscisaureus has joined the channel [08:56] Nuck: I'm wondering [08:56] dmkbot has joined the channel [08:56] Nuck: Are there any cron-like things for Node? [08:56] DrMcKay: Nuck: yes [08:56] Nuck: I wanna just set an event to happen at midnight, etc. [08:57] DrMcKay: didn't we have any issues since midnight? [08:57] Nuck: (and I want something that scales better than zillions of setTimeout) [08:57] DrMcKay: Nuck: https://github.com/ncb000gt/node-cron [08:58] Nuck: ncb000gt: You just keep making all these things I'm using now D: WTF [08:58] CStumph has joined the channel [08:58] DrMcKay: fuck! someone fix this github API :< [08:59] DrMcKay: !ping [08:59] dmkbot: DrMcKay, pong [08:59] DrMcKay: dmkbot: you fucking asshole!' [09:00] DrMcKay: ACTION goes to grab a flamethrower [09:00] DrMcKay: ACTION traceroutes api.github.com [09:00] simenbrekken has joined the channel [09:00] DrMcKay: ACTION BRB [09:01] kawaz_h has joined the channel [09:04] aoberoi_ has joined the channel [09:04] rphillips has joined the channel [09:04] kulor-uk has joined the channel [09:04] Dreamer3 has joined the channel [09:04] Threenplusone has joined the channel [09:04] DrMcKay: OH: "You've got a problem writing JavaScript so you decide to introduce a compile step. Now you have two problems." [09:04] bosky101 has joined the channel [09:05] SubStack: I run my compile step in the BROWSER at RUNTIME [09:05] SubStack: so there [09:05] Shrink has joined the channel [09:05] SubStack: turns out it's much faster to do this than to send up the gigantic generated sources that I'm creating [09:06] DrMcKay: SubStack: well, it might be the way [09:06] SubStack: I'm also using vm.runInNewContext() and http.request() in the browser [09:07] SubStack: AS IF BY MAGIC [09:07] DrMcKay: SubStack: wut? [09:07] asabil has joined the channel [09:07] SubStack: DrMcKay: https://github.com/substack/node-browserify/blob/master/builtins/vm.js [09:08] SubStack: https://github.com/substack/http-browserify [09:08] DrMcKay: ah, browserify [09:08] DrMcKay: but runInNewContext... [09:08] DrMcKay: OK, that's more cool than I though [09:09] DrMcKay: never mind, I'm stopping to use web servers today [09:10] SubStack: I'll probably spin off vm into its own module and require {http,vm}-browserify as dependencies from browserify core [09:10] SubStack: easier to manage that way [09:10] forzan has joined the channel [09:14] DrMcKay: FUCK, DMKBOT! [09:14] DrMcKay: we've HAD issues! [09:15] Rob- has joined the channel [09:15] luke` has joined the channel [09:15] davidcoallier has joined the channel [09:16] JumpMast3r has joined the channel [09:17] asabil has joined the channel [09:17] dmkbot1 has joined the channel [09:17] DrMcKay: oh, my deploy scripts are messed up [09:17] DrMcKay: DMKBOT WHAT THE FUCK?! [09:18] jwm has joined the channel [09:18] trepan has joined the channel [09:19] kepheus has joined the channel [09:20] rendar has joined the channel [09:20] andrewfff has joined the channel [09:22] unlink has joined the channel [09:22] unlink has joined the channel [09:22] bentkus: fuck the what [09:22] Nuck: FUCK THE SYSTEM [09:23] Nuck: So, I'm writing unit tests [09:23] Nuck: I caved. [09:23] Nuck: :P [09:23] Nuck: I realized I just can't keep testing my shit by hand [09:23] DrMcKay: Nuck: yeah, I did it recently as well [09:24] Nuck: DrMcKay: Vows? [09:24] jamonkko has joined the channel [09:24] Nuck: I'm gonna write a test harness for my database layer sometime soon prolly [09:25] DrMcKay: Nuck: no, I'm fine with assert for now [09:25] Nuck: ah [09:25] DrMcKay: Nuck: but generally, I decided to do unit testing, not only in JS [09:25] Nuck: This is a ginormous project so it calls for ginormous tools :D [09:25] kepheus has left the channel [09:26] DrMcKay: Nuck: :D [09:26] Nuck: SubStack: Nice hackery on that vm BTW [09:26] DrMcKay: or wait, maybe it shouldn't report this issues now... [09:26] phoe6 has left the channel [09:27] DrMcKay: oops. I just debugged unexisting problem [09:27] dominictarr has joined the channel [09:27] Drakonite has joined the channel [09:27] DrMcKay: I'm getting older [09:27] DrMcKay: (or just didn't supply my body with caffeine) [09:27] Nuck: ACTION points to CoffeeScript :P [09:28] DrMcKay: Nuck: :D. [09:28] rphillips has joined the channel [09:29] DrMcKay: and I've fucked my deploy scripts, btw [09:30] Glenjamin: Nuck: what are you using for your unit tests? [09:30] Nuck: Glenjamin: Nothing yet, prolly vows [09:30] Glenjamin: if you like mocking, i'd avoid vows [09:31] japj has joined the channel [09:31] Glenjamin: unless you have really good explicit DI [09:31] dmkbot1 has joined the channel [09:31] DrMcKay: "dmkbot1"? [09:31] Nuck: Glenjamin: Huh? [09:31] Nuck: Mocking? Dl? [09:32] Glenjamin: Nuck: because it runs all tests in parallel, if you try and mock or stub external interfaces, they can stomp all over each other in async code [09:32] dmkbot has joined the channel [09:32] Glenjamin: if you have really well separated dependency injection, you might be able to avoid that problem [09:32] blup has joined the channel [09:32] DrMcKay: fuck! I've deployed wrong branch [09:33] CIA-65: node: 03Ryan Dahl 07master * re3413f0 10/ lib/net_uv.js : [09:33] CIA-65: node: net_uv: throw when people construct net.Socket(fd) [09:33] CIA-65: node: Easier to catch compatibility errors. - http://git.io/BoAnRw [09:33] DrMcKay: master instead of fix-github-being-an-idiot [09:33] Nuck: Glenjamin: Dependency injection? Eh? I just require('../thing.js')(function(){}) and boom, async dependency handling [09:34] Nuck: Glenjamin: And not all tests are parallel [09:34] Glenjamin: well no, batches are separate [09:34] dmkbot has joined the channel [09:34] DrMcKay: yay [09:34] Glenjamin: but iirc you cant have multiple batches on the same topic [09:35] DrMcKay: !ping [09:35] dmkbot: DrMcKay, pong [09:36] DrMcKay: ping me if this thing goes crazy (it's very likely if they fix this issues thing) [09:37] jbrokc has joined the channel [09:37] theCode has joined the channel [09:38] Nuck: Glenjamin: Honestly, the only thing that turns me off of Vows is the syntax. [09:38] Glenjamin: heh, that was one of the bits I liked [09:38] Nuck: From what I can tell (which is generally enough to be vaguely right), Vows will fill my needs. [09:38] Glenjamin: the execution model just didn't quite mesh for me [09:39] antono has joined the channel [09:44] algopats: "/alias ADDALLCHANNELS script exec foreach my \$channel (Irssi::channels()) { Irssi::command("channel add -auto \$channel->{name} \$channel->{server}->{tag} \$channel->{key}")\;}" [09:44] Shrink has joined the channel [09:45] algopats: sorry [09:45] algopats: newbie on irssi [09:46] trepan has joined the channel [09:46] trepan has joined the channel [09:46] amigojapan has joined the channel [09:50] adrianmg has joined the channel [09:54] DrMcKay: what the hell? I can't assign to exports? [09:55] mhauri has joined the channel [09:55] SubStack: DrMcKay: you can assign to module.exports [09:56] DrMcKay: SubStack: oh, thank you [09:56] DrMcKay: (also, expect stupid questions today) [09:57] bosky101 has joined the channel [09:57] algopats has joined the channel [09:59] Glenjamin: making something fun? [10:00] DrMcKay: Glenjamin: nah, just tired and pissed off [10:00] DrMcKay: Glenjamin: but, yeah, we're making something fun with AvianFlu and TheJH [10:00] DrMcKay: Glenjamin: wanna join? [10:00] Glenjamin: potentially [10:01] DrMcKay: Glenjamin: https://github.com/Relief-1/Relief1 [10:02] DrMcKay: Glenjamin: also, #relief1 channel :) [10:02] utopia has joined the channel [10:03] algopats has joined the channel [10:04] mts001 has joined the channel [10:04] robotmay has joined the channel [10:05] bosky101 has joined the channel [10:07] utopia: Is it possible to debug scripts in node.exe (Windows)? [10:09] japj: unfortunately the debugger is not functioning on windows yet, atleast node -debug does not work yet [10:09] japj: maybe you could do remote debugging, but I don't know how/if that would work [10:10] DrMcKay: gosh, mongoose-auth docs are totally messed up [10:11] irahgel has joined the channel [10:11] DrMcKay: I mean, why don't they describe auth without using express? [10:12] mc_greeny has joined the channel [10:12] mike5w3c_ has joined the channel [10:14] fraserkillip has joined the channel [10:15] fermion has joined the channel [10:15] kurtzhong has joined the channel [10:18] N0va has joined the channel [10:19] robotmay has joined the channel [10:20] cachemoney has joined the channel [10:20] utopia: Thanks japj.I found somthing about remote debugging: https://github.com/joyent/node/wiki/Using-Eclipse-as-Node-Applications-Debugger/8e08b787edc4ad9bdf5c563f59531d434cf704cd [10:21] garrensmith has joined the channel [10:21] unlink has joined the channel [10:21] unlink has joined the channel [10:23] ttpva_ has joined the channel [10:24] garrensmith: morning all [10:25] bnoordhuis has joined the channel [10:25] CStumph has joined the channel [10:27] DrMcKay: garrensmith: *yawns* mooorning [10:27] garrensmith: lol [10:27] xastey has joined the channel [10:28] Guest65982 has joined the channel [10:28] Guest65982 has left the channel [10:29] markwubben has joined the channel [10:29] felixhummel has joined the channel [10:30] pickels has joined the channel [10:30] jetienne has joined the channel [10:36] mendel_ has joined the channel [10:36] fly-away has joined the channel [10:37] Jakey has joined the channel [10:37] Jakey: oh my [10:37] Jakey: it exist [10:37] Jakey: soooooooo [10:37] Jakey: any vid tuts on the internet? [10:37] Jakey: google sucks [10:37] Jakey: very suck [10:37] bwinton has joined the channel [10:37] chrisumbel has joined the channel [10:38] industrial: you suck at googling you mean [10:38] chrisumbel_ has joined the channel [10:38] Jakey: no [10:38] Jakey: googles sucks [10:38] Jakey: bing is the best [10:38] Jakey: www.bing.com [10:39] industrial: we dont care [10:39] Jakey: lol [10:39] industrial: try formulating your sentences without 4 enters in between [10:39] industrial: :p [10:41] Jakey: okay my answer still hasn't been answer [10:41] Jakey: so if anyone wants to add please my pleasure [10:41] Jakey: . [10:42] Jakey: industrial is trolling [10:42] garrensmith: Jakey: what is your question? [10:42] Jakey: any node.js vid tuts on the internet? [10:43] Jakey: :) [10:43] Jakey: or anything like a retail video [10:43] Jakey: like lynda [10:43] Jakey: etc... [10:43] H4ns: Jakey: navigate to youtube.com, enter "node.js" in the search box. press enter. [10:43] Jakey: yes [10:43] Jakey: i did that [10:43] Jakey: very low quality vids [10:44] DrMcKay: ACTION goes to cry into a pillow [10:44] Jakey: okay fine [10:44] Charuru has joined the channel [10:45] Jakey: i'll go to read books [10:45] Jakey: ACTION sighs [10:45] dmkbot has joined the channel [10:45] japj: blip.tv also has node js videos [10:45] japj: from jscons and nodeconf [10:45] japj: *jscond [10:45] japj: *jsconf [10:45] Jakey: DrMcKay why are you crying [10:45] japj: damn [10:45] japj: keyboard ;) [10:46] Jakey: do you feel sorry for me DrMcKay [10:46] Jakey: aawwwwwww [10:46] Jakey: thanks man japj [10:46] Jakey: i'll check it [10:53] stagas: mape: just realized I can memoize the memoize https://gist.github.com/1164841 [10:53] Jakey: the memoize technique [10:54] ckknight has joined the channel [10:56] okuryu has joined the channel [10:58] Jakey: japj [10:58] Jakey: you sonofa#$#%# [10:58] Jakey: i can't find it [10:59] max_dev has joined the channel [10:59] Jakey: we found no results for node.js [10:59] industrial: Jakey: I was not trolling, use less enters in your sentences, it makes you look like a 12 year old. [11:00] japj: http://www.google.nl/search?cx=c&sourceid=chrome&ie=UTF-8&q=blip+tv+node [11:00] japj: http://blip.tv/jsconf [11:00] japj: https://gist.github.com/957816 [11:00] industrial: Jakey: and you are now using other people to search for you [11:00] Jakey: well i enter node.js in blip.tv search engine [11:00] Jakey: orly industrial [11:00] japj: https://gist.github.com/958556 [11:00] industrial: yealry l2internet [11:01] japj: https://github.com/joyent/node/wiki/Resources Talks section [11:03] sechrist: are there any other "in-memory" sqls than voltdb? [11:03] Jakey: eat this industrial [11:03] Jakey: http://i56.tinypic.com/51alq1.png [11:04] dominictarr has joined the channel [11:04] sechrist: oh snap, sqlite should work [11:05] Jakey: yes anything should work [11:05] Jakey: if you work on it long enough [11:05] Jakey: okay? [11:05] sechrist: wat [11:05] Jakey: you heard me [11:06] japj: Jakey: did you get all those links I just posted to this channel? there are a ton of nodejs videos in there if you are really interested [11:06] tbassetto has joined the channel [11:06] Jakey: yes [11:06] Jakey: japj [11:06] Jakey: thank you [11:06] Jakey: it will keep me busy [11:06] a111 has joined the channel [11:06] rfay has joined the channel [11:06] Jakey: so i wont bother #node.js [11:06] Jakey: until then [11:06] Jakey: sechrist [11:06] Jakey: you heard me [11:06] sechrist: -_- [11:06] Jakey: lol [11:07] butu5: Jakey: http://www.google.co.in/search?sourceid=chrome&ie=UTF-8&q=node+js+site%3Ablip.tv [11:07] sechrist: more 12 year olds [11:07] sechrist: yay [11:07] japj: well have fun watching them [11:07] Jakey: ACTION slaps sechrist [11:07] sechrist has left the channel [11:07] Jakey: hmmmm [11:07] Jakey: thx butu5 but too late in the game [11:08] butu5: :) yeah read few more discussion now.. [11:09] DrMcKay has left the channel [11:09] butu5: *I gone through [11:09] hasta84 has joined the channel [11:10] hasta84: Hey there, does anyone have experience with mysql drivers and maybe can suggest one? [11:10] a111: I want to learn a new language, Ive done some PHP but I want to learn a new language. I have no interest in client side javascript and all the guides / books i can find for javascript are focused on clientside web design [11:10] Jakey: a11 ask in #jquery for that] [11:11] H4ns: a111: http://www.nodebeginner.org/ [11:11] Jakey: okay [11:11] Jakey: back to haunt you fools later [11:11] Jakey has left the channel [11:13] a111: Thanks H4ns :) [11:14] jbrokc_ has joined the channel [11:15] jakehow_ has joined the channel [11:15] jakehow has joined the channel [11:17] Sn4ppl has joined the channel [11:19] navaru has joined the channel [11:19] jbrokc has joined the channel [11:21] febits has joined the channel [11:23] jbrokc_ has joined the channel [11:23] craigpetchell has joined the channel [11:24] balupton has joined the channel [11:26] kimico has joined the channel [11:26] tanepiper has joined the channel [11:27] Net_RoY has joined the channel [11:29] cjroebuck has joined the channel [11:30] micheil has joined the channel [11:31] Sn4ppl has left the channel [11:31] toki_kanno has joined the channel [11:31] skm has joined the channel [11:32] FrankyBits has joined the channel [11:32] FrankyBits has left the channel [11:34] rurufufuss has joined the channel [11:35] DrMcKay has joined the channel [11:35] slaskis has joined the channel [11:36] |Freeman| has joined the channel [11:38] roidrage has joined the channel [11:38] adrianmg has joined the channel [11:39] adrianmg has left the channel [11:39] Kingdutch has joined the channel [11:39] fairwinds has joined the channel [11:40] dmkbot has joined the channel [11:44] mehtryx has joined the channel [11:44] boaz has joined the channel [11:45] squeese has joined the channel [11:45] SamuraiJack has joined the channel [11:46] brianseeders has joined the channel [11:48] antono has joined the channel [11:55] mhauri has joined the channel [11:56] ttpva has joined the channel [11:59] hij1nx has joined the channel [12:02] boaz has joined the channel [12:03] charleyd has joined the channel [12:16] rfay has joined the channel [12:16] sriley has joined the channel [12:18] Yoric has joined the channel [12:25] mts001 has joined the channel [12:25] bosky101 has joined the channel [12:25] fumanchu182 has joined the channel [12:25] JoshC1 has joined the channel [12:26] navaru has left the channel [12:28] ts__ has joined the channel [12:30] jetienne has joined the channel [12:31] Yuffster has joined the channel [12:34] ecin_ has joined the channel [12:36] xtianw has joined the channel [12:37] jamonkko has joined the channel [12:41] aconbere has joined the channel [12:41] jonaslund_ has joined the channel [12:43] Shrink has joined the channel [12:43] Shrink has joined the channel [12:46] eazyigz has joined the channel [12:47] junkee[] has joined the channel [12:49] meandi2 has joined the channel [12:50] christophsturm has joined the channel [12:51] kulor-uk has joined the channel [12:51] v01dless- has joined the channel [12:52] CrypticSwarm_ has joined the channel [12:52] ecin has joined the channel [12:53] geetarista has joined the channel [12:54] vvo has joined the channel [12:55] vvo has left the channel [12:55] ryanfitz has joined the channel [12:56] meandi has joined the channel [12:56] vvo has joined the channel [12:58] k1ttty has joined the channel [13:00] kulor-uk has joined the channel [13:02] Voxxit has joined the channel [13:02] Voxxit has left the channel [13:06] meandi has joined the channel [13:06] mikekunze has joined the channel [13:06] tnlogy has joined the channel [13:07] tnlogy has joined the channel [13:09] meandi2 has joined the channel [13:09] killfill: hi [13:10] killfill: i have a question about javascript and "sprites", im doing alittle game. i know its off topic, but cannot find any mailing list related to javascript-games... anyone knows one? [13:10] mikekunze has joined the channel [13:13] ehedenst has joined the channel [13:14] willwhite has joined the channel [13:15] jakehow has joined the channel [13:15] jakehow_ has joined the channel [13:16] christophsturm has joined the channel [13:18] rfay has joined the channel [13:20] TheJH_phone has joined the channel [13:21] ecin has joined the channel [13:23] dexter_e has joined the channel [13:24] hornairs has joined the channel [13:24] azeroth_ has joined the channel [13:25] hasta84_ has joined the channel [13:26] jtsnow has joined the channel [13:26] stagas: killfill: what about sprites? [13:29] confoocious has joined the channel [13:29] confoocious has joined the channel [13:29] meandi has joined the channel [13:29] toxico has joined the channel [13:31] butu5 has joined the channel [13:31] robinduckett has joined the channel [13:31] robinduckett: yo [13:33] dominictarr has joined the channel [13:33] mynyml has joined the channel [13:34] killfill: stagas: for example i have this: http://sofsis.cl/juego/base.html <-- when you press the right arrow key 3 times, velocity will be 3. When i wish the sprite animation will be 3 times quickier than when vel=1. [13:34] killfill: i mean, the character to move three times quickier.. [13:35] baudehlo has joined the channel [13:35] bosky101 has joined the channel [13:35] meandi has joined the channel [13:37] Destos has joined the channel [13:37] c0nde has joined the channel [13:37] baudehlo has joined the channel [13:37] stagas: killfill: there are plenty of ways to do that, the simplest is not to s.pos.y += vel but have it constant and do setTimeout(loop, wait / vel) [13:38] stagas: killfill: that would increase the speed for all animations though if you have more [13:38] ceej has joined the channel [13:39] stagas: killfill: better is to have a tighter loop and use timestep based movements so you can adjust anything you want [13:40] killfill: ok, im lost.. :P [13:41] tbassetto has joined the channel [13:42] killfill: stagas: you mean, i should adjust the fps, depending on the vel of the sprite? what if i have more sprites, each at different vel's? [13:42] jzacsh has joined the channel [13:42] tomilain1: stagas: isn't it usually the case so that you just keep a constant tick (fps) and then just calculate the delta in between ticks [13:42] tomilain1: then apply in each tick [13:43] stagas: tomilain1: yes [13:43] stagas: so each object moves a certain amount on each tick [13:44] tomilain1: yes [13:44] ph^ has joined the channel [13:44] jzacsh: hey, anyone know how to use the custom methods for mongoose (described in a nodetut i think.. which maybe the problem)? I have something like: Card.methods.getStack = function (callback) {}; where Card is a schema that was previously defined. now i can't actually find the getStack() method anywhere. All I see available to me is .paths :( [13:44] bradleymeck has joined the channel [13:44] theCole has joined the channel [13:45] jtsnow has joined the channel [13:45] JP- has joined the channel [13:45] stagas: and then make the background image to advance one image on every 30 ticks for example, then you can adjust that amount to increase/decrease the speed it displays [13:45] killfill: tomilaine: i think i didnt understood your idea [13:46] spasquali has left the channel [13:46] stagas: killfill: google timestep games [13:46] vvo has joined the channel [13:46] thomblake has joined the channel [13:47] JP| has joined the channel [13:47] stagas: killfill: here's a timer object if you need it https://github.com/stagas/jwos/blob/master/public/lib/timer.js [13:48] killfill: oh [13:48] killfill: greate, ill 'study' this.. :) [13:48] thomblake has left the channel [13:48] stagas: killfill: here's how it works, you may need to adjust that to your code though https://github.com/stagas/jwos/blob/master/public/lib/game.js#L536-547 [13:49] riven` has joined the channel [13:50] versicolor has joined the channel [13:50] bshumate has joined the channel [13:51] killfill: stagas: cool game :) [13:51] davidsklar has joined the channel [13:52] robotmay has joined the channel [13:52] tuhoojabotti: lags :D [13:53] DrMcKay: stagas: nice one :). only one I've made so far was snake [13:53] tuhoojabotti: http://dev.tuhoojabotti.com/skb/ I'm making an aeroplane game, but having some trouble with the 3D-part of it. :D [13:53] meandi has joined the channel [13:54] tuhoojabotti: Will be featuring node-multiplayer [13:54] tuhoojabotti: (uses arrow keys) [13:55] tuhoojabotti: And webgl [13:55] DrMcKay: tuhoojabotti: nice one as well :) [13:55] DrMcKay: tuhoojabotti: some 3D engine or handmade? [13:55] tuhoojabotti: three.js [13:55] DrMcKay: tuhoojabotti: looks interesting [13:56] tuhoojabotti: http://not.vlambeer.com/luftrauser/ innovation comes from this :D [13:56] DrMcKay: tuhoojabotti: it's Flash, so a no-no for me ;) [13:57] tuhoojabotti: yeah, sucks [13:57] tuhoojabotti: but as a game, it's great. :P [13:57] hdon- has joined the channel [13:57] tuhoojabotti: That's why I need to make it with ES ;) [13:57] mikl has joined the channel [13:57] mikl has joined the channel [13:57] mpavel has left the channel [13:57] DrMcKay: tuhoojabotti: well, let's hope everything will be using HTML5 and ES instead of Flash [13:58] tuhoojabotti: DrMcKay: Not Microsoft :D [13:58] boehm has joined the channel [13:58] DrMcKay: tuhoojabotti: after you mentioned it I feel dirty [13:59] riven has joined the channel [13:59] riven has joined the channel [13:59] DrMcKay: tuhoojabotti: well, Silverlight *may* be a less piece of shit than flash [13:59] DrMcKay: but it's still embeeding one rendering engine into another rendering engine [13:59] igl: nah [13:59] DrMcKay: so, still, a no-no [13:59] dnjaramba has joined the channel [14:00] CrisO has joined the channel [14:01] tuhoojabotti: Yes, you're a very dirty man [14:01] jtsnow has joined the channel [14:01] DrMcKay: btw, this is how Garfield page looks for me: http://i.imgur.com/KIeKe.png [14:01] asabil has joined the channel [14:02] igl: http://www.youtube.com/watch?v=RRFiu0xfQzw [14:02] c0nde has left the channel [14:03] DrMcKay: igl: this one's Flash as well :D [14:04] killfill: i feel like a game-noob.. :P [14:04] DrMcKay: but VLC ftw [14:04] Poetro has joined the channel [14:04] Poetro has joined the channel [14:05] jerrysv has joined the channel [14:05] kmiyashiro has joined the channel [14:06] KellyM has joined the channel [14:06] tmedema has joined the channel [14:07] tmedema: Anyone has experiences with Chrome destroying all instances of Flash when opening a file browser for longer than 30 seconds or so? [14:07] robinduckett: tmedema: on linux? [14:07] igl: *waiting 30 seconds* [14:09] arthurdebert has joined the channel [14:10] robinduckett: tmedema: yep [14:10] robinduckett: tmedema: infact, it just crashed the tab in chrome [14:10] robinduckett: boom [14:10] robinduckett: ubuntu 11.04 chrome 13.0.782.112 [14:11] igl: nothing [14:11] Poetro has joined the channel [14:11] Poetro has joined the channel [14:12] nibblebot has joined the channel [14:13] jbrokc has joined the channel [14:14] nibblebot has joined the channel [14:14] DrMcKay: for production, node-http-proxy is preferred over nginx, right? [14:14] zilch has joined the channel [14:14] baudehlo: "it depends" [14:14] robinduckett: igl: what os? [14:15] Aikar: i dont understand why you would say "for production", like you would use something diff in dev? [14:15] riven` has joined the channel [14:15] DrMcKay: baudehlo: just a personal site, no https and things [14:15] baudehlo: still depends :) [14:15] zilch: some of the module which also depend in turn on othermodule have include .gitignore file specifying git to ignore them ... how it is helpful ? why it is done ? [14:15] DrMcKay: Aikar: I don't use any proxy for dev [14:15] Aikar: for a personal site why do you need more than 1 web server? unless your like really popular :P [14:15] zilch: e.g optimist module [14:16] DrMcKay: zilch: because they want to seperate dependencies [14:16] Aikar: zilch: if i read your sentence right... i also hate that people put dependencies in gitignore, everytime i update modules i have to rm -rf all the .gitignore files so i can commit the deps :( [14:16] DrMcKay: eg, if A depends of B and B on C, and A depends on D and D on C, why have two different libraries? [14:17] DrMcKay: Aikar: so node + forever is enough? [14:17] zilch: what should be my approch ? should I remove those .gitignore ? [14:17] zilch: that is ok ? [14:17] bosky101 has joined the channel [14:17] Aikar: DrMcKay: no he means so deps arnt commited into your VCS, which requires npm in order to checkout [14:17] DrMcKay: zilch: when, I tend to .gitignore my dependencies and let users link or install them [14:17] zilch: bosky101, hi !!!! [14:17] DrMcKay: Aikar: oh, that [14:18] riven has joined the channel [14:18] aconbere has joined the channel [14:18] baudehlo: DrMcKay: but why do you need a proxy? [14:19] DrMcKay: baudehlo: I mostly port my experience from TOrnado, and when you use Tornado in production, you use it with proxy [14:20] jbrokc has joined the channel [14:20] mc_greeny has joined the channel [14:20] brianc has joined the channel [14:20] baudehlo: well it helps to understand why you might want one :) [14:21] baudehlo: Personally I use one so I can run multiple node backends on different ports for different sites. [14:21] binaryjohn has joined the channel [14:21] baudehlo: (node, and other things to be fair) [14:21] baudehlo: So I have Apache2 up front, and things like node, AxKit, apache1 etc on the backends. [14:22] Glenjamin: DrMcKay: for production i'd trust nginx more [14:22] vvo has joined the channel [14:22] Glenjamin: it'll be nicer for static assets as well [14:22] zilch: DrMcKay, well I can understand that .. but the module are really small and it may very well happedn that module A requires module B with verion x.y while module C requires the verison x.z of module B [14:22] jtrudeau has joined the channel [14:22] Glenjamin: zilch: the module are really small is something that is likely to change as node gets more mature - plus having to compile all the time might become a pain [14:23] DrMcKay: baudehlo: so, basically, for just node I don't need anything like that? [14:23] Glenjamin: it's not a problem yet, but I assume it will become one eventually [14:23] codyodell has joined the channel [14:23] sivy has joined the channel [14:23] baudehlo: DrMcKay: no you don't *need* a proxy. [14:24] DrMcKay: baudehlo: OK, thanks :) [14:24] jtrudeau has joined the channel [14:26] baudehlo: The use of proxies started in the old one-connection-per-process world, where slow clients would keep hold of a process and not let it back to the pool to server more clients. With a proxy that's helped because it can feed to the (fast, local connection) proxy, and the proxy trickles back to the slow client. [14:26] brianc: bnoordhuis: konobi: remember the strace external c++ problem I was having yesterday? I haven't found the root cause _however_ compiling node --without-ssl and the problem goes away. So there's something w/ the interaction between SSL & the library [14:27] mattstevens has joined the channel [14:27] cognominal has joined the channel [14:27] DrMcKay: baudehlo: thanks for clarification :). [14:28] kdng-saleem3 has joined the channel [14:29] ank has joined the channel [14:29] mediahack has joined the channel [14:30] aheckmann has joined the channel [14:30] pjacobs has joined the channel [14:30] pandeiro has joined the channel [14:30] riven` has joined the channel [14:31] riven has joined the channel [14:31] baudehlo: they have other benefits too of course. I like with a proxy that if the backend goes down, the user still sees a connection and a 500 error. [14:32] jbrokc has joined the channel [14:32] kulor-uk has joined the channel [14:32] kdng-saleem3 has joined the channel [14:33] ditesh|cassini has joined the channel [14:33] rfay has joined the channel [14:33] DrMcKay: baudehlo: forever will handle it, I guess [14:34] galaxywatcher has joined the channel [14:34] bosky101 has joined the channel [14:34] ryanfitz has joined the channel [14:34] baudehlo: yeah. Often that sort of thing is enough. I use "runit" personally - more mature. [14:34] robertfw has joined the channel [14:34] qbert_ has joined the channel [14:35] Aikar: < DrMcKay> zilch: when, I tend to .gitignore my dependencies and let users link or install them [14:35] Aikar: and thats the problem [14:35] Aikar: you shouldnt do that [14:36] saschagehlich has joined the channel [14:36] Aikar: if someone wanted to use npm in order to checkout a lib, theyd use npm. if they checkout your lib with git, why then require them to use npm? [14:36] DrMcKay: baudehlo: runit? [14:36] DrMcKay: baudehlo: is it node-specific? [14:37] dpritchett has joined the channel [14:37] DrMcKay: Aikar: submodules may be a good idea [14:37] DrMcKay: baudehlo: is it this: http://smarden.org/runit/ ? [14:38] baudehlo: yes. [14:38] panchot has joined the channel [14:38] baudehlo: it's not node specific. [14:38] DrMcKay: baudehlo: thanks, I will give it a try [14:38] baudehlo: I use it to run everything from postgresql to node. [14:38] baudehlo: the log options are great. [14:38] vipaca has joined the channel [14:38] vipaca has joined the channel [14:39] carmony has joined the channel [14:39] softdrink has joined the channel [14:39] rgl has joined the channel [14:40] DrMcKay: baudehlo: yes, I see it's possibilities are quite amazing [14:40] slifty has joined the channel [14:41] slifty: damn, got another quote on bash today but people don't like it ;) http://bash.org/?945895 [14:41] baudehlo: DrMcKay: to be fair I haven't given forever a try. [14:42] baudehlo: but with runit, my logging is just console.log() and it does log timestamping, rotation, maximum size, etc. [14:42] smtlaissezfaire has joined the channel [14:42] DrMcKay: baudehlo: forever also does logs, but doesn't have these capabilities [14:43] DrMcKay: I believe it only redirects output [14:43] Destos has joined the channel [14:43] zilch has joined the channel [14:45] baudehlo: yeah looks that way. [14:46] bradleymeck: drmckay it gives events so you can do w/e you want from there, limit is only what you can program /shruf [14:46] bradleymeck: /shrug* [14:46] bradleymeck: cli only does redirects [14:46] DrMcKay: bradleymeck: oh, yeah, it's a library as well [14:46] DrMcKay: I forgot about that [14:47] bradleymeck: all of nodejitsu's stuff has programatic use basically [14:47] baudehlo: it'd be nice if you could do: -o "| logrotate " [14:47] bradleymeck: remember, most of our open source stuff is just the non-customized but usable stack [14:47] bergie has joined the channel [14:47] DrMcKay: baudehlo: seems simple, maybe I'll contribute :) [14:48] bradleymeck: just open up a ticket either way [14:48] bradleymeck: we will get to it eventually [14:48] softdrink: does anyone have any good recommendations for hybrid client/server unit testing, aside from jasmine and qunit? [14:48] DrMcKay: bradleymeck: I'll do it later today, and possibly add some commits [14:50] dob__ has joined the channel [14:50] Yuffster_work has joined the channel [14:50] meso has joined the channel [14:50] bergie_ has joined the channel [14:51] tmpvar has joined the channel [14:51] meso has joined the channel [14:51] unlink has joined the channel [14:51] bnoordhuis: brianc: does that library use openssl itself? [14:52] kevwil has joined the channel [14:52] bnoordhuis: brianc: i think node tweaks some library-wide settings [14:52] clu3 has joined the channel [14:53] panchot has left the channel [14:54] jeromegn has joined the channel [14:55] jeromegn: hey guys [14:56] ryanfitz has joined the channel [14:56] pjacobs has joined the channel [14:56] guidocalvano has joined the channel [14:56] shanebo has joined the channel [14:57] Illusioneer has joined the channel [14:57] losing has joined the channel [14:57] jeromegn: So at work we're using Jammit. Which is awesome. Now we're in need of supporting IE 7+ (that sucks). I've been encountering an issue where the page wouldn't render and I nailed it down to Jammit not filling the JST object quickly enough and was wondering if there was some way to have a callback on after it's been processed so that I could trigger rendering the first page only when that's done. [14:57] losing has joined the channel [14:57] Illusioneer has left the channel [14:57] mikl has joined the channel [14:57] mikl has joined the channel [14:59] fatjonny has joined the channel [14:59] iaincarsberg has left the channel [15:00] ryanfitz has joined the channel [15:00] max_dev has joined the channel [15:00] brianc: bnoordhuis: I am not sure if it uses open-ssl. It may...is there a way to "tweak them back?" [15:01] dingomanatee has joined the channel [15:01] nibblebo_ has joined the channel [15:01] dingomanatee: Is there a good web page/ explanation for what happens between nextEvent events that doesn't happen between timeouts in node? [15:02] bnoordhuis: brianc: not without patching the source [15:02] DrMcKay: dingomanatee: http://blog.mixu.net/2011/02/01/understanding-the-node-js-event-loop/ [15:02] louissmit has joined the channel [15:02] petrjanda has joined the channel [15:03] guillermo has joined the channel [15:03] jakehow_ has joined the channel [15:03] jakehow has joined the channel [15:03] bnoordhuis: brianc: you could try compiling with -DOPENSSL_NO_COMP but i won't guarantee that's what's causing it [15:04] isaacs has joined the channel [15:05] iaincarsberg has joined the channel [15:05] hasenj has joined the channel [15:06] DrMcKay: umm... does anybody know why forever doesn't report it's running processes? [15:07] sfoster has joined the channel [15:07] bradleymeck: drmckay programaticuserequires you to manually start the server [15:08] dingomanatee has left the channel [15:08] DrMcKay: bradleymeck: I start my server [15:08] dingomanatee has joined the channel [15:08] DrMcKay: (bot, to be specific) [15:08] bradleymeck: gist it then? [15:09] DrMcKay: bradleymeck: https://gist.github.com/c31aca6e31a19acde02e [15:09] DrMcKay: bradleymeck: I have two PIDs in ~/.forever/pids [15:10] dingomanatee has joined the channel [15:10] jeromegn has joined the channel [15:10] mikl has joined the channel [15:10] mikl has joined the channel [15:11] binaryjohn has joined the channel [15:11] brianc: bnoordhuis: where should I stick the "DOPENSSL_NO_COMP" ? On the node compile or the addon module node-waf? [15:11] sub_pop has joined the channel [15:11] pifantastic has joined the channel [15:12] bnoordhuis: brianc: node [15:12] brianc: bnoordhuis: roger wilco [15:13] bradleymeck: drmckay : In order to get your processes into forever.list() or forever list you must instantiate the forever socket server: <- from the readme (this is due to not wanting a default of visible processes on our stack, might change that tosomething nicer ina bit) [15:13] ecin_ has joined the channel [15:13] bnoordhuis: brianc: you probably have to hack the wscript [15:13] bnoordhuis: brianc: search for this line -> conf.env.append_value("CPPFLAGS", "-DHAVE_OPENSSL=1") [15:13] boaz has joined the channel [15:14] brianc: bnoordhuis: awesome. thanks. :) [15:15] achiu has joined the channel [15:16] DrMcKay: bradleymeck: gosh, I've just put that command into deploy script and forgot about it, thanks :) [15:16] brianc: bnoordhuis: trying this out now. I'll let you know the result. [15:18] RORgasm has joined the channel [15:18] japj has joined the channel [15:19] brianc: bnoordhuis: yeah still a failure with the -DOPENSSL_NO_COMP [15:19] bnoordhuis: brianc: okay, then i don't know what's causing it :) [15:20] robhawkes has joined the channel [15:20] brianc: bnoordhuis: me either. no worries for now. I'm gonna move on w/ a build not using open SSL. I'll work w/ the vendor who created the library if/when I need ssl (it's an internal app) [15:21] CoinOpeBoy has joined the channel [15:22] jtsnow has joined the channel [15:22] mhausenblas has joined the channel [15:22] zilch has joined the channel [15:22] fdenbow has joined the channel [15:23] bradleymeck: mikeal ping [15:24] hasta84__ has joined the channel [15:25] DrMcKay: bradleymeck: would it be ok if I used mikeal's watch to implement this: https://github.com/indexzero/forever/issues/41 ? [15:27] robinduckett: anyone know how I can get npm to automatically install dependancies from my package.json? [15:27] DrMcKay: robinduckett: npm install in the same directory as package.json [15:28] robinduckett: DrMcKay: cheers [15:28] halfhalo-work has joined the channel [15:28] bosky101 has joined the channel [15:28] robinduckett: ls [15:28] robinduckett: oop [15:28] bradleymeck: drmckay, seems fine, just be sure to leave the api exposed w/ options somehow if you use forever's js api [15:29] DrMcKay: bradleymeck: I think I'll embeed into monitor somehow, but yes, with options [15:29] isufy has joined the channel [15:30] febits has joined the channel [15:30] rfay has joined the channel [15:30] mendel_ has joined the channel [15:32] slifty has joined the channel [15:33] aoberoi has joined the channel [15:33] Voxxit has joined the channel [15:33] zilch has joined the channel [15:35] tjholowaychuk has joined the channel [15:35] ryan0x2 has joined the channel [15:36] mendel_ has joined the channel [15:36] aheckmann has joined the channel [15:36] Spion_ has joined the channel [15:36] guidocalvano has joined the channel [15:37] Glenjamin: how does forever compare maturity/stability wise to monit/god/supervisord? [15:38] meso has joined the channel [15:39] kenperkins has joined the channel [15:39] jj0hns0n has joined the channel [15:40] kenperkins: morning guys [15:40] bradleymeck: glenjamin we use it in production, has a bit nicer handling of env vars than others / programmability [15:40] topaxi has joined the channel [15:40] bosky101 has joined the channel [15:41] devongovett has joined the channel [15:42] necrodearia has joined the channel [15:43] amerine has joined the channel [15:43] Deebster: bradleymeck: what do you use it for? [15:43] Deebster: I'm only mucking around with it for personal stuff [15:43] RORgasm has joined the channel [15:43] zilch has joined the channel [15:44] bradleymeck: Deebster, keeping up user's apps, keeping our service layer running as a precaution, hook.io servers, some http rest services [15:44] bradleymeck: so everything basically? [15:45] Glenjamin: "we" in this scenario is nodejitsu? [15:45] Deebster: yeah, was wondering what company/what kind of service [15:45] bradleymeck: yep, Nodejitsu. Also, be suretoadd init.dscripts [15:46] mbutubuntu has joined the channel [15:46] mbutubuntu: hllo folks [15:46] maushu has joined the channel [15:46] Glenjamin: we're using supervisord for the same purpose, seems to work well enough for our use [15:46] mbutubuntu: Glenjamin, for processes management? [15:47] bradleymeck: w/e works [15:47] Glenjamin: yeah, although all it does is keep it running [15:47] mbutubuntu: Glenjamin, :-) [15:47] Deebster: ACTION signs up for beta [15:47] mbutubuntu: guys, any API list for node.js? [15:47] Glenjamin: i know a guy who runs supervisord and then has monit make sure supervisord stays up [15:47] norviller has joined the channel [15:47] caolanm has joined the channel [15:47] mbutubuntu: I mean all non-javascript API, such as file IO... sockets.... and then [15:48] bradleymeck: mbutubuntu http://nodejs.org/docs/v0.4.11/api/all.html [15:48] tjholowaychuk: Glenjamin haha yeah ususally you want to rely on battle-tested software that's been around for ages [15:48] Deebster: bradleymeck: your "just one more thing" box submits when you hit enter! I wander a new line [15:48] mbutubuntu: tjholowaychuk, thanks [15:48] ryan0x2 has joined the channel [15:48] Deebster: s/wander/wanted/ [15:48] mbutubuntu: is nodejs loadable into v8? [15:48] Glenjamin: i didn't actually discover forever until after we'd deployed - but infrastructure/business are probably happy with something more battle tested [15:49] mbutubuntu: I'd like to have a filesystem IO interface inside v8... [15:49] optico has joined the channel [15:49] achiu has joined the channel [15:50] stephank has joined the channel [15:50] kriszyp has joined the channel [15:50] gazumps has joined the channel [15:51] chrislorenz has joined the channel [15:51] baudehlo: mbutubuntu: do you mean in the browser? [15:51] TheJH has joined the channel [15:51] TheJH has joined the channel [15:51] mbutubuntu: baudehlo, noooooo... in the shell [15:51] creationix has joined the channel [15:51] baudehlo: nodejs is in the shell. [15:52] NetRoY has joined the channel [15:52] baudehlo: it's v8 in the shell. [15:52] markdaws has joined the channel [15:52] NodeHorsesRFaste has joined the channel [15:52] NodeHorsesRFaste: nick NodeHorsesRFastr [15:52] jacobolus has joined the channel [15:53] Deebster: NodeHorsesRFaste, you're already called NodeHorsesRFaste :) [15:53] NodeHorsesRFastr: err [15:53] Deebster: yeah, ignore me :) [15:53] chjj: i think john resig's style of js is like a disease or something [15:54] chjj: i see it a lot of places now [15:54] heavysixer has joined the channel [15:54] isaacs: chjj: hahah [15:54] isaacs: chjj: what's that? [15:54] NodeHorsesRFastr: What's a better way of doing this? exec("motors/picture/new_via_base64_datasource.py \"" + image_base64_data + "\" " + object_inode_number, function(error, stdout, stderr) () { } [15:54] chjj: his style? ignore any kind of consistent col limit and fit as many expressions as possible onto one line to try and look clever [15:54] wlkh has joined the channel [15:54] robinduckett: NodeHorsesRFastr: child_process.spawn [15:55] chjj: my interpretation of it at least ^ [15:55] isaacs: NodeHorsesRFastr: what is that python script doing? [15:55] ryanfitz has joined the channel [15:55] isaacs: chjj: got a link? [15:55] NodeHorsesRFastr: image_base64_data is often too big. [15:55] chjj: to what? jquery? [15:55] isaacs: chjj: hahah, nono, to someone using that style [15:55] robinduckett: NodeHorsesRFastr: does the python script read from stdin too? [15:55] mbutubuntu: baudehlo, so you suggest to download nodejs and use its own shell? [15:55] chjj: isaacs: yeah let me dig some up [15:56] robinduckett: you could pump the data in [15:56] NodeHorsesRFastr: robinduckett: No, just from command line args [15:56] Druide_ has joined the channel [15:56] Glenjamin: chjj: I despise chaining in almost all cases [15:56] robinduckett: NodeHorsesRFastr: try using child process [15:56] Glenjamin: explicit multi-line is far better [15:56] NodeHorsesRFastr: isaacs: Converts the base64 data to an image, resizes and converts its format, and then saves it to Amazon S3 :o [15:56] Deebster: ACTION loves fluent interfaces [15:56] isaacs: NodeHorsesRFastr: so why not do that in node? [15:57] Glenjamin: NodeHorsesRFastr: did you write the python script as well? you could make it be a long running process that accepts the data over a socket [15:57] baudehlo: mbutubuntu: if you haven't yet, I don't understand why not. [15:57] robinduckett: var ps = require('child_process').spawn('python wtf.py', [base64data, 'strings']); [15:57] Glenjamin: Deebster: how would you define a fluent interface? [15:57] NodeHorsesRFastr: isaacs: Deadlines. Got to stick with what I have [15:57] isaacs: NodeHorsesRFastr: var imgBuff = new Buffer(base_64_data, "base64"); fs.writeFile("image.png", imgBuff, function (er) { ... }) [15:57] chjj: isaacs: https://github.com/fat/bean/blob/master/src/bean.js https://github.com/ded/domready/blob/master/src/ready.js [15:57] Deebster: lots of chaining :D [15:57] gf3: Glenjamin: well can't you simply break the chain into multiple lines, if that's your only gripe with it [15:57] isaacs: NodeHorsesRFastr: at least, you can write the image, and then maybe just pass the filename as an arg? [15:57] jzacsh has joined the channel [15:57] chjj: isaacs: im pretty sure the disease is very advanced in their cases, stage 4 at least [15:57] khmer has joined the channel [15:57] FireFly|n900 has joined the channel [15:58] mbutubuntu: baudehlo, the only motif is "time" :-P [15:58] khmer: folks! i'm tellin' ya. [15:58] khmer: i'm trying to implement a template system using jsdom [15:58] Glenjamin: gf3: of course, and when I'm writing it I do. But I don't write all the code I read :) [15:58] dgathright has joined the channel [15:58] gf3: WELL MAYBE YOU SHOULD [15:58] chjj: isaacs: those are just the ones i remember off of the top of my head [15:58] khmer: when i try to inject HTML from an external file, i get a "wrong document" exception from jsdom [15:58] robinduckett: khmer: use jade [15:58] zeade has joined the channel [15:58] khmer: robinduckett: making one myself for now [15:59] Glenjamin: if (condition ? condition.apply(this, arguments) : W3C_MODEL ? true : e && e.propertyName == '_on' + type || !e) { [15:59] Glenjamin: hell of a line [15:59] NodeHorsesRFastr: isaacs: You see, the whole thing was written in Python before, but it was so slow so I through in a quick-rewrite of the web service in node.js Result: 35 times faster [15:59] khmer: so, here: http://sprunge.us/fCJR?js is there some other way to do this? [15:59] mc_greeny has joined the channel [15:59] NodeHorsesRFastr: isaacs: I'm thinking about that [15:59] wbw72 has joined the channel [15:59] chjj: isaacs: its not even a matter of personal style either, sticking every string in a variable before using it should be slower as far as ive seen [15:59] robinduckett: Glenjamin: there's only two nested statements, what's so bad about that? [15:59] isaacs: Glenjamin: chjj: those don't look so bad. putting a ternary inside an if cond is pretty odd, tho [15:59] khmer: i'm trying to use jquery to inject that into the DOM as a string, and that $ is bound to jquery via window.$ [15:59] Glenjamin: tell me thats a joke :s [15:59] khmer: so i don't know why i'm getting a wrong document error! [16:00] NodeHorsesRFastr: isaacs: The difference between CPython on Twisted and node.js is amazing [16:00] kdng-humanchimp has joined the channel [16:00] Deebster: Glenjamin: but I find fluent works well with fluent: obj\n\t.doFoo()\n\t.setBar(quux) etc [16:00] chjj: isaacs: i dunno, i used to code like that when i was new to js, i think i can recognize the disease in others, the code just looks ugly to me [16:00] Deebster: um, newlines even [16:00] mbutubuntu: hello everybody [16:00] Deebster: clearly hometime [16:00] Glenjamin: Deebster: and when you grep for setBar ? [16:00] jsowell has joined the channel [16:00] khmer: hnnnngh? [16:01] davidascher has joined the channel [16:01] Glenjamin: chjj: I'm with you on this, it's simply not easily readable [16:01] Deebster: grep -B 5 setBar ? :) [16:01] Deebster: but I get your point Glenjamin [16:02] jvdev has joined the channel [16:02] Glenjamin: where 5 is 0.5*longest chain you do :p [16:02] chjj: chjj: i dont even care if its readable, its just pure ugly for no reason [16:02] chjj: wow i just said that [16:02] chjj: to myself [16:02] chjj: :) [16:02] Glenjamin: well the only reason to make code pretty is to make it readable imo [16:02] Vertice has joined the channel [16:02] chjj: nah its just kind of a bonus of making it pretty [16:02] mikeal has joined the channel [16:02] slloyd has joined the channel [16:02] Glenjamin: why else would you care? [16:02] felixhummel has joined the channel [16:03] chjj: aesthetics of code are almost all of what i care about [16:03] ekryski has joined the channel [16:03] theCole has joined the channel [16:04] Glenjamin: that seems somewhat backwards to me :) [16:04] amerine has joined the channel [16:04] chjj: i dont understand the motivation behind it, is it to try to make the code look more lightweight than it is? [16:04] robinduckett: chjj: there are bits in here that will blind you then: https://github.com/robinduckett/smelt/blob/master/libs/smelt.js [16:04] chjj: i guess each could have their own motivations [16:04] sonnym has joined the channel [16:04] chjj: behind that nonsense [16:05] Glenjamin: robinduckett: that one isn't so bad [16:05] jsowell has left the channel [16:05] chjj: robinduckett: that looks much better than the things i posted [16:05] Glenjamin: there's only a couple of conditionals which seem to be on one line for no particular reason :) [16:05] chjj: or mentioned above* [16:05] khmer: has anyone else gotten that "wrong document" error in jsdom? [16:05] robinduckett: lol [16:06] robinduckett: I thought that it was probably the ugliest piece of code i've ever produced [16:06] chjj: looks alright to me, compared to that other stuff, i dont know why you would compare it to that [16:07] chjj: the only thing that bugs me is you commited the mortal sin of breaking the 80 col limit ;p [16:07] robinduckett: hah [16:07] robinduckett: yeah well [16:07] robinduckett: widescreen monitor [16:07] Glenjamin: chjj: do you have a python background by any chance? [16:07] chjj: hehe [16:07] chjj: Glenjamin: what makes you think that? [16:07] Glenjamin: robinduckett: consider a newspaper, it's plenty wide but they put everything in columns. [16:08] jtrudeau has joined the channel [16:08] robinduckett: https://github.com/robinduckett/smelt/blob/master/realtime.js [16:08] robinduckett: check line 112 [16:08] Glenjamin: chjj: because clean, explicit readable code thats never more than 80 chars a line is generally how python is written [16:09] chjj: Glenjamin: ha, im crazy about that stuff, i think my cols are shrinking as i grow older [16:09] robi42 has joined the channel [16:09] Glenjamin: I find that http://www.python.org/dev/peps/pep-0020/ and http://www.python.org/dev/peps/pep-0008/ apply well to whatever you're writing [16:09] khmer: eventually everything you write will look like assembly [16:09] chjj: yeah i know! [16:10] chjj: was just thinking that actually [16:10] chjj: i love looking at a disassembled binary, and millions of lines of text pop up on my screen [16:11] khmer: all in beautiful comic sans [16:11] khmer: seriously guys i could use a hand, and more of a hand than "use jade" if y'please :) [16:12] ctang has joined the channel [16:12] chjj: a hand with what? [16:12] alvaro_o has joined the channel [16:12] khmer: i'm trying to inject html from an external file into a jsdom [16:12] robinduckett: chjj he's trying to modify a document in jsdom after it's been loaded [16:12] khmer: when i do so, i get a "Wrong Document" error [16:12] robinduckett: using jQuery [16:12] khmer: exactly [16:13] chjj: i heard if you write jquery using john resigs style of js, it gives your superpowers [16:13] chjj: true story [16:13] Glenjamin: khmer: try var html_to_insert = $(html_from_other.outerHTML); [16:13] khmer: i'm sure it's a terrible idea for a production environment, but i'm trying to test out code for rapid prototyping [16:13] khmer: Glenjamin: it won't have an outerHTML, because it's coming in as a string from the filesystem [16:13] bradleymeck: sounds like some dom method is being called on a document different that where it originated, that or you are mixing 2 document's nodes without moving them w/ documentFragments [16:14] Glenjamin: i was just typing what bradleymeck said ^ [16:14] chjj: yeah, you can use importNode [16:14] khmer: the stacktrace includes a call to jQuery's buildFragment [16:14] chjj: or whatever it is [16:14] khmer: so i assume a docfrag is being created... [16:14] Glenjamin: make sure jQuery is using the right document to build the frag [16:14] khmer: yeah, i made sure to bind $ to window.$ [16:15] Glenjamin: do you have to tell jquery what the document is when using jsdom? [16:15] khmer: i don't know! [16:15] Glenjamin: i suppose it probably assumes window.document [16:15] khmer: typically jquery is instantiated with a document bound already [16:15] khmer: it receives .window in its outer IIFE [16:15] khmer: ahem, window, not .window [16:15] khmer: what on earth [16:15] khmer: chjj: importNoe? [16:16] khmer: importNode? [16:16] chjj: yeah, its a way of transferring nodes between separate documents [16:16] chjj: not sure if jsdom supports it [16:16] robinduckett: How would I tell jsdom to spit out HTML source from window? [16:16] chjj: it should [16:16] Glenjamin: khmer: this looks relevant http://blog.nodejitsu.com/jsdom-jquery-in-5-lines-on-nodejs [16:16] robinduckett: Glenjamin: that's depreciated due to jsdom not working like that anymore [16:16] chjj: khmer: thats what youre asking for right? [16:16] Glenjamin: bah, dammit google [16:17] khmer: Glenjamin: yeah, i got that page already, and concluded what robinduckett said :) [16:17] khmer: i totally don't need to use jQuery, i'm doing it for convenience [16:18] Glenjamin: do you even really need a dom? [16:18] khmer: eh, i don't want this to get too inconvenient [16:18] Glenjamin: depends what you're doing i guess [16:18] khmer: i need to interpret embedded xml tags from an xmlns and replace them [16:19] khmer: it's a highly constrained domain-specific language i'm trying to prototype [16:19] Glenjamin: to produce XML or produce an object? [16:19] robinduckett: khmer: [16:19] khmer: the xml tags need to render html [16:19] robinduckett: i cannot reproduce your error [16:20] khmer: robinduckett: really! hmm. [16:20] Glenjamin: sounds like exactly what XSLT does [16:20] robinduckett: used jQuery to append
WHAT
[16:20] robinduckett: to google's homepage logo [16:20] robinduckett: worked fine when I outputted window.document.outerHMTL [16:20] khmer: hmmmm. thanks for testing [16:20] chjj: xslt looks like puke [16:20] chjj: discuss [16:20] khmer: i need this thing to be friendly [16:20] Glenjamin: it's a language for transforming XML into other XML via XML. What did you expect? [16:21] chjj: haha [16:21] chjj: Glenjamin++ [16:21] v8bot_: chjj has given a beer to Glenjamin. Glenjamin now has 2 beers. [16:21] catb0t: Glenjamin now has 1 beer [16:21] robinduckett: kmiyashiro: [16:21] mike5w3c has joined the channel [16:21] robinduckett: uh [16:21] robinduckett: khmer: [16:21] robinduckett: https://gist.github.com/1165745 [16:21] greg has joined the channel [16:21] DrMcKay: Glenjamin++ [16:21] v8bot_: Glenjamin is getting too many beers. Don't let Glenjamin get drunk! [16:21] catb0t: Glenjamin now has 1 beer [16:22] DrMcKay: v8: 'I am a stupid bot' [16:22] v8bot_: DrMcKay: "I am a stupid bot" [16:22] robinduckett: looks like catb0t forgets stuff [16:22] catb0t: forgets to call stack stuff, looks [16:22] robinduckett: uh [16:22] DrMcKay: I seriously wonder from where cat_b0t gets this phrases [16:22] DrMcKay: I think it's node source or docs [16:23] DrMcKay: catb0t a [16:23] catb0t: a h, the [16:23] robinduckett: catb0t jquerify [16:23] digitaltoad has joined the channel [16:23] catb0t: jquerify [16:23] robinduckett: lol [16:23] chjj: i hate catb0t [16:23] catb0t: hate html SO st i i [16:23] chjj: I HATE YOU [16:23] DrMcKay: catb0t lorem ipsum, dolorem sit amet, or whatever [16:23] catb0t: whatever it is when all iterations are done, and ave 10 dolorem [16:23] robinduckett: catb0t v8 [16:23] catb0t: v8 bug that's been fixed in node so I can't know what you did there when you said that java is pretty great imo [16:23] mikl has joined the channel [16:23] mikl has joined the channel [16:24] robinduckett: khmer: does that gist help at all? [16:24] NodeHorsesRFastr: ACTION is making a punchass photo upload site to serve the niche of users that only want to upload pictures of Madonna. [16:24] DrMcKay: who's bot is it anyway? [16:24] chjj: im not sure [16:24] robinduckett: Calvin? [16:24] chjj: but i dont like it, i want the old old v8 bot back [16:24] NodeHorsesRFastr: The service, powered by node.js, will then text you pics of Madonna that you have uploaded ot make your day happy. [16:24] DrMcKay: chjj: I haven't met him :( [16:24] chjj: im pretty sure v8_ is the exact same one, but hes not the same [16:24] creationix: catb0t webOS [16:25] catb0t: webOS is NOT a module and all requests, so you'd also need to run the tests on [16:25] asabil has joined the channel [16:25] robinduckett: v8bot_: require('url').parse('http://www.catb0tsucks.com/').host [16:25] catb0t: require'url'parse'httpwwwcatb0tsuckscom'host v8bot [16:25] aoberoi has joined the channel [16:25] DrMcKay: chjj: what was so good in him? [16:25] robinduckett: LOL [16:25] robinduckett: NodeHorsesRFastr: that's ridiculous [16:26] gartenstuhl has joined the channel [16:26] chjj: chjj: im not sure, he just did a lot of little things v8_ doesnt seem to do, i think he might have been a fork of v8bot [16:26] DrMcKay: chjj: you mean with execution of code or what? [16:26] ohtogo has joined the channel [16:26] NodeHorsesRFastr: robinduckett: How can you say that? [16:26] DrMcKay: chjj: I may implement some of those in dmkbot I think [16:27] chjj: drmckay: yeah, im not sure, slightly different behavior i guess [16:27] mikeal has joined the channel [16:27] chjj: i could be totally wrong [16:27] robinduckett: NodeHorsesRFastr: easily? [16:27] chjj: it might just be a psychological thing and i want to see "v8" [16:27] link_ has joined the channel [16:27] chjj: instead of stupid stuff like "catb0t" [16:27] catb0t: instead of sass stupid [16:27] chjj: SHUTUP [16:27] robinduckett: I made a plugin enabled irc bot [16:27] FireFly has joined the channel [16:27] NodeHorsesRFastr: robinduckett: Who wouldn't want a Madonna picture sent to them to give them a happy when they're having a hard day at the office? [16:27] robinduckett: which loaded plugins lazily [16:27] dshaw_ has joined the channel [16:28] robinduckett: NodeHorsesRFastr: The list would be substantially long, the question is, who *would* [16:28] Glenjamin: using the vm module? [16:28] robinduckett: Glenjamin: yes [16:28] Glenjamin: is it on github at all? [16:28] robinduckett: yes [16:28] Glenjamin: the repo our internal bot is based on uses eval for plugins >.< [16:28] dguttman has joined the channel [16:28] NodeHorsesRFastr: robinduckett: Everyone I know in NYC wants it. [16:29] chjj: catb0t: im sorry, lets be friends [16:29] NodeHorsesRFastr: ACTION mostly hangs in bathhouses though. [16:29] catb0t: friends should work with all the callbacks, the same node instance say go for it doesn't let you [16:29] DrMcKay: Glenjamin: use my bot :) [16:29] Glenjamin: links! [16:29] DrMcKay: Glenjamin: it does modules as well [16:29] chjj: catb0t: that was very offensive to me [16:29] catb0t: offensive to me , when want to pick colors that are not written in the middle of the day by any worker at random [16:29] robinduckett: lol DrMcKay's one is probably better [16:29] DrMcKay: Glenjamin: https://github.com/mmalecki/dmkbot [16:29] robinduckett: I haven't updated mine since Oct 2010 [16:29] chjj: catb0t: agreed [16:29] catb0t: agreed , i need to define those variables [16:29] Glenjamin: I'm tempted to try and port ChatZilla's IRC lib to node [16:30] robinduckett: Mine is more suited to uh.. piracy rooms. [16:30] ctang has joined the channel [16:30] robinduckett: although I dare say my modules API is easier to use [16:30] chjj: someone needs to make a good web irc client with node [16:30] tylerstalder has joined the channel [16:30] robinduckett: Glenjamin: https://github.com/haxd/scriptable-node-irc-bot [16:30] Glenjamin: chjj: mibbit already does the job [16:31] robinduckett: Glenjamin: he said good [16:31] chjj: ^ [16:31] creationix: wIRC could probably be ported to the web pretty easily [16:31] level09 has joined the channel [16:31] DrMcKay: Glenjamin: mine uses node-irc, it's very good [16:31] robinduckett: DrMcKay: mine also uses node-irc [16:31] robinduckett: :P [16:31] level09: how do I locate my module's files ? [16:32] robinduckett: And comes with a script that shows the current bandwidth usage of the computer it's running on [16:32] DrMcKay: robinduckett: oh, I see [16:32] level09: i found many directories in my /opt/local/lib/node dir [16:32] robinduckett: and a pretty kick ass !g google script [16:32] robinduckett: level09: what are you talking about? [16:32] Glenjamin: looks reasonable [16:32] mikeal has joined the channel [16:32] level09: robinduckett: modules installed globally [16:32] level09: using npm [16:32] level09: on mac [16:32] Glenjamin: i'll give one/both of them a whirl when i get some spare time [16:32] Glenjamin: probably not this sprint though [16:32] level09: I want to locate these files [16:33] level09: as they are no longer inside the node_modules dir [16:33] robinduckett: level09: ~/.npm/ ? [16:33] Glenjamin: level09: npm ll -g [16:33] level09: aha thanks [16:33] level09: let me try that [16:33] CoverSlide has joined the channel [16:34] isaacs: robinduckett: nono!! [16:34] isaacs: level09: no [16:34] isaacs: ~/.npm is a cache folder [16:34] robinduckett: okay [16:34] robinduckett: lol [16:34] isaacs: the global install location is `npm root -g` [16:34] isaacs: run that^ [16:34] isaacs: it'll tell you [16:34] isaacs: `npm help folders` will tell you where npm puts everything it puts [16:35] NodeHorsesRFastr: WebOS was killed because HP decided the Tablet wouldn't sell? [16:35] CoverSlide: WebOS is not killed [16:35] mikeal: it's a little more complicated than that [16:35] NodeHorsesRFastr: What is the Palm acquisition good for then? [16:35] robinduckett: NodeHorsesRFastr: aye, and it woudn't at $500+ or more, as is evident [16:35] robinduckett: they dropped it to $100, of course it would sell like hotcakes [16:35] CoverSlide: HP is just no longer working on WebOS [16:35] robinduckett: but it costs them $318 to make each tablet [16:35] CoverSlide: + hardware [16:35] robinduckett: so they're losing $218 per unit [16:36] level09: ok thanks, found the directory, but seems like npm installs and keeps older versions [16:36] NodeHorsesRFastr: HP doesn't have Apple's supply chain [16:36] erikfrey has joined the channel [16:36] robinduckett: NodeHorsesRFastr: wouldn't matter if they did [16:36] isaacs: level09: what version of npm are you using? [16:36] AvianFlu_ has joined the channel [16:37] NodeHorsesRFastr: robinduckett: Why else can they not beat the iPad on price? [16:37] kulor-uk has joined the channel [16:37] Poetro has joined the channel [16:37] Poetro has joined the channel [16:37] level09: 0.3.18 [16:37] robinduckett: NodeHorsesRFastr: because the iPad in terms of cost per unit is less, which is because they're made by chinese slaves who sleep on broken glass and eat dry skin flakes [16:37] CoverSlide: HP doesn't have Apple's brainwashing capabilities [16:37] isaacs: level09: you should install 1.0. [16:37] isaacs: level09: it's better [16:37] CoverSlide: and kool-aid supply [16:38] level09: sure [16:38] ehedenst has joined the channel [16:38] level09: is it updatable ? or should I just recompile [16:38] NodeHorsesRFastr: robinduckett: And HP could have done the same. [16:38] CoverSlide: npm doesn't need to be compiled [16:38] NodeHorsesRFastr: HP is not as evil? :p [16:38] isaacs: level09: you have to reinstall [16:38] isaacs: level09: npm 0.x is not smart enough to install npm 1.0 [16:38] CoverSlide: just run the install script [16:38] level09: alright :) [16:38] robinduckett: NodeHorsesRFastr: No, HP uses taiwanese cyborgs who don't need to eat, it just costs them more per unit because they use better quality materials ;) [16:39] NodeHorsesRFastr: lol [16:39] robinduckett: I actually really like the look of webOS [16:39] CoverSlide: `npm [16:39] robinduckett: don't know why anyone would want to port android to the touchpad [16:39] xastey` has joined the channel [16:39] NodeHorsesRFastr: Was the HP tablet better than the iPad in terms of hardware specs? [16:39] CoverSlide: ^ that should just trigger curl http://npmjs.org/install.sh | sh [16:39] chjj: make sure you pipe the npm install script into a sudo'd shell too, i heard its safe ;p [16:39] chjj: yeah, hehe [16:40] TheJH: !@CoverSlide mem npm-install [16:40] jhbot: CoverSlide, you can install npm by doing "curl http://npmjs.org/install.sh | sudo sh". If you don't feel comfortable piping data from http in a sudo'ed shell (which really isn't a good idea), you can also download it, look at it and then pipe it in the shell. [16:40] NodeHorsesRFastr: It seems they would have been better to hit the low-end market as the iPad is the gold standard in tablets. [16:40] aoberoi_ has joined the channel [16:40] level09: i have permissions denied messages, perhaps I should install using sudo [16:40] level09: although it was advised not to use sudo [16:40] robinduckett: how the hell has firefox gone from 3.6.18 to version 6 so quickly? [16:40] robinduckett: level09: npm likes sudo now [16:40] robinduckett: they are friends now [16:40] chjj: yeah, generally not a good idea to pipe things directly from a curl into a shell with root access ;p [16:40] CoverSlide: robinduckett: version numbers are arbitrary [16:41] level09: cool :D [16:41] omni5cience_ has joined the channel [16:41] CoverSlide: ryah could just update to version 9000.0 if he felt like it [16:41] CoverSlide: version numbers mean nothing but are great for marketing [16:41] mediacod1r has joined the channel [16:41] robinduckett: it's exactly nine thousanddddddd [16:41] Kester` has joined the channel [16:42] NodeHorsesRFastr: ACTION thinks version numbers should be descending and somehow tied to number of bugs probably present - how many bugs have been fixed [16:42] [tm] has joined the channel [16:42] DrMcKay: NodeHorsesRFastr: we would all be stuck on ~infinity, probably [16:42] progme has joined the channel [16:42] perezd has joined the channel [16:42] jheusala has joined the channel [16:42] ditesh|cassini has joined the channel [16:42] nickaugust has joined the channel [16:42] level09: still getting permission denied even after using sudo [16:43] archTT has joined the channel [16:43] level09: ah probably i missed one thing [16:43] bronson has joined the channel [16:43] NodeHorsesRFastr: Hey how can you get the return value from exec()? [16:43] gnrfan has joined the channel [16:43] NodeHorsesRFastr: (From the callback) [16:43] NodeHorsesRFastr: ACTION wants to know if the script returned success or fail. [16:43] JKarsrud has joined the channel [16:43] level09: Node Horses are Faster :D [16:44] robinduckett: if you use child process you can do .on('exit', function(code) {exit code}); [16:44] CoverSlide: Node Horses can't be broken [16:44] korch has joined the channel [16:44] NodeHorsesRFastr: level09: But they only will only let Madonna ride them. [16:44] level09: still scala, haskel seem to be a faster horses [16:44] v01dless- has joined the channel [16:44] level09: if i'm not mistaken [16:44] chilts has joined the channel [16:45] CoverSlide: ACTION beats level09 to a bloody pulp [16:45] pkrumins has joined the channel [16:45] pkrumins has joined the channel [16:45] augustl has joined the channel [16:45] level09: :D [16:45] Glenjamin: i'd imagine so, they're both compiled [16:45] CoverSlide: C is faster [16:45] erikfrey has left the channel [16:45] pradeepto has joined the channel [16:45] CoverSlide: everyone, write your servers in C [16:46] Ratty_ has joined the channel [16:46] bnoordhuis: CoverSlide: already do [16:46] chjj: CoverSlide got told [16:46] DevX101 has joined the channel [16:46] level09: are these benchmarks correct on this page http://www.quora.com/What-is-the-ranking-fastest-to-least-fast-of-server-side-development-languages-including-frameworks-and-experimental-projects-designs-based-on-speed?q=scala+node+php+python+java+ruby+java+server+speed+ [16:46] CoverSlide: although I have been playing around with this: http://www.gwan.com/ [16:47] Martz has joined the channel [16:47] heavysixer has joined the channel [16:47] Glenjamin: "ordinary clean un-optimised code" on a JIT probably beats C in many cases [16:47] level09: oh node is taken out of this [16:47] meandi2 has joined the channel [16:47] pquerna: Glenjamin: sadly :-/ [16:47] chjj: ACTION wants to write a web server in c [16:48] chjj: ACTION couldnt give it enough webscale though [16:48] pquerna: Glenjamin: i've kinda wanted to see a jit for C, as silly as that sounds someitmes :x [16:48] chjj: ACTION needs webscale [16:48] CoverSlide: ACTION fishes in his pockets for webscale [16:48] smathy has joined the channel [16:48] chjj: ACTION drools [16:48] CoverSlide: ACTION finds none [16:48] chjj: ACTION sobs [16:48] pquerna: (mostly for tracing/common paths...) [16:48] NodeHorsesRFastr: C is not faster than node.js [16:48] kaueraal has joined the channel [16:48] bnoordhuis: pquerna: PGO [16:48] pquerna: bnoordhuis: clang doens't have them yet :( [16:48] chjj: nothing is faster than node.js, node.js is a turtle with a v8 rocket strapped to its back [16:48] Glenjamin: NodeHorsesRFastr: highly specialised optimised C will be [16:49] Glenjamin: but who has time to write that [16:49] bnoordhuis: ACTION raises hand [16:49] pquerna: <- this guy [16:49] DrMcKay: Glenjamin: I once wrote my own memcpy [16:49] DrMcKay: this shit was fast! SSE memory copying [16:49] DrMcKay: I still have it somewhere [16:50] DrMcKay: but I think glibc has it now as well [16:50] archTT: i have a design question [16:50] NodeHorsesRFastr: Glenjamin: Google. [16:50] CoverSlide: hope it does [16:51] DrMcKay: yay, got it [16:51] KrooniX has joined the channel [16:51] wookiehangover has joined the channel [16:51] sstephenson has joined the channel [16:51] DrMcKay: with whole libc for my kernel [16:51] CoverSlide: contribute to glibc [16:51] archTT: i want to do GC on an array (shifting elements) oninterval, but I have other events (http requests) which need to loop through the array concurrently. what's the safe approach? [16:51] DrMcKay: CoverSlide: I'm pretty sure it has it already [16:51] DrMcKay: CoverSlide: but I'll check [16:52] bnoordhuis: DrMcKay: no need [16:52] guillermo has joined the channel [16:52] DrPizza_ has joined the channel [16:52] rendar has joined the channel [16:52] bnoordhuis: glibc employs a clever linker hack to load the best memcpy impl at program load [16:52] springmeyer has joined the channel [16:52] gr-eg has joined the channel [16:52] DrMcKay: https://gist.github.com/42b7f3f349e110231eb9 [16:52] termie_ has joined the channel [16:52] CoverSlide: ACTION looks behind Guest7001's mask [16:52] dleonard1 has joined the channel [16:53] DrMcKay: bnoordhuis: I didn't know, interesting [16:53] metavers_ has joined the channel [16:53] DrMcKay: oh, I have memclr as well [16:54] Yoric has joined the channel [16:54] DrMcKay: ftoi [16:54] foobarfi1hter has joined the channel [16:54] DrMcKay: and memset [16:54] springmeyer has joined the channel [16:55] DrMcKay: anyone interested in seeing the source? [16:55] FelicianoX has joined the channel [16:55] FelicianoX has left the channel [16:55] bnoordhuis: DrMcKay: asm("rep movsb" : : "c" (r), "S" (src), "D" (dest) :); <- do movsb first, then movsd, unaligned access is a lot slower [16:56] bnoordhuis: though it might not matter that much anymore with cache pre-fetching [16:56] jesusabd1llah has joined the channel [16:56] zedas_ has joined the channel [16:56] DrMcKay: bnoordhuis: good point [16:57] markwubben has joined the channel [16:57] DrMcKay: https://gist.github.com/1165847 <- memset, this one goes with benchmarks [16:58] SamuraiJack has joined the channel [16:58] TooTallNate has joined the channel [16:58] level09: npm now downloads the git repo as well [16:58] level09: cool [16:59] robotmay has joined the channel [17:00] DrMcKay: gosh, I was 15 when writing these procedures [17:00] CoverSlide: ?? it does [17:00] level09: ah not really [17:00] level09: my bad , that was my outer repo [17:00] level09: :D [17:01] chjj: level09: ah, you got me all excited [17:01] DrMcKay: level09: shame on you [17:01] level09: :D [17:01] tbranyen: hmm coworker is using node unstable and the make commmand is successful, but returns an error code [17:01] tbranyen: instead of 0 [17:01] level09: alright it is not that complicated to link the repo anyway [17:01] DrMcKay: tbranyen: it does, AFAIK [17:01] tbranyen: DrMcKay: doesn't with stable tho [17:01] parshap has joined the channel [17:01] tbranyen: is that just something node does? [17:01] DrMcKay: tbranyen: I think yes [17:01] mjr_ has joined the channel [17:01] CoverSlide: just a make error? [17:02] DrMcKay: tbranyen: for me build always ends with 1 [17:02] bnoordhuis: tbranyen: make as in build node? [17:02] tbranyen: CoverSlide: like if you did echo $? after running make it would return 1 [17:02] tbranyen: bnoordhuis: correct [17:02] tbranyen: but with node stable it returns 0 [17:02] CoverSlide: oh [17:02] bnoordhuis: tbranyen: i think i fixed that in ad31e5a [17:02] CoverSlide: hmm [17:02] level09: I don't know why I have this feeling, that most node devs were ruby devs in the past [17:02] tbranyen: bnoordhuis: cool, was just wondering if that was intentional [17:03] tbranyen: level09: because there are some really damn good libs that come out of thin air? [17:04] level09: it looks like many modules/libs are inspired by other ruby/python ones [17:04] CoverSlide: not all of them [17:04] hij1nx has joined the channel [17:04] ttpva has joined the channel [17:04] DrMcKay: level09: and Python and Ruby ones were inspired by C ones [17:04] CoverSlide: some were even narwahl devs before they came to node [17:04] robinduckett: tbranyen: level09: javascript is just easier to grok, you have people who never did any serious dev stuff come to node [17:04] joshthecoder has joined the channel [17:04] level09: yeah I agree [17:04] robinduckett: aye and the fact that narwhal / rhino existed before node [17:05] robinduckett: so people just ported the modules ala commonjs [17:05] CoverSlide: ACTION remembers writing a cgi app in rhino [17:05] level09: it is easy, just the sync programming is the tricky part [17:05] CoverSlide: that was fun [17:05] level09: then we have another challenge with design patterns [17:06] CoverSlide: then there was a little project called v8cgi, which built an apache module, played with that for a little until switching to node [17:06] ibolmo_ has joined the channel [17:06] ibolmo_: anyone know if the pivotal (in particular jasmine) people hang out in the IRC? [17:06] DrMcKay: well, I came from Tornado [17:06] robinduckett: tornado is like eventmachine/ruby but python? [17:06] CoverSlide: that would be twisted [17:07] CoverSlide: tornado is more like thin [17:07] CoverSlide: afaik [17:07] robinduckett: thin? [17:07] CoverSlide: this is a webserver built on ee [17:07] CoverSlide: i mean em [17:07] DrMcKay: robinduckett: not exactly [17:07] DrMcKay: or whatever CoverSlide says [17:08] robinduckett: okay [17:09] montylounge has joined the channel [17:09] robi42 has joined the channel [17:09] NodeHorsesRFastr: exec("motors/picture/new_via_base64_datasource.py " + object_inode_number, function(error, stdout, stderr) { How do I get the return value of the script here? } [17:09] trotter has joined the channel [17:10] mcluskydodallas has joined the channel [17:10] CoverSlide: although while thin is built on em, i don't think tornado is built on twisted at all [17:10] robinduckett: NodeHorsesRFastr: use spawn, don't use exec [17:10] robinduckett: exec just returns whatever comes out, you need to use spawn [17:11] robinduckett: This is the answer to your question. [17:11] robinduckett: The same one, that I answered earlier. [17:11] robinduckett: NodeHorsesRFastr: here's a link, look at it. http://nodejs.org/docs/v0.5.1/api/child_processes.html [17:12] CoverSlide: exec calls spawn [17:12] robinduckett: CoverSlide: yes but exec won't give you the return code of the process [17:12] robinduckett: as I stated earlier [17:12] robinduckett: actually bothers me that he asked again [17:13] robinduckett: after I already answered his question [17:13] robinduckett: and it shouldn't [17:13] robinduckett: so I'm off [17:13] CoverSlide: actually [17:13] CoverSlide: exec can still do it [17:13] don_jones has joined the channel [17:13] robinduckett: CoverSlide: only on error [17:13] CoverSlide: 104 e.code = code; [17:13] CoverSlide: 105 e.signal = signal; [17:13] CoverSlide: 106 callback(e, stdout, stderr); [17:13] vidi has joined the channel [17:13] CoverSlide: if there's no error that means it's 0 [17:14] heavysixer has joined the channel [17:14] DrMcKay: !doc link child_processes [17:14] dmkbot: http://nodejs.org/docs/latest/api/child.html [17:14] DrMcKay: fuck you, regec [17:14] DrMcKay: *regex [17:14] robinduckett: child\_processes [17:14] robinduckett: :P [17:14] DrMcKay: I think we may want to add this e structure to docs [17:14] CoverSlide: probably matching \w [17:15] CoverSlide: good idea [17:15] CoverSlide: wait it's there [17:15] robinduckett: it's ther [17:15] robinduckett: . On error, error will be an instance of Error and err.code will be the exit code of the child process, and err.signal will be set to the signal that terminated the process. [17:15] BillyBreen has joined the channel [17:15] CoverSlide: On error, error will be an instance of Error and err.code will be the exit code of the child process, and err.signal will be set to the signal that terminated the process. [17:15] robinduckett: Didn't see that bit, since I see no reason to use exec [17:16] robinduckett: infact if he used spawn he may not have the problem of his argument being too long [17:16] DrMcKay: CoverSlide: ugh, why didn't I notice that? [17:16] CoverSlide: true I hate exec [17:16] CoverSlide: but i can see the convenience factor [17:17] robinduckett: thus it annoys me that a) he didn't follow my good advice originally and b) he ignored the answer for a second time [17:17] scooterwadsworth has joined the channel [17:17] robinduckett: so yeah, no more help today, time to go home [17:17] robinduckett: later peeps [17:17] CoverSlide: lates [17:17] robinduckett has left the channel [17:19] irahgel has left the channel [17:20] ph^ has joined the channel [17:20] zeade has joined the channel [17:21] jj0hns0n_ has joined the channel [17:22] ryanj has joined the channel [17:23] NetRoY has joined the channel [17:24] stevestreza has joined the channel [17:24] tobi has joined the channel [17:26] Zenethian- has joined the channel [17:28] CrypticSwarm has joined the channel [17:29] CrypticSwarm has left the channel [17:30] CrypticSwarm has joined the channel [17:30] amerine has joined the channel [17:31] slifty has joined the channel [17:31] apanda has joined the channel [17:32] brion_ has joined the channel [17:35] cpetzold has joined the channel [17:37] murvin has joined the channel [17:38] eee_c has joined the channel [17:38] bradleymeck has joined the channel [17:39] stagas_ has joined the channel [17:39] Net_RoY has joined the channel [17:39] MaSch_ has joined the channel [17:40] ambroff has joined the channel [17:40] luke` has joined the channel [17:40] larsemil has joined the channel [17:41] stutter_ has joined the channel [17:41] chunhao_ has joined the channel [17:42] brion_ has joined the channel [17:44] whitman has joined the channel [17:46] JKarsrud: hey peeps. Do anyone have any templating engines they recommend for use with express? I don't really like the style of jade/haml, so I've been using stache, but atm the logic-less part is killing me :/ [17:47] tobi: JKarsrud you could check out handlebars, it's like mustache but you get a bit more [17:47] Cromulent has joined the channel [17:48] aho has joined the channel [17:48] harthur has joined the channel [17:49] ap80 has joined the channel [17:49] JKarsrud: tobi: seems like it doesn't have support for conditions either? [17:49] tobi: JKarsrud ejs maybe? [17:49] tobi: if you want something more raw [17:50] JKarsrud: yeah, that seems to be something I could use. My main issue with all templating languages I find atm are that they're using code blocks in one way or another. [17:50] ap80: question: how do I add to .npmrc login and password which we need to use to access npm registry? it's private protected.. just doing http://username:password@… doesn't seem to work [17:50] JKarsrud: I like the simpleness of Spark View Engine for .NET, where conditions can be _on_ the element itself [17:51] Poetro_ has joined the channel [17:51] Poetro_ has joined the channel [17:51] draginx has joined the channel [17:52] draginx: Is there a way to make it so if socket.io fails to load then to not execute any JS that's using io? [17:52] draginx: if (io != undefined) is not working =/ [17:52] CoverSlide: draginx: if typeof io === 'undefined' [17:52] CoverSlide: err add these appropriately: () [17:53] draginx: ah ty :) [17:53] draginx: does typeof() need parenthsis? [17:53] CoverSlide: nope [17:53] JKarsrud: noes [17:53] nibblebot has joined the channel [17:54] draginx: hmm it still tries to execute the io =/ [17:54] JKarsrud: tobi: I'll go for ejs for now, seems to be the best alternative when you don't want indenting to decide the syntax [17:54] JKarsrud: draginx: paste some code or something? [17:54] stagas: draginx: why are you trying to do that? [17:55] draginx: stagas: Cause I want javascript to work (ajax calls, etc) if Socket.IO is down for w/e reason [17:55] draginx: JKarsrud: already on it cleaning some things out :) [17:55] dnyy has joined the channel [17:55] stagas: draginx: oh frontend [17:55] draginx: o wait, now its working =x sorry must've been cache [17:55] draginx: thanks :) [17:56] EyePulp has joined the channel [17:56] bengrue has joined the channel [17:58] pizthewiz has joined the channel [18:00] CoverSlide: anyone in earthquake-ville? [18:00] DrMcKay: if so, take care of PCs! [18:03] theCole has joined the channel [18:03] CIA-65: node: 03koichik 07master * r485d5b5 10/ (4 files in 3 dirs): [18:03] CIA-65: node: dns: Force the DNS module to invoke callbacks asynchronously. [18:03] CIA-65: node: Fixes #1164. - http://git.io/d9ajFw [18:06] charleyd has joined the channel [18:07] DevX101 has joined the channel [18:08] kawaz_ has joined the channel [18:09] theCole has joined the channel [18:09] guidocalvano has joined the channel [18:11] EyePulp: earthquake in DC? [18:11] hellp has joined the channel [18:11] CoverSlide: apparently [18:11] CoverSlide: unless the government is lying to us [18:11] EyePulp: can't find many details yet [18:11] aheckmann: some people i know felt it in charlotte nc too [18:12] aheckmann: i didn't feel a thing tho [18:12] TheJH: http://earthquake.usgs.gov/earthquakes/recenteqsus/ [18:12] luke` has joined the channel [18:12] hlindset has joined the channel [18:13] EyePulp: TheJH: cool - thanks [18:13] CoverSlide: wow the site is operating so slow [18:13] CoverSlide: probably getting hammered [18:14] CoverSlide: they need some node luv [18:14] TheJH: CoverSlide, I think they just need a fast static file server [18:14] Fabryz has joined the channel [18:14] TheJH: CoverSlide, no need for node [18:15] addisonj_: http://earthquake.usgs.gov/earthquakes/shakemap/global/shake/c0005ild/ [18:15] addisonj_: thats why DC didn't feel it, pretty high magnitude, but must have been deep and not traveled far [18:15] heavysixer has joined the channel [18:15] CoverSlide: seems more data intensive than static files [18:16] pifantastic_ has joined the channel [18:16] Raynos has joined the channel [18:16] Raynos: Why do the fs docs suck? [18:16] Raynos: I know they are supposed to match the API of some well known unix thing [18:17] Raynos: but where am I supposed to find the docs for `.readDir` ? [18:17] CoverSlide: Raynos: what would you like to know? [18:17] EyePulp: Raynos: so you'll come in here and gripe. [18:17] CoverSlide: ther is no .readDir [18:17] Raynos: .readdir [18:17] Raynos: It returns 3 arguments, file name, ??, array of files in directory [18:17] CoverSlide: `The callback gets two arguments (err, files) where files is an array of the names of the files in the directory excluding '.' and '..'.` [18:17] Raynos: where do I find out what ?? is? [18:18] CoverSlide: 3 arguments? [18:18] Raynos: 4 arguments* [18:18] Raynos: Maybe I'm mad. [18:18] CoverSlide: I've used readdir just recently [18:18] CoverSlide: seemed to work just fine with 2 arguments [18:18] Raynos: readdirSync returns 3 arguments [18:18] CoverSlide: you can't return 3 arguments [18:19] Raynos: >_< [18:19] JKarsrud: anyone know how EJS renders partials inside it? Do I have to specify it in my object, or is there some other way? [18:19] Raynos: Your right [18:19] Raynos: I'm clearly an idiot [18:19] Raynos: Never mind. Still it would be nice to know what API fs is mimicking? [18:20] Raynos: and where I can find more detailed documentation? [18:20] JKarsrud: ahh, never mind, I suppse it's an idea to port your partial from one template engine to another before you try too hard :D [18:21] blkcat: Raynos: It says right in the docs: readdir(3) [18:21] antono has joined the channel [18:21] tobi: JKarsrud partial() is express, ejs by itself performs no IO [18:21] CoverSlide: probably mimicks dirent.h [18:21] tobi: though you can call whatever functions you expose to it obviously [18:21] Raynos: blkcat: I never thought of calling `man readdir` [18:22] JKarsrud: tobi: ah, right. well, I didn't have my _nav.ejs file anyway, so it didn't find it anywhere. But it solved my problem anyway :) [18:22] Poetro has joined the channel [18:22] Poetro has joined the channel [18:22] shipit has joined the channel [18:23] patcito has joined the channel [18:24] te-brian has joined the channel [18:24] JKarsrud: tobi: while we're talking about ejs, how does layouts work? How do you define what goes where, basically? How do you render the content of a file somewhere in your layout? [18:25] pwk0 has joined the channel [18:25] confoocious: catb0t: wtf [18:25] catb0t: wtf was she doing [18:25] tuhoojabotti: catb0t: Hey, sup dog? [18:25] catb0t: Hey , i I built from [18:25] tuhoojabotti: no wait [18:26] mikeal has joined the channel [18:26] tobi: JKarsrud the express docs/examples should cover that [18:26] blkcat: Raynos: though in truth i'm not sure i see where the node docs are steering you wrong; readdir is pretty straightforward [18:26] Raynos: blkcat: I figured out what I was doing wrong, I was being an idiot [18:31] squeese: Id like to add a function to an array, could I do that without actually adding a function to Array.prototype.func = ... ? Create my own array of sorts and add to that, in the same fashion as we do to F(){} F.prototype.func etc [18:31] tbranyen: squeese: you could just attach it to the array in question [18:31] tbranyen: if you wanted it on every single array in the execution context you'd use prototype [18:31] jhurliman has joined the channel [18:32] Wizek has joined the channel [18:32] squeese: tbranyen: hmm ya [18:32] JKarsrud: tobi: had to look it up on SO, but <%- body %> did the trick :) [18:32] tobi: JKarsrud the repo has 13+ examples [18:32] _ckpcw has joined the channel [18:33] tobi: JKarsrud but I should mention to checkout the 2.x branch if you're going to look at those [18:35] JKarsrud: I downloaded the package from npm, but that says 0.4.3, so I guess it's either the wrong package, or something out of date for sure [18:36] blup has joined the channel [18:37] gsmcwhirter has joined the channel [18:38] davidascher has joined the channel [18:39] aconbere has joined the channel [18:39] jhurliman: level09, ping [18:39] level09: yes :) [18:40] max_dev has joined the channel [18:40] level09: @jhurliman [18:40] level09: whats up [18:41] cpetzold has joined the channel [18:41] jhurliman: RE: https://github.com/tmpvar/jsdom/pull/279 i was wondering what behavior you are seeing with my patch [18:41] jhurliman: what does "the process is just being terminated now" mean more specifically [18:42] CIA-65: libuv: 03Bert Belder 07winreqerr * r1edba40 10/ (6 files in 2 dirs): win: use uv_req_t.overlapped.Internal field to propagate request errors (+5 more commits...) - http://git.io/7sxBnA [18:42] level09: jhurliman: I have pulled your fix [18:43] level09: but my code seems to exit after pulling [18:43] level09: I haven't traced it line by line to be honest [18:43] daisuke_ has joined the channel [18:43] jhurliman: ah ok. i'm wondering if it successfully finishes the parsing now, but the DOM it creates is all screwed up so you aren't seeing your app print what you expect [18:44] andyl has joined the channel [18:44] jhurliman: which seems plausible since my quick patch doesn't touch node-htmlparser, it just attempts to finish the parsing without throwing an exception [18:45] level09: yeah, I guess that is the issue [18:45] level09: I probably need to fix the parser itself [18:46] jhurliman: it should probably call document.trigger (https://github.com/tmpvar/jsdom/blob/master/lib/jsdom/level1/core.js#L731) to report the error if newNode is null, haven't looked into that yet [18:46] Poetro has joined the channel [18:48] robi42 has joined the channel [18:48] mikedeboer has joined the channel [18:48] tilgovi has joined the channel [18:48] tilgovi has joined the channel [18:48] matt_sa has left the channel [18:48] level09: I will try to take a closer look, htmlparser doesn't seem to be very active [18:50] theCode has joined the channel [18:50] reid has joined the channel [18:50] charleyd has joined the channel [18:55] kulor-uk has joined the channel [18:55] galaxywatcher has joined the channel [18:57] te-brian has joined the channel [18:57] tnlogy has joined the channel [19:00] CStumph has joined the channel [19:00] clifton has joined the channel [19:02] hybsch has joined the channel [19:03] pickels has joined the channel [19:04] EvRide has joined the channel [19:04] stagas: do ya like? https://github.com/stagas/domo/blob/master/test-domo.js#L11-35 [19:05] tobi: stagas looks like https://github.com/edspencer/jaml [19:05] CoverSlide: wow [19:05] davidwalsh has joined the channel [19:06] CoverSlide: kinda ugly [19:06] stagas: tobi: jaml looks nice haha [19:07] tobi: slow [19:07] bronson: why not use Jade? [19:07] CoverSlide: i much prefer '' + '' + etc ... to that [19:08] bronson: Seems like every language has someone that says "Hey! I'll write HTML in *mylanguage syntax" [19:08] bronson: Everyone says Wow! And then nobody uses it. [19:08] simenbrekken has joined the channel [19:08] Aphelion has joined the channel [19:09] tobi: unless you use coffeescript, then people use it lol [19:09] tbranyen: i finally learned what @ does in coffeescript [19:09] CoverSlide: @ is this [19:09] CoverSlide: or specifically, this. [19:09] tbranyen: and -> [19:10] tobi: <==> pew pew ==<> [19:10] samuelkadolph has joined the channel [19:10] sriley: ACTION still think coffeescript is a pointless fad [19:10] CoverSlide: the shortcuts in coffeescript are nice, just not nice enough for me not to hate the shit out of it [19:10] necromancer: sriley: ^5 [19:10] necromancer: i mean it's nice [19:10] DrPizza: sriley++ [19:10] v8bot_: DrPizza has given a beer to sriley. sriley now has 1 beers. [19:10] necromancer: but not worth it [19:11] EyePulp: ACTION agrees with sriley but has been wrong before. [19:11] DrPizza: no it's not nice [19:11] necromancer: wow eww [19:11] DrPizza: it makes javascript's shitty scoping rules even shittier, AFAICT [19:11] confoocious: ACTION agrees with EyePulp and is usually wrong. [19:11] necromancer: Jaml looks just...TOTALLY pointless [19:11] tobi: DrPizza sure does [19:11] ckpcw: ACTION loves coffeescript [19:11] hybsch has left the channel [19:11] CoverSlide: i interviewed at a place, they seem to use coffeescript exclusively [19:11] tobi: lololol [19:11] CoverSlide: i don't know how in the hell they expect to debug anything [19:11] tobi: was it 37signals [19:12] EyePulp: as long as no one makes me use it or screws up libraries I need with it, let people do what they want. =) [19:12] DrPizza: if I could do two things to javascript [19:12] DrPizza: it would be proper scoping [19:12] tobi: i saw .co or something the other day that looked kinda like coffeescript i was like WHAT THE FUCK IS THIS [19:12] DrPizza: and built-in support for CPS [19:12] CoverSlide: no it wasn't [19:12] tobi: so confusing, now we have CS variants [19:12] DrPizza: don't care about the object model, don't care about how wordy function() {} is [19:12] DrPizza: those are the two things that seriously get on my tits [19:12] necromancer: CoverSlide: you can still debug coffeescript...it's just different syntax after all [19:13] sriley: its pointless, just use javascript. coffeescript will just make anything written in it unmaintainable. try hiring a developer that knows coffeescript, youll struggle [19:13] aho: DrPizza, let variables are block scoped [19:13] CoverSlide: without stack traces? [19:13] necromancer: i feel like coffeescript was written for newbs who don't know JS but need to [19:14] tobi: necromancer think of it this way though, it's a clear flag for which libraries to stay away from [19:14] Poetro has joined the channel [19:14] necromancer: tobi: what do you mean by that? can't you just use any JS lib with coffeescript? [19:14] tobi: necromancer yeah, but you know which ones were written by people who dont understand js [19:15] necromancer: oh hah [19:15] ohtogo has joined the channel [19:15] necromancer: i guess [19:15] necromancer: i've never seen coffeescript-generated code [19:15] EyePulp: by definition, coffeescript will never provide more benefit than the language it's abstracting. At best it can provide conveniences to avoid having to learn difficult language syntax. To some, that's enough. [19:15] s33k has joined the channel [19:15] CoverSlide: apparently it's js-lint compliant [19:15] creationix: back before I worked on writing the coffeescript compiler, I had my own language [19:15] creationix: http://creationix.com/jack/public/ [19:16] ale has joined the channel [19:16] srveit has joined the channel [19:16] ale: Is there a function such as jQuery.inArray() on node? [19:16] necromancer: maybe it's just because i've been working with JS since 1.2, but personally i've never had a problem with the syntax of javascript. scoping was the big "ah-ha!" moment for me, afaik coffeescript doesn't prevent new devs from having to understand how that works [19:16] ale: Or a way of doing it? [19:16] tobi: ale Array.isArray() [19:16] ckpcw: EyePulp, can't you say that of any javascript library as well? [19:17] kdng-saleem3 has joined the channel [19:17] DrPizza: aho: what let variables? [19:17] creationix: ale, .indexof [19:17] aho: https://developer.mozilla.org/en/JavaScript/Reference/Statements/let [19:17] ale: thanks [19:17] ale: which one is better? [19:17] hij1nx has joined the channel [19:17] CoverSlide: ale: array.indexOf() > -1 [19:17] DrPizza: aho: oh I thought you meant in coffeescript [19:17] necromancer: ckpcw: no, some libraries like jQuery save a shitload of time when writing JS that works on all browsers (not just the modern ones) [19:17] tobi: oh did he say inArray [19:17] necromancer: underscore as well [19:17] creationix: js: (["red","green","blue"]).indexOf('orange') [19:17] gbot2: creationix: -1 [19:17] tmpvar: jhurliman, i think your patch could be navigated down into a 1 liner ;) [19:18] DrPizza: aho: yes, that'll be great when it's standard and widespread [19:18] aho: v8's support for it is on the way [19:18] aho: afaik [19:18] samuelkadolph: Is there a way to get the remote address of a request in express regardless of http or https? [19:18] necromancer: all of that stuff can be done with vanilla JS but why waste your time tediously re-inventing the wheel every time? jQuery's usefulness isn't in its character-saving syntax.. [19:18] CoverSlide: when it becomes standard, js will look like coffeescript anyway [19:18] aho: jm/tm/whatevermonkey already supports it [19:18] DrPizza: aho: then it'll just be yet another reason to not use coffeescript! [19:18] necromancer: ACTION would love it if JS looked like coffeescript [19:19] jhurliman: tmpvar, a single backspace could do that! [19:19] necromancer: CoverSlide: "when it becomes standard" = we'll be able to use it in 25 years [19:19] necromancer: i still can't use a lot of CSS3 here at work because IE 7 doesn't support it >:( [19:19] tmpvar: jhurliman, haha, I mean, the return null; could probably live in the try/catch above [19:19] CoverSlide: http://wiki.ecmascript.org/doku.php?id=harmony:classes [19:20] sriley: necromancer: a site doent have to look the same in all browsers [19:20] tmpvar: jhurliman, im still debating pulling that in btw [19:20] necromancer: sriley: it does when you work where i work :) [19:20] tmpvar: error reporting is usually a good thing :) [19:20] sriley: eg a user prob doesnt care about the rounded corner [19:20] jhurliman: tmpvar, ah ok cool. i was wondering about firing document.trigger() though. should it be reporting a problem at that point? [19:21] sriley: it has to look good enough in all browsers, but doesnt mean the same. tbh you should push back to the designer about that [19:21] CoverSlide: or we can all use traceur: http://code.google.com/p/traceur-compiler/ , https://github.com/kuno/node-traceur [19:21] albertosheinfeld has joined the channel [19:21] tmpvar: jhurliman, i'd think so.. for instance: if you parse some wild page on the internet and then run a $(..) and expect to get back a tag that was actually hosed.. you have no recourse and you blame jsdom immediately ;) [19:21] jerrysv: tmpvar: cracked press is no more [19:21] jhurliman: ideally, i'd like the library to make a best attempt and parsing html and injecting jquery and hand me back whatever it managed to create plus a list of errors it encountered along the way [19:21] tmpvar: jerrysv, oh noes! [19:21] toki_kanno has joined the channel [19:22] tmpvar: jhurliman, exactly [19:22] bronson: EyePulp, you're wrong. Assembly abstracts away machine code and provides WAY more benefit. [19:22] tmpvar: jhurliman, i have to admit.. trigger might not be the best term for "eror reporting" [19:22] NetRoY has joined the channel [19:22] andrewvos has joined the channel [19:23] tmpvar: maybe something like document.report(type, message, etc) [19:23] smathy has joined the channel [19:23] necromancer: sriley: we have a design-centric workflow, and we also maintain a backend CMS application that absolutely does have to look & behave the same way on all browsers. plus, most of our business stems from our capability to crank out the same design in all browsers. when the focus of your business is UX/UI and brochureware, yes those rounded corners DO matter, because they're central to the initial vision of the designer. [19:23] jhurliman: meh, it's an internal function call. report() does sound better though [19:23] jhurliman: trigger sounds like it's going to fire an event [19:23] tmpvar: agreed [19:24] necromancer: sriley: like, i have an interest in geeky programming shit like this but no one else here does. we're very basic: HTML/CSS/basic animating JS and PHP [19:24] jhurliman: ok, i can play with that a bit and resubmit a pull request or you can hack at it and cancel the pull request. either way [19:25] amasad has joined the channel [19:25] indexzero has joined the channel [19:25] mraleph has joined the channel [19:25] tmpvar: yep, atleast we've made some headway that is a good thing [19:25] necromancer: this, unfortunately, produces very confusing and hard-to-read PHP code made by people with graphic design degrees who don't really understand some of the more "organizational" aspects of object-oriented programming. you know, like MVC... [19:25] CIA-65: libuv: 03Bert Belder 07master * r5cae6e4 10/ (6 files in 2 dirs): win: use uv_req_t.overlapped.Internal field to propagate request errors (+5 more commits...) - http://git.io/wSZ6Pg [19:25] necromancer: speaking of geeky programming shit [19:26] necromancer: do you guys use Backbone.js as a server-side MVC framework? Is it possible to? [19:26] necromancer: i really like it [19:26] necromancer: and i think it would be super useful as a combination backend and frontend framework ontop of node.js [19:26] necromancer: but i'm not quite sure how to have backend code execute frontend code [19:26] CoverSlide: npm install backbone [19:26] nibblebot: isaacs: any plan on making the output of `npm install` more verbose? like if there is nothing to install it should say that, or if it deletes a module that was removed from package.json it should say that [19:26] tbranyen: necromancer: i've done it [19:27] tbranyen: necromancer: would not recommend going down the path of trying to share code tho [19:27] tbranyen: well at least not some stuff [19:27] necromancer: tbranyen: "share code"? [19:27] isaacs: nibblebot: npm config set loglevel verbose [19:27] CoverSlide: dnode or nowjs you can share code with [19:27] tbranyen: like use the same code client/server [19:27] heavysixer has joined the channel [19:27] necromancer: oh [19:27] samuelkadolph has left the channel [19:27] necromancer: yeah i guess not [19:27] tbranyen: necromancer: just override Sync [19:27] isaacs: nibblebot: if that's too verbose, you can try "info". if it's not verbose enough, you can try "silly" [19:27] necromancer: tbranyen: i mean the only thing that really needs to be "frontend" is the views, right? [19:27] tbranyen: i got to persist to couchdb really easily [19:27] isaacs: nibblebot: if you want even more verbosity, you can read the code :) [19:27] tbranyen: necromancer: yeah [19:28] nibblebot: isaacs: heh i see.. what about making npm help easier to read? [19:28] CoverSlide: npm silly? [19:28] isaacs: nibblebot: i'm not sure how it could be easier to read. maybe you need to increase the font size in your terminal? [19:28] dEPy has joined the channel [19:28] tbranyen: necromancer: if you have any questions lemme know [19:28] nibblebot: isaacs: just thinking more in terms of listing one command per row with a short 1 line description next to each [19:29] necromancer: tbranyen: what do you mean by "override Sync"? [19:29] necromancer: (i'm very new to backbone btw) [19:29] isaacs: nibblebot: npm install -h [19:29] tbranyen: necromancer: Sync is the function that all CRUD eventually gets to [19:29] necromancer: i come from rails-land so backbone is a breath of fresh air to me [19:29] tbranyen: and thats what handles the transport [19:29] tbranyen: by default it tries to use jQuery/Zepto AJAX [19:30] tbranyen: if you don't override it you'll get errors [19:30] necromancer: oh ok [19:30] esteth has joined the channel [19:30] kriszyp has joined the channel [19:30] tbranyen: ideally you'll map all CRUD to your internal api there [19:30] nibblebot: just saying the out of of `npm` with the comma separated list of commands which includes some aliases could be better laid out [19:30] nibblebot: s/out/output [19:30] isaacs: nibblebot: sure [19:30] esteth: Hi folks. Does anyone know if you can use dnode with different languages on the same server? For instance, can I have a dnode-ruby client call out to a dnode-javascript server? [19:30] CoverSlide: i agree [19:30] isaacs: nibblebot: doing that now [19:31] CoverSlide: like the output of any `unixcommand` --help [19:31] CoverSlide: would be sweer [19:31] ncb000gt: Anyone here fielding questions about NKO? [19:32] nibblebot: isaacs: also, do you have a good SMF config for cluster? [19:32] ekryski1 has joined the channel [19:32] Net_RoY has joined the channel [19:32] isaacs: nibblebot: the problem with printing out all the usages is that it's a really long list [19:32] piscisaureus has left the channel [19:32] saikat has joined the channel [19:33] CoverSlide: aren't some just aliases tho? [19:33] piscisaureus has joined the channel [19:33] CoverSlide: the unix-way is the more vebose the better [19:33] CoverSlide: try tar --help [19:34] tmpvar: better yet, try ffmpeg --help [19:34] tnlogy has joined the channel [19:35] isaacs: CoverSlide: some of the aliases actually are different commands [19:35] isaacs: for example `npm ll` is the same as `npm ls -l` [19:36] kdng-saleem3 has joined the channel [19:39] CarterL has joined the channel [19:40] CarterL: anyone have interest in working on a project that uses geocouch and node.js for a distrubuted geolocation service? [19:41] DrMcKay: you guys better listen to him ----^ [19:41] hekkwan has joined the channel [19:42] CoverSlide: ACTION listens [19:42] CoverSlide: I don't hear a thing [19:42] indexzero has joined the channel [19:42] chrisumbel has joined the channel [19:42] DrMcKay: ACTION talks [19:42] DrMcKay: CoverSlide: it's about natural disaster relief [19:43] DrMcKay: we're basically trying to normalize dataflow in that kinds of cases [19:43] DrMcKay: so, we've seperated basic needs, like need for resources, help, etc. [19:43] CoverSlide: for your Releif1 thingy? [19:43] DrMcKay: CoverSlide: yup [19:44] AvianFlu: DrMcKay++ [19:44] v8bot_: AvianFlu has given a beer to DrMcKay. DrMcKay now has 1 beers. [19:44] catb0t: DrMcKay now has 1 beer [19:44] CoverSlide: cool [19:44] DrMcKay: that reminded me I didn't beer in like, 2 days [19:44] DrMcKay: CoverSlide: https://github.com/Relief-1/Relief1 [19:44] Vertice has joined the channel [19:44] Vertice has joined the channel [19:44] jesusabd1llah: What's distributed geolocation? [19:44] CoverSlide: raik and mongodb? [19:45] jesusabd1llah: It sounds like a good idea [19:45] CoverSlide: why not one or the other? [19:45] DrMcKay: well, we're thinking about that [19:45] DrMcKay: actually, Mongo is almost a sure [19:45] CarterL: we're deciiding between geocouch and riak for the geolocation [19:45] halfhalo-work has joined the channel [19:45] DrMcKay: but for geolocation, we need database phones and things can talk to directly [19:45] paulwe has joined the channel [19:46] kdng-saleem3 has joined the channel [19:47] paulwe has joined the channel [19:47] kdng-saleem3 has joined the channel [19:48] aurojit has joined the channel [19:49] ale: Guys, how can I hide my server.js? Let say I have it on "htdocs/js/server.js" [19:49] draginx: O-o no one should be able to see ur node.js file.. [19:49] i42n has joined the channel [19:49] jesusabd1llah: ale: Who are you hiding it from? [19:49] hunterloftis has joined the channel [19:49] kmiyashiro: the baddies of course [19:49] ale: Everyone, so that it can't be seen [19:50] ale: Right, the bad guys [19:50] hunterloftis: socket.io + not running as sudo. Anybody have experience with this? Mostly concerned about running a webserver as root, would like to avoid that if we can. [19:50] kmiyashiro: just don't put it in a public dir [19:50] kdng-saleem3 has joined the channel [19:50] cjroebuck has joined the channel [19:50] creationix: hunterloftis: if you're not root, the flash connections will have a little more initial latenct [19:50] ale: kmiyashiro: how's that? [19:50] tbranyen: hunterloftis: you can start as root and drop to lesser privs [19:50] creationix: hunterloftis: but you can also drop root as soon as the port is bound [19:50] creationix: it doesn't need to stay root [19:50] tbranyen: hunterloftis: or look at my pref. which is authbind [19:50] kmiyashiro: ale: I don't understand... [19:51] hunterloftis: creationix: no problem, tbranyen: awesome is it easy to say how? If not I'll google it [19:51] drewolson has joined the channel [19:51] kmiyashiro: ale: you're using node, but your putting your JS in a public facing directory? [19:51] tbranyen: hunterloftis: very easy to use, plenty of guides online [19:51] creationix: hunterloftis: http://blog.nodeknockout.com/post/9300619913/countdown-to-ko-14-deploying-your-node-js-app-to [19:51] tbranyen: install: create folders, change permissions on folders [19:51] creationix: near the bottom [19:51] hunterloftis: Awesome thanks [19:51] ale: Yes [19:52] kmiyashiro: ale: why? [19:52] ale: Because I don't know where else to put it [19:52] ts__ has joined the channel [19:52] kmiyashiro: ale: ./server.js public/* [19:52] gzmask has joined the channel [19:52] mraleph has joined the channel [19:52] kdng-chris has joined the channel [19:52] ale: oh okey! [19:53] ale: kmiyashiro: Another topic..do you know any good hosting on which I could use node? [19:53] kmiyashiro: haven't looked into that much recently [19:53] kmiyashiro: I use nodester.com [19:53] kmiyashiro: which is free [19:53] kmiyashiro: but kind of weird [19:53] kmiyashiro: dotcloud is also free [19:53] kmiyashiro: for two services [19:53] gzmask: is the defacto asyn nodejs c binding library still libeio? [19:54] tomh-_ has joined the channel [19:54] ale: kmiyashiro: But anyone cheap which is stable? Such as slicehost.com ?? [19:55] pizthewiz has joined the channel [19:55] tobi: ale there's linode [19:55] mikeal has joined the channel [19:55] tobi: it's really ugly [19:55] tobi: but [19:55] kmiyashiro: ale: haven't looked into pay hosts [19:55] creationix: linode rocks [19:55] tobi: super cheap [19:55] creationix: it can handle quite a bit of load [19:55] creationix: and no.de will be pretty good if they ever launch [19:55] ale: linode can handle too much? [19:55] tobi: yeah i like it, i was a slicehost fan but other than being funny looking i like the linode service better [19:55] tbranyen: http://t.no.de/ heh [19:55] kmiyashiro: $20 a month is cheap? [19:55] tbranyen: thats about as far as i got with no.de [19:55] pquerna: wadey? [19:56] tbranyen: kmiyashiro: for what you get, yea [19:56] ale: so it won't crash linode?? [19:56] kmiyashiro: why would it crash? [19:56] dnjaramba has joined the channel [19:56] tbranyen: i had ~423 days uptime till my system had to have a reboot [19:57] ale: How many users can I have online? With linode of course [19:57] tobi: 5000million [19:57] ale: :O [19:57] ale: You kidding! [19:57] kmiyashiro: or a jillion [19:57] ale: really? [19:57] ale: Won't it consume a lot? [19:57] wadey has joined the channel [19:57] ale: Of bandwidth and memory? [19:57] kmiyashiro: dunno about memory [19:57] creationix: tobi ok, lets be resonable [19:57] pquerna: wadey: hey [19:57] tobi: 200m [19:57] kmiyashiro: bandwidth is the same on any server [19:58] wadey: pquerna: hey, what's up? [19:58] creationix: and single process won't be able to handle more than a million concurrent users [19:58] ale: 200 million PER SERVER? [19:58] ale: Cool.. [19:58] pquerna: wadey: we think there is a bug in the node thrift compiler.. one sec russell_h is getting a gist up [19:58] creationix: now, if you're in the range of 10,000 per server, then you can handle a but on a single node [19:58] wadey: pquerna: ok cool, it's possible it's already fixed in my dev branch. I guess we will find out. [19:59] hydrozen has joined the channel [19:59] pquerna: wadey: https://gist.github.com/1166334 [20:00] gnrfan has joined the channel [20:00] pquerna: wadey: in the case of Scrib's r-value for success, its 0 [20:00] pquerna: wadey: https://github.com/facebook/scribe/blob/master/if/scribe.thrift#L26 [20:00] wadey: ah I see [20:01] creationix: generally, if your process is doing nothing than holding idle connections, a single node process on tuned OS can handle up to about a million [20:01] pquerna: ResultCode OK == 0 == if (sucess) is false [20:01] wadey: should check for null instead of truthy? [20:01] pquerna: we werent sure.. if it should check for null or maybe undefined [20:01] wadey: there was a similar bug that was just reported, but for booleans [20:01] creationix: but as soon as those connections start doing real work, the number drops dramatically [20:01] wadey: pquerna: similiar bug: https://issues.apache.org/jira/browse/THRIFT-1277 [20:03] pquerna: wadey: cool, i think rudolfrck is gonna submit a patch, he said "i'm gonna rewrite it all ' :) [20:03] pquerna: bleh [20:03] pquerna: s/rudolfrck / russell_h / [20:03] Ricki` has joined the channel [20:03] wadey: whatever works best, the original compiler code was written for just the browser target in mind [20:03] escii has joined the channel [20:04] wadey: so it has a lot of weirdness to it [20:04] wadey: so fixing it up would be awesome [20:04] kdng-saleem3 has joined the channel [20:04] edude03 has joined the channel [20:04] russell_h: wadey: have you given any thought to dealing with exception handling in servers? [20:04] pquerna: wadey: https://issues.apache.org/jira/browse/THRIFT-1267 <= ps, +1 [20:04] russell_h: oh [20:05] wadey: russell_h: yeah, there is a JIRA open for that too [20:05] wadey: ah yeah, the one pquerna just pasted [20:05] russell_h: yeah, +1 for backwards-incompatible [20:05] wadey: cool, if you could show some support on that ticket that would be awesome [20:05] russell_h: easier to do it now while less people do it [20:05] russell_h: k [20:06] wadey: russell_h pquerna: are you guys using my performance dev branch? [20:06] wadey: or just the released version? [20:06] russell_h: wadey: the performance one [20:06] jamonkko has joined the channel [20:06] wadey: russell_h: any issues? I think I'm going to package that up for review very soon [20:07] russell_h: wadey: main thing I've encountered is that transport errors prevent callbacks from firing when you call a remote method [20:07] LordMetroid has joined the channel [20:07] LordMetroid: wow this channel is big [20:07] russell_h: I wrapped it up so a remote call attaches a listener on the connection [20:07] wadey: russell_h: on the client side? [20:08] russell_h: wadey: yeah [20:08] wadey: ah interesting, yeah I think we are doing that in our cassandra wrapper right now [20:08] wadey: but if you did it at the node-thrift level, that would be a nice patch [20:08] LordMetroid: Shall I either use a shell script or shall I use make for install my node.js program? [20:08] russell_h: wadey: ok, I'll try to put together a patch as soon as I get a chance [20:08] LordMetroid: I need to create a few directories [20:09] mehtryx: question: Looking at the following git://gist.github.com/1166346.git when I create an http server it defaults to 127.0.0.1 iP, is there a property I can use to have the server object confirm for me the ip it is running on? It's important because the code will run on 127.0.0.1 on my machine but on my cloud provider it may not and I wanted to make a particular function dynamic to do something with that IP [20:10] vidi: is there any good reason to minify javascript for node.js ? [20:10] mehtryx: basically I want to be able to query server.host or something like that [20:11] rgl has joined the channel [20:14] gartenstuhl has joined the channel [20:14] munkale_ has joined the channel [20:15] munkale_: has anyone used node_redis to connect to redisttogo.com? [20:15] munkale_: i keep getting dns timeouts, but i can telnet to the server on the port... [20:15] reid has joined the channel [20:15] munkale_: so i wonder if i'm misusing client.create(port, host, options) [20:15] kdng-saleem3 has joined the channel [20:15] _rgl has joined the channel [20:16] CoverSlide: munkale_: you should be using createClient [20:16] charleyd has joined the channel [20:16] munkale_: i misspoke. i am using creatClient [20:16] CoverSlide: ok [20:17] pizthewiz has joined the channel [20:17] hij1nx has joined the channel [20:17] munkale_: as host i have: 'redis://:@carp.redistogo.com [20:17] bingomanatee_: Hey nodders - if you had a height grid (2d array of ints) and wanted to use bezier curves to enlarge the grid but respect the original nature of the terrain, does anyone have a good formula/library for this? [20:18] CoverSlide: the host doesn't take a protocol [20:18] CoverSlide: just a hostname [20:18] munkale_: CoverSlide: so axe 'redis://' ? and leave the uid and pwd? [20:18] gartenst_ has joined the channel [20:18] CoverSlide: no uid pwd either [20:19] munkale_: then does uid pwd go in the auth call? [20:19] kdng-saleem3 has joined the channel [20:19] tylerstalder has joined the channel [20:19] CoverSlide: i would assume so, I don't know redistogo's system [20:19] CoverSlide: it should say [20:19] munkale_: ok. [20:19] munkale_: i'll try it out [20:19] CoverSlide: do they have an api doc? [20:19] CIA-65: node: 03Evan Martin 07master * ra916d88 10/ common.gypi : [20:19] CIA-65: node: common.gypi: don't nest "target_defaults" within "target_defaults" [20:19] CIA-65: node: The "conditions" block is already within a "target_defaults", so its [20:19] CIA-65: node: children amend target default settings already. - http://git.io/Yiq0HA [20:19] CIA-65: node: 03Evan Martin 07master * r8a29e5e 10/ (common.gypi deps/openssl/openssl.gyp): gyp: Don't pass C++ flags to C compiler, and don't pass -ansi in OpenSSL builds. - http://git.io/ms8QTQ [20:19] CIA-65: node: 03Ryan Dahl 07master * r85f7b78 10/ common.gypi : gyp: Further fixes to target_defaults for mac - http://git.io/-GZuxA [20:20] chrisumbel has joined the channel [20:20] chrisumbel_ has joined the channel [20:21] CoverSlide: yeah I think you just pass the requirepass line in auth [20:22] chrisumbel_ has joined the channel [20:22] tobi: mikeal for request can one of the part bodies be an fs.ReadStream? [20:24] mjr_: munkale_: there's an example of connecting to redistogo in test.js [20:24] munkale_: CoverSlide: it worked! [20:24] robotmay has joined the channel [20:25] munkale_: mjr_: thanks. [20:26] pquerna: wadey: btw, are y'all still using the native bindings to cassandra? [20:26] munkale_: CoverSlide: mjr_: So host was indeed just carp.redistogo.com and the i just passed pwd to auth [20:26] wadey: pquerna: you mean instead of CQL? [20:26] munkale_: (and it was blazing fast, btw) [20:27] ohtogo has joined the channel [20:27] CoverSlide: awesome [20:27] wadey: pquerna: we are still using all of the thrift methods, our production cluster is still 0.6 right now. [20:27] Shadyman has joined the channel [20:28] mjr_: munkale_: is it a win to have hosted redis? Seems like the network latency and general uncertainty of that network link could be an issue. [20:28] ryanj has joined the channel [20:29] altamic has joined the channel [20:29] munkale_: mjr_: i agree. and i'm not sure. [20:29] munkale_: mjr_: i'm interested for now just to build a prototype on a micro instance on ec2. [20:29] robotmay has joined the channel [20:30] chrisumbel has joined the channel [20:30] mjr_: I guess it makes more sense for a hosting provider that's node-specific and doesn't necessarily make it convenient to run your own redis server. [20:31] munkale_: mjr_: using the 5mb option from redistogo. but along the way i installed it locally, which was quick and painless. do you just do all redis local? [20:32] CarterL has left the channel [20:32] mjr_: Yeah, I just use it on the same instance / machine as I run node things on. [20:32] Wa has joined the channel [20:33] munkale_: how well will redis scale? could you run twitter off of it? [20:33] theCole has joined the channel [20:35] mjr_: munkale_: scaling is the current major missing component with redis. [20:35] mjr_: He's working on it, for sure. It's just taking forever. [20:36] konobi: munkale_: asking if you could run twitter off _anything_ is a daft question [20:36] konobi: =0) [20:36] munkale_: @konobi: good point [20:36] brolin has joined the channel [20:37] munkale_: mjr_: so if you're going to run a sizable web app should you go to mongodb? [20:37] Rob- has joined the channel [20:37] mjr_: munkale_: many people have rolled their own clustering / sharding schemes with redis. [20:38] mjr_: munkale_: I think mongodb is a fine option, but just make sure you understand what the tradeoffs are. [20:38] theCole_ has joined the channel [20:38] konobi: no one technology will get you there... you need to make architecturial deicisions [20:38] konobi: each of those decisions will be a trade off [20:38] munkale_: mjr_: my thoughts are: i'll start with redis bec it's easy and can run my prototype [20:38] mjr_: mongodb is pretty magical, and all of that magic comes at a price, somewhere in the system. [20:38] konobi: mjr_: like data corruption =0) [20:39] bradleymeck has joined the channel [20:39] freeformz has joined the channel [20:39] _sorensen_: how common of a problem is that [20:39] munkale_: both are nosql, right? so if i design properly, switching to mongodb later shouldn't be too bad [20:39] mjr_: I've personally been doing a lot with Riak, and it's really hard to use, but refreshingly honest about where the tradeoffs are. [20:40] draginx: mjr_: what r the tradeoffs between riak andmonogo? [20:40] draginx: my newest project ill be using riak but never used mongo :D [20:40] konobi: _sorensen_: the "default" config for mongo puts it into a very fast, but unsafe mode [20:40] mikedeboer has joined the channel [20:40] stonebranch has joined the channel [20:40] mikeal: tobi: i don't know, i didn't write the form support :) [20:40] mjr_: I have not spent enough time with mongo, so I don't really know. The API that mongo uses is really slick and easy to get started with right away. [20:40] sriley: different requirements will result in different technology choices, eg might want to pick a column store if you want to retrieve a bit of information for multiple records, if you want to pull out entire records then row store would be better [20:41] mjr_: But I have concerns about what happens to mongo when there are problems. [20:41] mikeal: i've never used a column store and never had a need for one [20:41] mikeal: but they are nevertheless fairly impressive [20:41] mikeal: i don't know of a great open source one tho [20:42] mjr_: cassandra? [20:42] mjr_: Not sure whether it counts as [20:42] mjr_: "great" [20:42] _rgl has joined the channel [20:42] mikeal: mongo prefers to defer small failures now that you likely will not care about until they become catastrophic failures later on [20:42] mikeal: riak puts any small issue up front and limits catastrophe [20:43] mikeal: cassandra is a big mash of Java [20:43] mikeal: and like most Java projects they are attempting to add every feature anyone has ever thought of [20:43] mjr_: Yeah, you need to grapple with these consistency, failure, and retry issues up front, or else they can turn into huge problems when something bad happens. [20:44] CoverSlide: like adding a sql-like dsl for a no-sql database? [20:44] Shadyman has left the channel [20:44] dshaw_1 has joined the channel [20:44] mjr_: I'm currently reworking that consistency/retry layer in our application, and it's a bunch of work. But at the same time, we recently did a rolling restart of the entire cluster, and nobody noticed. [20:44] apanda has joined the channel [20:44] mikeal: i don't blame databases for issues with the poor abstractions people build on top of them [20:45] zmbmartin has joined the channel [20:45] mjr_: So I dunno, probably worth it if you are going to build a serious production thing. Maybe not if you aren't. [20:45] sqpat has joined the channel [20:45] liar has joined the channel [20:45] EvRide1 has joined the channel [20:45] mjr_: Being able to do a rolling restart of an entire cluster with no user-visible side-effect is pretty great though. [20:45] mikeal: mongo's consistency model scares me, i'd never use it as a primary storage system, but i could see the value of offloading various types of queries to it [20:46] sqpat: does anyone have experience managing a lot (1000s or 10000s) of concurrent sockets in nodejs? [20:47] mjr_: sqpat: sure, why do you ask? [20:47] gartenstuhl has joined the channel [20:48] tmedema has joined the channel [20:48] sqpat: im about to try something really basic just to scope out what kind of overhead is involved maintaining those connections [20:48] mbutubuntu has joined the channel [20:49] mbutubuntu: hello folks, how does require work? [20:49] sqpat: i was hoping someone might have suggestions about how to load test the 'client' side of opening those connections though. [20:49] tmedema: I've got a private project. Now, it has a couple of dependencies. I'd like to set a package.json file with these dependencies and the corresponding versions. However, how do I make sure that when I require('module') inside the project, only the version set in package.json will be required? [20:49] mbutubuntu: why var aaa = require("./someLib.js"); instead of v8's load("someLib.js"); [20:50] mape: tmedema: node_modules in the project dir is the first place it will look [20:50] mbutubuntu: I'm developing a little js library... and I'd like it could work on both browsers and node.js [20:50] CoverSlide: require is commonjs compliant [20:50] mape: and that is where stuff is put if you do npm install [20:50] mjr_: sqpat: you probably need a pool of client processes on one or more machines working in concert to make sure you are testing the server and not the client. [20:50] OSInet has joined the channel [20:50] CoverSlide: more or less at least [20:50] mbutubuntu: any doc to make node.js libraries? [20:50] OSInet has left the channel [20:50] chrisumbel has joined the channel [20:50] CoverSlide: mbutubuntu: http://howtonode.org/how-to-module [20:50] tmedema: mape: right, but how does it know what version to require? node does not look at package.json, right? [20:50] chrisumbel has joined the channel [20:50] mbutubuntu: CoverSlide, thanks _) [20:50] mbutubuntu: :-) [20:51] mape: tmedema: well if you set the version in your package.json that is what npm will install, and node uses what npm installed [20:51] CoverSlide: mbutubuntu: look at this first for writing the individual files: http://nodejs.org/docs/v0.4.11/api/modules.html [20:51] tmedema: mape: eh, but what if I have several projects each requiring a different version of the same module? [20:51] termie has joined the channel [20:52] mape: all those different projects will have a different node_modules [20:52] ohtogo has joined the channel [20:52] zmbmartin: what is the best way to detect mobile user-agents? [20:52] sqpat: ok, thanks. I'll poke around to see if there are any tools or libraries that'll make this easy to do, if not i'll hack together a python script to do it. [20:53] tmedema: mape: ah, so it puts node_modules in the same directory as my project's package.json? [20:53] stisti has joined the channel [20:53] mape: tmedema: yeah [20:53] mape: wasen't like that before, but now that is how it works [20:53] tmedema: mape: that is interesting, because I have published a project NodeBasicFFmpeg, and it does not have a node_modules folder at all. [20:54] CoverSlide: it doesn't need one unless it depends on other modules [20:54] tmedema: ah of course [20:54] mape: tmedema: well if it uses modules and you have those installed globally it will work [20:54] CoverSlide: mape: I thought global installs no longer worked [20:54] chrisumbel_ has joined the channel [20:54] mape: CoverSlide: npm install -g thingy [20:55] mape: will make thingy global [20:55] CoverSlide: yes [20:55] tmedema: mape: makes sense, thanks a lot. So all I have to set is set private: true in package.json? [20:55] CoverSlide: i dont think that works anymore though [20:55] mape: hmm k, haven't heard anything about it going away but might be wrong [20:55] mape: tmedema: not sure what private does, but can't you just not publish it to npm? [20:55] indexzero has joined the channel [20:55] tmedema: mape: it's a private project [20:56] mape: Sure, but I don't see how the package.json has anything to do with it being public or private [20:56] tmedema: mape: well if I publish it without setting it to private it will be uploaded [20:57] mape: then why publish it? [20:57] tmedema: mape: ah all the node_modules magic works without publishing it? [20:57] tmedema: sorry I misread your last statement [20:58] mape: you can still git clone something, cd something, npm install and it will fetch the deps [20:58] mape: doesn't have to go though the npm registry [20:58] Nuck has joined the channel [20:58] tmedema: that's great [20:59] mape: tmedema: and it seems private is just a fail safe so you can't publish it, ie it is the same as never doing npm publish [21:00] mattp_ has joined the channel [21:00] miels has joined the channel [21:00] tmedema: mape: ah right, thanks again [21:01] eignerchris has joined the channel [21:04] al3xnull_ has joined the channel [21:08] LordMetroid: The examples in the documentation, simply makes use of require('... [21:08] LordMetroid: '). in the middle of the code [21:09] LordMetroid: If I have a function in another file, is it prefered to do require('otherfile').functionName() in the middle of the code when I need it rather than making the require in the beginning? [21:10] tbranyen: LordMetroid: i prefer to require in the beginning, but it hardly matters [21:10] tbranyen: i do it for readability [21:11] jvduf has joined the channel [21:11] sqpat: so if i want to listen to socket connections from nodejs I would use net.createServer to create the server for a socket connection, correct? [21:11] zeade has joined the channel [21:11] LordMetroid: tbranyen: okay, thanks [21:11] CoverSlide: sqpat: yes [21:12] CoverSlide: but the server it returns needs to listen() before it can receive anything [21:12] eee_c has joined the channel [21:12] CIA-65: node: 03Ryan Dahl 07master * r879eb16 10/ (7 files in 5 dirs): Have WAF variants match GYP configuration names - http://git.io/iekkIQ [21:12] CIA-65: node: 03Ryan Dahl 07master * ra7300c8 10/ (5 files in 3 dirs): WAF builds in out/ instead of build/ - http://git.io/Vyhv0A [21:12] sqpat: ok, im reading up on ports vs sockets right now. It seems I might be a little confused. I was having trouble doing more than one connection to the server [21:13] sqpat: (because i was listening on only one port) [21:13] sqpat: might just be a matter of me having a slightly more complicated server to be able to manage multiple connections over one port [21:13] Draggor: you can have multiple connections on one port easily [21:15] sqpat: so is it the case that i need to (for example) listen on one port but have several sockets associated with that port? [21:15] tomsub has joined the channel [21:15] sqpat: im just trying to wrap my head around the way i need to build it [21:15] CoverSlide: sqpat: no, one port can have multiple connections [21:15] draginx has left the channel [21:16] jga023 has joined the channel [21:17] Draggor: sqpat: http://nodejs.org/docs/v0.4.11/api/net.html#net.Server [21:17] Draggor: c is the connected socket [21:17] brianc: anyone run into an issue w/ node's version of openssl conflicting w/ a 3rd party C/C++ module's version? [21:17] tmedema: Does NPM update itself? [21:17] brianc: tmedema: no [21:17] isaacs: tmedema: not unless you tell it to [21:17] isaacs: tmedema: npm i npm -g [21:17] isaacs: i = "install" [21:17] tnlogy has joined the channel [21:18] isaacs: tmedema: if that fails, [21:18] tmedema: isaacs: ah right, and how do I check if my NPM is outdated? :) [21:18] fly-away has joined the channel [21:18] isaacs: ircretary: inst tmedema [21:18] ircretary: tmedema: `curl http://npmjs.org/install.sh | sh` (or, if there are permission issues, you can try: `curl http://npmjs.org/install.sh | sudo sh`) [21:18] isaacs: tmedema: npm outdated -g [21:18] cbones has joined the channel [21:18] tmedema: isaacs: great, I appreciate it [21:18] CoverSlide: oh sweet [21:18] isaacs: np [21:19] miels: I don't have a question today, but I just thought I'd tell you guys how awesome node is and how awesome you guys are for helping people use it correctly. Rock on. :p [21:19] sqpat: Draggor : oooooh got it. I dont have to manage socket creation myself. [21:19] sqpat: much easier [21:20] robotmay has joined the channel [21:20] jedwood has joined the channel [21:20] tmedema: Hah I am using npm@0.3.18 [21:21] jesusabdullah: Goodness! [21:21] sqpat: Draggor: so if multiple clients attempt to connect to the server in that example does the server manage it internally just fine, invoking that function separately for each one? [21:21] tmedema: looks like it is slightly outdated [21:21] CoverSlide: sqpat: yes [21:21] sqpat: cool, thank you. I was thinking too hard then. [21:22] AvianFlu has joined the channel [21:23] tobi: ryah: there's a throw typo on 1076 of net_legacy [21:23] ttpva has joined the channel [21:23] ryah: tobi: ! [21:23] robertfw has joined the channel [21:24] rphillips has joined the channel [21:25] dnyy has joined the channel [21:25] chia_ has joined the channel [21:25] aoberoi has joined the channel [21:25] ckknight has joined the channel [21:25] rphillips has joined the channel [21:26] ryah: tobi: thanks - fixing. [21:27] mbutubuntu: CoverSlide, but your link is about writing C modules for node.js... there is no word about js libraries.... or maybe loading "js libraries" is impossible [21:27] dreamdust has joined the channel [21:27] CoverSlide: actually it's about writing packages, yeah i realized that [21:27] sbisbee has joined the channel [21:27] CoverSlide: mbutubuntu: http://nodejs.org/docs/v0.5.4/api/modules.html << read this [21:28] mbutubuntu: ok, CoverSlide thanks [21:29] CIA-65: node: 03Ryan Dahl 07master * rea15635 10/ lib/net_legacy.js : [21:29] CIA-65: node: net_legacy: Fix throw typo [21:29] CIA-65: node: Thanks Tobi - http://git.io/JihLzw [21:29] chrisumbel has joined the channel [21:30] CoverSlide: thanks coding ferret! [21:30] CIA-65: node: 03Ryan Dahl 07v0.4 * r827b9c5 10/ lib/net.js : [21:30] CIA-65: node: net: fix throw error [21:30] CIA-65: node: Thanks Tobi - http://git.io/MFIcHQ [21:30] rphillips has joined the channel [21:30] tobi: hehe [21:32] dominictarr has joined the channel [21:33] markwubben has joined the channel [21:36] sub_pop has joined the channel [21:36] wink_: mscdex: ping [21:37] TooTallNate: ryah: ping [21:37] apanda has joined the channel [21:37] ryah: TooTallNate: pong [21:37] saikat has joined the channel [21:37] jaequery has joined the channel [21:38] TooTallNate: ryah: thoughs on: https://gist.github.com/1165960? [21:38] TooTallNate: not a big hurry actually [21:38] micheil has joined the channel [21:38] jaequery: hi [21:41] vikstrous has joined the channel [21:41] mikeal has joined the channel [21:41] dshaw_1 has joined the channel [21:42] CoverSlide: personally, I don't agree with using .constructor and .__proto__, esp. since mozilla plans on deprecating .__proto__ from their implementation [21:42] rfay has joined the channel [21:42] tobi: Object.create() uses __proto__ [21:42] tbranyen: heh i have a function i'm using called proto [21:42] CoverSlide: yeah, in v8 it does [21:42] tbranyen: is nearly identical to __proto__ [21:43] tobi: proto is the bomb, fuck this constructor shit [21:43] TooTallNate: well they should just standardize __proto__ [21:43] tobi: .prototype shit [21:43] mynyml has joined the channel [21:43] tobi: we need traits [21:43] tbranyen: TooTallNate: i can't imagine it ever actually being removed [21:43] TooTallNate: tbranyen: same [21:43] jaequery: wtf is __proto__ [21:43] isaacs: tobi: object.create() doesn't use __proto__ [21:43] isaacs: TooTallNate: never gonna happen. [21:43] tobi: isaacs yeah it does [21:43] tbranyen: https://github.com/tbranyen/combyne.js/blob/master/src/combyne.js#L26 [21:43] isaacs: tobi: where? [21:43] tobi: one sec i'll gist [21:43] tbranyen: ^^ is my implementation of proto [21:43] tbranyen: is pretty good [21:43] isaacs: tobi: you only actually *need* __proto__ if you want to write the prototype link on an already-existent object. [21:44] fmeyer has joined the channel [21:44] TooTallNate: isaacs: that's the only way to "extend" Functions for example [21:44] tobi: isaacs https://gist.github.com/1166665 [21:44] TooTallNate: /subclass [21:44] unlink has joined the channel [21:44] tobi: we need first-class mixin type stuff [21:44] tbranyen: same with objects [21:44] unlink has joined the channel [21:44] iammerrick has joined the channel [21:45] tobi: Object.create() is basically just __proto__ [21:45] tobi: fancy proto [21:45] tobi: smancyy [21:46] isaacs: tobi: no, it isn't. [21:46] TooTallNate: tobi: but it still won't work for extending a Function :p [21:46] isaacs: it's not just fancy __proto__, because it lets you create a *new* object and set the prototype at construction time. [21:46] isaacs: __proto__ lets you change it later [21:46] TooTallNate: difference is __proto__ modifies the proto of an existing object [21:46] tobi: sure, you can do that yourself though no problem [21:46] tbranyen: object.create has more features too [21:46] TooTallNate: i <3 __proto__ [21:46] adrianmg has joined the channel [21:46] isaacs: Object.create = construction + Object.defineProperties [21:46] CoverSlide: i personally don't aggree with changing an object's prototype, modifying it is ok, but you can do that with Object.getPrototypeOf() [21:47] tbranyen: isaacs: yeah exactly [21:47] abjorn has joined the channel [21:47] LordMetroid: I do not want to call any specific method of my module, I simply want the code in the module to execute when I call it, is that possible? [21:47] LordMetroid: id est, require('foo')(); [21:47] TooTallNate: CoverSlide: I agree except for my specific use-case [21:47] isaacs: LordMetroid: module.exports = foo; function foo () { blah blah blah } [21:48] N0va has joined the channel [21:48] LordMetroid: Sorry I meant require('foo.js')(args); [21:48] isaacs: LordMetroid: sure, same thing [21:48] isaacs: LordMetroid: just set module.exports to the function [21:48] vikstrous has joined the channel [21:48] slifty has joined the channel [21:48] isaacs: LordMetroid: so, instead of `exports.foo = foo`, you'll do `module.exports = foo` [21:49] ph^_ has joined the channel [21:49] isaacs: tobi: yes, that's how it's implemented, but the actual function that gets exposed is function create() { [native code] } [21:50] LordMetroid: okahh, thank you isaacs [21:50] adrianmg has left the channel [21:50] tobi: isaacs of course.. [21:50] isaacs: tobi: if webkit removes __proto__, i'm guessing v8 will as well [21:51] isaacs: i think it's already not allowed in "use strict" mode [21:51] tbranyen: yeah but who uses that xD [21:52] eee_c has joined the channel [21:52] LordMetroid: isaacs: instead of module.exports(foo); function foo() { blah blah blah }; [21:52] tbranyen: isaacs: works in v8 strict mode [21:52] isaacs: LordMetroid: no, not module.exports(foo) [21:52] LordMetroid: Could I make the function anonymous? [21:53] isaacs: LordMetroid: module.exports = foo [21:53] isaacs: LordMetroid: sure [21:53] LordMetroid: ok [21:53] isaacs: module.exports = function () { blah } [21:53] LordMetroid: thank you [21:53] isaacs: LordMetroid: but why would you want to do that? [21:53] isaacs: named functions are better. [21:53] LordMetroid: Why? [21:53] CoverSlide: better for debugging [21:53] isaacs: because they're prettier in stack traces [21:53] isaacs: easier to read [21:54] isaacs: also, function declarations are hoisted [21:54] isaacs: which means you can easily avoid any issues with cyclic module requires [21:54] tbranyen: well named functions are named, which is nice [21:54] tbranyen: opposed to assigning an anonymous function to a value [21:54] tbranyen: variable* [21:55] tbranyen: var lol = function() { }; lol.name == "" :-/ [21:55] LordMetroid: I want to force the module to only contain one function [21:55] LordMetroid: As the module will be user programmed [21:55] tobi: isaacs / ryah what do you guys think about augmenting some of the error messages like this to provide a little more context? https://github.com/visionmedia/node/commit/0244e71a2955d38bf2af122bbe5b1f5dc01a4f51 [21:55] isaacs: i like that [21:55] context: everyone wants a little more of me it seems [21:55] devongovett has joined the channel [21:55] isaacs: tobi: are you tjholowaychuk? [21:55] tobi: context ahahaha [21:56] isaacs: tobi: is he letting his ferret type for him again? [21:56] tobi: isaacs yeah my irc client is being lame [21:56] tobi: haha [21:56] isaacs: go chew a hole in his couch [21:56] isaacs: ;P [21:56] Renegade001 has joined the channel [21:56] tobi: oh god you should see my couch [21:56] nibblebot has joined the channel [21:56] tobi: looks like a chain gun went at it [21:56] isaacs: hahh [21:57] tmedema: I realize this is not really node related, but since many of you are web developers: anyone has experience with multiple flash shims of different libraries interfering with each other? [21:57] CoverSlide: what's the old error message? [21:57] TooTallNate: tobi: that helps, but we could also attach props to the err itself [21:57] tobi: CoverSlide the top part [21:57] CoverSlide: doesn't it give the speicifics like "address in use" [21:57] CoverSlide: oh it's a += [21:58] CoverSlide: seems like a harmless patch [21:58] achiu has joined the channel [21:59] TooTallNate: tobi: err.address would be helpful [21:59] CoverSlide: hey hey let's not go nuts [21:59] tbranyen: v8: ["lol","why"] + ["does"] + ["this","work?"] [21:59] v8bot_: tbranyen: "lol,whydoesthis,work?" [21:59] apanda has joined the channel [21:59] tbranyen: so weird [22:00] vikstrous has joined the channel [22:00] tmedema: tbranyen: you got that from the stackoverflow newsletter didn't you? ;) [22:00] tbranyen: tmedema: nope jquery pull request notes [22:00] TooTallNate: why is that weird? [22:00] LordMetroid: TooTallNate: It concatenates elements [22:01] tbranyen: v8: ({ 'test': true }) + ({ 'lol': false }) [22:01] v8bot_: tbranyen: "[object Object][object Object]" [22:01] TooTallNate: that's just how JS works :p [22:01] tbranyen: i dunno i guess i figured the valueOf for arrays would be [object Array] or something [22:01] tbranyen: don't ask me! [22:01] TooTallNate: and how Array#toString() works [22:01] tbranyen: v8: ({ 'test': true }).toString() [22:01] v8bot_: tbranyen: "[object Object]" [22:01] boaz has joined the channel [22:02] tbranyen: ah you're right [22:02] CoverSlide: v8: ''+['string','to','array'] [22:02] v8bot_: CoverSlide: "string,to,array" [22:02] tbranyen: it does use toString [22:02] tbranyen: i'm still not entirely clear on when valueOf happens and toString happens [22:02] TooTallNate: valueOf is used in ['a'] == something [22:02] CoverSlide: v8: Array.prototype.toString = function(){console.log('lameness');return undefined};''+['string','to','array']+[] [22:02] v8bot_: CoverSlide: CONSOLE: ["lameness", "lameness"], OUTPUT: "undefinedundefined" [22:02] TooTallNate: or I think 1 + something [22:03] mbutubuntu: CoverSlide, I can't understand a point, is 'event' a node.js builtin library? [22:03] CoverSlide: 'events' is [22:03] rphillips has joined the channel [22:03] mbutubuntu: so why TypeError: Object [object Object] has no method 'emit' ? [22:03] hij1nx has joined the channel [22:04] ckknight: tbranyen: that just converts each to a string, doesn't it? [22:04] CoverSlide: i don't even know what your code is [22:04] mbutubuntu: CoverSlide, it's about the same on the api/modules.html [22:04] rphillips has joined the channel [22:05] context: mbutubuntu: cause maybe Object is not the same as events.EventEmitter [22:05] tbranyen: ckknight: which? [22:05] tbranyen: i mean like when javascript inherently calls one or the other [22:05] Anton_ has joined the channel [22:06] ckknight: ['alpha'] + ['bravo'] [22:06] CoverSlide: mbutubuntu: the object calling 'emit' should be an instance of EventEmitter [22:06] jaequery: what benefit do you have by passing multiple params instead of passing in a single object as a param? [22:06] jesusabdullah: The crypto module in node is making me feel like a little kid [22:06] jesusabdullah: I was playing around with it earlier, encoding messages using aes192 [22:07] kmiyashiro: jaequery: in general? [22:07] mbutubuntu: CoverSlide, ok [22:07] CoverSlide: jaequery: which is easier to write? this: {paramName1: param, paramName2: param2} or this: param1, param2 [22:07] mbutubuntu: is there any function to export an object? [22:07] jaequery: function bla(a, b, c, d){ vs function bla(obj){ [22:08] CoverSlide: `paste 2 mbutubuntu [22:08] gbot2: Paste links, not code. Some sites you can use: | http://www.webdevout.net/test | http://erxz.com/pb/ | http://pastebin.parentnode.org/ | Please do not use pastebin.com, the reasons are many. See `pastebin. [22:08] jaequery: so its just more about convenience ? [22:08] CoverSlide: paste your code mbutubuntu, maybe we can see where your code wen wting [22:08] CoverSlide: *wrong [22:08] mbutubuntu: CoverSlide, I don't need paste... [22:08] jaequery: these days, i am more and more becoming a fan of doing bla({a: 1, b: 2, c: 3}); [22:08] mbutubuntu: I need only an answer [22:09] TooTallNate: lol [22:09] CoverSlide: the code on the page works, if yours doesn't and yours is different then the problem must be somewhere in your code [22:09] bingomanatee_: what is the difference between node and node uv? [22:10] mbutubuntu: var = require('./some.js'); some.js contains a working js library; that library runs a new instance of an (var library = new myObject()); how to use the "library" object inside node.js? [22:10] jvolkman: TooTallNate: I was looking at your node-upnp-client library and the readme seems to reference a bunch of stuff that doesn't actually exist in upnp.js. Have you just not committed or is the readme referencing planned functionality? [22:10] TooTallNate: jvolkman: what kind of "stuff"? [22:11] TooTallNate: also note that module is very unfinished [22:11] jvolkman: var controlPoint = new upnp.ControlPoint(); [22:11] bingomanatee_: mbutubuntu you can use the source file in a client side javascript (after extensive modification) or you can use "removing" but by default, node is a server side language - using it directly outside of node requires some work. [22:11] jvolkman: as best as i can tell upnp.js doesn't actually contain ControlPoint [22:11] TooTallNate: jvolkman: ya I think that was my intended API, and I just never got there [22:12] jvolkman: gotcha [22:12] TooTallNate: sorry [22:12] jvolkman: no worries [22:12] TooTallNate: but if you want to fork and make it "generic" like it should be, then be my guest [22:12] temp01 has joined the channel [22:12] TooTallNate: I can give you pointers as you need [22:12] mbutubuntu: bingomanatee_, I don't need node outside node.js, I need a js file working inside node.js :-) [22:13] heavysixer has joined the channel [22:13] jbrokc has joined the channel [22:13] LordMetroid: Should one run several website on one and the same node.js process or would it be preferable to start a new node.js for every website? [22:13] hybsch has joined the channel [22:13] CoverSlide: bingomanatee_: node relies on libev for the event loop, but that primarily works on unix based os's, libuv is a cross-platform libev that has some windows support [22:13] TooTallNate: mbutubuntu: post your code, as people have already said. then we can help you [22:13] tbranyen: TooTallNate: hows the node/ios stuff going? [22:14] TooTallNate: LordMetroid: depends on the load, but I'm hosting multiple on one process [22:14] tbranyen: i noticed some objc bridge activity [22:14] CoverSlide: LordMetroid: personal opinion, each site should be its own process, so one error doesn't take down all your sites [22:14] TooTallNate: tbranyen: ya that the new hotness [22:14] TooTallNate: I've registered #nodobjc too, so we can cat about it over there if you want [22:14] bingomanatee_: mbutubuntu: you can include any file you can find on the file system. [22:14] jvolkman: TooTallNate: I actually started on my own implementation before i came across yours, so i'll probably just continue with that. [22:14] tbranyen: TooTallNate: so with that is it possible to envision new ios specific libs being written? [22:14] tbranyen: ah okay will do [22:14] bingomanatee_: If you have an init file you can have a folder called node_modules in the same place as your start file [22:15] mbutubuntu: TooTallNate, CoverSlide, this is the source of the simple js library https://raw.github.com/netdesign/jsArrayStats/master/jsArrayStats.js [22:15] bingomanatee_: and you can use relative paths to pull a module. [22:15] vikstrous has joined the channel [22:15] mbutubuntu: I'd like to use the arrayStats() function inside node.js [22:15] CoverSlide: TooTallNate: and objc bridge? will that be compatible with GNUstep as well? [22:15] bingomanatee_: so from index.js, you can acces ./node_modules/MyClass.js with require('MyClass') [22:15] LordMetroid: CoverSlide: sounds reasonable [22:15] TooTallNate: CoverSlide: should be [22:16] bingomanatee_: or you can pull it via an absolute reference as in var MyClass = require('/var/local/js/MyClass') [22:16] max_dev has joined the channel [22:18] mbutubuntu: bingomanatee_, but MyCall will not inherit methods from the loaded library... [22:18] mbutubuntu: *MyClass [22:18] creationix has left the channel [22:18] scottschecter has joined the channel [22:18] jbrokc has joined the channel [22:18] LordMetroid: Do there exists a supervisor program that can detect crashes processes and relaunch them and mail me the event? [22:18] jesusabdullah: bingomanatee_: How's that Mars thing going? Any updates? [22:19] CoverSlide: LordMetroid: have you checked out forever? I'm not sure about the mailing thing but I do know it has logging [22:20] mehtryx has joined the channel [22:21] mike5w3c has joined the channel [22:21] tim_smart has joined the channel [22:21] LordMetroid: CoverSlide: I'll check it out now [22:21] jesusabdullah: LordMetroid: Check out forever, definitely. I suspect that the standard cli tool won't automagically email you, but you can easily use it programmatically to do what you want [22:21] bingomanatee_: I have just recently scaled down the data to a better chunk size; its all bit shuffling still, but that part has been beaten to death and I am ready to move into more interesting usage. [22:21] jesusabdullah: I totally did that with shell scripts for my thesis >:D [22:21] jesusabdullah: it was so gross [22:21] LordMetroid: Where do I find forever [22:22] jesusabdullah: well, actually [22:22] CoverSlide: LordMetroid: https://github.com/indexzero/forever [22:22] jesusabdullah: matlab + mutt + shell [22:22] carmony has joined the channel [22:22] pizthewiz has joined the channel [22:22] LordMetroid: Thanks CoverSlide, I tried to use my google-fu but I am not yet strong enough [22:22] tobi: LordMetroid for a server? [22:22] tobi: LordMetroid http://learnboost.github.com/cluster/ [22:22] tobi: and there's [22:23] tobi: https://github.com/learnboost/cluster-mail etc [22:23] jga023 has joined the channel [22:24] LordMetroid: Thanks [22:26] dhughes has joined the channel [22:26] dhughes: afternoon, peeps :) [22:27] dhughes: I'm getting started with node.js and had a quick question. It seems that the JS files are not dynamically interpreted. IE, I run node app.js. I make changes to app.js. Should I have to reload node to see the changes? [22:27] CIA-65: node: 03Ryan Dahl 07master * r42529dd 10/ (Makefile wscript): [22:27] CIA-65: node: waf: Don't build out/Debug/node_g - just out/Debug/node [22:27] CIA-65: node: This is to match how GYP does it. - http://git.io/5sg4FA [22:27] CIA-65: node: 03Ryan Dahl 07master * rb15ab5d 10/ (35 files in 13 dirs): Upgrade V8 to 3.5.7 - http://git.io/vuPzAQ [22:27] vidi has joined the channel [22:28] mbutubuntu: bingomanatee_, watch this https://gist.github.com/1166779 (4 lines of code) it gives an error in the console.... but why??! [22:28] bingomanatee_: thats messed up [22:29] jacobolu_ has joined the channel [22:29] bingomanatee_: do you have a local variable called console? [22:29] tedeh has joined the channel [22:29] mbutubuntu: bingomanatee_, no... I exited and restarted the console... [22:29] bingomanatee_: Your environment is messed up somehow. [22:29] bingomanatee_: Are you on Windows? [22:29] ckknight has joined the channel [22:29] mbutubuntu: now it works, so when an error some functionalities are broken? [22:30] mbutubuntu: bingomanatee_, how can you think that I'm on Windows :-P [22:30] bingomanatee_: thats the most messed up environment I know of [22:30] nodokodo has joined the channel [22:30] mbutubuntu: now I'm on ubuntu [22:30] bingomanatee_: thats a good start [22:30] mbutubuntu: but I prefer CentOs and Fedora [22:31] mbutubuntu: bingomanatee_, ubuntu is good on laptop... because I use laptop also for entertainment... [22:31] mbutubuntu: for work only rpm-based :-) [22:31] jvolkman: dhughes: as far as I know node's require() method caches modules and doesn't reload them from disk after the initial load. [22:32] dhughes: ok. so as *you* write code, to test it you stop and restart node? [22:32] dhughes: that seems to be what I'm finding in google [22:33] mbutubuntu: dhughes, I'm using node shell, but yes now I discovered that a restart is needed after throws [22:33] dhughes: ok, cool. thanks! [22:33] mbutubuntu: :-) [22:33] bingomanatee_: Node should behave consistently across different flavors of node. [22:33] bingomanatee_: you can use try/catch in node to catch errors. but its hard. [22:34] mbutubuntu: sometimes I use they also on browserside javascript [22:34] mbutubuntu: they're are useful... [22:35] zomgbie has joined the channel [22:35] sqpat: haha now im getting somewhere [22:35] sqpat: hit max file limit [22:37] rfay has joined the channel [22:37] ircretary has joined the channel [22:37] slifty has joined the channel [22:37] mbutubuntu: bingomanatee_, one problem persist... think the previous 4lines code as a standalone js file called myObj.js... why require('./myObj.js') doesn't give me the myObject Object? [22:38] mbutubuntu: or better how to make that object accessible by node shell ? [22:38] topaxi has joined the channel [22:39] ckknight has joined the channel [22:41] bingomanatee_: it worked fine for me after I removed parentheses around the function [22:41] rmcastil has joined the channel [22:41] bingomanatee_: even that doesn't matter... [22:41] bingomanatee_: have to go… sorry [22:41] mbutubuntu: bingomanatee_, don't be worried [22:43] mrchess` has joined the channel [22:44] brianseeders has joined the channel [22:44] hellp has joined the channel [22:45] brianseeders has joined the channel [22:45] sonnym has joined the channel [22:45] eee_c has joined the channel [22:46] tmedema has joined the channel [22:47] tmedema: how does one make an uncaught exception make sense? when I do util.debug(exception) I get something like "TypeError: Object # has no method 'get'", but when I do util.debug(util.inspect(exception, false, 20)); I do get somekind of stack trace but nowhere see the actual message of an object that has no method 'get'. [22:48] mrchess`: whats the full trace look like? [22:48] tmedema: mrchess`: the util.inspect? [22:48] jbrokc has joined the channel [22:50] mrchess`: yea [22:51] tmedema: mrchess`: https://gist.github.com/1166826 [22:52] [[zz]] has joined the channel [22:52] mrchess`: hm i see. i ran into a similar issue before [22:52] mrchess`: got same looking data [22:52] mrchess`: i couldnt figure it out either [22:52] mrchess`: so i put things in try/catch block [22:52] mrchess`: and just did e.stack [22:52] mrchess`: in the catch [22:52] hij1nx has joined the channel [22:53] tmedema: mrchess`: the thing is I have no idea where things are going wrong [22:53] mrchess`: put huge chunks of code in try/catch [22:53] mrchess`: the error will tell you where it is [22:53] ohtogo has joined the channel [22:53] mrchess`: if you do e.stack [22:53] mrchess`: catch(e) { console.log (e.stack) } [22:53] tmedema: alright [22:55] craigpetchell has joined the channel [22:56] tmedema: mrchess`: awkward. I put it around my entire application, yet the exception is not catched and goes to the uncatched event listener [22:57] blup has joined the channel [22:57] dnyy has joined the channel [22:58] blueadept has joined the channel [22:58] blueadept has joined the channel [22:58] jj0hns0n has joined the channel [23:02] mrchess`: -_- [23:02] ohtogo has joined the channel [23:02] jamescarr has joined the channel [23:06] willwhit_ has joined the channel [23:06] carmony has joined the channel [23:06] mikeal has joined the channel [23:07] willwhit_ has joined the channel [23:07] jamescarr: hmmm [23:07] CoverSlide: hmmm [23:07] gnrfan has joined the channel [23:09] smathy has left the channel [23:09] smathy has joined the channel [23:10] indexzero has joined the channel [23:11] Sorella has joined the channel [23:13] akshatj has joined the channel [23:14] spetrea has joined the channel [23:18] jacobolus has joined the channel [23:19] schwab has joined the channel [23:20] zomgbie has joined the channel [23:21] elijah has joined the channel [23:22] arthurdebert has joined the channel [23:22] tmedema: Anyone else getting a browser unresponsive error when opening the File Browser with the Flash runtime example? http://plupload.com/example_all_runtimes.php I am, with Chromium on Ubuntu 10.04. [23:23] progme has joined the channel [23:23] tmedema: Exact same issue with SWFUpload: http://demo.swfupload.org/v220/applicationdemo/index.php [23:24] ckpcw has joined the channel [23:25] H4ns` has joined the channel [23:27] smathy: What do those have to do with node? [23:27] cha0s has joined the channel [23:27] cha0s has joined the channel [23:28] jj0hns0n has joined the channel [23:29] jaredscribe has joined the channel [23:30] bradleymeck has joined the channel [23:30] Anton_: why do i always find the answer while i'm typing a question? [23:32] dgathright has joined the channel [23:32] vikstrous has joined the channel [23:34] jbschw03 has joined the channel [23:35] hij1nx has joined the channel [23:36] jaredscribe: My node documentation is at /usr/local/lib/node/doc; anyone know who to access it from man command or from vim :help so that I can look at the node manual from my text editor (vim)? is there a way to generate manpages or vim format help.txt files from the included documentation? I'm getting my development workflow put together. any help appreciated. [23:37] jaredscribe: [how] to access [23:37] misterm has joined the channel [23:37] jkwiii has joined the channel [23:38] CoverSlide: jaredscribe: I think usually people just go to http://nodejs.org/docs/latest/api/ [23:38] Lorentz: Anton_: I always do that for difficult questions, and generally an answer surfaces quickly. [23:39] JoshC1 has joined the channel [23:39] jaredscribe: thats what i've been doing so far. [23:40] BillyBreen has joined the channel [23:40] Renegade001 has joined the channel [23:41] euforic has joined the channel [23:41] euforic: How do I make a https post request i see https.get in the docs but no mention of posts [23:42] jaredscribe has left the channel [23:42] CoverSlide: euforic: http.get is just a frontend for http.request [23:42] euforic: do i just use http and set the port to 443 [23:42] CoverSlide: euforic: no [23:43] CoverSlide: use https.request({method:'post'}) [23:43] CoverSlide: also remember to request.end() so the script knows to execute the request [23:43] euforic: but where do you put the post data? [23:44] CoverSlide: request.write(data) [23:44] euforic: ok thats what i was guessing cool thanks for the help [23:45] creationix has joined the channel [23:45] creationix: mjr_: sup [23:45] mjr_: hey [23:45] micheil: oh, hey mjr_ and creationix [23:46] creationix: mjr_: do you know much about mdns and node [23:46] mjr_: Somebody did an mans add-on a long time ago [23:46] creationix: it would be really cool if it was implemntable with the existing udp support, but I think we're missing some needed primitives [23:46] creationix: mjr_: yeah, I was just looking at the old thread [23:46] creationix: but I really want to not depend on a c library if possible [23:46] tim_smart has joined the channel [23:47] mjr_: what UDP options do you need? [23:47] mrryanjohnston has joined the channel [23:47] creationix: not sure exactely, that's why I was wondering if you knew the protocol [23:47] [[zz]] has joined the channel [23:47] micheil: creationix: surely there's an RFC for it? [23:47] creationix: I don't understand well the capabilities of our udp module [23:48] guest_142 has joined the channel [23:48] mjr_: I don't know that actual mdns protocol at all [23:48] micheil: http://tools.ietf.org/html/draft-manning-dnsext-mdns-00 [23:48] creationix: mjr_: that's fine, thanks for trying [23:48] JoshC1 has joined the channel [23:49] CoverSlide: yay ietf drafts [23:49] CoverSlide: it's better than counting sheep [23:49] TooTallNate: ACTION dies a little inside every time he needs to read through one of those [23:49] micheil: CoverSlide: IETF drafts are awesome. [23:50] CoverSlide: if you're an insomniac [23:50] micheil: TooTallNate: feel for me, I need to read between 4 and 12 of them for node-websocket-protocol [23:50] creationix: hmm, not sure what "addressed to port 53 of statically-assigned relative offset -4 within the range of multicast addresses" means [23:50] akshatj has joined the channel [23:50] CoverSlide: micheil: working on hybi support? [23:50] TooTallNate: micheil: ya, I've implemented websockets too (in Java) [23:50] vikstrous has joined the channel [23:50] TooTallNate: the RFC was a PITA [23:50] micheil: CoverSlide: yeah. next version of node-websocket-server will support the latest drafts [23:51] CoverSlide: nice [23:51] micheil: (draft 11 is out now, but it's just wording changes on draft-08) [23:51] CoverSlide: probably be easier to just diff them [23:51] newy has joined the channel [23:51] micheil: yup [23:51] creationix: compared to websocket, mdns should be easy [23:51] micheil: https://github.com/miksago/thewebsocketprotocol/commits/ [23:51] creationix: I just want to advertise and browse [23:51] creationix: so I can make ad-hock mesh networks of nodes [23:52] willwhite has joined the channel [23:52] micheil: ad-hoc mesh networks of nodes sounds HOT. [23:52] micheil: :D [23:52] TooTallNate: micheil: hey nice repo! [23:52] micheil: :) [23:52] Murvin has joined the channel [23:52] CoverSlide: sweet [23:52] tobi: meow [23:52] Murvin: meow [23:52] micheil: as you do tobi :) [23:52] Murvin: ROAR [23:54] Murvin: in http.reqeust, how to send out XML data in the POST ? options.body? [23:54] CoverSlide: request.write [23:54] CoverSlide: on the returned value [23:55] Murvin: request.write. hmmm [23:55] Murvin: ok..see it