[00:03] jaitaiwan_ has joined the channel [00:03] meso has joined the channel [00:06] stagas has joined the channel [00:07] k1ttty has joined the channel [00:07] Heisenmink has joined the channel [00:07] enmand has joined the channel [00:08] jergason has joined the channel [00:13] zodiak: there is nothing more xmas fun than having someone drive out to your house to deliver chinese :D [00:13] tbranyen: rofl [00:14] skm has joined the channel [00:15] meso_ has joined the channel [00:15] SirFunk: i need some application organization help here. So i have a bunch of modules for mongoose models. In my mian app i'm using socket io.. is there any way i can pass the io object back to the models so they can emit messages when saved or whatever? [00:17] Shaunzie: fuckin sendgrid! [00:17] Shaunzie: wtf :( [00:17] towski has joined the channel [00:17] zodiak: Shaunzie, ? :) [00:17] zodiak: don't tell me Sg is down [00:17] Shaunzie: they won't activate my account so I can't test shits ._. [00:17] Shaunzie: I think the world would die without send grid O.o [00:18] zodiak: oh. huh. if you want a quick test account, you could always create a test heroku machine (the free one) then add the free sendgrid account to get credentials ;) [00:18] zodiak: it's all automagic [00:18] teadict: but but the counter on the home page keeps going! [00:18] zodiak: teadict, yeah, web page counters.. cool idea from the 1980's [00:19] teadict: I can't believe in anything anymore [00:19] zodiak: embrace buddhism. it's all an illusion [00:19] cjm has joined the channel [00:24] joestein has joined the channel [00:24] joestein_ has joined the channel [00:24] nircle735 has joined the channel [00:24] nircle735 has left the channel [00:25] avih_ has joined the channel [00:26] nircle735 has joined the channel [00:28] nircle735 has left the channel [00:29] mandric has joined the channel [00:29] flip_digits has joined the channel [00:29] disappearedng: does io.socket have any special id I can use? [00:32] fomatin has joined the channel [00:34] sridatta has joined the channel [00:34] nircle299 has joined the channel [00:35] andrew12: are you talking about socket.io? [00:36] nircle299 has left the channel [00:36] andrew12: disappearedng: ^ [00:38] disappearedng: yeah so when I have io.socket.on... function(socket), is there like a unique identifier in that socket object which I can use for mapping purposes? [00:38] cclarke_ has joined the channel [00:41] cclarke__ has joined the channel [00:41] RLa: file descriptor? [00:42] marshall has joined the channel [00:42] marshall: hey node [00:42] RLa: i think sockets have file descriptor too, and it's unique and assigned by os [00:42] marshall: which cakedb module should I use? [00:42] marshall: *couchdb [00:42] marshall: lol, cakedb [00:43] cclarke has joined the channel [00:43] tk has joined the channel [00:44] no_u0 has joined the channel [00:45] koo3 has joined the channel [00:46] RLa: haha [00:47] RLa: anyway, can someone tell me how is one supposed to use 1:n relationships in document-oriented databases? [00:47] disappearedng: I am very new to node. https://gist.github.com/777cfac25b31fd567bae I don't know if this is the best way to go about doing it, does anyone have recommendations? [00:48] zodiak: RLa, urm, you kind of don't. A document database stores everything a single document needs all in one object/key [00:48] zodiak: this leads to highly de-normalized databases (under NF theory) [00:48] kriszyp has joined the channel [00:49] zodiak: eg; you ~will~ have (say) 'user bob' in about 300+ places and all their information [00:49] RLa: zodiak, let's say i have blog post and comments, how does one add comment [00:50] RLa: don't you have overwrite everything just to get one item appended to some list? [00:50] zodiak: RLa, you would update the post. Normally most doc-db's have an 'append onto set' notation/call [00:51] RLa: duh, i did not know [00:51] zodiak: I mostly use cassandra .. so .. I can't speak to couchdb [00:51] RLa: that would make a lot more sense than first pulling whole doc then doing small update, then writing it back [00:52] marshall: disappearedng: line 9 looks like a syntax error [00:52] disappearedng: wait brb I am fixing this [00:52] michaelh_ has joined the channel [00:53] RLa: can't you use sequential ids for identifying clients [00:53] vineyard has joined the channel [00:54] replore has joined the channel [00:54] replore_ has joined the channel [00:54] RLa: something like client.id = id++; [00:54] djbell has joined the channel [00:54] [[zz]] has joined the channel [00:55] marshall: zodiak: sometimes documents in a document database have relationships to one another and you need something to connect them [00:56] RLa: zodiak, "Whenever you update a document in CouchDB, you update it as a whole, there's nothing in between." :( [00:56] gigafied has joined the channel [00:56] RLa: how can this be scalable at all? [00:57] marshall: RLa: what couchdb driver do you use with node? [00:57] RLa: marshall, haven't used it with node yet [00:58] RLa: i'm mostly familiar with it's raw rest interface [01:00] Sami_ZzZ has joined the channel [01:00] kazupon has joined the channel [01:00] RLa: another thing is pulling only so much data that you need [01:01] RLa: what if i do not want whole document? [01:03] avih has joined the channel [01:04] mara has left the channel [01:06] RLa: seems like mongodb has partial updates [01:08] dmojoryder has joined the channel [01:10] RLa: does mongodb use similar rest interface as couchdb? [01:12] versicolor has joined the channel [01:12] mandric has joined the channel [01:15] devongovett has joined the channel [01:16] cmr: Does mongodb even *have* a rest interface? [01:16] cmr: (I don't know much about it) [01:16] mmalecki: kinda-ish [01:17] mmalecki: optional or whatever [01:20] dreamdu5t has left the channel [01:22] nicholasf has joined the channel [01:26] neurodrone has joined the channel [01:27] disappearedng: does socket.io have a way to allow you to debug every message received? [01:28] bnoordhuis has joined the channel [01:29] tab1293 has joined the channel [01:30] tab1293: is there anyway with socketio to stream a download to a web client? ie send parts of a file over tim [01:30] tab1293: e [01:36] thelifelessone has left the channel [01:40] skm has joined the channel [01:43] zomg: disappearedng: there's something like io.set('debug', 4) or something along those lines [01:43] disappearedng: no that's for server side [01:43] zomg: Ah well you didn't specify which =) [01:44] zomg: In any case it might work on client as well, try using socket.set... with same args [01:44] zomg: If not, see their github pages.. they are more up to date and/or useful than their actual website [01:46] stagas has joined the channel [01:47] avih has joined the channel [01:49] dthompso99 has joined the channel [01:50] dthompso99 has left the channel [01:50] TimTim has joined the channel [01:53] Brandon_R has joined the channel [01:53] Brandon_R: hi [01:53] nicholasf: hi [01:53] nicholasf: anyone using modul8 here? [01:54] fomatin has joined the channel [01:58] a_suenami has joined the channel [01:58] a_suenam_ has joined the channel [02:04] no_u0 has joined the channel [02:05] JaKWaC has joined the channel [02:05] MUILTR has joined the channel [02:05] zomg: nicholasf: what's that? [02:05] nicholasf: http://clux.github.com/modul8/ [02:06] stagas has joined the channel [02:07] avih has joined the channel [02:10] icewhite has joined the channel [02:11] context: nice name [02:15] poopy-sama has joined the channel [02:19] zodiak: don't suppose anyone knows of a node library that gives list comprehensions ? [02:19] zodiak: it's about the only part of python I miss ;) [02:20] nicholasf: zodiak: underscore.js? [02:20] avih has joined the channel [02:20] zodiak: nicholasf, yeah, I looked into that, but I heard/read that it is sync in it's list comprehension :( [02:21] nicholasf: yeh it would be [02:28] nicholasf has joined the channel [02:28] CIA-109: node: 03Ben Noordhuis 07v0.6 * red5bad7 10/ benchmark/io.c : bench: fix use of fd after close - http://git.io/3K0hiw [02:28] CIA-109: node: 03Ben Noordhuis 07v0.6 * r0de6ec5 10/ src/platform_win32.cc : win: fix mismatched new[]/delete - http://git.io/yx09cw [02:29] boltR has joined the channel [02:31] stagas has joined the channel [02:34] Fuu has joined the channel [02:38] gigafied has joined the channel [02:39] nerdfiles1 has joined the channel [02:40] nerdfiles1 has left the channel [02:40] mr_luc has joined the channel [02:41] mr_luc: Hey guys -- just setting up node on a new ubuntu 10.10, installed/built from github, version 0.7pre [02:41] mr_luc: npm doesn't work with it. :( [02:41] mr_luc: sez: Required: node@0.4 || 0.5 || 0.6 [02:42] context: who was it that did the benchmarks for the different mongo driver serialization libraries [02:43] enmand has joined the channel [02:44] jimt_ has joined the channel [02:46] context: mr_luc: are you manually installing npm ? [02:46] mr_luc: Yeah -- I tried it via the sh from the website first, of course [02:47] mr_luc: I'm trying changing the package.json to see if npm's install succeeds now ... it'd be weird if latest node and latest npm from github didn't work together, so maybe it's interference from a previous version of npm :P [02:48] context: mr_luc: well, npm is packaged with node now [02:48] context: mr_luc: try using the npm that comes with 0.7pre, i imagine it will actually work [02:48] context: mr_luc: any reason you are using 0.7pre ? [02:48] context: if you cant get npm working with pre you prolly dont need to be using pre to begin with [02:48] mr_luc: nah -- it was just what was on gh [02:49] mr_luc: I got it by changing engines in package.json [02:49] context: so you are using pre for the hell of it. fully aware that crap may not work. [02:49] context: sounds like a plan. have fun. [02:50] mr_luc: yeah, dev laptop [02:51] context: ok? and are you actually working on the node codebase itself ? [02:52] context: im a developer too. i dont run pre releases of node on my laptop though. [02:53] tomlion has joined the channel [02:53] context: mr_luc: so you really you just installed -pre, with no single reason what so ever, and wondered why it dont work [02:54] indexzero has joined the channel [02:55] avih has joined the channel [02:55] Fuu has joined the channel [02:56] mr_luc: Yeah, I installed 0.7pre; it worked fine, but looks like it was a conflict w/an older version of npm; [02:57] context: kk, have fun [02:57] MUILTR has joined the channel [03:02] zodiak has joined the channel [03:05] fomatin has joined the channel [03:06] disappearedng: I am a beginner with nodejs. I am trying to do a demo "game". The code can be found here. https://gist.github.com/22049a8c8ef80c6ac4c1 I am at a point where I find it really hard to debug. There HAS to be a better way to structure the code. Can someone kindly shed some light on this? (I am having a lot of difficulty trying to maintain this code) [03:06] avih has joined the channel [03:06] meso has joined the channel [03:10] ablegreen has joined the channel [03:15] mike5w3c has joined the channel [03:21] towski has joined the channel [03:22] andrew12: disappearedng: rather than your thing where you notify everyone, you can just do io.sockets.emit [03:22] harthur has joined the channel [03:23] andrew12: and socket.io already keeps a list of connected sockets in io.sockets.sockets [03:23] andrew12: (works exactly the same as your clients object) [03:25] subbyyy has joined the channel [03:25] mandric has joined the channel [03:27] avih has joined the channel [03:30] disappearedng: andrew12: I am talking more about the cleint end [03:30] disappearedng: my code feels REALLY spaghetti [03:31] andrew12: it doesn't look it [03:31] subbyyy has joined the channel [03:31] context: you could throw stuff into classes but its not horrid [03:32] blup has joined the channel [03:32] andrew12: i'm editing it up a bit and i'll push up a gist after i'm done [03:33] harthur has joined the channel [03:34] andrew12: plus there's some stuff in there that just straight up won't work, like Timers.setTimeout [03:39] teadict: I can't find much about structuring a big application as opposed to use app.js for everything like you see everywhere [03:40] teadict: any resource out there to learn how? [03:40] disappearedng: andrew12: you know any good sample code that shows some good pattern? [03:40] context: teadict: experience. [03:40] disappearedng: like how to do asyn programming on node on server and client side [03:40] teadict: context: am I going to have you in my tail forever now? [03:40] a_meteorite_0 has joined the channel [03:41] teadict: I'll start coding tomorrow, I already told you [03:41] Me1000 has joined the channel [03:41] cognominal_ has joined the channel [03:41] andrew12: teadict: you can structure it however you want. [03:41] andrew12: disappearedng: not off the top of my head [03:42] teadict: well, yeah, but I'm just starting with node [03:42] teadict: I need lotsa docs [03:43] blup has joined the channel [03:43] andrew12: there's not going to be any docs on how to structure an application [03:43] avih has joined the channel [03:43] teadict: ): [03:43] mr_luc: yeah -- maybe you could google for projects on github that are built on express [03:44] andrew12: the simplest way to figure out how to structure your app is to write it in one file and then find stuff that is related to each other [03:44] andrew12: and move them out [03:44] teadict: is this fair enough? http://stackoverflow.com/questions/5778245/expressjs-how-to-structure-an-application [03:45] andrew12: teadict: use that. [03:46] teadict: although, that seems to only tear appart the main blocks of things [03:46] teadict: it's not like a revolution [03:46] andrew12: how? [03:47] teadict: puts the routes there, the envs over there [03:47] andrew12: isn't that what you want? [03:47] teadict: mmm [03:47] andrew12: it's laying it out like an MVC [03:47] teadict: what if you have like 200 routes? [03:47] andrew12: it's one file [03:47] andrew12: o.0 [03:48] teadict: doesn't get messy? [03:48] andrew12: it'll be messy regardless of where you put it [03:48] teadict: fair enough [03:48] blup_ has joined the channel [03:49] mr_luc: yeah, I mean you could use restful routes if that works with your application [03:49] andrew12: riht [03:49] andrew12: right [03:49] nicholasf: hi, is this a node antipattern? https://gist.github.com/1520493 [03:49] andrew12: how would that be an antipattern? [03:50] context: teadict: i thought you were using railways.... it kind of tells you how to layout your app [03:50] criswell has joined the channel [03:50] teadict: context: I don't know.. it looks gigantic [03:50] teadict: I'll end up not using it [03:50] context: oh dear god [03:51] nicholasf: andrew12: the global app object [03:51] nicholasf: some people say it's coupling things too strongly [03:51] teadict: when I be coding, I won't be as indecisy [03:51] andrew12: what is railways? [03:51] teadict: robust mvc [03:51] teadict: not just a middlewere [03:51] teadict: ware [03:52] teadict: "Full MVC+H stack" what's that H? [03:52] andrew12: nicholasf: it depends on what you want to do. if all of your code requires the libraries and stuff then not really. there's no performance hit that comes to mind either. [03:52] nicholasf: andrew12: well, it's an intermediary step for me [03:52] Dmitrijus: teadict: sorry for my rudeness, but it seems you're just spending too much time worrying about the minor details (which will be obvious), before actually writing the code :) [03:53] teadict: I am, yes [03:53] nicholasf: andrew12: I think I may end up using a solution like modul8, but I want to take small steps [03:53] andrew12: i have no idea what modul8 is [03:54] nicholasf: http://clux.github.com/modul8/ [03:54] hij1nx has joined the channel [03:55] TimTim has joined the channel [03:55] Dmitrijus: teadict: so just start writing! IMO, the layout of code is much more dependant on the application you're writing, there is no one best way to do it! :) [03:55] teadict: Dmitrijus: I'm starting to code tomorrow though, I'm fooling around at some level I guess [03:55] context: dmitrijus: no its ok to be rude to teadict. he has been asking questions for the past couple hours, instead of actually playing with node itself and figuring these things out [03:56] teadict: >.> [03:56] context: dmitrijus: yey! i told him to start writing over an hour ago. [03:56] nicholasf: ACTION just discovered Railways [03:56] nicholasf: looks interesting maybe [03:56] equark: anybody have any idea how your should call the HelloWorld::New function from C++ here https://www.cloudkick.com/blog/2010/aug/23/writing-nodejs-native-extensions/? [03:56] teadict: I'm not going to code now [03:56] kriszyp has joined the channel [03:56] Dmitrijus: teadict: why not? :( [03:56] nicholasf: ACTION is from the Rails world and wonders if it's an appropriate way to solve the problem [03:56] teadict: because it's Sunday [03:56] context: teadict: then why are you asking so many questions? where 99% of answers are bias / personal oppinion ... [03:56] context: wow. dumbest response ever. [03:57] amigojapan has joined the channel [03:57] teadict: to establish knowledge I guess [03:57] Dmitrijus: oh yes [03:57] teadict: context: no, because I'm not going to work on time I'm not being paid for [03:57] context: dmitrijus: i think teadict is one of those who read books for a week about driving a car before actually getting in the car and putting the key in the ignition [03:57] teadict: context: you want to work extra hours on your own time? go ahead [03:57] context: but you aren't working, you are learning and playing. [03:58] context: i didnt say write code for work. [03:58] context: i said write code. [03:58] context: PLAY. [03:58] Dmitrijus: YES [03:58] Dmitrijus: . [03:58] teadict: alright alright, I 'll quit bugging [03:58] context: INSTEAD are you are wasting yours, and everyone elses time asking questions multiple times, and in the end, you will still be NO WHERE [03:58] context: teadict: thats not the first time yo usaid that [03:59] boltR has joined the channel [03:59] teadict: FINE [03:59] andrew12: ! [03:59] Dmitrijus: teadict: oh common, writing code is way more fun than reading docs, watching videos, asking questions on the irc (unles, you're trolling something) [03:59] Dmitrijus: ! [03:59] andrew12: Dmitrijus: YES [03:59] Dmitrijus: s/something/someone/ [03:59] teadict: nah, I enjoy researching pre-development [03:59] teadict: but yes, I'm asking sillyness now [03:59] andrew12: i hate researching [04:00] andrew12: plus I can't ever remember anything [04:00] andrew12: I always have docs open [04:00] andrew12: or some code [04:01] context: until i see something useful spew out from teadict's fingers im gonna call troll. [04:01] boltR has joined the channel [04:01] Dmitrijus: andrew12: yes [04:03] teadict: hah [04:03] teadict: no, I ain't trolling.. [04:03] context: thats what they all say [04:03] teadict: I have a client and I'm developing a pretty big-ish app [04:03] teadict: and I chose node [04:03] andrew12: why? [04:03] Dmitrijus: teadict: oh, awesome! :) [04:03] teadict: because of the concurrency [04:03] andrew12: what kind of app, i mean? [04:04] teadict: different people at different areas of the building need real time alerts and that [04:04] teadict: kind of stuff [04:04] andrew12: oh [04:04] context: does the app even require concurrency ? [04:04] teadict: yes, real time messages and comet and all that [04:04] andrew12: don't you already use rails or something? [04:04] teadict: the client builds and repairs industrial machinery for YPF, which is the most important refinery over here [04:04] Dmitrijus: concurrency is overrated [04:04] drostie has joined the channel [04:04] teadict: andrew12: but node and socket.io and now make it so easy [04:05] teadict: I don't want to code a bunch of stuff to make real time stuff work on ruby or python or php [04:05] teadict: plus, js on the server? come on [04:05] teadict: freaking finally [04:05] teadict: just one language [04:05] context: if its easy then you should be working already. [04:05] andrew12: teadict: you can write the whole thing in rails and then just use node and socket.io for the concurrent stuff [04:05] context: hahahahaha ... [04:05] andrew12: what context said [04:06] teadict: why does it have to be done by yesterday?! [04:06] context: teadict: why do you have to spend a week doing research ? [04:06] andrew12: why are we even discussing this [04:06] andrew12: -.- [04:06] blup has joined the channel [04:06] teadict: yes, I have reasons, forget about it [04:06] avih has joined the channel [04:06] teadict: they're extra-development [04:06] context: im bored. so im entertaining the troll [04:07] teadict: you're trolling, since I'm not a troll [04:07] teadict: I come in peace ): [04:07] context: teadict: thats the 5th time you have said forget about it, or ill stop asking stupid questions. [04:07] teadict: I won't be rude and loose credibility, if you ask I'll answer [04:07] context: i did ask. you didn't answer. [04:08] teadict: stop fighting me! [04:08] nicholasf: hrm, just read up about Railways [04:08] teadict: there, change of topic [04:08] nicholasf: I suppose it's a nice idea and it provides a familiar structure [04:09] nicholasf: but I'm interested in pursuing node dev so I can think about code differently, not repeat it across platforms [04:10] vol4ok has joined the channel [04:10] andrew12: nicholasf: it's called railway fyi :p [04:10] nicholasf: ok [04:11] nicholasf: I think I might use JugglingDB tho [04:11] mike5w3c_ has joined the channel [04:11] nicholasf: that will definitely help my code [04:11] satyr has joined the channel [04:13] metalball2 has joined the channel [04:16] SirFunk: this is the freaking ugliest code i've ever written.. can someone take a quick look at this and see if there's any way i can clean it up? https://gist.github.com/fe5967098502747882d8 fwiw Table, Seat, Bill are all mongoose models [04:16] context: holy lord. [04:16] Dmitrijus: WTF [04:17] context: i have a general rule. if a method extends past one page... get rid of it (1 page for me is ~ 40 lines) [04:17] SirFunk: right?! [04:17] context: sirfunk: split half those damn callbacks into seperate functions. [04:18] andrew12: railway looks kind of cool. i'm going to play with it rather than structuring my code in really weird ways that feels and looks odd. [04:19] SirFunk: hmm... there is some of it i'd like to push into the model layer, but i'm not really sure how to. My models are modules and if i could make the fire some of the socket.io stuff (like when they are saved or whatever) that would be cool, but i'm not sure how to pass the io object back to the module [04:19] zodiak: SirFunk, I am SO glad that I do not work with you :) [04:19] mike5w3c has joined the channel [04:20] jellheen has joined the channel [04:20] Dmitrijus: SirFunk: also, fix your identitation, it's just wrong (you can use whatever style guide) [04:20] zodiak: max number of lines in a method/function should be 10. it's the maximum lines most humans can hold in their frontal cortex at any one time :D [04:20] SirFunk: zodiak: i know [04:20] SirFunk: i'm trying to figure out how to simplify it [04:20] avih has joined the channel [04:20] zodiak: also a =comment= or two on what is going on would be awesome :D [04:20] SirFunk: most of my code isn't this ugly but the level of callbacks necessary to work with mongoose makes it stupid [04:20] zodiak: not what you are doing, but +why+ [04:21] zodiak: never used mongoose :) [04:21] Dmitrijus: SirFunk: also, if you use closures like function () {}, you can still name them, like function whatever () {} [04:22] Dmitrijus: with no space between name and the () [04:22] Dmitrijus: my bad [04:22] SirFunk: there's no way to do anything syncronious .... which gets ugly if you need to do something like Grab Record A, set value on A.foo to bar, add relation B to A, set value B.baz to freeeee .. that's like 6 levels of nesting.. so i turned to async [04:22] gigafied has joined the channel [04:23] SirFunk: Dmitrijus: true, that'll probably make it look a bit better [04:24] context: sirfunk: so put that logic in its own file [04:24] context: sirfunk: you have 4-5 distinct actions in what you just said [04:25] context: sirfunk: so make 4-5 functions. [04:25] Dmitrijus: yes [04:25] context: and half that shit can prolly be ran at the same time [04:26] context: oh i wish heroku had riak hosting. mongo looks like crap compared to. [04:26] joshsmith has joined the channel [04:26] Dmitrijus: context: hm, why do find mongo being crap? i like it [04:27] context: ive never really used it to be honest :x so i really shouldn't comment [04:27] context: sirfunk: why arent all those actions being executed at the same time, and nested instead ? [04:27] SirFunk: context: async.parallel does execute them at the same time [04:28] SirFunk: i think all the ones that can happen at the same time i have in async.parallell.. some depend on others to complete though [04:28] joshsmith: random, broad, computer science question: are there any good resources for learning (or re-learning) some of the basics that someone who's self-taught would've gotten in computer science undergrad but didn't? [04:28] joshsmith: things like data structures and algos [04:29] SirFunk: Dmitrijus: do you use an orm for mongo? [04:30] Dmitrijus: SirFunk: NO [04:30] context: dmitrijus: mongodb directly? [04:30] Dmitrijus: yes [04:30] Dmitrijus: well, to be honest, i never used mongodb from node, did a lot from python though :) [04:31] SirFunk: ahh [04:31] Dmitrijus: but using an orm here is kinda missing the point [04:31] SirFunk: i use it a lot in rails and it's fine... [04:31] SirFunk: yeah [04:31] context: damn. mongodb hasn't been touched since april, 2010 thats kind of sad [04:31] context: considering how much node has changed [04:31] ep0x has joined the channel [04:31] SirFunk: context: you mean the binary module? [04:31] context: for node. [04:32] andrew12: context: node is a lot newer though [04:32] context: ahh node-mongodb-native is up to date [04:32] context: but is it fast :/ [04:32] andrew12: oh, are you talking about the mongodb package or mongodb itself? [04:32] SirFunk: context: https://github.com/christkv/node-mongodb-native 3 days ago? [04:32] SirFunk: ahh he found it :-P [04:33] andrew12: oh, that is the mongodb package... [04:33] context: yeah i was looking at node-mongodb [04:33] ryan_stevens has joined the channel [04:33] andrew12: I always find the github pages by doing `npm home package` [04:33] andrew12: opens it in my browser :p [04:34] context: wow that just looks horrid [04:34] context: i have to call client.bson_serializer.ObjectID(...) every time to fetch a record [04:34] ep0x: what's the best way to learn node.js from scratch? Ive only done jquery in the past and when I look at the free guides on google it makes me want to hit myself [04:34] andrew12: play with examples [04:35] andrew12: or come up with some sort of project and work on it [04:35] joshsmith: ugh, why is every algo/data structure book in Java or C(++)? [04:35] andrew12: because nobody gives a shit about algorithms or data structure in any other language [04:35] context: joshsmith: does the language really matter ? [04:36] andrew12: that too [04:36] gigafied has joined the channel [04:36] context: as long as you can read it.... [04:36] andrew12: and knowing how to read C[++] and Java is a useful skill [04:36] mr_luc: 'because of CS curriculum' ... curriculi? curricula? [04:36] context: just be thankful its not OCaml or haskell. [04:36] joshsmith: I'm not sure I can read Java; C(++) maybe [04:36] dharmesh has joined the channel [04:36] context: you wouldn't understand that stuff for shit [04:37] andrew12: mr_luc: curriculum is plural [04:37] mr_luc: oh ... yeah. [04:37] andrew12: hehe [04:37] mr_luc: so singular is .. [04:37] mr_luc: curricules! [04:37] andrew12: curriculum [04:37] joshsmith: I've never done much of a real coding interview before, so I'm looking at the book "Cracking the coding interview" [04:37] mr_luc: dammit, english. y u no make sense. [04:38] joshsmith: and he's going on about how no one knows algos anymore [04:38] Dmitrijus: joshsmith: well, i do [04:38] andrew12: fish and fishes, deer, etc [04:38] andrew12: moose [04:38] Dmitrijus: joshsmith: but other skills are just much more useful for software development [04:39] mike5w3c has joined the channel [04:39] context: joshsmith: the code interview is about actually knowing the language you are developing in [04:39] joshsmith: I mean, I write working code. I test it. I can do continuous deployment, etc. etc. [04:39] joshsmith: do I really need to know the most optimal sorting algo? [04:40] Dmitrijus: joshsmith: it's mergesort [04:40] Dmitrijus: end of story [04:40] joshsmith: I guess it depends on what I'm doing [04:40] context: hahahaha [04:41] context: do you /really/ need to? depending on the job, yes. [04:41] joshsmith: yeah, dumb question [04:41] mr_luc: I think for most people, if you know when speed matters, when to spike into performance issues, that's probably a lot more important than being able to rattle off C99 details etc. [04:42] context: joshsmith: and when i say really know the language, its about knowing the oddities and quirks of a language. and the little tricks to make life easier [04:42] context: joshsmith: "i wrote a blog in node" doesn't mean you know node. [04:43] joshsmith: sure. nor does writing an npm package or two [04:44] joshsmith: ACTION is reading Node in Action atm [04:45] mongrelion: I think nowadays what's kicking arse is to have a gihub profile and, of course, lots of participation, imho. [04:46] nicholasf: mongrelion: do you hang out in #roro sometimes? familiar nick [04:46] joshsmith: yeah, I only recently started contributing [04:46] kriszyp has joined the channel [04:46] blueadept` has joined the channel [04:46] gf3 has joined the channel [04:46] Squeese_ has joined the channel [04:47] dslfkjagsdfghj has joined the channel [04:47] kazupon has joined the channel [04:48] mr_luc: well, how about that. curricula and curriculum are both valid plurals. TIL. [04:48] idefine_ has joined the channel [04:49] ditesh has joined the channel [04:49] rurufufuss has joined the channel [04:50] devongovett_ has joined the channel [04:50] mongreli1n has joined the channel [04:50] nickp_ has joined the channel [04:51] Will|- has joined the channel [04:51] Sami_ZzZ_ has joined the channel [04:52] tommyvyo has joined the channel [04:54] merlin83 has joined the channel [04:54] Draco_ has joined the channel [04:55] mast3rof01 has joined the channel [04:55] visnup_ has joined the channel [04:56] kriszyp has joined the channel [04:56] ryanrolds has joined the channel [05:00] mongrelion has joined the channel [05:01] pksunkara_ has joined the channel [05:01] _th_n has joined the channel [05:02] equark has joined the channel [05:02] context: i swear some libs have the most horrid examples in the readme ever [05:02] context: especially node-mongodb-native [05:02] ljackson has joined the channel [05:02] context: code example, line 1: var client = new Db('test', new Server("127.0.0.1", 27017, {})), [05:02] context: what is Db? what is Server ? what is {} ? [05:02] context: err what can go in there... [05:06] poincare101 has joined the channel [05:07] poincare101: Hi everyone. Is there any way to render a jade template directly from a file? [05:08] SirFunk: I have 2 streams that both emit close events.. is there any way to fire a function when they are BOTH done? [05:08] Outsider__ has joined the channel [05:09] poincare101: SirFunk: write a callback for one of them, and then the callback has another callback inside it that waits for the other one. [05:10] alessioalex has joined the channel [05:10] SirFunk: hmm.. i'm not sure if that'll work [05:10] SirFunk: i think the callback only gets fired when the stream actually ends.. so if the innerone ended first nothing would happen [05:10] poincare101: SirFunk: make both combinations, maybe? [05:11] poincare101: one with the first stream being the inner, and the second with the first stream being the outer [05:11] cognominal has joined the channel [05:12] boehm has joined the channel [05:13] fomatin has joined the channel [05:13] gavin_huang has joined the channel [05:14] RobWC has joined the channel [05:14] SirFunk: poincare101: yeah that's basically what i did thanks [05:14] RobWC has left the channel [05:15] sharkbird_ has joined the channel [05:17] srijan4 has joined the channel [05:17] gigafied has joined the channel [05:19] CarterL has joined the channel [05:19] poincare101: SirFunk: great :) [05:20] `dvv has joined the channel [05:24] nicholasf: anyone here using JuggleDB? [05:24] nicholasf: (with redis?) [05:25] avih has joined the channel [05:33] Shaunzie has joined the channel [05:35] fbartho has joined the channel [05:36] p1d has joined the channel [05:41] thelifelessone has joined the channel [05:41] thelifelessone: can anyone tell me why express.js isn't serving my static files? [05:41] thelifelessone: I've configured it to do so, but it will not. [05:42] nicholasf: thelifelessone: sounds like you've made a mistake in your configuration [05:42] nicholasf: what kind of debugging steps have you followed? [05:43] thelifelessone: Google, console.log. [05:43] nicholasf: how is Google a debugging technique? [05:43] thelifelessone: search for similiar issues, and try the solutions [05:43] thelifelessone: besides, I copied the erroring line character-for-character from the example project. [05:43] nicholasf: I have static files working [05:43] redir_ has joined the channel [05:44] nicholasf: just set up logging in express and think through it [05:44] nicholasf: it's obviously a mistake you've made and aren't investigating [05:44] thelifelessone: Ok. [05:44] Shaunzie: You can also gist it if you want us to take a look ;) [05:44] deoxxa: thelifelessone: code or gtfo [05:44] flip_digits has joined the channel [05:45] nicholasf: is anyone working with socket.io here? Could they talk me through some basic concepts? [05:45] thelifelessone: deoxxa: https://gist.github.com/1520586 [05:45] thelifelessone: not the best out there, I suppose, but I'm still learning the framework [05:45] deoxxa: nicholasf: i use it pretty extensively at work, what's up? [05:45] nicholasf: I'm finding it really difficult to code asynchronously to the web in the request response format in express [05:46] nicholasf: deoxxa: well, Im just wondering if I add a socket layer then perhaps I don't have to be concerned so much about fighting to write code asynchronously that responds to the request cycle [05:47] nicholasf: like, right now I'm writing some code that uses everyauth to integrate with facebook - creating the user or retrieving and existing record. This is done in the space of a http request starting from a backbone layer [05:48] thelifelessone: Aaaand debugging isn't doing anything. [05:48] nicholasf: I end up spending a lot of time in callbacks, etc., to ensure the response is the User object (either created from scratch or retrieved from redis). Perhaps I should just use socket.io to update the backbone app with the user when things are complete rather than fight through a difficult callback structure [05:48] thelifelessone: There aren't any errors... [05:48] deoxxa: thelifelessone: http://expressjs.com/guide.html#route-middleware [05:49] nicholasf: thelifelessone: have you set up logging in express so it can at least tell you something [05:49] nicholasf: ? [05:49] thelifelessone: nicholasf: yes. [05:49] thelifelessone: deoxxa: I have to build a route to server client-side resources? [05:49] nicholasf: so can you see a 404 in the logs? [05:49] deoxxa: thelifelessone: you do if you want to put it under /assets [05:49] nicholasf: when you request a static resource? [05:49] thelifelessone: nicholasf: I'm not getting any kind of errors. [05:50] thelifelessone: like, none at all. [05:50] Shaunzie: thelifelessone: the app.'s file is in a directory containing the assets directory? [05:50] deoxxa: https://gist.github.com/1520586#L16 << this looks like you want it to be http:///assets/ [05:50] thelifelessone: Shaunzie: The assets folder is one folder up from the app.js file. [05:50] deoxxa: is that correct? [05:50] thelifelessone: I think so? [05:51] deoxxa: you think so? [05:51] Shaunzie: move your asset directory into the same directory as app.js [05:51] gkatsev: if it's one folder up, then shouldn't the url be '../assets'? [05:51] thelifelessone: gkatsev: I tried that already, gkat. [05:51] thelifelessone: -_- [05:51] purr: thelifelessone: ಠ_ಠ is an IRC client/IRC client framework. [05:51] gkatsev: thelifelessone: you probably need an absolute path. [05:51] thelifelessone: thank you, purr, and you're infinite wisdom. Now go do bot stuff. [05:52] gkatsev: thelifelessone: why is the assets folder one folder up? sounds like a weird folder structure [05:52] thelifelessone: I'm weird like that. [05:52] mr_luc: nicholasf -- not directly related, but if you're open to an option that just feels ... wrong, have you looked at now.js? it's a fun little layer on top of socket.io, I've been playing around w/it this past week [05:52] gkatsev: thelifelessone: well, try doing it the other way [05:52] nicholasf: ffs thelifelessone you havent even gisted your code [05:52] nicholasf: youve just said - my code doesnt work [05:52] deoxxa: thelifelessone: don't be weird for no reason. it results in problems like this. [05:52] nicholasf: and asked people to guess what's wrong with it [05:52] gkatsev: nicholasf: he has, actually. [05:52] deoxxa: nicholasf: he did [05:52] gkatsev: nicholasf: https://gist.github.com/1520586 [05:53] nicholasf: gkatsev deoxxa ok ok sry [05:53] gkatsev: np [05:53] deoxxa: thelifelessone: do you want the assets to live under /assets in your urls? or no? [05:53] nicholasf: ok, but there's no logging configured [05:53] thelifelessone: Yeah [05:53] thelifelessone: I do. [05:53] deoxxa: ok then, you're going to want to set up a route then [05:53] thelifelessone: ACTION sighs. [05:53] thelifelessone: Alright. [05:53] avih has joined the channel [05:53] deoxxa: it's not that hard [05:53] nicholasf: mr_luc: looking at now.js now [05:54] cha0s has joined the channel [05:54] thelifelessone: deoxxa: I know, I was just hoping for some sort of one-liner to feed the assets directly from the directory. [05:54] deoxxa: app.get("/assets", express.static(__dirname + "/assets")); [05:54] deoxxa: pretty easy imo [05:54] gkatsev: heh [05:54] thelifelessone: Gah [05:54] k1ttty has joined the channel [05:55] thelifelessone: HA, that still doesn't work. [05:55] thelifelessone: Node hates me. [05:55] idefine_ has joined the channel [05:55] gkatsev: thelifelessone: is your folder structure still weird? [05:55] tytsim has joined the channel [05:55] thelifelessone: gkatsev: Forever and always. [05:55] gkatsev: thelifelessone: then it will forever and always not work [05:55] mr_luc: it seems a little 'out there' to me, but depending on time constraints, project size, etc ... I could see myself using it for something simple [05:56] thelifelessone: gkatsev: where should I put the assets file then? [05:56] thelifelessone: with the views? [05:56] gkatsev: thelifelessone: the same older as app.js is [05:56] thelifelessone: it is... [05:56] gkatsev: s/(older)/f\1/ [05:57] gkatsev: thelifelessone: you just said it was one dir up [05:57] thelifelessone: I just moved it. [05:57] thelifelessone: :( [05:57] gkatsev: ah [05:57] gkatsev: and still doesn't work? [05:57] thelifelessone: nope. [05:57] thelifelessone: gonna try something real quick... [05:57] gkatsev: logs/errors are nice :P [05:58] thelifelessone: it's not giving me any kind of errors. [05:58] thelifelessone: it's always "Cannot GET /assets" [05:58] gkatsev: weird [05:59] fomatin has joined the channel [05:59] thelifelessone: https://gist.github.com/1520601 that's it right now [05:59] Shaunzie: thelifelessone: server.use(express.errorHandler({ dumpExceptions: true, showStack: true })); [05:59] Shaunzie: oh you already did that… >.> [05:59] thelifelessone: Indeed. [05:59] cha0s has joined the channel [05:59] thelifelessone: like I said, no errors. :/ [05:59] cha0s has joined the channel [05:59] gkatsev: is it running as dev server? [06:00] thelifelessone: it should be. [06:00] thelifelessone: I'm running it on Windows, if that means anything [06:00] thelifelessone: using Node 0.6.2, and the latest git repo of express/jade [06:01] gkatsev: thelifelessone: try just have it always doing the full error handling and comment out the dev/prod sections [06:01] thelifelessone: gkatsev: how? [06:01] nicholasf: mr_luc: now.js looks like fun [06:01] gkatsev: thelifelessone: move server.use line to the first server.configure? [06:02] thelifelessone: nothing [06:02] thelifelessone: no errors. [06:02] mr_luc: yeah, heh ... I'm starting a throwaway project that uses it; I think it's promising and so I'm just gonna start building with it and see how it is as a building material. [06:03] nicholasf: mr_luc: yeh, I might use it to build my real-time layer [06:03] mr_luc: usually a bit wary of rpc [06:03] idefine_ has joined the channel [06:03] mr_luc: but yeah, doesn't it just seem like it's wrapped up a lot of the behavior you'd want? [06:04] nicholasf: ACTION nods [06:04] thelifelessone: https://github.com/sanitypassing/Tesseract/tree/master/core [06:04] thelifelessone: there [06:04] thelifelessone: that's the directory layout [06:04] nicholasf: yeh, and Ive just realised Ive been approaching node the wrong way [06:04] nicholasf: I've been trying to impose a synchronous http request response structure on it [06:04] thelifelessone: ingore the shitty commit comments [06:04] nicholasf: I guess that's why they call it a learning curve [06:05] idefine_ has joined the channel [06:05] thelifelessone: gkatsev, https://github.com/sanitypassing/Tesseract/tree/master/core [06:05] gkatsev: ok, that's fine [06:05] thelifelessone: so then why the error? :( [06:05] gkatsev: why it doesn't work, no clue [06:05] thelifelessone: well, shit. [06:06] thelifelessone: it works fine in the example project. [06:06] Shaunzie: maybe a file permission error? [06:06] gkatsev: thelifelessone: wait till tj is here, he'ss get your straightened out. probably. [06:06] thelifelessone: Shaunzie: it's all running on WinXP. [06:06] Shaunzie: windows kinda has funky file permission shits... [06:06] gkatsev: I need to go sleep. [06:06] gkatsev: night [06:06] thelifelessone: gkatsev: night [06:06] thelifelessone: Shaunzie: and the example project works perfect, with the static assets. [06:07] githogori has joined the channel [06:07] VICODAN2 has joined the channel [06:07] Shaunzie: is the aexample running on the same machine? [06:07] dreamdust has joined the channel [06:07] thelifelessone: Shaunzie: Yes. [06:07] kazupon has joined the channel [06:08] Shaunzie: did you try moving server.use(express.static(__dirname + './assets')); out of the configure call back? [06:09] thelifelessone: Shaunzie: it's not in a configure callback. [06:09] thelifelessone: Shaunzie: https://github.com/sanitypassing/Tesseract/blob/master/core/tesseract.js [06:09] satyr has joined the channel [06:09] Shaunzie: that's the one that you're working on? [06:09] thelifelessone: except now the other two configure statements are there, I just haven't pushed the latest copy [06:09] Shaunzie: or is that the example? [06:09] thelifelessone: yeah, but see above [06:10] thelifelessone: there, I pushed the latest copy of everything [06:11] thelifelessone: that's up-to-date as of 15 seconds ago [06:13] Shaunzie: try removing server.get("/assets", express.static(__dirname + "/assets")); [06:13] Shaunzie: after server.use(server.router); [06:13] Shaunzie: add server.use(express.static(__dirname + '/assets')); [06:13] kejun has joined the channel [06:13] kejun has left the channel [06:14] Shaunzie: also what browser are you using? if you say explorer I will probably shoot you :D [06:14] thelifelessone: Chrome, of course. [06:14] Shaunzie: lol had to check :) [06:14] thelifelessone: I understand. [06:14] thelifelessone: I was once prey to the evil of IE. [06:14] thelifelessone: :) [06:15] Shaunzie: Now if only we can get you to stop using windows all would be well with the world x3. [06:15] Shaunzie: j/k [06:15] Shaunzie: sort of >.> [06:15] verdoc has joined the channel [06:15] thelifelessone: Hey, if I could afford a Mac. [06:15] thelifelessone: or a decent laptop for Linux [06:15] Shaunzie: you can afford linux ;) [06:15] thelifelessone: but not the laptop [06:15] thelifelessone: :( [06:15] Shaunzie: linux is free O.o [06:15] fangel has joined the channel [06:15] thelifelessone: Yeaaaah [06:16] thelifelessone: all I've got is an approx. seven year old desktop [06:16] Shaunzie: That's fine, linux will work for it lol [06:16] thelifelessone: not really. [06:16] thelifelessone: it barely runs windows. [06:16] tshpaper has joined the channel [06:16] thelifelessone: and I've attempted Linux before. [06:16] thelifelessone: didn't do so good. [06:16] thelifelessone: anyways, that doesn't work either [06:16] Shaunzie: you can run linux on a commodore 386 if you wanted to O.o [06:16] thelifelessone: my computer is slower than that. :( [06:16] Shaunzie: hell… you can fit linux on anything [06:17] thelifelessone: plus I have my Spotify addiction to worry about [06:17] Shaunzie: Spotify works on linux too :D [06:17] Shaunzie: wine :D [06:17] thelifelessone: Not compatible with my audio or something like that. [06:17] thelifelessone: I dunno. [06:17] Shaunzie: everything works on linux, except iTunes ._. [06:17] thelifelessone: I'm gonna get off my ass and get a job soon though [06:18] thelifelessone: well, technically, I've been off my ass getting a job, but no one wants to hire a minor in this town [06:18] thelifelessone: BUT THAT CHANGES SOO. VERY SOON. [06:18] thelifelessone: Actually. [06:18] thelifelessone: wait. [06:18] thelifelessone: that changed approx. 18 minutes ago. o_o [06:19] avih has joined the channel [06:19] thelifelessone: damn it's later than I thought [06:19] VICODAN2 has joined the channel [06:19] Shaunzie: happy birthday? O.o [06:19] thelifelessone: heh [06:19] thelifelessone: thanks. :O [06:20] Shaunzie: dammit! I wish send grid would get off their asses and a activate my account! >.< [06:20] Shaunzie: now I just refuse to pay on principle >.> [06:20] thelifelessone: heh [06:20] thelifelessone: Ah, well. I'll leave this problem for tomorrow. [06:20] Wizek has joined the channel [06:20] thelifelessone: Until then, SKYRIM. [06:21] maletor has joined the channel [06:21] thelifelessone has left the channel [06:26] confoocious has joined the channel [06:26] confoocious has joined the channel [06:30] nerdfiles has joined the channel [06:30] nerdfiles has left the channel [06:31] coderzach has joined the channel [06:32] gkatsev: TheFuzzball: get lubuntu or something. Not ubuntu or kubuntu. xubuntu will be ok too. lubuntu is *really* light weight [06:33] Shaunzie: Ubuntu is really really light weight if you don't use a window manager… command line is all you need! [06:34] gkatsev: well, the lubuntu's wm is really light weight, though, yes, not as light weight as a terminal [06:35] replore_ has joined the channel [06:35] replore has joined the channel [06:35] Cainus has joined the channel [06:36] dubenstein has joined the channel [06:38] satyr has joined the channel [06:38] stringa has joined the channel [06:39] sridatta has joined the channel [06:39] `dvv has left the channel [06:41] buttface has joined the channel [06:45] avih has joined the channel [06:47] kejun has joined the channel [06:47] dr0id has joined the channel [06:49] jesusabdullah: lubuntu looks sweet [06:50] jesusabdullah: I appreciate that ldm is componentized [06:50] gigafied has joined the channel [06:52] gigafied has joined the channel [06:57] fzzzy has joined the channel [06:59] tytsim_ has joined the channel [06:59] captain_morgan has joined the channel [07:01] disappearedng has joined the channel [07:01] disappearedng: Hey andrew12 you still here? [07:01] andrew12: yes [07:03] andrew12: but i'm about to go [07:07] Epeli has joined the channel [07:08] shanez has joined the channel [07:09] disappearedng: ok then nvm I can bug you another day [07:10] disappearedng: I was just asking whether you have completed your gist just now [07:10] Shaunzie: bah… I hate reading through the source code for mongoose ..... [07:11] towski has joined the channel [07:12] stringa: Hey. I'm new to node and I'm just trying to get webdriver (https://github.com/dmachi/webdriver-js) to work with nodules. I am using the example from https://github.com/dmachi/webdriver-js but I error out, because my variables arn't defined. and it seems that I need to somehow include 'webdriver' into the current running script [07:12] jesusabdullah: Has anybody here done facebook graph stuff with node? [07:12] jesusabdullah: Any favorite libraries for that sort of thing? [07:12] jesusabdullah: There are a lot of them [07:14] Shaunzie: mm isn't there javascript libraries for facebook's graph api? [07:14] Shaunzie: I thought Facebook had some last I checked. [07:15] sharkbird__ has joined the channel [07:16] jesusabdullah: maybe [07:16] jesusabdullah: I just did an npm search [07:17] jesusabdullah: I'm not thinking too clearly, sorry (migraine) [07:19] Me1000 has joined the channel [07:21] admc has joined the channel [07:22] RobWC has joined the channel [07:22] RobWC has left the channel [07:26] ikuramedia has joined the channel [07:26] kazupon has joined the channel [07:28] root_____ has joined the channel [07:28] root_____: Hello [07:28] root_____: How do you guys feel about drykup [07:28] TheMoonMaster has joined the channel [07:29] ikuramedia has joined the channel [07:30] runvnc: pretty excited about it then [07:32] cognominal has joined the channel [07:32] runvnc: http://www.youtube.com/watch?v=HVpY_qIPM34 [07:32] Shaunzie: omg…… wtf! [07:33] Shaunzie: mongoose is pissing me off..... [07:33] runvnc: I don't understand why people would use mongoose. [07:33] runvnc: To me the whole point is to avoid having to define my models like that. [07:34] tytsim_ has joined the channel [07:34] runvnc: what about mongolian deadbeef [07:34] runvnc: have you tried that [07:34] Shaunzie: Have you tried smelling your own ass? O.o [07:35] runvnc: So you're saying you don't like mongolian deadbeef for some reason. [07:35] runvnc: You know I have so many wonderful experiences on irc. [07:35] Shaunzie: no I'm saying piss off :D [07:36] runvnc: Well this is why I usually don't try to have actual conversations. [07:36] boltR has joined the channel [07:36] slaskis has joined the channel [07:38] xy has joined the channel [07:39] tytsim has joined the channel [07:40] runvnc: http://www.youtube.com/watch?v=I-Th4ShE4ac [07:40] jaequery has joined the channel [07:41] jspiros has joined the channel [07:43] k1ttty has joined the channel [07:43] madhums has joined the channel [07:43] satyr has joined the channel [07:44] tytsim has joined the channel [07:48] rgl has joined the channel [07:48] Shaunzie: debug> backtrace [07:48] Shaunzie: There was an internal error in Node's debugger. Please report this bug. [07:48] Shaunzie: Cannot read property 'isNative' of undefined [07:48] Shaunzie: TypeError: Cannot read property 'isNative' of undefined [07:48] Shaunzie: -.- [07:48] kazupon_ has joined the channel [07:48] disappearedng: pastebin man [07:49] Shaunzie: nothing to paste… node debugger just fucked me in the face and I didn't like it -.- [07:51] skm has joined the channel [07:52] Wizek_ has joined the channel [07:53] erikzaadi has joined the channel [07:56] disappearedng: How do I even do timeout in node? https://gist.github.com/85dc0ddc45b0eebefcd3 wouldn't this block one specific socket? [07:57] Shaunzie: remove window [07:57] Shaunzie: setTimeout is a global function [07:57] Shaunzie: > set [07:57] Shaunzie: setInterval setTimeout [07:57] disappearedng: well anyway wouldn't that still be blocking that specific thread? [07:58] disappearedng: sorry not thread, but the concurrency [07:59] Shaunzie: mmm I not sure and the documentation doesn't say [08:01] aliem has joined the channel [08:01] benvie: er [08:02] benvie: timer functions don't block anything [08:02] Shaunzie: http://stackoverflow.com/questions/5849106/how-does-settimeout-works-on-node-js [08:02] zodiak has joined the channel [08:02] benvie: it uses the system's media timer [08:02] benvie: or precision timer or whatever they call it [08:03] tytsim has joined the channel [08:03] benvie: it's faster than the one browsers use anyway, but it's a callback and non-blocking in and of itself [08:04] TheJH has joined the channel [08:04] meso has joined the channel [08:07] Morkel has joined the channel [08:07] crodas has joined the channel [08:09] harlanji has joined the channel [08:10] fson_ has joined the channel [08:13] avih has joined the channel [08:14] harthur has joined the channel [08:18] satyr has joined the channel [08:19] Shaunzie has joined the channel [08:19] zilch_ has joined the channel [08:19] mattgifford has joined the channel [08:21] mikl has joined the channel [08:21] mikl has joined the channel [08:29] ppcano has joined the channel [08:30] Draco_ has joined the channel [08:33] Druid_ has joined the channel [08:37] githogori has joined the channel [08:37] Draco_ has joined the channel [08:42] HT has joined the channel [08:42] levi501d has joined the channel [08:43] shinuza has joined the channel [08:44] tytsim has joined the channel [08:44] TheMoonMaster has joined the channel [08:49] Blorb has joined the channel [08:52] towski has joined the channel [08:53] jergason has joined the channel [08:55] fangel has joined the channel [09:05] satyr has joined the channel [09:07] michaelhartau has joined the channel [09:07] robhawkes has joined the channel [09:08] subbyyy has joined the channel [09:10] robhawkes has joined the channel [09:10] Rob- has joined the channel [09:13] Shaunzie: is there anyway to get a decent backtrace in node..... [09:13] liar has joined the channel [09:14] aliem has joined the channel [09:16] aesptux has joined the channel [09:18] michaelh_ has joined the channel [09:23] jimt has joined the channel [09:25] hugdubois has joined the channel [09:25] hugdubois: hi [09:25] Shaunzie: howdidlydo [09:25] p1d has joined the channel [09:25] hugdubois: i have problem [09:26] hugdubois: node warn me with (node) Hit max file limit. Increase "ulimit - n" [09:26] hugdubois: but on my system ulimit -n is unilimited [09:29] dvf has joined the channel [09:29] Shaunzie: ulimit -n should show how many files can be opened [09:29] Shaunzie: on mac the default is 256 I think [09:30] gravity13 has joined the channel [09:30] Shaunzie: ulimit -n 512 would raise the limit to 512 [09:33] TheMoonMaster has joined the channel [09:35] __doc__ has joined the channel [09:37] zilch has joined the channel [09:37] TimTim has joined the channel [09:40] rurufufuss_ has joined the channel [09:40] FG has joined the channel [09:45] gravity13 has left the channel [09:45] k1ttty has joined the channel [09:49] JakeyChan has joined the channel [09:50] syoyo__ has joined the channel [09:53] stagas has joined the channel [09:56] wmage has joined the channel [09:57] k1ttty has joined the channel [09:57] LeMike has joined the channel [09:58] mattgifford has joined the channel [09:58] fly-away has joined the channel [09:59] FG has joined the channel [10:01] kishoreyekkanti has joined the channel [10:01] FG has joined the channel [10:06] enzo has joined the channel [10:06] enzo: hello [10:06] meso has joined the channel [10:08] stagas has joined the channel [10:08] enzo: I have a strange thing, I'd like to call JSLint.js on some content, so I've created a little nodejs script that reads stdin and give all this to JSLint for analysis, here is the script http://pastebin.com/a9ghrRRD [10:08] herbySk has joined the channel [10:08] Heisenmink has joined the channel [10:09] enzo: but when I launch ./jslint.js | cat my_js_to_analyse.js (jslint.js is the little script pasted on pastebin), I can read on stdout some content of my js to analyse and it blocks [10:10] enzo: any idea ? [10:10] satyr has joined the channel [10:12] mike5w3c_ has joined the channel [10:13] vol4ok: Hello. Why util.pump returns to callback with err=undefined? [10:13] vol4ok: Does it must be so, or I have mistake? [10:13] vol4ok: arguments = { '0': undefined, '1': undefined, '2': undefined } [10:14] cclarke has joined the channel [10:19] ALaguna has joined the channel [10:20] arcanis has joined the channel [10:22] ALaguna: Could someone help me a little bit with a newbie problem? [10:22] Shaunzie: what's the problem? [10:22] tytsim has joined the channel [10:22] stagas has joined the channel [10:23] ALaguna: How could I make requests to a node app from another app to be able to route them through socket.io? [10:25] lulzilla has joined the channel [10:25] lulzilla: any driver for Neo4j so far? [10:26] hugdubois_ has joined the channel [10:28] ALaguna: I'm trying to make Asterisk to communicate with the node server and then broadcast info through the socket [10:30] hugdubois has joined the channel [10:32] cclarke has joined the channel [10:32] schreber has joined the channel [10:34] pauls1 has joined the channel [10:34] `dvv has joined the channel [10:35] cclarke has joined the channel [10:36] pickels_ has joined the channel [10:36] nicholasf has joined the channel [10:36] benvie has joined the channel [10:37] butu5 has joined the channel [10:39] adambeynon has joined the channel [10:42] hipsters_ has joined the channel [10:43] meso has joined the channel [10:43] p1d has joined the channel [10:45] josh-k has joined the channel [10:46] cclarke has joined the channel [10:48] ALaguna: Shaunzie do you have any idea? [10:50] chakrit has joined the channel [10:51] k1ttty has joined the channel [10:52] LeMike has joined the channel [10:53] kishoreyekkanti_ has joined the channel [10:54] jtr__ has joined the channel [10:56] metalball2 has joined the channel [10:57] mattgifford has joined the channel [10:58] kejun has left the channel [11:02] herbySk has joined the channel [11:02] cclarke has joined the channel [11:03] rendar has joined the channel [11:05] shiawuen has joined the channel [11:06] cclarke has joined the channel [11:07] jbpros has joined the channel [11:08] ppcano has joined the channel [11:08] cclarke has joined the channel [11:09] pandark_ has joined the channel [11:10] Morkel has joined the channel [11:11] cjroebuck has joined the channel [11:11] cclarke_ has joined the channel [11:13] larsschenk has joined the channel [11:13] cclarke has joined the channel [11:13] larsschenk has left the channel [11:14] larsschenk has joined the channel [11:14] larsschenk has left the channel [11:15] JakeyChan_ has joined the channel [11:15] nassosdim has joined the channel [11:16] cclarke has joined the channel [11:21] stonebranch has joined the channel [11:24] p1d has joined the channel [11:24] FG has joined the channel [11:34] xyznc has joined the channel [11:35] lzskiss has joined the channel [11:36] cognominal has joined the channel [11:38] `dvv has left the channel [11:41] synkro has joined the channel [11:42] adambeynon has joined the channel [11:48] shinuza has joined the channel [11:48] booo has joined the channel [11:53] cclarke has joined the channel [11:56] d0k has joined the channel [11:58] omry: hi, how do I get the hostname of the machine running nodejs? [11:59] jetienne has joined the channel [12:00] koo4 has joined the channel [12:00] butu5 has joined the channel [12:01] fangel has joined the channel [12:02] notifybot has joined the channel [12:02] butu5 has joined the channel [12:02] butu5: hi [12:05] `3rdEden has joined the channel [12:10] cclarke has joined the channel [12:11] Draco__ has joined the channel [12:13] cclarke has joined the channel [12:13] kishoreyekkanti_ has joined the channel [12:14] NetRoY has joined the channel [12:16] cclarke has joined the channel [12:20] Draco_ has joined the channel [12:20] tytsim_ has joined the channel [12:20] RLa has joined the channel [12:23] CiRlE has joined the channel [12:30] kazupon has joined the channel [12:32] luke` has joined the channel [12:33] stagas has joined the channel [12:33] NetRoY has joined the channel [12:34] Heisenmink_ has joined the channel [12:36] jimt_ has joined the channel [12:38] tuhoojabotti: omry: If not process.ENV then use an external program? [12:39] adambeynon has joined the channel [12:40] tytsim_ has joined the channel [12:42] Draco__ has joined the channel [12:44] butu5 has joined the channel [12:45] FG_ has joined the channel [12:47] davv3: 2 [12:47] butu5: davv3: ? [12:47] oddmunds has joined the channel [12:48] soulraven has joined the channel [12:50] TheJH: butu5, 3+2=5 :D [12:50] butu5: :) [12:50] Shaunzie: fieldOrSpec.constructor === Object node is run, but evaluate to true when done from REPL? [12:50] Shaunzie: …. [12:51] Shaunzie: is it just cause I'm using v0.4.12? [12:51] Shaunzie: ._. [12:51] TheJH: Shaunzie, is that question complete? looks like some part of it is missing... [12:51] k1ttty has joined the channel [12:52] Shaunzie: fieldOrSpec is just an object fieldOrSpec = { stuff } [12:52] fangel has joined the channel [12:56] TheJH: shachaf, why shouldn't it be true? [12:56] davv3: butu5: 3 [12:57] davv3: Yez [12:57] Shaunzie: no idea why it wouldn't work :-/ [12:58] Shaunzie: Maybe one of packages I'm using is modifying the object prototype and doing funky things with it.... [12:59] davv3: everything inherits from Object no? [13:00] davv3: short of [13:00] soulraven has joined the channel [13:00] RLa: so what is that, function equality? [13:01] davv3: what are you trying to do? :P [13:01] soulraven has joined the channel [13:01] Shaunzie: tracking down a bug in mongoose [13:01] Shaunzie: creating indexes causes an error [13:01] Shaunzie: } else if (fieldOrSpec.constructor === Object) { // {location:'2d', type:1} [13:01] Shaunzie: that's the line that's failing [13:02] Shaunzie: } else if (fieldOrSpec === Object(fieldOrSpec)) { // {location:'2d', type:1} [13:02] Shaunzie: that works [13:02] Shaunzie: but I'm just tying to figure out why it isn't working [13:03] tomlion has joined the channel [13:03] Shaunzie: is there a way to get a decent backtrace in node? ._. [13:03] arcanis has joined the channel [13:04] davv3: PrintStackTrace() ? [13:04] davv3: exception.PrintStackTrace() [13:05] mara has joined the channel [13:06] davv3: okthat is not the same in js as in java. [13:06] Shaunzie: O.o [13:06] davv3: https://github.com/eriwen/javascript-stacktrace :) [13:07] davv3: if you care to [13:07] SamuraiJack has joined the channel [13:09] sleeploud has joined the channel [13:10] McMAGIC--Copy has joined the channel [13:10] sleeploud: Morning. [13:10] oddmunds: i'm a total noob to this. i've got node.js v0.6.6 and node-webworker seems to not work at all. what should I do? [13:11] malkomalko has joined the channel [13:12] oddmunds: should i try an older version of nodejs? [13:15] Shaunzie: so yah…. console.log(fieldOrSpec.consturctor === Object) -> false when executed from node…. fieldOrSpec.constructor === Object -> true from REPL and the problem only occurs in node_modules/mongoose/node_modules/mongodb/lib/mongodb/commands/db_command.js ..... [13:15] txdv has joined the channel [13:17] sirwan has joined the channel [13:18] sirwan: Does anyone know of a guide on putting node on a VPS and making it work with domain names as oppose to having a domain name and a port number in the URL ??? [13:18] draginx has joined the channel [13:19] Shaunzie: Don't thin you need a guide of that you just need to have node running on port 80, which requires root access [13:19] sirwan: but i have apache on port 80 [13:19] Shaunzie: other than that you can put nginx in front of it and proxy to port 80 [13:19] Shaunzie: you want Apache disabled if you want to use node [13:19] Shaunzie: Apache is POS anyway sorta kinda >.> [13:20] `3rdEden has joined the channel [13:20] sirwan: yeah. but that still sucks [13:20] sirwan: i have a wordpress site on my Vps [13:20] omry: tuhoojabotti, require("os").hostname() [13:20] Draco_ has joined the channel [13:21] sirwan: also, can i have multiple node.js sites running under one VPS ? [13:21] Shaunzie: mmm if you want to keep Apache, then you're going to have to try using Apache to proxy to port __ENTER_NODE_PORT_HERE__ [13:21] Tom_ has joined the channel [13:21] Tom_: SubStack: hey there, do you know that findit seems broken on windows with node 0.6? [13:21] sirwan: screw that, i think ill move my wordpress site to a shared hosting account [13:21] shinuza has joined the channel [13:22] Shaunzie: good deal :D [13:22] Heisenmink_ has joined the channel [13:22] Draco_ has joined the channel [13:22] sirwan: yeah, but about nodes having more than one site on a VPS is it possible ? [13:22] Shaunzie: Sure [13:22] sirwan: how would nodes differentiate between the multiple sites [13:23] Shaunzie: You would just run each site off a different port [13:23] Shaunzie: and then have nginx take care of proxing [13:23] jetienne_ has joined the channel [13:23] sirwan: so basically.. nginx is a must for a typical node installation ? [13:23] sirwan: regardless of whether i configure apache [13:23] sirwan: for node [13:24] sirwan: I'm hoping to right a definitive guide for the n00b installation of getting node up and running [13:24] sirwan: sorry for so many questions [13:24] txdv: to right? [13:25] Industrial: sirwan: no, you don't need anything else then node [13:25] Shaunzie: You don't have to use nginx, but you'll have to put something in front of the node process and proxy to port 80 [13:25] akter has joined the channel [13:26] Industrial: https://github.com/nodejitsu/node-http-proxy [13:26] sirwan: ok [13:26] sirwan: id love a guide to getting this setup for n00bs [13:26] Shaunzie: I would rather a proxy written in C :-/ [13:26] sirwan: seems like there is no standard way of doing anything anymore [13:27] sirwan: lol Shaunzie [13:28] mmalecki: Shaunzie: this thing is *fast* [13:28] txdv: yea, standard is for noobs [13:29] Shaunzie: sirwan: http://stackoverflow.com/questions/5009324/node-js-nginx-and-now [13:30] sirwan: tnx Shaunzie [13:30] tomlion_ has joined the channel [13:32] FG has joined the channel [13:32] Shaunzie: Ok… I'm gonna sleep now….. yah… that would be good [13:33] mikedeboer has joined the channel [13:35] towski has joined the channel [13:36] neurodrone has joined the channel [13:37] jyp has joined the channel [13:41] kyonsalt has joined the channel [13:44] FG has joined the channel [13:47] Cainus has joined the channel [13:48] pandeiro has joined the channel [13:48] satyr has joined the channel [13:48] lzskiss has joined the channel [13:52] draginx has joined the channel [13:57] Tom_: Why does fs.lstat always return 0 for inode? This seems to break the findit module. [13:58] d0k has joined the channel [13:59] MrMaksimize has joined the channel [13:59] stonebranch has joined the channel [14:02] TheMoonMaster has joined the channel [14:04] thalll has joined the channel [14:04] case_ has joined the channel [14:05] case_: hi there. i've just updated expresso to 0.9.2 and it seems like coverage (-c) doesn't work anymore... [14:05] case_: any idea? [14:07] Cromulent has joined the channel [14:14] socketio\test\59 has joined the channel [14:15] ph^ has joined the channel [14:18] akter has joined the channel [14:19] akter has joined the channel [14:20] sleeploud has joined the channel [14:21] shiawuen has joined the channel [14:22] fangel has joined the channel [14:22] synkro has joined the channel [14:29] booo has joined the channel [14:30] stagas has joined the channel [14:32] IrishGringo has joined the channel [14:32] akter has joined the channel [14:38] devdazed has joined the channel [14:40] tytsim has joined the channel [14:40] plutoniix has joined the channel [14:41] boehm has joined the channel [14:42] Brandon_R has joined the channel [14:42] MrMaksimize has joined the channel [14:43] draginx has joined the channel [14:44] thalll has joined the channel [14:45] CIA-109: node: 03koichik 07v0.6 * r7aa5924 10/ (4 files in 2 dirs): [14:45] CIA-109: node: http: fix resource leak [14:45] CIA-109: node: Fixes #2069 - http://git.io/661iXA [14:48] ncursestest73 has joined the channel [14:48] ncursestest73: hello! [14:48] ncursestest73: :xDasdasd; [14:51] wmage has joined the channel [14:51] stagas has joined the channel [14:51] hij1nx has joined the channel [14:52] case_ has left the channel [14:57] bshumate has joined the channel [14:57] bshumate has joined the channel [14:57] enmand has joined the channel [14:59] airportyh has joined the channel [15:00] level09 has joined the channel [15:00] subbyyy has joined the channel [15:03] FG has joined the channel [15:04] tytsim has joined the channel [15:07] Cromulent has joined the channel [15:09] TimTim has joined the channel [15:10] arpunk has joined the channel [15:11] Morkel has joined the channel [15:16] CIA-109: node: 03koichik 07master * re6b6075 10/ (lib/http.js test/simple/test-http-pause.js): [15:16] CIA-109: node: http: Avoid 'data'/'end' events after pause() [15:16] CIA-109: node: Fixes #1040. - http://git.io/o6bwhQ [15:19] jaitaiwan has joined the channel [15:22] CarterL has joined the channel [15:23] kriszyp has joined the channel [15:23] equark has joined the channel [15:25] cjm has joined the channel [15:25] jergason has joined the channel [15:28] srijan4 has joined the channel [15:29] Heisenmink_ has joined the channel [15:31] butu5 has joined the channel [15:32] bls has joined the channel [15:32] notifybot has joined the channel [15:35] butu5: hi [15:41] stagas has joined the channel [15:41] malkomalko: anybody use the new zlib module? I'm trying to create a gz line reader to stream lines from gzip files.. the first pass through the stream while gunzip'n works fine, but all futures passes through the stream yields an empty buffer after gunzipping [15:43] cclarke has joined the channel [15:44] Wizek has joined the channel [15:44] criswell has joined the channel [15:45] poincare101 has joined the channel [15:47] kilnaar has joined the channel [15:49] booo has joined the channel [15:49] cclarke_ has joined the channel [15:52] txdv: Had anyone already have gotten the idea of implementing the JavaSCript Windows Runtime (WinRT) for node.js? [15:52] FIQ has joined the channel [15:53] cclarke has joined the channel [15:53] butu5: txdv: what do u mean by it? [15:53] boltR has joined the channel [15:54] txdv: like Windows 8 will have this possibility to write stuff with JS [15:54] txdv: I don't know how to explain this, either you know what WinRT is or you don't [15:55] butu5: txdv: not working much in window system [15:55] davetayls has joined the channel [15:55] hotchkiss has joined the channel [15:56] ydef has joined the channel [15:59] captain_morgan has joined the channel [16:00] Cromulent has joined the channel [16:02] jimt has joined the channel [16:02] mansoor has joined the channel [16:03] Agos has joined the channel [16:07] lupomont_ has joined the channel [16:08] captain_morgan has joined the channel [16:09] cclarke has joined the channel [16:12] mike5w3c_ has joined the channel [16:13] cclarke has joined the channel [16:14] Squeese has joined the channel [16:14] cjm has joined the channel [16:15] cclarke has joined the channel [16:15] LeMike has joined the channel [16:15] Draco_ has joined the channel [16:16] benvie: problem with Win8 is that all the js stuff is available in the sandboxed metro part [16:17] benvie: unless that's changed [16:18] benvie: if it hasn't then anything that directly implemented node would require whatever the Win8 term for rooting a phone ends up being called [16:18] benvie: otherwise it'll just be the same old talking over a socket basically as if it's a web client [16:18] cclarke has joined the channel [16:18] notifybot1 has joined the channel [16:18] benvie: because that's basically what it is [16:19] benvie: just with more access [16:20] equark has joined the channel [16:21] stuntbeard has joined the channel [16:24] boltR has joined the channel [16:24] pronam has joined the channel [16:25] hugdubois_ has joined the channel [16:26] stagas has joined the channel [16:27] Heisenmink has joined the channel [16:27] blueadept` has joined the channel [16:28] pksunkara: Command Line Arguments Specification - https://gist.github.com/1485856 [16:28] churp has joined the channel [16:28] stuntbeard: brew search ezstream [16:29] Wizek-other has joined the channel [16:30] hugdubois has joined the channel [16:30] notifybot has joined the channel [16:32] juanlargo has joined the channel [16:34] patcito has joined the channel [16:34] cclarke has joined the channel [16:35] harthur has joined the channel [16:36] pointlessjon has joined the channel [16:36] pointlessjon has left the channel [16:36] dubenstein has joined the channel [16:37] hij1nx has joined the channel [16:38] cclarke has joined the channel [16:38] iamcorpix has joined the channel [16:39] level09 has joined the channel [16:40] Puj3: Anyone working with mongo? [16:40] cclarke has joined the channel [16:41] Puj3: I'd like to write to a response in a mongo .find() callback, anyone know most elegant way to get the response object into the .find() callbacks scope [16:43] enmand has joined the channel [16:43] bls: (windows question) I write a module that need some DLL extra, but the require crash. Can i use DLLs or i have to static link them ? [16:44] malkomalko has joined the channel [16:45] fson has joined the channel [16:48] hotchkiss has joined the channel [16:49] Lingerance: Puj3: function fname(request, err, doc) {...}; cursor.next(fname.bind(null, request)) [16:49] Lingerance: Not necessary if you've got cursor.next()'s callback in scope of something that already has the request object. [16:50] Puj3: It seems I'll have to pass it down the whole chain Lingerance [16:51] defied1 has joined the channel [16:51] Puj3: db.open, db.collection, collection.find, cusor.each, will I have to bind all of those with the response [16:51] defied1: how do I read a file from my ~ path? I'm trying to use fs.readFile('~/.bashrc') but it's not working :s [16:51] Puj3: So I can have "this" context referencing the response? [16:51] Lingerance: You open on each request? [16:51] Lingerance: That seems like it'd be slow [16:52] Puj3: Ya it's slow, but so is my learning (= [16:52] Lingerance: defied1: '~/.bashrc'.replace('^~', process.env.HOME) [16:52] Puj3: Should I assign the collection I'm working with to some persistence object and just do finds on that for each request? [16:53] deoxxa: i have a stupidly simple wrapper around mongodb-native that lets me pretend to open a connection on each request [16:53] mmalecki: path.resolve does that, I think [16:53] deoxxa: ACTION grins [16:53] defied1: thanks Lingerance [16:53] Puj3: Sort of like a static singleton connection deoxxa? [16:54] defied1: mmalecki: I tried path.resolve, doesn't work, simply appends the ~ to the current directory [16:54] Lingerance: mmalecki: I does not [16:54] Lingerance: It* [16:54] deoxxa: Puj3: not really - https://github.com/deoxxa/node-mongo-getter/blob/master/lib/mongo-getter.js [16:54] boltR has joined the channel [16:55] mmalecki: Lingerance: oh? I know there was a python function to do something like that [16:55] Niro has joined the channel [16:55] Niro: Hello! how does this work exactly? :) [16:55] Puj3: That's cute deoxxa [16:55] Niro: I ask a question and some noble sole helsp me out? :D [16:56] Lingerance: soul* [16:56] Lingerance: Yes [16:56] cjm has joined the channel [16:56] deoxxa: Niro: that or call your names - it's really a lucky dip [16:56] Puj3: Alright, thanks deoxxa, Lingerance. Apprecaite it. [16:56] deoxxa: *you [16:57] Puj3: Appreciate* [16:57] cclarke has joined the channel [16:57] jerrysv has joined the channel [16:57] Niro: doexxa, I'm sorry? call my names? [16:57] Lingerance: gg [16:57] deoxxa: typo, was meant to be "you" [16:57] jerrysv: hello #node.js [16:57] deoxxa: backfired pretty bad [16:57] deoxxa: ACTION sighs [16:58] jarek has joined the channel [16:58] jarek has joined the channel [16:58] Niro_ has joined the channel [16:58] Niro_: I have no idea how that happened [16:59] Niro_: anyway - I'm trying to implement a keepalive on a pretty basic webserver [16:59] Niro_: I'm using .net to build it ant not http, so bear with me [16:59] Niro_: (this is a homework assignment so everything is pretty raw and simple) [17:00] FG has joined the channel [17:00] Lingerance: .NET questions are better answered elsewhere [17:00] Niro_: I've got my request/response js objects and I'm checking a keepalive 'flag' upon response.end() calls - if it's 'true' (i.e keepalive=true), I don't hit socket.end() [17:00] cclarke has joined the channel [17:00] Niro_: what I'm trying to figure out is if socket.setTimeout(keepalivetimeout) would do the trick for what Im trying to do [17:01] juanlargo: qq for anyone out there building big web apps [17:01] juanlargo: how are you managing your client-side code? [17:01] juanlargo: requirejs? [17:01] Niro_: client side is Chrome :) [17:02] juanlargo: maybe i should get more specific and ask if anyone is using requirejs with express [17:02] deoxxa: juanlargo: i use ender in a couple of projects, and a horrible home-grown system in a more enterprisey thing at work [17:02] Niro_: what I mean is, I hit socket.setTimeout(30000) in my server-connection event, if a client (i.e, browser) re-using the same socket comes along, will it restart the timer [17:02] Niro_: what's requrie js? [17:03] juanlargo: deoxxa: do you share code between server and client, or is it just a system to keep the client side more modular? [17:03] webben: Niro_: http://requirejs.org/ [17:03] deoxxa: juanlargo: i share code - templates and other presentation stuff mostly [17:03] juanlargo: cool, would you recommend looking into ender? [17:03] cclarke_ has joined the channel [17:03] deoxxa: i would, it's quite nice to use [17:04] deoxxa: http://ender.no.de/ if you hadn't already found it [17:04] Niro_: webben, this is a debugging tool? [17:04] webben: Niro_: No. [17:04] Niro_: So waht is that? [17:04] Niro_: I'm not allowed to use any external libraries :) [17:04] juanlargo: Niro_: it's for managing your code in a modular fashion [17:05] deoxxa: Niro_: it's unrelated to your question [17:05] Niro_: Oh [17:05] deoxxa: (there are people other than you in here) [17:05] Niro_: I know, but he referenced me when he linked that. [17:05] Niro_: So I asked. [17:05] deoxxa: because you asked about it ._. [17:05] deoxxa: ACTION is confused [17:05] Niro_: Oh, hehe. [17:06] Niro_: my bad. [17:06] juanlargo: Anyways, I dig the commonJS approach and wanted to approximate that on the client side [17:06] cclarke has joined the channel [17:06] juanlargo: but have been reading that some folks aren't down with that as a long term solution [17:06] webben: Niro_: You're not allowed to use any external libraries? [17:07] juanlargo: so just thought i'd see if anyone in here had experience either way [17:07] Niro_: No, as I said, this is a homework assignment for university. [17:07] webben: ah ok [17:07] Niro_: My question is pretty much, how would you write a keepalive mechanism. [17:07] notifybot has joined the channel [17:07] Niro_: When I open up chrome and log onto my sever, I get blasted by around 10 simultaneous connections, each getting its own socket. [17:07] Niro_: Will any of those be re-used if I have keepalive on? [17:08] deoxxa: juanlargo: well, there's some limitations with the require() approach - mainly that you can't inject stuff into the require()'d module [17:08] deoxxa: not simply, anyway [17:08] Niro_: I need to make sure they do. I was thinking about socket.setTimeout upon node.Server listening events. [17:09] descipher has joined the channel [17:09] deoxxa: Niro_: i don't quite get what node has to do with your .net server... can you explain how they're related? [17:09] Niro_: my server is written in node.js? [17:09] Niro_: using the .net module [17:09] AndreasMadsen has joined the channel [17:09] Niro_: I noted that because most of the examples over the internet use the .http module. [17:10] Niro_: i.e, node.js .net module, not MS.Net :P [17:10] mattgifford has joined the channel [17:10] FG_ has joined the channel [17:10] kwmiebach has joined the channel [17:10] synkro has joined the channel [17:12] catb0t has joined the channel [17:12] juanlargo: deoxxa: thanks for the tips, much appreciated [17:12] juanlargo: happy holidays, folks [17:12] deoxxa: juanlargo: no problem :) [17:12] deoxxa: Niro_: ohh, that makes more sense [17:13] butu5 has joined the channel [17:13] Niro_: yeah :) [17:13] r04r has joined the channel [17:13] butu5: Hey guys.. I created a simple chrome notificaation which listen to this irc channel [17:13] hugdubois_ has joined the channel [17:13] butu5: any one want to try? give me some suggeston? [17:13] Tom_ has joined the channel [17:13] butu5: developed using node.js and socket.io [17:14] Niro_: doexxa, am I right in my assumption? if my server implements keepalive correctly, Chrome will reuse open sockets in its next reqeust from my server? [17:17] deoxxa: Niro_: it's hard to tell - you might want to try curl [17:17] FG has joined the channel [17:17] deoxxa: Niro_: curl will definitely use a single connection and keepalive [17:18] stephen has joined the channel [17:19] satyr has joined the channel [17:19] asteros has joined the channel [17:19] Niro_: Okay [17:19] hugdubois has joined the channel [17:19] Niro_: But am I right to assume that when I do 'socket.setTimeout(...)' each time a new socket is initiated - that if the browser reuses an old socket, the timer will be restarted? [17:19] Niro_: i.e, is that the way net.Socket.setTimeout() works? [17:20] Niro_: the whole reason i"m asking this is because socket.setKeepAlive doesn't seem to do what I need/want. [17:20] r04r has joined the channel [17:21] deoxxa: you won't get two separate connection events, you know that, right? [17:21] thax has joined the channel [17:21] deoxxa: setTimeout() just affects the connection timeout as far as i know [17:21] omenkzz has joined the channel [17:21] deoxxa: so long as you don't actually close the socket (and the client doesn't close it), it won't just be "cleaned up" or anything [17:21] deoxxa: that's not how TCP works [17:22] omenkzz: hello [17:22] cclarke has joined the channel [17:23] omenkzz: how to get friends with node-xmpp [17:23] omenkzz: thans master [17:23] Niro_: hmm [17:23] Niro_: yeah, well that makes sense [17:24] brianseeders has joined the channel [17:24] Niro_: actually it makes a lot of sense. [17:24] Niro_: So, I need a way to restart the timer in case the client sends me a new reqeust. [17:24] omenkzz_ has joined the channel [17:24] llrcombs: ACTION should set up a plugin to correct the grammar of any line matching the regex "how to .* thank*s" [17:25] Niro_: but a new request WILL initiate a new connection event (and a new socket), won't it? [17:25] omenkzz_: i will get friends in google talk with node-xmpp [17:25] Astro: omenkzz: jabber:iq:roster request [17:25] omenkzz_: waw astro [17:25] omenkzz_: ttanks astro [17:25] omenkzz_: thanks astro [17:25] omenkzz_: i use your node-xmpp [17:25] omenkzz_: :) [17:26] r04r has joined the channel [17:26] enmand has joined the channel [17:26] cclarke has joined the channel [17:26] lupomont_ has joined the channel [17:27] N0va` has joined the channel [17:27] Astro: you're lucky to catch me on the autobahn when we uave a 900kb/s internet link [17:28] Astro: anyone here up for a node meetup at #28c3? [17:28] cclarke has joined the channel [17:29] butu5: in socket.io, Broadcasting means sending a message to everyone else except for the socket that starts it. [17:29] butu5: I want to send the msg to the socket that starts it [17:29] omenkzz: waw [17:29] mattgifford has joined the channel [17:30] pickels_ has joined the channel [17:30] omenkzz: astro,, i need node-xmpp-client? [17:30] Astro: depends [17:30] Astro: node-xmpp leaves the higher-level stuff to you [17:30] r04r has joined the channel [17:31] omenkzz: woo [17:31] omenkzz: oww [17:32] Astro: use -client unless you want to dive into XMPP [17:32] omenkzz: i try make facebook chat with node-xmpp [17:32] Astro: xmpp is a nice protocol, give it a shot ;) [17:32] cclarke has joined the channel [17:33] omenkzz: i try make facebook chat with node-xmpp too [17:33] ChrisMatthieu has joined the channel [17:33] Astro: it's decenyralized, unlike FB [17:33] omenkzz: i use https://gist.github.com/1267770 [17:33] omenkzz: but failed [17:33] omenkzz: :) [17:34] chapel: butu5: io.sockets.emit [17:34] chapel: that sends to all connected sockets [17:34] chapel: if you want to send to just the socket that you are dealing with, then socket.emit [17:35] tomasztomczyk has joined the channel [17:35] butu5: chapel: ohh thanks a lot :) I am reading a bit about broadcast.. but this make sense [17:35] butu5: let me try [17:35] tommyvyo has joined the channel [17:35] mandric has joined the channel [17:35] chapel: io = whatever you named the io server variable [17:35] chapel: in examples its always io [17:36] chapel: and io.sockets is all connected sockets [17:36] cclarke has joined the channel [17:36] Tom_: Is this a common error when using inputStream.write ? https://gist.github.com/1521693 [17:36] jetienne has joined the channel [17:36] notifybot1 has joined the channel [17:38] josh-k has joined the channel [17:38] r04r has joined the channel [17:38] notifybot2 has joined the channel [17:38] cclarke has joined the channel [17:39] notifybot3 has joined the channel [17:39] Lingerance: Tom_: You're supposed to read from inputstreams [17:40] kishoreyekkanti has joined the channel [17:40] Tom_: Lingerance: eh, how does that make sense? I'm talking about streams like stdin. They can be written to. [17:40] Leemp has joined the channel [17:40] aliem has joined the channel [17:40] deoxxa: you can not write to stdin [17:40] Lingerance: input means input comes from outside of the application (IE the data is coming in) [17:41] kriszyp has joined the channel [17:41] deoxxa: or at least - you should not write to stdin [17:41] omenkzz_ has joined the channel [17:41] Lingerance: output means data is leaving the applicate (IE the data is going out) [17:41] deoxxa: the ability to break the user's hands would be cool though [17:41] cclarke has joined the channel [17:41] pauls1 has joined the channel [17:41] Tom_: Lingerance: of course the data is coming in, its coming in because I am writing to the application [17:41] Tom_: I'm talking about stdin of a child process [17:42] Tom_: not stdin of the node process [17:42] Lingerance: child.stdin is an outputStream to the parent [17:42] Tom_: oh, well in that case pardon my terminology [17:42] Tom_: I meant child.stdin [17:43] Lingerance: Eitherway, data is undefined there. [17:44] r04r has joined the channel [17:44] Leemp: What the general disctinction/difference between say, process.cwd() and whatever working directory fs.realpath('.') is using? (For example, i can set process.chdir('/somedir') and yet fs.realpathSync('.') does not reflect /somedir. Thoughts? [17:45] notifybot4 has joined the channel [17:45] Lingerance: AFAICT each module has its own cwd. [17:46] Skola has joined the channel [17:46] cognominal has joined the channel [17:46] omenkzz_ has joined the channel [17:46] metalball2 has joined the channel [17:47] Leemp: Ah hah, i just ran that test [17:47] mmalecki: has anyone tried recording audio in node? [17:47] mmalecki: like, natively, without calling shell commands? [17:48] Leemp: So, what distinction does a process have? For example, in one module you can set process.chdir('/mydir'), but then in another module if you run process.cwd(), it's not /mydir [17:49] Leemp: Is each process essentially each synchronous task? [17:50] notifybot5 has joined the channel [17:52] jarek_ has joined the channel [17:52] ChrisMatthieu has joined the channel [17:52] stagas: Leemp: there's one process object per process, so this shouldn't happen [17:53] Leemp: stagas: Well, i'm using nodeunit, so that may have something to do with it.. not sure [17:55] Leemp: Either way, between an index.js file, and a module in that dir (the index.js runs first), process.chdir('blah') doesn't get reflected in the module [17:55] Leemp: oo, process has a pid, i'll run that real quick [17:57] Leemp: Eegads, ty stagas! I was mistaken! module was running first! [17:57] Leemp: Very odd. I would have sworn index ran first.. seeing as it's the index of the directory. [17:58] louissmit has joined the channel [18:00] butu5 has joined the channel [18:00] notifybot has joined the channel [18:00] tab1293 has joined the channel [18:00] notifybot2 has joined the channel [18:01] tab1293: im trying to install zmq by npm install zmq but i get the error that the node path can not be found [18:01] tab1293: node is definitely installed on my system though [18:02] madhums has joined the channel [18:03] ChrisMatthieu has joined the channel [18:03] stagas: Leemp: maybe index.js requires the module at the top? [18:03] fly-away has joined the channel [18:04] Leemp: stagas: Ya.. i'm just going to stick my head in the sand for the rest of the day. ty :) [18:05] V1 has joined the channel [18:06] cjroebuck has joined the channel [18:06] Leemp: stagas: On a side note, if you require a module by relative directory.. require('../mymodule.js'), does that relative directory get calculated in the context of the process.cwd()? Or is it relative to the file using require, completely separate from the cwd? [18:06] stagas: Leemp: it's relative to the file using require [18:06] Leemp: Lovely, ty :) [18:08] MUILTR has joined the channel [18:09] tab1293: does anoyne have zmq installed form node? [18:10] stagas: Leemp: and __dirname is the current script's directory [18:11] mandric has joined the channel [18:11] jbpros has joined the channel [18:11] Leemp: Yup :), i noticed it was absolute aswell, double bonus [18:11] jlank: is the nodeup podcast on a schedule of any sort? I'd like to be in the irc for #10 [18:12] sleeploud has joined the channel [18:13] JaKWaC has joined the channel [18:17] herbySk has joined the channel [18:18] brianloveswords has joined the channel [18:18] FG has joined the channel [18:20] teadict: lawl http://lab.hakim.se/zoom-js/ [18:21] JaKWaC has joined the channel [18:22] m00p has joined the channel [18:22] ChrisMatthieu: teadict: Very nice! [18:23] teadict: kind of cool, huh [18:23] jlank: thumbs up :) [18:23] ChrisMatthieu: just tweeted about it [18:23] devongovett has joined the channel [18:24] orospakr has joined the channel [18:25] rodrigovieira has joined the channel [18:25] orospakr: Hi! What are folks' favourite job/promise modules? q is utterly ungooglable, seq appears broken and annoying, and async so far looks the most solid. [18:26] mmalecki: orospakr: haven't used it, but I've heard it's good: https://github.com/medikoo/deferred [18:28] tomgallacher has joined the channel [18:29] Wizek-other2 has joined the channel [18:29] lincolnn has joined the channel [18:29] lincolnn: happy holidays [18:30] orospakr: mmalecki, thanks :) [18:31] tab1293: can node send data to be downloaded by the clients browser onto the users computer? [18:32] Druid_ has joined the channel [18:32] Druide_ has joined the channel [18:33] omenkzz_ has joined the channel [18:34] Pritchard has joined the channel [18:34] Morkel has joined the channel [18:35] Pritchard has left the channel [18:35] ryan_stevens has joined the channel [18:37] Pritchard has joined the channel [18:37] Pritchard: How would I structure a LAMP-equivalent production environment if I use Node.js as my server instead? [18:37] subbyyy has joined the channel [18:38] ben_alman: i'm trying to use nave on os x 10.7 do install node, and when i do nave install 0.5.10 it dies with: /Users/cowboy/.nave/src/0.5.10/wscript:366: error: Could not autodetect OpenSSL support. Make sure OpenSSL development packages are installed. Use configure --without-ssl to disable this message. [18:38] ben_alman: any suggestions? [18:39] redir_ has joined the channel [18:41] chapel: ben_alman: why 0.5.10? [18:41] chapel: and have you tried other versions? [18:41] ben_alman: i wanted to install the latest 0.5 to test something [18:41] ben_alman: hmmn no, let me [18:41] hij1nx: ben_alman: why not just use the osx installer? ;) [18:41] ben_alman: hij1nx: i'm writing an automated installer [18:42] hij1nx: ben_alman: ooo, nice [18:42] ben_alman: why not use nave, a tool meant for installing multiple versions of nopde simultaneously [18:42] chapel: ben_alman: 0.5 is the working branch for 0.6 [18:42] ben_alman: chapel: i don't understand what that means [18:42] chapel: everything that is in 0.6 came from 0.5 [18:43] chapel: odd branches are 'experimental' [18:43] chapel: even are stable [18:43] chapel: now that 0.6 is out [18:43] chapel: you shouldn't even look at 0.5 [18:43] hij1nx: ben_alman: not really sure i have the need for it [18:43] ben_alman: gotcha [18:44] hij1nx: ben_alman: usually if i need to switch, i just conf/make/instal [18:44] subbyyy has joined the channel [18:44] ben_alman: nave install 0.4.12 just dies [18:44] omenkzz_ has joined the channel [18:44] storrgie has joined the channel [18:44] nyuszika7h has left the channel [18:44] jbpros has joined the channel [18:45] Brandon_r has joined the channel [18:48] criswell has joined the channel [18:49] Cromulent has joined the channel [18:49] lupomontero has joined the channel [18:52] tomgallacher has joined the channel [18:52] ben_alman: well, nave seems pretty broken [18:55] oddmunds has left the channel [18:58] orospakr: ugh, I wish that readdir() on node returned the inode and type of each item in the directory, like the standard UNIX one it is obviously backed by. [18:58] larsschenk1 has joined the channel [18:58] orospakr: It means that you often have to call stat() on each entry in order to determine that it's a directory. [18:59] orospakr: (if you want to recurse, say) [18:59] mmalecki: orospakr++ [18:59] orospakr: vindication ;) [19:01] davetayls has joined the channel [19:01] lincolnn has left the channel [19:01] stagas has joined the channel [19:02] boltR has joined the channel [19:02] maushu has joined the channel [19:03] jomoho has joined the channel [19:04] hij1nx_ has joined the channel [19:04] dwhittle has joined the channel [19:06] ben_alman: i can't make older versions of node on osx 10.7 because openssl isn't installed... hrmn [19:06] wbednarski has joined the channel [19:09] Renegade001 has joined the channel [19:09] NHQ has joined the channel [19:10] NHQ: hollar [19:11] Skola has joined the channel [19:12] rgl has joined the channel [19:12] mandric has joined the channel [19:15] NHQ: how does one add a chunk of 8bit integers (an array buffer) to an existing node,js buffer? [19:16] ben_alman: anyone here building node on osx 10.7 with openssl? [19:16] Lingerance: buffer.writeUint8() [19:17] devdazed: hi all, is there any built-in method for packing binary in nodejs? [19:17] NHQ: @Lingerance does that only write a single 8bit integrer, or will it write a whole an array of them? [19:17] devdazed: similar to python's struct.pack [19:18] devdazed: or java's bytebuffer [19:18] Lingerance: NHQ: you loop. [19:18] Lingerance: defied1: Buffer objects [19:19] defied1: devdazed: ^ :) [19:19] NHQ: @Lingerance ok, that what I thought. was hoping there was a way to write chunks at a time like with buffer strings [19:19] devdazed: how can i specify in the buffer object how I want it packed though? [19:20] devdazed: for instance if I want to pack a long or a short etc [19:20] ChrisMatthieu has joined the channel [19:20] Lingerance: writeUint32 for uint32_t, there's stuff for floats and such [19:21] cognominal has joined the channel [19:21] devdazed: thanks [19:22] agnat_ has joined the channel [19:23] kishoreyekkanti has left the channel [19:23] adrianF has joined the channel [19:23] satyr has joined the channel [19:23] idefine has joined the channel [19:24] corpix has joined the channel [19:28] jergason has joined the channel [19:31] hij1nx has joined the channel [19:37] shripadk has joined the channel [19:38] RLa has joined the channel [19:38] Destos has joined the channel [19:39] Renegade001_ has joined the channel [19:39] jbpros has joined the channel [19:40] Gregor has joined the channel [19:40] macav has joined the channel [19:43] igl has joined the channel [19:43] FG has joined the channel [19:44] diminoten has joined the channel [19:45] TheJH has joined the channel [19:48] lmatteis: can anyone help me understand what streams are in node [19:48] lmatteis: or generally what a stream is [19:51] Pritchard has left the channel [19:51] Pritchard has joined the channel [19:51] isufy has joined the channel [19:51] Pritchard: lmatteis: Well, in general a stream is just a buffer of data. [19:52] lmatteis: hrm ok [19:52] teadict: streams are data, but they are streams because there's something watching that data going through [19:52] lmatteis: what do you mean "something watching" [19:52] lmatteis: like in C to do an http request i read "buffers" of data until the entire request length is read [19:52] lmatteis: is that a stream? [19:53] Pritchard: lmatteis: Yeah. I mean, C/C++ even uses the term stream. [19:53] diminoten has joined the channel [19:53] teadict: yes.. only there, you're just waiting for the data to go through [19:53] teadict: sometimes, whatever is watching the data go through, is waiting for some pattern or someting [19:53] lmatteis: what do you mean? can you give me an example? [19:54] teadict: take a JSON string.. full of html tags [19:54] teadict: you want to collect the img's [19:54] teadict: you watch the stream of json and take the img [19:54] Gregor has joined the channel [19:55] teadict: and assign an event to that capturing of a img tag [19:55] lmatteis: so "watching" is basically something that gets called (a callback) when a chunk of data is read? [19:55] teadict: to add it to a list of images on the clietn side [19:55] teadict: yes [19:55] teadict: when a stream is analyzed [19:55] teadict: and so on [19:55] teadict: at least, that's what I understand... [19:56] Renegade001 has joined the channel [19:56] jsurfer has joined the channel [19:56] Pritchard: lmatteis: Just consider the bare minimal requirement of calling something a stream to be a buffer. [19:57] lmatteis: i don't understand [19:57] Pritchard: You seemed okay up until just a moment ago. [19:57] Pritchard: What happened? [19:57] teadict: forget about my silly example [19:57] lmatteis: that last statement was referred to your phrase [19:57] Pritchard: Okay. I'll reword it. [19:58] Pritchard: If you have a buffer, you may just have a stream, depending on context. [19:58] Pritchard: The fact is, programmers throw (some) jargon around loosely. [19:58] lmatteis: okay [19:58] Pritchard: In rigorous models, a stream will be rigorously defined. In more loose models, you might call something a "stream" just because of how it's used, or because "buffer" was already taken. [19:58] teadict: buffer(stream(data)) [19:59] Pritchard: teadict: Thanks. [19:59] teadict: one contains the other [19:59] Pritchard: But doesn't stream(buffer(data)) make more sense? [19:59] teadict: I think I placed them in terms of functionality [19:59] Pritchard: A buffer is just an array of data, a stream may have specifications as to how it should be formatted. [19:59] teadict: a buffers does something with the stream [19:59] teadict: a stream by itself is just data passing through [20:00] teadict: but yes, could be too, there's only information! [20:00] teadict: and we ruin it with tags ): [20:00] Pritchard: Heh. [20:01] Pritchard: What are you suggesting, that we come up with an unambiguous, tagless language? [20:01] lmatteis: i thought the term stream was not referred to simple data but the flow of data [20:01] teadict: I'm suggesting we need Telephaty like RIGHT NOW [20:01] teadict: it's time already dammit [20:01] macav has joined the channel [20:01] Pritchard: lmatteis: Well, streams can be thought of as coming from somewhere or going somewhere. [20:01] teadict: *pathy [20:01] Pritchard: In C/C++, you have input streams like stdin and stdout. [20:01] skoom has joined the channel [20:02] diminoten has joined the channel [20:02] Pritchard: s/input streams/i\/o streams [20:02] Pritchard: So yes. The application matters. [20:04] Pritchard: But ultimately, a stream is just a buffer of data, like anything else we do in computing. We just have sets of data, with some kind of formatting specification, and we do something with that set. [20:04] Pritchard: ... Sometimes I think the fundamentals of computing are lost in abstractions. [20:04] lmatteis: so in context of Node? [20:04] lmatteis: what's useful for me to know? [20:04] Pritchard: lmatteis: I think that if the term "stream" concerns you so much, you need to start building actual applications. [20:05] Pritchard: Because this is a nuance. [20:05] Pritchard: It's petty. [20:05] lmatteis: it's not concerning me much [20:05] lmatteis: however it popus in the Node api [20:05] hipsters_ has joined the channel [20:05] Pritchard: I think we've answered enough of your questions on streams, as well as had a friendly discussion on the matter. [20:06] wbednarski has joined the channel [20:07] Leemp: What's the api call to check if a directory exists? fs.stat() seems to gather information, and if all you want is to know if it exists or not, it seems a bit wasteful [20:08] jergason has joined the channel [20:08] VICODAN has joined the channel [20:09] subbyyy has joined the channel [20:12] shinuza has joined the channel [20:12] NHQ: I've got one: is it possible to concat two new Buffer(Array);s? [20:12] FG_ has joined the channel [20:13] TheJH: NHQ, you want to concat buffers? [20:14] Dulak has joined the channel [20:14] tjfontaine: https://github.com/coolaj86/node-bufferjs/blob/master/bufferjs/concat.js [20:14] TheJH: NHQ, var bigbuffer = new Buffer(buf1.length+buf2.length); buf1.copy(bigbuf); buf2.copy(bigbuf, buf1.length) [20:16] mattgifford has joined the channel [20:17] caioketo has joined the channel [20:18] strevat_ has joined the channel [20:18] wok has joined the channel [20:19] wok: hi guys. following the docs on http.get(), does the res object fire any sort of finish event when all thebody has been recieved? [20:20] mansoor: wok: you can give it a callback [20:21] fangel has joined the channel [20:21] wbednars_ has joined the channel [20:21] wok: yes, and and the callback send the res object as the parameter, to which you bind to the 'data' event [20:21] NHQ: @TheJH yes i do, is it possible? i would like to do it in place of looping [20:21] wok: but.. how do i know when all the 'data' events have compeleted? [20:22] wok: or am i missing something completely here [20:22] tuhoojabotti: wok: on end [20:22] wok: end [20:22] tuhoojabotti: https://github.com/VesQ/cbNetwork-node/blob/master/src/HTTP.js :D [20:22] TheJH: NHQ, if you know you only have two buffers, the code I posted should work [20:22] wok: thank you [20:22] tuhoojabotti: Hmm [20:23] tuhoojabotti: I don't think that code is even tested, oh well. [20:24] NHQ: #TheJH actually I will have many buffers, but i can loop buffer.copy, and save a step (additionally of loops) [20:25] cognominal_ has joined the channel [20:26] CarterL has joined the channel [20:26] NHQ: thanks! @TheJH [20:27] wok: tuhoojabotti: is it 'end' for nodes HTTP module, or just that code module you linked to? as 'end' isnt firing here :/ [20:27] wok: oh wait.. logic fail [20:27] sh1mmer has joined the channel [20:28] wok: thans tuhoojabotti :) [20:28] tuhoojabotti: lost internet [20:29] tuhoojabotti: wok: I said that code wasn't tested :D [20:29] wbednarski has joined the channel [20:29] windsurf_ has joined the channel [20:29] wok: yea, i wasnt using that code :p [20:29] Wizek-other has joined the channel [20:29] tuhoojabotti: ye [20:29] rurufufuss has joined the channel [20:29] socketio\test\95 has joined the channel [20:29] tuhoojabotti: argh [20:29] tuhoojabotti: I need internet :( [20:29] wok: just needed the 'end' event. and actually binded to the right object >.< [20:30] tuhoojabotti: hehe [20:30] tuhoojabotti: damn storm breaking everything [20:31] tuhoojabotti: wok: http://urly.fi/wQ [20:32] wok: oh.. it is in the docs.. [20:32] tuhoojabotti: Yup [20:32] tuhoojabotti: ;) [20:33] criswell has joined the channel [20:33] tuhoojabotti: Well, good night ya'll [20:33] draginx has joined the channel [20:33] booo has joined the channel [20:33] jgornick has joined the channel [20:34] sharkbird has joined the channel [20:35] sharkbird has joined the channel [20:35] windsurf_ has left the channel [20:36] boltR has joined the channel [20:37] sharkbird has joined the channel [20:37] postwait has joined the channel [20:39] Sam29 has joined the channel [20:40] sharkbird has joined the channel [20:40] Morkel has joined the channel [20:41] sharkbird has joined the channel [20:41] swanky has joined the channel [20:42] mattgifford has joined the channel [20:42] swanky: have anyone used modules jsdom and request to capture ajax populated content, and possibly could point me to example. [20:47] mandric has joined the channel [20:47] CarlosC has joined the channel [20:48] charlenopires has joined the channel [20:48] enmand has joined the channel [20:48] windsur__ has joined the channel [20:53] isufy has joined the channel [20:53] JaKWaC has joined the channel [20:54] slloyd_air has joined the channel [20:55] flip_digits has joined the channel [20:58] daneroo has joined the channel [21:00] mandric has joined the channel [21:00] daneroo has joined the channel [21:01] p1d has joined the channel [21:02] NHQ has joined the channel [21:03] NHQ: I'm having an NPM error after installing with the Mac OSX Node 0.6.6: https://gist.github.com/1522109 [21:04] pauls1 has joined the channel [21:04] NHQ: That also happened after building 0.6.6 on my own :\ [21:05] TheJH: NHQ, what do `node -v` and `npm -v` say? [21:05] NHQ: @TheJH node version 0.6.6 npm --v error [21:06] nerdfiles1 has joined the channel [21:06] TheJH: NHQ, `grep version /Users/elenagragasin/local/node/lib/node_modules/npm/package.json` [21:06] nerdfiles1 has left the channel [21:07] NHQ: "version" : "1.0.8" [21:07] no_u0 has joined the channel [21:07] TheJH: NHQ, ugh, that's pretty old [21:07] TheJH: NHQ, update npm [21:07] pauls1 has joined the channel [21:07] NHQ: :^U [21:08] daneroo has joined the channel [21:08] NHQ: i tried installing it with the old sudo curl | sh and I still had problems [21:08] NHQ: will try again [21:08] TheJH: NHQ, "the old sudo curl | sh" is an old mistake [21:08] charlenopires has joined the channel [21:09] TheJH: NHQ, don't sudo the curl, sudo the sh [21:09] TheJH: NHQ, you need root rights for installing, not for downloading [21:09] daneroo: Anyone know a way to restrict/force dnode (over socket.io) to using xhr-polling (doesn't seem to fall back gracefully when deploying on cloudfoundry) [21:09] NHQ: ooooooh [21:10] NHQ: i mean, that is obvious ^__^ [21:10] TheJH: NHQ, don't worry, a lot of people ran into that before :D [21:10] NHQ: should i clone the gut, curl or which? [21:10] TheJH: *git ? :P [21:10] TheJH: curl [21:10] mbrevoort has joined the channel [21:11] TheJH: install from git only if you want git head or so [21:11] adambeynon has joined the channel [21:12] StanlySoManly has joined the channel [21:12] MUILTR has joined the channel [21:12] NHQ: @theJH this exploded all up in my terminal: curl http://npmjs.org/install.sh [21:12] TheJH: NHQ, huh? [21:12] daneroo: Any on used dnode on cloudfoundry (node.js) ? [21:13] TheJH: NHQ, you mean, you didn't append the `| sudo sh`? [21:13] NHQ: correct [21:13] NHQ: should I have? [21:13] TheJH: yes [21:13] TheJH: !@NHQ mem npm-install [21:13] jhbot: NHQ, you can install npm by doing "curl http://npmjs.org/install.sh | sudo sh". If you don't feel comfortable piping data from http in a sudo'ed shell (which really isn't a good idea), you can also download it, look at it and then pipe it in the shell. [21:15] louissmit_ has joined the channel [21:16] daneroo has joined the channel [21:16] Sam29 has left the channel [21:16] NHQ: @ThJH I did it the curl | sudo sh way, seems to install, still got error : https://gist.github.com/1522109 [21:16] devaholic has joined the channel [21:17] arpunk has joined the channel [21:18] admc has joined the channel [21:19] Agos has joined the channel [21:19] NHQ: still old version too [21:21] NHQ: make install-ing form git repo, seeing lines, taking long time [21:22] NHQ: *from [21:22] TheJH: NHQ, hmm, ok, I guess you now have two versions installed [21:22] TheJH: NHQ, the git repo won't help with that [21:22] TheJH: pretty sure [21:22] jocafa has joined the channel [21:22] zemanel has joined the channel [21:22] NHQ: maybe I have a stale $PATH or something? [21:23] TheJH: NHQ, no, you really have two versions installed [21:23] Vennril has joined the channel [21:23] TheJH: NHQ, what does `which npm` or `whereis npm` or so say? [21:23] Sorella has joined the channel [21:25] NHQ has joined the channel [21:26] wink has joined the channel [21:27] malkomalko has joined the channel [21:27] NHQ has joined the channel [21:27] Pritchard has left the channel [21:27] NHQ: #TheJH /Users/elenagragasin/local/node/bin/npm [21:28] daneroo has joined the channel [21:28] TheJH: NHQ, hmmm... maybe try renaming that file, then try running npm again? [21:28] jocafa: http://links.evilmadscientist.com/post/14793012972/programmer-ryan-gosling [21:30] NHQ: renaming the npm folder? [21:30] NHQ: no luck [21:30] Heisenmink_ has joined the channel [21:30] CarterL has joined the channel [21:31] TheJH: NHQ, :( [21:31] TheJH: NHQ, maybe you'll have to wait for isaacs to show up... [21:32] TheJH: uh, -NickServ- Last seen : Dec 22 07:20:30 2011 (4 days, 14:11:24 ago) [21:32] TheJH: or not wait for him... [21:32] no_u0 has joined the channel [21:32] TheJH: NHQ, open a github issue [21:33] NHQ: ok [21:34] NHQ: actually to helll with it, i'm downloading all my modeuls from now on [21:34] windsurf_ has joined the channel [21:37] satyr has joined the channel [21:39] dwhittle has joined the channel [21:40] TooTallNate has joined the channel [21:41] jsvana has joined the channel [21:41] jsvana: What is the recommended package for session management without express? [21:42] meandi3 has joined the channel [21:43] idefine: when trying to do an npm link I get permissions denied, is there some setting i can change so that the directory it creates the link in has permissions? what is the directory it is trying to create the link in in the first place? [21:44] jorgen_ has joined the channel [21:44] rgl has joined the channel [21:44] GrizzLyCRO has joined the channel [21:45] MrMaksimize has joined the channel [21:45] jorgen_: Does anyone have experience with Heroku and socket.io? Couldn't find my answer on stackoverflow :) [21:45] dennisjbell has joined the channel [21:47] jsvana: jorgen_: A little experience with socket.io, yeah [21:47] TimTim has joined the channel [21:49] IvanoffCSI has joined the channel [21:49] nateweiss has joined the channel [21:49] jorgen_: okey, I want to create a chat application using socket.io, that part is quite straightforward... I want to use Heroku to host the application. My key question is: how does scaling work? I suppose each Heroku dyno can only process a limited number of channels [21:50] sirwan: anyone know if centOS is worth installing over ubuntu for Nginx and NodeJS ? [21:50] sirwan: I'm really looking for an OS that uses the most optimal amount of memory [21:50] bnoordhuis has joined the channel [21:52] Dmitrijus: sirwan: they both run the same kernel [21:52] TheJH: idefine, "sudo npm link" [21:52] jorgen_: I want each heroku dyno to serve a limited number of chat channels; dyno 1 all channels starting with 'a', dyno 2 all channels starting with 'b' etc... [21:52] sirwan: Dmitrijus: I heart that ubuntu uses considerably more memory [21:53] idefine: TheJH: I don't have root, I figured it out, I changed the prefix config in my npmrc [21:53] sirwan: heard* [21:53] idefine: TheJH: thanks though [21:54] Dmitrijus: sirwan: nah, while it is possible (due to -Os and shit like that), it is unlikely, just use the distro you like the most [21:54] davetayls has joined the channel [21:55] Dmitrijus: sirwan: and there are like dozens of various parameters in the kernel for tweaking, if you really want performance :) [21:57] fomatin has joined the channel [21:57] Aria has joined the channel [21:57] sirwan: what kind of things are attributed to 'preference' in choosing a distro ? [21:57] sirwan: Dmitrijus: [21:57] mattgifford has joined the channel [21:58] sirwan: what os are you running ? [21:58] Dmitrijus: sirwan: mostly it's not-having-a-headache-while-maitaining [21:58] djbell has joined the channel [21:58] Aria: Is there a way to send file descriptors over unix domain sockets at all now in node 0.6? [21:59] idiotic_idioms has joined the channel [21:59] jsvana: jorgen_nl: unfortunately, I don't have any experience with heroku... [21:59] jorgen_nl: bummer :) [22:01] jerrysv has joined the channel [22:02] neurodrone has joined the channel [22:02] jorgen_nl: jsvana: but you do have socket.io experience... I can use the .of method for creating chat channels dynamically? [22:02] fomatin_ has joined the channel [22:05] mandric has joined the channel [22:05] jorgen_nl: bnoordhuis: Since you're Dutch as well: do you know of any node.js meetup in The Netherlands? I've had contact with Lieke from Cloud9, and they are willing to host an event in their Amsterdam office and provide some beer :) [22:06] tk has joined the channel [22:07] zzak: Good evening and happy holidays! [22:07] enmand has joined the channel [22:08] bnoordhuis: jorgen_nl: i don't know of any node exclusive meetups [22:08] MUILTR has joined the channel [22:09] bnoordhuis: jorgen_nl: i've been to c9's offices, it's not big but probably big enough to host a hackathon for up to twenty people [22:10] zenazn has joined the channel [22:11] jorgen_nl: bnoordhuis: sounds great to me. I'm still a beginner and I find it quite hard to find people in Holland who've spend time using node.js. Would you participate if such an event is organized? [22:11] bnoordhuis: jorgen_nl: sure, i'll drop by [22:13] jorgen_nl: bnoordhuis: Yesterday I did a quick search on the GoT forum (after years of inactivity), less then 10 hits for node.js. :/ [22:15] thax has joined the channel [22:15] jorgen_nl: bnoordhuis: do you happen to know if I should interpret Heroku web dyno's as different processes running a node instance. Each request I send to the server can be processed by any of the two web dyno's and I cannot tell which is going to process the request? [22:15] zzak: bnoordhuis: i've been following #2106, will this be merged with patches like 045bfe0 or would you accept a patch for this? [22:16] IrishGringo has joined the channel [22:18] bnoordhuis: zzak: i think koichi already submitted a patch for that. or am i missing something? [22:18] bnoordhuis: jorgen_nl: sorry, i don't use heroku [22:18] wink has joined the channel [22:19] zzak: bnoordhuis: i may be mistaken, but the hash.update patch came before koichi's docs were merged [22:19] isufy has joined the channel [22:19] zzak: it doesn't include the default input_encoding [22:20] dharmesh has joined the channel [22:20] bnoordhuis: zzak: oh, i see what you mean [22:21] mike5w3c has joined the channel [22:21] bnoordhuis: zzak: https://github.com/koichik/node/commit/882a89e#L2R54 <- it's in the description [22:21] satyr has joined the channel [22:22] zzak: bnoordhuis: doh [22:22] zzak: my mistake [22:23] dharmesh_ has joined the channel [22:23] macav has joined the channel [22:23] cody-- has joined the channel [22:25] xyos has joined the channel [22:25] neurodrone has joined the channel [22:26] zzak: bnoordhuis: thanks for clearing that up [22:26] bnoordhuis: zzak: my pleasure [22:27] Cromulent has joined the channel [22:28] hij1nx has joined the channel [22:29] MUILTR has joined the channel [22:30] Puj3: Ahhh, help, the favicon.ico requests are attacking me! [22:30] Puj3: I'd be grateful if anyone could help me circumvent them so I can see the responses from my other requests.. [22:31] CIA-109: node: 03Ben Noordhuis 07v0.6 * r70e6f3f 10/ doc/api/http.markdown : docs: document http.Server.close() semantics - http://git.io/6ZJD9g [22:31] cmr: Puj3: ... | grep -v "favicon.ico" [22:31] wink has joined the channel [22:33] Puj3: Ouch. Thanks cmr.. I wasn't lookin through logs, I was actually viewing in a browser, but I just realized I'm STILL an idiot. [22:33] martndemus has joined the channel [22:33] Puj3: Much obliged. [22:36] nateweiss has left the channel [22:36] mikeal has joined the channel [22:36] wink has joined the channel [22:37] tk has joined the channel [22:37] sh1mmer has joined the channel [22:45] mbrevoort has joined the channel [22:46] avalanche123 has joined the channel [22:50] xuser has left the channel [22:50] wink_ has joined the channel [22:53] mandric has joined the channel [22:57] k1ttty has joined the channel [22:58] collinwat has joined the channel [22:59] fomatin_ has joined the channel [22:59] neurodrone has joined the channel [23:01] teadict: so... with a simple "forever start app.js".. you're good to go all the way forever and ever? [23:01] poopy-sama has joined the channel [23:01] mmalecki: teadict: yeah :) [23:02] teadict: meanning for production, right? [23:02] mmalecki: yeah [23:02] mmalecki: although if you run node 0.6, use master [23:02] teadict: should one use it both inside node for your app's servers and at the OS as a double safety? [23:02] teadict: what master? [23:02] mmalecki: git master [23:02] saidinesh5 has joined the channel [23:03] teadict: as in master branch? or is that a package? [23:03] mmalecki: master branch [23:03] mmalecki: we'll release it as we squash all bugs [23:04] mbrevoort has joined the channel [23:04] teadict: why do you mention that? [23:04] mmalecki: because it doesn't really work on 0.6 [23:04] teadict: oh [23:04] mmalecki: I mean, the one that is in npm [23:05] mmalecki: master works on 0.6 [23:05] teadict: yeah, well, I'm sort of not going out of the master branch, since I don't want any troubles with the client [23:05] mmalecki: np :). I'll ping you when we release it [23:05] teadict: thanks for the notice [23:06] mmalecki: :) [23:06] saidinesh5: Hi guys... i was trying to install node from git , and noticed that node-waf isnt getting installed... [23:06] davetayl_ has joined the channel [23:06] saidinesh5: and googling doesn't seem to help much [23:07] redir_ has joined the channel [23:07] jergason_ has joined the channel [23:07] saidinesh5: so i wonder if there is something i m missing ? [23:08] djazz has joined the channel [23:08] mac^ has joined the channel [23:09] clarkfischer: Ugh… my head is throbbing. [23:10] clarkfischer: I need to take a Number and write it into a Buffer as if it were a 64 bit integer, by writing two 32bit integers next to one another [23:10] poopy-sama has joined the channel [23:11] clarkfischer: Anyone know much about these kinds of bitwise operations? [23:11] saidinesh5: clarkfischer: may i know what is the problem you were trying to solve? [23:12] djazz: why i get SIGABRT? [23:12] clarkfischer: I'm writing a bit torrent client, and the udp specification requires a bunch of 64bit numbers [23:12] saidinesh5: Ahh okay... [23:12] jaitaiwan has joined the channel [23:15] jaitaiwan has left the channel [23:16] djazz: theres an error in src/uv-common.c smth on line 58 [23:16] djazz: "Aborted" [23:20] nicholasf has joined the channel [23:21] maushu: Will node.js run on http://www.raspberrypi.org/faqs ? Needs to be compiled to ARMv6 architecture. [23:21] redir_ has joined the channel [23:22] TroyMG has joined the channel [23:23] TroyMG: is there a channel for NPM discussion? [23:23] mytrile has joined the channel [23:24] Aria: Here's as good as any [23:24] mytrile: Hey, guys. I want to make a request(Dynect API) through https, but the request needs to include a session which is json credentials. I cannot use req.write() because it requires string or buffer. Any ideas ? [23:25] TroyMG: k. I'm having trouble authenticating with npm on a new machine. when I do "npm adduser" and enter my existing credentials, I get: Error: bad_request Invalid rev format: -/user/org.couchdb.user:troygoode/-rev/undefined [23:25] mytrile: The request is application/json content type [23:25] TroyMG: (if I enter what I'm pretty sure is the correct password. if I enter any other password I get a specific "Incorrect username or password" error) [23:26] Aria: Sounds like the user record might be damaged -- might take an admin to straighten out. [23:26] TroyMG: k [23:27] jhurliman has joined the channel [23:27] TroyMG: I'll submit a request for reset then [23:28] soulraven has joined the channel [23:28] neurodrone has joined the channel [23:28] dwhittle has joined the channel [23:29] jergason has joined the channel [23:31] wbednarski has joined the channel [23:32] wink has joined the channel [23:34] Draco_ has joined the channel [23:34] saidinesh5: clarkfischer: just a minute.. will upload some code for you [23:35] pandeiro has joined the channel [23:35] pointlessjon has joined the channel [23:36] Draco_ has joined the channel [23:37] wink_ has joined the channel [23:37] jyp has joined the channel [23:37] avih has joined the channel [23:38] draginx has joined the channel [23:39] clarkfischer: thanks, saidinesh5 [23:39] m00p has joined the channel [23:40] xyos has joined the channel [23:40] strevat_ has joined the channel [23:42] saidinesh5: actually clarkfischer, you might want to take a look at this http://closure-library.googlecode.com/svn/docs/class_goog_math_Long.html [23:43] saidinesh5: i dunno why i m reimplementing the same thing [23:43] saidinesh5: heh [23:44] clarkfischer: I actually found a slightly less interesting way of doing it [23:44] saidinesh5: and that would be? [23:44] clarkfischer: val = [(val & 0xFFFFFFFF00000000) >> 32, val & 0xFFFFFFFF] [23:45] harthur has joined the channel [23:45] saidinesh5: oh, but how would you deal with actual larger values? [23:45] clarkfischer: I can't, really. [23:45] clarkfischer: I pretty much just need to account for Numbers [23:45] clarkfischer: But I need to split it into two 32bit ints (as if it were a 64bit int) [23:46] saidinesh5: Ahh, i thought you actually were dealing with such large file sizes etc.. [23:46] clarkfischer: Well, ideally, yes [23:46] clarkfischer: but I'm not even sure how I could compute such a thing [23:47] saidinesh5: heh .. anyways gLuck with your torrent client :) [23:47] clarkfischer: At least for the moment, I'm just trying to implement the UDP spec [23:48] enmand has joined the channel [23:48] saidinesh5: Ah.. [23:49] avih has joined the channel [23:50] jocafa: is anyone using BackboneRelational or something similar? [23:52] wink has joined the channel [23:56] zurh has joined the channel [23:59] stagas has joined the channel [23:59] avih has joined the channel