[00:00] charleso: i wanted to try this step by step...i'm new to linux, i'm trying to understand what i'm doing [00:00] bengrue has joined the channel [00:00] tbranyen: charleso: well arch is a bum bad way to do that [00:00] charleso: ouch [00:00] tbranyen: since its default to python3 [00:00] charleso: i see... [00:00] tbranyen: i use arch for everything [00:00] tbranyen: fwiw [00:01] mynyml has joined the channel [00:01] charleso: i guess you are saying arch is not for beginers? [00:02] tbranyen: no it is [00:02] charleso: ok... [00:02] tbranyen: just a bad os for dealing with pytonn2 stuff [00:02] tbranyen: by hand [00:02] tbranyen: great for learning tho [00:02] charleso: aha [00:02] tbranyen: the wiki is amazing [00:02] charleso: pls..can you walk me through the first option here https://gist.github.com/579814 [00:03] charleso: why do i get this... /usr/bin/env: python: No such file or directory [00:04] DrMcKay: charleso: `which python` [00:04] DrMcKay: no, I guess it won't work [00:04] DrMcKay: ls /usr/bin/python* [00:05] charleso: ok... [00:05] ngs has joined the channel [00:05] ag4ve has joined the channel [00:06] boltR has joined the channel [00:08] charleso: ls: cannot access /user/bin/python3: No such file or directory [00:08] devaholic has joined the channel [00:08] DrMcKay: charleso: /usr, not /user [00:09] charleso: i got it - ls /usr/bin/python2 [00:09] charleso: this is available [00:09] charleso: i guess its python2 [00:10] boltR: having some timeout issues with my twitter app.. http://pastebin.com/7dgQtDAr [00:10] DrMcKay: charleso: `sudo ln -s /usr/bin/python2 /usr/bin/python` and you're done [00:11] charleso: ok.... [00:11] DrMcKay: boltR: Twitter API is having some issues today [00:11] boltR: oh okay [00:11] kenperkins has joined the channel [00:12] boltR: DrMcKay, get request seem to be fine however to their public timeline [00:12] boltR: http://api.twitter.com/1/statuses/public_timeline.json [00:12] Vertice has joined the channel [00:12] hydrozen has joined the channel [00:13] Vertice: i finally got around to writing some hash/object safe mixins for underscore [00:13] DrMcKay: boltR: does your code timeout with each run? [00:14] boltR: only when i visit the /stream endpoint [00:14] boltR: it'll serve static files correctly [00:14] DrMcKay: boltR: oh, it's weird and may be in fact theirs fault [00:15] DrMcKay: oh, stream in your app, ok [00:15] boltR: yes [00:15] DrMcKay: !doc link http#request [00:15] dmkbot: http://nodejs.org/docs/latest/api/http.html#http.request [00:15] charleso: DrMcKay: thanks!!!! [00:15] DrMcKay: charleso: :) [00:15] charleso: I owe you a drink! [00:15] DrMcKay: boltR: I'm pretty sure that's not how you call http.request [00:16] DrMcKay: charleso: :D [00:16] albertosheinfeld has joined the channel [00:16] charleso: ...non-alcoholic...:) [00:16] boltR: DrMcKay, ah which line? [00:18] tilgovi has joined the channel [00:18] tilgovi has joined the channel [00:20] jamescarr has joined the channel [00:20] jamescarr: hmmm... anyone got the twilio api working in node? [00:20] jamescarr: I'm at my wits end... I'm about to just spawn commands through curl [00:22] charleso: DrMcKay: more issues [00:23] charleso: error: variable 'weakmap_fun' set but not used [-Werror=unused-but-set-variable] [00:23] charleso: cc1plus: all warnings being treated as errors [00:23] charleso: can i suppress this? [00:23] DrMcKay: charleso: oh, what version? [00:24] kenperkins has joined the channel [00:24] charleso: what version of archLinux? [00:24] DrMcKay: no, node [00:24] charleso: the latest...3.0 [00:24] charleso: aha [00:24] DrMcKay: boltR: 46 [00:24] jamescarr: DrMcKay? [00:25] jamescarr: DrRodneyMcKay? [00:25] charleso: from here http://nodejs.org/dist/node-latest.tar.gz [00:25] jamescarr: ACTION chuckles [00:25] boltR: DrMcKay, thanks.. also is on() favored over using addListner() ? [00:25] jamescarr: boltR, yes [00:25] boltR: okay thanks [00:25] boltR: just started picking up on Node :p [00:25] jamescarr: door.on('open', function(){}); is much better than door.addListener('open', function(){}); [00:26] boltR: i totally agree [00:26] boltR: coming from YUI it makes me happy :D [00:26] jamescarr: addListener implies a special listener versus responding to an event imho [00:27] DrMcKay: boltR: well, node is easy, I think :) [00:27] DrMcKay: jamescarr: yes, Rodney [00:27] DrMcKay: jamescarr: just don't call me Meredith [00:28] DrMcKay: boltR: on() == addListener() [00:28] amerine has joined the channel [00:28] charleso: DrMcKay: im downloading frm here:http://nodejs.org/dist/node-latest.tar.gz, as per the instructions here https://gist.github.com/579814 [00:29] ibolmo has joined the channel [00:29] boltR: DrMcKay, got it [00:29] boltR: also [00:29] boltR: i see http doesn't seem to have a createClient() [00:29] DrMcKay: boltR: no, it doesn't [00:30] DrMcKay: oh, you're using it [00:30] DrMcKay: don't [00:30] boltR: okay [00:30] snowinferno: Is it possible for me to launch another program from within my node program? [00:30] boltR: i'm going off a really old tutorial lol [00:30] SubStack: use http.request or http.get [00:30] boltR: okay [00:30] SubStack: snowinferno: require('child_process').spawn(cmd, args) [00:31] hij1nx has joined the channel [00:31] snowinferno: thanks SubStack [00:32] SubStack: snowinferno: then you can do something like: [00:32] SubStack: var ls = require('child_process').spawn('ls', ['/']); ls.stdout.on('data', function (buf) { console.log(buf.toString()) }) [00:32] jellosea: why is a constructor not in the prototype of an object? [00:33] SubStack: .. [].constructor [00:33] catb0t: [Function] [00:33] SubStack: .. [].constructor.name [00:33] catb0t: 'Array' [00:33] snowinferno: SubStack: heh I was thinking more along the lines of being able to do a hot-restart of my program from within it [00:34] SubStack: oh that's different [00:34] jakehow has joined the channel [00:34] jakehow_ has joined the channel [00:34] SubStack: snowinferno: I would just wrap the program in a while true bash loop or use forever then just process.exit() [00:34] charleso: was using the wrong version [00:34] charleso: thanks DrMcKey [00:34] SubStack: node doesn't expose the exec syscall [00:35] rchavik has joined the channel [00:35] neoesque has joined the channel [00:36] snowinferno: ahh, ok. Thanks [00:36] plutoniix has joined the channel [00:37] zackattack has joined the channel [00:37] bwinton has joined the channel [00:39] schwab: why do u guys use Node.js [00:39] zackattack has joined the channel [00:40] zackattack_ has joined the channel [00:40] steffan_ has joined the channel [00:40] snowinferno: schwab: I use it because I like javascript and want to see what I can accomplish with it on the server side. [00:41] schwab: snowinferno, cool. can it be taken seriously [00:41] schwab: seems like an unstable thing to use [00:41] snowinferno: schwab: I haven't found it to be unstable, but then again I'm only just undertaking my first major project using it. [00:41] devaholic: based on what imperical evidence is it an unstable thing to use? [00:42] zackattack_ has joined the channel [00:42] piscisaureus has joined the channel [00:42] schwab: javascript. nuff said. [00:42] schwab: anyways im not gonna try and bash it just curious [00:42] schwab: seems like it could be more stable since its less complex than other http servers [00:42] schwab: snowinferno, what is your major proj? for work or self proj? [00:43] snowinferno: schwab: self proj, I'm attempting to create a MUD from scratch using Node.js [00:44] schwab: cool. [00:44] schwab: so you from the west coast, northen cali? u work at a tech comp? [00:44] arne_d has joined the channel [00:45] devaholic: i was just pointing out that it's a pretty wild assumption [00:45] snowinferno: I'm in the south bay, work for a digital marketing company [00:45] devaholic: since when is javascript unstable in a controlled environment, anyways? [00:46] schwab: u need to go to DA [00:46] snowinferno: DA? [00:46] schwab: (devaholic) [00:46] schwab: developers anonymous [00:46] devaholic: maybe i do, maybe you need to learn about JS [00:46] mrkurt: is there a good way to see what's outstanding on the event loop? [00:46] mrkurt: which events, rather [00:47] mrkurt: I have a script that doesn't end, no idea why [00:47] mrkurt: it *appears* to be done with everything I care about [00:48] devaholic: does console.trace help [00:49] mrkurt: maybe, let me see [00:51] mrkurt: it doesn't seem to, unfortunately [00:51] smtlaissezfaire has joined the channel [00:54] kenperkins has joined the channel [00:54] devaholic: are you mixing asynch and synch together? [00:56] arne_d has joined the channel [00:56] devaholic: maybe gist your code mrkurt [00:56] mrkurt: it's actually a pretty big set of scripts [00:56] mrkurt: works fine on osx, but the tests just hang when they're done on ubuntu [00:57] steffan__ has joined the channel [00:58] devaholic: oh, well that doesnt sound fun [00:59] JoshC1 has joined the channel [01:00] mcluskydodallas has joined the channel [01:00] ibolmo has joined the channel [01:01] jellosea: how do i copy the local variables of one object/class to another? [01:03] mosen has joined the channel [01:03] nerdfiles has joined the channel [01:03] ringomanatee has joined the channel [01:04] nerdfiles has left the channel [01:04] charleso: it worked finally!!! [01:04] ringomanatee: I am getting "JS Allocation failed - process out of memory" errors in node on OSX - [01:04] ringomanatee: I have just doubled the memory in my iMac and there is 75% of teh current memory unused [01:04] ringomanatee: any suggestions? [01:08] schwab: anyway u can get total mem value in node.js? [01:09] schwab: i never used node.js before, but if u can get a value of mem that node.js thinks its avaiable that might help [01:09] devaholic: check the docs [01:10] devaholic: http://nodejs.org/docs/v0.4.11/api/all.html#process.memoryUsage [01:10] devaholic: thats not what youre looking for [01:10] devaholic: i think it's in the os section, rather [01:11] schwab: dev do u code in java? [01:11] devaholic: http://nodejs.org/docs/v0.4.11/api/all.html#os.freemem [01:11] schwab: im lookin 4 the best java ide [01:11] devaholic: i have, but i dont now [01:11] schwab: whats ur main codes [01:12] devaholic: i used netbeans and eclipse when i did, why? [01:12] devaholic: u be trollin' me again? ;) [01:12] eboyjr: Maybe stop leaking memory? [01:12] eboyjr: Stop using so much memory I mean [01:13] eboyjr: Anyway does anyone know of a good js documentation generator for node? [01:14] schwab: no lol [01:14] enhydra has joined the channel [01:14] schwab: just curious [01:14] boaz has joined the channel [01:14] nerdfiles1 has joined the channel [01:15] ringomanatee: schwab - look into JSdoc - haven't used it but I hear it being used in that context. [01:16] devaholic: i code in node.js now, schwab [01:16] nickgreenie has joined the channel [01:16] johl has joined the channel [01:16] schwab: word [01:16] eboyjr: ringomanatee: JSDoc for node? [01:16] eboyjr: I thought that was a Java thing [01:16] nerdfiles1 has left the channel [01:16] boltR: oh gawd [01:16] boltR: i got a bunch of hexadecimals [01:17] eboyjr: scary [01:17] johl: hello there [01:17] johl: i keep getting this error when i use socket.write [01:17] johl: net.js:391 [01:17] johl: throw new Error('Socket is not writable'); [01:17] johl: does that ring a bell? [01:17] devaholic: are you using nginx or something? [01:18] eboyjr: I'll try https://github.com/skrenek/node-jsdoc-toolkit [01:19] ringomanatee: Are there any issues/advantages/disads using node 4.x under Lion? [01:23] sechrist_ has joined the channel [01:24] blueadept: there shouldn't be [01:24] nickgreenie has left the channel [01:24] boltR: so am i correct in assuming http.request() is used for polling? [01:24] boltR: like getting updates from twitter [01:25] boltR: versus http.get() [01:26] k1ttty has joined the channel [01:27] seivan has joined the channel [01:27] ryan[WIN] has joined the channel [01:27] sechrist has joined the channel [01:29] jamescarr has joined the channel [01:29] sechrist has joined the channel [01:29] kkaefer has joined the channel [01:30] xerox: boltR: you could look at how twitter libraries for node do it [01:30] chrisumbel has joined the channel [01:30] jamescarr: so... I take that the twilio module really doesn't work in node.js? [01:30] nickgreenie has joined the channel [01:33] mikey_p: boltR: http.get is just a shortcut for http.request [01:34] mikey_p: boltR: there's also http://search.npmjs.org/#/request [01:35] johl: so, this [01:35] johl: net.js:391 [01:35] johl: throw new Error('Socket is not writable'); [01:35] johl: isn't something i can usual fix? [01:36] johl: i can fix in a known way, i mean [01:36] rmcastil has joined the channel [01:38] johl: what exactly makes a socket writable? [01:41] jvdev has joined the channel [01:41] edude03 has joined the channel [01:42] pen_ has joined the channel [01:42] moree has joined the channel [01:43] ditesh|cassini has joined the channel [01:44] nickgreenie has joined the channel [01:44] Voxxit has joined the channel [01:47] ericliang has joined the channel [01:48] luffing has joined the channel [01:48] ag4ve has joined the channel [01:49] nerdfiles1 has joined the channel [01:50] jellosea: how do i get console.log to print out prototype properties? [01:51] [[zz]] has joined the channel [01:51] schwab has joined the channel [01:52] mokane has joined the channel [01:52] Nuck: I hate being sick and/or allergic. [01:53] arthurdebert has joined the channel [01:53] kmiyashiro has joined the channel [01:56] ag4ve_ has joined the channel [01:56] ako: ye, ruined my weekend, too :v [01:58] MUILTFN has joined the channel [01:58] MooGoo: dddd/part [01:58] MooGoo has left the channel [01:58] MooGoo has joined the channel [01:58] tim_smart has joined the channel [02:02] zackattack has joined the channel [02:02] Spion has joined the channel [02:02] sivy has joined the channel [02:03] nickgreenie has joined the channel [02:05] ditesh|cassini has joined the channel [02:05] [[zz]] has joined the channel [02:07] seivan has joined the channel [02:07] amigojapan has joined the channel [02:10] Carter1 has joined the channel [02:13] Emmanuel` has joined the channel [02:16] metellus has joined the channel [02:16] R4md4c has joined the channel [02:18] jacobolus has joined the channel [02:19] ibrahimal-rajhi has joined the channel [02:20] R4md4c: Hello, Is there a way to send a request using the callback in the setInterval function to the server that is created using http.createServer ? (both in the same script) [02:20] amasad has joined the channel [02:25] losing has joined the channel [02:25] zanes has joined the channel [02:27] dominictarr has joined the channel [02:28] sridatta has joined the channel [02:28] cjroebuck has joined the channel [02:29] scottschecter has joined the channel [02:30] sridatta: hey all. I'm using mongoose and I was wondering if there is a middleware method for when an object is created (all I see are "init", "save" and "remove") [02:30] losing has joined the channel [02:31] binaryjohn has joined the channel [02:32] KingJamool has joined the channel [02:33] devaholic: sridatta: default? [02:33] rurufufuss has joined the channel [02:34] sridatta: devaholic: sorry, I don't understand the question [02:38] hij1nx has joined the channel [02:38] hippich has joined the channel [02:40] sh1mmer has joined the channel [02:41] _fat has joined the channel [02:41] _fat has left the channel [02:49] eazyigz: Hello, has anybody used EJS templates with express? I am having a hard time passing an array to it. [02:52] KingJamool has joined the channel [02:58] jvdev has joined the channel [02:58] ngs has joined the channel [02:58] cccaldas has joined the channel [02:59] pen has joined the channel [03:05] dgathright has joined the channel [03:06] charleso: hi, i keep getting this Error: Cannot find module 'express' [03:06] charleso: when trying app.js from tmp/foo [03:07] jtsnow has joined the channel [03:07] charleso: i installed express global [03:07] heythisisdave has joined the channel [03:07] charleso: any help, pls [03:11] heythisisdave has joined the channel [03:14] socketio\test\47 has joined the channel [03:15] johl has joined the channel [03:18] mcluskyd_ has joined the channel [03:22] snowinferno: Hi all, just wanted to take a quick poll if you all don't mind, how many of you use github for your projects? [03:22] igl has joined the channel [03:23] AvianFlu: everybody! [03:25] tbranyen: snowinferno: everyone? [03:25] boehm has joined the channel [03:25] pkrumins: EVERYBODESYSZKJASKD [03:26] ryanfitz has joined the channel [03:27] rmcastil has joined the channel [03:31] snowinferno: cool [03:34] Nuck: I wanna convert an SHA-256 hash into a string of base32 persuasion. Any ideas? [03:34] kenperkins has joined the channel [03:34] Nuck: Using parseInt stuff doesn't work, the output number ends in tons of 0's [03:35] pizthewiz has joined the channel [03:36] chrisumbel has joined the channel [03:38] e6nian has joined the channel [03:38] jtsnow has joined the channel [03:41] evanmeagher has joined the channel [03:41] chrisdickinson: v8: '3f4146a1d0b5dac26562ff7dc6248573f4e996cf764a0f517318ff398dcfa792'.split('').map(function(item, idx) { return idx % 2 === 0 ? h[idx]+h[idx+1] : null }).map(function(i) { return i !== null ? parseInt(i, 16).toString(32) : '' }).join('') [03:41] v8bot_: chrisdickinson: ReferenceError: h is not defined [03:42] Voxxit has joined the channel [03:42] chrisdickinson: round two. [03:42] chrisdickinson: v8: '3f4146a1d0b5dac26562ff7dc6248573f4e996cf764a0f517318ff398dcfa792'.split('').map(function(item, idx, all) { return idx % 2 === 0 ? all[idx]+all[idx+1] : null }).map(function(i) { return i !== null ? parseInt(i, 16).toString(32) : '' }).join('') [03:42] v8bot_: chrisdickinson: "1v2126516g5l6q6235327v3t6614453j7k794m6f3m2af2h3jo7v1p4d6f574i" [03:43] chrisdickinson: Nuck: ^^ is that something like what you'd want? [03:43] evanmeagher: can somebody offer some express/connect help? [03:43] evanmeagher: i'm trying to fix this issue: https://github.com/evnm/dropbox-node/issues/19 [03:43] evanmeagher: and i believe it has to do with express properly persisting session objects across requests [03:44] yenz: evanmeagher: sessions get serialized into JSON [03:44] yenz: which is probably why your object no longer has the method it's looking for? [03:45] evanmeagher: yenz: right. is the JSON serialization relatively new in connect? [03:45] evanmeagher: this example used to work until fairly recently [03:45] yenz: i don't /think/ so... [03:45] zackattack has joined the channel [03:45] yenz: which session store? memory? [03:45] evanmeagher: yep [03:46] Voxxit: What is the best way to mark objects for GC so they leave the memory footprint faster? [03:47] yenz: evanmeagher: in my experience w/ express/connect, it's always been serialize/deserialize... so i've had to re-constitute the desired object from the JSON before using [03:47] evanmeagher: yenz: blerg [03:47] yenz: aye. [03:47] jmoyers has joined the channel [03:47] evanmeagher: yenz: seems overly expensive, but my standards are low in this case, as it's a demo app :P [03:47] evanmeagher: yenz: thanks! [03:47] yenz: np :) [03:50] Voxxit has joined the channel [03:52] rmcastil has joined the channel [03:52] JakeyChan has joined the channel [03:55] jmoyers has joined the channel [04:01] bassui has joined the channel [04:05] bassui has left the channel [04:09] ag4ve has joined the channel [04:10] butu5 has joined the channel [04:11] jtsnow has joined the channel [04:17] isaacs has joined the channel [04:18] jetienne has joined the channel [04:19] shanebo has joined the channel [04:20] DennisRasmussen has joined the channel [04:20] zomgbie has joined the channel [04:24] Qbix1 has joined the channel [04:24] Qbix1: hey [04:24] Qbix1: what is the error class in node? [04:24] Qbix1: Error? [04:24] Qbix1: it that a new function or something [04:25] tylerstalder has joined the channel [04:26] Qbix1: how do I make an object into an eventemitter [04:26] johl_ has joined the channel [04:29] lisabrewster has joined the channel [04:30] mdaisuke has joined the channel [04:30] Qbix1: http://pastie.org/2409795 [04:30] Qbix1: is this right [04:30] steffan_ has joined the channel [04:32] slickplaid: I think the `new require('events');` should be `new require('events').EventEmitter;` and then remove the events.EventEmitter.prototype part. Not 100% sure, though. Does it work? lol [04:33] konobi: Qbix1: how do I use google? =0) [04:33] konobi: using prototype won't be sufficient, but it documented in a bunch of places [04:34] slifty has joined the channel [04:34] Qbix1: what do you mean konobi? [04:35] slickplaid: in fact, i think there's a really good description on how to do it... let me find it, one sec [04:35] konobi: Qbix1: google "node.js eventemitter" [04:35] Qbix1: I did [04:35] slickplaid: maybe this: http://elegantcode.com/2011/02/21/taking-baby-steps-with-node-js-implementing-events/ [04:35] nevir has joined the channel [04:35] Qbix1: did I get it wrong? [04:37] ibolmo has joined the channel [04:38] Nuck: chrisdickinson: That won't work, I want to treat it as one big number so I can shorten it down to a much smaller length (should be approximately half the length) [04:38] Nuck: Base 16 (hexadecimal) to Base 32 (hexatridecimal) [04:38] chrisdickinson: Nuck: so the input hash is what, 40 characters long? [04:39] zpao has joined the channel [04:39] Nuck: chrisdickinson: Something like that, yes [04:39] Nuck: It's too big a number I think [04:39] nevir: Is there a trick to require'ing a package you're developing in? (i.e. the current directory) - require(".") can't find anything - though going into any subdirectory and doing a require("..") works [04:39] Qbix1: `http://pastie.org/2409821 [04:39] Qbix1: I mean this [04:39] Qbix1: http://pastie.org/2409821 [04:39] Qbix1: shoudl I add this: [04:39] Qbix1: events.EventEmitter.call(what) [04:40] duko has left the channel [04:41] chrisdickinson: v8: '3f4146a1d0b5dac26562ff7dc6248573f4e996cf764a0f517318ff398dcfa792'.split('').map(function(item, idx, all) { return idx % 4 === 0 ? all.slice(idx, idx+4).join('') : null }).map(function(i) { return i !== null ? parseInt(i, 16).toString(32) : '' }).join('') // cc Nuck [04:41] Nuck: chrisdickinson: I'm thinking of just saying "fuckit" and trying something else to generate confirmation codes and password analogs... [04:41] v8bot_: chrisdickinson: "fq1hl11k5l1mm2pb21vrt1hh411bj1t7915mftia3qhsoo1vpp13ef19si" [04:41] chrisdickinson: well, crap. [04:41] Nuck: chrisdickinson: The concept is that you convert the hex to a number and then that.toString(32) [04:42] Nuck: Which would work, if JS ints went that high [04:42] chrisdickinson: Nuck: yeah. you should be able to go piecewise though. [04:42] Nuck: chrisdickinson: Dunno if it would work that way [04:43] Ned_ has joined the channel [04:43] Nuck: I'll just cut out my SHA-256 hashing and just generate a good random number [04:43] Ned_: If I've written a .js file I'm using on my website, is there an easy way to have it also work in Node via require() ? [04:43] sechrist has joined the channel [04:44] Ned_: at the moment, my .js file required Backbone, but I can't see how I can make Node "give" it Backbone as part of the require ? [04:44] jesusabdullah: SubStack would know the answer to this^^ [04:44] typn has joined the channel [04:45] nevir: https://github.com/substack/node-bigint ? [04:45] jesusabdullah: ? [04:46] nevir: Sorry, that was a late response to the token generation discussion above [04:47] hekkwan has joined the channel [04:47] sechrist_ has joined the channel [04:48] Nuck: nevir: Tempting but I'd rather avoid having to use something like that for this [04:48] jesusabdullah: ahhh [04:48] nevir: Yeah, fair enough :P [04:48] jesusabdullah: do it nuck,b e a man [04:49] nevir: So, if a global node_modules is bad/deprecated, and npm link installs a package you're devving into the global node_modules - which you can't require until adding it to your $NODE_PATH - what's the right way of requiring the package you're working on? [04:49] SubStack: Ned_: if you write code the node way you can use it in the browser with browserify [04:50] nevir: (specifically, to play around with it in the REPL) [04:50] Ned_: SubStack: right, [04:50] Ned_: I notice backbone does this: [04:50] isaacs: nevir: run `npm link blah` [04:50] Ned_: if (!_ && (typeof require !== 'undefined')) _ = require('underscore')._; [04:50] isaacs: nevir: somewhere [04:50] Ned_: which seems, complex :p [04:50] Ned_: SubStack: I'm actually the other way around, I've written it for the browser, and just wanna get it running in nodejs so I can do some unit tests [04:50] SubStack: if !_ looks like it would fail if _ isn't defined [04:50] isaacs: yeah [04:51] SubStack: Ned_: you'll have to write your own machinery then, vm.runInNewContext() might help [04:51] nevir: isaacs: npm link; npm link package_name? [04:51] Ned_: Hmmm, [04:51] SubStack: the problem is that browser code is so all over the place [04:51] Ned_: SubStack: interesting, [04:52] SubStack: node is really consistent with qualified exports [04:52] Ned_: SubStack: ahhh, or to simulate the global disaster that is the browser [04:52] nevir: isaacs: (this is a package I'm currently devving - it's not on the registry) [04:52] SubStack: Ned_: I would advise refactoring the part that needs to run in node to do qualified exports [04:52] Ned_: I could use script.runInThisContext() [04:52] Ned_: ;-) [04:52] Ned_: SubStack: right, and then it's trivial to make it work in a browser still ? [04:52] SubStack: then using browserify or another bundler to stitch everything together [04:53] SubStack: yep with browserify it's really easy [04:53] SubStack: ACTION wrote it [04:53] Ned_: heh [04:53] Ned_: right [04:53] Ned_: not that you're biased or nuttin' ? [04:53] Ned_: ;-) [04:53] lightcap_ has joined the channel [04:54] Ned_: cheers SubStack [04:54] SubStack: Ned_: amusingly, you can even require('vm') in the browser with browserify [04:54] torsd has joined the channel [04:54] SubStack: and require('http') works with http-browserify [04:54] Ned_: Hmmm, [04:54] Ned_: can you actually get an http server running though ? [04:54] Ned_: ;_) [04:54] SubStack: in IE5.5 even [04:54] Ned_: that would be freaky [04:54] Ned_: SubStack: IE5.5 doesn't exist to me ;_) [04:54] SubStack: it just has the client implementation [04:56] rgl has joined the channel [04:57] chrisdickinson: SubStack: planning on implementing fs using requestFilesystem? [04:58] dominictarr has joined the channel [04:58] chrisdickinson: (also, child_process.fork using web workers?) [04:58] Ned_: SubStack: any idea of a good tutorial that explains how I should be structuring stuff then ? [04:59] Ned_: or what docs I should read ? [05:00] Bogh has joined the channel [05:03] DkeP has joined the channel [05:05] SubStack: Ned_: just the node way! [05:06] eventualbuddha has joined the channel [05:06] Ned_: SubStack: right [05:09] Razer has joined the channel [05:11] lightcap has joined the channel [05:13] isaiah_ has joined the channel [05:13] zanes has joined the channel [05:14] DkeP has left the channel [05:15] confoocious has joined the channel [05:17] fangel has joined the channel [05:21] jellosea has left the channel [05:22] wookiehangover has joined the channel [05:23] isaacs: nevir: yeah, if it's already installed or linked globally, then it'll just pull in the global one [05:23] isaacs: nevir: you can also do `npm link ../foo` [05:23] amigojapan has joined the channel [05:23] Spion_ has joined the channel [05:24] sqpat has joined the channel [05:28] tilgovi has joined the channel [05:28] tilgovi has joined the channel [05:31] Nuck: Can we get a .toString(n) on Buffer objects? [05:31] Nuck: Get it into base32, etc.? [05:33] seivan has joined the channel [05:33] MUILTFN has joined the channel [05:33] stonebranch has joined the channel [05:33] stagas has joined the channel [05:35] Malar has joined the channel [05:36] hekkwan_ has joined the channel [05:36] Swizec has joined the channel [05:36] apanda has joined the channel [05:37] matomesc has joined the channel [05:37] amerine has joined the channel [05:38] azend has joined the channel [05:41] rchavik has joined the channel [05:41] Ned_ has joined the channel [05:41] rchavik has joined the channel [05:42] framlin: i snpm currently down? [05:42] framlin: NMP [05:42] jetienne_ has joined the channel [05:42] framlin: I only get npm ERR! Error: ETIMEDOUT, Connection timed out [05:43] framlin: so, if npm is up and its the proxy here, next question. Howto install a module only via http:80? [05:46] ronnieboy has joined the channel [05:47] Knifed has joined the channel [05:47] Ned_ has joined the channel [05:47] butu5 has joined the channel [05:48] akshatj has joined the channel [05:48] zackattack has joined the channel [05:50] hekkwan has joined the channel [05:51] dnjaramba has joined the channel [05:53] dnjaramba has joined the channel [05:56] hekkwan_ has joined the channel [05:56] eazyigz has joined the channel [05:57] dnjaramba has joined the channel [05:57] framlin: is there any docu, what npm is actually doing? So I could try to do that steps "manually"? [05:58] nevir: For the most part, it's unzipping a module into node_modules (in your current directory, unless you're installing things globally) [05:59] butu5: framlin: you can clone the repos under node_modules.. [05:59] hekkwan has joined the channel [06:00] unlink has joined the channel [06:00] unlink has joined the channel [06:00] Nexxy has joined the channel [06:00] Nexxy has joined the channel [06:00] hekkwan__ has joined the channel [06:01] nevir: I know this is blasphemy, but does node have any helpers to block until a callback or event has occurred? [06:01] Nexxy: just go. [06:01] Nexxy: ACTION points. [06:01] nevir: Lawl [06:01] Nexxy: ;P [06:01] stagas: nevir: block? [06:01] Nexxy: nevir, just use process.exit() [06:01] Nexxy: ;3 [06:02] nevir: stagas: make a synchronous version of a method [06:02] stephank has joined the channel [06:02] nevir: >< Hah [06:02] hekkwan_ has joined the channel [06:02] Nexxy: use return instead of a callback? [06:02] stagas: nevir: for an event to fire you need to free the event loop [06:02] stagas: nevir: ie not block or just write sync code [06:03] xat- has joined the channel [06:03] nevir: Oi, that is true - how does node manage sync versions of some of the methods (like file IO)? pump the event loop manually? [06:03] jetienne_: hi [06:03] nevir: Basically, I *want* to write the guts of my function using async code, so I can do a bit in parallel, but I want to provide a sync facade to it for the lazy [06:04] admc has joined the channel [06:05] mraleph has joined the channel [06:05] stagas: nevir: you'd need to go in c land and write a module to do an i/o operation that blocks [06:05] nevir: Ah, ok :-/ [06:06] hekkwan has joined the channel [06:06] Voxxit1 has joined the channel [06:06] stagas: nevir: but most of the time you don't want that [06:09] tmpvar has joined the channel [06:09] ohtogo has joined the channel [06:09] nevir: stagas: Yeah, definitely agree. I guess the more concrete example is that I'm playing around with a function like require that returns a module (and does some directory traversing inside) - callbacks/events aren't very conducive to working with that :( [06:10] stagas: nevir: the fs module has sync versions for that [06:10] fezzle has joined the channel [06:10] hekkwan_ has joined the channel [06:11] ph^ has joined the channel [06:11] framlin: butu5: yes, I have done this, but it seems I have to do a npm-run to build and install this cloned module and that is failing [06:11] Nuck: nevir: Callbacks are fine for that [06:11] framlin: I try to use node_pcap [06:11] Nuck: Just module.exports = function (callback){ /* do stuff*/ } [06:11] meso has joined the channel [06:12] Nuck: And then they do require('foo')(function(){ /* here's where they do shit after you're done */ } [06:12] Nuck: ); [06:12] Nuck: (forgot to close my parens) [06:12] butu5: framlin: ohh for addons written in c or c++... it compiles as well.. so u may need to do that manually [06:13] Nuck: nevir: I do it a lot, I'm quite familiar with that pattern :P [06:13] steffan_ has joined the channel [06:13] Nuck: Okay, I need advice. [06:13] nevir: Nuck: Hmm! Yeah, though that's pretty awkward if you have to wrap every file of your source that needs the module [06:13] Nuck: How should I generate a "confirmation email" code? [06:14] Nuck: nevir: I mainly use it to wrap around a series of async things anyways, so it's many indentations fewer than I would have without :P [06:14] nevir: Something as random as possible [06:14] Nuck: Yeah, but the question is how many digits, etc. [06:15] nevir: Well, probably fewer than you'd expect - esp if you go with base 64 style encoding [06:15] Nuck: Gonna do base32 [06:15] hekkwan has joined the channel [06:15] framlin: butu5: howto find out, waht to do to compile it myself. Is there any ./configure/;make;make install - pattern? [06:15] nevir: Unless you're sending out a *ton* of confirmation codes, you can probably keep the # of chars pretty low and have "pretty" URLs [06:16] Nuck: nevir: One with each registration, which is gonna be (hopefully) in the millions someday :P [06:16] nevir: (just do the math of # of requests per sec you can handle, figure out how long it'd take to brute force one of the codes on average) [06:16] nevir: Yeah, but you can invalidate them once the user registers [06:16] nevir: So that dramatically lowers the pool of active codes [06:16] Nuck: I'm jsut gonna steal a trick from Github's private gists [06:17] Nuck: They're in hex, so I'll convert that to base 10 and see how big it is [06:17] Nuck: I have a mersenne-twister random set up [06:17] Nuck: With a good seeding system [06:17] zomgbie has joined the channel [06:18] Nuck: I just need to turn that mt.rand() into a base32 string of good length [06:18] nevir: gists are git commits - it's a sha1 hash [06:18] Nuck: The codes for private gists aren't [06:18] ibolmo_ has joined the channel [06:18] Nuck: v8> parseInt('a6c4e33802a929f478d8', 16) [06:18] v8bot_: Nuck: 7.87544770834179e+23 [06:19] nevir: Oh, gotcha [06:19] Nuck: ACTION facepalms [06:19] framlin: butu5: I have called node-waf configure build and it was 'build' finished successfully (0.006s) but node-pcap is not running as it is from a pc outside the proxied net :( [06:19] Nuck: I wish I could perform .toString(32) on a buffer [06:19] Nuck: Can somebody make it happen? :3 [06:19] Nuck: If I can do that, all my problems are solved :D [06:19] nevir: that bigint library looks like it can [06:21] chrisdickinson: Nuck: do you need base32 for a confirmation page hash? why not just do hex? [06:21] Nuck: Shorter code for bigger keyspace. [06:22] chrisdickinson: Nuck: wouldn't the keyspace technically be the same? [06:22] nevir: Nuck: What about just generating a couple random numbers, base32'ing them and concatenating? Isn't that functionally the same amount of entropy & length? [06:22] chrisdickinson: i mean, if you're taking a SHA of something, and then just representing that in different ways... the keyspace would be the same, the length of the string might change. [06:22] nevir: (rather, concatenate until you have the # of chars you want - trimming if you want to) [06:23] Nuck: nevir: Well, it's pseudorandom, so given a single seed, you can predict the expected outcomes, etc. - I just wouldn't trust it. [06:23] Nuck: chrisdickinson: Well, I'm debating what to do. The length would actually be less if you represented the hex number in base32 [06:24] chrisdickinson: you could even just get away with SHA'ing the user sign up date (as an integer) concatenated to the user's desired screen name. [06:24] Nuck: I'll probably concatenate a few things (with a random number to be safe), SHA-256 it, then convert to base32 [06:25] Nuck: If base64 didn't have URL-unsafe chars I would totally use it [06:25] Nuck: But it does, so I can't. [06:25] nevir: Nuck: Sure, though I think it's over-optimization :P Even w/ a 32-bit integer (what's the max size of a JS int, anyway?) - it takes a while to brute force. Let's say you've got 1k active codes. That's a 1 in 4 mil chance of hitting a code at random [06:25] pen has joined the channel [06:26] Nuck: Good question - what IS the size of a JS int? [06:26] nevir: I'm pretty sure you'd notice someone hammering the site before then [06:26] Ned_: is there an easy way to have the repl share your entire scope ? [06:27] robotmay has joined the channel [06:27] mcepl: Damn, are these http://koji.fedoraproject.org/koji/getfile?taskID=3290616&name=build.log tests failing because of nobody uses x32 anymore or because of lack of networking in the buildsystem? [06:27] zackattack has joined the channel [06:27] DennisRasmussen has joined the channel [06:27] chrisdickinson: Nuck: nevir: http://wingolog.org/archives/2011/05/18/value-representation-in-javascript-implementations [06:28] sqpat: dumb question - my nodejs server is running and listening on 127.0.0.1, does that mean it wont respond to requests that are trying to hit it's network address (10.0.1.7) ? [06:28] junkgui has joined the channel [06:28] chrisdickinson: re: "how big is a js int anyway?" [06:29] framlin: Why does npm hate me? ;) [06:29] SamuraiJack has joined the channel [06:29] mcepl: Nuck: there is no JS int (see URL above) [06:30] chrisdickinson: mcepl: there are JS ints -- Smi's. [06:30] hekkwan has joined the channel [06:30] mcepl: oh, I see now ... I am wrong, apparently. [06:30] chrisdickinson: they're just not exposed at a language level. [06:30] chrisdickinson: (though you can do tricks to coerce numbers to integer/smi values) [06:31] mcepl: oh I see [06:31] chrisdickinson: (notably, the `~~x` operator) [06:31] tnlogy has joined the channel [06:31] chrisdickinson: s/operator/operation/g [06:31] Nuck: v8> Math.pow(10,32) [06:31] v8bot_: Nuck: 1e+32 [06:32] mcepl: so the answer is "JS in some implementations may be revealed by force to be something different than Number() which is IEEE float only." [06:32] mcepl: *JS int [06:32] jetienne_: ? [06:33] jetienne_: any pointer on this js int ? [06:33] mcluskydodallas has joined the channel [06:33] jetienne_: or maybe you means how large a int may be in a float ? [06:33] jetienne_: this is 2^53 from memory [06:34] mcepl: jetienne: see the URL above [06:35] jetienne_: mcepl: ? [06:35] chrisdickinson: v8: ~~Math.pow(2, 53) + ' ' + ~~Math.pow(2, 54) [06:35] v8bot_: chrisdickinson: "0 0" [06:35] MUILTFN has joined the channel [06:35] Nuck: Okay [06:35] bripkens has joined the channel [06:35] Nuck: So my colleague did some math for me [06:35] framlin: is there anybody who installed node_pcap successfully without using npm? [06:36] Nuck: Apparently I get 60 million combinations if I do a five-digit base36 [06:36] Nuck: Which I think is plenty [06:36] DennisRasmussen has joined the channel [06:36] Nuck: but the question is whether I can go that high :P [06:36] achiu has joined the channel [06:37] Nuck: v8> parseInt('zzzzz', 36) [06:37] v8bot_: Nuck: 60466175 [06:37] jetienne_: here 5^36 = 14551915228366851806640625 :) [06:37] zomgbie has joined the channel [06:38] Nuck: Yeah, I only have 60 million codes because I'm storing as int [06:38] Slashbunny has joined the channel [06:38] dexter_e has joined the channel [06:38] garrensmith has joined the channel [06:38] jetienne_: so suddently js got int now :))) [06:39] jetienne_: stuff happens when i dont look :) [06:40] junkgui has left the channel [06:40] depy has joined the channel [06:44] jhurliman has joined the channel [06:48] tobmaster has joined the channel [06:48] Sunset has joined the channel [06:48] tnlogy_ has joined the channel [06:49] Sunset: Can someone explain why there is a windows exe for the unstable version for download, but not the stable version on the nodejs.org site? [06:50] Sunset: Oh looks like it's not 100% supported yet :/ [06:51] dexter_e has joined the channel [06:52] mcluskyd_ has joined the channel [06:52] framlin: Sunset: there is no stable version yet ... [06:53] murvin has joined the channel [06:54] murvin: is there a way to find out the "REAL" client IP address? is x-forwarded-for header be good enough? [06:54] zomgbie has joined the channel [06:54] murvin: people can still spoof the x-forwarded-for header, right? [06:55] jetienne_: murvin: you can get the remote peer address of the tcp connection [06:56] murvin: jetienne_: how? how to do it in node.js? [06:56] jetienne_: murvin: dunno :) looking [06:56] sechrist has joined the channel [06:56] murvin: jetienne_: :-) [06:57] simenbrekken has joined the channel [06:58] murvin: jetinenne_: can't find anything in node.js doc yet.. hmm.... [06:58] unlink has joined the channel [06:58] unlink has joined the channel [06:58] dob_ has joined the channel [06:59] jetienne_: https://github.com/joyent/node/blob/master/lib/net_legacy.js#L67 [06:59] jetienne_: murvin: i think getsockname is the local address [06:59] loob2 has joined the channel [06:59] felixhummel has joined the channel [07:00] meso has joined the channel [07:00] jetienne_: http://nodejs.org/docs/v0.3.1/api/net.html#stream.remoteAddress murvin, this one seems good [07:01] mehlah has joined the channel [07:01] topaxi has joined the channel [07:04] pkbot has joined the channel [07:05] meso has joined the channel [07:06] raphdg has joined the channel [07:06] hekkwan has joined the channel [07:07] levi501d has joined the channel [07:11] isozu has joined the channel [07:13] hekkwan_ has joined the channel [07:13] andrewfff has joined the channel [07:14] shapeshed has joined the channel [07:14] avalanche123 has joined the channel [07:15] burningdog has joined the channel [07:15] rfay has joined the channel [07:15] stagas: jetienne_: v0.3.1?? :P [07:16] jetienne_: stagas :) i ididnt even notice :) [07:16] idefine has left the channel [07:18] jetienne_: https://github.com/joyent/node/blob/master/lib/net_legacy.js#L748 stagas, it is still there :) [07:18] burningdog has joined the channel [07:19] Druide_ has joined the channel [07:20] pkbot has joined the channel [07:20] augustl: I'm connecting to a tls server that rejects my certificate since it has expired. All I get is the "close" event though, no error messages. When I connect using Ruby, I get a useful error msg, " sslv3 alert certificate expired" [07:21] augustl: anything I can do to get a useful error out of node here? [07:21] augustl: the error event is not called [07:21] pizthewiz has joined the channel [07:21] augustl: and authorized and authorizationError is not set when "close" is called either [07:22] __doc__ has joined the channel [07:22] luke` has joined the channel [07:22] pkbot has joined the channel [07:23] mikedeboer has joined the channel [07:23] langworthy has joined the channel [07:24] dexter_e has joined the channel [07:25] djcoin has joined the channel [07:26] sveisvei has joined the channel [07:27] stonebranch has joined the channel [07:27] butu5: !ping [07:27] dmkbot: butu5, pong [07:28] tuhoojabotti: !ping [07:28] dmkbot: tuhoojabotti, pong [07:28] tuhoojabotti: !pong [07:28] tuhoojabotti: it doesn't work. [07:28] tuhoojabotti: I won! [07:29] sgimeno has joined the channel [07:29] butu5: :) [07:29] MUILTFN has joined the channel [07:29] Nuck: v8> parseInt('zzzzzz', 36) [07:29] v8bot_: Nuck: 2176782335 [07:29] jomoho has joined the channel [07:30] hekkwan has joined the channel [07:31] sechrist has joined the channel [07:31] sechrist: ahh bouncer [07:35] pkbot has joined the channel [07:36] butu5: !ping [07:36] dmkbot: butu5, pong [07:37] Nuck: (2176782335).toString(36) [07:37] Nuck: v8> (2176782335).toString(36) [07:37] v8bot_: Nuck: "zzzzzz" [07:37] Nuck: okay good >_> [07:38] seivan has joined the channel [07:38] [AD]Turbo has joined the channel [07:38] ohtogo has joined the channel [07:39] tuhoojabotti: lo [07:39] tuhoojabotti: l [07:39] alek_br has joined the channel [07:40] mc_greeny has joined the channel [07:42] [AD]Turbo: hi there [07:43] butu5: [AD]Turbo: hello [07:43] depywork: v8> 1+2 [07:43] v8bot_: depywork: 3 [07:44] depywork: Oh, nice.. didn't know we had that here.. :) [07:44] mehlah has joined the channel [07:44] Isaiah has joined the channel [07:44] Nuck: Somtimes it's here, sometimes it isn't. Depends if my connection dies while I'm sleeping ;) [07:44] Nuck: Should probably wrap it in a server or something IDK [07:47] vns has joined the channel [07:50] heavysixer has joined the channel [07:53] ccare has joined the channel [07:54] vns has joined the channel [07:55] uchuff has joined the channel [07:57] japj has joined the channel [07:59] depywork: Nuck: Or just implement connection retrying.. :) [08:00] radiodario has joined the channel [08:00] ttpva has joined the channel [08:03] whitman has joined the channel [08:04] azeroth__ has joined the channel [08:05] ttpva_ has joined the channel [08:06] jetienne_ has joined the channel [08:06] mpavel has joined the channel [08:10] ccare has joined the channel [08:10] groom has joined the channel [08:11] simenbrekken has joined the channel [08:11] ccare has joined the channel [08:15] Nuck: depywork: I didn't make the bot :P [08:16] mcepl has left the channel [08:16] depywork: Oh.. :) [08:16] Nuck: Anyways, is there any way to decouple my Midnight Commander instance from my SSH terminal so it'll keep running after I disconnect? If I had been thinking at the time, I would have run it under screen, but I didn't, so IDK what to do :/ [08:16] cosmincx has joined the channel [08:17] Nuck: I'm in the middle of copying millions of files [08:17] Nuck: Wait nevermind [08:17] Nuck: ACTION accidentally aborted when he meant to skip >_> [08:18] Emmanuel`: ahah [08:18] robhawkes has joined the channel [08:18] Emmanuel`: yeah, screen is the solution [08:18] jetienne_: Nuck: look at screen [08:18] jetienne_: as Emmanuel` said [08:18] jetienne_: http://www.gnu.org/s/screen/ [08:18] Nuck: Yeah, but the process was already running [08:18] ttpva has joined the channel [08:19] Nuck: I was hoping there was some magic way to move it from SSH to screen [08:19] Emmanuel`: I don't know if you can detach a process like that [08:19] Emmanuel`: like using nohup [08:19] Nuck: Doesn't matter now, anyways. [08:19] jetienne_: Nuck: type ctrl-z [08:19] Emmanuel`: but I don't know if you can detach/reattach a running process [08:19] Nuck: Since I accidentally it [08:19] jetienne_: then fg [08:19] Emmanuel`: jetienne_: yeah, but if he disconnect, it will still kill bash/sh, and the process, no ? [08:20] jetienne_: dunno :) [08:22] charleso: hello [08:22] kepheus has joined the channel [08:22] charleso: im running the examples on express [08:22] framlin: is here anybody working with node_pcap? [08:23] charleso: the chat works fine from my local machine, but it keeps disconnecting when accessed over my LAN [08:25] charleso: any help please? [08:25] kmox83 has joined the channel [08:26] woodiz has joined the channel [08:29] tbassetto has joined the channel [08:30] framlin: charleso: sorry, I do not know express :( Did you have tested any other net-hello_world over your lan, to check lan-connections in general? [08:33] kulor-uk has joined the channel [08:33] AvianFlu: try listening on 0.0.0.0 instead of localhost [08:34] unlink has joined the channel [08:34] unlink has joined the channel [08:34] ccare has left the channel [08:36] FireFly has joined the channel [08:36] ccare has joined the channel [08:36] tbassetto has joined the channel [08:37] ian-london has joined the channel [08:39] TheJH_phone has joined the channel [08:39] jetienne_ has joined the channel [08:39] TheJH_phone has joined the channel [08:40] charleso: oh [08:40] charleso: the thing is [08:41] nodejs_noob has joined the channel [08:41] charleso: i can access the landing page from my other systems [08:41] charleso: but i guess its the websocket upgrade thats failing [08:42] JakeyChan has joined the channel [08:42] charleso: ** sorry i meant socket.io not express [08:43] charleso: 0.0.0.0 is the default [08:43] charleso: that didnt work either [08:45] Nuck: And MC is now safely chugging along and copying my backups :D [08:46] Nuck: (in screen) [08:46] Esteb has joined the channel [08:46] jacobolus has joined the channel [08:49] eazyigz_ has joined the channel [08:52] blup has joined the channel [08:53] DrMcKay has joined the channel [08:53] mcluskydodallas has joined the channel [08:55] andrewfff has joined the channel [08:58] andrewff1 has joined the channel [09:00] pen has joined the channel [09:00] rfay has joined the channel [09:01] andrewff2 has joined the channel [09:01] kulor-uk has joined the channel [09:04] bzinger has joined the channel [09:07] Sebastien-L has joined the channel [09:07] andrewfff has joined the channel [09:07] pen has joined the channel [09:08] NetRoY has joined the channel [09:08] versicolor has joined the channel [09:10] copongcopong has joined the channel [09:12] copongcopong1 has joined the channel [09:12] mpavel has joined the channel [09:13] hekkwan has joined the channel [09:16] tylerstalder has joined the channel [09:18] andrewff1 has joined the channel [09:18] JakeyChan_ has joined the channel [09:20] kepheus: has anyone seen this error when using mongoose? thanks: http://dpaste.com/600335/ [09:20] kepheus: this is the example from their website [09:20] Glenjamin: Hi guys, does anyone have any recommendations for API doc generators that work well with node? [09:21] guyvdb_ has joined the channel [09:22] pen has joined the channel [09:23] pen has joined the channel [09:23] pen has joined the channel [09:24] ts__ has joined the channel [09:25] andrewfff has joined the channel [09:25] neshaug has joined the channel [09:26] meso has joined the channel [09:26] andrewff2 has joined the channel [09:27] pen has joined the channel [09:27] andrewff3 has joined the channel [09:28] pen has joined the channel [09:29] versicolor has joined the channel [09:30] akshatj: Glenjamin, docco (?) [09:30] kepheus: Glenjamin or dox [09:31] Glenjamin: I'm not keen on docco, having all the source there distracts from the public API somewhat imo [09:32] pen has joined the channel [09:32] Glenjamin: I quite like the ones where they put the method source in a little javascript expander, so you can have a look if you want to - but the screen is mostly api info [09:33] pen has joined the channel [09:33] andrewfff has joined the channel [09:33] pen has joined the channel [09:36] asabil has joined the channel [09:37] pen has joined the channel [09:38] pen has joined the channel [09:38] N0va` has joined the channel [09:40] nodokodo has joined the channel [09:41] langworthy has joined the channel [09:41] pen has joined the channel [09:41] DrMcKay: Glenjamin: is there such a doc system? (with this expander thing) [09:42] pen has joined the channel [09:43] Glenjamin: there are some for ruby, dunno about other languages [09:43] DrMcKay: so nothing like that for node? [09:44] andree has joined the channel [09:44] Glenjamin: it'd be nice, but thats not the main requirement [09:45] Margle has joined the channel [09:45] Glenjamin: I had a go with NaturalDocs, which seems to work reasonably well, but it's lacking any knowledge of node modules - in a similar way to python docs [09:45] pen has joined the channel [09:45] DrMcKay: oh, OK. do you know names of this systems for Ruby? [09:45] DrMcKay: it would be a nice to have [09:45] pen has joined the channel [09:47] DrMcKay: also, easy to write, I think... node gives us reflection [09:47] Raynos has joined the channel [09:47] ts__: What is the prefered lib to use couchdb with node ? [09:48] framlin: I use cradle [09:49] markdaws has joined the channel [09:49] ts__: okay i will look thanks [09:49] devuo has joined the channel [09:50] framlin: its a bit more high-level than just mapping the REST-API [09:50] julienXX has joined the channel [09:51] pkbot has joined the channel [09:53] markwubben has joined the channel [09:54] raoul has joined the channel [09:54] DrMcKay: Glenjamin: would you like that system to work like NaturalDocs but with introspection? [09:57] SuMarDi has joined the channel [09:59] sounko has joined the channel [09:59] pkbot has joined the channel [10:00] Glenjamin: DrMcKay: i'm not so bothered about introspection really, since you have to add type hints and there's load of ways to define method it seems reasonable to have the signature in the comment block [10:01] Glenjamin: the main issue is having support for javascript/node constructs [10:01] Glenjamin: modules, prototypal classes, object literal arguments, callback arguments [10:01] andrewfff has joined the channel [10:02] DrMcKay: oh... oh, yes. like, you could define what arguments callback gets called with? [10:02] andrewfff has left the channel [10:02] meso has joined the channel [10:02] Glenjamin: yup [10:03] Glenjamin: what reflection do we get in node? [10:03] DrMcKay: we can iterate through module, for example [10:03] Glenjamin: heh, in at least one of my classes I specifically make the instance methods non-enumerable :) [10:04] DrMcKay: Glenjamin: sneaky bastard... ;) [10:04] Glenjamin: it leaves you with well-defined iteration behaviour over properties [10:05] DrMcKay: Glenjamin: yeah, I know what you mean [10:05] Glenjamin: you just have to define methods using Object.defineProperty(Class.prototype, 'method', { value: function() {} }); Which I dont think doc generators like much either [10:05] maushu has joined the channel [10:05] DrMcKay: Glenjamin: they don't know about it, soo... ;) [10:05] pkbot has joined the channel [10:06] DrMcKay: but, well, *most* modules can be iterated [10:07] Glenjamin: I think because there's so many ways to define modules/classes/methods/properties in JS, having signatures in the docblock seems reasonable [10:07] butu5: DrMcKay: my irc4mobile is working now :) very basic stuff [10:07] sfoster has joined the channel [10:07] burningdog has joined the channel [10:08] DrMcKay: Glenjamin: yes. also, is there no docs system for node.js yet?! [10:08] DrMcKay: butu5: congratulations :) [10:08] DrMcKay: butu5: ping TheJH later, he might want to use it [10:08] Glenjamin: DrMcKay: there are a few JS ones, aside from docco/dox I've not seen anything specifically aimed at node - so nothing with module support [10:08] butu5: thanks will add coupld of thng... :)) but nothing there yet... not for guy who want to write lots of stuff here.. now just for reading in my iphone [10:09] butu5: streaming msg using socket.io [10:09] DrMcKay: ACTION launches his vim [10:09] DrMcKay: Glenjamin: I think it's fair to say that we need docs only for exported classes, objects and functions, right? [10:10] Glenjamin: yes [10:10] Glenjamin: bear in mind that module.exports can be a function in some cases [10:10] DrMcKay: Glenjamin: I use it :) [10:11] DrMcKay: ACTION hackety-hacks, brb [10:11] Glenjamin: I have a module which is both a function *and* a collection of functions [10:11] DrMcKay: Glenjamin: how? [10:11] DrMcKay: Glenjamin: oh, I know [10:11] DrMcKay: nvm [10:12] Glenjamin: https://github.com/glenjamin/nodespec/blob/master/lib/index.js [10:12] DrMcKay: Glenjamin: don't even try to come up with something more complicated! [10:12] DrMcKay: nodeception, I would call that [10:13] Glenjamin: it's a module which behaves like a singleton, but is also its own factory for more instances :) [10:13] Nomon has joined the channel [10:13] DrMcKay: .. for(var key in function(){}) { console.log(key); } [10:13] catb0t: undefined [10:14] DrMcKay: .. a = []; for(var key in function(){}) { a.push(key); }; a [10:14] catb0t: [] [10:14] DrMcKay: looks reasonable [10:14] Glenjamin: .. var a = function(){}; a.prop = 1; for(var key in a) { console.log(key); } [10:14] catb0t: 'prop'; undefined [10:14] fly-away has joined the channel [10:15] Glenjamin: nifty [10:15] DrMcKay: .. var a = function(){}; a.prop = 1; console.log(typeof a); [10:15] catb0t: 'function'; undefined [10:16] DrMcKay: good, I was afraid it'll become an object [10:18] DrMcKay: ACTION goes to give himself some cereal, programmers love cereal [10:18] ditesh|cassini has joined the channel [10:21] pkbot has joined the channel [10:21] jetienne_ has joined the channel [10:21] maushu_ has joined the channel [10:21] DrMcKay: .. var a = new object(); a.call = function(this) { }; typeof a; [10:21] catb0t: SyntaxError: Unexpected token this [10:21] DrMcKay: .. var a = new object(); a.call = function(t) { }; typeof a; [10:21] catb0t: ReferenceError: object is not defined [10:21] DrMcKay: .. var a = {}; a.call = function(t) { }; typeof a; [10:21] catb0t: 'object' [10:22] DrMcKay: .. var a = {}; a.call = function(t) { console.log('O HAI'); }; typeof a; a(); [10:22] catb0t: TypeError: Property 'a' of object # is not a function [10:23] DrMcKay: um... what? [10:23] Glenjamin: thats right [10:23] Glenjamin: a = {}; a() [10:24] DrMcKay: oh, true, call works in different way [10:24] Glenjamin: oh, you're trying to turn an object into a function? [10:24] DrMcKay: yes [10:25] Renegade001 has joined the channel [10:26] TheJH_phone: DrMcKay, turn a function in an Object instead [10:27] TheJH_phone: Cralpy phone keyboard, no curlies :( [10:27] TheJH_phone: Crappy [10:28] JakeyChan_ has joined the channel [10:28] tbassetto has joined the channel [10:30] DrMcKay: oh, git diff makes me feel so productive [10:31] bzinger has joined the channel [10:31] Yoric has joined the channel [10:31] DrMcKay: I'm gonna give this V8 a code, V8s love code! [10:32] DrMcKay: gosh, we need t-shirts and mugs so hard. [10:38] overthemike has joined the channel [10:38] dexter_e has joined the channel [10:39] radiodario has joined the channel [10:40] Charuru has joined the channel [10:41] overthemike has left the channel [10:42] meso_ has joined the channel [10:42] chrisumbel has joined the channel [10:42] chrisumbel_ has joined the channel [10:43] framlin: is everythin below /usr/lib/node/.npm within the NODE_PATH? [10:44] maushu__ has joined the channel [10:44] FireFly|n900 has joined the channel [10:45] framlin: is there an node -flag to see, where node would look for modules-fiules and -bindings? [10:46] rvanrooy has joined the channel [10:46] pen has joined the channel [10:47] junkee[] has joined the channel [10:51] micro has left the channel [10:54] DrMcKay: is there a way to get function signature in JS (other than parsing source) ? [10:55] cjroebuck has joined the channel [10:56] DrMcKay: oh, there is, I think [10:56] DrMcKay: this.signature() [10:56] DrMcKay: from here: http://helephant.com/2007/05/12/diy-javascript-stack-trace/ [10:57] Rob- has joined the channel [10:58] H4ns: DrMcKay: there is no such thing as a fixed function signature in javascript due to arguments (i just thought i'd mention it) [10:58] H4ns: DrMcKay: (arguments as in the "arguments" special object) [10:59] DrMcKay: H4ns: yes, but you can generate a "signature" with this arguments array [10:59] H4ns: DrMcKay: you can create a call signature, but not a function signature. [10:59] DrMcKay: .. function(a, b, b){}.toString() [10:59] catb0t: SyntaxError: Unexpected token ( [11:00] DrMcKay: .. var a = function (a, b, c) {}; a.toString() [11:00] catb0t: 'function (a, b, c) {}' [11:00] DrMcKay: H4ns: this should be somehow enough for me now [11:00] H4ns: .. var a = funtion () { return arguments[0]; } [11:00] catb0t: SyntaxError: Unexpected token { [11:00] DrMcKay: .. var a = function (a, b, c) {}; a.toSource() [11:00] H4ns: .. var a = function () { return arguments[0]; } [11:00] catb0t: TypeError: Object function (a, b, c) {} has no method 'toSource' [11:00] catb0t: undefined [11:00] H4ns: egal. [11:01] H4ns: DrMcKay: ok - i just thought i'd mention it. dynamic argument lists are rather popular, so relying on the declaration will probably fail on you sooner or later. [11:02] davidcoallier has joined the channel [11:02] DrMcKay: H4ns: thanks, I will keep it in mind :) [11:03] DrMcKay: .. var a = {}; a.prototype.b = function (a, b, c) {}; a.prototype.b.toString() [11:03] catb0t: TypeError: Cannot set property 'b' of undefined [11:03] Glenjamin: o.O [11:03] blup: why would one use a dynamic arg list over an obj that holds the args? [11:04] Glenjamin: blup, 2 main uses cases are function overloading and proxy methods [11:04] H4ns: blup: style, mostly. [11:04] H4ns: blup: but also variable argument lists. [11:04] bnoordhuis has joined the channel [11:05] DrMcKay: .. var a = Object; a.prototype.b = function (a, b, c) {}; a.prototype.b.toString() [11:05] catb0t: 'function (a, b, c) {}' [11:05] DrMcKay: me gusta [11:05] framlin: a = function(){}; a.prototype.b = function(a,b,c){}; a.prototype.b.toString(); [11:06] DrMcKay: Glenjamin: that seems useful for docs :) [11:06] DrMcKay: framlin: two dots at the beginning [11:06] blup: hmm, just seems to me variable arg lists are more 'breakable' as the code changes.. havent had the case of function overloading though. [11:08] DrMcKay: .. var a = Object; a.prototype.b = console.log; a.prototype.b.toString() [11:08] catb0t: 'function (obj) {\n\011\011\011\011\011\011\011process.postMessage(inspect(obj));\n\011\011\011\011\011\011}' [11:08] DrMcKay: oh... [11:08] DrMcKay: that's... [11:09] cjroebuck has joined the channel [11:09] JakeyChan has joined the channel [11:09] rurufufuss has joined the channel [11:10] cjroebuck has joined the channel [11:10] Margle has joined the channel [11:11] cjroebuck has joined the channel [11:11] andrewvos has joined the channel [11:11] framlin: why do javascript object-literals have no prototype? [11:11] cjroebuck has joined the channel [11:13] jamonkko has joined the channel [11:13] DrMcKay: .. var a = Object; a.prototype.b = function (a, b, c) {}; a.prototype.b.name [11:13] catb0t: '' [11:13] DrMcKay: now that sucks a bit... [11:14] DrMcKay: does node module have something like name? [11:14] framlin: but thats clear, cause ist anonymous [11:15] DrMcKay: framlin: I had a slight hope it would return b, but you're right, it wouldn't make sense [11:15] DrMcKay: lol :D [11:15] framlin: yes, becaus b is a referenc to an anonymous function [11:16] DrMcKay: http module, STATUS_CODES constant, code 418 :D [11:16] framlin: DrMcKay: do you know, why litterals do not have prototypes? [11:16] DrMcKay: framlin: no, I'm not sure [11:16] DrMcKay: .. var a = {}; typeof a [11:16] catb0t: 'object' [11:16] DrMcKay: oh [11:16] butu5: DrMcKay: I pm u again :) [11:16] DrMcKay: they're instances [11:17] tuhoojabotti: DrMcKay: http://dev.tuhoojabotti.com/api/easter [11:18] DrMcKay: tuhoojabotti: :D [11:19] tmedema has joined the channel [11:19] framlin: ahhh because of [11:19] framlin: var a = new Object; a.prototype.b = function bla(a, b, c) {}; a.prototype.b.name [11:19] tmedema: Is it OK to ask socket.io questions here when #socket.io is idle? :) [11:19] framlin: TypeError: Cannot set property 'b' of undefined [11:19] DrMcKay: tmedema: go for it :) [11:19] tmedema: Alright. With socket.io, is it possible to temporarily set the heartbeat timeout of a single socket to a much higher amount? I want to avoid a client from disconnecting when he opens a file browser (which blocks the browser thread, causing socket.io to disconnect). [11:19] DrMcKay: framlin: to use bot put two dots before code [11:19] DrMcKay: .. 5*2 [11:19] catb0t: 10 [11:19] framlin: .. var a = new Object; a.prototype.b = function bla(a, b, c) {}; a.prototype.b.name [11:20] catb0t: TypeError: Cannot set property 'b' of undefined [11:20] framlin: ahhh, cool [11:20] framlin: ok, so new Objects do not have properties [11:20] DrMcKay: tmedema: file browser blocks thread? [11:20] framlin: and {} are new Objects [11:20] DrMcKay: framlin: yes [11:20] tmedema: DrMcKay: yes, just like an alert box. Unfortunately. [11:21] DrMcKay: tmedema: damn it, it's 2011, hey, we have, like, threads and things... [11:21] DrMcKay: tmedema: I'm not sure if you can set timeout for one socket... [11:21] tmedema: DrMcKay: tell that to those browser giants [11:22] DrMcKay: tmedema: OK [11:22] DrMcKay: but seriously, I think I should open a bug [11:22] tmedema: DrMcKay: Very annoying. If I cannot set the heartbeat timeout, I have to let it disconnect. That means that I need to save the client's state on the server side. All very complex. [11:23] tmedema: DrMcKay: open a bug? [11:23] framlin: if it wouldnt be complex everyone could do it ;) [11:23] bnoordhuis: framlin: if object literals had a prototype, you could never have an object literal with a 'prototype' key [11:24] DrMcKay: tmedema: bugzilla.mozilla.org [11:25] DrMcKay: tmedema: but seriously, I though that file browser doesn't block [11:25] tmedema: DrMcKay: reporting it as a bug won't help me, I need to handle older browsers anyway [11:25] tmedema: DrMcKay: it does. Especially the Flash one. [11:25] DrMcKay: tmedema: sorry to hear that... [11:25] DrMcKay: I like how Google does it [11:25] tmedema: DrMcKay: how do they do it? ;) [11:25] DrMcKay: update or gtfo [11:26] tmedema: DrMcKay: well I don't have the influence to tell people what to do, unlike big G [11:26] DrMcKay: they support only 2 versions backwards, IIRC [11:26] neshaug has joined the channel [11:26] DrMcKay: tmedema: we're working on total world domination, soon. [11:27] tmedema: DrMcKay: it may be that my issue can be solved by doing a simple socket.heartbeatTimeout = 600; [11:27] maushu_ has joined the channel [11:27] framlin: bnoordhuis: why? [11:28] DrMcKay: tmedema: oh, I didn't know it's that configurable [11:28] DrMcKay: tmedema: but I'm socket.io newbie, so. [11:28] tmedema: DrMcKay: I don't know either [11:28] tmedema: the API is not documented [11:28] bnoordhuis: framlin: because it would clash with the object's prototype property obviously [11:31] framlin: why shoud i not be able to replace the built-in prototype property with my own? [11:32] DrMcKay: bnoordhuis: any thoughs on node.js documentation system? something which would be useful to use in node.js source? [11:32] framlin: .. var a = function a(){}; a.prototype.b = function bla(a, b, c) {}; a.prototype.b.name [11:32] catb0t: 'bla' [11:32] framlin: var a = new function a(){}; a.prototype = {}; a.prototype.b = function bla(a, b, c) {}; a.prototype.b.name [11:33] framlin: .. var a = new function a(){}; a.prototype = {}; a.prototype.b = function bla(a, b, c) {}; a.prototype.b.name [11:33] catb0t: 'bla' [11:33] tmedema: is window.onunload = function() { /* I run when window is closed. */ }; well supported by most browsers? [11:33] DrMcKay: tmedema: yes, but some browsers interrupt it faster than other events, IIRC [11:33] bnoordhuis: DrMcKay: can you elaborate? [11:34] DrMcKay: bnoordhuis: I'm writing a simple doc system which understands things like modules, prototypes, callback, etc. [11:34] tmedema: DrMcKay: do you know if it closes websockets or flash apps before or after that event? [11:34] DrMcKay: tmedema: unfortunately no [11:34] DrMcKay: tmedema: I don't know, I mean [11:34] pkbot has joined the channel [11:34] tmedema: DrMcKay: hmm, alright. I need to be able to tell my server "I want to disconnect" so that it will know whether a disconnected client is probably reconnecting or not. [11:35] bnoordhuis: DrMcKay: probably not something we'd immediately pull into the core [11:35] DrMcKay: tmedema: do it in unload, websock will be open in it [11:35] bnoordhuis: DrMcKay: unless it's over 9000% better than the next best thing maybe [11:35] bnoordhuis: DrMcKay: i'd have to see it first :) [11:35] tmedema: DrMcKay: what about other transport types such as flashsocket, http polling etc.? [11:36] DrMcKay: bnoordhuis: I don't mean pulling it into source, I don't really expect that ;) [11:36] DrMcKay: I'm just asking what would be a nice-to-have in that kind of system [11:36] brianseeders has joined the channel [11:36] bsstoner has joined the channel [11:36] maushu__ has joined the channel [11:37] DrMcKay: tmedema: I tend to keep flash at least one VM away, so I have no idea [11:37] DrMcKay: tmedema: you would have to read DOM specification I think :( [11:37] bnoordhuis: DrMcKay: the first that comes to mind is that it should have a proper parser, not a regex scanner [11:38] tmedema: DrMcKay: the question is what browsers actually follow the specs [11:38] DrMcKay: bnoordhuis: well, it works on "live" modules (requires them and then does magic) [11:38] framlin: DrMcKay: it should be recognize, that a.prototype.b = function(){} is a "member-function" for a classical-class-stype aproach [11:38] DrMcKay: framlin: that's a must :) [11:39] framlin: ;) [11:39] aklt has joined the channel [11:39] JakeyChan has joined the channel [11:39] bnoordhuis: DrMcKay: that's kind of dangerous though, isn't it? you can't do that with arbitrary third-party modules [11:39] zomgbie has joined the channel [11:39] framlin: yes, but if possible not printig it twice if you have a.prototype.b = function b(...... [11:40] aklt: bnoordhuis: I had a look at the WIP stream branch of node-iconv and was wandering what is missing. Maybe I can pitch in? [11:40] framlin: and it should exprots asign as members of a module .... its a must, too, I think ... ;9 [11:40] bnoordhuis: aklt: the main thing missing is time :) [11:40] DrMcKay: bnoordhuis: yeah, I was wondering if should I sandbox them somehow [11:41] DrMcKay: bnoordhuis: but, after all, user should know what is he doing with his machine [11:41] bnoordhuis: aklt: i'm employed by joyent now to work on node, it's killed off most of my hobby time [11:41] bnoordhuis: DrMcKay: well... maybe [11:41] bnoordhuis: DrMcKay: still, i'd check if you could repurpose e.g. uglifyjs's parser [11:42] DrMcKay: bnoordhuis: oh, hackish, I like it :) [11:42] mehtryx has joined the channel [11:43] DrMcKay: bnoordhuis: also, work less, for your own good ;) [11:46] kepheus has joined the channel [11:46] kepheus: does anyone know why my program does not end when I use kue? [11:46] kepheus: do it have to close to queue? [11:47] DrMcKay: .. var f = function(a, b, c,); [11:47] catb0t: SyntaxError: Unexpected token ) [11:48] pkbot has joined the channel [11:49] mcluskydodallas has joined the channel [11:49] openpercept has joined the channel [11:50] DrMcKay: .. (/!function\((([a-zA-Z0-9_]+),?)+\)/)('function(a,b,c,)') [11:50] catb0t: null [11:51] luke` has joined the channel [11:53] aklt: bnoordhuis: Congratulations with your new job :-) ...Any plans for node-imap at Joyent? [11:53] bnoordhuis: aklt: heh no, i'm mostly working on windows support right now :) [11:54] langworthy has joined the channel [11:54] DrMcKay: bnoordhuis: and you're smilling? [11:54] butu5: bnoordhuis: must be very interesting :) [11:54] bnoordhuis: well, i mostly watch from the sideline while others do the actual windows work [11:54] bnoordhuis: so in that respect i'm smiling yes :) [11:54] DrMcKay: bnoordhuis: that's better :D [11:55] DrMcKay: ACTION goes to laugh at Windows async networking API [11:56] bnoordhuis: well... the windows api looks hideous but it does some things right [11:56] langworthy has joined the channel [11:56] bnoordhuis: async i/o is one of them [11:56] bnoordhuis: i fear windows performance is going to soundly trounce unix when it comes to async file i/o [11:57] DrMcKay: bnoordhuis: well, to be honest, Windows sometimes does I/O faster than Linux.. [11:57] amigojapan has joined the channel [11:57] okuryu has joined the channel [11:57] fairwinds has joined the channel [11:57] DrMcKay: I mean, my Fedora tends to be slow with massive I/O, like from VM install [11:58] DrMcKay: bnoordhuis: any benchmarks yet? [11:59] bnoordhuis: DrMcKay: clone libuv and run `make bench` [11:59] bnoordhuis: integration in node isn't 100% complete yet so no reliable numbers [11:59] framlin: is there no unix lib, that is competitive with windows' lib? [11:59] bnoordhuis: linux still mostly beats windows though :) [11:59] bosky101 has joined the channel [11:59] bnoordhuis: framlin: ? [12:00] framlin: io-lib [12:00] DrMcKay: bnoordhuis: that's enough for me ;) [12:00] DrMcKay: framlin: it's OS, not lib problem [12:00] framlin: you wrote async io is much faster in windows [12:00] framlin: ahh, I see [12:01] DrMcKay: bnoordhuis: but, it *may* be possible to tweak some networking params in Linux to get much faster async I/O, I think [12:01] DrMcKay: bnoordhuis: and in Windows, you can do pretty much nothing [12:01] bnoordhuis: DrMcKay: i'm not worried about network i/o, windows has a long way to go before it beats linux [12:01] azeroth_ has joined the channel [12:01] bosky101: hi, i have been trying to find out why my aes-256-cbc encryption in nodejs differs from openssl on the terminal [12:02] bosky101: does any one know a combination of client-side & server-side aes encryption that works together [12:02] bnoordhuis: but file i/o is something else, async file i/o is a big POS on the unices [12:02] bnoordhuis: bosky101: can you post a gist of your code? maybe with expected and actual output? [12:03] DrMcKay: bnoordhuis: true [12:04] bzinger has joined the channel [12:08] FireFly|n900 has joined the channel [12:08] deedubs has joined the channel [12:08] cosmincx has joined the channel [12:09] Metal3d has joined the channel [12:10] petrjanda has joined the channel [12:14] xastey has joined the channel [12:14] kepheus: anyone have a hint why a program does not exit? i have no loops [12:15] framlin: commandline? [12:15] framlin: may be there is any event-listner waiting for its event [12:15] aklt: bnoordhuis: Good to hear :-) Are you planning to work on node-iconv within, say the next three months or so? I could really use the streaming part of it :-) [12:16] Sembiance: kepheus: I don't think it's supposed to ever exit, untill you call process.exit() or 'return' from the main call path? [12:16] bosky101: bnoordhuis: DrMcKay have documented the outputs from openssl and client-side js matching, but not ndoejs http://pastebin.com/rGUYrMf3 [12:17] Sembiance: kepheus: pastebin the code somewhere for us to look at :) [12:17] kepheus: Sembiance: I use kue, but when I comment it out the program does never exit. I'm not processing the queue, maybe that's the reason. but that would be horrible [12:17] kepheus: Sembiance: sorry, that was confusing. the program exists. it does not exist, when I create a few jobs with kue [12:17] schwab has joined the channel [12:18] devuo has joined the channel [12:18] kepheus: Sembiance: there's really nothing to show here. this is essentially what I do: http://dpaste.com/600418/ [12:18] Sembiance: kepheus: I don't have any experience with kue, sorry [12:19] Sembiance: kepheus: so far none of my servers/programs written in node.js have needed a queue. [12:19] Carter1 has joined the channel [12:20] emattias has joined the channel [12:20] framlin: Sembiance: if you have a "prog-file" only with var a = 5; console.log(a); its terminating immediately [12:20] balupton has joined the channel [12:21] SoulRaven has joined the channel [12:22] framlin: kepheus: I think your queue is wating, that you drop soumething into it .... [12:22] bnoordhuis: aklt: only if time permits [12:22] owenb has joined the channel [12:22] bnoordhuis: aklt: if you want to pick up the slack, please do so - i decided to implement the streaming part in js land anyway [12:22] fumanchu182 has joined the channel [12:23] aklt: bnoordhuis: Hmm, I just might,... if time permits :-) [12:24] kepheus: framlin: no. i create the queue in one of the first lines. it doesn't matter if I put something in there. it does not exit [12:24] butu5: i have some available time for working any node library... if some have any idea.. but need little mentoring [12:24] bnoordhuis: bosky101: an aes key should be at least 128 bits long (16 chars) [12:24] aklt: bnoordhuis: I do feel somewhat familiar with the code,... I'll let you know. thanks! [12:24] bnoordhuis: aklt: cool :) [12:25] kepheus: framlin: if I add this: var queue = kue.createQueue(); the program never exits :( [12:26] hekkwan has joined the channel [12:27] framlin: kepheus: I think, that they are adding some listeners to an event-queue that are waitign for any kind of emit('job-to-do', ..) [12:27] framlin: so is ther no stopQueue ore sonmething like that? [12:28] meso has joined the channel [12:28] framlin: but I do not know that kue [12:28] kepheus: framlin: I'm currently searching the code for a way to close that queue when I'm done. this are my first steps witih node. I create the queue in the toplevel scope, not in my function that fills it. maybe that's wrong [12:29] meso has joined the channel [12:29] FireFly|n900 has joined the channel [12:30] cccaldas has joined the channel [12:30] kepheus: framlin: it's similar to the examples though [12:31] heythisisdave has joined the channel [12:32] framlin: do you have job.on('complete', function(){ ...} ?? [12:33] rabidmachine9 has joined the channel [12:33] rabidmachine9: hello anybody with some experience on nolife module? [12:33] framlin: at but as I understand this docs, queue.create is just filling the queue, isnt it? [12:35] framlin: and I think it should not make a diffrenc, where you call createQueue, as far as you have the correct reference [12:35] rabidmachine9: whenever I try to run it server starts and stops every 2 seconds [12:38] davidsklar has joined the channel [12:38] ts__ has joined the channel [12:39] cjroebuck has joined the channel [12:40] emattias has joined the channel [12:40] jelveh has joined the channel [12:40] kepheus: framlin: this is how i understand it [12:40] kepheus: framlin: but, (for me) there is no reason for the producer to never stop [12:40] kepheus: framlin: I have no job.on('complete')... because I have no consumers yet [12:41] Juan77 has joined the channel [12:41] framlin: nodejs (commandline) is running as long as there is something in the event-loop and as long as some listener is waiting [12:42] framlin: kepheus: but it seems to make less sense, if you have no consumers for your job-events [12:42] asabil has joined the channel [12:43] kepheus: framlin: i write them, but the consumer should not wait for the consumers. this makes no sense [12:43] kulor-uk has joined the channel [12:43] kepheus: framlin: if that's the default behaviour, I don't have to split up producer and consumer [12:44] bosky101: bnoordhuis: ok , the key needs to be bigger. any idea what the openssl terminal takes by default ? [12:45] garrensmith has joined the channel [12:45] kepheus: framlin: also, there shouldn't really be anything left. I just put a few objects in redis :) [12:46] framlin: kepheus: it may make sense, becaus you enable "multitasking" with that [12:46] Yoric has joined the channel [12:46] kepheus: framlin: isn't the concept of a queue that there is a decoupling between producer and consumer? [12:46] framlin: if you emit something and listen to it, you get the event-loop working [12:46] bosky101: bnoordhuis: also, if the string is hex, can it be shorter [12:47] bzinger has joined the channel [12:47] JoshC1 has joined the channel [12:47] framlin: kepheus: yes, its the concept. But would it makes sense, if your programm is closing at once, because there currently is no job within your queue? [12:48] megalomix has joined the channel [12:48] megalomix: hello [12:48] bosky101: bnoordhuis: wow, this command helped me generate keys for 256 bit aes. openssl enc -aes-256-cbc -k secret -P -md sha1 [12:48] bosky101: bnoordhuis: thanks [12:48] kepheus: framlin: if that's the producer, yes [12:49] kepheus: framlin: that is what I intended :) [12:49] megalomix: do you know a good module that works with express.js to admin a simple blog?...like wordpress but also much less [12:49] netantho has joined the channel [12:49] kepheus: framlin: but I understand what you mean. the producer must be somehow linked to the jobs it's putting in the queue because of the on/fail-events [12:49] framlin: the producer is that piece that is calling queue.create in your terminologie? [12:50] kepheus: framlin: yes, sorry. I used that word mainly because I watched a nodetuts video about kue and he used it (and it makes sense I guess) [12:51] jetienne_ has joined the channel [12:51] blup: curious, how many of you use vim for day to day js coding? [12:52] sounko has joined the channel [12:52] bnoordhuis: bosky101: glad you got it solved :) [12:52] Margle has joined the channel [12:52] kepheus: framlin: I'm going to write a consumer. then, when every job is completed, the producer should end. I don't really care too much if the procuder exits. but it could take a (very) long time for the consumers to process the jobs. in the meantime I wanted to add more jobs, even if the first ones aren't processed yet [12:53] Deebster has joined the channel [12:53] vikstrous has joined the channel [12:53] vns has joined the channel [12:53] framlin: are the queue the producer and the consumer within the same programm/process? [12:53] kmiyashiro has joined the channel [12:54] megalomix: no? [12:54] kepheus: framlin: no, I wanted to make separate programs [12:54] framlin: ah, I see [12:54] FND has joined the channel [12:55] dsirijus has joined the channel [12:55] kepheus: framlin: but the producer is blocked so I cannot add new jobs unless they're processed which is kinda not what I wanted [12:55] FND: has util.print been deprecated? I can't find it in the changelog, yet it doesn't appear in 0.4+ docs anymore [12:55] kepheus: framlin: there is another problem with kue that I got. I cannot search. maybe I just use something else :) [12:55] megalomix: iuu uu [12:55] megalomix: :) [12:55] bosky101: bnoordhuis: one more question, openssl gives out salt while encoding and decoding. is there a way to incorporate that within crypto/createcipher ? [12:55] rmcastil has joined the channel [12:57] framlin: kepheus: maybe ;) But I have seen they have a JSON-API with search [12:57] pandeiro has joined the channel [12:57] Nss has joined the channel [12:57] rmcastil has joined the channel [12:57] kepheus: framlin: right, but there have no programmatic way to use that search. reds is builtin for the search in the ui... it's nice but that doesn't help me :) [12:57] kepheus: they [12:58] kepheus: blup: i do [12:58] framlin: kepheus: you could create an http-client, that talks to that api [12:58] bnoordhuis: bosky101: no, you'll have to add the salt yourself [12:58] markwubben has joined the channel [12:59] bnoordhuis: bosky101: btw, there's a new pbkdf2() method if you're looking for key stretching [12:59] kmiyashiro has joined the channel [12:59] dob_ has joined the channel [12:59] kepheus: framlin: yeah, that would be possible. but that producer behaviour is really weird to me. you haven't used a queue, but do you know another lib that would do what I want? :) [12:59] kepheus: framlin: that is, put that job in the queue and exit [12:59] bosky101: bnoordhuis: will search for that. at what stage in that pastebin would you usually add salt ? [13:00] sounko: hey stupid question [13:00] sounko: if i sell a product that runs windoes node.exe [13:00] sounko: haha [13:00] sounko: windows* [13:00] sounko: are there licensing issues [13:01] framlin: kepheus: no, sorry, I think I would write a small server, that implements the queue ... ;) [13:02] bnoordhuis: bosky101: before you encode the input [13:02] piscisaureus has joined the channel [13:02] bnoordhuis: sounko: node is mit licensed so probably not [13:02] H4ns: sounko: https://github.com/joyent/node/blob/master/LICENSE [13:02] kepheus: framlin: yeah, I rather write things (that aren't too complex) myself. just wanted to give node.js a go [13:02] sounko: thanks [13:02] ph^ has joined the channel [13:02] kepheus: framlin: but I still understand too few to do it [13:02] framlin: I have found, that very often it takes more time to play araound with ready-made modules to understand how they work, that to implement just exact that, what I need ... [13:03] framlin: node is very very cool! You should give it a go! ;) [13:03] temp02 has joined the channel [13:03] kepheus: framlin: I tested it now. the producer still does not exit, even when all jobs are processed by a consumer. ok, don't understand that [13:04] ceej has joined the channel [13:04] Carter1 has joined the channel [13:04] kepheus: framlin: it doesn't make sense for a producer to never exit. this should be a bug [13:04] DrMcKay has joined the channel [13:05] dob__ has joined the channel [13:06] framlin: kepheus: how do you 'communicate' with the queue? how do you get this queue-refference? [13:06] hellp has joined the channel [13:06] kepheus: framlin: in the first line in both the producer and the consumer I do: kue.createQueue(): [13:06] hekkwan_ has joined the channel [13:08] framlin: are you sure that this are the *same* queues? [13:08] mcluskydodallas has joined the channel [13:09] kepheus: framlin: there is only one for the jobs. the seperation is done via named-jobs [13:09] depywork has joined the channel [13:09] ph^ has joined the channel [13:09] megalomix: is there not a module for blog? [13:09] megalomix: to run a blog under express.js [13:09] megalomix: ? [13:09] kepheus: framlin: you can pass in a string when inserting and you have to use that same name when processing [13:09] framlin: ah, ok [13:10] mike5w3c has joined the channel [13:10] kepheus: framlin: I try to think of a use case where that behaviour is useful [13:11] framlin: I cannot imagine any ;) [13:11] framlin: I am with you to say, the producer should never be forced to wait for anything .... [13:12] framlin: so now I close my work going to swim ;) [13:13] kepheus: hehe, ok [13:13] owenb: hi all. i appreciate this is not the place, but I have a tricky question about npm. no one is in the #npm channel at the mo - just wondering if there's another place to discuss npm issues [13:17] bergie has joined the channel [13:17] jtsnow has joined the channel [13:18] garrensmith has joined the channel [13:19] galaxywatcher has joined the channel [13:21] mcluskyd_ has joined the channel [13:21] pixel13 has joined the channel [13:21] k1ttty has joined the channel [13:22] pixel13 has left the channel [13:23] Margle has joined the channel [13:26] petrjanda has joined the channel [13:30] netantho has left the channel [13:31] febits has joined the channel [13:32] thomblake has joined the channel [13:32] thomblake has left the channel [13:34] kepheus: how can I call a callback function only if everything in my current function is done? [13:34] arthurdebert has joined the channel [13:36] fwg: put the callback call at the end [13:36] kepheus: yeah, I tried that. but it is called right away [13:37] fwg: oh you mean when all the async stuff is done too [13:37] kepheus: yeah, I'm new to node.js. how do I know when every async call is returned? [13:38] H4ns: kepheus: you don't. you need to call your function in the callback. [13:38] fwg: you can write a guard for that, var i = 0; and then for each callback you pass to an async function, you do i++; and in the callback i--; and call your "end" callback [13:38] fwg: in the end callback test for i==0 and if is not so, return [13:38] fwg: else do your thing [13:38] ldblackfox has joined the channel [13:39] kepheus: ok thanks [13:40] Glenjamin has joined the channel [13:41] ph^ has joined the channel [13:42] jbrokc has joined the channel [13:43] davidwalsh has joined the channel [13:46] FND has left the channel [13:47] smtlaissezfaire has joined the channel [13:47] depywork: fwg: Isn't that against async style ? [13:48] voodootikigod has joined the channel [13:48] jakehow_ has joined the channel [13:48] jakehow has joined the channel [13:48] tnlogy has joined the channel [13:48] fwg: what is against async there? [13:48] depywork: If you're doing this it's the same as if you were not using async programming [13:48] fwg: no [13:48] depywork: O_� ? [13:49] depywork: explain [13:49] kepheus: depywork: the thing I'm trying to do here maybe isn't the best use case for async [13:49] fwg: it's just a more direct way of setting up an event listener that listens for a "callback finished" event [13:49] fwg: which is emitted at the end of each callback that you passed on to some async code [13:50] depywork: Not sure if I understand... :) [13:50] markdaws has joined the channel [13:50] fwg: well you need to be notified when the callback you passed has finished [13:51] kepheus: depywork: the time used here would be the time of the longest function call. in sync style it would be the sum of all function calls [13:51] fwg: either the system provides that or you have a userland abstraction for it OR you do it by just calling another callback at the end of said callback [13:52] jetienne_: node.js rocks [13:52] tnlogy has joined the channel [13:53] malkomalko has joined the channel [13:53] depywork: fwg: would that be solvable by providind another callbackfunction for when the first callback is finished? [13:53] micheil has joined the channel [13:53] fwg: providing it to what. [13:54] geetarista has joined the channel [13:54] ph^ has joined the channel [13:54] depywork: point taken [13:54] mikekunze has joined the channel [13:55] depywork: I don't have my head wrapped around all the async stuff yet.. :) [13:55] squeese has joined the channel [13:55] eresair has joined the channel [13:58] kepheus: me too [14:00] Yuffster has joined the channel [14:03] temp01 has joined the channel [14:03] sivy has joined the channel [14:04] ph^ has joined the channel [14:05] CrisO has joined the channel [14:07] hybsch has joined the channel [14:07] irahgel has joined the channel [14:09] CrisO has joined the channel [14:11] aelien27 has joined the channel [14:12] bosky101: bnoordhuis: i dont know in which way openssl is combining salt & the key. i have variables salt , key , C = createCipher( Algo, key ) C, followed by C.update() + C.final( ) . where exactly must salt and key combine ? [14:12] Carter1 has left the channel [14:12] unlink has joined the channel [14:12] unlink has joined the channel [14:13] bnoordhuis: bosky101: do you perhaps mean iv instead of salt? [14:14] bnoordhuis: bosky101: assuming you do, check the docs for crypto.createCipheriv() [14:14] bosky101: through openssl i have salt, key and iv [14:15] bnoordhuis: bosky101: not sure what you mean [14:15] bnoordhuis: usually, the salt is something you append or prepend to the input [14:15] brianc has joined the channel [14:16] amscotti has joined the channel [14:16] amscotti has joined the channel [14:16] copongcopong has joined the channel [14:17] bosky101: through an openssl command, it has generated for me a key, a salt , and an iv. decode via openssl is working when i supply key and salt. so im wondering how to do the same via that pastebin [14:17] navaru has joined the channel [14:18] bosky101: although it is generating using a 256 bit key ( that openssl gave ), since nodejs is not using salt - i'm wondering how to [14:20] emattias_ has joined the channel [14:21] Cristi has joined the channel [14:21] Juan77 has joined the channel [14:21] shanebo has joined the channel [14:21] markwubben has joined the channel [14:21] Cristi: hi [14:23] ryanfitz has joined the channel [14:23] bnoordhuis: bosky101: openssl applies salt when it generates the key [14:23] heythisisdave has joined the channel [14:24] Guest70870 has joined the channel [14:26] hydrozen has joined the channel [14:26] TheJH has joined the channel [14:26] TheJH has joined the channel [14:26] TheJH has joined the channel [14:26] TheJH has joined the channel [14:28] CIA-65: libuv: 03Ben Noordhuis 07master * r6cc241a 10/ include/uv.h : Fix 'incomplete prototype' compiler warnings on SunOS. - http://git.io/47UPUw [14:28] CIA-65: libuv: 03Ben Noordhuis 07master * rd01676f 10/ config-unix.mk : [14:28] CIA-65: libuv: build: define _XOPEN_SOURCE=500 on SunOS [14:28] CIA-65: libuv: Exposes msghdr.msg_flags, required for UDP support. - http://git.io/Hjyt0A [14:29] scottschecter has joined the channel [14:29] pickels has joined the channel [14:30] heavysixer has joined the channel [14:30] eee_c has joined the channel [14:32] ph^ has joined the channel [14:33] dgathright has joined the channel [14:33] Yoric has joined the channel [14:35] CoverSlide has joined the channel [14:37] willwhite has joined the channel [14:37] pjacobs has joined the channel [14:38] fayce has joined the channel [14:38] dob_ has joined the channel [14:39] JumpMast3r has joined the channel [14:40] dguttman has joined the channel [14:43] slifty has joined the channel [14:43] bradleymeck has joined the channel [14:44] boaz has joined the channel [14:45] smtlaissezfaire_ has joined the channel [14:46] adrianmg has joined the channel [14:47] clifton has joined the channel [14:49] Tidwell has joined the channel [14:49] dob__ has joined the channel [14:49] snowinferno has left the channel [14:50] bosky101: does someone know how to use salt with crypto.createCipher ? http://pastebin.com/VtpUQZKr [14:50] kenperkins has joined the channel [14:51] aheckmann has joined the channel [14:51] CoverSlide: just add the salt with cipher.update [14:52] bnoordhuis: bosky101: i explained that to you, didn't i? the salt is only used when deriving the key [14:53] jakehow_ has joined the channel [14:53] jakehow has joined the channel [14:53] hekkwan has joined the channel [14:53] ditesh|cassini has joined the channel [14:53] bosky101: key+salt or salt+key or .. ? [14:55] CoverSlide: however you want it, as long as it's consistent with the rest of your app [14:55] pkbot has joined the channel [14:55] pixel13 has joined the channel [14:56] bosky101: CoverSlide: i'm trying to understand how to get the same encryption as openssl command in that pastie [14:56] bnoordhuis: bosky101: it doesn't matter, it's used for generating the key and nothing more [14:57] bosky101: i want to be able to encode<-> decode from openssl <-> nodejs ( ie node may encrypt , openssl may decrypt or vice-versa ) [15:00] butu5 has joined the channel [15:00] brianc: hello [15:01] CoverSlide: greetings [15:01] brianc: I'm having an issue w/ node binding to an external C library [15:01] jtsnow has joined the channel [15:01] butu5: brianc: hi [15:01] slajax has left the channel [15:01] amasad has joined the channel [15:01] bnoordhuis: bosky101: even then it doesn't matter [15:01] brianc: the C library opens a tcp socket to an external server [15:01] blup: will nodejs knockout entries be open-sourced? [15:01] bnoordhuis: bosky101: but let me try to explain [15:01] CoverSlide: i think that depends on the developers [15:02] brianc: when I write a very simple 4 line c program to call the external library & open the socket it works, but the same 4 lines in a node.js bound C++ function the socket connection returns an error [15:02] CoverSlide: i don't think the code is just given to knockout [15:02] bnoordhuis: bosky101: when you derive a key from a password, you add a salt [15:02] brianc: any idea off the top of your head what might be causing this? [15:02] blup: ok, just wondering. might be interesting learning material. [15:02] bnoordhuis: bosky101: you then use that key to encrypt the actual data [15:02] bnoordhuis: bosky101: but you *don't* need the salt for that [15:02] H4ns: brianc: "an error" is not very specific. [15:03] japj: http://nodeknockout.com/rules states "The code you write is yours. If you intend to share it after the competition, you can pick whatever license you love. We encourage contestants to open source their code, but it’s totally up to you. If you want to start a business based on it, awesome." [15:03] bnoordhuis: bosky101: after key derivation, you can throw the salt away - it's only used to strengthen the key [15:03] blup: thanks japj [15:03] brianc: H4ns: I know. the error logged by the library is "MsSInit returned a null pointer" that's not very specific either, yeah? [15:03] bosky101: in my case i want to be able to encode/decode between openssl , nodejs or browser-side js . currently that interop is working for openssl <-> client-side browser. but nodejs 's output is different [15:04] brianc: H4ns: I'm just wondering what could cause the socket connection to fail when initialized from node but not when initialized straight from a 4 line C++ application? [15:04] bnoordhuis: brianc: run it through strace [15:04] brianc: okay [15:04] davidwalsh has joined the channel [15:04] brianc: bnoordhuis: thanks. [15:05] fatjonny has joined the channel [15:05] zivester_ has joined the channel [15:05] bnoordhuis: japj: have you been able to try that patch? [15:05] amasad has joined the channel [15:05] hij1nx has joined the channel [15:06] sub_pop has joined the channel [15:06] neilk_ has joined the channel [15:06] bosky101: bnoordhuis: i get your point. if i was encoding , decoding in nodejs it will work as long as i am consistent in building strings. is it theoritically possible for two different environments to take the same input and generate the same keys/salts/encrypted message ? [15:06] japj: bnoordhuis: not yet, I was reviewing it.. but I was wondering about something [15:06] dshaw_ has joined the channel [15:07] bnoordhuis: bosky101: yes [15:07] kaueraal has joined the channel [15:07] bnoordhuis: japj: tell me [15:07] sonnym has joined the channel [15:07] nevir has joined the channel [15:08] bnoordhuis: bosky101: actually, if you derive a key from a string (password say) without salt, you'll always end up with the same key [15:08] bnoordhuis: bosky101: try creating a key with -nosalt [15:08] japj: bnoordhuis: features.h contains #define __GLIBC__ 2 and #define __GLIBC_MINOR__ 5, and the kernel is 2.6.32.12 so if I read your patch correctly doesn't it mean it will wrongly conclude to #define HAVE_EPOLL_CTL 1 due to +#if LINUX_VERSION_CODE >= 0x020609 && __GLIBC_PREREQ(2, 4) [15:08] pifantastic has joined the channel [15:08] robertfw has joined the channel [15:09] japj: wait, confused here\ [15:09] japj: might have the symbols that I need wrong [15:09] bosky101: bnoordhuis: yes, it's always the same [15:09] heavysixer_ has joined the channel [15:09] japj: bnoordhuis: it would have help to have an actual patch instead of text inside a comment though ;) [15:10] kaueraal has joined the channel [15:10] bosky101: which is why if i figure out on nodejs how to string build salt,key - that 'll solve it [15:10] japj: bnoordhuis: I'm gonna try it now [15:10] bnoordhuis: bosky101: yes, that's correct [15:10] bnoordhuis: japj: i can gist or push the patch if you want [15:10] kaueraal has joined the channel [15:10] bnoordhuis: japj: but you can copy/paste it with `git apply` [15:10] bosky101: bnoordhuis: any suggestions on which channel i can ask this openssl question [15:11] bnoordhuis: bosky101: maybe #openssl if people still lurk there? [15:11] bnoordhuis: bosky101: or the openssl mailing list [15:11] jbrokc has joined the channel [15:13] markdaws has joined the channel [15:14] zivester_ has joined the channel [15:14] emattias has joined the channel [15:15] xtianw has joined the channel [15:15] bosky101 has joined the channel [15:17] achiu has joined the channel [15:17] heythisisdave has joined the channel [15:18] tshpaper has joined the channel [15:18] mpavel has left the channel [15:19] binaryjohn has joined the channel [15:19] softdrink has joined the channel [15:19] japj: bnoordhuis: unfortunately for some reason the patch didnt apply correctly so I did the changes by hand. anyway it links & runs ok so it's good as far as I can tell [15:20] postwait has joined the channel [15:20] tbassetto has joined the channel [15:20] bnoordhuis: japj: okay, thanks - i think i'll merge it [15:23] bshumate has joined the channel [15:23] bshumate has joined the channel [15:23] eventualbuddha has joined the channel [15:23] ryanfitz has joined the channel [15:23] bosky101 has joined the channel [15:24] brianc: bnoordhuis: when I run an strace the one difference I see is in the node.js process there is this call: "open("/proc/sys/crypto/fips_enabled", O_RDONLY) =8" [15:24] mpavel has joined the channel [15:24] tmpvar has joined the channel [15:25] bnoordhuis: brianc: no bind or listen calls failing? [15:25] mcluskydodallas has joined the channel [15:25] julienXX has left the channel [15:26] halfhalo-work has joined the channel [15:26] brianc: bnoordhuis: sorry not the only difference. the first difference in strace calls (besides different socket fd). I'll keep reading [15:27] andrewvos has joined the channel [15:28] torsd has joined the channel [15:28] emattias has joined the channel [15:29] prettyrobots has joined the channel [15:30] RORgasm has joined the channel [15:30] RORgasm has joined the channel [15:30] replore has joined the channel [15:30] replore_ has joined the channel [15:31] amasad_ has joined the channel [15:32] Deebster has joined the channel [15:34] amasad_ has joined the channel [15:35] PENGUINS has joined the channel [15:36] PENGUINS: Hey, I'm about to get fired because we have no way to parse XML in node.js [15:36] PENGUINS: I need something DOM-like [15:36] amasad_ has joined the channel [15:36] industrial: PENGUINS: whoa now, there must be 1 HUNDRED libs to parse XML in Javascript [15:36] PENGUINS: industrial: Not without DOM [15:36] amasad has joined the channel [15:37] PENGUINS: industrial: Normally I just set the content-type header to text/xml and XmlHttpRequest() gives me back XML DOM [15:37] industrial: https://github.com/joyent/node/wiki/modules#wiki-parsers-xml ? [15:37] prettyrobots has joined the channel [15:38] PENGUINS: Checking it out. Btw, industrial is a great nickname. [15:38] PENGUINS: Detroit industrial revolution FTW [15:38] alvaro_o has joined the channel [15:38] CoverSlide: more like NIN and Ministry : Industrial Rock / Metal [15:38] industrial: ^ [15:39] industrial: well, more like Combichrist and Suicide Commando [15:39] PENGUINS: node-xml looks good. Anyone used it? [15:39] CoverSlide: well im not into industrial, just a few friends i know who are ministry fans, and NIN is like a household name [15:40] sfoster: PENGUINS: aren't there libxml2 bindings for node? [15:40] sfoster: https://github.com/polotek/libxmljs/wiki [15:41] Renegade001 has joined the channel [15:42] some1else has joined the channel [15:43] jetienne_ has joined the channel [15:43] tjholowaychuk has joined the channel [15:43] achiu has joined the channel [15:43] ohtogo has joined the channel [15:43] navaru has joined the channel [15:44] wookiehangover has joined the channel [15:44] fmeyer has joined the channel [15:45] desaiu has joined the channel [15:45] Destos has joined the channel [15:46] neilk_ has joined the channel [15:46] fmeyer has joined the channel [15:48] emattias has joined the channel [15:49] stephank has joined the channel [15:50] chrislorenz has joined the channel [15:50] bosky101 has joined the channel [15:50] Spion_ has joined the channel [15:50] mcluskydodallas has joined the channel [15:53] caolanm has joined the channel [15:53] kevwil has joined the channel [15:53] CrisO has joined the channel [15:53] zanes has joined the channel [15:56] zomgbie has joined the channel [15:58] ph^ has joined the channel [15:58] gazumps has joined the channel [15:58] alex____ has joined the channel [15:59] jj0hns0n has joined the channel [16:03] edude03 has joined the channel [16:04] tylerstalder has joined the channel [16:04] dshaw_ has joined the channel [16:04] unmanbearpig has joined the channel [16:04] zomgbie has joined the channel [16:04] zemanel has joined the channel [16:05] jerrysv has joined the channel [16:05] nphase has joined the channel [16:07] snibble has joined the channel [16:08] TooTallNate has joined the channel [16:09] kenperkins has joined the channel [16:09] irahgel has left the channel [16:12] mundanity has joined the channel [16:13] chrislorenz has joined the channel [16:13] mundanity has joined the channel [16:13] rmcastil has joined the channel [16:14] Metal3d has joined the channel [16:14] guillermo has joined the channel [16:16] CoinOpeBoy has joined the channel [16:16] CIA-65: node: 03koichik 07master * r1adfd48 10/ doc/api/stdio.markdown : Doc improvements - http://git.io/R6uCWA [16:17] CIA-65: node: 03koichik 07v0.4 * r509a676 10/ doc/api/stdio.markdown : Doc improvements - http://git.io/nmGjWg [16:18] norviller has joined the channel [16:18] pjacobs has joined the channel [16:19] zeade has joined the channel [16:21] mike5w3c has joined the channel [16:21] unlink has joined the channel [16:23] jbrokc has joined the channel [16:24] felixhummel has joined the channel [16:25] dgathright has joined the channel [16:25] Glenjamin: why would you use a DOM for parsing? [16:25] Glenjamin: the DOM is for manipulation in-place [16:25] mrtrosen has joined the channel [16:26] progme has joined the channel [16:27] mbthomas has joined the channel [16:28] Knifed has joined the channel [16:29] mcluskydodallas has joined the channel [16:29] eazyigz has joined the channel [16:30] couchquid_ has joined the channel [16:30] amerine has joined the channel [16:33] rfay has joined the channel [16:35] zanes has joined the channel [16:37] shajith has joined the channel [16:38] sourcode has joined the channel [16:39] shajith has left the channel [16:39] zackattack has joined the channel [16:39] Nss has joined the channel [16:40] Renegade001 has joined the channel [16:41] jetienne has joined the channel [16:41] DigitalIceBreake has joined the channel [16:42] DigitalIceBreake: Why does node.js have no built-in facility for parsing XML? [16:42] TheJH: what static file servers can you suggest if I need security and crazy fast speed? [16:42] DigitalIceBreake: How can it be used to build SOAP services without? [16:42] tjholowaychuk: TheJH nginx? [16:42] TheJH: DigitalIceBreake, because you can put it in a library [16:42] CoverSlide: G-WAN !!!! [16:42] DigitalIceBreake: TheJH: The same can be said for http. [16:42] Glenjamin: Eugh, soap [16:43] TheJH: tjholowaychuk, hmm, true, a non-node solution could be faster [16:43] TheJH: DigitalIceBreake, http is something nearly everyone needs :D [16:43] tjholowaychuk: TheJH definitely [16:43] CoverSlide: TheJH: http://www.gwan.com/ [16:43] Glenjamin: node-xml leaks memory pretty badly IME [16:43] Glenjamin: node-expat works pretty well, but needs native compilation [16:44] TheJH: CoverSlide, I'd like to see a comparison with gatling :D [16:44] CoverSlide: any regex-based solution for parsing XML is a fail IMO [16:44] DigitalIceBreake: TheJH: So is XML [16:44] Glenjamin: event-based parsing is the way to go with XML, DOM is rubbish and Regexps are only for quick and dirty things [16:44] tbranyen: yeah event based xml pwns [16:44] TheJH: DigitalIceBreake, not really, I think [16:45] DrPizza: DOM is useful and all but essential for XSLT [16:45] CoverSlide: Noone needs XML unless you're stuck in the enterprise world of >10 years ago [16:45] TheJH: tbranyen, and the best lib for that is mine :D [16:45] DrMcKay: anyway, why use XML? [16:45] DrPizza: event-based (SAX) XML parsing is much, much harder to use [16:45] CoverSlide: which unfortunately a lot of people are [16:45] DrPizza: even if it is more efficient [16:45] TheJH: !@tbranyen npm search halfstreamxml [16:45] jhbot: tbranyen, package halfstreamxml: converts a stream of XML to a stream of objects [16:45] tbranyen: oh nice [16:45] DigitalIceBreake: CoverSlide: We are a new company building SOAP services [16:45] Glenjamin: its really not much harder at all [16:45] TheJH: tbranyen, it runs on top of isaacs SAX thing [16:45] tbranyen: ah nice [16:45] Glenjamin: you just build a little state machine [16:45] DrMcKay: DigitalIceBreake: new and SOAP in one sentence? [16:46] Glenjamin: who wants to consume SOAP? [16:46] DrPizza: Glenjamin: yeah great, now make your little state machine support xpath, then get back to [16:46] DrPizza: me [16:46] Glenjamin: xpath is incompatible with event based parsing afaik [16:46] DrPizza: ding ding [16:47] Glenjamin: but you'd generally want to turn the XML into a simple object representation [16:47] Glenjamin: which is not where i'd use xpath anyway [16:47] topaxi has joined the channel [16:47] BillyBreen has joined the channel [16:47] vidi has joined the channel [16:48] akshatj has joined the channel [16:48] brianc: bnoordhuis: I've pulled out a small chunk of the strace between the plain C++ and the node process. Both of these strace sections are generated within a shared library I do not have source access to. Immediately after this section of strace the non-node version calls to the library connects and the node version causes the library to abort connection...I can't make heads or tails of this. Do you see anything fishy here? : https://gist [16:49] meandi2 has joined the channel [16:49] mbthomas_ has joined the channel [16:49] brianc: notice when node calls the library it reads /proc/sys/crypto/fips_enabled and does _not_ read this file when I directly call the library outside of node [16:50] vidi has joined the channel [16:50] brianc: also /dev/urandom is open/fstat64/poll/read instead of open/select/read [16:51] blup has joined the channel [16:52] DrMcKay: TheJH: yes [16:53] jbrokc has joined the channel [16:53] Beldur has joined the channel [16:54] chrisdickinson: brianc: i think part of your gist didn't get sent [16:54] chrisdickinson: (all i saw was "https://gist") [16:54] brianc: https://gist.github.com/1162869 [16:56] robinduckett has joined the channel [16:58] sonnym has joined the channel [16:58] wasabista has joined the channel [16:59] qbert has joined the channel [16:59] zivester_ has joined the channel [16:59] Ned_ has joined the channel [17:01] robi42 has joined the channel [17:02] hij1nx has joined the channel [17:03] robertfw has joined the channel [17:03] tylerstalder has joined the channel [17:03] jbrokc has joined the channel [17:04] gnrfan has joined the channel [17:04] fg3 has joined the channel [17:05] ninj4coder has joined the channel [17:05] rpbertp13 has joined the channel [17:05] rpbertp13 has joined the channel [17:06] mjr_ has joined the channel [17:06] ninj4coder has left the channel [17:07] amerine has joined the channel [17:08] navaru has left the channel [17:08] slifty has joined the channel [17:10] dshaw_ has joined the channel [17:11] zomgbie has joined the channel [17:12] Renegade001 has joined the channel [17:12] trotter has joined the channel [17:12] mikeal has joined the channel [17:13] Swizec has joined the channel [17:14] heavysixer has joined the channel [17:14] mikeal has joined the channel [17:15] amigojapan has joined the channel [17:15] luke` has joined the channel [17:16] butu5 has joined the channel [17:17] perezd has joined the channel [17:18] dgathright has joined the channel [17:20] bronson has joined the channel [17:20] zenethian has joined the channel [17:21] zenethian: Whoa there's a lot of people here. [17:21] N0va has joined the channel [17:21] CoverSlide: all bots [17:21] zenethian: haha [17:21] CoverSlide: including me [17:21] CoverSlide: the `all bots` replying bot [17:21] zenethian: me too. I'm glad I'm not the only one. [17:21] sh1mmer has joined the channel [17:22] harthur has joined the channel [17:23] CoverSlide: It's my last week at this job, with 3 big deadlines already overdue, of course I'm gonna spend all day on IRC [17:23] pizthewiz has joined the channel [17:24] pietern has joined the channel [17:24] Deebster: ACTION is no bot [17:25] avalanche123 has joined the channel [17:25] robinduckett: hey, it's the no bot, bot [17:25] CoverSlide: `tis a bit dead today [17:25] CoverSlide: OK the joke is RIP now [17:25] Deebster: with random delay for added realism :) [17:25] siimble has joined the channel [17:25] siimble: Hello [17:25] CoverSlide: Hello [17:26] siimble: I have problem about to install graceful fs [17:27] alex____: is there a christened module for building a REST web service? i see a few options in the list of modules... [17:27] siimble: yes [17:27] dannycoates has joined the channel [17:27] brianc: alex____: express [17:27] CoverSlide: alex____: no such thing as christened modules, it's pretty much a big lesbian fuckfest in npm right now [17:28] alex____: lol [17:28] brianc: :/ [17:28] ecin has joined the channel [17:28] robinduckett: haha [17:29] Deebster: but express does seem to be widely used [17:29] CoverSlide: express and restify are two of the most popular. express is mostly for hosting web pages, while restify is directly for rest with a few more rest-like features and less to do with serving html, but express is the most popular by far [17:29] Deebster: so it may be the closest thing :) [17:29] tjholowaychuk: they are nearly identical [17:29] tjholowaychuk: one is modular [17:29] tjholowaychuk: one is not [17:30] robinduckett: also your mom is modular alex____ [17:30] alex____: so for ex there's webservice.js, restmvc.js, and express-... something or other... [17:31] brianc: does node have any code in it to pro-actively interact with SELINUX? [17:31] brianc: alex____: use express [17:31] brianc: alex____: you wont be sorry. largest community, large amount of documentation and examples, and it's own irc room [17:32] CoverSlide: yeah express has much more tutorials, documentation, best to start off with that [17:32] tjholowaychuk: but it only renders html [17:32] goshakkk has joined the channel [17:32] tjholowaychuk: AsdkfasfsdfsaOHNOES [17:32] misterm has joined the channel [17:32] alex____: ok. i'll stick with express. i've done tj's tutorials there. [17:32] murvin has joined the channel [17:33] gzmask has joined the channel [17:33] CrisO has joined the channel [17:33] brianc: tj: going into a ferret frenzy? [17:33] tjholowaychuk: alex____: if you like / want abstractions for the web service stuff, I should note it's insanely trivial to build on express [17:33] tjholowaychuk: if you want rpc, mvc, blah blah [17:33] alex____: ok. i hope it's trivial for the likes of me. :) [17:33] CoverSlide: if you're familiar with sinatra, express is the wtg [17:34] alex____: i have a pretty simple data model, and i just want a fast, simple (not much code) way to make it a web service [17:34] gzmask: Hello, c++ question, what kind of typecast is this? "simple_request *sr = (simple_request *) malloc(sizeof(struct simple_request) + passed_courses.length() + 1);" [17:34] tjholowaychuk: i want to get rid of .format crap in express-resource though [17:34] CoverSlide: ACTION ponders creating competing frameworks named bennett and manilow [17:34] tjholowaychuk: such a lame way to do content-negotiation [17:34] CoverSlide: pointer of type simple_request ?? [17:34] brianc: tjholowaychuk: superagent tests pass on ie8 [17:35] tjholowaychuk: brianc no way! [17:35] tjholowaychuk: haha [17:35] gzmask: CoverSlide: yes [17:35] brianc: not sure if you'd tested it there [17:35] CoverSlide: superagent fails on lynx though :( [17:35] gzmask: CoverSlide: dynamically expanding the size of the sr by typecast, never seen this b4 [17:36] CoverSlide: yes `tis odd [17:37] alex____: tjholowaychuk: should i use express-resource for my web service? or do i just need express? [17:37] tjholowaychuk: alex____ either, whatever you like the looks of, express-resource is just an example extension [17:37] sh1mmer has joined the channel [17:37] dguttman has joined the channel [17:37] CoverSlide: I don't see why you would need more than sizeof(struct simple_request) [17:37] tjholowaychuk: there are a few more and endless other possibilities [17:38] CoverSlide: but I'm not a c/c++ guy [17:38] tjholowaychuk: when it comes down to it you have a method, and a url [17:38] tjholowaychuk: so anything else you want can be built on that no problem [17:38] prettyrobots has joined the channel [17:38] gzmask: CoverSlide: because in sr a string got expand in size by "String::Utf8Value passed_courses(args[0]);" [17:38] alex____: tjholowaychuk thx [17:39] tjholowaychuk: alex____ jump in #express if you have questions [17:39] CoverSlide: but wouldn't that string be a pointer anyway? [17:39] gzmask: CoverSlide: it's a char array [17:39] thinkt4nk has joined the channel [17:40] CoverSlide: hmm ic ic [17:40] gzmask: CoverSlide: coz we can't pass string pointers from js to c right? [17:40] CoverSlide: not the way i would do it but i guess it saves a second malloc call [17:40] CoverSlide: i'm thinking from a c perspective here i know next to zilch about c++ [17:41] heavysixer has joined the channel [17:41] gzmask: CoverSlide: so what should be a more readable way to do it? I got this from other ppl's example [17:41] brianc: gzmask: I thnk you can. Handle v8String = v8::String::New(char* whatever) [17:41] CoverSlide: honestly I wouldn't be the person to ask [17:42] reid has joined the channel [17:42] brianc: I believe v8 makes a copy of the string [17:42] eazyigz_ has joined the channel [17:42] eazyigz_: What does the following require stmt mean: log = require('./lib/log')(config.logging) [17:42] eazyigz_: does it import 2 modules at once? [17:43] CoverSlide: eazyigz_: nope [17:43] CoverSlide: it requires lib/log in the local path, which returns a function [17:43] brianc: eazyigz_: no. require('./lib/log') returns a fuction. then immediately the returned function is invoked with (config.logging) parameter [17:43] mlb- has joined the channel [17:43] eazyigz_: so the last parameter is like .call or .apply in JS? [17:44] gzmask: brianc: and by that it passes the pointer of the copied string or the original string? [17:44] brianc: eazyigz_: no it's more like this: `var fn = require('./lib/log'); fn(logger.config)` [17:44] eazyigz_: brianc: thanks [17:45] brianc: gzmask: I think I see what you're asking. You can't share a pointer exactly between javascript & c++ v8. v8 maintains it's own pointers internally to javascript strings so they can be garbage collected [17:45] mlb-: I'm having trouble getting assert to work as advertised/documented, I have a paste at http://pastebin.com/Vj6CNWDr [17:45] admc has joined the channel [17:47] smathy has joined the channel [17:47] tylerstalder has joined the channel [17:48] brianc: I just found this and it's great: http://nikhilm.bitbucket.org/articles/c_in_my_javascript/c_in_javascript_part_1.html [17:49] wbw72 has joined the channel [17:49] asabil has joined the channel [17:49] mlb-: Does/has anyone here used assert.throws to work with any success? [17:49] brontosaurusrex has joined the channel [17:49] gzmask: brianc: thanks, I think I should rewrite that malloc part, it really seen odd. [17:50] CoverSlide: you got your big cheese [17:50] CoverSlide: i got my hash pipe [17:50] hekkwan has joined the channel [17:50] Renegade001 has joined the channel [17:50] brontosaurusrex: hello, trying to run this code http://debuggable.com/posts/streaming-file-uploads-with-node-js:4ac094b2-b6c8-4a7f-bd07-28accbdd56cb on ubuntu 11.04 with node v0.4.11, but i get an error telling me that multipart.js was not found, clues? [17:51] PuffTheMagic has joined the channel [17:52] brontosaurusrex: the exact error http://pastebin.com/4f8vSm37 [17:52] robotarmy has joined the channel [17:52] PuffTheMagic has left the channel [17:52] CIA-65: libuv: 03Jeroen Janssen 07master * rce20791 10/ src/uv-unix.c : [17:52] CIA-65: libuv: remove unused variable [17:52] CIA-65: libuv: Fixes #151 - http://git.io/mlQxTA [17:54] jesusabdullah: Anyone else having promblems with npm? I suspect it's just my internets but web sites are loading fine [17:54] butu5 has joined the channel [17:55] CoverSlide: if multipart isn't in npm, i think it's an old module [17:55] DrMcKay: !up? registry.npm.org [17:55] ronnieboy has joined the channel [17:55] CoverSlide: article is from '09 .. i don't even know which version that would be from [17:56] kepheus has joined the channel [17:56] mundanity has joined the channel [17:56] DrMcKay: !ping [17:56] blup: could anyone recommend (preferably nodejs oriented) js blogs, such as dailyjs ? [17:56] DrMcKay: blup: wheat [17:56] murvin has joined the channel [17:56] DrMcKay: blup: https://github.com/creationix/wheat [17:56] CoverSlide: blup: if you haven't already, subscribe to javascript weekly [17:56] chjj: i think he might mean actual blogs, not blog systems [17:56] CoverSlide: it's got a lot of node stuff too [17:57] murvin: is there a way in node.js that can find out the real IP address of the client (browser) even there is a proxy in between client and server? [17:57] DrMcKay: oh, sorry [17:57] brianc: murvin: no [17:57] CoverSlide: howtonode isn't very active :( [17:57] zanes has joined the channel [17:57] blup: hehe, wheat is nice, but yea i meant active blogs [17:57] brianc: murvin: it's not just node.js. it's http in general. [17:57] murvin: brianc: oh.. can't look into the network layer? [17:57] brontosaurusrex: CoverSlide: right, basically i'am looking for a way to: http upload first 100 kb of a file, quit transfer, send those bytes to further processing (can be php, perl, whatever...) ? [17:58] DrMcKay: I'll be starting a blog soon, I guess I'll write about node.js [17:58] jesusabdullah: blup: wtfjs and badassjavascript maybe [17:58] DrMcKay: (as soon as I write the blog itself) [17:58] eazyigz_ has joined the channel [17:58] blup: thanks :) [17:58] chjj: blup: should totally subscribe to my blog: http://dilated.cc/ [17:58] eazyigz_: If I do something like: require(./middleware')(app), does it execute an anomymous function with 'app' as the argument? [17:58] chjj: i dont post as much as i should, but i do [17:58] murvin: yeah.. that's what I guess.. nvm. :) [17:58] CoverSlide: 1 month ago? [17:58] CoverSlide: pfft [17:58] brianc: eazyigz_: yes, if require('./middleware') exports an anon function [17:59] CoverSlide: you need to blog EVERY DAY man [17:59] DrMcKay: chjj: considered using lighter background? [17:59] CoverSlide: otherwise [17:59] CoverSlide: it's GARBAGE [17:59] chjj: DrMcKay: i have [17:59] chjj: DrMcKay: its one thing i wasnt satisfied with, but ive procrastinated [17:59] DrMcKay: chjj: uhm, I can barely see text [17:59] mcluskydodallas has joined the channel [17:59] chjj: yeah it depends on how the linear gradient is rendered [18:00] chjj: depends on os and browser unfortunately [18:00] DrMcKay: chjj: +1 for CSS gradient :) [18:00] CoverSlide: chjj: http://contrastrebellion.com/ [18:00] jesusabdullah: ffffffff---- [18:00] v8bot_: jesusabdullah has taken a beer from ffffffff--. ffffffff-- now has -1 beers. [18:00] CoverSlide: read. be inspired. reduce suckitude [18:00] chjj: ive considered dropping it because its just a pain, and no browser can render it efficiently [18:00] jesusabdullah: Yes I did. [18:00] chjj: and it makes things less readable [18:01] DrMcKay: chjj: maybe just some other color for post background? [18:01] harthur has joined the channel [18:01] chjj: right now on debian/x11 with chrome 14, my text is readable for me [18:01] chjj: well, the color is actually fine, its the gradient that darkens it slightly [18:01] charleyd has joined the channel [18:01] DrMcKay: chjj: Chrome 15, X11, xmonad [18:01] jhurliman has joined the channel [18:02] eazyigz_: brianc: here is what my middleware looks like, it doesn't export an anonymous function: http://pastie.org/2412602 [18:02] DrMcKay: chjj: oh, on other display it looks better [18:02] chjj: ;p [18:02] chjj: yeah i should fix it [18:02] DrMcKay: color profiles ftw -.- [18:02] chjj: ill get around to it eventually, but theres always the atom feed ;) [18:02] havenn has joined the channel [18:02] chjj: btw, that blog is 100% pure unadulterated node [18:02] tjholowaychuk: eazyigz_ you dont want to render something and next() [18:03] tjholowaychuk: you'll respond twice [18:03] DrMcKay: chjj: open-source it :) [18:03] chjj: it is [18:03] DrMcKay: I'll when I eventually get to it [18:03] chjj: https://github.com/chjj/dilated [18:04] DrMcKay: chjj: thanks :) [18:04] eazyigz_: tjholowaychuk: thanks, so its a bug in my code? [18:04] jamonkko has joined the channel [18:04] zastaph has joined the channel [18:04] tjholowaychuk: eazyigz_ well that's a bug but im not sure what else you're doing [18:04] tjholowaychuk: middleware is a function [18:04] DrMcKay: gosh, whoever decided to use Ctrl + W for closing bookmark should be decapitated [18:04] tjholowaychuk: app.use(fn) [18:05] tjholowaychuk: app.all('*', fn) is a route that happens to accept any path or any method [18:05] tjholowaychuk: so they are slightly different [18:05] ryanj has joined the channel [18:05] tjholowaychuk: if you want to apply logic to everything regardless then just do app.use(callback) [18:05] rendar has joined the channel [18:06] bosky101 has joined the channel [18:06] WrErase has joined the channel [18:06] eazyigz_: tjholowaychuk: thanks, I'm inheriting some else's code, so I'm trying to understand it [18:06] tjholowaychuk: ah [18:06] VeXii: but dont app.use get hit by calls to static files aswell? [18:06] tjholowaychuk: if it had that before [18:06] tjholowaychuk: then good luck :p [18:06] tjholowaychuk: VeXii not sure what you mean [18:06] VeXii: (sry didnt wanner highjack the qustion) [18:07] tjholowaychuk: if you do GET /foo.js and your static() middleware is below something else [18:07] tjholowaychuk: the other one is called first yeah [18:07] VeXii: i had some routings that got hit by css and img requests. [18:07] CoverSlide: chjj: it's pure node? like it even uses node-tiny for storage? [18:07] VeXii: ahh okay back to the order stacking :>>> [18:07] bradleymeck has joined the channel [18:08] fg3 has joined the channel [18:08] junkee[] has joined the channel [18:09] chjj: coverslide: it doesnt use node-tiny, it uses something similar that i hand coded specifically for the blog [18:09] guillotine138 has joined the channel [18:09] mlb-: Where do I file a bug for node.js? [18:09] CoverSlide: mlb-: https://github.com/joyent/node/issues [18:09] Sembiance: mlb-: https://github.com/joyent/node [18:09] chjj: CoverSlide: https://github.com/chjj/dilated/blob/master/src/post.js [18:09] Sembiance: :) [18:09] chjj: you can see how all the data management works there [18:09] seebees has left the channel [18:09] mlb-: CoverSlide, Sembiance: thanks [18:09] ossareh has joined the channel [18:10] seebees has joined the channel [18:10] fg3 has joined the channel [18:10] fmeyer has joined the channel [18:10] CoverSlide: oh well. i like node-tiny, haven't had too much time to play with it but I've used it for a bunch of small projects [18:10] dmkbot has joined the channel [18:10] dmkbot: *Parse Error on http.get in 0.4.11* reported by dscape: https://github.com/joyent/node/issues/1569 [18:10] dmkbot: *paths ending in \ on Windows* reported by juandopazo: https://github.com/joyent/node/issues/1565 [18:10] dmkbot: *https requestCert unusable with Firefox and Chrome* reported by plexel: https://github.com/joyent/node/issues/1516 [18:10] dmkbot: *dgram.send() callback can be executed either sync or async* reported by joeshaw: https://github.com/joyent/node/issues/1456 [18:10] rendar: node.js works only in the V8 js engine? [18:10] CoverSlide: rendar: currently ys [18:11] mehlah has joined the channel [18:11] dmkbot has joined the channel [18:11] dmkbot: *Parse Error on http.get in 0.4.11* reported by dscape: https://github.com/joyent/node/issues/1569 [18:11] dmkbot: *paths ending in \ on Windows* reported by juandopazo: https://github.com/joyent/node/issues/1565 [18:11] dmkbot: *https requestCert unusable with Firefox and Chrome* reported by plexel: https://github.com/joyent/node/issues/1516 [18:11] dmkbot: *dgram.send() callback can be executed either sync or async* reported by joeshaw: https://github.com/joyent/node/issues/1456 [18:11] DrMcKay: CoverSlide: would it be even possible to have other backend? [18:11] chjj: coverslide: cool, im glad to hear that [18:11] Sembiance: So I've just been using node.js 0.4.x Just how un-stable/different is the 0.5 version? [18:11] rendar: CoverSlide: i see, so basically i guess the evented i/o code is written in C++, as a "part" or "module" for the v8 engine.. [18:12] CoverSlide: there are attempts to port it to spidermonkey [18:12] DrMcKay: CoverSlide: but that's sloooow [18:12] CoverSlide: basically by a bridge called v8monkey [18:12] CoverSlide: geting faster: http://arewefastyet.com/ [18:13] necrodearia has joined the channel [18:13] CoverSlide: https://github.com/nikhilm/v8monkey [18:13] DrMcKay: CoverSlide: thanks [18:13] skampler has joined the channel [18:13] DrMcKay: oh, it's huge [18:13] dob_ has joined the channel [18:14] stalled has joined the channel [18:15] CoverSlide: there are so many wannabes and contenders for node's throne [18:15] CoverSlide: i dont expect much from the project [18:16] DrMcKay: CoverSlide: of course it's clear that node will dominate the world [18:16] CoverSlide: https://github.com/purplefox/node.x << jvm async node wannabe framewok [18:16] tylerstalder has joined the channel [18:16] CoverSlide: http://manosdemono.org/ << mono / .net node wannabe [18:16] DrMcKay: ACTION spits coffe on his display [18:16] DrMcKay: jvm?! [18:17] CoverSlide: jep [18:17] DrMcKay: people are actually a lot stupid than I thought [18:18] DrMcKay: when I get enough money to buy myself a tank they're all fucked up [18:18] rendar: CoverSlide: i'm watching v8monkey srcs, but there are also stuff for widget, jpeg, ipc, why? shouldn't it be just a js engine? [18:18] nickradford has joined the channel [18:18] CoverSlide: rendar: the part that gives node its power, its async-ness is all mixed up with the v8 engine [18:18] CoverSlide: node is more than just javascript [18:19] CoverSlide: it's the libev / libuv / whatever binding to execute IO asynchronously [18:19] DrMcKay: and V8 does well with this kinds of things [18:19] CoverSlide: that's what separates it from just another js implementation [18:20] rendar: CoverSlide: i see [18:21] DrMcKay: but seriously, Java guys have to rewrite everything?! [18:21] gr-eg has joined the channel [18:21] mraleph has joined the channel [18:21] rendar: CoverSlide: but that part of jpeg, gui, etc, is part of V8 or node.js? the line is still blurred for me.. because everywhere i read, i read about node.js = using epoll on linux, kqueue on bsd, etc, just this.. [18:21] DrMcKay: rendar: no, it isn't in any of them [18:21] mcluskydodallas has joined the channel [18:22] DrMcKay: rendar: but there are modules [18:22] CoverSlide: exactly. that's why all these async frameworks won't get traction, because everything will have to be rewritten to support the new api. noone will take the time to convert every library out there [18:22] rendar: DrMcKay: yes, but modules for node.js, or v8? [18:22] DrMcKay: node is just a tool [18:22] DrMcKay: rendar: modules for node [18:23] vidi has joined the channel [18:23] DrMcKay: but this guys are trying to be one big library [18:23] DrMcKay: for unknown reasons, they think that big bloated library is better than small and fast framework [18:24] EvRide has joined the channel [18:24] rendar: DrMcKay: i see, well, i've still concepts a little bit confused, but i'm making the big picture.. :) but for example, if node.js runs on server, why to have a gui in the server? [18:24] DrMcKay: rendar: exactly :) [18:25] DrMcKay: rendar: it's better to let others do it and focus on speed [18:25] rendar: well, i can understand libjpeg and something useful, (e.g. on-the-fly jpeg coding/decoding in the server) but the gui..?! [18:25] tjholowaychuk: rendar it's just a platform [18:25] tjholowaychuk: you can do whatever the hell you want to with it [18:25] tjholowaychuk: via addons [18:26] rendar: tjholowaychuk: ok [18:26] rendar: someone can give me some link/refernce to node.js and v8 in detail? i'm very interested to understand [18:27] DrMcKay: rendar: that may be hard [18:27] DrMcKay: rendar: I've found a useful link one day, let me google it [18:27] ilker has joined the channel [18:27] CoverSlide: isaacs has some good v8 api refernce on his page, I don't know if that's a mirror of official docs or not though [18:27] Juan77 has joined the channel [18:28] DrMcKay: rendar: http://t.co/xjAUzML [18:28] greg has joined the channel [18:28] DrMcKay: sorry for t.co, Twitter shortens it :< [18:28] DrMcKay: rendar: also, read the source ;) [18:29] CoverSlide: rtfs! [18:29] hij1nx has joined the channel [18:29] DrMcKay: :D [18:29] CoverSlide: the node motto [18:29] DrMcKay: but seriously, I feel it makes me better [18:29] zomgbie has joined the channel [18:30] DrMcKay: (and I can say that I'm not lazy, because, hey, I'm reading the source!) [18:30] rendar: DrMcKay: thanks mate [18:30] DrMcKay: rendar: :). good luck with node :) [18:31] rendar: DrMcKay: thanks :-) [18:32] unlink has joined the channel [18:33] ckknight has joined the channel [18:34] jmar777 has joined the channel [18:34] jmar777: is there a dedicated channel for mongoose, or would this be a god place? [18:34] jeedey has joined the channel [18:35] jmar777: *good [18:35] Drakonite has joined the channel [18:35] blkcat: jmar777: don't ask to ask, just ask ;) [18:35] Raynos has left the channel [18:35] jbrokc has joined the channel [18:36] jmar777: works for me :p I'm trying to create a compound, unique index. [18:36] jmar777: e.g., MySchema.index( { field1: 1, field2: 1 }) // how do I also make this unique? [18:37] jmar777: im a ssilly billy [18:37] jmar777: sorry, coworker jacked my wireless keyboard lol [18:37] enosis has joined the channel [18:38] CIA-65: node: 03Ryan Dahl 07master * re80cac6 10/ (1579 files in 122 dirs): import openssl from chrome - http://git.io/1XKlCQ [18:38] CIA-65: node: 03Peter Bright 07master * r0110c90 10/ (113 files in 40 dirs): [18:38] CIA-65: node: Upgrade to 0.9.8r. [18:38] CIA-65: node: Build in Win32. - http://git.io/VJd4iA [18:38] CIA-65: node: 03Ryan Dahl 07master * r2e5a8e0 10/ LICENSE : Update license info for openssl - http://git.io/Ms9A5g [18:39] DrMcKay: that 1579 files is funny [18:39] mikl has joined the channel [18:39] mikl has joined the channel [18:39] simenbrekken has joined the channel [18:40] Sembiance: DrMcKay: when you said "13:16 < DrMcKay> CoverSlide: of course it's clear that node will dominate the world" were you being serious? [18:41] cconstantine has joined the channel [18:41] DrMcKay: Sembiance: yes. it can take a little longer than I thought, it turnes out that they don't sell tanks to individuals [18:41] cconstantine: I'm trying to get the mongodb module installed with npm with the native bson parser. after doing a `npm install mongodb --mongodb:native` I still get an error that I don't have it. [18:42] cconstantine: don't have the native bson parser that is [18:44] cconstantine: anyone have any ideas? [18:44] Sembiance: cconstantine: I'm curious, why use the native BSON parser? I just started a node.js mongodb project a few weeks ago, and didn't choose to use the 'native' bson parser. [18:44] Sembiance: cconstantine: I think I read it was a bad idea? [18:44] pickels has joined the channel [18:44] DrMcKay: cconstantine: I don't think that mongodb native is even available [18:45] cconstantine: speed, and I want to use mongode which uses the native_parser option (and I can't figure out how to turn it off) [18:45] cconstantine: why would it be a bad idea? [18:45] blueadept2 has joined the channel [18:46] nerdfiles has joined the channel [18:47] garrensmith has joined the channel [18:47] DrMcKay: Sembiance: don't you think that node will gain popularity? [18:47] cconstantine: and it looks like it's compiling c++ code [18:47] Sembiance: cconstantine: http://groups.google.com/group/node-mongodb-native/browse_thread/thread/ab65fa947bbce08e [18:48] cconstantine: interesting [18:48] Sembiance: DrMcKay: I think it will continue to gain popularity, yes, but it has I think two problems holding it back from world domination :) [18:49] DrMcKay: Sembiance: first one are tanks, obviously. second? [18:49] Sembiance: cconstantine: they basically deprecated the native parser, so :) [18:49] cconstantine: bah, and it looks like mongode hard codes the use of the native parser [18:50] cconstantine: we live in a strange world where javascript is faster than c++ [18:50] CoverSlide: yellow-cake uranium? [18:50] tbranyen: cconstantine: no wai [18:50] DrMcKay: also, noticed how meaning of "native" changed? [18:50] Sembiance: DrMcKay: first (and this is not node's responsibility), no 'web framework' module has emerged as being hands down the best yet. expressjs has come the closest. [18:51] CoverSlide: express is kind of the killer app of node [18:51] Sembiance: DrMcKay: but some sort of web framework module would need to emerge that was just totally amazing, awesome that everyone would like start using [18:51] Sembiance: CoverSlide: express comes close, but it has some... rough edges :) [18:51] TooTallNate has joined the channel [18:53] tjholowaychuk: Sembiance let's get rid of the rough edges :p [18:53] DrMcKay: Sembiance: well, problem is, node doesn't really fit into frameworks [18:53] CoverSlide: /express/issues !!! [18:53] DrMcKay: at least in the way we would want it [18:53] euforic has joined the channel [18:54] euforic: Is eventemitter2 going to become part of node.js core ? If yes where on the roadmap is it? [18:54] CoverSlide: !seen h1jinx [18:54] Sembiance: DrMcKay: second problem... tanks [18:54] CoverSlide: :( [18:54] enosis: guys, would you recomment the 'Hands-on Node.js' ebook for a nodejs newbie? [18:54] DrMcKay: Sembiance: it won't be that hard to build our own [18:55] DrMcKay: Sembiance: I do robotics' [18:55] CoverSlide: running on node! [18:55] DrMcKay: CoverSlide: yes! [18:55] Sembiance: enosis: I myself would never try and learn a bleeding edge technology like node.js, from a book. Maybe I'm weird but I haven't seen much value in technical books since like 1994 [18:55] CoverSlide: ACTION hates reading [18:55] CoverSlide: noone reads on the internet [18:56] DrMcKay: Sembiance: true [18:56] CoverSlide: rtfo' [18:56] enosis: where would you point me? [18:56] DrMcKay: best way to learn is to code [18:56] CoverSlide: read the fucking o'rielly book !!! [18:56] Sembiance: enosis: you got http://howtonode.org/ and http://www.nodebeginner.org/ and more importantly: http://stackoverflow.com/questions/2353818/how-do-i-get-started-with-nodejs [18:56] enosis: ty :) [18:56] DrMcKay: I always start new language with a project [18:56] DrMcKay: node.js was kinda different, I've started from patching it [18:56] Sembiance: enosis: i guess you should just go to that last link first, the stackoverflow link ;) [18:57] luffy has joined the channel [18:57] Sembiance: hrm, maybe that stack overflow link should be in the topic of the channel or something heh [18:57] CoverSlide: especially since node isn't 1.0 yet though, many things might get deprecated [18:57] TheJH: Sembiance, ryah is strictly opposed to a useful channel topic :D [18:58] Sembiance: TheJH: hehe [18:58] TheJH: "sj.edon is node.js backwards" is ok [18:58] DrMcKay: TheJH: :D [18:58] TheJH: but not something useful^^ [18:58] stonebranch has joined the channel [18:58] AvianFlu has joined the channel [18:59] kristsk has joined the channel [18:59] ckknight: imo, do something fun like "node.js is like chocolate milk", but provide absolutely no context on how it is like chocolate milk. [19:00] jbrokc has joined the channel [19:00] CoverSlide: or like a chocolate milkshake ... [19:00] rgl has joined the channel [19:00] Tidwell: Anyone know if v7 of socket.io auto-reconnects? I've got some 6.x code I'm porting over that has an on('disconnect') handler to call socket.connect to reconnect - is this just unneeded? [19:00] patcito has joined the channel [19:00] CoverSlide: (urbandictionary) [19:00] Yoric has joined the channel [19:01] Tidwell: (id assume so since .connect doesn't exist anymore...but if not I can't find what to use in its place) [19:01] DevX101 has joined the channel [19:01] CoverSlide: Tidwell: the client should reconnect itself [19:01] CoverSlide: afaik [19:01] CoverSlide: `seen `3rdEden [19:01] ckknight: Tidwell: #socket.io might help out [19:02] CoverSlide: there needs to be a !seen in here [19:02] mc_greeny has joined the channel [19:02] tilgovi has joined the channel [19:02] tilgovi has joined the channel [19:02] chrisdickinson: TheJH: did that JSX compressor stuff work out for you? [19:02] Tidwell: cool thx guys [19:03] TheJH: chrisbuchholz, didn't look at it much because I could only find minified source and because there was that other thing on github [19:03] gazumps856 has joined the channel [19:03] TheJH: chrisdickinson, and because I have another project running :D [19:03] chrisdickinson: haha :) [19:03] TheJH: that's my biggest problem [19:03] TheJH: ten project ideas per half-finished project [19:04] CoverSlide: that's my problem as well :( [19:05] brianc: anyone got a few minutes to spare to look at a low level C++ v8 external library interaction problem I'm having? [19:05] Nexxy has joined the channel [19:05] Nexxy has joined the channel [19:05] chrisdickinson: TheJH: this may help, re uncompressed source: http://jsxgraph.svn.sourceforge.net/viewvc/jsxgraph/trunk/src/Util.js?revision=2311&view=markup [19:06] junkee[]: brianc: i can try [19:06] brianc: junkee[]: k, i'll PM you [19:06] chrisdickinson: ... they certainly make it easy to find the original jsx source :\ [19:06] TheJH: chrisdickinson, ah, ok [19:07] mraleph: brianc: I am interested as well ;-) [19:08] adrianmg has left the channel [19:09] garrensm_ has joined the channel [19:09] Nuck has joined the channel [19:11] brianc: okay I'll just talk about it in here then [19:11] brianc: so this is basically the code that I'm using: [19:11] brianc: https://gist.github.com/1163241 [19:12] tk has joined the channel [19:12] SuMarDi has joined the channel [19:12] brianc: I know it doesn't really show a whole lot...that mtai.h is a closed source vendor library [19:12] brianc: I've got the strace output from both the plain c++ and the node binding [19:13] brianc: they're really similar for the most part (only really fd numbers differ), but I can gist where they start to diverge [19:13] ryanfitz has joined the channel [19:13] junkee[]: the main will never be called [19:14] brianc: the main is called...my example might be slightly off since I didn't copy/paste the code I just retyped it. [19:15] brianc: both the c++ and the node binding are invoked and run to the end. the node binding's second method just doesn't return success. it returns a "could not connect socket" error [19:15] brianc: I'll put together the strace gist [19:15] bnoordhuis: brianc: i'll be here in a couple of minutes [19:15] brianc: the only other thing I noticed way up at the start of the strace was some SELINUX stuff [19:16] mikl has joined the channel [19:16] mikl has joined the channel [19:16] junkee[]: brianc: thats not a node.js addon [19:17] junkee[]: brianc: addons have a extern "C" void init fnction [19:18] hellp has joined the channel [19:18] Qbix1 has joined the channel [19:18] brianc: here's the strace: https://gist.github.com/1163258 [19:19] junkee[]: brianc: better you show your full code [19:19] brianc: junkee[]: I've reduced the example code to only the code in question. The rest of the node.js module (addon) works as expected & all the boilerplate exists in the original source [19:19] spasquali has joined the channel [19:19] spasquali has left the channel [19:20] NetRoY has joined the channel [19:21] brianc: junkee[]: the rest of the module source code is just your standard issue module boilerplate. the "Test" function is attached directly to the module object as a 'static' javascript function (it's not a prototype of anything & takes no state from the outside) [19:21] junkee[]: brianc: when the same code works in plain c++ there is maybe a bug in the rest of the code [19:21] tk has joined the channel [19:22] amiller has joined the channel [19:23] jerrysv_ has joined the channel [19:23] junkee[]: brianc: also, you could try to call each function in a separate function [19:24] seebees has left the channel [19:24] konobi: brianc: ah... looks like you need to look at eio [19:24] brianc: junkee[]: when I call each function in a separate function from javascript the first one (SXInit) works as expected. The second one (SXOpenPBX) produces the same error. [19:24] brianc: konobi: it's a threading issue? [19:25] bnoordhuis: brianc: did you gist the strace log? [19:25] brianc: ya [19:25] dmojoryder has joined the channel [19:25] CoverSlide: old mcdonald had a lib. ei eio [19:25] ttpva has joined the channel [19:26] brianc: bnoordhuis: https://gist.github.com/1163258 [19:26] konobi: brianc: possibly... your C++ function is doing IO against a file, so you probably need to switch that to doing it in a node safe way [19:26] junkee[]: konobi: don't think so. It will just block [19:27] ryanj has joined the channel [19:27] konobi: but block what? [19:27] konobi: the threadpool, the interpreter? [19:27] brianc: I think the C++ is opening the files async, yeah. [19:28] brianc: err, the socket, sorry, not the files [19:28] brianc: but I didn't think doing async io independent of node within the node process would cause problems [19:28] brianc: since that c++ library doesn't expose any access to the socket fd's [19:28] bnoordhuis: the socket is put in non-blocking mode, yes - ioctl(fd, FIONBIO) [19:28] bnoordhuis: and it should Just Work [19:29] brianc: bnoordhuis: that's what I was thinking [19:29] brianc: bnoordhuis: I can open an issue w/ the library vendor. just wanted to make sure it wasn't somehow related to something node was doing [19:29] konobi: https://github.com/orlandov/node-sqlite/blob/master/src/database.cc [19:30] konobi: some eio_custom stuff in there [19:31] astralab has joined the channel [19:31] kuhrt has joined the channel [19:32] bnoordhuis: doing blocking file i/o in the main thread is bad but it shouldn't fail [19:32] brianc: konobi: I'm not exactly sure how using eio would help. Could you explain a bit? I understand accessing files is a blocking operation and in this case I'm okay w/ the external c++ blocking the node event loop momentarily...at least to get the initial proof of concept running [19:32] bnoordhuis: brianc: dunno, hard to say what's going wrong [19:32] CoverSlide: blocking i/o? [19:32] CoverSlide: ACTION gets his guillotine [19:32] Nexxy: ACTION starts the fire [19:33] blup has joined the channel [19:33] context: uhh, node already has sync and async file read functionality [19:33] brianc: bnoordhuis: I very much appreciate both yours and others input. thanks y'all for taking a look [19:34] context: why not use that code instead of rewriting it ? [19:34] konobi: brianc: yeah... not 100% sure... i'm just getting a inkling towards something i've seen before... but i can't put my finger on it [19:34] creationix has joined the channel [19:34] creationix has left the channel [19:35] junkee[]: brianc: just try it with threading when it is still not working I can say I knew it, if it works, we have to find out why... [19:35] brianc: konobi: weird thing in the strace is the node version opens up '/proc/sys/crypto/fips_enabled' while the other version does not [19:36] Qbix1: hey guys [19:36] Qbix1: is this function right [19:36] mikl has joined the channel [19:36] mikl has joined the channel [19:36] CoverSlide: no it's wrong [19:36] tbranyen: incoming paste [19:36] junkee[]: brianc: which version, btw? [19:36] brianc: this opening is going on within the c++ library, but it's strange it would in one case decide to open /proc/sys/crypto_fips_enabled and in another case (same function call, same arguments) do a "brk(1)" call [19:37] brianc: junkee[]: the top set of strace output is from when I invoked the C library from the node->v8 bindings. the bottom set of strace output is when I invoked the C library from my 4 line c++ program. [19:37] Qbix1: http://pastie.org/2413046 [19:37] sonnym has joined the channel [19:37] Qbix1: tbranyen: incoming paste indeed [19:37] mehtryx has left the channel [19:37] tbranyen: :-p [19:37] pjacobs2 has joined the channel [19:37] junkee[]: brianc: sry, i meant with which node version you run the code... [19:37] markwubben has joined the channel [19:38] brianc: junkee[]: oh my bad. v0.4.11 [19:38] CoverSlide: personally wouldn't recommend modifying .__proto__ since it's non-standard, and deprecated in sm, so it may be deprecated in v8 [19:39] junkee[]: brianc: I would try it with the newest version... [19:39] brianc: junkee[]: v0.4.11 is newest stable, isn't it? I will try w/ a couple other versions of node though -- good idea. [19:40] junkee[]: brianc: the newest is on the instable branch 0.5x [19:40] qbert: I keep using the 'i' shortcut for apt-get , npm has spoiled me [19:41] CoverSlide: cpan has spoiled me, i keep trying npm express [19:41] context: 'trying' ? [19:42] perezd: is it a safe assumption that if I am doing a request.write (http request body) that it will be chunked if its too large based on TCP standards? [19:42] brianc: konobi: thanks for the sqlite example. good stuff in here [19:43] jvdev has joined the channel [19:44] gkmngrgn has joined the channel [19:45] hekkwan has joined the channel [19:45] retrofox has joined the channel [19:46] CrisO has joined the channel [19:46] tilgovi_ has joined the channel [19:46] tilgovi_ has joined the channel [19:48] baudehlo: bradleymeck: were you after me the other day? [19:48] bnoordhuis: perezd: chunked as in fragmented? yes. chunked as in chunked encoding? no [19:48] perezd: bnoordhuis: yeah TCP chunked [19:48] perezd: okay cool [19:49] CoverSlide: ACTION blows some tcp chunks [19:49] kriss has joined the channel [19:49] apoc has joined the channel [19:51] jvolkman has joined the channel [19:52] mikeal has joined the channel [19:52] joshthecoder has joined the channel [19:53] astralab has joined the channel [19:53] gazumps856 has joined the channel [19:53] bradleymeck: baudehlo yea, was just wondering your opinion of forking Haraka so that it's directory structure more closely resembles other large node projects (lib folder / devDependencies / etc). I was perusing around thecode and making some perf tweaks and having it all in one folder seemed odd [19:54] chrisumbel has joined the channel [19:54] dgathright has joined the channel [19:54] baudehlo: yeah I'd be happy with that. I'm pretty new to node, so as long as it still works via the npm install I don't care :) [19:54] jvolkman: I'm working on a node.js app intended to be run as a daemon on users' own machines. Are there any projects that work to make packaging and distributing node-based application easier? [19:54] insin has joined the channel [19:54] ryanj has joined the channel [19:55] baudehlo: what kind of perf tweaks? [19:55] bradleymeck: line_socket is doing tons of string copies [19:56] CarterL has joined the channel [19:56] CarterL: anyone interested in working on a disaster relief website? [19:57] baudehlo: bradleymeck: ah, good that someone else is looking into that - I was thinking of looking at that too. [19:57] bradleymeck: that and just fussing around w/ stuff to see what can be done w/o extra allocations, nothing too big beyond the line socket [19:57] meandi has joined the channel [19:57] baudehlo: I figure that's a big perf hit there anyway. [19:57] baudehlo: it always was with Qpsmtpd (my previous SMTP server project) [19:57] aklt has joined the channel [19:57] JumpMast3r has joined the channel [19:57] riven` has joined the channel [19:58] baudehlo: I know someone who'll be very happy about performance gains anyway. [19:58] brolin has joined the channel [19:58] pt_tr has joined the channel [19:58] jacobolus has joined the channel [19:59] bradleymeck: been using https://gist.github.com/1163360, it avoid making strings since they are heavier than numbers, and uses batch buffer concats instead of string concats that are linear [19:59] jaequery has joined the channel [19:59] bradleymeck: no bugs soo far, but i havent been testing with f'ed up stuff [20:00] jaequery: hi guys [20:00] jaequery: whats the top salary ranges for a senior web developer? [20:01] Nexxy: depends on how much you want to pay yourself [20:01] tjholowaychuk: 9 million dollars [20:01] JumpMast3r has joined the channel [20:01] Nexxy: 9m sounds reasonable [20:01] jaequery: is 135k good? [20:01] Nexxy: jaequery, you can't ask generalized questions like that without considering tons of factors like cost of living [20:01] Nexxy: etc etc [20:01] ldblackfox has joined the channel [20:02] jaequery: ok [20:02] jaequery: im asking because i feel like i asked a little too much [20:02] baudehlo: bradleymeck: did you do any benchmarking of it? [20:02] jonaslund: 135k a year ? [20:02] jaequery: ya [20:02] jonaslund: ok [20:03] jonaslund: around here we usually talk about montly salaries [20:03] CoverSlide: all jobs I've asked for have been in yearly sal [20:03] cconstantine: is there an easy way to do performance testing in node.js.. mainly I want to know how long it takes to get from pointA to pointB. [20:04] hide_ has joined the channel [20:04] maushu_ has joined the channel [20:04] CoverSlide: cconstantine: /usr/bin/time [20:04] bengrue has joined the channel [20:04] cconstantine: within the app, it doesn't exit when this portion is finished [20:05] bradleymeck: baudehlo not on the server itself, on the raw parse time i was seeing ~1.5 speed with buffers when just pumping in lines with a for loop [20:05] CoverSlide: Date.now() [20:05] rfay has joined the channel [20:05] baudehlo: bradleymeck: ok cool. [20:05] CoverSlide: i dont know if there are modules that make it any easier [20:05] tjholowaychuk: require( [20:05] tjholowaychuk: 'noop' [20:05] qbert_ has joined the channel [20:06] CoverSlide: and that could do it without taking running the module into account [20:06] chrisbuc1holz has joined the channel [20:06] cconstantine: CoverSlide, ok. I figured I could do Date.now() - start_date, but then I'd have miliseconds and it'd be nice to have that pretty-printed [20:06] bradleymeck: cconstantine console.time, console.timeEnd ? [20:06] baudehlo: bradleymeck: well I'll wait until you submit a pull request, but that's awesome news. [20:06] Marak has joined the channel [20:06] bradleymeck: when i get time /cry [20:07] mikeal has joined the channel [20:07] chrisbuchholz has joined the channel [20:07] chrisbuchholz has joined the channel [20:09] baudehlo: heh. You intending to use it for something, or were you just curious? [20:09] bosky101 has joined the channel [20:10] zivester_ has joined the channel [20:11] tnlogy has joined the channel [20:11] achiu has joined the channel [20:11] Bogh: whichi is the command to reboot the system [20:11] Bogh: in linux [20:11] rmcastil has joined the channel [20:12] chrisdickinson: Bogh: sudo reboot now [20:12] pt_tr has joined the channel [20:12] bnoordhuis: real men type `shutdown -h now`! [20:13] AvianFlu: bnoordhuis++ [20:13] v8bot_: AvianFlu has given a beer to bnoordhuis. bnoordhuis now has 2 beers. [20:13] Renegade001 has joined the channel [20:13] TheJH: bnoordhuis, and lazy men press ALT+F2 and type "halt" (at least on gnome3) [20:13] TheJH: bnoordhuis, plus, this little black box on the greyed-out screen looks cool :D [20:14] Bogh has joined the channel [20:14] chjj: sudo reboot for life [20:15] bnoordhuis: i still remember when linux distros didn't have `halt` :`( [20:15] bnoordhuis: kids these days [20:16] baudehlo: is halt just an alias for "/sbin/shutdown -h now" ? [20:17] maushu_ has joined the channel [20:17] CoverSlide: which came first, the halt or the shutdown ??? [20:17] CoverSlide: ACTION meditates on this [20:17] CoverSlide: fuck [20:17] chjj: the chicken [20:17] CoverSlide: ACTION googles on this [20:17] mcluskydodallas has joined the channel [20:17] tk has joined the channel [20:18] chjj: bah, jquery is always 100 watchers in front of node for some reason [20:18] chjj: nonsense [20:18] CoverSlide: ok seems shutdown came first [20:18] boaz has joined the channel [20:18] kristsk has joined the channel [20:18] CoverSlide: ACTION nicknames his girlfriend shutdown [20:19] chjj: i nicknamed my girlfriend coffeescript, so it was easier to break up with her [20:20] jaequery: pimp [20:20] ArtistConk has joined the channel [20:20] hornairs has joined the channel [20:21] TheJH: chjj, do you prefer macros? `$$mapreduce{{names,, map lowerCase(e),, filter !!e,, each console.log(e)}}` [20:21] chjj: ? [20:22] bradleymeck: baudehlo i intend on doing a lot to haraka in the future, just dont have much time these days [20:22] versicolor has joined the channel [20:24] springmeyer has joined the channel [20:25] TheJH: chjj, https://github.com/thejh/node-cempl8 , look at test.js+, macros and test.js (compiled output) [20:26] CoverSlide: what's a code templeight ?? [20:26] TheJH: CoverSlide, code template == macro [20:30] Renegade001 has joined the channel [20:32] kenperkins: anyone had any problems setting NODE_PATH with export in an upstart script? [20:32] jga023 has joined the channel [20:33] chrisumbel has joined the channel [20:33] CoverSlide: like export NODE_PATH=/usr/local/ ?? [20:34] ArtistConk has joined the channel [20:35] kenperkins: yea [20:35] tilgovi has joined the channel [20:35] tilgovi has joined the channel [20:35] kenperkins: I'm doing exactly that, and it's not working for whatever reason [20:36] blissdev: For anyone using Jade (or similar): How do you do front-end templates when your express/node templates are in Jade, etc? Perhaps there is something obvious that I'm missing. [20:36] kenperkins: https://gist.github.com/1163461 [20:36] riven has joined the channel [20:36] kenperkins: that's not working for me, don't know why [20:36] kenperkins: when I do a console.log(require.paths) at the start of my app, it doesn't work [20:37] kenperkins: (rather, my exported paths are not present) [20:37] CoverSlide: kenperkins: which version? [20:37] CoverSlide: 0.5.x deprecated require.paths [20:37] kenperkins: 0.4.8 I believe (we're going to move to 11 soon) [20:37] kenperkins: let me check [20:37] kenperkins: yep [20:37] kenperkins: 0.4.8 [20:38] kenperkins: I wonder if it's because it's being exec as another user [20:40] asabil has joined the channel [20:40] xtianw: blissdev: jade -w [20:40] kelsin has joined the channel [20:41] CoverSlide: kenperkins: run console.log(process.version) [20:41] CoverSlide: actually [20:41] CoverSlide: ACTION is not familiar with upstart [20:41] blissdev: xtianw: i think i did a poor job of describing my problem, thanks for trying tho [20:41] CoverSlide: but where would stdout go on an upstart script anyway [20:41] kenperkins: yep, 0.4.8 [20:41] kenperkins: I'm plumbing it to my log files [20:41] CoverSlide: odd [20:41] xtianw: blissdev: Oh I misread [20:42] theCole_ has joined the channel [20:42] rgl has joined the channel [20:42] blissdev: i'm just confused with having jade being my backend templating language and my frontend templating language [20:43] blissdev: wondering if i can use the cdata filter so that jade doesn't parse it [20:44] Twelve-60 has joined the channel [20:45] dob_ has joined the channel [20:45] copongcopong has joined the channel [20:46] achiu has joined the channel [20:48] NodeCoder has joined the channel [20:49] NodeCoder: Guys, I'm in troublr [20:49] CoverSlide: how can we helpr? [20:49] NodeCoder: I'm getting this: FATAL ERROR: JS Allocation failed - process out of memory [20:49] NodeCoder: ;( [20:49] louissmit has joined the channel [20:49] NodeCoder: Can I increase node.js's available memory? [20:50] CoverSlide: node --max-stack-size=(bytes) [20:50] wink_: NodeCoder: what are you doing? :p [20:50] wink_: lukegalea: are you sure you need more memory, and you've not just spun something out of control [20:50] CoverSlide: although i think it's already at 1.5G by default [20:51] wink_: er [20:51] wink_: nick completion [20:51] CoverSlide: or 1.0G i cant remember [20:51] wink_: yeah, its pretty high by default [20:51] konobi: yeah... it's different between 32 and 64 bit versions, iirc [20:51] Bonuspunk has joined the channel [20:52] NodeCoder: I was doing new xml2js parser? [20:52] ecin has joined the channel [20:53] NodeCoder: It's hard to really tell with the evals() going on [20:53] CoverSlide: !!! [20:53] context: nodecoder: and how big is this xml you are parsing [20:53] NodeCoder: ACTION hates his coder buddy he has to work with here [20:53] context: haha [20:53] NodeCoder: Not big [20:53] CoverSlide: wow [20:54] jesusabdullah: Why you hatin' dawg [20:54] jesusabdullah: ? [20:55] cccaldas_ has joined the channel [20:56] mraleph: CoverSlide: it's —max-old-space-size=(megabytes) not stack size [20:56] fumanchu182 has joined the channel [20:57] NodeCoder: Fixed it by getting rid of one of the evals() inside the evals() [20:57] context: ew [20:57] NodeCoder: FATAL ERROR: JS Allocation failed - process out of memory is not happening now :) [20:57] VeXii: is it consitted bad pratice having youre server-app obj in the global? [20:57] context: i wouldn't think you'd need eval() to transform xml to js [20:57] CoverSlide: nested evals ... yikes [20:58] NodeCoder: context: My buddy loves eval() [20:58] CoverSlide: you shouldn't [20:58] wink_: not sure if troll [20:58] xtianw: I wouldn't think you'd ever need to put an eval inside of an eval [20:58] context: nodecoder: smack him. [20:58] tbranyen: eval is useful a lot [20:58] tbranyen: wait [20:58] tbranyen: a few ! [20:58] context: haha [20:58] CoverSlide: it's rarely useful. [20:58] NodeCoder: This is how my buddy includes external files because he hates require(): eval(fs.readFileSync("program.js")); [20:58] tbranyen: heh i used to quickly write a nice key: val parser that is similar to YAML [20:58] tbranyen: it* [20:59] CoverSlide: jeez [20:59] konobi: NodeCoder: yay... recipe for memory leaks! [20:59] context: nodecoder: thats retarded. [20:59] incon has joined the channel [21:00] wink_: NodeCoder: it sounds like you probably dont want to work on your buddy's code, you're going to be in for lots of headaches if he'll go that far to subvert a really functional system (require()) [21:00] context: nodecoder: tell him to stop doing shit just cause "he doesn't like it" [21:00] context: is he looking for a new job or attempting to go for job security [21:00] context: nodecoder: if require is that bad, have him explain why before accepting some ugly ass code like that. [21:01] JoshC1 has joined the channel [21:01] NodeCoder: He says he writes ugly code because he hates himself. [21:02] wink_: well do him and yourself a favor, poison him [21:02] wink_: :> [21:02] context: kk now you're trolling [21:02] context: brb. 10.7.1 released [21:02] NodeCoder: He can't a afford a dominatrix to put him in a bridle, ride him, and force him to eat horse food, so he gets his abuse form angry coders instead. [21:02] CoverSlide: already? [21:02] NodeCoder: context: No, _NOW_ I'm trolling. [21:03] NodeCoder: ACTION done :p [21:03] CoverSlide: bugfixes galore [21:03] joshontheweb has joined the channel [21:03] CoverSlide: how long ago was 10.7.0? [21:04] goshakkk has joined the channel [21:05] context: not too long [21:05] context: month? [21:05] ryah: mikeal: yt? [21:05] mikeal: yeah [21:05] CoverSlide: ACTION is not an apple-polisher [21:06] context: July 20th [21:07] CIA-65: node: 03Maciej Małecki 07issue1531 * r57173d7 10/ test/simple/test-https2-compatibility.js : Test for https2 compatibility (issue #1531) - http://git.io/j7aF5A [21:07] CIA-65: node: 03Mikeal Rogers 07issue1531 * r7e32ef5 10/ (lib/http2.js lib/https2.js): Fixes #1531 - http://git.io/iNQz3Q [21:07] ryah: mikeal: issue 1531 is not fixed by your patch --^ [21:07] ryah: did you test against maciej's test? maybe im seeing a platform problem [21:08] mikeal: his test came in after my patch so i probably havent [21:09] ryah: mikeal: k- will take a look [21:09] hij1nx__ has joined the channel [21:09] mikeal: i'll look at it now [21:09] mehtryx has joined the channel [21:10] skmpy has left the channel [21:10] mikl has joined the channel [21:10] mikeal: ryah: my branch works at the moment [21:10] bingomanatee_ has joined the channel [21:11] boogyman has joined the channel [21:11] hij1nx__ has joined the channel [21:11] mikeal: ryah: this is my branch diff [21:12] mikeal: https://gist.github.com/1163593 [21:12] mikeal: the test appears to be passing for me [21:16] qbert_: whats the dnode / browserify channel ? [21:16] qbert_: can we put that in the topic or something [21:16] Marak: mikeal: there is code for all that, its all oss [21:16] Marak: mikeal: and its linked on the site and the blog post [21:16] mikeal: i want you to tell me [21:16] mikeal: cause i'm lazy [21:16] Marak: ok [21:16] Marak: one sec [21:16] mikeal: and you should use twitter to tell me [21:16] mikeal: cause, fuck you buddy :P [21:16] mikeal: hahaha [21:16] mikeal: i'm just messing with you [21:16] context: qbert_: just a guess, but if they even have one its most likely #dnode or #browserify [21:17] context: just a guess. [21:17] Marak: var npm = require('npm'); var Hash = require('hashish'); var sprintf = require('sprintf').sprintf; var argv = require('optimist').argv; var npmjs = require('./npmjs'); // // Main method for crunching npmtop values, will take a long time to run // exports.crunch = function(callback){ npm.load({ outfd : null }, function () { npm.commands.search([], function (err, pkgs) { var authors = {}; var total = [21:17] random123 has joined the channel [21:17] Marak: gs).forEach(function (pkg) { var users = pkg.maintainers .map(function (w) { return w.slice(1) }) ; users.forEach(function (u) { authors[u] = (authors[u] || 0) + (1 / users.length); }); }); callback(render(authors, total)); } else { npmjs.list(function (aut [21:17] Marak: function render (authors, total) { var str = ''; str += ('Generated: ' + new Date() + ' \n\n'); str += ('rank percent packages author \n'); str += ('---- ------- -------- ------ \n'); var sorted = Object.keys(authors) .sort(function (a,b) { return (authors[b] - authors[a]) || (a.toLowerCase() < b.toLowerCase() ? -1 : 1) ; }) ; [21:17] AvianFlu_ has joined the channel [21:17] Yoric has joined the channel [21:17] Marak: just about [21:17] Marak: theres more [21:17] Marak: but my hands hurt from typing that much so fast [21:17] Marak: i need to rest now [21:17] Marak has left the channel [21:18] DrMcKay has joined the channel [21:19] chrisumbel has joined the channel [21:21] qbert_: context, yeah its something weird, there doing some other thing that encapsulates all those :S [21:21] qbert_: in browser testing automation, I forget the name of it [21:22] ryah: mikeal: still broken for me. let me try your patch - but i think it's the same as what i have [21:23] dgathright has joined the channel [21:23] shipit has joined the channel [21:23] mikeal: it looks like it [21:23] DrMcKay: ACTION goes to review log [21:24] DrMcKay: oops, not here, damned irssi :< [21:24] mikeal: ryah: what does the error look like? [21:25] ryah: mikeal: 1sec [21:25] mikeal: and do you compile with any non-default flags, so i can try to reproduce [21:26] pkrumins: is there npm for windows? [21:27] pkrumins: messing with node for windows here [21:27] pkrumins: but what about npm [21:27] pkrumins: currently just pulling packages with git and putting them in node_modules [21:27] ryah: mikeal: nevermind - i think my build was fucked [21:29] Nexxy: omg language [21:29] CoverSlide: lucky build [21:29] Nexxy: $5 words [21:29] jbrokc has joined the channel [21:29] mikl has joined the channel [21:29] mikl has joined the channel [21:30] stride: Nexxy: "windows"? [21:30] tnlogy has joined the channel [21:30] xtianw: pkrumins: I like https://github.com/japj/ryppi [21:30] unlink has joined the channel [21:30] unlink has joined the channel [21:30] Nexxy: stride, single pane? [21:31] nibblebot has joined the channel [21:34] junkee[] has left the channel [21:34] versicolor has joined the channel [21:35] robi42 has joined the channel [21:35] CIA-65: node: 03Maciej Małecki 07master * r94963ab 10/ test/simple/test-regress-GH-1531.js : [21:35] CIA-65: node: Add failing test for https2 compatibility [21:35] CIA-65: node: Issue #1531 - http://git.io/FPaHxA [21:35] CIA-65: node: 03Mikeal Rogers 07master * r103990b 10/ (lib/http2.js lib/https2.js): Fixes #1531 - http://git.io/55ZzlA [21:35] ryah: mikeal: thanks [21:35] ryah: TheJH: thanks [21:35] mikeal: np [21:35] TheFuzzball has joined the channel [21:36] dob_: any idea why i can't use script $(function() { in my jade template? [21:36] TheJH: ryah, huh, for what? [21:36] dob_: i get unexpected token "indent" [21:36] ryah: TheJH: for debugging issue 1531 [21:37] TheJH: ryah, ah, ok [21:37] CoverSlide: dob_: depends on how you're trying on using it [21:38] dob_: CoverSlide: http://pastebin.com/azCrrd6t [21:38] tjholowaychuk: dob_ indent [21:38] tjholowaychuk: dob_ script\n $( [21:39] dob_: lol [21:39] dob_: i think that was the problem. *doooh* [21:39] dob_: thanks a lot! [21:41] wbw72 has joined the channel [21:43] Aphelion has joined the channel [21:44] charleyd has joined the channel [21:45] nibblebot: any1 else have an issue with cluster reload restarting the master but not spawning new workers? [21:45] jzacsh has joined the channel [21:45] chrisumbel_ has joined the channel [21:45] tjholowaychuk: nibblebot: the older workers may sit around for a minute or two to finish up connections [21:46] admc1 has joined the channel [21:46] jesusabdullah: Anybody here good with the DOM? [21:46] CrabDude has joined the channel [21:46] CoverSlide: eww client-side questions? [21:46] SubStack: I used the dom once [21:46] SubStack: never again [21:46] jesusabdullah: I want to select the first

