[00:00] kenperkins has joined the channel
[00:01] kmiyashiro: why doesn't my .npmignore work for directories?
[00:01] chrisdickinson: ggg: given that the view hit was something along the lines of "/auth/:method", and you hit it at "/auth/sandwiches", req.param('method') would return 'sandwiches'
[00:02] ggg: okk...but I dont understand what should I pass thru this param
[00:02] ggg: the exemple of connect-auth for facebook doesnt explain much, neither this part
[00:05] sgarrett has joined the channel
[00:06] cccaldas has joined the channel
[00:06] losing has joined the channel
[00:06] sgarrett: Hello. I'm trying to install the connect module through "npm install connect -g" on Cygwin. But it's giving me errors. Is connect usable on Cygwin?
[00:07] arlolra: SubStack: :( jadeify returns nothing but undefined from inside a template
[00:09] SubStack: oh right I got rid of that
[00:09] SubStack: you can pass it in as a variable though
[00:10] arlolra: i did and still nothing
[00:11] SubStack: from the outside?
[00:11] arlolra: well, it returns a jquery handle of undefined
[00:11] tylerstalder has joined the channel
[00:11] arlolra: jadeify('/path', {jadeify: jadeify})
[00:11] arlolra: if i use that second jadeify, it doesn't seem to work
[00:14] kristsk has joined the channel
[00:14] theCole has joined the channel
[00:16] spetrea has joined the channel
[00:19] Yoric has joined the channel
[00:20] mehtryx has joined the channel
[00:21] bnoordhuis: vim... you can use it for over a decade and still discover new features...
[00:21] bnoordhuis: :set wildmenu
[00:23] tbranyen: oh nice
[00:23] tbranyen: thats cool
[00:23] bnoordhuis: and to know it's been there all those years!
[00:23] tbranyen: heh
[00:24] DrMcKay: bnoordhuis: you've just leveled up ;)
[00:24] bnoordhuis: :)
[00:25] Sembiance: Anyone have a good 'http request' module? Something I can do PUT/POST/GET/DELETE method calls easily and just get a callback with the data?
[00:26] Sembiance: I was using https://github.com/mikeal/request but it doesn't seem to want to post body data when doing a GET call, which sadly elastic search needs
[00:26] jwall has joined the channel
[00:27] TheJH: .. (/a/)("a")
[00:27] catb0t: [ 'a' ]
[00:27] Yoric has joined the channel
[00:28] DrMcKay: TheJH: that was...
[00:29] willwhite has joined the channel
[00:29] DrMcKay: Sembiance: seems easy to hack out by yourself
[00:29] DrMcKay: just 5 methods, each uses different opts
[00:29] DrMcKay: !doc link http#request
[00:29] dmkbot: http://nodejs.org/docs/latest/api/http.html#http.request
[00:31] TheJH: DrMcKay, well, look at this:
[00:31] TheJH: !admin eval var result; try { result = (/a/)("a") } catch (e) { result = e }; result
[00:31] jhbot: TypeError: object is not a function
[00:31] TheJH: .. (/a/)("a")
[00:31] catb0t: [ 'a' ]
[00:31] DrMcKay: wut.
[00:31] TheJH: DrMcKay, v8 changed its behavior related to using regexes as functions
[00:31] DrMcKay: oh, I see
[00:31] TheJH: DrMcKay, it doesn't work anymore
[00:32] DrMcKay: yes, node shell throws
[00:32] AvianFlu: TheJH: try RE.exec() on your bot to test
[00:32] TheJH: I was tracking down a related issue together with AvianFlu in #nodejitsu
[00:32] TheJH: !admin eval var result; try { result = (/a/).exec("a") } catch (e) { result = e }; result
[00:32] jhbot: a
[00:32] AvianFlu: the direct function call syntax was alias for that anyway
[00:32] chrisdickinson: v8: (function(obj) { try { obj.x = 3; return obj; } finally { obj.y = 1; }})({})
[00:32] v8bot_: chrisdickinson: {"x": 3, "y": 1}
[00:33] Sembiance: DrMcKay: it's more work once you start wanting to handle http redirects, gzip decoding, additional request headers, posting form data, etc. I'd rather not build yet another wheel when there are about 1,000 of these particular wheels already available. I'll look through the npm list and see if I can find a nice wheel I like, was just wondering if someone had a wheel they already really liked :)
[00:33] patrickjst has joined the channel
[00:33] unlink has joined the channel
[00:33] unlink has joined the channel
[00:33] Yoric has joined the channel
[00:33] jakehow_ has joined the channel
[00:33] jakehow has joined the channel
[00:33] TheJH: Sembiance, I wrote a wheels-based application today :D
[00:34] DrMcKay: Sembiance: that's true, I thought you wanted a basic functionality
[00:34] DrMcKay: TheJH: :D
[00:34] boaz has joined the channel
[00:34] DrMcKay: TheJH: are you done with deflate?
[00:34] chrisdickinson: ACTION 's interest is piqued by 'deflate'.
[00:35] TheJH: DrMcKay, no, not yet, it will take some time, I guess
[00:35] chrisdickinson: TheJH: full inflate/deflate implementation with support for gzip blocks/headers?
[00:36] chrisdickinson: (and is not https://github.com/dankogai/js-deflate)?
[00:37] TheJH: chrisdickinson, I've already done a working gzip reader except for the inflate and checksum stuff :D - it outputs the raw, still compressed (=deflated) bytes, but without gzip headers
[00:38] chrisdickinson: ooo.
[00:38] chrisdickinson: cool!
[00:38] pct has joined the channel
[00:38] chrisdickinson: i know isaacs is looking for something like that.
[00:38] TheJH: chrisdickinson, wait. I have the gzip part and that guy has the much more compilcated part?
[00:38] chrisdickinson: (and, having tried to write a js zlib replacement myself, i wish you godspeed!)
[00:38] secoif has joined the channel
[00:38] TheJH: *complicated
[00:39] chrisdickinson: TheJH: dakongai? or isaacs?
[00:39] TheJH: chrisdickinson, dakongai
[00:39] chrisdickinson: dakongai's rawdeflate/inflate works, if weirdly.
[00:39] chrisdickinson: it's what git.js uses.
[00:39] tilgovi has joined the channel
[00:39] tilgovi has joined the channel
[00:40] chrisdickinson: i'm not sure how well it does with different compression levels offhand
[00:40] TheJH: chrisdickinson, does it have a license or so?
[00:40] chrisdickinson: and it doesn't act on buffers -- it works on streams
[00:40] secoif: nevermind, sorted it out, though it'd be nice to have a shorthand for that, meh (for the http.get body += chunks on data stuff)
[00:40] chrisdickinson: TheJH: I tracked this stuff down a while back, let me double check.
[00:40] hybsch has joined the channel
[00:40] guidocalvano has joined the channel
[00:41] guidocalvano: hey people
[00:41] guidocalvano: strange binding problem
[00:42] Sembiance: DrMcKay: turns out I was doing something wrong :)
[00:42] Sembiance: DrMcKay: https://github.com/mikeal/request is working just perfectly :)
[00:42] guidocalvano: I unwrap somthing to an object of the class of its parent
[00:42] guidocalvano: but then I get a seg fault
[00:42] guidocalvano: any ideas?
[00:43] DrMcKay: Sembiance: :)
[00:44] chrisdickinson: TheJH: sidenote: this also does inflate (tested it) and is LGPL: http://jsxgraph.uni-bayreuth.de/wp/2009/09/29/jsxcompressor-zlib-compressed-javascript-code/
[00:44] robot_jesus: whats the dnode channel again ?
[00:44] DrMcKay: we need some git linking stuff
[00:44] TheJH: DrMcKay, git linking?
[00:44] DrMcKay: TheJH: wasn't your bot doing something like that?
[00:44] TheJH: DrMcKay, what exactly do you want?
[00:44] DrMcKay: project, user maybe?
[00:45] DrMcKay: !gh mikeal/request
[00:45] TheJH: !remember gh https://github.com/$/$
[00:45] jhbot: saved definition of 'gh'
[00:45] TheJH: !mem gh mikeal request
[00:45] DrMcKay: would output https://gihub.com/mikeal/request
[00:45] jhbot: https://github.com/mikeal/request
[00:45] robot_jesus: so I've starting using hashtags in my comments, like // TODO: Fix this to be asynch #r1 #eventually , and just wrote a node program to parse these out and display them in a grid. Kind of a quick ticket system for programmers, would anyone use that ? git integrations, trac, etc
[00:46] TheJH: DrMcKay, how about that? Everyone can "remember" stuff, by the way
[00:46] TheJH: (and overwrite it)
[00:46] DrMcKay: robot_jesus: I would!
[00:46] DrMcKay: it's fun to visualize code
[00:47] DrMcKay: DrMcKay: you want to remember all relevant projects?
[00:47] DrMcKay: TheJH: ^
[00:47] TheJH: chrisdickinson, whoah, JSXCompressor looks good, too :)
[00:48] chrisdickinson: TheJH: yep. the biggest issue i had with it is that it didn't include a deflate half.
[00:48] TheJH: a deflate half?
[00:48] chrisdickinson: sorry, it can inflate things, but it can't deflate things.
[00:48] chrisdickinson: (which is half of what git does, so... kind of an important piece :)
[00:49] chrisdickinson: (disclaimer: i'm not the author of git.js, just helping out with it. was working on my own pure js git implementation when git.js came out.)
[00:50] albertosheinfeld has joined the channel
[00:50] TheJH: chrisdickinson, JXG.decompress looks like deflate, and the text also says that...
[00:50] hasta84 has joined the channel
[00:51] ryanfitz has joined the channel
[00:51] DrMcKay: robot_jesus: ping?
[00:52] chrisdickinson: TheJH: deflate == "compress", inflate == "decompress", i mean. since it can't compress data, you couldn't use it to, say, write git objects.
[00:52] chrisdickinson: unless i totally missed something.
[00:52] TheJH: ah, yes
[00:52] chrisdickinson: which is totally possible.
[00:52] TheJH: sorry
[00:52] chrisdickinson: oh no! i was doubting myself there for a moment :)
[00:52] Sembiance: heh, it's funny, started out with dust.js as a template language, ditched it and went with mustache, and now I'm back to dust.js :)
[00:52] TheJH: well, but I think inflate is more important for mikeals request or npm or so
[00:53] chrisdickinson: TheJH: oh yeah, definitely.
[00:53] chrisdickinson: but, since dakongai's stuff works with inflate and deflate, git.js ended up going that direction.
[00:53] chrisdickinson: as for the license, i could've sworn i had found it after like, days of digging.
[00:54] TheJH: ChrisBuchholz, it'd be fairly easy to create a spec-compliant deflater... if you don't want the size to be reduced. :D
[00:54] TheJH: just specify the no-compression-compression-method
[00:54] chrisdickinson: s/dakongai/dankogai/g
[00:54] TheJH: and split the data in blocks
[00:55] nibblebot has joined the channel
[00:55] chrisdickinson: TheJH: something tells me that wouldn't fly :)
[00:55] chrisdickinson: TheJH: fun other things to play with:
[00:55] TheJH: ChrisBuchholz, why not? :D
[00:55] chrisdickinson: ACTION coughs
[00:56] chrisdickinson: being able to create (useful) packfiles for the wire protocol
[00:56] chrisdickinson: especially in the case of pushing to github.
[00:56] TheJH: oops, two chris* matches...
[00:56] chrisdickinson: (where disk space eventually costs $$)
[00:56] chrisdickinson: haha
[00:57] robot_jesus: DrMcKay, yep ?
[00:57] chrisdickinson: sorry, that was the source of the "/me coughs" ;)
[00:57] TheJH: chrisdickinson, yes, saw that
[00:57] chrisdickinson: TheJH: the other idea i had was to use libpng to "implement" zlib support.
[00:57] DrMcKay: robot_jesus: I would love to hear more about that project
[00:57] daed: use libpng to implement zlib?
[00:57] daed: chris you're a rational man
[00:58] daed: let's not go psycho here :P
[00:58] DrMcKay: robot_jesus: that hashtag visualization
[00:58] chrisdickinson: png blocks are compressed using raw deflate.
[00:58] AvianFlu: v8: /abc/.exec('abcdefghi')
[00:58] v8bot_: AvianFlu: ["abc"]
[00:58] daed: still..
[00:58] chrisdickinson: use canvas to create an image.
[00:58] chrisdickinson: write to the canvas, subpixel by subpixel, the data you'd like to compress.
[00:58] TheJH: aaah
[00:59] AvianFlu: v8: /abc(.*)/.exec('abcdefghi')
[00:59] v8bot_: AvianFlu: ["abcdefghi", "defghi"]
[00:59] TheJH: AvianFlu, what are you doing there?
[00:59] chrisdickinson: read it back as a png, strip off the png header and footer blocks, and there's your compressed data.
[00:59] robot_jesus: DrMcKay, private chat sent :)
[00:59] AvianFlu: just making sure of something
[01:00] chrisdickinson: additionally, that makes for a really nice side step around "localStorage" limits -- upload that image file someplace, serve it with a "cache forever" etag, and the browser will keep a copy of it around indefinitely for you to load the data back out of.
[01:00] chrisdickinson: plus, if you've got BlobBuilder available, you can write the compressed data into a fake-png, open it up as a canvas, and read the decompressed bits out (subpixel by subpixel, again).
[01:01] DrMcKay: chrisdickinson: + you can do a god-moded cookie
[01:01] chrisdickinson: you know, this solution being at the far side of the crazy scale.
[01:02] chrisdickinson: the really cool thing is, if you've got git support in browser, all your page has to send down is the latest 40-byte hash of the client javascript.
[01:02] apollo_ has joined the channel
[01:02] chrisdickinson: if you need to update, open up a websocket and speak the git protocol and pull down a compressed delta of all the changes, re-execute. store results in localstorage, or someplace else.
[01:02] chrisdickinson: sort of how chrome updates itself.
[01:02] TheJH: :D, coool
[01:04] DrMcKay: chrisdickinson: how did you even get there from deflate?
[01:05] chrisdickinson: DrMcKay: I was originally interested in an in-browser implementation of git -- and git leans really heavily on deflate and inflate.
[01:06] chrisdickinson: git.js was released (by dan lucraft) recently. i've been working on fixing it up and getting packaged for node -- as well as speeding up portions of it in-browser
[01:06] jhbot has joined the channel
[01:06] TheJH: gotta go to bed now, have fun with my bot
[01:06] airportyh has joined the channel
[01:06] DrMcKay: !admin exec
[01:06] jhbot: you're not my admin
[01:06] chrisdickinson: (for example, https://github.com/chrisdickinson/git.js/blob/chris/lib/git/zlib.js turns dan kogai's inflate and deflate into web workers)
[01:06] DrMcKay: TheJH: I guess no
[01:06] TheJH: DrMcKay, :D
[01:07] DrMcKay: chrisdickinson: oh, that's neat
[01:07] chrisdickinson: thanks :)
[01:07] chrisdickinson: but, the native js inflate / deflate is pretty slow, so i'm still sort of enamoured with the idea of somehow using png's as a speedier way to get at inflated and deflated data.
[01:08] ceej has joined the channel
[01:08] chrisdickinson: the workerization doesn't make it any faster -- it just makes it not block the main event loop and freeze the browser.
[01:08] heavysixer has joined the channel
[01:08] some1else_ has joined the channel
[01:09] chrisdickinson: (also, tangentially, i'm not sure that there's a hard limit on how many XHR's you can send at once via web workers.)
[01:10] AD7six has joined the channel
[01:10] dmkbot has joined the channel
[01:10] DrMcKay: !ping
[01:10] dmkbot: DrMcKay, pong
[01:10] DrMcKay: what the hell?
[01:11] DrMcKay: I didn't even tell him to reconnect
[01:11] tilgovi_ has joined the channel
[01:11] tilgovi_ has joined the channel
[01:11] dmkbot has joined the channel
[01:11] enhydra has joined the channel
[01:12] nail_: he broke rule #2
[01:12] daed: what's rule #2?
[01:12] DrMcKay: chrisdickinson: I think it's limited by maximum number of concurrent HTTP request
[01:12] nail_: A robot must obey any orders given to it by human beings, except where such orders would conflict with the First Law.
[01:12] daed: well that's asimov
[01:13] daed: in fact
[01:13] daed: i think nexxy breaks rule #2
[01:13] DrMcKay: !ping
[01:13] dmkbot: DrMcKay, pong
[01:13] [[zz]] has joined the channel
[01:13] DrMcKay: at least he behaves.
[01:13] Nexxy: I break everything ;3
[01:13] daed: nexxy does *not* behave
[01:13] nail_: watch out for the takeover
[01:14] Nexxy: mostly hearts
[01:14] daed: crazy entity.
[01:14] dexter_e has joined the channel
[01:14] fairwinds has joined the channel
[01:14] DrMcKay: whatever, I'm going to sleep, it's 3 AM
[01:15] daed: hmm
[01:15] DrMcKay: if my bot decides to take over the world...
[01:15] daed: well
[01:15] DrMcKay: well, nothing I can do about that, he's running under forever
[01:15] robot_jesus: is there a password ?
[01:15] robot_jesus: a secret phrase maybe
[01:15] daed: it's 9:15pm on east coast USA
[01:15] daed: which means you've gotta be europe.
[01:15] DrMcKay: Poland
[01:16] DrMcKay: GMT-2
[01:16] DrMcKay: or wait...
[01:17] DrMcKay: it may be GMT+0100
[01:17] DrMcKay: no, I actually think it's GMT+0200
[01:17] DrMcKay: because it's summer
[01:17] DrMcKay: yes, I guess yes
[01:18] DrMcKay: whatever
[01:18] okuryu has joined the channel
[01:21] raoul has joined the channel
[01:22] albertosheinfeld has joined the channel
[01:22] ryanfitz has joined the channel
[01:22] boaz has joined the channel
[01:26] squeese has joined the channel
[01:27] fdenbow has joined the channel
[01:31] mikeal has joined the channel
[01:31] materialdesigner has joined the channel
[01:32] maushu__ has joined the channel
[01:34] Drakonite has joined the channel
[01:34] torsd has joined the channel
[01:38] slajax has joined the channel
[01:40] djw_ has joined the channel
[01:46] necrodearia has joined the channel
[01:47] copongcopong has joined the channel
[01:55] sammmy has joined the channel
[01:57] mrchess` has joined the channel
[01:58] achiu has joined the channel
[01:59] towski has joined the channel
[02:00] Jackie has joined the channel
[02:00] edude03 has joined the channel
[02:02] tantek has joined the channel
[02:02] tantek has left the channel
[02:05] foxkid_ has joined the channel
[02:09] _root_ has joined the channel
[02:13] flipperWhip has joined the channel
[02:15] rgl has joined the channel
[02:24] JJMalina has joined the channel
[02:26] kmiyashiro has joined the channel
[02:32] mikeal has joined the channel
[02:33] zackattack has joined the channel
[02:35] achiu has joined the channel
[02:36] JoshC1 has joined the channel
[02:41] EvRide has joined the channel
[02:44] socketio\test\40 has joined the channel
[02:45] socketio\test\45 has joined the channel
[02:45] jmoyers has joined the channel
[02:46] temp01 has joined the channel
[02:46] ryan0x2 has joined the channel
[02:46] dguttman has joined the channel
[02:50] al3xnull has joined the channel
[02:53] torsd has joined the channel
[02:57] sechrist_ has joined the channel
[02:58] Wa has joined the channel
[02:59] al3xnull_ has joined the channel
[02:59] dguttman has joined the channel
[03:01] boehm has joined the channel
[03:02] iammerrick has joined the channel
[03:02] havenn has joined the channel
[03:04] eric_8th_Light has joined the channel
[03:04] sechrist has joined the channel
[03:05] nibblebot has joined the channel
[03:05] asabil has joined the channel
[03:06] dominictarr has joined the channel
[03:07] unlink has joined the channel
[03:07] unlink has joined the channel
[03:07] ryan[WIN] has joined the channel
[03:08] steffan_ has joined the channel
[03:10] fmeyer has joined the channel
[03:14] reid has joined the channel
[03:15] jerrysv has joined the channel
[03:17] reid_ has joined the channel
[03:19] sivy has joined the channel
[03:21] reid has joined the channel
[03:22] zackattack has joined the channel
[03:26] rhutchison_ has joined the channel
[03:32] carmony has joined the channel
[03:32] reid has joined the channel
[03:36] mykul has joined the channel
[03:39] Intuit` has joined the channel
[03:39] maushu__: Why wonder why my c# event-based http server got less hits per second than the node.js http server.
[03:42] temp02 has joined the channel
[03:44] sechrist has joined the channel
[03:45] Aphelion has joined the channel
[03:45] guyvdb_ has joined the channel
[03:47] Marak has joined the channel
[03:49] heavysixer has joined the channel
[03:51] meso has joined the channel
[03:52] sebastia_: anyone around who could answer a mongoose-related question?
[03:52] meso has joined the channel
[03:56] JakeyChan has joined the channel
[03:56] kinane has joined the channel
[03:57] kinane: howdy. i'm recursively reading a bunch of files, slurping them, and storing raw data in mongodb. it all seems to work fine, but node hangs instead of exiting. is there something obvious i'm missing?
[04:00] dominictarr: kinane: probably, you need to close your connection to mongo.
[04:01] kinane: dominictarr: yeah, i figured that--i feel like in the past i've left that off but now that i think about it those were hack jobs that i just killed after some amount of time
[04:01] dominictarr: node will stay running if there it is expecting events to occur. if a connection to something is open then it is.
[04:01] RORgasm has joined the channel
[04:02] RORgasm: hey guys
[04:02] RORgasm: anyone using mongoose
[04:02] kinane: k. cool. so i just need to determine when to do a client.close()
[04:02] RORgasm: how one would deal with a mongo Time key in mongoose
[04:02] kinane: dominictarr: i started by opening and closing on every doc i was going to insert...it crashed immediately
[04:02] RORgasm: mongoose form what i can see only has Date, which i don't think contains time infor
[04:02] dguttman has joined the channel
[04:02] kinane: so i switched to sharing a client object, now i'm not sure when to close
[04:02] dominictarr: don't do that.
[04:02] kinane: so i'll go stare at that.
[04:03] dominictarr: what are you using to traverse the files?
[04:03] kinane: a recursive walk in an eventemitter
[04:03] kinane: emits for file, dir
[04:03] MUILTFN has joined the channel
[04:04] kinane: the file event handler reads the file and then emits on lines, which get parsed and inserted into mongo
[04:04] dominictarr: var opened = 0, closed = 0
[04:04] kinane: yeah. cool.
[04:04] dominictarr: then on every open, open ++
[04:04] dominictarr: on every close, close ++
[04:04] kmiyashiro has joined the channel
[04:04] dominictarr: & check if open == close, then close the connection
[04:06] kinane: dominictarr: oh awesome. thanks. in the past i've done similar but used an interval to check....which is silly
[04:06] RORgasm: anyone using Mongoose?
[04:07] kinane: RORgasm: sorry, I'm not. I tried it last summer but preferred mongodb-native
[04:07] dominictarr: actually, i'm working on a new approch for things like this.
[04:07] kinane: dominictarr: ah? yeah? it seems like a pattern that comes up a lot
[04:07] dominictarr: pipe streams of events
[04:08] airportyh has joined the channel
[04:08] RORgasm: hmm
[04:08] dominictarr: hang on a second, i'll push it to git hub.
[04:09] kinane: dominictarr: awesome, i would love to take a look
[04:13] drudge_fn has joined the channel
[04:15] boaz has joined the channel
[04:16] dominictarr: kinane: check this out https://github.com/dominictarr/event-stream
[04:16] dominictarr: I just started this yesterday,
[04:18] dominictarr: but basically you want a hand full of streams, one which recurisvely ls the fs
[04:18] dominictarr: then pipe that into one that reads the files
[04:18] dominictarr: then pipe that into one that saves them.
[04:19] dominictarr: with an abstraction that can take care of when the stream ends etc
[04:20] kinane: dominictarr: whoa.
[04:20] kinane: i like it a lot.
[04:20] hlindset has joined the channel
[04:20] gazumps has joined the channel
[04:20] dominictarr: so far the code I linked just takes a single async map function and turns it into a stream
[04:21] SubStack: dominictarr: a bit like node-lazy
[04:23] kinane: dominictarr: how would that abstraction work? timeouts?
[04:24] ryanfitz has joined the channel
[04:25] dominictarr: no it just keeps track of the callbacks.
[04:25] dominictarr: it holds off on emitting an end until all maps are finished.
[04:26] skm has joined the channel
[04:26] kinane: cool.
[04:27] JumpMast3r has joined the channel
[04:28] hij1nx has joined the channel
[04:29] dominictarr: I got a test here: https://github.com/dominictarr/event-stream_tests/blob/master/simple-map.asynct.js
[04:30] escii has joined the channel
[04:30] SubStack: dominictarr: for node-lazy emitting a pipe event was pretty useful to keep all of that in sync
[04:30] SubStack: just like how the shell manages buffering between pipes
[04:30] SubStack: with SIGPIPE
[04:30] chrislorenz has joined the channel
[04:32] dominictarr: yes, exactly.
[04:32] dominictarr: it's an old idea. all that I have done is realized that it's a good one.
[04:33] dominictarr: the only thing it a needs a bit of a convention.
[04:33] butu5 has joined the channel
[04:33] dominictarr: but thats there already in the streams in node core.
[04:34] drudge_fn has joined the channel
[04:34] dominictarr: write, end, on('data', on('end', on('drain', pause, resume
[04:36] bentkus has joined the channel
[04:37] kinane: dominictarr: i'm keeping a file count and lines count. together looks like i'm closing at the right time. thanks for the tip.
[04:38] mcluskyd_ has joined the channel
[04:38] drudge_fn has joined the channel
[04:39] SubStack: a stream position integer would be nice too
[04:41] seivan has joined the channel
[04:45] sebastianedwards has joined the channel
[04:45] kinane: night folks. thanks dominictarr.
[04:50] achiu has joined the channel
[04:57] jTNT has joined the channel
[04:58] langworthy has joined the channel
[04:59] Remoun has joined the channel
[04:59] pizthewiz has joined the channel
[05:00] htoothrot has joined the channel
[05:01] aoberoi has joined the channel
[05:03] aoberoi: can someone point me to a good tutorial or example of integrating facebook for user login?
[05:03] plutoniix has joined the channel
[05:04] aoberoi: i've never done any persistance in a node app, so im struggling with what the flow is
[05:04] aoberoi: and what i need to store and how
[05:07] teadict: I wonder if noding this web app I'm into for this client will bring troubles of productivity
[05:09] SubStack: teadict: unfamiliar new environments are going to incur a productivity hit
[05:13] jacobolus has joined the channel
[05:14] teadict: SubStack: fairpooint. I'd like to know where it'd hit
[05:14] teadict: someone named database persistance,now I'm worried
[05:14] chrislorenz has joined the channel
[05:16] mikeal has joined the channel
[05:16] miles339 has joined the channel
[05:17] rfay has joined the channel
[05:20] statico: aoberoi: your best bet is to read the developer docs. in short, once authenticated, facebook sets a fbs_* cookie when is sent to your server, and you can parse the cookie to extract the Graph API session key and whatnot.
[05:21] Remoun has joined the channel
[05:22] aoberoi: statico: thanks. i guess im really stuck on setting up a store for the signed up users. i havent been able to find an example of user management in node
[05:22] bicranial has joined the channel
[05:23] Spion_ has joined the channel
[05:23] apanda has joined the channel
[05:27] statico: aoberoi: whatever datastore you're using, you can key the user information based off of the user id passed back from the FB authentication. in our django app we name users as fb_NNN, where NNN is the FB user id. once the user has been authenticated, stick the user id in your session object, assuming you're using one.
[05:29] rurufufuss_ has joined the channel
[05:29] statico: aoberoi: but if you're asking about how to set up a user table, key off the username, which can be a function of the FB UID.
[05:29] statico: aoberoi: hope that helps. sleeping now.
[05:29] aoberoi: statico: thanks so much. i see the direction now, hopefully thats enough to keep going
[05:32] fangel has joined the channel
[05:32] akshatj has joined the channel
[05:36] ryanRT has joined the channel
[05:38] jonaslund_ has joined the channel
[05:45] loob2 has joined the channel
[05:51] openpercept has joined the channel
[05:51] boehm has joined the channel
[05:55] zentropa24 has joined the channel
[05:58] MUILTFN has joined the channel
[05:59] xAt has joined the channel
[05:59] willwhite has joined the channel
[06:00] some1else has joined the channel
[06:01] Ginlock has joined the channel
[06:01] sivy has joined the channel
[06:03] Swizec has joined the channel
[06:04] unlink has joined the channel
[06:05] Gaunt has joined the channel
[06:06] mrtrosen has joined the channel
[06:07] drudge_fn has joined the channel
[06:07] amerine has joined the channel
[06:08] micro has joined the channel
[06:10] couchquid_ has joined the channel
[06:10] EndangeredMassa has joined the channel
[06:15] EndangeredMassa has joined the channel
[06:16] zomgbie has joined the channel
[06:19] jetienne has joined the channel
[06:19] mcluskydodallas has joined the channel
[06:24] alex` has joined the channel
[06:24] pr2012 has joined the channel
[06:26] louissmit has joined the channel
[06:26] simenbrekken has joined the channel
[06:33] skm has joined the channel
[06:34] chrislorenz has joined the channel
[06:38] jacobolus has joined the channel
[06:43] aoberoi: can anyone help me understand how to control flow in my app with async callbacks when using redis data store?
[06:45] dominictarr has joined the channel
[06:45] robotarmy has joined the channel
[06:46] bergie has joined the channel
[06:49] k1ttty has joined the channel
[06:49] k1ttty has joined the channel
[06:49] sveisvei has joined the channel
[06:54] saikat has joined the channel
[07:01] megalomix has joined the channel
[07:01] megalomix: hi
[07:04] luke`_ has joined the channel
[07:05] mcluskyd_ has joined the channel
[07:05] paulwe has joined the channel
[07:09] e6nian has joined the channel
[07:12] Bogh has joined the channel
[07:12] e6nian has joined the channel
[07:16] RORgasm has joined the channel
[07:16] RORgasm: hey guys
[07:16] RORgasm: anyone using Mongoose
[07:17] RORgasm: think i'm loosing my minds where i can't even query a method
[07:17] RORgasm: i'll paste a pastie in a second
[07:17] pen has joined the channel
[07:22] RORgasm: can anyone help me out with mongoose
[07:22] RORgasm: https://gist.github.com/1160285#comments
[07:22] RORgasm: can't get it to retrieve any records
[07:26] olegp has joined the channel
[07:26] olegp has joined the channel
[07:27] kmiyashiro has joined the channel
[07:28] KellyM has joined the channel
[07:29] cloud-akshat has joined the channel
[07:29] robotmay has joined the channel
[07:31] [[zz]] has joined the channel
[07:31] amerine has joined the channel
[07:32] hekkwan has joined the channel
[07:34] digitalsabre has joined the channel
[07:35] skm has joined the channel
[07:35] jamesp has joined the channel
[07:39] seivan has joined the channel
[07:41] fly-away has joined the channel
[07:46] zeade has joined the channel
[07:46] rfay has joined the channel
[07:48] rgl has joined the channel
[07:49] copongcopong has joined the channel
[07:54] k1ttty has joined the channel
[07:54] cloud-akshat has joined the channel
[07:56] guidocalvano has joined the channel
[08:00] jamesp has joined the channel
[08:00] ttpva has joined the channel
[08:02] xastey` has joined the channel
[08:03] cloud-akshat has joined the channel
[08:03] openpercept1 has joined the channel
[08:04] openpercept_ has joined the channel
[08:04] aoberoi has joined the channel
[08:05] kenperkins has joined the channel
[08:05] mraleph has joined the channel
[08:16] kepheus has joined the channel
[08:16] phluffy has joined the channel
[08:21] felixhummel has joined the channel
[08:24] ian-london has joined the channel
[08:26] langworthy has joined the channel
[08:27] pickels has joined the channel
[08:27] fairwinds has joined the channel
[08:28] stisti has joined the channel
[08:29] versicolor has joined the channel
[08:31] whitman has joined the channel
[08:32] sechrist_ has joined the channel
[08:35] m00p has joined the channel
[08:35] copongcopong has joined the channel
[08:39] smtlaissezfaire has joined the channel
[08:43] pdelgallego has joined the channel
[08:44] boehm has joined the channel
[08:46] SubStack: going through crockford's json.js and I do not like this style at all
[08:47] reid has joined the channel
[08:47] SubStack: this stuff is way too verbose for its own good
[08:47] SubStack: and the hoisting is super annoying >_<
[08:48] aoberoi_ has joined the channel
[08:49] DennisRasmussen has joined the channel
[08:50] japj has joined the channel
[08:52] jamescarr: SubStack, yeah, I too was never a real fan of his style
[08:55] louissmit has joined the channel
[08:59] chjj: his style of comments is odd
[08:59] chjj: theyre like, in your face
[09:01] sechrist has joined the channel
[09:02] sechrist has joined the channel
[09:03] sechrist has joined the channel
[09:05] lmorchard has joined the channel
[09:07] sechrist has joined the channel
[09:08] jhbot has joined the channel
[09:08] TheJH has joined the channel
[09:08] TheJH has joined the channel
[09:09] jetienne: hi
[09:10] markwubben has joined the channel
[09:12] tilgovi has joined the channel
[09:12] tilgovi has joined the channel
[09:12] KingJamool has joined the channel
[09:14] jetienne: aoberoi_: use a library which handle it for you. it makes your code more readable
[09:16] TheJH: "someone please make a github issue irc bot"? DrMcKay did that, right?
[09:17] japj: thought so, and the topic was changed to something else by ryan earlier, but now it is back to this again
[09:20] skm has joined the channel
[09:21] TheJH: :D
[09:22] SubStack: so that's what this place is for
[09:22] mcluskydodallas has joined the channel
[09:26] yawNO has joined the channel
[09:27] yawNO: hi, is there a way to share embedded documents between models in mongoose?
[09:27] skm has joined the channel
[09:31] DrMcKay has joined the channel
[09:33] SubStack: what the fuck this code has a switch in it, I thought crockford hated those
[09:33] zomgbie has joined the channel
[09:33] SubStack: this is also really difficult to read with every comment flush with the left margin
[09:34] SubStack: these comments don't help at all
[09:39] stephank has joined the channel
[09:40] achiu has joined the channel
[09:41] blup has joined the channel
[09:42] achiu has joined the channel
[09:45] mendel_ has joined the channel
[09:46] dominictarr has joined the channel
[09:48] sveisvei_ has joined the channel
[09:52] Fabryz has joined the channel
[09:52] cjroebuck has joined the channel
[09:55] FireFly has joined the channel
[09:56] MadSweeney has joined the channel
[09:57] cjroebuck has joined the channel
[09:58] franck34: do you know the equivalent of apache mod_expires in node ?
[09:58] franck34: seem's connect only support cache (using etag/modified since ..)
[10:01] N0va` has joined the channel
[10:05] MadSweeney has left the channel
[10:09] SubStack: franck34: couldn't you just send the headers yourself?
[10:09] chjj: franck34: you can do it yourself, its a single header (or 2 if you want to do both http1.0 and http1.1)
[10:10] SubStack: yeps you could even just have a middleware that injects a res.setHeader() before the static plugin fires
[10:11] blup: just out of curiosity i'm trying to understand 'fabjs'...
[10:12] blup: anyone know of good docs for it? i'
[10:12] blup: damn enter.. anyone know any good docs, i'm having trouble getting the way it works with the chained functions.
[10:13] socketio\test\15 has joined the channel
[10:13] mcluskydodallas has joined the channel
[10:15] chjj: im curious about fabjs, do people use it in production? ive always thought it was interesting, just never got into it
[10:16] sechrist has joined the channel
[10:16] Ineentho has joined the channel
[10:16] blup: i dont plan on using it in prod.. just trying to stretch my understanding of js
[10:17] Fabryz has joined the channel
[10:17] blup: ...but i think i need a manual before, lol
[10:17] rurufufuss has joined the channel
[10:17] sveisvei has joined the channel
[10:18] insin has joined the channel
[10:20] necrodearia has joined the channel
[10:20] Ineentho has left the channel
[10:23] Orion- has joined the channel
[10:23] Orion-: hello people
[10:23] SubStack: beep boop
[10:24] chjj: substack doesnt even try to hide the fact that he is a robot anymore
[10:24] SubStack: affirmative
[10:24] Orion-: I have a js question, although I know this channel is node.js questions oriented, I'm having difficulties getting an answer on #javascript channel
[10:24] guidocalvano has joined the channel
[10:25] Orion-: And besides my issue is within a code that runs on node.js
[10:25] chjj: orion-: youre in the right place, all the real js pro's hang out here ;)
[10:25] Orion-: chjj: great :)
[10:25] Orion-: shall I shoot ?
[10:25] __doc__ has joined the channel
[10:25] chjj: go for it
[10:25] SubStack: ACTION shoots firsyt
[10:25] SubStack: pew pew
[10:26] SubStack: FATALITY
[10:26] Orion-: I'm having a hard time understanding js var passing by value or by ref. see this example:
[10:26] Orion-: for(i=0;i<5;i++){(function(){console.log("i = %d", i);})();}
[10:26] Orion-: it outputs as expected 0, 1... etc
[10:26] chjj: right
[10:26] Orion-: But this example:
[10:26] Orion-: a=[]; for(i=0;i<5;i++){a.push(function(){console.log("i = %d", i);});}
[10:26] Orion-: a[1]()
[10:26] Orion-: i = 5
[10:26] SubStack: that is a question about scope not so much about refs
[10:26] chjj: because by the time you execute those functions `i` is 5
[10:26] Orion-: it seems to pass the ref of i to the function
[10:27] chjj: yeah, what substack said
[10:27] chjj: you need to wrap it
[10:27] SubStack: for loops are lame
[10:27] Orion-: teach me please
[10:27] chjj: for (var i = 0; i < 5; i++) (function(i) { ... })(i);
[10:27] Orion-: SubStack: just an example it's not a "reallife" example
[10:28] chjj: wrap it in a function like that, and you get to keep the value of `i` when the iteration took place
[10:28] blup: could any of you recommend docs on js patterns?
[10:28] Orion-: chjj: my point is I need to add functions in an array for later run
[10:28] chjj: right, and thats what you do
[10:28] chjj: wrap it in a function
[10:29] Ginlock has joined the channel
[10:29] chjj: most of the time its not a problem, because most people will use Array.prototype.forEach, or underscore's `each` function or something
[10:29] liquidproof has joined the channel
[10:29] chjj: which is already wrapped in a function essentially
[10:29] chjj: but a regular `for` doesnt get to keep its own scope
[10:30] Orion-: chjj: well it's plain js here since I don't use underscore for this part
[10:30] chjj: so you have to make one
[10:30] chjj: i realize that
[10:30] chjj: just do what i showed you, it will work
[10:30] sechrist has joined the channel
[10:30] Orion-: i'm trying to make a queue manager
[10:31] chjj: for(i=0;i<5;i++) (function(i) { a.push(function(){console.log("i = %d", i);}); })(i);
[10:31] SubStack: function times (n, cb) { for (var i = 0; i < n; i++) cb(i) }
[10:31] chjj: like that
[10:31] chjj: right, or you can make your own little foreach function
[10:31] SubStack: then you can just times(5, function (i) { a.push(function () { console.log('i = ' + i) }) })
[10:31] dob_ has joined the channel
[10:32] jetienne has joined the channel
[10:32] mikedeboer has joined the channel
[10:32] TheJH: ACTION is impatient and wants to know when DrMcKay has the node-eval-bot with buffers and so on ready
[10:32] ian-london has left the channel
[10:32] Orion-: wahoo that's a lot of encapsulated function()
[10:33] TheJH: Orion-, that's why coffee looks so good :D
[10:33] chjj: orion-: get used to it in js ;)
[10:33] chjj: thejh: good one
[10:33] Orion-: coffee script ?
[10:33] SubStack: .. Array(5+1).join('x').split('').map(function (x,i) { return function () { return '' }).reduce(function (acc, cb) { return acc.concat(cb()) }, [])
[10:33] SubStack: hey where's the robit
[10:33] catb0t: SyntaxError: Unexpected token )
[10:33] Orion-: chjj: yeah I figured i out yet :)
[10:33] chjj: nothing, it was a joke, pay no mind to coffeescript
[10:34] TheJH: !@Orion- coffee compile (do(i)->a.push ->console.log i) for i in [0...5]
[10:34] jhbot: Orion-, var i, _fn; _fn = function(i) { return a.push(function() { return console.log(i); }); }; for (i = 0; i < 5; i++) { _fn(i); }
[10:34] TheJH: Orion-, I like coffeescript :)
[10:34] SubStack: .. Array(5+1).join('x').split('').map(function (x,i) { return function () { return '' } }).reduce(function (acc, cb) { return acc.concat(cb()) }, [])
[10:34] catb0t: [ '<0>', '<1>', '<2>', '<3>', '<4>' ]
[10:34] insin: get 'im!
[10:34] SubStack: there we go
[10:34] Gaunt has joined the channel
[10:34] SubStack: wheeeeeee
[10:35] Orion-: TheJH: no offence but I don't :)
[10:35] TheJH: Orion-, :(
[10:35] SubStack: who needs intermediate state amirite?
[10:35] chjj: Orion-++
[10:35] v8bot_: chjj has given a beer to Orion-. Orion- now has 1 beers.
[10:35] Orion-: Hey :D
[10:35] Orion-: ACTION *cheers*
[10:37] Orion-: Should update v8bot with a pluralize() function :)
[10:37] TheJH: Orion-, what would it do?
[10:37] Orion-: 1 beer instead of 1 beerS
[10:38] TheJH: hmm...
[10:38] chjj: well
[10:38] chjj: i would certainly take 1 beers over 1 beer ;)
[10:38] Orion-: You'r thinking in packs (of beers i guess) :)
[10:40] agnat has joined the channel
[10:40] zastaph has joined the channel
[10:40] Orion-: node is amazing
[10:40] unlink has joined the channel
[10:41] TheJH: !admin eval irc.on('privmsg',function(args){if (~args.params[1].indexOf('now has 1 beers.'))irc.privmsg(args.params[0], 'that should be 1 beer, not beers. your grammar is bad.')})
[10:41] jhbot: [object Object]
[10:41] rgl has joined the channel
[10:41] TheJH: Orion- now has 1 beers.
[10:41] jhbot: that should be 1 beer, not beers. your grammar is bad.
[10:41] TheJH: :)
[10:41] Orion-: Excellent :D
[10:41] TheJH: eval() FTW!
[10:42] Orion-: Is there any other way than var a = require("./somefile.js") to get into the console and start playing with a js file while editing it in an other terminal window ?
[10:43] franck34: SubStack: chjj: yeah i just patched connect localy to test (compute and add Expires header). But because i'm a noob, i don't know how to do that in a clean way, just by using "connect", not patching it. Possible ?
[10:43] SubStack: hmmm I want to map [0,1] onto the reals
[10:43] SubStack: I bet there's a trig function that does that
[10:43] TheJH: Orion-, there was a thread on the mailing list about using the REPL in a related way
[10:43] Orion-: oh
[10:43] matti has joined the channel
[10:43] SubStack: then I can bias towards the origin by squaring or square root or whichever
[10:44] bergie has joined the channel
[10:44] TheJH: Orion-, http://groups.google.com/group/nodejs/msg/ba13aa76923da823
[10:45] nigelb has joined the channel
[10:46] Orion-: TheJH: great thanks!
[10:47] DrMcKay: did someone mention beer?
[10:47] TheJH: DrMcKay, when is your bot ready? :D
[10:48] DrMcKay: TheJH: Monday probably, I have to finish something in my job today
[10:48] DrMcKay: ACTION keeps thinking of running it in a VM
[10:48] franck34: how can i add a simple header for static item in a connect router ? possible ?
[10:48] SubStack: this will do:
[10:48] SubStack: .. var fn = function (n) { return Math.floor(100 / (1 - n) - 100) }; var xs = []; for (var i = 0; i < 1; i += 0.01) xs.push(fn(i)); xs
[10:48] catb0t: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 16, 17, 19, 20, 21, 23, 25, 26, 28, 29, 31, 33, 35, 36, 38, 40, 42, 44, 47, 49, 51, 53, 56, 58, 61, 63, 66, 69, 72, 75, 78, 81, 85, 88, 92, 96, 100, 104 ...
[10:48] nigelb: Hi, I'm trying to run statsd, when I run "node stats.js config.js", I get this error, http://dpaste.com/599528/, can someone help me debug?
[10:48] jhbot has joined the channel
[10:49] Orion-: What's the best way to interract with an SQL server from nodejs ? restful interface ? custom drivers ?
[10:49] DrMcKay: I wonder if my bot is still working, it was behaving really weirdly yesterday
[10:49] mraleph: SubStack: tg ((x - 0.5) * \pi)
[10:49] DrMcKay: !ping
[10:49] dmkbot: DrMcKay, pong
[10:49] DrMcKay: Orion-: ORM
[10:49] TheJH: nigelb, could you gist the config.js file?
[10:49] SubStack: mraleph: what is tg?
[10:49] mraleph: tan
[10:49] tg: ACTION
[10:49] nigelb: TheJH: its in the paste as well
[10:49] SubStack: haha
[10:50] TheJH: nigelb, oh, sorry
[10:50] mraleph: in russia it's tg
[10:51] Orion-: DrMcKay: but how would the binding be made ?
[10:51] TheJH: nigelb, does "node config.js" fail?
[10:51] DrMcKay: ACTION is trying to come up with some "In Soviet Russia tg..."
[10:51] nigelb: TheJH: yeah
[10:51] DrMcKay: Orion-: have you tried Mongoose? many ORMs are like it
[10:51] TheJH: nigelb, could you try putting the keys in double quotes?
[10:52] japj: ACTION is stress testing his Synology 211j hardware by compiling node on it
[10:52] Orion-: DrMcKay: I don't know mongoose. I'm having to interract with a mysql server for instance
[10:52] DrMcKay: Orion-: many ORMs do it like: table = Table(Column('name', String), Column('id', Integer)); bind(table, Class) or something similar
[10:53] nigelb: TheJH: hmm, same error. let me try quoting the numbers as well
[10:53] TheJH: nigelb, ah, wait, I know
[10:53] TheJH: nigelb, even "{}" would fail
[10:53] TheJH: nigelb, but "({})" will work
[10:53] nigelb: ah!
[10:54] DrMcKay: Orion-: I used to like node-orm
[10:54] Orion-: DrMcKay: I'm mostly interested on how to connect to a remote dbms either through a restful interface or through a custom drive
[10:54] Orion-: driver
[10:54] TheJH: nigelb, also, you either need "module.exports=" or you have to use JSON.parse and fs.readFileSync
[10:55] DrMcKay: Orion-: RESTful interface? CouchDB is good at it
[10:55] nigelb: TheJH: err, I just installed node. Very new to this.
[10:55] DrMcKay: Orion-: http://wiki.apache.org/couchdb/HTTP_Document_API
[10:55] Orion-: DrMcKay: but what's the prefered way in nodejs philosophy ?
[10:56] Orion-: (in order to get more support)
[10:56] DrMcKay: Orion-: well, I don't think there's such philosophy yet. I'm writing my blog engine on MongoDB
[10:56] TheJH: nigelb, ah, ok. I'd suggest just putting valid JSON in your config file and then loading it with JSON.parse(fs.readFileSync(__dirname+"/config.js"))
[10:56] DrMcKay: Orion-: but if you want to use SQL, that's cool as well
[10:57] Orion-: Are there any examples of MySQL / nodejs integration ?
[10:57] nigelb: TheJH: oh, ok. let me try :)
[10:57] DrMcKay: Orion-: http://nodejsdb.org/ for example
[10:57] nigelb: TheJH: btw, the application I'm trying to run still fails, with a new failure ;)
[10:58] Orion-: DrMcKay: thanks !
[10:58] DrMcKay: Orion-: :)
[10:59] TheJH: by the way, my bot is on github now: https://github.com/thejh/nodebot
[10:59] DrMcKay: japj: you're compiling node on a NAS?
[10:59] DrMcKay: TheJH: awesome :)
[10:59] japj: DrMcKay: yes
[10:59] DrMcKay: ACTION goes to search security holes
[10:59] TheJH: :D
[10:59] DrMcKay: japj: this thing is running on Linux, right?
[10:59] Orion-: I'll dive again soon into mongodb since I think they added multiple $or and $and support in the engine recently :)
[11:00] japj: DrMcKay: it's an arm device and yes it is running linux
[11:00] japj: DrMcKay: so far it is painfully slow at compiling though, but I don't mind ;)
[11:01] DrMcKay: japj: well, my file server is x86_64 and it's also painfully slow, I know that feeling
[11:01] k1ttty has joined the channel
[11:01] mendel_ has joined the channel
[11:02] nigelb: hm, new error! http://dpaste.com/599532/
[11:02] jhbot has joined the channel
[11:02] [[zz]] has joined the channel
[11:03] DrMcKay: TheJH: is this stackoverflow thing freestanding?
[11:04] DrMcKay: nah, I guess no
[11:04] TheJH: DrMcKay, you can use it if you give it a sendLine method
[11:05] DrMcKay: TheJH: I was thinking about running it here until you get some sane hosting available
[11:05] Orion-: If nodejs is so performant because of it's enqueuing at responding to lots of requests, is there no http fully fledged server written in nodes to replace say apache or nginx yet ?
[11:05] DrMcKay: Orion-: for serving static files?
[11:05] Orion-: DrMcKay: and dynamic also
[11:06] chjj: i dont understand the question
[11:06] DrMcKay: Orion-: you mean... php?
[11:06] topaxi has joined the channel
[11:06] Orion-: DrMcKay: could be one yes
[11:06] DrMcKay: Orion-: oh. that would be sad...
[11:06] DrMcKay: Orion-: main downside of PHP is it's interpreter, which is painfully slow
[11:07] DrMcKay: Orion-: I doubt anyone can do anything about that
[11:07] Orion-: chjj: I don't know if there is something like a apache or nginx replacement written in nodejs
[11:07] fwg: why would you?
[11:07] Orion-: DrMcKay: javascript is also interpreted if IRC
[11:07] DrMcKay: Orion-: yes, of course
[11:07] fwg: that would be a lot of development time to reach the features
[11:07] DrMcKay: Orion-: but compare architecture of PHP and v8
[11:08] fdenbow has joined the channel
[11:08] TheJH: DrMcKay, sure, you can do that :)
[11:08] Orion-: fwg: yes I get your point
[11:08] DrMcKay: v8 compiles it code, while PHP is full of Zend-shit
[11:08] TheJH: there is a nodejs server that can run php scripts...
[11:08] DrMcKay: TheJH: OK, I will try to later :)
[11:08] Orion-: Hey I was in "dumb question mode" ! :D
[11:09] DrMcKay: Orion-: :D
[11:10] Orion-: Personaly I am not a fan of PHP but rather ruby
[11:10] cjroebuck has joined the channel
[11:10] langworthy has joined the channel
[11:11] Orion-: Js is hard to start with but I'm liking it more every day
[11:11] [[zz]] has joined the channel
[11:12] DrMcKay: Orion-: well, I've started 4 days ago, IIRC ;)
[11:12] DrMcKay: Orion-: and now I love it :D
[11:12] Orion-: hehe
[11:13] Orion-: 4 days is a lot to recall :)
[11:13] DrMcKay: too bad there are not many companies looking for node.js devs
[11:13] Orion-: There will be
[11:14] Orion-: I saw many jobs offers on the nodejs site
[11:14] DrMcKay: Orion-: oh, I lied to you, I've started on August 14
[11:14] DrMcKay: day of my first patch for node.js :D
[11:14] Orion-: huh :D that's changing my vision of the whole world you know ;)
[11:15] DrMcKay: well, not really a patch, just a test
[11:15] DrMcKay: Orion-: :D
[11:15] Orion-: I started node js yesterday
[11:15] Orion-: a whole bunch of hours ago ;)
[11:16] DrMcKay: Orion-: this weird time thing goes so fast, doesn't it?
[11:17] TheJH: DrMcKay, before you try it, be warned that the native dependency thing seems to only work on node 0.4.x (at least that's what I think, not sure)
[11:18] DrMcKay: TheJH: oh. I will try with 0.5 or use nvm
[11:18] TheJH: DrMcKay, ok
[11:18] DrMcKay: TheJH: or compile from source, like a real man
[11:18] TheJH: :D
[11:18] DrMcKay: I think I will iterate through all tags in node and compile all of them
[11:18] Metal3d has joined the channel
[11:19] DrMcKay: btw, fun fact, I was checking out first versions of Python source
[11:19] TheJH: DrMcKay, and do the SConscript patch for each 0.5.x version of node?
[11:19] franck34: help ! http://pastebin.com/4RpUtMBp
[11:20] DrMcKay: Guido is a snicky bastard, he started from writing in Python without having an interpreter yet
[11:20] TheJH: DrMcKay, :D
[11:20] DrMcKay: TheJH: build on Fedora fails for all versions of 0.5?
[11:21] zpao_ has joined the channel
[11:21] TheJH: DrMcKay, when you checkout e.g. 0.5.3 or so and try to build it, it will fail because the v8 guys decided it would be a good idea to treat unused variables as errors
[11:21] DrMcKay: TheJH: oh, yes, I know, but I thought it's just one version
[11:21] TheJH: DrMcKay, oh, really?
[11:22] DrMcKay: TheJH: I just s/'-Werror',//g
[11:22] TheJH: right
[11:22] Orion- has joined the channel
[11:23] Orion-: sorry my wifi di break
[11:23] Orion-: did
[11:24] Orion-: Orion-: I started node js yesterday
[11:24] Orion-: [13:15] Orion-: a whole bunch of hours ago ;)
[11:24] Orion-: [13:17] Orion-: And please don't flame me for my english ... I'm french after all :)
[11:24] Orion-: [13:18] Orion-: DrMcKay: why did you choose to write a blog on nodejs ? Is it an exercise ?
[11:24] Orion-: [13:19] Orion-: I mean "with nodejs"
[11:24] gkmngrgn has joined the channel
[11:24] DrMcKay: Orion-: I didn't get that part
[11:24] DrMcKay: Orion-: yes, it's an exercise
[11:24] franck34: help ! http://pastebin.com/4RpUtMBp any idea ?
[11:25] DrMcKay: I tend to start with every language by building something useful
[11:25] Orion-: DrMcKay: that's good practice
[11:25] DrMcKay: Orion-: **way** better than reading books
[11:25] TheJH: franck34, there's a room for that, #connect or #express or so, I think
[11:25] DrMcKay: I mean, you google when you have a problem
[11:26] Orion-: DrMcKay: both are useful but practice is very important
[11:26] DrMcKay: you see the solution and see other pieces of code
[11:26] DrMcKay: and, of course, you gain practice :)
[11:27] Orion-: I try to figure out how to plug nodes in an already existing site to have a chatting service
[11:27] junkee[] has joined the channel
[11:27] DrMcKay: Orion-: your english is fine :).
[11:28] Orion-: DrMcKay: that's because I'm not drunk :D
[11:28] DrMcKay: :D
[11:28] prettyrobots has joined the channel
[11:28] DrMcKay: you mean, every site would have a chatroom?
[11:28] DrMcKay: also, I wonder if my english is good enough
[11:29] DrMcKay: any opinions?
[11:29] TheJH: DrMcKay, on the quality of your english?
[11:29] DrMcKay: TheJH: yes :)
[11:30] seivan has joined the channel
[11:30] TheJH: DrMcKay, I'm from germany, so not a native speaker, but I think it's good :D
[11:30] Orion-: DrMcKay: well no, I work with someone to make a chat service but he already made the service as a http service without any js around, I'm trying to add the js magic and wonder if it would be hard to integrate nodejs in the field to get rid of polling for new messages
[11:31] Orion-: DrMcKay: what's your mother language ?
[11:31] DrMcKay: TheJH: oh, thanks. I just always keep wondering...
[11:31] DrMcKay: Orion-: polish
[11:31] Orion-: dobre :)
[11:31] DrMcKay: :D
[11:31] DrMcKay: Orion-: where do you know it from :D ?
[11:32] Orion-: dzien dobre then :)
[11:32] TheJH: Orion-, you're from monacco?
[11:32] Orion-: Yep indeed
[11:32] TheJH: *monaco
[11:32] DrMcKay: dzień dobry, with diactrics
[11:32] chjj: you guys all fooled me, i figured you were all native anglo's
[11:32] franck34: TheJH: thx. Google was my friend, just a little bit long ..
[11:32] Orion-: DrMcKay: I'm all un-diatrics on my keybord
[11:33] DrMcKay: chjj: we would be busy with rioting, then
[11:33] TheJH: :D
[11:33] Orion-: chjj: you're so kind :D
[11:33] Orion-: DrMcKay: my wife is Polish
[11:33] DrMcKay: Orion-: oh, wow :)
[11:33] Orion-: Ziem canapki :D
[11:34] DrMcKay: Orion-: use websockets for this chat
[11:34] chjj: drmckay: i just meant native english speakers of any kind really
[11:35] DrMcKay: chjj: come on, it can't be that good
[11:35] Orion-: DrMcKay: it there an example out there easy to integrate ... my concern is not to include too many js in the html markup .. it's for mobile platforms
[11:36] DrMcKay: Orion-: well, I'm not sure about level of support for websockets on mobile
[11:36] Orion-: Polish people do speak very good english compared to latins
[11:36] DrMcKay: Orion-: but I think Android supports them
[11:36] JakeyChan has joined the channel
[11:36] DrMcKay: Orion-: well, Japanese or Chinese are the worst, I think
[11:36] DrMcKay: no offense, of course
[11:37] Orion-: DrMcKay: for the accent mostly
[11:37] Orion-: Indian people speaking english is also very hard for me to understand
[11:38] DrMcKay: Orion-: yes, I think it's about accent. my father works at polish part of France Telecom and he does teleconferences with asians sometimes
[11:38] Orion-: (no offense again)
[11:38] DrMcKay: Orion-: they actually decided to hire a translator, despite they know english very well
[11:39] DrMcKay: Orion-: in movies they're doing just fine :D
[11:39] Orion-: Well In Karate movies they fight mostly :D
[11:39] TheJH: what do you guys zhink about germans speaking english? terribilh accent? :D
[11:40] Orion-: Not that bad to my experience
[11:40] DrMcKay: TheJH: what Orion- said
[11:40] Orion-: Better than me I would say
[11:40] TheJH: I don't mean written, I mean the voice part (if you ever heard a german speak english)
[11:41] hij1nx has joined the channel
[11:41] DrMcKay: TheJH: I did, it wasn't bad at all :)
[11:41] TheJH: oh, didn't expect that :D
[11:41] Orion-: I have a great friend who's German and he speaks very well
[11:43] Orion-: Now I will not ask you what you think of the french accent because I already know the answer :D
[11:43] DrMcKay: :D
[11:43] Sazpaimon_ has joined the channel
[11:44] DrMcKay: Orion-: bigger problem is that some French just actively refuse to speak english
[11:44] DrMcKay: (even if they know it)
[11:45] Orion-: DrMcKay: They don't refuse ... They don't know ... french are self centered people (language-wise)
[11:45] DrMcKay: Orion-: it's only what I heard from my friend
[11:46] Orion-: But I must say that it's all changing ... slowly but changing
[11:46] DrMcKay: Orion-: globalization ;)
[11:47] Orion-: Hey I'm listening to Chopin's "la polonaise"
[11:47] DrMcKay: Orion-: :D
[11:47] DrMcKay: Orion-: haven't you heard that before?
[11:47] Orion-: Where are you from in poland ?
[11:47] DrMcKay: Orion-: Poznań
[11:47] Orion-: Of course I have heard it many times
[11:47] Orion-: It's north right ?
[11:48] DrMcKay: Orion-: not really
[11:48] Orion-: oh
[11:48] DrMcKay: Orion-: http://maps.google.pl/maps?q=pozna%C5%84+polska&ie=UTF8&gl=pl&t=h&z=10&vpsrc=0
[11:48] Orion-: Yeah it's north from Krakow
[11:48] Orion-: :D
[11:49] DrMcKay: Orion-: :D
[11:49] Orion-: My wife is from krakow
[11:49] DrMcKay: and south from North Pole, soo... ;)
[11:49] DrMcKay: Orion-: have you visited Krakow already?
[11:49] DrMcKay: Orion-: it's a nice city
[11:50] Orion-: It's nearer to gdansk than to zakopane
[11:50] DrMcKay: (Poznań is better, of course :D )
[11:51] topaxi has joined the channel
[11:53] Orion-: DrMcKay: I have not yet visited Krakow
[11:55] langworthy has joined the channel
[11:55] DrMcKay: Orion-: you should :). I think I've heard about some JS conference going on in Poland, that may be a good opportunity
[11:56] Orion-: Why not :)
[11:56] misterm has joined the channel
[11:56] DrMcKay: no, it was in May
[11:56] Orion-: But If it's polish-spoken conferences I'm going to be lost
[11:56] TheJH: hmm... what would you think about such a macro language? https://gist.github.com/8f6ed1fe4b371ce993f8
[11:57] DrMcKay: Orion-: no, I don't think we actually have polish-spoken conferences
[11:57] hellp has joined the channel
[11:57] DrMcKay: TheJH: cpp for JS?
[11:58] DrMcKay: TheJH: I like this mapreduce
[11:59] Orion-: DrMcKay and all other with who I spoke, see you later, gotta eat something. Was a pleasure to talk to you all. Bye
[11:59] DrMcKay: Orion-: my pleasure :). bye :)
[11:59] TheJH: DrMcKay, the basic idea tis that you have simple templates (just replace) and complex templates (execute JS that does the replacing)
[11:59] TheJH: *idea is
[12:00] i42n has joined the channel
[12:00] TheJH: and if you parse from end to start, it should even work with nesting :)
[12:00] temp01 has joined the channel
[12:00] DrMcKay: TheJH: oh, ok. this looks more like some functional language
[12:01] TheJH: and functional is cool :)
[12:01] TheJH: it doesn't have to be crazy like erlang, but basically, I like functional stuff :)
[12:02] DrMcKay: TheJH: me too, single map can reduce code from 8 to 1 line
[12:02] DrMcKay: btw, fun fact. Python does optimizations on map reduce and makes them run faster than some loops
[12:02] TheJH: whoah, cool :D
[12:03] DrMcKay: an funnier fact, PyPy evaluates them naivly :<
[12:03] DrMcKay: s/an/and/
[12:04] DrMcKay: btw, is there some multithreading library for node.js?
[12:04] TheJH: DrMcKay, threading?
[12:04] TheJH: DrMcKay, I think you want fibers
[12:04] TheJH: !npm search fiber
[12:04] jhbot: package fiberize: Node API wrapper for use with fibers.
[12:04] jhbot: package fibers-promise: Simple promises for use with fibers.
[12:04] jhbot: package sync: Library that makes simple to run asynchronous functions in synchronous manner, using node-fibers.
[12:05] jhbot: package butler: NodeJS Butler
[12:05] jhbot: package fibers: Cooperative multi-tasking for Javascript; or, the closest thing to a thread you'll see in node
[12:05] SubStack: node is already threaded
[12:05] TheJH: SubStack, but the js isn't multithreaded
[12:05] SubStack: use web workers if you want to crunch some numbers
[12:05] SubStack: or spin off another process
[12:05] DrMcKay: SubStack: I want to define my thread functions myself
[12:05] TheJH: (yes, I don't like fibers, but he asked for it)
[12:05] SubStack: DrMcKay: node is probably not a good environment then
[12:06] Charuru has joined the channel
[12:06] TheJH: DrMcKay, do you want them for number crunching or for less async code?
[12:06] DrMcKay: SubStack: I know, I was just wondering
[12:06] SubStack: some of the other ssjs platforms are better if you care about threads
[12:07] DrMcKay: TheJH: maybe for some node.js bot code execution :D
[12:07] TheJH: DrMcKay, seperate process
[12:07] DrMcKay: TheJH: oh, of course
[12:08] DrMcKay: TheJH: no, but seriously, node won't even launch it directly
[12:08] ph^ has joined the channel
[12:08] DrMcKay: TheJH: I'm planning to write some supervisor in C
[12:08] vizzord has joined the channel
[12:08] DrMcKay: setrlimit ftw!
[12:08] TheJH: DrMcKay, just use selinux :D
[12:09] DrMcKay: TheJH: :D. it'll automagically make all the code safe :D
[12:09] TheJH: DrMcKay, I'd call "kill on evil action" pretty secure :D
[12:09] amigojapan has joined the channel
[12:10] DrMcKay: TheJH: I don't think any evil action regarding my OS will even be possible :D
[12:10] DrMcKay: and I'm too lazy to set up labels correctly
[12:11] DrMcKay: also, chroot and nobody should be enough
[12:11] mendel_ has joined the channel
[12:13] SamuraiJack has joined the channel
[12:13] DrMcKay: ACTION makes sure to console.log every executed line of code to reveal TheJH's secrets
[12:13] TheJH: :D
[12:14] TheJH: DrMcKay, are you also running the bot in an extra partition (maybe even a super-small ramdisk) to prevent disk space exhaustion?
[12:14] DrMcKay: TheJH: fs will be null
[12:14] TheJH: DrMcKay, oh, wait, you could just attact strace and grep its output for suspicious stuff, right?
[12:14] TheJH: *attach
[12:14] DrMcKay: TheJH: but good idea
[12:15] DrMcKay: TheJH: and generate zilionbytes of logs ;)
[12:15] DrMcKay: but yeah, tmpfs looks good
[12:16] DrMcKay: 256 MB should be enough for a chroot environment
[12:16] DrMcKay: oh!
[12:16] DrMcKay: I will sent SELinux labels to disable networking
[12:16] DrMcKay: *set
[12:18] DrMcKay: also, I wonder...
[12:18] DrMcKay: !up? pc01.lan
[12:18] dmkbot: DrMcKay, host may be down (error: ENOTFOUND, Domain name not found)
[12:18] bergie has joined the channel
[12:18] DrMcKay: um, what?!
[12:18] DrMcKay: dmkbot, come back here!
[12:18] DrMcKay: now!
[12:18] dmkbot has joined the channel
[12:18] DrMcKay: oh, there you arew
[12:18] DrMcKay: !up? pc02.lan
[12:18] dmkbot: DrMcKay, host may be down (error: EHOSTUNREACH, No route to host)
[12:18] DrMcKay: !up? pc03.lan
[12:18] dmkbot: DrMcKay, host may be down (error: EHOSTUNREACH, No route to host)
[12:19] DrMcKay: !up? pc04.lan
[12:19] dmkbot: DrMcKay, host may be down (error: ENOTFOUND, Domain name not found)
[12:19] DrMcKay: !up? pc05.lan
[12:19] dmkbot: DrMcKay, host may be down (error: EHOSTUNREACH, No route to host)
[12:19] DrMcKay: !up? pc06.lan
[12:19] dmkbot: DrMcKay, host may be down (error: ECONNREFUSED, Connection refused)
[12:19] DrMcKay: I guess I'm safe :)
[12:19] DrMcKay: but wait
[12:19] japj: !iup? localhost
[12:19] dmkbot: japj, host may be down (error: ECONNREFUSED, Connection refused)
[12:19] DrMcKay: what the hell was pc02.lan?
[12:20] japj: hmm... the regex might be slightly off
[12:20] DrMcKay: japj: it sends HTTP HEAD to host
[12:20] japj: !blblalaup? localhost
[12:20] dmkbot: japj, host may be down (error: ECONNREFUSED, Connection refused)
[12:20] japj: lol
[12:20] DrMcKay: what the hell?!
[12:20] japj: !upupupandaway? localhost
[12:20] DrMcKay: !anything? localhost
[12:21] japj: !somethingbeforeup? localhost
[12:21] dmkbot: japj, host may be down (error: ECONNREFUSED, Connection refused)
[12:21] DrMcKay: oh, silly me
[12:21] DrMcKay: exec
[12:21] DrMcKay: https://github.com/mmalecki/dmkbot/blob/master/lib/bot.js#L82 WILLFIXMAKESMELOOKSTUPID
[12:25] DrMcKay: btw, does anyone else think GH should have a "TODO" list?
[12:25] DrMcKay: I mean, dev sees a bug, but is too busy to fix it, he marks it as a TODO, so everybody else stands back
[12:26] SubStack: hey lookit, a json implementation that doesn't fuck with globals: http://github.com/substack/jsonify
[12:26] SubStack: fucking globals amirite?
[12:27] jonaslund: SubStack: well you know you can modify crockfords json to avoid the globals pretty easily
[12:27] TheJH: jonaslund, that's what he did
[12:27] jonaslund: ah right :)
[12:27] jetienne has joined the channel
[12:27] TheJH: "substack / jsonify" "forked from douglascrockford/JSON-js"
[12:27] guidocalvano has joined the channel
[12:28] SubStack: jonaslund: it wasn't especially easy actually
[12:28] SubStack: that code is a mess >_<
[12:28] TheJH: :D
[12:28] DrMcKay: oh, lol, such thing would be cool for node ko: http://pl.twitch.tv/realnotch
[12:28] SubStack: plus I wrote this to test it against the builtin JSON: https://github.com/substack/node-garbage
[12:29] TheJH: DrMcKay, is that live code editing? v8 actually supports it, I think
[12:29] kristsk has joined the channel
[12:30] DrMcKay: TheJH: no, Notch is recording his coding
[12:30] jonaslund: He's doing java
[12:30] TheJH: DrMcKay, huh?
[12:30] TheJH: DrMcKay, aaah, understood
[12:30] dmkbot has joined the channel
[12:30] TheJH: !fooping
[12:30] dmkbot: TheJH, pong
[12:30] TheJH: !foo ping
[12:30] dmkbot: TheJH, pong
[12:31] TheJH: DrMcKay, what did you change?
[12:31] NetRoY has joined the channel
[12:31] DrMcKay: TheJH: nothing :<
[12:31] DrMcKay: he seems to randomly quit
[12:31] DrMcKay: but he's running under forever, so he gets restarted
[12:31] TheJH: DrMcKay, btw, I'd get a bot cloak for the bot that contains your name. whois jhbot, you'll see my nick
[12:32] TheJH: ~jhbot@unaffiliated/thejh/bot/jhbot
[12:32] DrMcKay: TheJH: oh, I'll
[12:32] DrMcKay: (I should ask staff, right?(
[12:33] DrMcKay: btw, is it weird that I launch Flash player only under VM?
[12:34] TheJH: DrMcKay, join #freenode, say that you want a cloak for your bot, put a mechanism in your bot to prove that you're its owner, let the bot privmsg a staffer who told you to do it, get your cloak
[12:34] TheJH: that's how I did it
[12:34] DrMcKay: TheJH: TODO ;)
[12:34] TheJH: meh
[12:35] DrMcKay: something like !dmkbot msg would be enough
[12:35] DrMcKay: but I'm lazy
[12:35] DrMcKay: and have a job :<
[12:35] TheJH: DrMcKay, login to the bot using nickserv?
[12:36] TheJH: DrMcKay, and then say "I want a botcloak for this account"
[12:36] DrMcKay: TheJH: would work as well
[12:36] DrMcKay: I would hate to work with Notch
[12:37] DrMcKay: seriously, using zz as function parameter name?
[12:37] DrMcKay: TheJH: v8 has live code editing?
[12:37] DrMcKay: TheJH: it would make a cool feature for an IDE
[12:39] TheJH: DrMcKay, sorry, I was wrong about that
[12:39] TheJH: DrMcKay, it only has "evaluate" to run stuff in the current context
[12:40] DrMcKay: TheJH: ok
[12:41] TheJH: DrMcKay, http://code.google.com/p/v8/wiki/DebuggerProtocol
[12:41] rgl has joined the channel
[12:41] DrMcKay: TheJH: thanks
[12:42] DrMcKay: TheJH: I'm pretty sure this could be hacked somehow
[12:42] TheJH: DrMcKay, maybe
[12:43] DrMcKay: fuck, couldn't it be Monday already?
[12:44] DrMcKay: I can't wait to see what fb guy says :<
[12:44] some1else has joined the channel
[12:45] DrMcKay: whatever, I'm going back to work
[12:45] meso has joined the channel
[12:47] topaxi has joined the channel
[12:54] agnat_ has joined the channel
[12:54] JoshC2 has joined the channel
[12:54] mendel_ has joined the channel
[12:54] Metal3d has joined the channel
[12:55] Metal3d has joined the channel
[12:56] torsd has joined the channel
[12:56] int_64 has joined the channel
[12:57] wenchen has joined the channel
[12:59] temp01 has joined the channel
[12:59] Metal3d has joined the channel
[12:59] andrewfff has joined the channel
[13:00] DrMcKay_ has joined the channel
[13:00] mikl has joined the channel
[13:00] mikl has joined the channel
[13:01] synkro has joined the channel
[13:01] pickels has joined the channel
[13:03] jTNT has joined the channel
[13:07] fairwinds has joined the channel
[13:09] scottschecter has joined the channel
[13:10] robi42 has joined the channel
[13:13] Remoun has joined the channel
[13:19] hakunin has joined the channel
[13:19] replore_ has joined the channel
[13:19] replore has joined the channel
[13:19] Carter1 has joined the channel
[13:21] dmkbot has joined the channel
[13:21] Intuit` has joined the channel
[13:22] liquidproof has joined the channel
[13:25] dmkbot: *node build on arm fails during mksnapshot execution* reported by japj: https://github.com/joyent/node/issues/1566
[13:25] japj: hey that's quick
[13:26] japj: I submitted that 1 second ago
[13:26] dmkbot has joined the channel
[13:26] dmkbot: *node build on arm fails during mksnapshot execution* reported by japj: https://github.com/joyent/node/issues/1566
[13:26] japj: euhm.. why does it say that twice?
[13:26] ggg has joined the channel
[13:27] japj: DrMcKay_: ping
[13:28] ggg: Hi guys, have an issue with connect-auth, feel free to go at http://stackoverflow.com/questions/7135483/facebook-exemple-not-working-in-connect-auth-express and help me, thanks.
[13:29] some1else has joined the channel
[13:31] dmkbot has joined the channel
[13:32] Cromulent has joined the channel
[13:32] DrMcKay_: dmkbot WORKS! :D
[13:32] DrMcKay_: japj: oops, twice?
[13:33] japj: yes
[13:33] DrMcKay_: sorry, I'll fix that, looks like race condition
[13:33] DrMcKay_: it doesn't wait for previous request to end, so it may end up like that
[13:33] tmedema has joined the channel
[13:33] tmedema: Where can I find the socket.io Redis store?
[13:33] japj: DrMcKay_: I was somewhat startled by the fact that it announced on irc within a second of me submitting the issue to github
[13:34] DrMcKay_: japj: :). it checks every 5 seconds
[13:35] DrMcKay: no, it's not race, it quited after announcing it for the first time
[13:36] DrMcKay: it sometimes quits randomly
[13:36] DrMcKay: sorry about that
[13:38] DrMcKay: yay! my img to html converter works!
[13:38] liquidproof has joined the channel
[13:38] DrMcKay: (and yes, it actually converts imgs to html)
[13:39] tbranyen: uhh
[13:39] tbranyen: pixel divs?
[13:39] DrMcKay: tbranyen: yes :D
[13:39] tbranyen: dear lord
[13:39] DrMcKay: well, it's fun to watch Chrome struggling to render it :D
[13:40] tbranyen: xD
[13:40] tbranyen: should load all the markup first
[13:40] tbranyen: with the right classes or w/e and then load in the stylesheet
[13:41] DrMcKay: tbranyen: it doesn't use seperate stylesheet
[13:41] DrMcKay: oh, Firefox couldn't handle that
[13:42] DrMcKay: ok, how can I delete firefox session?
[13:42] DrMcKay: nvm, deleted the file
[13:43] mehlah has joined the channel
[13:43] tmedema: Is it possible to create a module that stores public references? Eg. var store = require('store'); store.put('io', io'); and then in some other module I want to access socket.io: var io = store.get('io');
[13:44] DrMcKay: tmedema: store.data['io'] = 'io' maybe?
[13:44] DrMcKay: but you can just export put and get functions
[13:44] DrMcKay: oh, but wait, I have to check that
[13:45] tmedema: DrMcKay: that'd work too. I am not really sure whether this isn't bad behavior though
[13:45] tmedema: My reasoning is that I need to access a couple of variables throughout my project. Eg. now.js, or socket.io, or somekind of settings module.
[13:47] jvduf has joined the channel
[13:47] DrMcKay: tmedema: both data and function will fit
[13:47] DrMcKay: with function you get finer degree of control
[13:48] tmedema: DrMcKay: alright, I'll go for the function. But don't you think it's quite bad to have these kind of "global" references?
[13:48] jvduf has joined the channel
[13:48] tmedema: I cannot think of a better solution though, other than passing the variables to each underlying module
[13:48] DrMcKay: tmedema: node.js does it as well, so why wouldn't you :) ?
[13:49] tmedema: DrMcKay: I guess, not sure really
[13:49] Raynos has joined the channel
[13:49] DrMcKay: tmedema: and for settings use node-settings, this is a cool module
[13:50] joshthecoder has joined the channel
[13:50] Raynos: Is there a blocking console.log ?
[13:50] Raynos: So that I can log it before node crashes -.-
[13:50] DrMcKay: Raynos: run a interval, it'll keep node alive (I think)
[13:51] oceanspray_: Raynos: console.error
[13:51] tmedema: Raynos: require('util').debug('I block.');
[13:51] DrMcKay: !doc link timers#setInterval
[13:51] dmkbot: http://nodejs.org/docs/latest/api/timers.html#timers.setInterval
[13:51] tmedema: DrMcKay: thanks. There does not happen to be a module for my reference store already?
[13:51] luke` has joined the channel
[13:52] tmedema: Raynos: personally I prefer to require util than to rely on globals
[13:52] eirikb has joined the channel
[13:52] DrMcKay: tmedema: well, interesting question
[13:52] eirikb: telnet eirikb.no
[13:52] DrMcKay: tmedema: no that I know of
[13:52] japj: !doc link fs
[13:53] DrMcKay: japj: thanks for reminding me :)
[13:53] tmedema: DrMcKay: alright, thanks
[13:53] DrMcKay: tmedema: I think it would work exactly like this put and get
[13:53] japj: DrMcKay: no problem ;)
[13:53] tmedema: DrMcKay: "it" ?
[13:53] DrMcKay: tmedema: that kind of module
[13:53] Sorella has joined the channel
[13:54] tmedema: DrMcKay: yes, I guess it is so simple noone published it.. or, I am being stupid and everyone has found a much better solution
[13:54] raoul has joined the channel
[13:54] drudge_f- has joined the channel
[13:54] DrMcKay: tmedema: nah, I think this one is the best and simplest :)
[13:55] DrMcKay: .. (/doc link ([a-z]+)(#([a-zA-Z]+))?( (v[0-9]+\.[0-9]+\.[0-9]+))?/)('doc link fs')
[13:55] catb0t: [ 'doc link fs', 'fs', undefined, undefined, undefined, undefined ]
[13:55] DrMcKay: good
[13:55] DrMcKay: .. (/doc link ([a-z]+)(#([a-zA-Z]+))?( (v[0-9]+\.[0-9]+\.[0-9]+))?/)('doc link fs#read')
[13:55] catb0t: [ 'doc link fs#read', 'fs', '#read', 'read', undefined, undefined ]
[13:55] DrMcKay: bette!
[13:55] DrMcKay: *better
[13:55] DrMcKay: .. (/doc link ([a-z]+)(#([a-zA-Z]+))?( (v[0-9]+\.[0-9]+\.[0-9]+))?/)('doc link fs#read v0.3.2')
[13:55] catb0t: [ 'doc link fs#read v0.3.2', 'fs', '#read', 'read', ' v0.3.2', 'v0.3.2' ]
[13:55] DrMcKay: .. (/doc link ([a-z]+)(#([a-zA-Z]+))?( (v[0-9]+\.[0-9]+\.[0-9]+))?/)('doc link fs v0.3.2')
[13:55] catb0t: [ 'doc link fs v0.3.2', 'fs', undefined, undefined, ' v0.3.2', 'v0.3.2' ]
[13:56] DrMcKay: thanks, catb0t :)
[13:56] catb0t: thanks again
[13:56] butu5 has joined the channel
[13:56] sivy has joined the channel
[13:57] japj: ..
[13:57] japj: what does .. do to catb0t?
[13:57] catb0t: what sort of database to store an ubuntu server edition
[13:58] DrMcKay: .. 2 * 2
[13:58] catb0t: 4
[13:58] DrMcKay: catb0t: I would use filesystem ;)
[13:58] catb0t: filesystem , open the ads on blogs these day that open a file or something, how to only serve ev_async's callback outside of the ctor, ntage about would
[13:58] deadman87 has joined the channel
[13:59] deadman87: hey everyone!
[13:59] DrMcKay: I think this are actually words from node source code...
[14:01] jvduf has joined the channel
[14:01] ryan0x2 has joined the channel
[14:03] augustl has joined the channel
[14:03] DrMcKay: japj: I'm pushing an update :)
[14:04] aho has joined the channel
[14:04] DrMcKay: !doc link fs
[14:04] DrMcKay: oh, he's not here
[14:04] dmkbot has joined the channel
[14:04] dmkbot: *node build on arm fails during mksnapshot execution* reported by japj: https://github.com/joyent/node/issues/1566
[14:04] dmkbot: *debugger bug --- node v0.4.10* reported by fouasnon: https://github.com/joyent/node/issues/1561
[14:04] dmkbot: *https requestCert unusable with Firefox and Chrome* reported by plexel: https://github.com/joyent/node/issues/1516
[14:04] dmkbot: *dgram.send() callback can be executed either sync or async* reported by joeshaw: https://github.com/joyent/node/issues/1456
[14:04] dmkbot: *Force the DNS module to invoke callbacks asynchronously* reported by dhruvbird: https://github.com/joyent/node/issues/1164
[14:04] DrMcKay: !doc link fs
[14:04] dmkbot: http://nodejs.org/docs/latest/api/fs.html
[14:04] jbrokc has joined the channel
[14:04] DrMcKay: !doc link fs
[14:04] dmkbot: http://nodejs.org/docs/latest/api/fs.html
[14:04] DrMcKay: !doc link fs#readSync
[14:04] dmkbot: http://nodejs.org/docs/latest/api/fs.html#fs.readSync
[14:04] DrMcKay: dmkbot++
[14:04] v8bot_: DrMcKay has given a beer to dmkbot. dmkbot now has 1 beers.
[14:04] catb0t: dmkbot now has 1 beer
[14:05] jakehow_ has joined the channel
[14:05] jakehow has joined the channel
[14:05] DrMcKay: I don't feel OK with pushing something new to GH now
[14:06] weswilliamz has left the channel
[14:06] DrMcKay: or generally: is it considered a bad practice to publish project when recruiter is revieving your resume?
[14:07] deadman87 has joined the channel
[14:07] fwg: depends on the recruiter, maybe they like to see that you are active
[14:08] butu5: DrMcKay: hi.. dmkbot reporting github issue properly now :)
[14:08] DrMcKay: fwg: well, I can't depend on this weird humans
[14:08] DrMcKay: butu5: yes :)
[14:09] butu5 has joined the channel
[14:10] drudge_fn has joined the channel
[14:13] seivan has joined the channel
[14:15] simenbrekken: Is there a way to clear process stdout or overwrite it somehow?
[14:15] simenbrekken: I'm trying to make a progress bar
[14:15] luke` has joined the channel
[14:16] TheJH: simenbrekken, there are already some modules for that
[14:16] junkee[]: ncurses
[14:16] DrMcKay: simenbrekken: AFAIK, you have to go back and rewrite everything
[14:16] DrMcKay: simenbrekken: and what TheJH says
[14:16] TheJH: !npm search progress
[14:16] jhbot: packages (short format): progress, kahve-progress, progress-bar, jquery.ui.progressbar, progressify, multimeter
[14:18] agilandfast has joined the channel
[14:18] simenbrekken: ah thanks :)
[14:20] DrMcKay: oh, multimeter, that was the name!
[14:21] SubStack: simenbrekken: the non-ansi trick is to use \r
[14:21] SubStack: which moves the cursor to the beginning of the current line
[14:21] kepheus has joined the channel
[14:21] alnewkirk has joined the channel
[14:21] SubStack: but that doesn't work if you want to output some text below your progress bar or if you want multiple progress bars
[14:21] versicolor has joined the channel
[14:22] mehlah has joined the channel
[14:22] albertosheinfeld has joined the channel
[14:24] some1else has joined the channel
[14:24] tmedema: Does socket.io have an API reference ?
[14:24] pr2012 has joined the channel
[14:25] boehm has joined the channel
[14:27] DrMcKay: hmm... it would be better if bot actually scaned docs
[14:27] jetienne has joined the channel
[14:28] DrMcKay: for now things like console.log won't work, I think
[14:28] DrMcKay: !doc link console#log
[14:28] dmkbot: http://nodejs.org/docs/latest/api/console.html#console.log
[14:28] DrMcKay: nah
[14:28] DrMcKay: btw, why does nodejs.org use nginx?
[14:31] stagas has joined the channel
[14:33] bergie has joined the channel
[14:33] TheJH: yaaay! "sudo npm install -g cempl8", then "cempl8 macros test.js" to compile test.js+ to test.js using the macros from the "macros" file - multiple files are also supported, just seperate them with commas :)
[14:33] TheJH: example files: https://github.com/thejh/node-cempl8/blob/master/test.js https://github.com/thejh/node-cempl8/blob/master/macros
[14:34] TheJH: oh, and source file: https://github.com/thejh/node-cempl8/blob/master/test.js+
[14:34] TheJH: doesn't it look cool? `$$mapreduce{{names,, map lowerCase(e),, filter !!e,, each console.log(e)}}`
[14:35] DrMcKay: TheJH: how the hell can you be so productive?
[14:35] TheJH: DrMcKay, I'm a pupil and summer holidays are just over now, so not much work yet
[14:35] DrMcKay: TheJH: add it to bot :)
[14:35] Carter1: he's a machine evidently
[14:36] DrMcKay: TheJH: well, I'm a pupil as well...
[14:36] DrMcKay: TheJH: but I like wasting my time :D
[14:36] butu5 has joined the channel
[14:36] TheJH: DrMcKay, putting it in the bot is not so easy - e.g. complex macros get evaluated with eval()
[14:37] TheJH: (because I was too lazy to find out how to get require and so on in a scripts context when I use vm)
[14:37] DrMcKay: Carter1: that would be terrible... it would mean we have 2 humans here
[14:38] ph^ has joined the channel
[14:38] Carter1: whos' the second?
[14:38] DrMcKay: my bot
[14:38] Carter1: second human i mean
[14:38] DrMcKay: yes, my bot
[14:38] DrMcKay: he spies them
[14:39] Carter1: ಠ_ಠ
[14:39] DrMcKay: btw, TheJH: college or high school?
[14:39] DrMcKay: TheJH: or whatever naming convention you use
[14:39] mehlah has joined the channel
[14:39] TheJH: DrMcKay, in german, it's "Gymnasium"
[14:39] Carter1: would node.js be good for a notification service?
[14:40] TheJH: Carter1, could be
[14:40] liquidproof has joined the channel
[14:40] Carter1: TheJH: where you could have thousands of notifications a second?
[14:40] DrMcKay: TheJH: I don't think I understand your education system
[14:41] rgl has joined the channel
[14:42] TheJH: DrMcKay, first thing is "Grundschule". Four years, you learn writing and very basic math stuff and so on. Then you go to, depending on your grades, "Hauptschule" (nobody wants to be there), "Realschule" (mmmh, ok...) and "Gymnasium"
[14:42] Carter1: where you lift oddly shaped weights
[14:42] DrMcKay: TheJH: so it's something like high school
[14:42] DrMcKay: in Poland it's called "liceum"
[14:43] junkee[]: TheJH: there is Gesamtschule, also ;)
[14:43] DrMcKay: and it's full of idiots who call themselfes humanists
[14:43] Carter1: both greek words, interesting
[14:43] TheJH: junkee[], true
[14:43] Carter1: we call it High school in US
[14:43] junkee[]: Carter1: would be to easy for us ^^
[14:44] TheJH: sorry, have to go now, I'll be back in 2h or so :(
[14:44] Carter1: junkee[]: guess it depends on the high school, some Prep Schools are really tough
[14:45] hornairs has joined the channel
[14:45] Carter1: junkee[]: i agree, our education system in the US is struggling like a one legged man in an ass kicking contest
[14:45] DrMcKay: btw, do you in US have something like vocational schools?
[14:46] Carter1: DrMcKay: yes, we do have some
[14:46] jhbot has joined the channel
[14:46] Carter1: usually they are seperate of the educational system, optional
[14:46] misterm: Yea...here they are generally considered as something for the...I'm not sure how to say it
[14:46] DrMcKay: misterm: idiots?
[14:46] misterm: less apt students?
[14:46] junkee[]: Carter1: Our system is a few hundred of years old so it's also not the best...
[14:46] Carter1: well, i guess it depends
[14:47] DrMcKay: oh, well. that's what I'm kinda proud of in Poland
[14:47] pr2012 has joined the channel
[14:47] Carter1: DrMcKay: If you want to be a welder, you can go to voc school for it and make really good money doing it
[14:47] DrMcKay: generally, more students from vocational schools make it into technical schools later
[14:47] DrMcKay: Carter1: I'm in vocational school :)
[14:47] Carter1: good for you
[14:48] DrMcKay: Carter1: but it looks way different here
[14:48] Carter1: wish we would adopt something like that here
[14:48] junkee[]: I'm on a "Gymnasium" like TheH
[14:48] junkee[]: *TheJH
[14:48] Carter1: our idiots go to college and get a dipolma that says they can sit through class for 4 years
[14:49] jwall_ has joined the channel
[14:49] DrMcKay: Carter1: same here :)
[14:49] junkee[]: Carter1: I think it's the same in most systems
[14:49] DrMcKay: Carter1: but we have really good level when it comes to technical schools
[14:50] Carter1: that's good
[14:50] DrMcKay: but well, in college there are profiles like marketing and administration
[14:50] DrMcKay: which basically means working in McDonalds
[14:50] Carter1: ding fries are done
[14:51] DrMcKay: Carter1: :D
[14:52] tmedema: Could anyone convince me on how to deal with nested closures? There are so many modules, step, futures, etc.
[14:52] DrMcKay: btw, when in US do you choose your further way of education?
[14:53] DrMcKay: tmedema: there are modules for that
[14:53] kepheus: I'm getting an error when importing both kue/reds, has anyone seen that? http://dpaste.com/599598/
[14:53] Chris-tina has joined the channel
[14:53] tmedema: DrMcKay: I know, but each module is different and some rely on closures and others on futures. What should I use and why?
[14:53] kepheus: there is nothing in the file except those two lines
[14:54] DrMcKay: kepheus: looks like a bug to me
[14:54] raoul has joined the channel
[14:54] some1else_ has joined the channel
[14:55] DrMcKay: tmedema: depends on what you need, really. you want to "flatten" your code, right?
[14:55] Wizek has joined the channel
[14:55] hybsch has joined the channel
[14:56] kepheus: DrMcKay ah, reds is already part of kue. okay...
[14:56] kepheus: i don't need to import it explicitly
[14:56] EvRide has joined the channel
[14:56] tmedema: DrMcKay: let me give you a typical example: First I set a callback for whenever a socket connects to my server. Then, I set a callback to such socket for whenever it sends me a message. Then, I have to get the a property of this socket if I get this message.
[14:57] tmedema: These is a 3 levels nested callback situation
[14:57] tmedema: This*
[14:57] rfay has joined the channel
[14:57] ngs has joined the channel
[14:58] DrMcKay: tmedema: I would just seperate them into functions
[14:58] DrMcKay: tmedema: you would be able to reuse them
[14:58] tmedema: DrMcKay: that is problematic because it does not give you access to functions in the scope
[14:58] DrMcKay: tmedema: you need closures
[14:59] butu5 has joined the channel
[14:59] tmedema: DrMcKay: closures do give me access to the scope, but they result in "nests"
[14:59] DrMcKay: tmedema: yes, now I get it
[14:59] tmedema: people use promises / futures etc. for this I think
[15:00] jerrysv has joined the channel
[15:00] DrMcKay: creationix had an library for that, IIRC
[15:01] mehlah has joined the channel
[15:01] DrMcKay: tmedema: this, maybe: https://github.com/creationix/step
[15:02] jetienne: gowiththeflow.js does it too, it is 20lines and work node and browser
[15:02] tmedema: DrMcKay: I know. There are many others too.
[15:02] tmedema: DrMcKay: the problem is what to use and why
[15:03] jetienne: tmedema: pick one, learn it and stick with it
[15:03] DrMcKay: tmedema: oh, well... 42, possibly
[15:03] jetienne: tmedema: they are all the same.
[15:03] DrMcKay: tmedema: but seriously, use what fits you better
[15:03] jetienne: tmedema: node+browser has been a big plus for me
[15:04] luke` has joined the channel
[15:04] mehlah: Is there any chat node project out there, with a pertistant storage of logs ? (couchdb, mongo ...) #Lazyweb
[15:04] tmedema: jetienne: how are they all the same? There are promises, futures, etc.
[15:04] tmedema: very different techniques, right?
[15:04] jetienne: tmedema: not really, just different name
[15:04] DrMcKay: mehlah: umm... didn't nodejs.org had a chat?
[15:04] DrMcKay: *have
[15:05] jetienne: tmedema: look at the resulting code, see which one is the clearest to you
[15:05] tmedema: jetienne: right, thanks
[15:05] unlink has joined the channel
[15:05] unlink has joined the channel
[15:05] jetienne: but mine is best (c) :)
[15:06] DrMcKay: jetienne: :D
[15:06] fson_ has joined the channel
[15:06] mehlah: DrMcKay yep, but without storing chat logs... I'm planning to go with it but maybe there is something already done for that ;)
[15:06] jzaksh has joined the channel
[15:06] jzaksh has joined the channel
[15:07] jetienne: i did one for easywebsocket too. but no log either http://easywebsocket.org/contrib/chat/
[15:07] DrMcKay: should be easy to extend
[15:08] NetRoY has joined the channel
[15:10] dguttman has joined the channel
[15:10] whitman has joined the channel
[15:11] zomgbie has joined the channel
[15:13] squeese has joined the channel
[15:13] mehlah: DrMcKay sure ;)
[15:13] tmedema: With creationx's Step module, the first param is reserved for 'err'; what if a callback already returns err as first parameter? Should it then be: function(err, err2, second) { } ?
[15:15] alindeman: Is this a reasonable way to create a function that gets the data from an array of Redis keys and calls a callback when they are all fetched? Or is there anything more elegant? https://gist.github.com/2b426a8ed9c8d6608a24
[15:15] some1else has joined the channel
[15:16] alindeman: I guess the generic problem is "How to iterate over a list of values, call an async function, and call one callback after all of the other async functions return?
[15:16] chjj: tmedema: it checks whether the function is sync or async by the return value, so it adds an err if it needs one
[15:16] eirikb: alindeman: Object.keys?
[15:17] chjj: tmedema: if the function returns undefined, it assumes you did something async
[15:17] alindeman: eirikb: Can you expound?
[15:17] tmedema: chjj: does it add err only if it is sync ?
[15:18] eirikb: alindeman: Nevermind, it will be similar solution. But since you have callback can't you just callback each key instead?
[15:18] chjj: tmedema: yeah, i think its a bit more complex, but yeah for the most part
[15:18] alindeman: eirikb: Each item in the array will spawn an async function call. I need to call one callback after all the results are finished
[15:18] tmedema: chjj: hmm, for the most part doesn't do it for me ;) he didn't explain this on github, right?
[15:18] chjj: tmedema: hmm, not sure, that was my understanding
[15:18] eirikb: alindeman: Sounds strange, why would it matter that it is async?
[15:19] boaz has joined the channel
[15:19] misterm: alindeman: sounds like something like promises would be good
[15:19] tmedema: chjj: are you using step?
[15:19] snibble has joined the channel
[15:19] alindeman: eirikb: What do you mean?
[15:19] chjj: tmedema: no i dont usually use async control flow helpers, but i have messed around with step
[15:20] tmedema: chjj: hmm, may I ask how you deal with nested closures?
[15:20] ap123 has joined the channel
[15:20] chjj: tmedema: nested closures?
[15:20] eirikb: alindeman: Check comment
[15:20] chjj: tmedema: you mean all the nested callbacks?
[15:20] misterm: chjj: I think they are talking about callback-heavy styles
[15:20] tmedema: chjj: yes
[15:21] chjj: i usually abstract the ugly stuff away into different functions
[15:21] alindeman: eirikb: In this case, it doesn't make sense for another part of execution to proceed until all the keys are fetched
[15:21] oceanspray_: alindeman: usually you can increment a counter each time a redis command is executed, and decrement a counter in the callback. when it's zero all callbacks have been executed. also, with redis the callbakcs are guaranteed to execute in order
[15:21] eirikb: alindeman: Ah
[15:21] pizthewiz has joined the channel
[15:22] chjj: tmedema: people usually say you can of course used named functions for callbacks, i think thats the wrong approach, dont give the callbacks themselves names, abstract the actual async function call, and maybe another one, into its own function
[15:22] alindeman: misterm: Interesting, yah
[15:22] chjj: of course you can use*
[15:22] chjj: tmedema: let me see if i can show you an example of what i mean
[15:23] tmedema: chjj: maybe I should give you an example of my situation and you can magically turn it into a proper case?
[15:23] tmedema: I will make it tiny
[15:23] ap123: All, I am new to node.js and I want to move a flex application to node.js. I got the development part but I am unsure of packaging and hosting solutions. Can you please point me in the right direction?
[15:23] snibble: Stand back, magic about to happen.
[15:24] chjj: tmedema: all i can do is take the code and tell you how i would write it
[15:24] tmedema: chjj: yeah, that's what I mean
[15:24] tmedema: one sec ;)
[15:24] ryanfitz has joined the channel
[15:24] uchuff has joined the channel
[15:25] eazyigz has joined the channel
[15:26] luke` has joined the channel
[15:26] nibblebot has joined the channel
[15:28] tmedema: chjj: done, this is both the stepVersion and normalVersion: https://gist.github.com/1160744
[15:29] chjj: tmedema: personally, i would start by using 2 space tabs, but that is just my style i guess ;)
[15:30] ttpva has joined the channel
[15:31] tmedema: chjj: really? I always found 2 spaces too cluttered
[15:31] tmedema: but how would you write normalVersion.js?
[15:32] chjj: tmedema: it kind of looks weird to split this up at all because its a grand total of 15 lines
[15:32] blup has joined the channel
[15:33] tmedema: chjj: well I made it tiny for you to understand the logic
[15:33] chjj: if that was everything there, i would leave it as is
[15:33] tmedema: chjj: it's not, the comments represent tons of validation logic
[15:33] chjj: could you include that?
[15:33] chjj: it just looks stupid if i have a function with like 3 lines
[15:33] chjj: or no lines really
[15:34] alindeman: The async package looks neat
[15:35] tmedema: chjj: https://gist.github.com/1160744
[15:35] openpercept has joined the channel
[15:39] chjj: tmedema: it depends on what else youre doing with this, i see 3 callbacks here
[15:39] chjj: sitting in one parent function
[15:40] chjj: honestly thats how i would do things, abstract away the ugly stuff into a single function
[15:40] chjj: and use that function elsewhere
[15:40] chjj: ~40 lines, 3 callbacks, is not too unintelligible
[15:40] tmedema: chjj: could you give an example?
[15:40] chjj: 1 sec
[15:40] Frush3 has joined the channel
[15:41] chjj: this might not be the best example, but here: https://github.com/chjj/dilated/blob/master/src/post.js
[15:41] chjj: that file handles all the low level data management for my blog
[15:41] MavJS has joined the channel
[15:41] tmedema: chjj: that's a whole lot of code.. not sure I will be able to get the point you are trying to make
[15:41] Frush3 has left the channel
[15:41] tmedema: I will give it a try
[15:41] chjj: if you look at the functions, `Post.get` for example, i abstract away the ugly stuff in one function, to use it in another
[15:42] chjj: sorry, let me see if i can find something else of mine more concise
[15:43] chjj: im not sure, maybe im weird, but im okay with 4 indentation levels a lot of the time
[15:43] chjj: even if theyre just callbacks
[15:44] chjj: if you can look at bits and pieces of my file there, you might see what im talking about
[15:44] tmedema: chjj: I see, well I find it quite hard to read your code, but that is probably because you are doing some complex things
[15:45] tmedema: chjj: basically you'd do something like validateAudioCodecs(mp3, mp4, ogg); instead of doing it inline
[15:45] chjj: no i probably would do it inline
[15:46] chjj: but theres a certain limit, 3 callbacks, im okay with, 4 callbacks, things might change
[15:46] tmedema: chjj: so you don't recommend me to use the step version? I think it looks quite proper. though I have a feeling it significantly reduces performance
[15:47] chjj: it also depends on other things, for example, if you were doing something other than binding events in the connection callback, i would probably move all the event binding out into a separate function called bindEvents
[15:47] chjj: or something along with just binding events*
[15:47] chjj: tmedema: you use whatever youre comfortable with
[15:47] chjj: tmedema: if step works for you, thats great
[15:47] Raynos: Got a general question about forking node.js based libraries
[15:48] Raynos: I've noticed a small bug, and I don't know when the library owner will fix it. I forked and made a pull request.
[15:48] luke` has joined the channel
[15:48] tmedema: chjj: using what I am comfortable with has not proven out to be the best strategy in the past ;) For example, I am now stuck with passing my server and client variables to every single module
[15:48] Raynos: I would like to use the "fixed" code now, Is it considered bad practice to add a new npm registery for project + "-fixed" ?
[15:49] chjj: tmedema: if you were writing some kind of standalone library or module, i would say dont increase your dependencies for no reason, but if its an app of yours and you want to use step, go for it
[15:49] chjj: Raynos: probably
[15:50] slajax has joined the channel
[15:50] chjj: Raynos: if its eventually going to be fixed by the module's maintainer, i dont know if its worth adding a package to npm
[15:50] Raynos: chjj: how do you deal with situations where the pull request is not handled and you don't want to use the buggy code? should I include in a lib file?
[15:50] Raynos: lib folder*
[15:50] chjj: you mean npm-wise?
[15:51] tmedema: chjj: alright, thanks a lot.
[15:51] chjj: well, if you could monkey patch it from the outside to fix the problem, thats what id try first, so you dont have to change the modules code at all
[15:51] niclone has joined the channel
[15:52] chjj: tmedema: sure
[15:54] Raynos: tmedema: https://gist.github.com/1160775
[15:54] indexzero has joined the channel
[15:55] fdenbow has joined the channel
[15:55] tmedema: Raynos: are you sure this.socket exists there?
[15:55] tojochacko has joined the channel
[15:56] tmedema: Ah nevermind.
[15:56] Raynos: tmedema: updated with a `.bind(s)`
[15:57] tmedema: Raynos: would you hate me if I say that, on first impression, I do no really like it? :)
[15:57] tmedema: not*
[15:57] 16SAAWKD7 has joined the channel
[15:57] Raynos: tmedema: I'm suggesting that for complex code you should wrap that socket in a domain specific logical object and delegate all io to that logical object.
[15:57] 16SAAWKD7 has left the channel
[15:58] JumpMast3r has joined the channel
[15:58] albertosheinfeld has joined the channel
[15:58] tmedema: Raynos: but then SocketObject would become one huge object with all kinds of functions that are not related to each other
[15:59] Raynos: tmedema: they should be related to each other :\. There an abstraction on top of a client connecting to your socket. Your basically saying when a client connects, make a new client object for him (or get the existing client object from cache which is code I didnt implement). Then delegate everything else through your client abstraction object
[16:00] azeroth_ has joined the channel
[16:00] tmedema: Raynos: the socket object would have logic for parsing audio capabilities, as well as other events not related to audio ?
[16:01] charleyd has joined the channel
[16:01] Raynos: then your not using the other tools socket.io offers you for seperation of concerns
[16:01] Raynos: I believe it has channels and groups
[16:01] Destos has joined the channel
[16:02] tmedema: Raynos: this channel has a lot of features
[16:02] tmedema: channels are basically groups of people
[16:02] Raynos: It's a way to do it.
[16:02] Raynos: The alternative I would recommend is building a middleware abstraction similar to step.
[16:03] Raynos: And define i/o communication going through a middleware stack rather then using flow control sugar.
[16:03] Raynos: but that still involves including a library so middleware vs step is a personal choice. (I also don't think a generic middleware library exists)
[16:04] tmedema: Ok thanks
[16:04] blueadept has joined the channel
[16:04] blueadept has joined the channel
[16:05] asabil has joined the channel
[16:07] bsstoner has joined the channel
[16:08] luke` has joined the channel
[16:11] rfay has joined the channel
[16:12] DrMcKay: weird... I'm writing little, simple deployment tool based on forever and git
[16:12] DrMcKay: this tool is based on 2 repos: bare and not-bare
[16:13] meso_ has joined the channel
[16:13] DrMcKay: I've created a post-receive hook in bare repo which changes directory to non-bare repo and pulls from bare repo
[16:14] DrMcKay: but git says: "Not a git repository: '.'"
[16:15] DrMcKay: whatever, I'll push to non-bare repo and reset it
[16:16] copongcopong has joined the channel
[16:17] brianseeders has joined the channel
[16:18] stonebranch has joined the channel
[16:20] tojochacko has joined the channel
[16:20] hij1nx has joined the channel
[16:21] liquidproof has joined the channel
[16:27] knite has joined the channel
[16:28] luke` has joined the channel
[16:30] knite: anyone here using zappa?
[16:31] misterm has joined the channel
[16:33] chrisbuchholz has joined the channel
[16:35] garrensmith has joined the channel
[16:39] ringomanatee has joined the channel
[16:39] mcluskyd_ has joined the channel
[16:40] tojochacko has joined the channel
[16:41] rgl has joined the channel
[16:42] garrensmith has joined the channel
[16:43] shapeshed has joined the channel
[16:44] tmedema: chjj: still here?
[16:44] Yuffster has joined the channel
[16:45] zemanel has joined the channel
[16:47] micheil has joined the channel
[16:48] mehlah has joined the channel
[16:48] achiu has joined the channel
[16:48] guidocalvano has joined the channel
[16:48] luke` has joined the channel
[16:49] amerine has joined the channel
[16:51] DrMcKay: ACTION goes to write xkcd search for his bot
[16:52] freewil has joined the channel
[16:52] freewil has joined the channel
[16:52] jakehow_ has joined the channel
[16:52] jakehow has joined the channel
[16:53] bergie has joined the channel
[16:55] Skola has joined the channel
[16:55] binaryjohn has joined the channel
[16:55] Guest79645 has joined the channel
[16:56] sixty7ideas has joined the channel
[16:56] sixty7ideas has left the channel
[16:58] chjj: git diff
[16:58] chjj: hmf
[16:58] kenperkins has joined the channel
[17:00] JumpMast3r has joined the channel
[17:04] tojochacko has joined the channel
[17:04] zackattack has joined the channel
[17:05] mikedeboer has joined the channel
[17:07] openpercept has joined the channel
[17:08] luke` has joined the channel
[17:08] jbrokc has joined the channel
[17:08] idefine has joined the channel
[17:10] TheJH has joined the channel
[17:10] TheJH has joined the channel
[17:11] eazyigz has joined the channel
[17:12] ap123 has joined the channel
[17:12] markdaws has joined the channel
[17:14] ap123: All, I am new to node.js and I want to move a flex application to node.js. I got the development part but I am unsure of packaging and hosting solutions. Can you please point me in the right direction?
[17:16] JKarsrud1 has joined the channel
[17:16] d0k has joined the channel
[17:16] TheJH: ap123, for packaging software, use npm
[17:17] TheJH: ap123, for hosting, you might want to come over in #nodejitsu
[17:17] butu5 has joined the channel
[17:17] ap123: thanks :TheJH (on both counts). see u there ..
[17:19] int_64 has joined the channel
[17:19] boehm has joined the channel
[17:21] jomoho has joined the channel
[17:23] achiu has joined the channel
[17:27] chjj: i love when i have a regex revelation
[17:28] luke` has joined the channel
[17:29] Draggor: regexual revolution
[17:31] micheil_mbp has joined the channel
[17:33] DrMcKay: any way to find if module is required or ran from command line?
[17:34] chjj: DrMcKay: theres two ways, you can either do if (!module.parent)
[17:34] chjj: and then you can get the main module from require.main i think
[17:34] chjj: if not you can get it from process
[17:35] industrial: Anyone here use kyoto tycoon?
[17:35] chjj: but !module.parent essentially means youre in the main module
[17:35] industrial: I know there's node bindings and also a connect session story for it
[17:35] DrMcKay: chjj: thanks :)
[17:35] industrial: but I can't find an IRC channel, and I'm not sure about the API :S
[17:36] industrial: the Lua api can save Lua tables, but it seems I can only push strings or Buffer's with the NodeJS API
[17:36] industrial: and this seems kinda dumb db.set('test',JSON.stringify({a:'b'}),function(e){db.get('test',function(e,v){console.log(JSON.parse(v.toString('utf8')), typeof v);});});
[17:36] chjj: ah dont say lua tables it makes me all nostalgic
[17:36] chjj: and melancholy cause i miss lua
[17:38] jetienne has joined the channel
[17:38] andrewvos has joined the channel
[17:41] TheJH: !up ping
[17:41] dmkbot: TheJH, pong
[17:41] TheJH: :D
[17:42] TheJH: DrMcKay, :D
[17:43] DrMcKay: TheJH: oh well... :D
[17:43] DrMcKay: the up command is !up?
[17:44] DrMcKay: !up? ping
[17:44] dmkbot: DrMcKay, pong
[17:44] DrMcKay: it's all about adding ^ at the beginning of regex
[17:44] DrMcKay: but I'm just lazy
[17:44] DrMcKay: (and writing xkcd module)
[17:45] TheJH: and I still have to write a readme for my code template engine :(
[17:45] dingomanatee has joined the channel
[17:45] DrMcKay: TheJH: and make it not crash with not existing files :D
[17:45] dingomanatee: Hi there
[17:45] FIQ has joined the channel
[17:46] tmpvar has joined the channel
[17:46] dingomanatee: I am updating several thousand chunks of data in mongolian/ mongodbnative
[17:46] dingomanatee: and running out of memory in the process
[17:46] dingomanatee: Any reccommendation of ways to leverage the event system or something to better manage such a process?
[17:46] dingomanatee: in node of course...
[17:47] binaryjohn has joined the channel
[17:47] FIQ has joined the channel
[17:48] TheJH: dingomanatee, could you show us your code?
[17:48] dingomanatee: sure
[17:48] dingomanatee: but you have to promise not to tell anyone :D
[17:48] TheJH: oh, you are not allowed to because it's the stuff you work with...
[17:48] TheJH: dingomanatee, just to warn you, there are channel logs
[17:49] TheJH: online
[17:49] bnoordhuis has joined the channel
[17:51] DrMcKay: I think I will make a one biiiig hash with words and comics with scores
[17:52] rfay has joined the channel
[17:52] jetienne: http://learningthreejs.com/data/lets_do_a_plasma/lets_do_a_plasma.html
[17:52] DrMcKay: {butterfly : [ [{comic: 1337, score: 12}], [{comic: 133, score: 5}] ] }
[17:52] DrMcKay: yeah, looks good
[17:52] jetienne: i love node.js and webgl
[17:53] DrMcKay: jetienne: nic :)
[17:53] DrMcKay: *nice
[17:53] DrMcKay: and I made only a snake :(
[17:53] dingomanatee: https://gist.github.com/1160915
[17:54] eirikb has left the channel
[17:54] dingomanatee: i kid - I'm not really too worried about sharing code tha tdoesn't work :D
[17:55] robotarmy has joined the channel
[17:56] dingomanatee: for point of reference - it worked before when I used a onTimeout() to buffer it but it took a long time.
[17:56] Carter1: DrMcKay: pm
[17:56] dingomanatee: setTimeout rather.
[17:56] TheJH: dingomanatee, give me a few seconds...
[17:58] dingomanatee: Thanks TheJH
[17:59] DrMcKay: now, everyone!
[17:59] DrMcKay: no, seriously, listen!
[18:00] DrMcKay: is here anyone who wants to help with non-profit project?
[18:00] dingomanatee: Yes.
[18:00] tshpaper has joined the channel
[18:00] DrMcKay: it's about disaster relief
[18:00] dingomanatee: Turn it into a for profit startup.
[18:00] DrMcKay: and helping to find missing people
[18:00] TheJH: DrMcKay, what do you have in mind?
[18:00] TheJH: dingomanatee, maybe something like this: https://gist.github.com/e36af7c5f89c7977811c
[18:01] TheJH: dingomanatee, note that this is very abstract code
[18:01] TheJH: dingomanatee, oh, and you'll have to call doSomeWork() at the end
[18:01] kmiyashiro has joined the channel
[18:01] DrMcKay: TheJH: what Carter1 will say :)
[18:01] Carter1: Our nonprofit is based on connecting people needs like food, water, shelter with those that have those resources
[18:01] dingomanatee: TheJH thanks.
[18:02] Carter1: helping people find missing people using intelligent forms
[18:02] Carter1: right now there isn't a one spot place where you cna go for this stuff
[18:02] dingomanatee: I'm not trying to be snarky
[18:02] Carter1: so people just go to facebook or local radio stations for help, but the data is not usually shared amongst the volunteers and charities wanting to help
[18:02] dingomanatee: Interesting premise
[18:03] TheJH: Carter1, the thing is, we'd have to make sure that we don't just add anotehr place to the mess
[18:03] TheJH: *another
[18:03] Carter1: TheJH: the goal is, organizations will use our site to manage their resources, volunteers
[18:03] dingomanatee: What resources in this arena are currently being employed?
[18:03] DrMcKay: TheJH: remember when Google hacked out something like that?
[18:03] DrMcKay: TheJH: it was a big success
[18:04] Carter1: we want to augment and help organizations and charities not usurp
[18:04] DrMcKay: TheJH: but they won't do it every time
[18:04] Carter1: so when my city was hit by a massive tornado(35% of the city is destroyed) there were a lot of people wanting to help
[18:04] necrodearia has joined the channel
[18:04] Carter1: but didn't know who to help
[18:05] Carter1: or they needed food and water, but didn't know where to go
[18:05] JKarsrud: where do you set npm dependencies now? is it in the dependencies object in the package.json file, or is it in devDependencies?
[18:05] dingomanatee: The scale of this sort of undertaking seems like something that a company like Google might be interested in.
[18:05] DrMcKay: notice that connectivity is the first restored thing
[18:05] Carter1: dingomanatee: its possible that they could, but idk if this is their core competancy
[18:05] Carter1: we could definitely use their services like a commercial version of google maps
[18:05] navaru has joined the channel
[18:06] dingomanatee: maps, people, idunno, sounds very Google to me.
[18:06] dingomanatee: They are a search engine :D
[18:06] DrMcKay: Carter1: well, I could ping one guy at FB, they could possibly help
[18:06] TheJH: JKarsrud, normal dependencies you need for running the module in "sependencies"
[18:06] Carter1: we definitely want to make it possible to share needs and missing person reports to G+, FB, twitter
[18:06] FIQ has joined the channel
[18:06] Carter1: dingomanatee: indeed ehhe
[18:06] Carter1: DrMcKay: that may be good down the line
[18:07] navaru has joined the channel
[18:07] Carter1: my friend runs a facebook group for tornado relief that has 180K people in it
[18:07] navaru has left the channel
[18:07] DrMcKay: or, if review goes OK, I could be that guy at FB :D
[18:07] Carter1: awesome
[18:07] Carter1: https://p.assembla.com/spaces/relief1/wiki
[18:07] Carter1: this is our project management page
[18:09] DrMcKay: assembla? I would choose GH, there are more people over there
[18:09] Carter1: DrMcKay: our assembla site is connected to our github repo
[18:09] DrMcKay: oh, ok :)
[18:09] Carter1: :)
[18:09] Carter1: nothing in it yet of course
[18:10] Carter1: GH is great, just doesn't have all of the features that assembla has
[18:10] TheJH: Carter1, https://p.assembla.com/spaces/reliefone/wiki/We_Need_Your_Help redirects me to a login prompt :/
[18:10] Carter1: zoink
[18:10] Carter1: let me fix that
[18:10] TheJH: Carter1, github wikis are visible for everyone :P
[18:11] Carter1: https://p.assembla.com/spaces/relief1/wiki/We_Need_Your_Help
[18:11] TheJH: yup, works now
[18:11] Carter1: i don't see any reason not having the wiki info at both
[18:12] TheJH: Carter1, will you set up an IRC channel for that thing?
[18:12] DrMcKay: yes, IRC!
[18:12] Carter1: definitely
[18:12] japj has joined the channel
[18:12] FIQ has joined the channel
[18:13] dingomanatee has joined the channel
[18:13] JKarsrud: TheJH: ok, cool!
[18:14] JKarsrud: I didn't do npm init when I made my app the first time, see, so I wasn't really sure :)
[18:14] TheJH: CarterL, just join a channel and let us join after you
[18:14] TheJH: a not-existing channel
[18:15] slifty has joined the channel
[18:15] CarterL: just setup a channel #relief1
[18:15] CarterL: idk how to register it though
[18:15] pr2012: anyone have a good recommendation for running forever as a service under centos?
[18:16] TheJH: CarterL, I can help you with that
[18:16] unlink has joined the channel
[18:16] unlink has joined the channel
[18:17] navaru1 has joined the channel
[18:17] charleyd has joined the channel
[18:17] navaru1 has left the channel
[18:18] dgathright has joined the channel
[18:19] Qbix1 has joined the channel
[18:20] Qbix1: hey guys
[18:20] Qbix1: this.prototype.__proto__ = events.EventEmitter.prototype;
[18:20] Qbix1: will this work to make the constructed object into an eventemitter?
[18:20] Yuffster has joined the channel
[18:20] hybsch has joined the channel
[18:21] wbw72 has joined the channel
[18:21] nibblebot has joined the channel
[18:21] chjj: obixl: you would instead do obj.__proto__ = EE.prototype; if you wanted to make an object an event emitter *after the fact*
[18:21] chjj: that is, after its created
[18:21] chjj: or you can set __proto__ on the constructors prototype to: myconstructor.prototype.__proto__ = EE.prototype;
[18:22] Qbix1: so this won't work? what I did?
[18:22] Qbix1: how abotu this for the constructor: Dispatcher.prototype.__proto__ = events.EventEmitter.prototype;
[18:22] chjj: well it depends on what youre talking about, what is "this"?
[18:23] chjj: yeah, that would work
[18:23] chjj: if Dispatcher is a constructor
[18:23] meandi has joined the channel
[18:23] chjj: the objects it spits out will be EE's
[18:23] chjj: if you need to turn an object into an EE, you can do obj.__proto__ = EE.prototype;
[18:24] chjj: but just having your constructor inherit from EE is better
[18:24] Qbix1: great
[18:24] Qbix1: thanks
[18:25] carmony has joined the channel
[18:25] chjj: Qbixl: just to note though, the standard way to do inheritance is: constructor.prototype = Object.create(parent.prototype);
[18:26] chjj: in ES% at least
[18:26] chjj: ES5*
[18:26] hij1nx has joined the channel
[18:27] hij1nx has joined the channel
[18:29] jarek has joined the channel
[18:29] jarek has joined the channel
[18:30] Intuit` has joined the channel
[18:34] nibblebot has joined the channel
[18:35] towski has joined the channel
[18:35] admc has joined the channel
[18:35] achiu has joined the channel
[18:37] dob_ has joined the channel
[18:38] ibolmo has joined the channel
[18:38] binaryjohn has joined the channel
[18:38] kenperkins has joined the channel
[18:39] ibolmo: trying to figure out why require('less') works for node prompt, but doesn't for php script that does a proc_open (or similar)
[18:39] AvianFlu: ibolmo: the node gods want you to give up on PHP, that's why
[18:40] ibolmo: hehe i hear ya
[18:40] ibolmo: any ideas, though?
[18:41] felixhummel has joined the channel
[18:41] towski has joined the channel
[18:41] rgl has joined the channel
[18:43] maqr has joined the channel
[18:43] ibolmo: i did install less through npm
[18:44] eazyigz has joined the channel
[18:44] ibolmo: i'm wondering if it's a paths problem
[18:44] Qbix1: hey guys
[18:44] shapeshed has joined the channel
[18:44] Qbix1: how do node listeners get triggered, in what order??
[18:45] Qbix1: is it the same order in which they are attached? or no?
[18:45] bnoordhuis: ibolmo: compare the output of require('module').globalPaths from the REPL and proc_open
[18:45] blup has joined the channel
[18:45] Qbix1: I just implemented a middleware layer, but not like Connect. I think I did it in a more node-like way
[18:45] Qbix1: Basically you call Q.listen to start a server or return an existing server already running
[18:46] Qbix1: And you can call e.g. Q.Dispatcher.listen(options) to start a server or attach to an existing server already running
[18:46] Qbix1: similarly for any other middleware class
[18:46] Qbix1: they just attach listeners. But I need to know if the listeners will be called in the order they were attached.
[18:46] bnoordhuis: Qbix1: check the events docs, listeners are added to the end of the queue
[18:46] ibolmo: bnoordhuis: did you need me to replace module with less?
[18:46] bnoordhuis: ibolmo: no, 'module' is an actual module :)
[18:46] ibolmo: ha :D
[18:47] ibolmo: in node prompt i'm getting undefined
[18:47] bnoordhuis: ibolmo: what version of node?
[18:47] ibolmo: v0.4.8
[18:47] Qbix1: bnoordhius: so the answer to my question is yes?
[18:47] bnoordhuis: then it's probably module.paths (no require)
[18:48] langworthy has joined the channel
[18:48] ibolmo: thanks one sec
[18:48] ibolmo: yeah there we go
[18:48] bnoordhuis: Qbix1: yes
[18:48] ibolmo: i'll try the proc_open now
[18:49] robotmay has joined the channel
[18:49] ap123 has joined the channel
[18:50] maushu has joined the channel
[18:50] DrMcKay: I think I should ask again
[18:51] patcito has joined the channel
[18:51] DrMcKay: is anyone here interested in joining non-profit project for disaster relief?
[18:51] mcluskydodallas has joined the channel
[18:51] japj: bnoordhuis: did you mean http://stackoverflow.com/questions/6788768/cannot-build-node-on-sheevaplug-armv5t-with-debian-squeeze ?
[18:51] ibolmo: bnoordhuis: http://pastie.org/2407717
[18:52] ibolmo: yep a bit different
[18:52] Renegade001 has joined the channel
[18:52] DrMcKay: I guess not :<
[18:52] Sorella has joined the channel
[18:52] DrMcKay: if anyone would be, ping CarterL
[18:53] ap123 has left the channel
[18:53] kenperkins has joined the channel
[18:54] bnoordhuis: japj: no - but it's got more details than the ML thread actually :)
[18:54] AvianFlu: DrMcKay what kind of project
[18:54] DrMcKay: AvianFlu: disaster relief, rescue and search
[18:55] DrMcKay: AvianFlu: join #relief1
[18:55] AvianFlu: they need node people for this?
[18:55] DrMcKay: AvianFlu: it'll be build on node
[18:55] AvianFlu: that's kinda neat
[18:55] DrMcKay: AvianFlu: it's an web application
[18:55] zastaph has joined the channel
[18:56] ibolmo: bnoordhuis: looks quiet different: http://pastie.org/2407717
[18:56] snowinferno has joined the channel
[18:56] zastaph: first line on https://github.com/joyent/node/wiki/Installation in Step3a says to use git clone git://github.com/joyent/node.git if you want to checkout a stable tag
[18:56] zastaph: then 2 lines down it says: git checkout v0.4.11 # optional. Note that master is unstable.
[18:56] willwhite has joined the channel
[18:56] zastaph: if I already chose the stable above, what do I need the second for?
[18:56] bnoordhuis: ibolmo: yes, you probably need to set up the env properly with proc_open
[18:57] snowinferno: Hi all, i'm getting an error trying to compile node on Fedora 15 x86_64, which version of glibc is required for Node? http://fpaste.org/UBC1/
[18:57] micheil: zastaph: so, the master branch (what you get when you just clone that repository) is unstable and used for development
[18:57] micheil: stable versions are generally even tags, eg, v0.4.11, v0.2.00
[18:58] stalled has joined the channel
[18:58] japj: bnoordhuis: I'll have a new go at compiling it, but it will take ages. I will let you know what the result is
[18:58] micheil: unstable versions tend to be odd tags: v0.5.XX, v0.3.XX
[18:58] zastaph: micheil, ok I think i get it.. so if I want stable I pick last option from line#1 and line#3 too right?
[18:58] bnoordhuis: japj: yes, please do
[18:58] micheil: you will want to do a "git checkout v0.4.11
[18:58] zastaph: thanks
[18:58] bnoordhuis: snowinferno: what version of gcc and binutils are you using?
[18:59] micheil: zastaph: I'm not terribly sure what the git clone --depth 1 thing does there though
[18:59] bnoordhuis: snowinferno: oh, and what arch/archs?
[18:59] snowinferno: bnoordhuis: gcc 4.6.0 and binutils 2.21.51.0.6
[18:59] bnoordhuis: snowinferno: binutils gold or lfd?
[19:00] snowinferno: bnoordhuis: How do i find that out? and i'm on x86_64
[19:00] amerine has joined the channel
[19:00] zastaph: micheil, but the comment of that line is what I'm actually using (to get stable tag as it says)
[19:00] Wa has joined the channel
[19:00] zastaph: without the --depth 1
[19:00] devaholic has joined the channel
[19:00] bnoordhuis: snowinferno: ehm... on debian systems you either have binutils or binutils-gold
[19:00] tmpvar has joined the channel
[19:00] maqr has joined the channel
[19:01] snowinferno: bnoordhuis: Fedora is a Redhat system
[19:01] bnoordhuis: snowinferno: yeah, it was an example by comparison :)
[19:01] ibolmo: bnoordhuis: what would be the environment variable for the npm paths?
[19:01] micheil: zastaph: I personally just have a clone of the full repository, from which I check out tags; so I use: git clone git://github.com/joyent/node.git
[19:01] snowinferno: bnoordhuis: oh, i have binutils package installed
[19:01] ibolmo: does node look that up?
[19:01] snowinferno: checking to see if binutils-gold is an available package, should I need binutils-gold?
[19:01] devrim has joined the channel
[19:02] bnoordhuis: snowinferno: no, binutils-gold has some known bugs
[19:02] bnoordhuis: the versions that most distros ship anyway
[19:02] snowinferno: bnoordhuis: I only see binutils and binutils-devel available
[19:02] bnoordhuis: ibolmo: you can set NODE_PATH
[19:03] ibolmo: bnoordhuis: figured it out
[19:03] ibolmo: need to do npm install -g less
[19:04] bnoordhuis: snowinferno: do you have i386 libs installed?
[19:05] snowinferno: bnoordhuis: I don't think so, is node/v8 32-bit only?
[19:05] snowinferno: ahh, i do see glibc.i686 installed
[19:06] bnoordhuis: snowinferno: having libs installed for multiple archs sometimes confuses the linker
[19:06] micheil: Does anyone know of any really good talks / resources on Streams?
[19:06] bnoordhuis: you probably need to tweak the search path
[19:07] devrim: hi guys, if I fire 30k fs.readFile, am i screwing up my disk? if yes - would u recommend fs.readFileSync ?
[19:07] snowinferno: bnoordhuis: hmm ok. Is that a particularly difficult thing to accomplish?
[19:08] DrMcKay: bnoordhuis: I don't think it has big meaning, I have many i686 libs installed
[19:08] micheil: devrim: fs.readFile and fs.readFileSync use the same stuff under the hood
[19:09] micheil: devrim: given that, your calls well get called serially, in a way
[19:09] bnoordhuis: snowinferno: not really, link by hand and include -L/path/to/proper/dir
[19:09] DrMcKay: snowinferno: but these paths should be /usr/lib64
[19:09] micheil: (the kernel will manage it more-so than you if you use fs.readFile)
[19:10] devrim: micheil: so im not causing impossible to manage I/O request, you're saying i can trust underlying nodejs (i guess v8) mechanics
[19:10] bulatshakirzyano has joined the channel
[19:10] snowinferno: erm I have no experience linking by hand
[19:10] odyniec_ has joined the channel
[19:11] MUILTFN has joined the channel
[19:11] devrim: micheil: thx btw :)
[19:12] bnoordhuis: snowinferno: just copy the line from the build log and insert -L before the -Wl,dynamic bit
[19:13] jtsnow has joined the channel
[19:13] devrim: one more I/O related question, which one is more I/O friendly? fs.readDir or fs.readFile ? (i know they do diff things, but in my case i can get the same job done using either)
[19:14] devrim: i/o friendly == cheaper
[19:15] micheil: devrim: so, generally, I wouldn't recommend doing 30k requests to the disk, as disk IO is fairly expensive (in comparison to memory)
[19:15] micheil: devrim: what's the problem that you're trying to solve?
[19:16] devrim: micheil: i have 30k apache configs, gotta read and convert to litespeed config file
[19:16] micheil: 30k? bloody hell that's a lot.. :P
[19:16] devrim: i know :)
[19:17] micheil: probably best to devise some form of chunking
[19:17] micheil: also, watch if the disk is heavily fragmented, as it'll take increased time.
[19:17] micheil: that said, it's likely to be a one off task, right?
[19:17] towski has joined the channel
[19:18] micheil: in which case you could put massive waits on disk io, instead of tying yourself up with how to efficiently read all these files
[19:18] mikeycgto has joined the channel
[19:18] mikeycgto has joined the channel
[19:19] devrim: unforutnately i should all those 30k files
[19:19] devrim: if any of them changes, i should rewrite the config
[19:19] devrim: so im going to be replacing some iscsi disks soon im afraid
[19:19] bnoordhuis: devrim: for all 30k files?
[19:19] devrim: *i should watch
[19:19] devrim: yeah
[19:19] devrim: and it's only increasing
[19:20] bnoordhuis: devrim: i'd probably use inotifywait and a perl one-liner :)
[19:20] snowinferno: bnoordhuis: most of the incompatible messages are gone now, but it's complaining about /usr/lib/libz.so being incompatible when searching for -lz
[19:20] devrim: im thinking of replacing that drive with an SSD
[19:21] micheil: yeah, node.js probably isn't the best tool for your job here
[19:21] devrim: because im fairly certain im going to burn it :)
[19:21] micheil: bnoordhuis: I don't suppose you caught my question on streams earlier on, did you?
[19:21] bnoordhuis: snowinferno: do you have a /usr/lib64/libz.so installed?
[19:21] bnoordhuis: micheil: probably not
[19:22] snowinferno: I have a /usr/lib64/libz.so.1
[19:22] devrim: bnoordhuis, any reading advise?
[19:22] snowinferno: bnoordhuis: woops, that's a libzip.so.1
[19:23] bnoordhuis: devrim: inotifywait is in inotify-tools (on debian systems), perl -i -pe 's/foo/bar/g' to update your conf
[19:24] piscisaureus has joined the channel
[19:24] bnoordhuis: devrim: but you should probably turn that one-liner in a proper script :)
[19:24] snowinferno: it seems like there should be something in the configure script to tell it to use /usr/lib64 or /usr/lib
[19:24] micheil: bnoordhuis: okay, the question was just me asking for any resources/opinions people have on Streams.
[19:25] devrim: bnoordhuis, thx! will do some research..
[19:25] bnoordhuis: micheil: ghostbusters the movie has taught me to never cross them...
[19:25] bnoordhuis: or was that beams?
[19:25] EvRide has joined the channel
[19:25] AvianFlu: no, that was streams
[19:26] bnoordhuis: ^ micheil
[19:26] AvianFlu: streams ftw
[19:26] micheil: :/
[19:26] micheil: not too helpful, but thanks for the humour
[19:26] AvianFlu: Stream.pipe() might be my favorite single piece of the node api
[19:26] bnoordhuis: sorry micheil :)
[19:26] bnoordhuis: can you be specific?
[19:28] micheil: bnoordhuis: I'm working on node-websocket-protocol, however, I'm not sure just how small an event emitter or stream I should break it into
[19:29] micheil: eg, I can go the route of there's just a stream of full message objects
[19:29] losing has joined the channel
[19:29] micheil: or, I can go the route of having a stream of message streams
[19:29] eazyigz: when I use 'exports' and 'require', do the functions in the module that is require'd get executed right away?
[19:30] eazyigz: I mean I am not exporting the functions themselves, but use them in the external module
[19:30] tristanseifert has joined the channel
[19:31] bnoordhuis: micheil: i don't know the current websockets draft that well but that's never stopped me before from having an opinion
[19:31] bnoordhuis: micheil: i'd probably write it as an event emitter that emits messages
[19:31] bnoordhuis: unless you're going to do big streaming things
[19:31] micheil: okay, well, that's the thing
[19:31] micheil: in the latest websocket draft, there's the ability to split messages into chunks
[19:31] micheil: (continuation frames)
[19:31] towski has joined the channel
[19:32] micheil: I've already decided pretty much that it'd make sense to use a contextual API.
[19:33] micheil: so have a encoder and a decoder
[19:33] bradleymeck has joined the channel
[19:35] bnoordhuis: micheil: was that a statement?
[19:35] micheil: in a way.
[19:35] micheil: although, I'm still unsure on it.
[19:35] ph^_ has joined the channel
[19:36] guidocalvano has joined the channel
[19:37] kai- has joined the channel
[19:37] micheil: bnoordhuis: ie, if you do: socket.pipe(protocol.incoming), does it make sense to get a bunch of events on protocol.incoming that are like "text", "binary", "close", "ping", "pong", etc?
[19:38] micheil: (those are all frame types for websocket messages)
[19:38] abjorn has joined the channel
[19:39] _rgl has joined the channel
[19:39] bnoordhuis: micheil: on the face of it: no
[19:39] jarek_ has joined the channel
[19:39] Destos has joined the channel
[19:40] micheil: bnoordhuis: okay, why not?
[19:40] _rgl has joined the channel
[19:41] bnoordhuis: micheil: streams are for when you want to move a blob of data from A to B
[19:41] tk has joined the channel
[19:42] openpercept has joined the channel
[19:42] bnoordhuis: micheil: they're a poor fit if that blob has all kinds of metadata and semantics attached to it
[19:42] micheil: okay, so, that's why I've diverged.
[19:42] micheil: I'd still like to be able to pipe data into it and such
[19:43] micheil: what should that be in the context of node.js, what makes sense?
[19:43] micheil: (I can see a fair few places where we have encoders and decoders of data that operate like streams or on streams of data
[19:45] bnoordhuis: micheil: i assume you know your product best
[19:46] micheil: okay
[19:46] micheil: still trying to figure everything out
[19:47] zackattack has joined the channel
[19:48] snowinferno: after installing the requirement for libz 64, and running a fresh make, it completed without major problem, thanks for the help bnoordhuis
[19:48] bnoordhuis: snowinferno: my pleasure!
[19:48] CIA-65: libuv: 03Bert Belder 07master * r062af9f 10/ src/win/tcp.c : win: fix buffer leak when using non-zero tcp reads (+5 more commits...) - http://git.io/MMTppw
[19:49] navaru has joined the channel
[19:49] navaru has left the channel
[19:51] eazyigz: Hello, I am using 'exports' for an external module. However, that module takes some time to complete calculations. How can I make the 'require' get the latest data from the external module?
[19:53] indexzero has joined the channel
[19:55] jetienne has joined the channel
[19:55] navaru has joined the channel
[19:55] navaru has left the channel
[19:58] pandeiro has joined the channel
[19:58] dimisec has joined the channel
[20:01] parshap has joined the channel
[20:01] Nuck has joined the channel
[20:01] Greenie0506 has joined the channel
[20:04] N0va` has joined the channel
[20:05] dimisec: Hi everyone, I have a question regarding the nvm - https://github.com/creationix/nvm - I'm getting a failure when trying to "nvm install v0.4.11" (or any other version)
[20:05] int_64 has joined the channel
[20:05] enosis has joined the channel
[20:06] dimisec: it cannot find something on the nodejs.org site:
[20:06] dimisec: Connecting to nodejs.org|8.12.44.238|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2011-08-21 22:04:21 ERROR 404: Not Found.
[20:06] dimisec: is it something known? Does nvm work OK for you? Is there any way to get more verbose information from the NVM?
[20:07] mcepl has joined the channel
[20:09] igl has joined the channel
[20:10] Spion has joined the channel
[20:11] jarek_ has left the channel
[20:11] nickgreenie has joined the channel
[20:12] nickgreenie has left the channel
[20:12] nickgreenie has joined the channel
[20:12] mcepl: Hi, trying to build node.js 3.5.1 on Fedora and linker fails, because it looks for libv8.so, whereas I have libv8-3.5.1.so (http://mcepl.fedorapeople.org/tmp/_build-3.5.1-1.fc17.log.txt).
[20:12] mcepl: Any ideas, what to do? Spec file, patches etc are at https://gitorious.org/various-small-stuff/fedora-nodejs/trees/master
[20:12] heated has joined the channel
[20:13] TheJH: mcepl, node should use its own v8 version
[20:13] heated: Hi I'm new to node.js and I was directed here from the end of the Beginners tutorial online.
[20:13] mcepl: does it have to?
[20:14] mcepl: TheJH: this is Fedora so no bundled libraries are allowed
[20:14] mcepl: if I cannot have node.js w/o bundled v8, there is no node.js for Fedora.
[20:14] TheJH: mcepl, ah, you're trying to make a fedora package?
[20:14] mcepl: yes
[20:14] MrWarGames has joined the channel
[20:14] mcepl: update Fedora package
[20:14] TheJH: mcepl, nodejs doesn't alter the included v8
[20:14] TheJH: mcepl, so if the v8 version matches, it should work
[20:15] TheJH: heated, hello :)
[20:15] heated: How can I learn more about node.js?
[20:15] mcepl: sorry, I was wrong ... my question was about building v8, not node.js. Actually ... more if there is anybody who nows anything about scons (I don't)
[20:15] mcepl: *knows
[20:15] bnoordhuis: mcepl: what's the issue?
[20:15] heated: And make web apps and stuff?
[20:15] MrWarGames has joined the channel
[20:15] mcepl: http://mcepl.fedorapeople.org/tmp/_build-3.5.1-1.fc17.log.txt
[20:15] mcepl: bnoordhuis: ^^^
[20:15] mcepl: linker fails
[20:15] perezd has joined the channel
[20:16] TheJH: heated, for making web apps, the express framework is useful. there's also an irc channel for it, #express
[20:16] heated: What about websites?
[20:17] bnoordhuis: mcepl: this is a problem with v8, right?
[20:17] mcepl: bnoordhuis: yes, sorry
[20:17] mcepl: should I just go to #v8?
[20:17] mcepl: or would somebody be able to help me here?
[20:18] bnoordhuis: mcepl: well... are there actual people in #v8?
[20:18] bsstoner has left the channel
[20:18] mcepl: not many .. 25
[20:18] mcepl: and how many of them bots I don't know
[20:18] bnoordhuis: mcepl: it's probably easiest to patch the SConstruct file
[20:19] bnoordhuis: mcepl: i take it you're trying to roll a .rpm?
[20:19] mcepl: yes
[20:19] mcepl: actually, push it to Fedora repos even (if I manage to build it, that is)
[20:19] mcepl: trying to fix https://bugzilla.redhat.com/show_bug.cgi?id=732213
[20:19] bnoordhuis: mcepl: will one or two small out-of-tree patches hurt?
[20:20] mcepl: no
[20:20] mcepl: we already have some patches (https://gitorious.org/various-small-stuff/fedora-v8/trees/master)
[20:20] ttpva has joined the channel
[20:21] bnoordhuis: mcepl: look for D8_FLAGS in SConstruct
[20:21] dob_ has joined the channel
[20:21] bnoordhuis: or the general LINKFLAGS
[20:22] mcepl: I see D8_FLAGS
[20:22] bnoordhuis: i think d8 is actually the only thing that links to libv8
[20:22] bnoordhuis: so patch the LIBS setting and you should be good to go
[20:22] chjj: fedora v8?
[20:22] mcepl: so instead of LIBS: ['v8'] there should be something else?
[20:22] chjj: whats wrong with fedora on v8? :O
[20:22] bnoordhuis: mcepl: yes
[20:22] chjj: or
[20:22] chjj: v8 on fedora*
[20:23] mcepl: bnoordhuis: could I make it somehow automagically versioned?
[20:23] mcepl: chjj: there is only very old one in repos
[20:23] chjj: i see
[20:23] bnoordhuis: mcepl: search for GetVersionComponents
[20:23] chjj: ive never used fedora, i kind of want to try it
[20:23] bnoordhuis: but i'm not 100% sure everything's been defined at that point
[20:24] zentropa24 has left the channel
[20:24] bnoordhuis: mcepl: or rather GetVersion
[20:25] mcepl: bnoordhuis: so it would be 'LIBS': ['v8'+GetVersion()], ???
[20:25] kenperkins: when running a script from the command line, shouldn't exit on its own?
[20:25] mcepl: and dash
[20:25] slifty has joined the channel
[20:26] bnoordhuis: mcepl: yes or override it in BuildSpecific()
[20:26] mcepl: there is actually version variable
[20:26] bnoordhuis: mcepl: yes, in BuildSpecific() :)
[20:27] mcepl: vhere in BuildSpecific ... I don't see a good hook
[20:27] kenperkins: (shouldn't it exit on it's own rather)
[20:27] mcepl: bnoordhuis: ^^^
[20:29] japj: bnoordhuis: I have still the same error now, Illegal instruction, this is with -march=armv5t
[20:30] japj: bnoordhuis: compilation took more than an hour... sigh
[20:30] bnoordhuis: mcepl: d8_flags - after it's assigned you can override the LIBS setting
[20:30] bnoordhuis: japj: do you know what instruction it's SIGILL'ing on?
[20:31] weswilliamz has joined the channel
[20:31] bnoordhuis: kenperkins: only if there's nothing to keep the event loop alive (think: listening servers)
[20:31] kenperkins: yea, i don't have anything listening, but it's still not exiting :S
[20:32] Patrick has joined the channel
[20:32] japj: bnoordhuis: I'll need to install gdb first (assuming I need to run it through gdb that is)
[20:32] bnoordhuis: japj: yes, you'll need gdb
[20:33] japj: bnoordhuis: 0x001ffb44 in v8::internal::ArmUsingHardFloatHelper ()
[20:33] bnoordhuis: japj: oh, maybe you need to compile with softfp
[20:33] japj: bnoordhuis: -mfloat-abi=softfp
[20:34] slifty has joined the channel
[20:34] japj: it is using that already?
[20:34] bnoordhuis: japj: does that device have a fpu?
[20:35] japj: bnoordhuis: how can I tell?
[20:35] japj: bnoordhuis: /proc/cpuinfo says Features : swp half thumb fastmult edsp
[20:35] japj: bnoordhuis: Processor : Feroceon 88FR131 rev 1 (v5l)
[20:35] Drakonite has joined the channel
[20:36] bnoordhuis: japj: does the flags section have a fpu field?
[20:37] navaru has joined the channel
[20:37] bnoordhuis: japj: cat /proc/cpuinfo | grep fpu
[20:37] japj: nope
[20:38] bnoordhuis: japj: you probably have to compile with -mfloat-abi=soft in that case
[20:38] bnoordhuis: and live with the fact that some things are going to be dog slow :)
[20:38] japj: bnoordhuis: current compilation is setup with -mfloat-abi=softfp
[20:39] bnoordhuis: japj: softfp still requires a fpu
[20:39] wbw72 has joined the channel
[20:39] japj: ah
[20:39] bnoordhuis: the only thing it does is change the calling convention
[20:39] japj: ok, thanks.. gonna change the SConstruct settings and fire everything up again then
[20:40] andrewvos has joined the channel
[20:40] Nuck: Anyone here heard of Velti?
[20:41] javaanse_jongens has joined the channel
[20:41] koo6 has joined the channel
[20:41] rgl has joined the channel
[20:42] snowinferno: If I wanted to grab the IP address of the machine I'm running a server on, how would I do that? I tried server.address() but that just gives me 0.0.0.0
[20:43] navaru has joined the channel
[20:43] japj: bnoordhuis: how does v8 detect the hw platform btw? because there are sections for soft/softfp in the SConstruct file
[20:43] bnoordhuis: snowinferno: require('os').getNetworkInterfaces() ACTION is off to bed
[23:56] DrMcKay: bnoordhuis: bye :)
[23:57] [[zz]] has joined the channel
[23:58] hij1nx has joined the channel
[23:58] tbranyen: charleso: use pacman
[23:59] tbranyen: ?
[23:59] tbranyen: node is in the repos
[23:59] charleso: i have tried that
[23:59] charleso: i got that to work
[23:59] tbranyen: whats the ish?