element in some html without using jquery [21:47] CoverSlide: document.querySelector('h2') [21:47] SubStack: document.getElementsByTagName('h2')[0] [21:47] jzacsh: ACTION wonders what google is for [21:47] xerox: in some html ? [21:47] jesusabdullah: I googled, jzacsh ! [21:47] CoverSlide: SubStack: you just used the dom! [21:47] CoverSlide: ACTION gasps [21:47] nibblebot: tjholowaychuk: cluster status returns that master is alive and all workers dead [21:47] SubStack: oh shi--- [21:47] jesusabdullah: Just didn't know what to search for! [21:47] tjholowaychuk: nibblebot interesting [21:47] nibblebot: tjholowaychuk: i have to do a manual cluster restart to get it to work right [21:48] tjholowaychuk: nibblebot if you have any more info let me know, maybe open an issue for now so we can keep track of things [21:48] nibblebot: this is after having it watch a file, then adding a trivial whitespace addition and watching it reload [21:48] tjholowaychuk: ohh reload() [21:48] nibblebot: ok, it's only happening on dev, but yeah i'll look into it [21:48] nibblebot: we will probably not be using reload() in production anyhow [21:48] jesusabdullah: hmm [21:49] tjholowaychuk: nibblebot yeah i wouldnt do that [21:49] megalomix has joined the channel [21:49] tjholowaychuk: SIGUSR2 [21:49] megalomix: hi [21:49] tjholowaychuk: herrow [21:49] jesusabdullah: How about all elements *after* said tag? [21:49] CoverSlide: megalomix: lo [21:50] CoverSlide: jesusabdullah: ALL elements? [21:50] Wizek has joined the channel [21:50] kepheus has joined the channel [21:50] CoverSlide: like not just sibling elements? [21:50] jesusabdullah: Here's what I *really* want to do: I have some articles I want to truncate, and I want to do so by removing everything after (and including) the first h2 [21:51] jesusabdullah: Just so this isn't an "you asked for x but really wanted y" kinda thing anymore [21:51] jesusabdullah: Make sense? [21:51] eazyigz has joined the channel [21:51] jesusabdullah: CoverSlide: Sibling elements is likely fine [21:51] jesusabdullah: in fact, probably what I *actually* want [21:52] nibblebot: tjholowaychuk: do you use any kind of monit, upstart, or SMF to manage the cluster master process? [21:52] jesusabdullah: Sorry for all the questions! I'm *really* weaki with this whole "dom" thing ;) [21:52] jesusabdullah: s/weaki/weak/ [21:52] tjholowaychuk: nibblebot we're using upstart right now [21:52] CoverSlide: document.getElementsByTagName('h2').parentNode.childNodes << returns an array-like object containing all child nodes of that h2's parent [21:52] tnlogy has joined the channel [21:53] nibblebot: tjholowaychuk: so if you do cluster restart, does that fool upstart into thinking it died an unnatural death? [21:53] CoverSlide: crazier stuff probably more than one line [21:53] parshap has joined the channel [21:53] tjholowaychuk: nibblebot i have plans to move all the auxiliary stuff into a separate child process so master will hopefully just never (rarely) crash [21:53] CoverSlide: plugins have their own process? [21:53] nibblebot: auxiliary such as? [21:54] robertfw has joined the channel [21:54] tjholowaychuk: nibblebot the repl, reporting stuff etc [21:54] tjholowaychuk: anything that shouldnt really be in the master [21:54] nibblebot: ah ok, yeah make it lean [21:54] CoverSlide: and green [21:54] nibblebot: yeah, i had the master crash and 2/4 workers crash on staging for unknown reasons [21:54] CoverSlide: like a ninja turtle [21:55] tjholowaychuk: nibblebot no logs? [21:55] nibblebot: tjholowaychuk: well i have all the master.log, workers.*.log but i didn't review them [21:56] tjholowaychuk: ah [21:56] nibblebot: tjholowaychuk: i'll try to file an issue on that if i can as well [21:58] antono has joined the channel [21:59] robotmay has joined the channel [21:59] amiller has joined the channel [22:00] mikl has joined the channel [22:00] mikl has joined the channel [22:01] apanda has joined the channel [22:01] hij1nx has joined the channel [22:01] jesusabdullah: CoverSlide, SubStack, thanks for your help! [22:02] losing has joined the channel [22:02] random123: hes gay 4 u [22:03] jesusabdullah: It's true [22:03] CoverSlide: make it happy, make it snappy, make it gay [22:03] random123: jk :) [22:03] CIA-65: node: 03Ryan Dahl 07master * rb8d40be 10/ (31 files in 6 dirs): Upgrade libuv to joyent/libuv@ce20791 - http://git.io/u1QBGw [22:03] CIA-65: node: 03Ryan Dahl 07master * rcf2e68d 10/ lib/net_uv.js : net_uv: handle read errors - http://git.io/penRqg [22:03] softdrink: is anyone using vows with phantomjs? [22:04] dgathright has joined the channel [22:04] Wa has joined the channel [22:04] CoverSlide: FORK YOU on github [22:05] topaxi has joined the channel [22:07] ryanfitz_ has joined the channel [22:07] temp01 has joined the channel [22:08] adelgado has joined the channel [22:08] AvianFlu has joined the channel [22:10] caolanm has joined the channel [22:12] gartenstuhl has joined the channel [22:12] mike5w3c_ has joined the channel [22:13] mikeal has joined the channel [22:14] Juan77 has joined the channel [22:17] retrofox has left the channel [22:18] mikl has joined the channel [22:18] mikl has joined the channel [22:20] figital has joined the channel [22:22] ilker has joined the channel [22:24] mikekunze has joined the channel [22:25] eignerchris has joined the channel [22:25] eignerchris has joined the channel [22:26] dshaw_ has joined the channel [22:27] CarterL1 has joined the channel [22:29] isaacs has joined the channel [22:30] mundanity has joined the channel [22:33] fmeyer has joined the channel [22:33] esteth has joined the channel [22:33] maqr has joined the channel [22:34] saikat has joined the channel [22:34] esteth: Hi folks. I'm thinking about making a peer-to-peer turn-based game server and I'm evaluating my options. node seems like a great choice for scalable, IO-based apps like this, but I'm struggling with the ecosystem. There doesn't seem to be much in the way of support for peer to peer systems in the same way, say, erlang has. [22:35] mikeal: ryah: i'm seeing this crazy issue [22:35] mikeal: on node 0.4.x and 0.5.x i'm not seeing a response body for some PUT requests [22:35] esteth: Could anyone convince me otherwise? I'd like to stick to javascript if possible, just as a personal preference, but it seems like all evidence is pointing me at erlang [22:35] jesusabdullah: esteth: Check out dnode, hook.io, socket.io, nowjs and pubnub. [22:36] slickplaid: jesusabdullah: +1 :D [22:36] jesusabdullah: esteth: I'd recommend dnode and hook.io, but plenty of people use the other three as well; ymmv [22:36] CoverSlide: dnode is cool except no way to handle binary data [22:36] jesusabdullah: Yeah, I seem to know *all* the ipc/rpc toys for node despite only having really used dnode [22:36] mikeal: oh wiat [22:36] mikeal: it's worse [22:36] jesusabdullah: CoverSlide: There's not? [22:36] slickplaid: esteth: All are node.js libraries, not separate languages, btw. [22:37] CoverSlide: aside from base64 [22:37] mikeal: ryah: node's client disconnects before the body is received for some requests [22:37] ryah: mikeal: hm [22:37] CoverSlide: i would love to just passet it a Buffer though without having to convert it [22:37] mikeal: ryah: do a PUT to http://testnano.iriscouch.com:80/test [22:37] mikeal: without a body [22:37] mikeal: you'll get back a 412 response [22:37] wadey has joined the channel [22:37] mikeal: with content-length of 95 [22:38] mikeal: and node will disconnect before receiving the body [22:38] esteth: jesusabdullah: dnode looks useful, but isn't something like socket.IO for pushing to the browser in a web app, rather than talking to other node servers? [22:38] mikl has joined the channel [22:38] mikl has joined the channel [22:38] slickplaid: esteth: dnode uses socket.io as the transport mechanism, iirc [22:39] ryah: mikeal: 1sec [22:39] isaacs: esteth: you can use dnode over any type of stream [22:39] mikeal: cool [22:39] isaacs: esteth: so you can just connect tcp streams or tls streams [22:39] jonaslund has joined the channel [22:40] isaacs: esteth: socket.io is just a way to have a bidirectional stream interface with a browser connection [22:40] sechrist has joined the channel [22:40] sechrist has joined the channel [22:40] esteth: isaacs/slickplaid: Ah, that sounds great for dnode. socket.io doesn't really fit my use case then, but I'm taking a look at hookio, which so far looks like it's exactly what I need :) [22:40] jesusabdullah: esteth: socket.io is, yes, node/browser-specific. So is nowjs. dnode can work between nodes OR with the browser (using socket.io in the background) [22:40] _sorensen_: dnode++ [22:40] v8bot_: _sorensen_ has given a beer to dnode. dnode now has 1 beers. [22:40] jesusabdullah: Yeah, hook.io is way cool [22:41] slickplaid: esteth: is this game going to be in the browser? [22:41] sechrist: Has anybody done like a trickle down cache for redis in node? [22:41] jesusabdullah: idk if it's "mature enough" but it's definitely neato [22:41] sechrist: where you aim your writes at the actual redis servers, but a node instance implements enough of the redis protocol to listen for it's replication and keep a cache [22:41] jesusabdullah: Plus, it's built on top of dnode1 [22:41] jesusabdullah: !* [22:41] sechrist: dnode is awesome [22:41] temas has left the channel [22:41] sechrist: but how do I load balance it?! [22:41] rgl has joined the channel [22:42] isaacs_ has joined the channel [22:42] rmcastil has joined the channel [22:42] esteth: slickplaid: I'm not sure at the moment. So far I'm just wanting to build nodes that play the game between themselves, without having a browser as a frontend, but that would be the next step, i suspect [22:42] sechrist: the connection/client objects are tied pretty hard to the socket.io instance. maybe I need to read more into 0.7 [22:43] mikeal: ryah: i put a debug statement in every call to socket.destroy in http.js and the only one i see is on a clean end event [22:43] CoverSlide: hook.io needs some work. like support for multiple arguments on listeners would be nice [22:43] mikeal: so the parser is trying to cleanly exit [22:44] slickplaid: esteth: if you're looking to keep it all javascript, node.js is the answer. Erlang has it's place, too... but unless you already know the language, it's going to be a bit of a learning experience, I would think. [22:44] ambroff has joined the channel [22:44] ryah: mikeal: i get content-length 80 [22:44] mikeal: well whatever [22:44] mikeal: you don't get a body in node tho :) [22:45] ryah: i do [22:45] ryah: but its slow [22:45] aconbere has joined the channel [22:45] mikeal: i get a body with curl, and not with node [22:45] esteth: slickplaid: That's why I was trying to shy away from erlang. I'm still just a bit concerned that almost all of the community stuff for node is based around writing web-apps, and if not, then definately focused on the client-server model, whereas I'm interested in purely peer-to-peer solutions [22:45] aconbere has joined the channel [22:45] raidfive has joined the channel [22:46] mikl has joined the channel [22:46] mikl has joined the channel [22:46] isaacs: esteth: dnode is the tool you want. [22:46] AvianFlu: CoverSlide: pass objects to hook.io listeners, that's what they're meant for [22:47] isaacs: esteth: it actually converts the client-server connection *into* a p2p system [22:47] CoverSlide: i understand that [22:47] CoverSlide: it'd just be more convenient my way [22:48] CoverSlide: 4 days from leaving this place [22:48] CoverSlide: productivity: 0 [22:49] schwab has joined the channel [22:49] ryah: mikeal: ok i see what you mean.. [22:49] mikeal: it's crazy weird :) [22:49] mikeal: i tried to replicate it with an in-memory server and it didn't work, but i wasn't doing a fixed content-length [22:50] kritic has joined the channel [22:51] ryah: mikeal: https://gist.github.com/1163855 [22:51] ryah: it seems like the server isnt sending the body [22:52] fubada has joined the channel [22:52] mikeal: wtf [22:52] mikeal: why is curl working [22:52] mikeal: grr.... [22:52] _root_ has joined the channel [22:53] fubada: im trying to learn node.js for a personal website. am i better off working with nodejs+express from the beginning? [22:53] fubada: plan is to use mongodb with node, unsure about express [22:53] chjj: youre unsure about the wrong thing i think [22:54] fubada: thats entirely possible [22:54] fubada: can you send me down the right path to get node talkign to the db, and saving some calendar objects [22:54] isaacs: fubada: if you are going to serve html, express is probably the right way to do that part of it. [22:54] chjj: would make more sense to be unsure about mongo [22:54] isaacs: fubada: or you could just skip node and express altogether, and use couchdb for the whole thing [22:55] fubada: thanks :) [22:55] nickradford has joined the channel [22:55] isaacs: fubada: posts are docs, and then write a view that outputs the data in html [22:56] tjholowaychuk: fubada write a tiny app (todo list or something) with just node [22:56] tjholowaychuk: and then write it with express [22:56] fubada: tjholowaychuk: and only then add db? [22:56] fubada: or add db from the start [22:56] tjholowaychuk: you'll learn where the concerns are at that point [22:56] tjholowaychuk: well [22:56] tjholowaychuk: yeah sure [22:57] tjholowaychuk: that part would be the same with or without though [22:57] tjholowaychuk: so doesnt matter, db = {} [22:57] fubada: :) [22:57] chjj: {} <--- best db [22:58] fubada: so I did the http://www.nodebeginner.org/, and I understand everything thats going on [22:58] fubada: but whats next [22:58] fubada: wheres the api, whats possible? [22:58] mikl has joined the channel [22:58] mikl has joined the channel [23:00] abjorn has joined the channel [23:00] softdrink: ACTION glares at zombie.js [23:00] CIA-65: libuv: 03Igor Zinkovsky 07master * r4e9edce 10/ src/win/tcp.c : windows: temporarily disable non-zero reads - http://git.io/yYMUsg [23:01] chjj: fubada: what do you mean? [23:01] sonnym has joined the channel [23:02] craigpetchell has joined the channel [23:02] iammerrick has joined the channel [23:02] eazyigz has joined the channel [23:05] bradleymeck has joined the channel [23:07] zivester_ has joined the channel [23:07] skm has joined the channel [23:07] traph has joined the channel [23:08] pickels has joined the channel [23:08] dgathright has joined the channel [23:08] abjorn: fuck the police [23:09] dgathright has joined the channel [23:10] dcelix has joined the channel [23:10] cpetzold has joined the channel [23:10] guidocalvano has joined the channel [23:10] bradleymeck: at least you arent in england? [23:11] dominictarr has joined the channel [23:11] guidocalvano: hey people, how do I cause prototype inheritance in C++ to occur exactly like it happens in javascript [23:12] guidocalvano: if I do Child.prototype = new Parent() ; objects of type Child get all the properties of a Parent instance [23:12] teadict: abjorn http://forgifs.com/gallery/d/187802-1/Powerwheels_wheelie.gif [23:12] bradleymeck: GetPrototype, or InstanceTemplace / etc [23:13] guidocalvano: I'll check those tnx (: [23:13] cpetzold: tjholowaychuk: is express-expose compatible with the latest express? [23:13] tjholowaychuk: cpetzold should be [23:14] cpetzold: does 'require()' need to be free CS? [23:14] abjorn: @teadict: exactly [23:14] TooTallNate: guidocalvano: actually I think there's an "Inherits()" function [23:14] TooTallNate: on FunctionTemplate objects [23:14] guidocalvano: the inherits function doesn't appear to call the new of my parent [23:15] TooTallNate: guidocalvano: Inherits() only sets up the function's prototype [23:15] TooTallNate: you would need to call the superclass' constructor in your subclass's constructor [23:15] guidocalvano: TooTallNate: no other way? [23:16] guidocalvano: TooTallNate: no tidyer way? [23:16] TooTallNate: that's ~ how you'd do it in JS-land, so no [23:16] TooTallNate: 2 step process [23:16] TooTallNate: besides, "Child.prototype = new Parent()" is kinda incorrect anyways [23:16] guidocalvano: TooTallNate: well in js land you'd assign an instance of the parent function to the prototype of the child function [23:17] guidocalvano: how so? [23:17] guidocalvano: what is your gripe with it? it happens everywhere [23:17] tjholowaychuk: guidocalvano that's not side-effect free [23:17] EvRide has joined the channel [23:17] tjholowaychuk: new DoExpensiveShitInConstructorOhNoes [23:17] TooTallNate: guidocalvano: 2 set of instance variables set up in the "Parent" function will be shared between all instances of "Child" [23:18] tjholowaychuk: guidocalvano constructors / .prototype are pretty broken [23:18] tjholowaychuk: as far as concepts go [23:18] tjholowaychuk: and typeof / instanceof [23:18] qbert_: how would I read from stdin with node ? [23:18] fatjonny has left the channel [23:18] tjholowaychuk: so just ignore that fact, and kinda go with the flow haha [23:18] bradleymeck: also call Parent.call(this) inside your constructor [23:18] bradleymeck: qbert_ : process.openStdin(); process.stdin.on('data'... [23:20] guidocalvano: TooTallNate: I thought that such vars in an instance in the parent would be instantiated in the child when they were assigned some value? [23:20] AvianFlu: qbert_: you can also try http://github.com/nodejitsu/node-prompt [23:20] guidocalvano: *in an instance in the prototype [23:21] bradleymeck: tjholowaychuck would you rather have: var myProto = {x: 1}, instance =new myProto;? prototypal inheritance is painful if you need setup/teardown [23:21] bradleymeck: well teardown is evil already... [23:21] tjholowaychuk: bradleymeck if it were my choice and didnt involve perf I would ditch typeof/instanceof/constructors/.prototype/new [23:22] jhurliman: is anyone doing parsing / static analysis of javascript? [23:22] tjholowaychuk: jhurliman there's https://github.com/visionmedia/stats [23:22] tjholowaychuk: but that only does some stats [23:22] qbert_: AvianFlu, way better thank you [23:23] jhurliman: pretty cool [23:23] tjholowaychuk: qbert_ https://github.com/visionmedia/commander.js too while we're promoting stuff [23:23] tjholowaychuk: haha [23:23] AvianFlu: qbert_: np, it's a little convoluted if you're new to node, that's why people make libs :) [23:23] AvianFlu: yeah I was gonna say that before, TJ has one too [23:23] warz has joined the channel [23:24] TooTallNate: guidocalvano: nope, when you attempt to get/set a prop on a JS object, first it checks itself, then it starts checking up it's "prototype" chain until the prop is found (or not found) [23:25] H4ns` has joined the channel [23:25] sivy has joined the channel [23:26] guidocalvano: TooTallNate: I'm pretty sure that if you set the var like this; Child.prototype = new function() {this.bla = "bob" ; } ; [23:26] ohtogo has joined the channel [23:27] Sorella has joined the channel [23:27] guidocalvano: that bla will be instantiated locally in an object created by new Child() ; contrary to when the var of the prototype of the Parent of Child would have been set like this: Parent.prototype.bla = "bob" [23:28] reid has joined the channel [23:28] guidocalvano: in the second case the var is retrieved and set on the prototype, but not in the first [23:29] bnoordhuis: why would you do it like that anyway? [23:29] tjholowaychuk: guidocalvano those two things are very different [23:29] apoc has joined the channel [23:29] truppp has joined the channel [23:29] cnu has joined the channel [23:30] guidocalvano: bnoordhuis: I've been doing it and seeing it a lot, but I guess from now on I will just call the constructor manually [23:30] shipit has joined the channel [23:31] guidocalvano: which leaves me with the question if there is a standard way of passing on arguments to Function:: Call( Object this, argCount, Handle[] argArraty ) [23:31] TooTallNate: guidocalvano: https://gist.github.com/1163916 [23:31] bnoordhuis: guidocalvano: for constructor calls? [23:32] guidocalvano: bnoordhuis: yes, constructor calls from v8 [23:32] Ned_ has joined the channel [23:32] devaholic has joined the channel [23:33] cnu has joined the channel [23:33] TooTallNate: guidocalvano: that gist should hopefully explain the differences in the two approaches [23:33] bnoordhuis: guidocalvano: it's a huge, huge pain to do from c++ [23:33] bnoordhuis: guidocalvano: i heartily recommend doing it from within a js shim [23:33] jaequery: hola [23:34] bnoordhuis: guidocalvano: to illustrate how annoyingly complex it is... [23:34] jaequery: anyone here use moo tools? [23:34] bnoordhuis: i talked it over with one of the v8 guys and even he hadn't a clear picture of how to get it right for all corner cases [23:34] bnoordhuis: ergo, do it from js land [23:35] DrMcKay: bnoordhuis: just to let you know, my chance got commited :) [23:35] DrMcKay: *change [23:35] TooTallNate: [ANN]: If you're interested in NodObjC (https://github.com/TooTallNate/NodObjC), I've registered #nodobjc on freenode [23:35] CoinOpeBoy has joined the channel [23:35] bnoordhuis: DrMcKay: hah cool stuff [23:35] ryanfitz has joined the channel [23:35] TooTallNate: so head over there if you wanna talk Cocoa+NodeJS [23:36] DrMcKay: bnoordhuis: cool stuff? it was just a test [23:36] DrMcKay: bnoordhuis: fun fact, it was my first day with node :) [23:38] ryanRT has joined the channel [23:38] tk has joined the channel [23:38] balupton has joined the channel [23:39] langworthy has joined the channel [23:39] guidocalvano: its working (: [23:39] guidocalvano: thanks guys/girls [23:44] tim_smart has joined the channel [23:45] guidocalvano: what is a shim by the way? [23:46] bnoordhuis: guidocalvano: a thin wrapper/cover that papers over something more complex [23:46] DrMcKay: oh, did you guys know that mongoose is also an animal? [23:46] bnoordhuis: :) [23:47] DrMcKay: I've always googled "mongoose nodejs" [23:47] bnoordhuis: DrMcKay: not a native speaker, i presume? [23:47] DrMcKay: they look cute <3 [23:47] unlink has joined the channel [23:47] unlink has joined the channel [23:47] DrMcKay: bnoordhuis: no [23:48] bnoordhuis: (well, me neither) [23:48] max_dev has joined the channel [23:48] bnoordhuis: i've always wondered if the plural of mongoose is mongoose, mongooses or mongeese [23:48] tylerstalder has joined the channel [23:48] nibblebot has joined the channel [23:48] bnoordhuis: i just call them herpestidae [23:48] DrMcKay: bnoordhuis: easiest way would be to create a model in RoR :) [23:48] bnoordhuis: hah [23:49] DrMcKay: bnoordhuis: that's the case where using latin names seems easier [23:49] spasquali has joined the channel [23:50] DrMcKay: bnoordhuis: out of curiosity, where are you from? [23:50] bnoordhuis: DrMcKay: technically i know the plural is 'mongooses' - but it just sounds wrong [23:50] bnoordhuis: DrMcKay: the netherlands [23:50] bnoordhuis: you? eastern europe, i suspect? [23:51] AvianFlu: bnoordhuis: I think they would just say "10 mongoose" [23:51] qbert_: I need to just slurp a file with node, libs for this ? [23:51] bnoordhuis: qbert_: fs.readFile? [23:51] DrMcKay: bnoordhuis: you lucky bastard, I always wanted to go there [23:51] devaholic has joined the channel [23:51] bnoordhuis: DrMcKay: yes? why? [23:52] DrMcKay: bnoordhuis: I'm from Poland, country where developers make < $ 15/h ;) [23:52] hippich has left the channel [23:52] bnoordhuis: DrMcKay: hah, right [23:52] DrMcKay: bnoordhuis: I just like the country, politics feels liberal [23:52] bnoordhuis: well, you're part of the EU now, right? [23:52] DrMcKay: bnoordhuis: yes [23:52] bnoordhuis: so what's stopping you? [23:52] DrMcKay: bnoordhuis: I'm 17 [23:52] DrMcKay: bnoordhuis: though I'm planning to leave after I finish school [23:52] bnoordhuis: oh, so it's 12 months that's stopping you? [23:53] abjorn has left the channel [23:53] hdon- has joined the channel [23:53] DrMcKay: bnoordhuis: actually a bit more, vocational schools last 4 years here [23:53] bnoordhuis: DrMcKay: i've lived in your neighbouring country btw, the czech republic [23:54] DrMcKay: bnoordhuis: but, well, it may be a good idea to dropout [23:54] bnoordhuis: so you might make only $15/h but cost of living is 1/5th of what it is here [23:54] bnoordhuis: DrMcKay: well, you can pick up a study here, can't you? [23:54] bnoordhuis: it's even easier than when i was a student [23:54] isaacs has joined the channel [23:54] DrMcKay: bnoordhuis: I'm almost sure I can, I would have to look it up somewhere [23:55] balupton has left the channel [23:55] bnoordhuis: DrMcKay: let me know if you want some pointers, be happy to help [23:55] DrMcKay: bnoordhuis: thanks, I greatly appreciate that, I'll ping you later :) [23:55] mcluskydodallas has joined the channel [23:56] DrMcKay: bnoordhuis: oh, I actually found some pointers [23:57] DrMcKay: bnoordhuis: 0x0391EC1, 0XC00016C [23:57] bnoordhuis: DrMcKay: if your programming career fails to take off, you can always become a stand-up comedian! [23:57] DrMcKay: bnoordhuis: it's just a poor xkcd reference [23:58] [[zzz]] has joined the channel [23:58] AvianFlu: LOLOL [23:59] warz has left the channel