[00:03] sh1mmer has joined the channel [00:06] unomi has joined the channel [00:06] copongcopong1 has joined the channel [00:07] AvianFlu has joined the channel [00:09] devrim1 has joined the channel [00:11] charleyd has joined the channel [00:13] vuliev has joined the channel [00:16] davidbanham has joined the channel [00:16] sshaginyan has joined the channel [00:17] puffpio has joined the channel [00:17] cjm has joined the channel [00:18] keeto has joined the channel [00:21] avalanche123 has joined the channel [00:23] puffpio has joined the channel [00:24] unomi has joined the channel [00:25] mandric has joined the channel [00:25] skm has joined the channel [00:26] Murvin: bnoordhuis: got more update for the socket problem. [00:28] marcello3d has joined the channel [00:28] marcello3d: inebriated coding? perhaps [00:29] marcello3d: what up, all? [00:30] AvianFlu has joined the channel [00:31] d_c has joined the channel [00:35] fg3 has joined the channel [00:36] dguttman has joined the channel [00:36] _jgr has joined the channel [00:36] mrryanjohnston: marcello3d: greetings [00:36] samsonjs has joined the channel [00:37] fakewaffle has joined the channel [00:40] sshaginyan has joined the channel [00:41] dguttman_ has joined the channel [00:42] AvianFlu has joined the channel [00:42] willwhite has joined the channel [00:43] marcello3d: anyone have a suggested benchmarking js code? [00:43] xerox: v8 has profiling tools built in [00:43] xerox: see the talk at the recent nodeconf [00:44] xerox: I mean its slides [00:44] xerox: nodecamp maybe [00:45] Nuck: ugh [00:46] Nuck: Somebody fell like helping me with my Mongo query? [00:46] sorensen: suuuure [00:46] sorensen: :D [00:46] Nuck: I have a collection with users, and each user document has a subdocument for their profile, which has a subdocument for modules [00:46] Nuck: the modules are an array of documents [00:47] Nuck: And I want to query that array to find modules by their modID [00:47] Nuck: My current query is this: { 'profile.modules' : { '$elemMatch' : { 'modId' : 3 } } } [00:47] Nuck: But it returns null [00:48] Nuck: Actually... It returns the user, at least in the Mongo CLI [00:48] marcello3d: what does { 'profile.modules' : { 'modId' : 3 } } do? [00:48] Nuck: marcello3d: I'm using dot-notation to select from profile -> modules [00:49] tyler-iphone: this c++ library uses TCHAR and im casting to (const char*) but when i print in node its only showing first character [00:49] Nuck: Then I query for the module by modID [00:49] Nuck: Do I need to somehow select my row? I've got the username, but I'm not sure how to query within a query lol [00:50] dguttman has joined the channel [00:50] hij1nx has joined the channel [00:50] dguttman has joined the channel [00:54] Nuck: Any ideas? [00:54] akshatj has joined the channel [00:55] ctide: can't you just do { 'profile.modules.modId' : 3 } ? [00:56] mavin_ has joined the channel [00:56] Nuck: ctide: Yeah, but it returns the whole document still :/ [00:57] ctide: oh, yeah, it does [00:57] ctide: not sure how you select just that part [00:57] sw0rdfish has joined the channel [00:57] mavin has joined the channel [00:58] jscheel has joined the channel [00:59] McMAGIC--Copy has joined the channel [00:59] jslatts has joined the channel [01:01] marcello3d: nuck: not sure if mongodb is designed for that use case... keep in mind documents are limited to 16MB, so in the worst case you're just loading 16MB from your db [01:01] dguttman_ has joined the channel [01:02] AvianFlu has joined the channel [01:02] dguttman_ has joined the channel [01:04] abraxas has joined the channel [01:05] darshanshankar has joined the channel [01:05] Nuck: marcello3d: The documents are gonna be tiny. [01:05] Nuck: I just need to load the settings for each module. [01:06] BillyBreen has joined the channel [01:06] Nuck: It might just be easier to store by modId and sort by order :/ [01:07] dguttman has joined the channel [01:07] dguttman has joined the channel [01:10] infynyxx has joined the channel [01:15] ceej has joined the channel [01:16] vipaca has joined the channel [01:16] vipaca has joined the channel [01:16] sorensen: awww yeaaa [01:16] sorensen: its gitpages time [01:17] hkjels_ has joined the channel [01:18] ceej has joined the channel [01:18] F1LT3R has joined the channel [01:19] eyesUnclouded has joined the channel [01:22] devrim has joined the channel [01:23] srid has joined the channel [01:23] srid has joined the channel [01:26] iffy|x200 has joined the channel [01:26] cafesofie has joined the channel [01:26] kawaz_air has joined the channel [01:27] gavin_huang has joined the channel [01:27] tmpvar has joined the channel [01:27] broofa has joined the channel [01:33] vdes has joined the channel [01:34] blaenk has joined the channel [01:35] JJMalina has joined the channel [01:35] ichilton has joined the channel [01:38] vdes has left the channel [01:38] unlink has joined the channel [01:38] unlink has joined the channel [01:39] davidwalsh has joined the channel [01:44] ceej has joined the channel [01:46] andrewfff has joined the channel [01:46] avalanche123 has joined the channel [01:46] bentruyman has joined the channel [01:47] phpnode has joined the channel [01:47] ggg has joined the channel [01:48] ggg: Hi [01:48] ggg: I have a .js module i want to initialize in my server.js [01:49] ggg: but i keep getting stack [Getter/Setter] error [01:49] Swimming_bird has joined the channel [01:54] cognominal_ has joined the channel [01:55] avalanche123 has joined the channel [01:59] pquerna: sh1111mmeer [02:03] ncursestest has joined the channel [02:04] iffy|x200: hey all, random question [02:04] iffy|x200: what do the numbers in process.memoryUsage() mean [02:04] iffy|x200: http://nodejs.org/docs/v0.4.8/api/process.html#process.memoryUsage [02:04] iffy|x200: ? [02:05] quackslike has joined the channel [02:05] AvianFlu: ggg: you want to log err.stack so you can actually read that [02:05] AvianFlu: stack: [getter/setter] is what the stacktrace shows as when you just log the whole object [02:06] AvianFlu has joined the channel [02:07] Aria has joined the channel [02:07] joshthecoder has joined the channel [02:10] aredridel has joined the channel [02:10] srid has joined the channel [02:10] srid has joined the channel [02:13] harth has joined the channel [02:15] kawaz_ai_ has joined the channel [02:20] ceej has joined the channel [02:21] skm has joined the channel [02:24] mikeal has joined the channel [02:24] aredridel has joined the channel [02:26] jtsnow has joined the channel [02:32] CStumph has joined the channel [02:34] quackslike: so.. MS will embrace and extend node - that's just great.. [02:34] yenz: eh? [02:35] AvianFlu: the way I read that, MS is making a friendly windows event loop API for node to talk to [02:35] ambroff has joined the channel [02:35] AvianFlu: given that they aren't making a new flavor of IE that runs local javascript for you, I'll take it [02:35] JoshC1 has joined the channel [02:35] fairwinds has joined the channel [02:37] jacter has joined the channel [02:39] kmiyashiro has joined the channel [02:40] fuentesjr has joined the channel [02:42] point9repeating has joined the channel [02:43] isaacs has joined the channel [02:44] jerrysv has joined the channel [02:44] CodyGray has joined the channel [02:44] jerrysv: hello #node.js! [02:44] CodyGray has left the channel [02:46] quackslike: AvianFlu: oh. is that it? ok that might not be so bad then. [02:46] mandric has joined the channel [02:46] AvianFlu: I read an MSDN blog post about it, it said they were working with joyent and it mentioned ry by name [02:46] unomi has joined the channel [02:47] AvianFlu: which at least sounds like they're going with the hype instead of trying to totally exploit it... but I'm not involved in any of that [02:48] jerrysv: i dunno, there was definitely a little bit of exploit of it today [02:48] AvianFlu: the idea of a booming open-source community that's 100% linux and mac users probably scares them lol [02:50] harth_ has joined the channel [02:50] ezl_ has joined the channel [02:53] zeade has joined the channel [02:54] F1LT3R has joined the channel [02:54] ChrisPartridge has joined the channel [02:55] harth_ has joined the channel [02:56] heavysixer has joined the channel [02:59] quackslike: i think we might end up with a bunch of windows only nodejs stuff -- which might be ok... or it might totally suck. [02:59] quackslike: it will probably be a total headfuck [02:59] jerrysv: is the community there? [03:00] quackslike: jerrysv: i think many use Linux [03:00] quackslike: if that's what you mean? [03:00] jerrysv: right, and the way they can build a community quickly is with partnership [03:00] deedubs: most of the 'web' developers I know use mac [03:00] mikey_p: Microsoft is really coming around on open source in general [03:01] jerrysv: what's good for the goose is good for the gander, and it would behoove them to keep things cross-platform [03:01] jerrysv: just like the investment in jquery [03:01] quackslike: yeah who knows. [03:01] mikey_p: i went to a open source developer convention and microsoft was a sponsor and took out an add in the program guide that apologized for IE6 [03:01] jerrysv: no telling, all we can do is conjecture right now, and hope to help steer the community to stay open and non proprietary [03:01] deedubs: It'd be awesome if it 'just worked'. Heck another choice for deployment who's going to argue that [03:03] pen has joined the channel [03:03] pjacobs has joined the channel [03:03] tk has joined the channel [03:04] JaKWaC has joined the channel [03:05] akshatj has joined the channel [03:05] Corren has joined the channel [03:08] mattstevens has joined the channel [03:08] dget has joined the channel [03:08] neoesque has joined the channel [03:09] JaKWaC has joined the channel [03:09] isaacs: mikey_p: that's a little hilarious [03:09] isaacs: mikey_p: i remember when ie6 came out. it was awesome. [03:10] isaacs: it was like we look at chrome or firefox today [03:10] hkjels_ has joined the channel [03:10] harth_ has joined the channel [03:11] Emmanuel__ has joined the channel [03:12] pen has joined the channel [03:12] tbranyen: mikeal: if you get a moment pm? [03:12] Corren: can I copy the output of node_modules on one computer to another without using npm [03:12] marcello3d: for those in need of copy... http://baconipsum.com/ [03:13] tbranyen: bacon ipsum rules [03:13] pen has joined the channel [03:13] isaacs: Corren: sure. just tar it up or something [03:13] Corren: so I don't need to do anything with npm if I'm using puppet :) just copy the outputs [03:13] isaacs: Corren: (s)cp -r won't quite work, because cp/scp aren't symlink safe [03:13] Corren: right, I'll set them up manually with puppet [03:13] pen has joined the channel [03:14] isaacs: Corren: but tar -cf foo.tar node_modules would be fine [03:14] Corren: just didn't know if they would work without being processed/converted from npm [03:14] isaacs: and then untar foo.tar later. [03:14] Corren: right [03:14] isaacs: or rsync -a [03:14] tbranyen: lol mralph vs b6n [03:14] marcello3d: man. JSON.stringify totally trounces BSON.serialize :( [03:14] pen has joined the channel [03:14] dshaw_ has joined the channel [03:14] marcello3d: is new Buffer() slow? [03:14] isaacs: i totally <3 that mraleph has taken up the trolling quest vs the erlinguists [03:15] tbranyen: haha [03:15] isaacs: i mean, it's dumb and all... [03:15] isaacs: but also hilarious [03:15] tbranyen: haha [03:15] tbranyen: js drama is the only worthwhile drama [03:15] tbranyen: also highschool [03:15] isaacs: yesterday i lost 2 hours debugging rabbitmq. just figuring out what the hell was doing several million file writes per second was tricky, and then i basically had to jsut shut down the vm [03:15] tbranyen: marcello3d: compared to what? [03:16] isaacs: probably my own fault, but still, completely impenetrable. [03:16] tbranyen: i've been looking at zeromq [03:16] isaacs: "never crashes" my ass. [03:16] tbranyen: rabbitmq looked like a bitch to work with [03:16] isaacs: it's great when it works [03:16] isaacs: don't get me wrong. [03:16] tbranyen: ended up using celery [03:16] marcello3d: tbranyen: creating/reusing a larger buffer [03:16] isaacs: but if it fails to start up, it can definitely get pathological as quickly as any other program out there. [03:16] Corren: We're looking at it to for part of our work queue [03:16] tbranyen: marcello3d: it just takes up memory [03:16] Corren: (rbmq) [03:16] isaacs: the diff is that when erlang gets pathological, it's even more insane about it, in my experience [03:17] deedubs: tbranyen: I've had good luck wuth rabbitmq [03:17] isaacs: deedubs: i have too [03:17] marcello3d: tbranyen: basically I'm building up lots of little Buffer objects in an array, then I have final step that makes a new larger buffer and copies everything into it [03:17] isaacs: deedubs: mostly, it just works, except when it doesn't, which is rare and catastrophic. [03:17] deedubs: haha [03:17] marcello3d: probably just need to profile the code [03:17] deedubs: this I have also seen. Not in my app but one I support [03:17] marcello3d: what do people use for profiling node.js? [03:17] tbranyen: i've been thinking about cross langauge pubsub [03:18] dtan has joined the channel [03:18] tbranyen: is rabbitmq able to emulate the pubsub model? [03:18] tbranyen: ttp://stackoverflow.com/questions/731233/activemq-or-rabbitmq-or-zeromq-or [03:18] xeodox has joined the channel [03:18] tbranyen: heh [03:19] jacobolus has joined the channel [03:20] JaKWaC has joined the channel [03:21] mike5w3c has joined the channel [03:21] pquerna: tbranyen: yes? [03:23] tbranyen: pquerna: cool, wasn't sure, having never used it [03:26] CStumph has joined the channel [03:27] k1ttty has joined the channel [03:29] wolfeidau has joined the channel [03:29] AvianFlu has joined the channel [03:32] marcello3d: anyone? :) [03:35] tbranyen: marcello3d: benchmark.js is nice [03:35] tbranyen: i've been wanting to write a nanosecond timer for it tho [03:36] ezl_ has joined the channel [03:36] tbranyen: unless you mean something like node-profiler [03:37] Corren has joined the channel [03:42] dtan: hey does anyone know how jade handles variables between files? [03:42] dtan: if you define a variable in one file, is that scoped only to that one file or can it be shared across whichever files are being loaded? [03:46] bingomanatee: there is more than one answer [03:47] bingomanatee: If you define a variable in a module and attach it to module.exports then it is available [03:47] bingomanatee: as a property of that module wherever you need it. [03:47] bingomanatee: If you define in the "global" space it is only available to code that exists in that module [03:47] bingomanatee: i.e., it is private to the module [03:48] bingomanatee: if you attach a variable to the global variable "globals" [03:48] TSXE has joined the channel [03:48] bingomanatee: (and I'm sorry that theres no less confusing way of saying this [03:48] dtan: haha it's ok [03:48] dtan: more than i knew before thanks [03:48] bingomanatee: ) then it is available as a global variable to every module [03:48] dtan: let me digest this for a second heh [03:48] ryanfitz has joined the channel [03:49] xeodox has joined the channel [03:49] dtan: ok, ya i think it is actually kinda straight forward when you look over it [03:49] dtan: basically you can't share variables between jade templates though [03:49] dtan: it all has to come from the app somewhere [03:50] Emmanuel__: how to catch a connection error (like domain not found, timeout...) with node to prevent the whole server from crashing ? [03:51] bingomanatee: templates exist in a variable scope that is different than node in general. [03:51] Emmanuel__: example : http://pastebin.com/iR2sgAF7 [03:51] bingomanatee: I don't use jade so I can't be more specific. [03:51] dtan: ok, waht do you use? [03:51] Emmanuel__: (example : my node server just crashed because sandbox.paypal.com is down for maintenance) [03:51] bingomanatee: However as a rule the most consistent way to ensure variable presence is to pass it to template engines explicitly as a local variable. [03:52] marcello3d: nrg, can't run mac-ticks-processor [03:52] marcello3d: complaining about something called 'scons' [03:52] marcello3d: any ideas? [03:52] bingomanatee: I use EJS because it lets you embed code in human readable ("human" being relative") HTML. [03:52] dtan: marcelloo3d do you have that installed? [03:52] dtan: i think you can get it through brew install scons [03:53] TSXE: also consider: https://github.com/tcrowe/template.js [03:53] TSXE: simple, understandable, js templating [03:53] dtan: bingomanatee - and there aren't as many restirctions as ejs? [03:53] TSXE: environment neutral [03:54] marcello3d: dtan: I'll try that [03:54] bingomanatee: A well designed application should have a very minimal amount of complexity in the app layer [03:54] marcello3d: what the crap, why is mac-ticks-processor compiling stuff :( [03:55] bingomanatee: Complex processing is best left to cleint side coding that digests basic AJAX data. [03:55] dtan: what do you mean? waht kind of complex processing client side? [03:55] Aria: For some apps. for the most interactive, definitely [03:56] dtan: marcello3d - http://www.mongodb.org/display/DOCS/Building+for+OS+X look for "compiling" [03:56] bingomanatee: well, for instance, I prefer client side data grids to clumsy template side looping. [03:56] dtan: should have a short bit on scons [03:56] dtan: that's all i did [03:56] seawise: is http://turntable.fm running on Node.js? [03:56] TSXE: bingomanatee: yes but not in an area where you need it to be spidered [03:56] dtan: bingo - but wouldn't the data going to the front end have some sort of complex app doing whatever it does ? [03:57] bingomanatee: Fuck spiders. [03:57] marcello3d: dtan: yea, brew install scons worked, thanks :) [03:57] dtan: cool np [03:57] marcello3d: looking at mac-ticks-processor it looks like it compiles a binary the first time [03:57] dtan: not sure what mac-ticks-processor is [03:58] cafesofie has joined the channel [03:58] jacobolus has joined the channel [04:00] tekky has joined the channel [04:00] bingomanatee: data goes to the front can often be cached and yes it is generated by a complex back end - but it is chucked out as JSON and goes around the templating system [04:01] ribetoo has joined the channel [04:01] marcello3d: dtan: it parses the profile file generated with --prof [04:01] dtan: that for benchmarking or something? [04:01] marcello3d: for profiling [04:02] dtan: arent they one in the same? [04:03] marcello3d: not really? [04:03] dtan: heh, what's your definition of profiling? seeing where there are issues in terms of speed and seeing which calls are slowest, etc? [04:03] marcello3d: I suppose semantically they're similar, but the terms are used to describe different tasks [04:04] dtan: ah ok [04:04] marcello3d: benchmarking is generally done at a high level to compare X to Y [04:04] dtan: so just getting more granular basically [04:04] dtan: ok [04:04] marcello3d: where profiling is looking at your code statistically so you can optimize it [04:04] marcello3d: and to help avoid premature/misguided optimization [04:05] charleyd has joined the channel [04:05] dtan: ah ok ya i follow you, i was just thinking general speed tests for both [04:06] dtan: i just never really thought them out separately even though i've seen all those benchmark tests comparing different systems [04:06] dshaw_ has joined the channel [04:06] JaKWaC_ has joined the channel [04:06] dtan: so damn high i can't even see clearly [04:06] TSXE: has anyone used node-dirty extensively that i may pm? [04:07] charleyd1 has joined the channel [04:08] wookiehangover has joined the channel [04:08] JaKWaC: Using expressjs shouldn't you be able to make more than one request to the same route at a time? I'm currently testing a some blocking and I can request to different routes with no problems. Its just when I request the same route that I get blocked. Is that normal or am I probably doing something wrong? [04:08] JoshC1 has joined the channel [04:10] smtlaissezfaire has joined the channel [04:11] andrewfff has joined the channel [04:14] STUPIDWIFI has joined the channel [04:15] briznad has joined the channel [04:18] rchavik has joined the channel [04:19] andrewfff has joined the channel [04:20] mscdex: Calvin: node.js [04:20] Calvin: nodejs and my heart broke into a child process processing using the child_process module in a seperate cluster instance with each other to discuss the events, cooperate [04:20] mscdex: hah [04:21] dtan: wtf [04:21] mscdex: "my heart broke into a child process" [04:21] kriszyp has joined the channel [04:22] mscdex: Calvin: imap [04:22] Calvin: imap [04:22] mscdex: Calvin: don't talk shit about total [04:22] Calvin: don't want the utility of it, without did it too [04:23] dtan: Calvin: how wood could a woodchuck chuck if a woodchuck could chuck wood? [04:23] Calvin: woodchuck chuck if a woodchuck chuck if a woodchuck chuck if a woodchuck chuck if a woodchuck chuck if a woodchuck chuck if a woodchuck chuck if a woodchuck chuck if a woodchuck chuck if a woodchuck chuck if [04:24] sub_pop has joined the channel [04:24] kmiyashiro: JaKWaC: what? [04:25] havenn has joined the channel [04:25] marcello3d: night all [04:25] dtan: later [04:25] ribetoo has left the channel [04:27] JaKWaC: kmiyashiro: I have two routes, one is at the root `/` and another at `/ping`. The root is design to require a certain amount of time to exicute (mainly for testing purposes). When I make the request to the root and then to `/ping` there is no blocking. The root request takes its time and the `/ping` request returns instantly. However, if I made two request to the root, the second request won't start till the first one ends. [04:27] yogurt_truck has joined the channel [04:27] kmiyashiro: gist? [04:27] adam_ has joined the channel [04:28] boehm has joined the channel [04:28] JaKWaC: kmiyashiro: If I make two request to the same route it blocks. [04:28] kmiyashiro: I mean... code? (http://gist.github.com) [04:30] dtan: haha [04:31] caolanm has joined the channel [04:31] JaKWaC: https://gist.github.com/1044226 [04:32] slloyd_ has joined the channel [04:33] mandric has joined the channel [04:33] yenz: JaKWaC: what happens when you take the mysql driver out of the equation? [04:36] reid has joined the channel [04:37] twoism has joined the channel [04:37] sridatta has joined the channel [04:38] andrewfff has joined the channel [04:38] wilken has joined the channel [04:39] lemon-tree has joined the channel [04:44] mykul has joined the channel [04:47] kruckenb has joined the channel [04:48] CodyGray has joined the channel [04:48] CodyGray has left the channel [04:50] hackband has joined the channel [04:52] JaKWaC: yenz: I replace the mysql part with a exec from child_process and it still has to wait till the first request finishes before it will start the second. [04:52] yenz: weird [04:53] yenz: i tested a simple sleep based version, don't think there was any blocking [04:54] JaKWaC: can you gist/pastebin it? I would like to test it out. [04:56] yenz: not much to it, but here you go: http://pastebin.com/KLRvHgHt [04:56] JaKWaC: I had another person run the cost I posted in the gist and they said theirs ran perfectly with no blocking so Im coming to the conclusion that its something to do with my environment. [04:58] abraxas has joined the channel [04:58] yenz: hrm [04:58] yenz: actually, there is something a little weird there [04:59] yenz: but i'm a n00b... not sure what i'm seeing [05:02] hkjels_ has joined the channel [05:05] fakewaffle has joined the channel [05:05] yenz: JaKWaC: what happens if you run that gist of mine 3 times quickly? [05:05] yenz: i have 3 tabs open, hit refresh on each page in rapid succession [05:06] yenz: seems like the first req blocks, but then the next two happen properly [05:06] yenz: ACTION boggles [05:07] jacobolus has joined the channel [05:07] CStumph has joined the channel [05:09] CStumph has joined the channel [05:10] JaKWaC: They all block for me. [05:11] kevmoo has joined the channel [05:12] mykul|Home has joined the channel [05:13] jacter has joined the channel [05:13] yenz: os / node / express? [05:13] yenz: i'm on osx/0.4.8/2.3.10 iirc [05:14] yenz: express 2.3.11 actually [05:15] kevmoo: help! node-waf! it doesn't work! I"m going to cry [05:16] kevmoo: sorry...was feeling dramatic...I'm better now [05:16] rfay has joined the channel [05:17] yozgrahame has joined the channel [05:19] kawaz has joined the channel [05:21] kbni has joined the channel [05:21] JaKWaC: yenz: fedora 15 / 0.4.8 / 2.3.12 [05:22] yenz: JaKWaC: so this is what i seem to be seeing - the *first* time i launch the server and then hit the route a few times, it blocks on the first but none after [05:22] yenz: maybe it's related to how express does sync template compilation and then caches for the next requests? [05:22] yenz: total guess there though [05:24] EzeQL has joined the channel [05:25] sreeix has joined the channel [05:28] sourcode has joined the channel [05:29] mykul has joined the channel [05:29] Wizek has joined the channel [05:29] benvie has joined the channel [05:30] Skola has joined the channel [05:31] jacter1 has joined the channel [05:31] itistoday has joined the channel [05:31] mykul has joined the channel [05:32] sh1mmer has joined the channel [05:32] ezl_ has joined the channel [05:33] dguttman has joined the channel [05:33] xeodox has joined the channel [05:35] wilmoore has joined the channel [05:35] rvb has joined the channel [05:36] jacekp has joined the channel [05:36] descipher_ has joined the channel [05:37] Xano has joined the channel [05:37] steffan has joined the channel [05:40] rfay has joined the channel [05:43] CodyGray has joined the channel [05:44] smtlaissezfaire has joined the channel [05:44] CodyGray has left the channel [05:44] twoism has joined the channel [05:46] STUPIDWIFI has joined the channel [05:48] puffpio has joined the channel [05:49] meso has joined the channel [05:50] philtor has joined the channel [05:50] SoreGums has joined the channel [05:51] Emmanuel__: http://blogs.msdn.com/b/interoperability/archive/2011/06/23/microsoft-working-with-joyent-and-the-node-community-to-bring-node-js-to-windows.aspx [05:51] SoreGums: simple smtp sever updated for node 0.4.8: https://gist.github.com/1040044 [05:51] SoreGums: i don't know how to use the module version, so made this standalone... [05:52] stephank has joined the channel [05:53] cbiscardi has joined the channel [05:53] SamuraiJack has joined the channel [05:57] andrewfff has joined the channel [05:59] Nuck: Emmanuel__: HOLY FUCK [06:00] Nuck: Emmanuel__: My jaw just shat itself. [06:00] tk has joined the channel [06:01] tk has joined the channel [06:01] mendel_ has joined the channel [06:03] sendark has joined the channel [06:04] Xano has joined the channel [06:04] STUPIDWIFI has joined the channel [06:06] jtsnow has joined the channel [06:07] cbiscardi has left the channel [06:08] mscdex: Nuck: heh, i was just watching the libuv video today too [06:10] ph^ has joined the channel [06:11] romanb has joined the channel [06:13] andrewfff has joined the channel [06:13] giby has joined the channel [06:15] bartt has joined the channel [06:15] SuMarDi has joined the channel [06:16] Corren has joined the channel [06:17] pen has joined the channel [06:17] pen has joined the channel [06:18] pen has joined the channel [06:18] sh1mmer: Nuck? [06:20] pen has joined the channel [06:20] sh1mmer has joined the channel [06:20] pen has joined the channel [06:22] justmoon has joined the channel [06:22] Jakwac has joined the channel [06:23] kulor_uk has joined the channel [06:24] atsuya has joined the channel [06:25] Charuru has joined the channel [06:25] jacter has joined the channel [06:26] justmoon: Is there a way to compile the latest master of node.js? I'm running into the same error as whoever posted this pastebin: http://pastebin.com/L4KUNPVt [06:26] test__ has joined the channel [06:26] atsuya has joined the channel [06:26] hwinkel has joined the channel [06:28] BenHu has joined the channel [06:28] wilken has joined the channel [06:28] rvb has joined the channel [06:28] dve has joined the channel [06:28] coreb has joined the channel [06:29] sgimeno has joined the channel [06:31] amerine has joined the channel [06:31] pen has joined the channel [06:31] Nican__ has joined the channel [06:31] techwraith has joined the channel [06:32] pen has joined the channel [06:33] Jakwac: justmoon: Is that the error you get when you try to compile the latest master? [06:33] justmoon: Jakwac, yes [06:34] Jakwac: I compiled the latest tonight with out error. Whats your OS? [06:34] justmoon: Ubuntu 11.04 32bit [06:35] pen has joined the channel [06:35] justmoon: are there any steps needed other than what the README tells you? [06:36] systemfault: I became a fan of jetienne's PPA for ubuntu :P [06:36] systemfault: No more compiling :) [06:36] Jakwac: I followed the wiki Instlation section [06:36] justmoon: systemfault: is it 0.5.0-pre? [06:36] Jakwac: which isnt really any different than the readme [06:36] systemfault: No :( 4.8 [06:36] systemfault: (Latest stable AFAIK) [06:37] justmoon: systemfault, kk, I need 0.5.0 unfortunately [06:37] pen has joined the channel [06:37] justmoon: hmm, I just tried deleting the whole thing and cloning a fresh copy, maybe that helps [06:38] pen has joined the channel [06:39] newy_ has joined the channel [06:40] pen has joined the channel [06:40] pen has joined the channel [06:41] justmoon: derp, that was it [06:41] justmoon: so if anyone asks, delete directory, start clean -> fixed [06:41] systemfault: Ah :D [06:41] systemfault: justmoon: Just curious, what super feature does 0.5.0 has? [06:41] andrewfff has joined the channel [06:41] justmoon: new Buffer(..., 'hex') [06:42] `3rdEden has joined the channel [06:42] systemfault: Ah ok :) [06:42] pen has joined the channel [06:42] justmoon: I started building my app in 0.5.0 and by the time I noticed it wasn't gonna be compatible with 0.4.8 and 0.5.0 wasn't "around the corner" - I had already too many deps on it [06:43] justmoon: so right now I'm just praying 0.5.0 comes out soon :) [06:43] systemfault: :) [06:43] shinuza has joined the channel [06:44] framlin: systemfault: is jetienne's PPA working with 11.04. I used it until switching to ubuntu 11.04 where it didn't work at the beginning, since that I compile again ... [06:45] pen has joined the channel [06:45] systemfault: framlin: I don't use 11.04 but the ppa has the packages, I just checked. [06:45] systemfault: I'm still on 10.10 :/ [06:45] systemfault: I fear unity. [06:45] hackband has joined the channel [06:47] mendel_ has joined the channel [06:47] framlin: yes, I saw that package too, but after runing apt-get/synaptics ther was 0.2.0 installed ... because its more easy to compile than to search for apt - problems, I decided to compile ;) Maybe I give it a try again ... [06:47] Nican has joined the channel [06:47] pen has joined the channel [06:47] systemfault: Ah ok :) [06:49] framlin: systemfault: that (to keep 10.10) was a goog decisiion. I needed two days and a complete new installation, to get my system working again. But I was curious about unity, spcially zeitgeist and after using it for a while, I like it [06:49] systemfault: framlin: Not sure what I'm going to do... endure unity.. switch to gnome-shell or to kde [06:51] unomi has joined the channel [06:51] mehlah has joined the channel [06:51] meso__ has joined the channel [06:52] framlin: as I experienced for myself this zeitgeist-concept prviding "things" concerning the usage in time is working very well for me, becaus I almost do the same things with my system. I like this compiz stuff for changing tasks/windows too. So I think I will stay with unity beliving in their prommisses, that it will be better configured day by day ;) [06:53] Skola has joined the channel [06:54] groom has joined the channel [06:54] systemfault: It should already be a lot better in 11.10 [06:54] framlin: for the system of my gf I keep on 10.10, becaus she is only a *user* and the behaviour between old gnome and unity is much too diffrent ... [06:54] systemfault: I think it wasn't ready to be released with 11.04 [06:54] sendark has joined the channel [06:54] systemfault: I see :) [06:54] framlin: yep, IMHO it was a huge error to make *that* default. It was the worst ubuntu-release I ever saw ... [06:55] hkjels has joined the channel [06:55] dshaw_ has joined the channel [06:55] andrewfff has joined the channel [06:56] systemfault: At least.. the classic gnome 2 is still there [06:56] systemfault: It will not next release [06:56] framlin: oh :( [06:57] systemfault: Next release is full gtk3 + Unity [06:57] systemfault: With the unity2d fallback for those who can't run compiz [06:57] Nican_ has joined the channel [06:58] framlin: so I have to schedule some tutorial-sessions with my gf ;) [06:58] systemfault: Haha :P [07:00] kawaz_air has joined the channel [07:02] simenbrekken has joined the channel [07:03] sreeix_ has joined the channel [07:04] jomoho has joined the channel [07:05] indexzero has joined the channel [07:06] hybsch has joined the channel [07:06] wilken has joined the channel [07:07] jacter has joined the channel [07:07] m00p has joined the channel [07:08] tim_smart has joined the channel [07:09] tim_smart: mongoose awesome people: Defining properties by method? [07:09] tim_smart: I.e. I want to have a 'followers' property that is a [] of the model itself [07:10] tim_smart: User#followers = [User] [07:12] mhausenblas has joined the channel [07:12] tim_smart: Got it, schema.add({ ... }) [07:15] jacobolus has joined the channel [07:15] matyr has joined the channel [07:15] pen has joined the channel [07:15] andrewfff has joined the channel [07:16] rhutchison has joined the channel [07:16] neoesque has joined the channel [07:17] fangel has joined the channel [07:17] topaxi has joined the channel [07:18] uchuff has joined the channel [07:18] pen has joined the channel [07:19] pen has joined the channel [07:19] MrWarGames has joined the channel [07:21] pen has joined the channel [07:21] Skola: For a one page app, what are the most mature options right now in node? [07:23] tilgovi has joined the channel [07:23] catphive has joined the channel [07:23] Jakwac: What do you mean by one page app? [07:24] Skola: yeah good question [07:24] framlin: Skola: maybe this is usefull http://blog.nodejitsu.com/single-page-apps-with-nodejs [07:24] djcoin has joined the channel [07:24] Skola: basically it's a blog [07:24] Skola: but it's super basic [07:24] temp01 has joined the channel [07:24] Skola: doing ajax calls right now to load the posts [07:24] Skola: has no comments [07:24] sonnym has joined the channel [07:24] Skola: only db interaction on user-facing page is a little contact form [07:24] Bonuspunkt: i'd have sayed u should look at https://github.com/socketstream/socketstream [07:25] Skola: I saw that on HN today Bonuspunkt, I will certainly have a look [07:25] Skola: thanks for the link framlin [07:25] Bonuspunkt: but --> However, right now it would make a poor choice for a blog or other content-rich site which requires unique URLs for search engine optimization. [07:25] ChrisPartridge has left the channel [07:25] davidbanham has joined the channel [07:25] Skola: ok [07:26] framlin: for a purpose like yours, I wrote a very small webapp for myself inspired by http://www.nodebeginner.org/ [07:26] skm has joined the channel [07:26] mehlah has joined the channel [07:26] christkv has joined the channel [07:26] Skola: fyi: I already have it up -> http://dro.no.de [07:26] framlin: took one morning ... [07:27] Skola: it's an early version [07:27] ts__ has joined the channel [07:27] Skola: uses Express right now [07:27] Skola: Express is ok for the post editor I have for this [07:27] MrWarGames has joined the channel [07:27] mehlah has joined the channel [07:28] romanb has joined the channel [07:28] Skola: what do you use for your small webapp framlin? [07:28] jbpros has joined the channel [07:29] framlin: require('http') ;) [07:29] Skola: heh ok [07:29] Skola: I guess it would be instructive to go that way [07:30] Skola: I'm thinking about somehow splitting my site into blog and editor more strictly [07:30] Phil-Work` has joined the channel [07:31] framlin: the time I need to reed all the docs and tutorial, make a hello world and translate my thoughts to the spirit of a existing framework like express is longer than to hack a small router and a small processor .... [07:31] kern has joined the channel [07:32] Skola: you might be right, though for speed Express is good [07:32] Skola: I'm just exploring different ways of doing the same, because I plan on using node quite a bit in production [07:33] xeodox has joined the channel [07:33] gozala has joined the channel [07:33] niftylettuce has joined the channel [07:34] framlin: for production im intrested in knowing as exactly as possible what all the running code is doing ... that tends to lead me to write much things my own ... ;) [07:34] framlin: depends on how serious the busniness is an how sustainable the code has to be .... [07:35] [AD]Turbo has joined the channel [07:35] [AD]Turbo: hi there [07:36] matyr_ has joined the channel [07:36] Skola: I'll write myself a little app using just the http module and see how that serves me [07:36] framlin: hee in production we still use Mozilla Mozilla 1.7.13 .... because the busniess is very serious and the XUL-Apps has to run long times stable ... [07:37] framlin: heRe in production ... [07:37] __doc__ has joined the channel [07:37] Skola: my clients aren't serious in most senses of the word [07:38] Skola: they are pretty big, but I won't get sacked if it doesn't run n reqs/sec [07:38] bogomips has joined the channel [07:38] bogomips: good morning [07:38] gozala1 has joined the channel [07:39] andrewfff has joined the channel [07:39] _jgr has joined the channel [07:40] saschagehlich has joined the channel [07:40] bogomips: sometime using socket.io node have a crash , in console i get http://pastebin.com/W4B5YEwC [07:41] bogomips: is it a know issue or is a my problem ? [07:41] andree has joined the channel [07:43] rauchg: bogomips [07:43] rauchg: not that I know of, but probably not your problem [07:43] rauchg: are you sending non-string messages ? [07:46] `3rdEden: maybe hes sending buffers [07:46] `3rdEden: rauchg but we could just add a check for it [07:47] tim_smart: rauchg: [mongoose] Is DocumentArray loaded on model fetch, or do you find() on it? [07:47] `3rdEden: and do a data.toString() [07:47] tim_smart: rauchg: I.e. I want to have it be lazy loaded. [07:47] rauchg: tim_smart [07:47] sreeix has joined the channel [07:47] rauchg: keep in mind a DocumentArray is a of sub-documents [07:48] rauchg: or embedded documents [07:48] rauchg: not "remote" or cross-collection documents [07:48] rauchg: as in DBRefs [07:48] rauchg: for that there's a very cool plugin called mongoose-dbref [07:49] tim_smart: rauchg: OK right. I have a User.add({ followers : [User] }) in my model definition [07:49] rauchg: yeah you probably want to store [07:49] rauchg: ObjectIds [07:49] rauchg: and then [07:49] rauchg: use that plugin [07:49] rauchg: or declare a method [07:49] rauchg: .findFollowers [07:49] rauchg: https://github.com/goulash1971/mongoose-dbref [07:50] adambeynon has joined the channel [07:54] adambeynon_ has joined the channel [07:55] andrewfff has joined the channel [07:55] bogomips: rauchg, i send json data but i need to clean code [07:56] aliem has joined the channel [07:59] adambeynon_ has joined the channel [07:59] [AD]Turbo: http://s57.radikal.ru/i155/1106/a2/1b480c484613.jpg [08:00] [AD]Turbo: ops sorry, wrong chat [08:00] TomY has joined the channel [08:01] hojberg has joined the channel [08:02] sendark has joined the channel [08:04] mraleph has joined the channel [08:05] jbpros has joined the channel [08:07] jhurliman has joined the channel [08:09] shinuza has joined the channel [08:09] swistak has joined the channel [08:09] H2S04 has joined the channel [08:09] dspree has joined the channel [08:09] dspree has joined the channel [08:10] Pathin has joined the channel [08:10] tanepipe1 has joined the channel [08:12] jeremyselier has joined the channel [08:13] tim_smart: rauchg: With [ObjectId], does prop.push(model_instance) work, or does it have to be a string? [08:14] Nuck: ugh [08:14] Nuck: figuring out all the shit for a startup is gonna be a BITCH [08:14] Nuck: Damn you, Legal System. [08:14] Jakwac: Given the following code: https://gist.github.com/1044423 (super simple exec) if I made two request to the server I could see "New request" show up twice in a row, with no delay. Correct? [08:14] andrewfff has joined the channel [08:14] pt_tr has joined the channel [08:14] rauchg: tim_smart [08:14] rauchg: that works [08:14] rauchg: hex strings work too [08:14] rauchg: model instances are cast to object ids [08:15] rauchg: it looks for ._id [08:15] tim_smart: Great. [08:15] Jakwac: It seems like no what what I do everything is blocking. [08:16] niftylettuce: m$soft working with joyent for node to windows O_O [08:17] sendark: since socket.io is on version .7 my code doesn't work anymore... [08:17] stagas: Jakwac: what happens now? [08:17] sendark: the client is adding to the top of my client html file [08:18] Jakwac: I see "New Request" And then 60 seconds later, after the first window loads I see new request again and then the window loads another 60 seconds. [08:18] Jakwac: I'm expecting both windows to load in ~60 seconds. [08:18] stagas: Jakwac: interesting [08:20] Jakwac: Ya, it takes the whole non-blocking, event driven idea and throws it out the window. Can't seem to get this to work for me. [08:21] fangel has joined the channel [08:22] framlin: it seems, that its vital for event-drifen-processing to respact the same problems as with cooperative multitasking (vs. preemptive multitasking ....) [08:23] k1ttty has joined the channel [08:23] sendark: nobody knows about this change to socket.io? [08:24] wilken has joined the channel [08:24] sendark: its bloody annoying that they'd release a new version without writing a little warning explaining what needs to change [08:24] kbni: my ADSL SP only sends me overdue notices, not regular bills [08:24] kbni: fuck you, ISP [08:24] `3rdEden: sendark Y U NO READ migration guide [08:24] stagas: Jakwac: well if I open a second window at localhost it says New request, so it may be a browser thing [08:24] sendark: where is it? [08:24] swistak: sendark, you know you can just freeze previous version right? [08:24] kbni: fucking ISP [08:24] `3rdEden: https://github.com/LearnBoost/Socket.IO-node/wiki/Migrating-0.6-to-0.7 [08:24] sendark: it's definetely *not on the website* [08:25] sendark: ah git hub [08:25] sendark: not on the website [08:25] sendark: i wonder why they bother having a website at all. [08:25] rauchg: sendark sorry about that, i'll put up a link asap [08:25] sendark: no problems, i mean, the software is amazing, but it's weird arriving to work in the moring and seeing the whole systems are down [08:26] sendark: and having the manager scream at you [08:26] stagas: Jakwac: oh even if I try a different path it works too [08:26] `3rdEden: ACTION hugs sendark [08:26] sendark: all that just from a npm update [08:26] sendark: its waaay to early ahahahah [08:26] stagas: Jakwac: so it's the browser waiting for the first request to respond before attempting again [08:26] Jakwac: stagas: Your right, so how do you allow multiple requests to the same path with out it blocking? [08:26] `3rdEden: npm needs to have some sort of indication that packages contain breaking changes [08:26] Multiply has joined the channel [08:26] epopt37 has joined the channel [08:27] shinuza: `3rdEden: how would you do that? [08:27] `3rdEden: like incompatible: "<= 0.6" [08:27] stagas: Jakwac: it's not blocking, if multiple clients would request they will all be served [08:27] swistak: sendark, you know it's not really wise to update nevironment on production before checking it on development? [08:27] sendark: nah it's not really production, it's our internal monitoring systems [08:27] swistak: `3rdEden, it's customary to have new major version on each API change [08:27] sendark: and it's just a new deploy they wanna do [08:27] sendark: actually i should have specified the version on the package.json [08:28] rauchg: sendark my recommendation usually it's to not use `>=` [08:28] swistak: the problem is lots of projects are afraid of releasing 1.0 [08:28] rauchg: with npm [08:28] sendark: yep [08:28] rauchg: it happened to us with multiple projects, even the ones we considered the most stable with all tests passing and all [08:28] rauchg: :/ [08:28] swistak: sprree for example invited they own versioning scheme i think, because they are at 0.60 (yes 60) [08:28] sendark: anyway i should be fixing the monitors, not chatting to you people :) [08:29] sendark: cheers for the help! [08:29] shinuza: good luck [08:29] swistak: while 0.9 was already stable and should be released as 1.0 [08:29] rauchg: i added a link [08:29] rauchg: http://socket.io/ [08:29] rauchg: thanks! [08:29] shinuza: rauchg: nice :) [08:30] Jakwac: stagas: Alright, that solves a lot of my problems lol [08:30] stagas: Jakwac: :P [08:31] utnss has joined the channel [08:31] utnss: How to check how much time it took to execute a code? [08:31] shinuza: rauchg: the page layout is better like this [08:32] saurabhverma has joined the channel [08:33] pen has joined the channel [08:33] stagas: utnss: use Date [08:33] herbySk has joined the channel [08:34] rauchg: thanks shinuza [08:34] utnss: date? [08:34] wilmoore has joined the channel [08:34] rauchg: utnss [08:34] rauchg: var a = Date.now() [08:34] saurabhverma has joined the channel [08:34] rauchg: for (var i = 0; i < Infinity; i++) {} [08:34] rauchg: console.log('it took', Date.now() - a); [08:34] aron_ has joined the channel [08:35] utnss: Ha, nice. thanks :) [08:35] shinuza: utnss: inside node you can use console.time console.timeEnd [08:35] shinuza: but I don't know if it's reliable [08:36] sendark: rauchg: so now the callback to the 'connection' event doesnt get given the client? [08:36] sendark: io.sockets.on('connection', function(client){ client.send('Hello ' + client.sessionId);}); [08:37] rauchg: i don't understand [08:37] markwubben has joined the channel [08:38] sendark: i used to have this: http://pastebin.com/8B74Q4gf [08:38] shinuza: sendark: it's client.id now [08:38] sendark: ah ok [08:39] shinuza: you can console.log(client) to investigate, poke around [08:39] sendark: awesome, but the callback to io.socket.on('connection', .... gets passed what? [08:39] shinuza: the socket/client [08:39] shinuza: on which you can add a listener to various events, such as 'disconnect', etc... [08:40] sendark: ok ok so now the 'client' paradigm has become the 'socket' paradigm ok [08:40] sendark: cheers shinuza [08:42] steffan has joined the channel [08:43] mendel_ has joined the channel [08:43] andrewfff has joined the channel [08:45] __tosh has joined the channel [08:47] mendel_ has joined the channel [08:48] sendark: i can't really get my head around the new version of socket.io. [08:49] `3rdEden: sendark #socket.io [08:49] sendark: so i've just changed package.json to read "socket.io" : "=0.6" [08:49] sendark: and everything works now [08:49] `3rdEden: we have a channel :) [08:49] shinuza: read the docs sendark, forgot almost everything you knew :p [08:49] sendark: awesome! [08:49] hkjels has joined the channel [08:49] sendark: but it's been like a week man [08:49] `3rdEden: 0.7 0% compatible with 0.6 [08:50] sendark: i go on holiday and i come back and you guys rewrite the whole thing? [08:50] sendark: jeez! [08:50] `3rdEden: :D [08:50] andrewfff has joined the channel [08:52] gavin_huang: hi, guys. any elegant solution to import non-node js file into my current module? I tried eval, but it messes up with the debugging info (i.e., line number is not displayed for the original file) [08:52] mendel_ has joined the channel [08:54] wilmoore has joined the channel [08:55] fangel has joined the channel [08:56] robi42 has joined the channel [08:58] hellp has joined the channel [08:58] benvie: is writing a write a small adapter for it to attach hook(s) to exports possible? [08:59] ts__ has joined the channel [09:01] level09 has joined the channel [09:02] mendel_ has joined the channel [09:03] Transformer has joined the channel [09:04] framlin: gavin_huang: maybe you may wrap this non-node-file with its ownn module that only evals your file and use this wrapper-module. that should minimize your line-number-faults [09:07] andrewfff has joined the channel [09:07] shoebat has joined the channel [09:08] gavin_huang: framlin, but would eval it in a wrapper-module give more verbose debugging info? that's what i care about [09:09] tim_smart: rauchg: Finding with an array of ObjectIds -- can I use find() to do that, or am I limited to iterating with findById? [09:09] gavin_huang: framlin, in another word, how does this minimizing line-number-faults work? [09:10] rauchg: tim_smart you could do _id: { $in: arr } [09:10] rauchg: not sure about order [09:10] rauchg: if you care about it [09:10] framlin: if you care about the line-nubers, afaik the lines are nubered *after* the eval. so if you take the eval at the end of the code and have not much lines before, you ma result in a constant small "offset" to the real line - number ... [09:10] tim_smart: rauchg: Should be fine. [09:10] piscisaureus has joined the channel [09:11] KAMiKZ has joined the channel [09:11] jomoho has joined the channel [09:11] KAMiKZ: hello? [09:11] gavin_huang has joined the channel [09:12] kulor-uk has joined the channel [09:13] framlin: gavin_huang: best would be, if it would be possible to have exports = eval(fs_readed_file_data) as the only line of your module .. [09:14] gavin_huang: framlin, ah, i see what you mean. i'll try that. thanks. [09:14] unlink has joined the channel [09:14] framlin: but I havnt tried it. I know the problem from the work I am doing here. There we have a "include_once" function, that evals source-files, too, if it runs over http. [09:14] Yoric has joined the channel [09:14] hermanjunge has joined the channel [09:15] skm has joined the channel [09:15] framlin: but we have no chance to seperate that in its own module, because we have no node just XUL and AJAX/PHP/Cobol [09:15] benvie: eval is a bad word when it has access to your context [09:16] benvie: if you just write a wrapper like framlin just said [09:16] benvie: eval and put stuff on exports, then you're not running into the eval issues [09:16] gavin_huang: framlin, oh, wait a sec. doesn't eval only return the last value? then exports only exports the last value. [09:16] framlin: concerns to what is evaled ... if its self-implemented source-code, its only ugly ;) [09:17] benvie: exactly haha [09:17] framlin: depends on what yo eval [09:17] ChrisPartridge has joined the channel [09:17] Nuck: Has anyone here dealt with the SBA? [09:17] gavin_huang: this non-node file has a couple function defined. [09:17] benvie: eval in a browser is inherently dangerous because of the lack of control [09:17] Nuck: I'm looking at their microloans for my startup. [09:17] gavin_huang: *functions [09:17] adambeynon has joined the channel [09:18] framlin: you may eval into an object and assign this to export [09:18] benvie: and lack of separate contexts [09:18] gavin_huang: how to eval into an object? [09:18] stagas: Nuck: /j startups [09:18] Nuck: stagas: They're preoccupied discussing education :P [09:19] thalll has joined the channel [09:19] Nuck: (though I'll be honest, I partook in that discussion too) [09:19] Nuck: ACTION is listening to Sir Ken Robinson ranting on education lol [09:19] framlin: if thionkk obj.eval("src_string") should eval the source into obj [09:20] Nuck: framlin, benvie: What about evaling shit from the URL? [09:20] framlin: maybe exports.eval(fs_read_data) could work [09:20] gavin_huang: framlin, obj doesn't seem to have an eval method [09:20] hojberg has joined the channel [09:21] Nuck: meh Imma grab a drink and go to sleep [09:21] gavin_huang: framlin, you mean eval.call? [09:21] benvie: you could wrap it like [09:21] framlin: maybe this only works in Mozillas? [09:21] benvie: sec [09:21] framlin: dunno exactly, I only know, that we do that .... [09:22] gavin_huang: framlin, maybe, moz allow a second param in eval to act like the context [09:22] Nuck: FIRST argument is context [09:22] framlin: but my target is Mozilla 1.7.13 ... ;) [09:22] Nuck: SECOND argument is args [09:22] Nuck: call takes multiple arguments and applies them [09:23] Nuck: apply takes an array of arguments [09:24] mendel_ has joined the channel [09:24] gavin_huang: Nuck, nope just checked mdc, the second is the obj, but the support has been removed [09:26] mscdex: Calvin: mozilla [09:26] Calvin: mozilla takes the most simple require formats though [09:26] Nuck: gavin_huang: Uh no, the first argument is the environment. [09:26] mscdex: Calvin: v8 [09:26] Calvin: v8 that there 's a normal http server from the browser implementations of dom are a mess like browser dom shouldnt or cant be fixed until server [09:26] Nuck: I can tell you that from having used it thousands of times. [09:26] Nuck: I use it fucking daily. [09:26] gavin_huang: Nuck, strange, mdc says eval(string, object); [09:26] gavin_huang: maybe it works both ways. [09:27] Nuck: gavin_huang, oh EVAL is [09:27] Nuck: But somebody said eval.call [09:27] Nuck: and I was saying on .call [09:27] gavin_huang: Nuck, ah, my bad. [09:28] gavin_huang: so any workaround to import a non-node file? still don't have a clue... [09:28] andrewfff has joined the channel [09:28] Nuck: gavin_huangload it up with fs, eval it [09:29] gavin_huang: Nuck, then line number is missing when node throws error, it just says "eval at " [09:30] mendel_ has joined the channel [09:31] PierreM has joined the channel [09:31] jetienne has joined the channel [09:31] framlin: gavin_huang: you may not use anonymous functions within your non-node-code, so it at least should tell you the name of the function ... [09:32] blup has joined the channel [09:33] gavin_huang: framlin, that's better, thanks. but still not ideal. [09:33] markwubben has joined the channel [09:37] benvie: http://nodejs.org/docs/v0.4.8/api/vm.html [09:38] benvie: vm.createScript(code, [filename]) [09:38] framlin: I have this include_once-eval in the middle of a File with 4000 lines icluding 100 Files with each up to 40000 lies, I know what you mean ... ;) [09:38] Nuck: what benvie said. [09:38] benvie: script.runInThisContext() [09:38] Nuck: I came up with it first :P [09:38] Nuck: I swear [09:38] framlin: 4000 ... [09:38] benvie: hah [09:39] benvie: I had to look it up, I couldn't remember the way you were supposed to do [09:39] benvie: having not worked on node internals or tried to important code like that [09:39] Nuck: Honestly, I've used it too :P [09:39] sfoster has joined the channel [09:39] Nuck: It's how I loaded modules into my JS bot for deviantART chat [09:40] benvie: so you need to figure out some set of things to export [09:40] benvie: bootstrap the file using VM and export what you need to exports [09:41] benvie: then you're good to go unless there's submarine code waiting inside of what you exported [09:41] benvie: waiting to eat your entire environment [09:42] micheil has joined the channel [09:42] framlin: benvie: that sounds intresting, I wished nodejs would have been arrived 6 years ago .. ;) [09:42] ChrisPartridge has joined the channel [09:44] benvie: var iloveyou = function(happy) { delete happy; delete this; }; iloveyou.apply(require, [process]); [09:44] paznicul has joined the channel [09:45] kawaz_air has joined the channel [09:49] saschagehlich has joined the channel [09:53] wilken has joined the channel [09:55] zeade has joined the channel [09:55] copongcopong has joined the channel [09:55] CStumph has joined the channel [09:56] piscisaureus has joined the channel [09:58] d0k has joined the channel [10:00] mendel_ has joined the channel [10:03] dtan has joined the channel [10:03] Skola has joined the channel [10:07] groom has joined the channel [10:10] Tobias| has joined the channel [10:10] jbpros has joined the channel [10:12] fly-away has joined the channel [10:18] path[l] has joined the channel [10:20] Cthulhu_ has joined the channel [10:20] boehm has joined the channel [10:21] saschagehlich has joined the channel [10:22] akshatj has joined the channel [10:23] adrianmg has joined the channel [10:27] bosphorus has joined the channel [10:27] bosphorus: hi, i'm trying to connect to one postgres server, but i always get some strange error: ENOTFOUND, Domain name not found [10:28] bosphorus: i'm using 'pg' module [10:28] bosphorus: in few examples i saw different connections strings using pg://, postgres:// and tcp://, can you please tell me which one is correct? [10:31] dshaw_ has joined the channel [10:35] path[l]_ has joined the channel [10:36] FireFly|n900 has joined the channel [10:37] jacekp has joined the channel [10:42] hkjels has joined the channel [10:55] adambeynon has joined the channel [10:56] thejh has joined the channel [10:57] level09 has joined the channel [10:58] bnoordhuis has joined the channel [11:01] jomoho has joined the channel [11:02] mendel_ has joined the channel [11:02] davidbjames has joined the channel [11:03] ChrisPartridge has joined the channel [11:03] davidbjames: hello people [11:04] davidbjames: i'm new to node.js and i've run into a problem I can't solve [11:05] davidbjames: trying out Apricot for node via npm install apricot [11:06] davidbjames: in my script i: require('/apricot'), but when i run it i get: [11:06] davidbjames: Error: Cannot find module 'jsdom-0.1.2/jsdom/level1/core' [11:07] piscisaureus has joined the channel [11:07] bnoordhuis: piscisaureus: ping [11:07] davidbjames: i know jdsom is there because npm installed it [11:07] piscisaureus: bnoordhuis: hey [11:08] bnoordhuis: yo homie [11:08] bnoordhuis: with windows support, is a decent mssql driver in the works? [11:08] bnoordhuis: https://github.com/orenmazor/node-tds seems woefully incomplete [11:08] piscisaureus: erm, I don't know :-/ [11:08] bnoordhuis: hah, okay [11:08] piscisaureus: Honestly I've never used mssql [11:09] piscisaureus: but there should be one [11:09] bnoordhuis: i know, right? [11:09] bnoordhuis: one for the to do list [11:09] piscisaureus: yeah [11:09] piscisaureus: I think we can crowdsource that [11:09] piscisaureus: or even ms will do it themselves [11:09] bnoordhuis: hmm [11:10] bnoordhuis: it should be top notch [11:10] piscisaureus: why? [11:10] bnoordhuis: we want to convert those millions of ms windows developers, right? [11:11] piscisaureus: heh, yeah [11:11] bnoordhuis: so that's why - no half-broken tools or libs [11:12] piscisaureus: it's not trivial - I'd suggest someone starts by forking felixge's mysql driver [11:12] piscisaureus: TDS is different but similar to the mysql binary protocol [11:12] bnoordhuis: i've checked freetds but it doesn't do async i/o :( [11:12] piscisaureus: Yeah, that's not nice [11:12] piscisaureus: we could have a driver that uses libuv's new threadpool api [11:13] piscisaureus: but for the long term I'd like a native implementation [11:13] bnoordhuis: and fully async [11:13] piscisaureus: it needs to be async anyway [11:13] aklt has joined the channel [11:13] bnoordhuis: but not in a thread pool kind of way, i mean [11:13] piscisaureus: yeah [11:14] piscisaureus: threadpools are just a stopgap [11:14] piscisaureus: but ideally there would be no compiled extension necessary - which means implementing TDS in node [11:14] piscisaureus: well, javascript [11:14] bnoordhuis: tds isn't that complex, i think? [11:14] piscisaureus: I guess [11:14] piscisaureus: it's just a binary protocol [11:14] piscisaureus: :-) [11:14] MattJ has joined the channel [11:14] Skola: what's the most up-to-date and mature mailing library around for node right now? [11:15] bnoordhuis: Skola: spawn('sendmail') [11:15] bnoordhuis: (i kid) [11:16] Vertice has joined the channel [11:16] level09_ has joined the channel [11:16] Skola: figured as much [11:17] Skola: smtp seems to be the kind of thing everyone tries to have a go at [11:17] igl1 has joined the channel [11:17] eldar has joined the channel [11:17] materialdesigner has joined the channel [11:17] davidbjames: anyone have any tips on why my require() is not working? [11:18] bnoordhuis: Skola: https://github.com/marak/node_mailer <- probably the most used [11:19] davidbjames: actually the require() works for the top level module, but not for the dependency (in this case jsdom) [11:19] Skola: alright bnoordhuis, was just trying it [11:19] Skola: and it works [11:19] Skola: so nvm [11:24] level09 has joined the channel [11:24] piscisaureus: <\3 client-side programming [11:24] `3rdEden has joined the channel [11:26] Ian_Corne: :o [11:27] sharkbird has joined the channel [11:27] SebastianFlyte has joined the channel [11:27] SoreGums: Skola: use sendgrid.com :P http ftw [11:28] Skola: this costs money [11:28] Skola: and it's only for a personal blog [11:28] SoreGums: fair enough ;) [11:28] aron_ has joined the channel [11:28] SoreGums: we use it at work for our app, so makes sense [11:30] Skola: what's the advantage of solutions like that? [11:31] Skola: does it take special kung-fu to DIY at certain scales? [11:32] devrim has joined the channel [11:33] SoreGums: it means I don't have to worry about blacklists and the mail server going down having issues [11:33] level09_ has joined the channel [11:34] SoreGums: also don't have to parse anything as they have an incoming parser too [11:34] SoreGums: which http posts to the app with all the fields figured out, from, subject, body, attachments etc [11:35] Skola: that's quite good yeah [11:35] SoreGums: and they have stats figured out too, so it just saves a bunch of work [11:36] robi42 has joined the channel [11:36] devuo has joined the channel [11:36] path[l] has joined the channel [11:37] SoreGums: $200 / month to just have it taken care of. host cost ~$1000 / month so its worth it considering what it does etc [11:37] SoreGums: current monthly hosting costs that is... [11:37] bosphorus_ has joined the channel [11:38] aelaguiz has joined the channel [11:40] aelaguiz: Hey so I'm trying to debug this C++ extension I wrote to see if it is leaking memory (pretty sure it is) and my destructor never gets called either in the object I ObjectWrap or the underlying c++ object I allocate internally. I am simply calling new and thne immediately deleting and setting the reference to null in my JS. I'm wondering if there is some way to explicitly debug the GC behavior, any ideas? [11:40] aelaguiz: Oh btw, I'm printing out DELETED in the destructor of both c++ objects and hoping it hits on termination (as it does when I use the lib from another C++ app) of the node.js test script [11:41] TheFuzzball_ has joined the channel [11:42] jarek has joined the channel [11:43] bnoordhuis: aelaguiz: https://github.com/bnoordhuis/node-profiler <- profiler.gc() forces a full sweep [11:43] adambeynon has joined the channel [11:44] aelaguiz: thanks :) [11:44] vyvea has joined the channel [11:45] steffan has joined the channel [11:45] aelaguiz: omg so if I call profiler.gc at the end my destructor gets called, if I don't - none of my c++ objects get destroyed [11:45] aelaguiz: that seems, odd [11:46] \sega has joined the channel [11:46] bnoordhuis: aelaguiz: the gc doesn't necessarily run if your program is short-lived [11:47] bnoordhuis: aelaguiz: iow, you can't rely on your destructor being called [11:47] aelaguiz: I understand [11:47] aelaguiz: So I need to provide a cleanup mechanism [11:48] bnoordhuis: aelaguiz: correct [11:48] aelaguiz: or is there a non-profiler way of forcing GC, I could expose that in my extension itself but that seems a bit hacky [11:48] bnoordhuis: aelaguiz: yeah, you shouldn't do that :) [11:49] aelaguiz: okay, explicit cleanup it is. Thanks :) [11:49] bnoordhuis: you're welcome [11:50] papandreou has joined the channel [11:52] FireyFly|n900 has joined the channel [11:53] al3xnull has joined the channel [11:54] bosphorus has joined the channel [11:54] FireFly has joined the channel [11:57] hybsch has joined the channel [11:59] saurabhverma has joined the channel [12:02] skohorn has joined the channel [12:05] matyr has joined the channel [12:13] avalanche123 has joined the channel [12:13] benvie has left the channel [12:15] Bwen has joined the channel [12:15] davidbjames: is this chat for only for developer of node, modules, extensions? i.e. is there a chat for general help? [12:16] mape: davidbjames: ask away [12:16] benvie has joined the channel [12:16] davidbjames: ok, i'll try again :) [12:17] davidbjames: trying out Apricot for node via npm install apricot [12:17] davidbjames: in my script: require('/apricot') [12:17] davidbjames: Error: Cannot find module 'jsdom-0.1.2/jsdom/level1/core' [12:17] mape: if you used npm you shouldn't need the path [12:17] mape: just do "apricot" [12:18] davidbjames: even though it's installed in ~/node_modules [12:18] davidbjames: ? [12:18] defeated: yep [12:18] defeated: well, node's module resolution in general knows where to look for dependencies [12:19] defeated: but ~/node_modules doesn't seem like one of the normal places it would look, how did it get installed there? [12:20] mape: davidbjames: it does [12:20] davidbjames: i used npm install apricot [12:20] mape: just run node and put in require.paths [12:20] mape: to see where node looks [12:20] saschagehlich has joined the channel [12:20] defeated: you should run npm install apricot from your application's root directory [12:20] defeated: that'll add a node_modules directory under your app, and install it there [12:21] Skola has joined the channel [12:21] mape: that or npm install -g apricot [12:21] defeated: if you need something to be available globally (e.g. something that should be accessible from your path, like a test suite runner), then you can use the -g flag to install it globally (npm install -g apricot) [12:21] defeated: ^^ what he said :) [12:22] davidbjames: thanks mape and defeated for your helps [12:22] davidbjames: [ '/Users/davidbjames/.node_modules', [12:22] davidbjames: '/Users/davidbjames/.node_libraries', [12:22] davidbjames: '/Users/davidbjames/local/node/lib/node' ] [12:22] bentruyman has joined the channel [12:23] davidbjames: the funny thing is that it's looking in .node_modules, but the actual dir in ~ is node_modules [12:24] davidbjames: should i uninstall first and then re-install within the project dir? [12:24] fumanchu182 has joined the channel [12:24] fumanchu182 has joined the channel [12:25] defeated: davidbjames: that's what I'd [12:25] defeated: *do [12:27] SoreGums: ahh so that's what changed in npm, before it used to store globally by default and now it does local by default. was wondering why i had to keep installing modules over and over again as i was swapping apps/examples [12:27] davidbjames: thanks, so i tried that but it looks like it's still pushing the modules into ~ instead of in my project folder [12:27] davidbjames: npm install apricot [12:27] davidbjames: apricot@0.0.4 ../../../../node_modules/apricot [12:27] davidbjames: ├── htmlparser@1.6.2 [12:27] davidbjames: └── jsdom@0.1.2 [12:28] defeated: SoreGums: yep, takes a bit of getting used to, but it's much better in general. Global dependencies make life tricky when modules might have conflicting versions of dependencies themselves [12:28] defeated: davidbjames: npm --version? [12:28] SoreGums: defeated: yeap, i like local deps, used to it from ruby/bunlder [12:28] davidbjames: 1.0.13 [12:29] defeated: hmm, very strange [12:30] davidbjames: is there a global config for npm that needs tweaking? [12:30] mape: that is pretty old [12:30] davidbjames: ah [12:30] mape: oh, or perhaps not [12:30] defeated: yeah, not that old [12:30] jlecker has joined the channel [12:31] defeated: 1.0.14 is latest [12:31] mape: yeah, sorry, thinking of something else version wise [12:31] adambeynon has joined the channel [12:33] defeated: davidbjames: npm config list [12:33] hkjels has joined the channel [12:34] eyesUnclouded has joined the channel [12:36] bru_ has joined the channel [12:37] saschagehlich_ has joined the channel [12:38] seawise has joined the channel [12:39] cjm has joined the channel [12:39] ditesh|cassini has joined the channel [12:41] LiamMagee has joined the channel [12:41] davidbjames: ; node install prefix = /Users/davidbjames/local/node [12:41] davidbjames: ; node bin location = /Users/davidbjames/local/node/bin/node [12:41] davidbjames: ; cwd = /Users/davidbjames/local/node/projects/apricot [12:41] davidbjames: ; HOME = /Users/davidbjames [12:41] davidbjames: ; 'npm config ls -l' to show all defaults. [12:41] indutny: hey! [12:42] indutny: anybody around with experience of mongoose-auth usage? [12:42] indutny: I've a big problems with it [12:43] eyesUnclouded has joined the channel [12:44] davidbjames: would show the list -l version, but don't want to flood the chat window [12:44] patrickgamer has joined the channel [12:45] ShreeKavi has joined the channel [12:45] defeated: yeah, could pastebin or gist it, but I'm not even sure what I'm looking for [12:45] defeated: just comparing to my own settings [12:48] saschagehlich_: do readstreams not have an "end" event? [12:48] \sega has joined the channel [12:50] thejh: is there a bot in this channel which can tell me the current local time for other node.js users in https://github.com/joyent/node/wiki/Node-Users ? I just realized I queried someone whose local time is 04:50 [12:50] thejh: or maybe even based on geoip? [12:50] simenbrekken: I'm doing a mapping application based on Google Maps and I'm wondering if I can use their libraries in node (mostly google.maps.geometry.encoding) [12:50] patrickgamer has left the channel [12:52] saschagehlich_: looks like my readstream does not emit the end event? o_O [12:53] gozala has joined the channel [12:54] junkee[] has joined the channel [12:55] thejh: how does this sound for you guys? there's an ServerResponse object in memory, it can't be garbage collected because it gets referenced by something outside of the js vm (at least, there are no object inside the VM which reference it), and lsof says that no network connections are open. oh, and it causes a leak in the "request" library and therefore, the "jquery" library seems to leak [12:55] thejh: s/no object/no objects/ [12:55] AaronMT has joined the channel [12:55] thejh: or maybe the request library causes it, don't know [12:57] mapleman has joined the channel [12:57] junkee[]: I've a very wired problem with a node addon. There is a segfault in a method if I add an event to the object. [12:58] pita has joined the channel [12:58] pita: what means: Error: EPIPE, Broken pipe ? [12:58] pita: I do only connections to localhost [12:58] pickels has joined the channel [12:59] FIQ has joined the channel [13:00] kriszyp has joined the channel [13:00] Skola has joined the channel [13:02] pickels: Strange npm installes packages globally even without the -g switch. [13:02] pickels: installs* [13:03] c4milo has joined the channel [13:03] pickels: Anybody know maybe why that is? [13:03] arpegius has joined the channel [13:03] FIQ has joined the channel [13:04] thejh: pickels: which version is it? npm with version 0.* does it that way [13:04] thejh: pickels: if that's the cause, update it [13:05] pickels: Which one is the latest version? [13:05] pickels: running 0.3.18 [13:06] pickels: ah updating [13:06] davidbjames: pickels: when you say "globally" do you mean in ~/node_modules or in node/lib/node_modules [13:06] c4milo has joined the channel [13:06] adrianmg has joined the channel [13:06] jslatts has joined the channel [13:06] thejh: is there a node library that can do elliptic curve crypto? [13:06] saschagehlich_: pickels: 1.0.14 is the latest version [13:07] saschagehlich_: versions < 1.* always install stuff globally [13:07] pickels: Can I just use the one line install to update? [13:07] saschagehlich_: the node_modules sub folder has been introduced with 1.* [13:08] fson_ has joined the channel [13:09] sudhirjonathan has joined the channel [13:09] saschagehlich_: pickels: npm update npm [13:09] aelaguiz has joined the channel [13:09] saschagehlich_: (for 1.x you do npm update npm -g) [13:10] skohorn has joined the channel [13:10] pickels: npm info update Nothing to update [13:10] pickels: Doesn't update. [13:10] junkee[]: i really need help with my v8 problem. There is a segfault in a method if I register an event on the object! [13:11] brolin has joined the channel [13:11] pickels: Is there a way to force it to update? [13:11] swaj: so holy cow, Microsoft contributing to getting node.js running on windows and azure. That's pretty kick-ass. Congrats ryah & all [13:12] cwo has joined the channel [13:12] JoshC1 has joined the channel [13:12] devrim has joined the channel [13:13] bogomips has left the channel [13:14] ryanfitz has joined the channel [13:14] ShreeKavi has left the channel [13:14] thomblake has joined the channel [13:15] Swizec has joined the channel [13:15] xandrews has joined the channel [13:16] bazookatooth has joined the channel [13:16] davidsklar has joined the channel [13:16] ianward has joined the channel [13:17] ts__ has joined the channel [13:17] jbpros has joined the channel [13:18] brianc has joined the channel [13:20] adambeynon has joined the channel [13:20] junkee[]: I need help with v8 :( [13:21] thejh: pickels: do "curl http://npmjs.org/install.sh | sh" [13:21] dtan has joined the channel [13:23] thejh: junkee[]: seems like you're in the wrong timezone - it's between 4 and 9 in the morning in america now if I'm not mistaken [13:23] junkee[]: timezones suck! [13:23] ap3mantus has joined the channel [13:24] brianc: junkee[]: what help do you need? [13:24] davidbjames: can i get confirmation that this is correct.. using the latest npm [13:24] junkee[]: I'm getting a segfault in a method when I register an event on that obect [13:24] davidbjames: apricot@0.0.4 ../../../../node_modules/apricot <-- notice how it backs out of the local dir [13:25] brianc: junkee[]: are you writing C++? [13:25] junkee[]: brianc: jup [13:25] brianc: junkee[]: can you gist the code? [13:25] thejh: davidbjames: that happened after doing what? "npm install apricot; npm ls"? [13:26] davidbjames: after npm install apricot from within my project directory [13:26] rfay has joined the channel [13:29] bbttxu has joined the channel [13:29] junkee[]: brianc: It's to big to gist. but https://github.com/swick/node-gstreamer/blob/master/src/bin.cc#L158 [13:29] brianc: junkee[]: no worries, this works perfectly [13:30] codeisforevea has joined the channel [13:30] jomoho has joined the channel [13:31] junkee[]: brianc: with following js https://gist.github.com/1044763 there is a segfault [13:32] junkee[]: brianc: if i just comment out the destroy event it all works well [13:33] Shrink has joined the channel [13:34] zeade has joined the channel [13:35] skohorn has joined the channel [13:35] k1ttty has joined the channel [13:37] brianseeders has joined the channel [13:38] martyziff has joined the channel [13:38] smtlaissezfaire has joined the channel [13:39] lizunlong has joined the channel [13:40] knirhs has joined the channel [13:42] ichilton has joined the channel [13:42] Esteb has joined the channel [13:45] dget has joined the channel [13:45] monokrome: Does anyone in here know of any libraries for accessing GIS data in NodeJS? [13:46] dguttman has joined the channel [13:49] ksheurs has joined the channel [13:50] sonnym1 has joined the channel [13:54] [[zzz]] has joined the channel [13:55] unomi has joined the channel [13:56] bentruyman has joined the channel [13:56] sub_pop has joined the channel [13:57] saschagehlich has joined the channel [13:57] willwhite has joined the channel [13:59] brianc: junkee[]: I'm not sure exactly what's going on w/ the segfault [13:59] brianc: junkee[]: I'm guessing the "Bin" object isn't inheriting from event emitter properly [14:00] junkee[]: brianc: I asked in #gstreamer and they told me that it could be one of the objects is invalid. [14:01] junkee[]: brianc: GstElement or GstBin [14:01] brianc: junkee[]: personally I think too much of the code is in C++. I think it would have been easier to use util.inherits(GstBin, EventEmitter) or whatever in javascript [14:01] F1LT3R has joined the channel [14:01] brianc: junkee[]: is this your library? [14:01] junkee[]: jup, it is. [14:02] brianc: junkee[]: you know much more C++ than I [14:03] catshirt has joined the channel [14:03] brianc: junkee[]: when I wrote an extension I tried to stay out of C++ as much as possible. Only the parts which could only be in C were written in C [14:03] junkee[]: brianc: just the gstreamer and the v8 docs. [14:03] bradley has joined the channel [14:04] junkee[]: brianc: but i did not saw any possibility to write less in c [14:04] cbibler_ has joined the channel [14:07] davidbjames has joined the channel [14:08] ChrisPartridge has joined the channel [14:08] bradley has joined the channel [14:08] adambeynon has joined the channel [14:09] skohorn has joined the channel [14:09] JJMalina has joined the channel [14:09] bradleymeck_ has joined the channel [14:10] brianc: it might be the way you're inheriting event emitter? I'm not sure what the "Inherit()" function does...is that built into v8? You need to call the event emiter constructor from within the base constructor perhaps? Try to look in the node source code to see where they inherit from event emitter [14:10] devdazed has joined the channel [14:10] brianc: junkee[]: just a guess...but it might be the problem? [14:11] bnoordhuis has joined the channel [14:11] junkee[]: I dont think so because gst.Element works correct. but i will check it though. [14:11] devdazed: hi all, whats the irc room for plain javascript? [14:11] devdazed: it keeps telling me that #javascript is invite only [14:11] jetienne: devdazed: #javascript [14:12] jetienne: devdazed: ##javascript [14:13] devdazed: jetienne: thanks [14:13] adrianmg: do you know something to create audio-voice streaming with node.js ? [14:13] EyePulp has joined the channel [14:13] adrianmg: i made a real time chat with sockets.io and node [14:13] adrianmg: but what about audio? [14:13] junkee[]: brianc: now i try to build gstreamer from the sources. there was a critical in gst_init and in #gstreame they told me the bug is gone in newer version [14:13] brianc: adrianmg: have to use flash to record audio from browser [14:13] desdur has joined the channel [14:14] adrianmg: Yeah I knew it so, only flash [14:14] adrianmg: cannt use some html5 js api or similar? [14:14] paznicul has joined the channel [14:14] junkee[]: there is something in google chrome [14:14] brianc: junkee[]: cool. I checked the node .cc files and couldn't see a single use of "Inherit()" nor do any of the node c++ files extend event emitter. It's done on the javascript side. [14:14] jetienne: junkee[]: hmm sure ? i would be surprised [14:15] brianc: junkee[]: I don't think it's in google chrome stable yet [14:15] jetienne: junkee[]: input audio is what you are thinking about ? [14:15] brianc: jetienne: google is moving to an html5 way to do voice & video for google chat & voice soon [14:15] jetienne: brianc: which way [14:15] adrianmg: aham [14:17] xerox: https://sites.google.com/site/webrtc/ [14:17] brianc: jetienne: can't remember. saw on hacker news a few days ago. having a hard time finding the article now [14:18] brianc: xerox hits a homerun [14:18] xerox: ACTION runs around the diamond [14:18] jetienne: brianc: webrtc ? this is opensource and all. real nice i dont say otherwise. but nowhere near html5 [14:18] brianc: jetienne: sorry you're right. you're right. not html5 [14:18] jetienne: webrtc is similar to skype [14:19] brianc: jetienne: yeah...i just read they were putting it into chromium soon [14:19] adrianmg: webrtc will be implemented in mozzila [14:19] brianc: "soon" [14:19] jetienne: no problem. just im trying to play a single mp3 in a webpage and already this is not simple. so i jumped :) [14:19] adrianmg: and chrome [14:19] adrianmg: will be great yeah [14:19] deedubs has joined the channel [14:20] brianc: jetienne: are you just wanting to play an mp3 in a web page? [14:20] jetienne: brianc: yep and believe me this is much harder than it sound :) [14:20] nibblebot has joined the channel [14:20] jetienne: after 1 week i think i got it [14:21] brianc: jetienne: i know. i looked into it before. it's ridic. some browsers only do ogg etc. I ended up using http://www.jplayer.org/ [14:21] jslatts has joined the channel [14:21] mrmanager has joined the channel [14:21] xerox: 1. upload to youtube 2. embed with the graceful fallback javascript code 3. ??? 4. profit! :P [14:22] Swimming_bird has joined the channel [14:22] ptlo: xerox: why the graceful fallback javascript code? webrtc is so bleeding edge, if the user has *that*, they're probably going to have everything else installed as well :) [14:23] brianc: "Sorry, this website is so advanced it only works in browsers which will be released next year." [14:23] Poetro has joined the channel [14:24] EyePulp: jetienne: we've had good luck with this: http://schillmania.com/projects/soundmanager2/ [14:24] patrickgamer has joined the channel [14:24] patrickgamer has left the channel [14:25] flou has joined the channel [14:25] jetienne: brianc: EyePulp: yep using soundmanager2 here. i found how to triger sound on ios just yesterday in a apple doc... which seems super hidden :) [14:25] xerox: ptlo: because some users will not? [14:25] hkjels has joined the channel [14:25] EyePulp: jetienne: cool. does mobile safari support html5audio? [14:26] bentruyman has joined the channel [14:26] xerox: I can check [14:26] brianc: it does [14:26] xerox: ! [14:26] ptlo: xerox: i mean, webrtc is too bleeding edge to be useful yet [14:26] xerox: quite [14:26] EyePulp: xerox: what did you just check? [14:27] EyePulp: rtc or audio> [14:27] xerox: nothing because brianc answered [14:27] arpegius_ has joined the channel [14:27] xerox: soundmanager2 is very pretty by the way [14:27] EyePulp: brianc: were you referring to audio? [14:27] brianc: when I checked there was some weird catch about playing mp3 files via javascript which were not in the source document as an audio tag or something? But that was a year ago [14:27] brianc: EyePulp: yes html5 audio tag is supported in mobile safari [14:28] EyePulp: cool [14:28] deedubs_ has joined the channel [14:30] vipaca has joined the channel [14:30] vipaca has joined the channel [14:36] bbttxu has left the channel [14:37] desdur: Is there a unit testing framework that allows to test multiuser anyc use cases? [14:38] brianc: desdur: what is a "multiuser async use case"? [14:39] desdur: as an example - chat server with rooms support build on top of WebSockets, I want to describe and test a use case: 1)user1 creates a room and joins it 2) user2 joins the same room 3) they both leave 4) room is destroyed [14:41] jbpros has joined the channel [14:42] `3rdEden has joined the channel [14:42] brianc: should be possible with nodeunit [14:42] jslatts: desdur: if you are calling client side code to test, then you are creating integration tests, not unit tests. I would mock the users. [14:42] jslatts: vows.js is excellent too [14:42] gibybo has joined the channel [14:46] desdur: jspatts: yes, vows is great, what mock library would you recommend? [14:46] desdur: jslatts: * [14:46] LiamMagee has joined the channel [14:48] softdrink has joined the channel [14:48] jslatts: desdur: with my vows tests, I have just made my own mock objects. prior to that, I was using the jasmine spy [14:49] remysharp has joined the channel [14:49] jslatts: sinon.js looks like one to explore though [14:50] bbttxu has joined the channel [14:50] ryanfitz has joined the channel [14:50] Corren has joined the channel [14:50] hij1nx has joined the channel [14:53] mr12fingers has joined the channel [14:53] Venom_X_ has joined the channel [14:53] mr12fingers: yo [14:53] mr12fingers: can someone help a brotha out [14:53] mr12fingers: I keep getting "could not configure cxx compiler in cgwyn" [14:55] junkee[]: brianc: Hahahaha, sometimes I am the most stupid man in the world. I just forgot to create the symbols with NODE_PSYMBOL and that took me 6 hours... but well, it's working ;) [14:55] defeated: mr12fingers: I've never tried building under cygwin, but did you follow the instructions from the wiki? https://github.com/joyent/node/wiki/Building-node.js-on-Cygwin-%28Windows%29 [14:55] jomoho has joined the channel [14:55] mr12fingers: I tried thse https://github.com/joyent/node/wiki/Building-node.js-on-Cygwin-%28Windows%29 [14:56] mr12fingers: uhh so yea I did [14:57] brianc: junkee[]: haha yay! [14:57] cjm has joined the channel [14:57] adambeynon has joined the channel [14:57] matyr_ has joined the channel [14:57] jbpros has joined the channel [14:57] kmiyashiro has joined the channel [14:58] sharkbone has joined the channel [14:58] defeated: mr12fingers: quick google turns this up: http://stackoverflow.com/questions/3329355/node-js-could-not-configure-a-cxx-compiler/4529904#4529904 [14:59] indexzero has joined the channel [14:59] mandric has joined the channel [14:59] mr12fingers: yea tried that [15:00] mr12fingers: thanks defeated.. I'll try doing it from ash or dash [15:00] colinclark has joined the channel [15:01] mr12fingers: expcept now I'm not sure how to get into ash [15:02] arpegius has joined the channel [15:02] sharkbone has joined the channel [15:02] mr12fingers: defeated ahh found it [15:03] gazumps has joined the channel [15:03] paznicul has joined the channel [15:05] mr12fingers: thanks ! [15:05] devuo has joined the channel [15:07] Swizec has joined the channel [15:07] ryan0x2 has joined the channel [15:08] newy_ has joined the channel [15:08] highermath_away has joined the channel [15:08] dmcquay has joined the channel [15:09] shripad has joined the channel [15:10] jtsnow has joined the channel [15:11] aheckmann has joined the channel [15:11] edsu has joined the channel [15:11] MrTopf has joined the channel [15:12] k1ttty has joined the channel [15:12] indexzero has joined the channel [15:13] shanez has joined the channel [15:14] mrsrikanth has joined the channel [15:15] eyesUnclouded has joined the channel [15:16] mrsrikanth has joined the channel [15:18] mrsrikanth has joined the channel [15:18] shanez has joined the channel [15:18] TooTallNate has joined the channel [15:19] shanez has joined the channel [15:20] mapleman has joined the channel [15:20] mrsrikanth has joined the channel [15:20] ShreeKavi has joined the channel [15:22] philtor has joined the channel [15:23] RORgasm has joined the channel [15:25] brianc has joined the channel [15:25] gkmngrgn has joined the channel [15:26] mrsrikanth has joined the channel [15:26] hojberg has joined the channel [15:27] ShreeKavi has left the channel [15:27] pita: is there a way to write blocking to stdout? cause console.log is non blocking [15:28] groom has joined the channel [15:28] bga_ has joined the channel [15:28] bga_: ryah are you here? [15:28] thejh: pita: I think that console.error is blocking, but I'm not sure [15:30] dtan: you can always throw a new Error [15:33] pita: thejh: yes its blocking, but I need to write to stdout, I wanna keep stderr free for errors [15:34] sharkbone has joined the channel [15:34] blup: is there a nodejs website crawler? [15:35] thejh: pita: how about `process.stdout.write("foo", "utf8")`? `false` means "buffered" [15:35] Xano has joined the channel [15:35] Corren has joined the channel [15:35] thejh: pita: and on "drain" event, you can go on writing [15:35] briznad has joined the channel [15:36] arpegius_ has joined the channel [15:36] asabil has joined the channel [15:37] martyziff has left the channel [15:37] pita: thejh: that means a callback hell :/ [15:37] thejh: pita: sure? [15:38] stephank has joined the channel [15:40] bga_: anybody from devteam? [15:40] madsleejensen has joined the channel [15:41] sivy has joined the channel [15:41] tjholowaychuk has joined the channel [15:42] dkf2010 has joined the channel [15:44] madsleejensen has joined the channel [15:45] eyesUnclouded has joined the channel [15:45] dkf2010 has left the channel [15:47] bentruyman has joined the channel [15:49] lakkris has joined the channel [15:49] zmbmartin: how do I generate a md5 hash of a string? [15:49] niftylettuce has joined the channel [15:49] caolanm has joined the channel [15:50] piscisaureus has joined the channel [15:50] bga_: crypto? [15:52] indexzero has joined the channel [15:52] jakehow has joined the channel [15:52] zmbmartin: bga_: I see thanks [15:53] briznad has joined the channel [15:54] Yuffster_work has joined the channel [15:54] broofa has joined the channel [15:55] replore_ has joined the channel [15:59] boehm has joined the channel [15:59] jameson has joined the channel [16:00] figital has joined the channel [16:00] intel_ix has joined the channel [16:00] unomi has joined the channel [16:04] vyvea has joined the channel [16:07] jerrysv has joined the channel [16:07] infynyxx has joined the channel [16:07] \sega has joined the channel [16:09] wilmoore has joined the channel [16:09] butu5 has joined the channel [16:09] slloyd has joined the channel [16:10] veinofstars has joined the channel [16:10] hkjels has joined the channel [16:11] sh1mmer has joined the channel [16:12] CodyGray has joined the channel [16:12] CodyGray has left the channel [16:15] iffy|x200 has joined the channel [16:16] MGT has joined the channel [16:16] Max-Might has joined the channel [16:17] isaacs has joined the channel [16:19] vipaca_ has joined the channel [16:19] Max-Might has left the channel [16:19] steffkes has joined the channel [16:20] patrickarlt has joined the channel [16:20] yozgrahame has joined the channel [16:20] fairwinds: hi. any good packages for listening for file changes on linux, mac, windows? [16:22] yozgrahame1 has joined the channel [16:23] yozgrahame2 has joined the channel [16:23] mandric has joined the channel [16:23] pifantastic has joined the channel [16:23] yozgrahame3 has joined the channel [16:23] yozgrahame3 has joined the channel [16:24] emb1 has joined the channel [16:24] kmiyashiro has joined the channel [16:24] emb1: any way to have "npm install" remove unused packages? [16:24] Swimming_bird has joined the channel [16:24] isaacs: emb1: you can do `npm prune` [16:24] thejh: is there something like a 64-bit-integer in JS? [16:24] yozgrahame4 has joined the channel [16:24] thejh: (in node) [16:25] isaacs: thejh: no. you could use node-ctypes, though, which stores data in buffers. [16:25] emb1: isaacs: thanks, perfect [16:26] isaacs: thejh: node-ctypes was writen by rm, one of the scary smart lowlevel c hackers at joyent. [16:26] isaacs: thejh: npm install ctype [16:26] thejh: isaacs: is it fast? [16:27] isaacs: thejh: if you want c types, and you want speed, you should probably use c [16:27] isaacs: thejh: but, ctype is pretty fast, yes. [16:27] thejh: isaacs: ok, thanks [16:27] isaacs: thejh: for js code, it's all very inline-able, etc. [16:27] isaacs: and it's probably faster to write your program in js and then port to c when/if speed starts to matter. [16:28] patrickarlt has left the channel [16:28] jerrysv: the amount of time spent writing it in c++ is equal to the amount of time saved over 5 years of running the code. [16:28] jerrysv: (often) [16:28] uchuff has joined the channel [16:29] phiggins has left the channel [16:29] bga_: when node will support job pattern? [16:29] _Sorensen has joined the channel [16:30] bga_: i mean var job = fs.readFile(...); job.stop() [16:30] bga_: ability to stop query [16:30] mraleph has joined the channel [16:30] matyr has joined the channel [16:30] bga_: when you already know you dont need result [16:30] thejh: isaacs: the code already is in C (curve25519-donna), I was just wondering whether it's easier to port it to JS or to make a binding [16:31] vipaca has joined the channel [16:31] vipaca has joined the channel [16:31] thejh: isaacs: but as it relies on 64bit-integers that heavily and I don't have them in JS, a binding is probably the better idea [16:31] isaacs: thejh: bindings aren't so hard. [16:32] isaacs: bga_: we've talked about having a way to cancel operations that are sitting on the event loop [16:32] thejh: isaacs: I just need to bind one function, how do I do that? can you give me a link to a tutorial or so? I usually understand C/C++ when I read it, but I can't really write it. [16:32] isaacs: bga_: not a full-on promise pattern, but maybe just have fs.open return some kidn of { id: 1234, abort:function(){} } [16:33] isaacs: thejh: https://github.com/isaacs/node-async-simple [16:33] bga_: isaacs id? [16:33] niftylettuce has joined the channel [16:34] thejh: isaacs: looks like it's what I need, thanks :) [16:34] adambeynon has joined the channel [16:34] mediacoder has joined the channel [16:34] isaacs: bga_: just some id or whatever we get from libev [16:34] isaacs: or libeio, rather [16:35] indutny: isaacs: beautiful! [16:35] bga_: from my point of view its should be Job class which allow you add/remove "complete" event listeners and {stop()}/{abort()} method [16:35] bga_: isaacs hm [16:35] isaacs: bga_: sure, it'll be a js class, since those are way faster to create anywya [16:35] bga_: so low level [16:35] isaacs: but then you can build higher level things on top of it, if you want [16:35] bga_: good [16:36] isaacs: bga_: it's one of those things where everyone kinda agrees it'd be a good idea, but no one's done it yet. [16:36] bga_: i'll wait this feature :) [16:36] isaacs: bga_: i'd recommend bringing it up on the node-dev list, maybe putting together a quick minimal patch and some tests or something. [16:36] isaacs: don't spend lots of effort on it, though, in case the discussion heads in a different direction. [16:37] isaacs: but sometimes it's easier to describe what you want in code, rather than in words :) [16:37] Aria has joined the channel [16:37] indexzero has joined the channel [16:37] vipaca_ has joined the channel [16:37] xsyn has joined the channel [16:38] iffy has joined the channel [16:38] deedubs has joined the channel [16:38] xsyn: Can anybody point me to a tutorial where node watches a coudb and on a particular change of a document responds with and alert box (or something similar)? [16:39] xsyn: s/tutorial/example/ [16:39] xsyn: or similar [16:39] supsup has joined the channel [16:39] thejh has joined the channel [16:39] thejh has joined the channel [16:39] supsup: random question and i know you are not lawyers: paul Irish twitted about a web font-generator using node.js on his twitter page -- but it uses the apache license -- how would you give credit on use? after each letter you render(lol) ? or just on a help page -- each page. so confused about legal licenses. [16:40] Aria: xsyn: Alert box displayed where? node itself doesn't do much in the user interface department [16:40] trotter has joined the channel [16:40] Aria: supsup: Probably just a mention somewhere in 'the app', whatever seems a reasonable boundary for that. [16:41] xsyn: Aria: Jade rendered html page [16:41] xsyn: like a websocket or something [16:41] asobrasil has joined the channel [16:41] Aria: xsyn: Well, you need a way for that html page to get an event from the server -- perhaps socket.io or hook.io, or a long-polled XHR request. [16:42] hackband has joined the channel [16:42] sharkbone has joined the channel [16:43] xsyn: Aria, I'll look into socket.io [16:43] xsyn: ta [16:43] Aria: Sure thing. Socket.io is pretty neat. [16:43] caolanm has joined the channel [16:43] Aria: Handles all sorts of compatibility stuff that's great once you're dealing with browsers. [16:43] Aria: Since they all suck in some way. [16:43] dshaw_ has joined the channel [16:44] xsyn: don't they just [16:45] pita: How can I write blocking in stdout with node.js? http://stackoverflow.com/questions/6471004/how-can-i-write-blocking-in-stdout-with-node-js [16:45] supsup has left the channel [16:45] Country has joined the channel [16:46] amerine has joined the channel [16:46] kruckenb has joined the channel [16:46] Aria: Answering there. [16:46] butu5 has joined the channel [16:47] mrmanager has joined the channel [16:47] jj0hns0n has joined the channel [16:47] CrabDude has joined the channel [16:47] vyvea has joined the channel [16:48] bene has joined the channel [16:49] cjm has joined the channel [16:49] iffy: pita, not really an answer to your question but... if you're just piping to a file (which might not be the only thing you need), you could just use the FS module to write to a file directly [16:50] pita: iffy: writing into a file is non blocking to, but I can try it. thx [16:50] iffy: pita, isn't there a synchronous version of file writes? [16:51] iffy: pita, http://nodejs.org/docs/v0.4.8/api/fs.html#fs.writeSync [16:51] intel_ix has left the channel [16:51] iffy: iirc, all the fs non-blocking calls have synchronous (blocking) equivalents [16:52] robertfw has joined the channel [16:53] deedubs has joined the channel [16:53] newy_ has joined the channel [16:53] pquerna: zzzlib... in ... the coooorreee [16:55] matyr has joined the channel [16:55] febits has joined the channel [16:55] iFire has joined the channel [16:55] pita: iffy: awesome, thx [16:56] topaxi has joined the channel [16:56] apanda has joined the channel [16:57] dshaw_ has joined the channel [16:59] asabil has joined the channel [17:00] BenHu has joined the channel [17:00] F1LT3R has joined the channel [17:00] infynyxx has joined the channel [17:00] kruckenb has joined the channel [17:01] tjholowaychuk: isaacs what's that flag again to ignore npm compilation on publish? [17:01] tjholowaychuk: it's failing with expresso too [17:02] isaacs: tjholowaychuk: actually, that's opt-in as of 1.0.latest-something [17:02] tjholowaychuk: k ill try upgrading [17:02] isaacs: tjholowaychuk: it's too tricky to do in a distributed way, sadly. we really need to design a proper build bot system or somethign [17:02] CS3 has joined the channel [17:03] Poetro has joined the channel [17:04] Yoric has joined the channel [17:05] cinch has left the channel [17:05] abraham has joined the channel [17:07] pengwynn has joined the channel [17:07] tratatun has joined the channel [17:08] mehlah has joined the channel [17:09] niftylettuce has joined the channel [17:09] fangel has joined the channel [17:10] pita: iffy: doesn't work to, cause for write() you need to set a position in the file, if you wanna do append only you need to create a write stream which is again non blocking [17:10] ambroff has joined the channel [17:10] framlin: xsyn: have you seen this: http://guide.couchdb.org/draft/notifications.html [17:10] framlin: I think it should be no problem to use node instead of curl .... [17:10] fostah has joined the channel [17:11] springmeyer has joined the channel [17:11] fostah|2 has joined the channel [17:11] fostah|3 has joined the channel [17:11] kruckenb has joined the channel [17:11] bazookatooth: http://www.youtube.com/watch?v=9u9-AdPAOy0 [17:11] Asus has joined the channel [17:12] TheFuzzball has joined the channel [17:12] dguttman has joined the channel [17:13] Poetro1 has joined the channel [17:13] Asus has joined the channel [17:13] DTrejo has joined the channel [17:14] framlin: xsyn: cradle is supporting the changes api of couchdb, too: https://github.com/cloudhead/cradle [17:14] hebz0rl has joined the channel [17:16] sweetd has joined the channel [17:17] pita: iffy: fs.writeSync(1, "Foo\n"); is the solution! [17:17] sourcode has joined the channel [17:17] vyvea has left the channel [17:17] vyvea has joined the channel [17:17] vyvea has left the channel [17:17] vyvea has joined the channel [17:17] vyvea has left the channel [17:18] vyvea has joined the channel [17:18] vyvea has left the channel [17:18] vyvea has joined the channel [17:18] vyvea has left the channel [17:18] vyvea has joined the channel [17:21] wookiehangover has joined the channel [17:21] sharksauce has joined the channel [17:22] daneroo has joined the channel [17:22] adambeynon has joined the channel [17:23] daneroo: any suggestions/preferences for an npm library to talk to couchdb ? (I need attachments...) [17:24] dshaw_ has joined the channel [17:25] jacobolus has joined the channel [17:25] framlin: daneroo: I use cradle [17:26] framlin: but I did not use attachments right now [17:26] BillyBreen has joined the channel [17:26] daneroo: thanx, I'll look it up, I'm going through the list of modules at : https://github.com/joyent/node/wiki/modules#db-nosql-couch [17:28] SubWolf has joined the channel [17:28] daneroo has joined the channel [17:30] Xano has joined the channel [17:30] Cleer has joined the channel [17:30] ap3mantus has joined the channel [17:30] temp01 has joined the channel [17:31] TooTallNate has joined the channel [17:32] harth has joined the channel [17:32] TheFuzzball has joined the channel [17:33] alessio_alex has joined the channel [17:33] unlink has joined the channel [17:33] unlink has joined the channel [17:34] dguttman_ has joined the channel [17:34] hybsch has left the channel [17:35] avalanche123 has joined the channel [17:35] liar has joined the channel [17:35] avalanche123 has joined the channel [17:36] reid has joined the channel [17:36] skohorn has joined the channel [17:37] seawise has joined the channel [17:37] djcoin has joined the channel [17:37] isaacs: hi [17:37] isaacs: what do you guys think of this? https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines [17:38] alessio_alex: first opinion: "finally" [17:38] devuo has joined the channel [17:38] infynyxx1 has joined the channel [17:38] Aria: I am a fan. [17:38] alessio_alex: isaacs that's good [17:38] iffy: isaacs, i like it [17:38] c4milo: isaacs: it looks good to me [17:38] Aria: Clear, concise, community-oriented, focused on the dev list, and anti-flaming and anti-job-posting. [17:39] isaacs: ok, cool [17:39] iffy: what Aria said =] [17:39] isaacs: i really want to not come off as picking on people who are trying ot hire node devs. [17:39] isaacs: i'm sure that most of the job posts are trying to be respectful, and just don't realize there's another place for it [17:39] Aria: Yeah. [17:39] alessio_alex: yes [17:40] alessio_alex: and the price tag is just perfect to avoid unprofessional folks [17:40] Aria: You might add a note "Yes, the job board charges money. However, we've got some really great talent out there, and if you're just looking for a PHP/Javascript developer and the cost is therefore putting you off, maybe there's a reason." [17:40] Aria: Yeah. [17:40] alessio_alex: besides, they get free publicity on the Node.js official website if they post their jobs where they should [17:40] alessio_alex: Aria said it perfectly :) [17:41] knirhs has joined the channel [17:42] bartt has joined the channel [17:42] isaacs: Aria: i dig that. [17:42] isaacs: adding :) [17:42] rmustacc has joined the channel [17:42] pjacobs has joined the channel [17:43] Aria: Because historically, you generally want to weed out people trying to poach devs to be buzzword compliant but are otherwise offtopic, and people who want to get someone to work for free on their pet facebook clone. [17:43] Aria: A fee helps both, and saying why helps too. [17:44] zemanel has joined the channel [17:44] alessio_alex: yup, the problem with those job postings on the mail group is that everybody seems to want something else and includes Node.js just so he/she can mail on our group. [17:45] caolanm has joined the channel [17:45] lorinc has joined the channel [17:45] robi42 has joined the channel [17:45] point9repeating has joined the channel [17:46] Poetro has joined the channel [17:47] matyr has joined the channel [17:48] pjacobs has joined the channel [17:49] aron_ has joined the channel [17:49] madsleejensen has joined the channel [17:50] ap3mantus has joined the channel [17:50] saurabhverma has joined the channel [17:50] sourcode has joined the channel [17:51] `3rdEden has joined the channel [17:52] mapleman1 has joined the channel [17:53] isaacs: alessio_alex: i think it's fair for a mostly-php shop to want to hire someone who knows nodejs (if that's where they'd like to expand), but also expect them to know php (so they can pitch in with other work) [17:53] isaacs: but yeah, you don't want a php+jquery shop to email our list just because nodejs users know javascript [17:53] uchuff has joined the channel [17:53] isaacs: and you can see why they'd want that: the node community has some of the best javascripters I've ever seen. [17:54] saurabhverma has joined the channel [17:54] alessio_alex: yes, that's true.. [17:56] kitedawg has joined the channel [17:57] pjacobs: anyone using AWS? I'm getting socket.io reconnects, I think something might be wrong. Can't reproduce it anywhere else.. Anyone else in the same boat? [17:58] mikey_p: jobs.nodejs.org Y U TEASE ME? http://jobs.nodejs.org/a/jobs/find-jobs/l-Portland%2C+OR/mi-50 [17:58] bartt has joined the channel [17:58] jerrysv: mikey_p: yeah, i did the same thing [17:59] Murvin has joined the channel [18:00] pjacobs: can someone please help me? I'm stuck. If I can't reliably deploy this PoC, I won't be able to convince my bosses to let me start using node.js at work.. [18:00] thejh: about "crypto": I can't get a hash as a Buffer, right? Do I really have do do this? `new Buffer(md5.digest('base64'), 'base64')` [18:01] euforic has joined the channel [18:01] Murvin: tjholowaychuk: Hi.. i remember you have developed something like gzip for resources (like js, css). what is the name? :) [18:01] thejh: pjacobs: I don't know whether I can help, but just tell us [18:01] linternaverde has joined the channel [18:01] linternaverde has left the channel [18:02] sfragis has joined the channel [18:02] euforic: are there any node mysql modules that can run SPROCS [18:02] raidfive has joined the channel [18:02] euforic: node-mysql will run them but if you run 2 with in a short period of time the second returns no results [18:03] PeterPeterPeter has joined the channel [18:03] pjacobs: I've deployed a test implementation of something I might get to work on in node.js. My bosses want to see a PoC. Here's what I've got: flavorgate.com:8080 the code is at github.com/phillyqueso/blog, and the problem: I get socket.io reconnects like crazy as soon as a second or more client(s) hits the app. [18:03] DTrejo has joined the channel [18:03] c4milo: pjacobs: did you ping the mailing list? [18:03] c4milo: pjacobs: socket.io mailing list [18:04] pjacobs: no, but I tried #socket.io.. got crickets [18:04] c4milo: ahah [18:05] c4milo: pjacobs: did you test doing a http connection in streaming [18:05] daneroo has joined the channel [18:05] pjacobs: c4milo, you may need to elaborate on that. I'm pretty new.. [18:06] c4milo: pjacobs: how do you know that it is a socket.io issue? [18:06] pjacobs: well, I don't. In fact I don't think it is. I think it may be a AWS issue.. Just figured that someone might have ran into the same problem [18:07] Poetro has joined the channel [18:08] sharkbone has joined the channel [18:08] pjacobs: c4milo, what's an http connection in streaming? Some kind of test I can do? [18:08] indexzero has joined the channel [18:08] c4milo: pjacobs: got it, I think that's a serious issue, if socket.io had it, I am pretty sure there will be a lot of people in the mailing list screaming. So I would say that it isn't a socket.io issue, it might be network or proxy issues [18:08] n00b_ has joined the channel [18:08] Bwen has joined the channel [18:09] c4milo: pjacobs: yeah, one sec [18:09] pjacobs: c4milo, yeah, I'm sure it is. Do people shy away from AWS for node.js? I've used it pretty happily for non websockets/socket.io stuff for a while.. [18:09] jerrysv: pjacobs: just checking, but you're running 0.4.x right? not 0.5 ? [18:10] pjacobs: c4milo, I'm on 0.5 [18:10] cbiscardi has joined the channel [18:10] mandric has joined the channel [18:10] jerrysv: pjacobs: use 0.4.x, 0.5 is bleeding edge dev with a lot of the innards being replaced [18:10] pjacobs: oops.. was meant for @jerrysv [18:11] pjacobs: jerrysv, cool. Do you think that'll fix anything? [18:11] adambeynon has joined the channel [18:11] pjacobs: jerrysv, I'm not really doing anything outrageous [18:11] jerrysv: pjacobs: if it doesn't, that will be the first step that anyone will ask you to eliminate [18:11] Yoric has left the channel [18:11] maushu has joined the channel [18:12] Metroknow1 has left the channel [18:12] _jesusabdullah: My impression is that aws is cheap but that you get what you pay for [18:12] pjacobs: jerrysv, cool, on it right now [18:12] jerrysv: oh, hey jesusabdullah, how was the rest of the trip? any good beer stops? [18:12] level09 has joined the channel [18:13] c4milo: pjacobs: yeah man, use 0.4.8. jerrysv said it well [18:14] c4milo: pjacobs: https://gist.github.com/1045342 [18:15] sharkbone has joined the channel [18:15] xerox: is there a common/agreed upon destructor pattern in JS [18:15] xerox: for symmetry with new, which also lets you run a clean up function? [18:16] CS3 has joined the channel [18:16] pjacobs: c4milo, thanks [18:16] c4milo: xerox: in JS land no that I know [18:16] tanepiper has joined the channel [18:17] sendark has joined the channel [18:18] aliem has joined the channel [18:18] c4milo: xerox: but you can achieve that using V8 API [18:18] c4milo: pjacobs: np [18:18] voodootikigod has joined the channel [18:21] reid has joined the channel [18:21] charleyd has joined the channel [18:22] replore has joined the channel [18:22] bnoordhuis has joined the channel [18:23] bbttxu has left the channel [18:25] indexzero has joined the channel [18:25] CS3 has left the channel [18:25] Murvin: hey, i want to confirm one thing.. if I run multiple node.js instance (different port), and which they will send out http.request, are they share the same socket connection pool? [18:25] bnoordhuis: Murvin: you mean multiple node processes? [18:26] c4milo: Murvin: nop [18:26] CrypticSwarm has joined the channel [18:26] _jesusabdullah: jerrysv: I bought a 40oz "COBRA" at a gas station. Does that count? ;) [18:27] _jesusabdullah: I always thought the 32ozers were 40s [18:27] _jesusabdullah: but nay [18:27] _jesusabdullah: 40 ounces of cheap booze is a lot! [18:27] _jesusabdullah: Oh, well, and we bought some Blue Moon and Sierra Nevada, but I drink SN all the time [18:27] ctide: to clarify, that's a KING COBRA [18:27] _jesusabdullah: is it now? [18:27] ctide: and it's one of man's greatest achievements [18:27] _jesusabdullah: brb reading label [18:28] jerrysv: _jesusabdullah: doesn't count :) when i saw you going down 101, i meant to point you to fort bragg for north coast [18:28] Murvin: bnoordhuis: yes. [18:28] _jesusabdullah: hahaha XD [18:28] _jesusabdullah: It does, in fact, say king COBRA on it [18:28] bnoordhuis: Murvin: no, each process is completely separated from the others [18:28] tenumm has joined the channel [18:28] Murvin: i have run 2 different nodes in the same server. [18:29] _jesusabdullah: I already drove past Ft. Bragg :( [18:29] sgupta has joined the channel [18:29] d0k has joined the channel [18:29] herbySk has joined the channel [18:29] jerrysv: yeah, i'm late [18:29] Murvin: and I only send request to one of the node. (which will call http.request to remote server). [18:30] Murvin: and then i run lsof on both nodes' PID, and they have the same # of socket open [18:31] AvianFlu has joined the channel [18:32] bnoordhuis: Murvin: what is the exact lsof command you used? [18:32] Murvin: bnoordhuis: lsof -i 4 -p PID | wc -l [18:33] Murvin: bnoordhuis: by the way, what is net_uv.js ? is it going to replace net.js? or just idfferent thing? [18:33] arpegius has joined the channel [18:33] bnoordhuis: Murvin: it's going to replace the old net.js yes [18:34] bnoordhuis: Murvin: could you try `lsof -i 4 -a -p PID | wc -l`? [18:34] Murvin: bnoordhuis: ok. will do it few minutes later.. i just brought down my server. LOL [18:35] uchuff has joined the channel [18:35] bnoordhuis: Murvin: no rush :) [18:36] bradleymeck_ has joined the channel [18:36] saikat has joined the channel [18:37] chiyam has joined the channel [18:37] cbiscardi has joined the channel [18:37] daneroo has joined the channel [18:37] dve has joined the channel [18:37] bazookatooth has joined the channel [18:38] steffkes^ has joined the channel [18:40] saikat_ has joined the channel [18:41] romanb has joined the channel [18:42] mhilmi has joined the channel [18:42] Yoric has joined the channel [18:43] micheil: hey, what's the best low-level http session library? [18:43] Yoric has joined the channel [18:43] micheil: needing something less then connect-session, but still session support [18:43] micheil: (so, cookie and storage of data) [18:44] Yoric has joined the channel [18:44] slicky: for simple stuff, just handle the session yourself... it's incredibly easy [18:44] unibomb has joined the channel [18:44] tjholowaychuk: micheil why do you need less? [18:45] micheil: I've got a very simple demo running on the http module, not wanting to rewrite as a connect stack [18:45] tjholowaychuk: connect.session(req, res) [18:45] tjholowaychuk: or similar should still work [18:45] tjholowaychuk: well connect.session()(req,res) [18:46] brianseeders has joined the channel [18:46] micheil: does that depend on redis? [18:46] tjholowaychuk: only if you use the redis store [18:46] micheil: like, can I use connect.session without the rest of connect? [18:46] tjholowaychuk: yeah, you can use most of them if not all of them [18:46] tjholowaychuk: alone [18:46] micheil: sweet. [18:47] uchuff has joined the channel [18:49] knirhs has joined the channel [18:49] taf2: does node.js have sprintf ? [18:49] baudehlo: no but you can download one from npm [18:49] tbranyen: taf2: depends on what you're doing [18:50] tbranyen: you can get something similar with console.log if you just want to output [18:50] tbranyen: console.log("%s", "lol") [18:50] baudehlo: console.log has very limited sprintf type stuff. [18:50] taf2: would like to print numbers rounded to 2 digits [18:50] bazookatooth has left the channel [18:50] tbranyen: taf2: use toFixed on the number object [18:50] taf2: yeah not through console, but into another string [18:50] taf2: cool [18:50] taf2: ACTION googles [18:50] tbranyen: >> 5.10234 .toFixed(2) [18:50] tbranyen: oh well [18:50] sonnym1 has joined the channel [18:50] jerrysv: v8: 5.10234.toFixed(2); [18:50] v8bot: jerrysv: "5.10" [18:51] tbranyen: that shouldn't have worked [18:51] taf2: that's perfect [18:51] akshatj has joined the channel [18:51] taf2: thanks [18:51] tbranyen: taf2: make sure you put a space between the number and the .toFixed [18:51] tbranyen: unless its assigned to a variable [18:51] jerrysv: v8: 5.10234 .toFixed(2); [18:51] v8bot: jerrysv: "5.10" [18:51] taf2: would (10.23232).toFixed(2) be okay? [18:51] tbranyen: yes [18:52] taf2: or in my case (file.size / 1024).toFixed(2) [18:52] alessio_alex has joined the channel [18:52] sharkbone1 has joined the channel [18:52] tbranyen: well maybe its fine without in node/v8 thats interesting [18:52] tbranyen: your code just wouldn't be portable, if thats an issue [18:52] jerrysv: i believe it is [18:53] jerrysv: and in safari [18:54] micheil: btw, tjholowaychuk you need to fix the quote escaping in the connect docs. [18:54] sgupta has joined the channel [18:54] jerrysv: and firefox. don't have ie/opera here though [18:54] tjholowaychuk: some day [18:56] yozgrahame has joined the channel [18:56] tbranyen: jerrysv: the parsers are probably just better in all the latest interpreters [18:56] yozgrahame has joined the channel [18:57] caolanm has joined the channel [18:57] xeodox has joined the channel [18:58] Horofox has joined the channel [18:59] softdrink1 has joined the channel [18:59] adambeynon has joined the channel [19:00] jvduf has joined the channel [19:00] jamescarr_ has joined the channel [19:00] hellp has joined the channel [19:01] robi42 has joined the channel [19:01] indexzero has joined the channel [19:01] mrryanjohnston-e has joined the channel [19:02] mjr_ has joined the channel [19:02] mrryanjohnston-e: is it common to see all of yoru html code in one line when you view source on a page generated with a .jade template? [19:03] supster has joined the channel [19:04] tjholowaychuk: mrryanjohnston-e yeah there's no pretty printing option right now [19:04] mrryanjohnston-e: tjholowaychuk: word [19:04] mrryanjohnston-e: any chance there is something like that in the works? :3 [19:05] kmiyashiro: I like it on one line [19:05] wadey has joined the channel [19:05] kmiyashiro: auto optimization [19:05] Murvin: tjholowaychuk: Hi.. what is your package for Gzip (in express) called? [19:06] tjholowaychuk: Murvin i dont have one [19:06] tjholowaychuk: connect used to have one [19:06] tjholowaychuk: well two [19:06] tjholowaychuk: but they both were pretty lame [19:06] tjholowaychuk: slow/unstable [19:06] akshatj has joined the channel [19:07] mrryanjohnston-e: kmiyashiro: to each their own I suppose! [19:07] Murvin: tjholowaychuk: oh.. cause I saw your previous post about staticGzip. :) is there anything that you recommend for gzip js and can be served by express? [19:08] tjholowaychuk: https://github.com/senchalabs/connect/wiki [19:08] tjholowaychuk: check that list of middleware [19:08] devrim has left the channel [19:08] Murvin: tjholowaycuk: ok. which one is fast? lol [19:08] Gimpster has joined the channel [19:09] tjholowaychuk: i dont know [19:09] tbranyen: when i'm in a module and create a function in the module scope, how can i reference later on dynamically without eval? [19:09] tbranyen: mymodule.js: function name() { }; global['name']() is no go [19:09] tbranyen: module['name'] hmmm [19:09] tbranyen: doubt that'd work [19:09] mrryanjohnston-e: tbranyen: require('mymodule.js') [19:09] mrryanjohnston-e: er [19:10] bradleymeck_: use the exports object [19:10] mrryanjohnston-e: var myModuleInstance = require('mymodule.js') [19:10] tbranyen: i don't want to export it [19:10] tbranyen: its private [19:10] tbranyen: its gotta go to some object [19:10] mrryanjohnston-e: So then export it and require it in that object/. [19:10] mrryanjohnston-e: ? [19:10] chrisdickinson: tbranyen: from another file? maybe in global scope, this.mymodulefn? [19:10] tbranyen: chrisdickinson: just tried global which should be global scope [19:10] tbranyen: i'll try this [19:11] tbranyen: nope :-/ [19:11] tbranyen: eff [19:11] chrisdickinson: boo ): [19:11] Murvin: tjholowaychuk: coz my js is pretty static. can I just gzip the js manually and put it into public folder? or it has to gzip by server? [19:12] mrryanjohnston-e: tbranyen: still confused why you can't export it :| [19:12] tjholowaychuk: Murvin yeah nothing wrong with that really. we pipe some stuff through gzip and send it off to s3 for example [19:13] tbranyen: mrryanjohnston-e: because i don't want to [19:13] tbranyen: its a private function [19:13] MatthewS has joined the channel [19:13] tbranyen: exports are to expose public [19:13] tbranyen: i could just assign it to any object at that point [19:13] Murvin: tjholowaychuk: i see.. and client browser can read it without problem, right? :) [19:13] rfay has joined the channel [19:13] tjholowaychuk: yeah [19:13] Murvin: tjholowaychuk: thanks. :) [19:14] gozala has joined the channel [19:14] tbranyen: sandbox.global = sandbox; [19:14] tbranyen: hmmm, wtf [19:14] tbranyen: that should be working then with global [19:14] mrryanjohnston-e: well wait [19:14] zmbmartin: I am having trouble wrapping my head around async stuff. If I make a http post req how do I assign a variable to the body data that is returned. I keep getting variable is undefined? [19:14] mrryanjohnston-e: it's only public if you then require it, right? [19:15] mrryanjohnston-e: zmbmartin: callback [19:15] tbranyen: mrryanjohnston-e: i see what you're saying, but its no different than me just creating var self = {}; and attaching it to that [19:15] micheil: tjholowaychuk: okay, so using just connect.session didn't work, so I just rewrote it as a connect app. [19:15] mrryanjohnston-e: zmbmartin: since it's not procedural, you need to use callbacks [19:15] tbranyen: which i was trying to avoid, for style reasons [19:15] slicky: Hey tjholowaychuk, could I pick your brain for a second? My friend is writing a simple test app and he can't seem to get stylus to work. Any suggestions on where he's going wrong? https://github.com/stygeo/ap-ccs3 [19:15] micheil: simplest possible solution [19:15] mrryanjohnston-e: tbranyen: hmmmmerz [19:15] micheil: I should deploy this to node. [19:15] micheil: erm [19:15] tbranyen: mrryanjohnston-e: especially since you should be able to do this anyways [19:15] micheil: no.de, it's a pretty cool example of a server acting as a websocket client [19:16] Bwen: anyone has a working example for nodejs + socketio in HTTPs? cant seem to find anything [19:16] micheil: (read, pusher.com client) [19:16] mrryanjohnston-e: tbranyen: I guess you're just doing stuff a bit over my head :3 [19:16] daneroo: is it possible to 'wait' until all pending events are done, same test as node uses to exit ? [19:16] mrryanjohnston-e: sorry bout that dude [19:16] tjholowaychuk: slickplaid: GET /stylesheets/foo.css will look for ./stylus/stylesheets/foo.styl [19:16] tjholowaychuk: in that setup [19:17] tjholowaychuk: you dont need both those stack middleware either [19:17] mrryanjohnston-e: daneroo: node doesn't wait to exit. [19:17] tjholowaychuk: just the ./public one [19:17] tbranyen: mrryanjohnston-e: yeah i guess i just didn't see it being this complicated [19:17] mrryanjohnston-e: node waits for no man [19:17] tbranyen: kind of annoying [19:17] mrryanjohnston-e: tbranyen: It's javascript :P [19:17] daneroo: maybe 'wait' is the wrong word... [19:17] slickplaid: Ah okay, thanks :) [19:17] slickplaid: tjholowaychuk++ [19:17] tenumm: Hello Noders - using wscript for addon module I am trying to link my lib "conf.check_cfg(package='bus, args='--cflags --libs', uselib_store='LIBBUS) " and getting error while node-waf configure it says node found. Though my libbus.so is in /usr/lib/ [19:17] v8bot: slickplaid has given a beer to tjholowaychuk. tjholowaychuk now has 35 beers. [19:18] tbranyen: mrryanjohnston-e: this appears to be node related [19:18] Murvin: bnoordhuis: hey. I have used the command you gave me to test. it shows that the sockets are not shared among different processes. you are right. that's great. :) hehehe [19:18] tbranyen: not js [19:18] deedubs has joined the channel [19:18] Murvin: bnoordhuis: I should know more about this command. lol [19:18] mrryanjohnston-e: tbranyen: ah. submit a ticket maybe? [19:18] bnoordhuis: Murvin: i gave you that other one-liner, right? sorry about that, forgot the -a [19:18] daneroo has joined the channel [19:18] mrryanjohnston-e: perhaps it's just not implemented yet? [19:18] daneroo: node exits, when,... all pending are done ? [19:18] tbranyen: mrryanjohnston-e: still looking into the module code [19:19] mrryanjohnston-e: tbranyen: let me know [19:19] stagas has joined the channel [19:19] mrryanjohnston-e: daneroo: what are you tryin gto do? [19:19] enr^ has joined the channel [19:19] rook2pawn has joined the channel [19:19] Murvin: bnoordhuis: yes. the one i had previously has no -a :) what does -a do? i look into help, it doesn't tell me much. hehe [19:20] mcluskydodallas has joined the channel [19:21] qbyt has joined the channel [19:21] podman1 has joined the channel [19:21] podman1 has left the channel [19:22] bnoordhuis: Murvin: -a == AND, without it you check for tcp4 sockets OR fds of process PID [19:23] Nican has joined the channel [19:23] daneroo: mrryanjohnston-e: I am trying to get out of a deeply nested callback, and would just like to move on when all thos callbacks complete.... [19:24] m00p has joined the channel [19:25] daneroo: Maybe I could trigger some 'event' from all the possible exit point of my callbacks.... [19:25] broofa has joined the channel [19:27] Tobsn has joined the channel [19:29] rmustacc has left the channel [19:31] jhurliman has joined the channel [19:33] markwubben has joined the channel [19:34] emb1 has joined the channel [19:37] Renegade001 has joined the channel [19:38] rhdoenges has joined the channel [19:38] cjus has joined the channel [19:38] as has joined the channel [19:39] daneroo has joined the channel [19:39] cjus: How do I use multiple source files to create a single module? I'm building an API and want to wrap under a module but don't want to put all the code in the same file. [19:40] insin has joined the channel [19:41] igl: cjus: http://nodejs.org/docs/v0.4.8/api/modules.html [19:41] AaronMT has joined the channel [19:43] shoebat has joined the channel [19:44] cjus: @igl thanks. I read the doc at that link before - but the answer eluded me. Just not making the connection. [19:45] xerox: c4milo: where is this api defined/documented? [19:46] xsyn: is the socket.io.js in socket.io's lib folder the client side js? [19:46] `3rdEden: xsyn [19:46] `3rdEden: no [19:46] tilgovi has joined the channel [19:46] `3rdEden: https://github.com/LearnBoost/Socket.IO/tree/master/dist [19:46] `3rdEden: that is, but its served automagically by socket.io [19:46] c4milo: xerox: http://v8.googlecode.com/svn/trunk/include/v8.h [19:47] `3rdEden: as /socket.io/socket.io.js [19:47] xerox: c4milo: I was hoping for nodejs interface instructions :| [19:47] c4milo: xerox: nop, nodejs doesn't expose that part of the api afaik [19:48] c4milo: in javascript land [19:48] xerox: c4milo: so I should just make my own style, and define an unload function to call before delete [19:48] patcito has joined the channel [19:48] xerox: and deal with bugs myself [19:48] xsyn: `3rdEden: Thank you [19:48] micheil: `3rdEden: thoughts on SocketStream? [19:48] goa has joined the channel [19:48] c4milo: xerox: I think so [19:48] rauchg has joined the channel [19:48] `3rdEden: micheil looks good, hating the coffeescript [19:49] xerox: shucks. [19:49] `3rdEden: micheil but I do think allot people are going to use it [19:49] micheil: `3rdEden: more so concept wise. I looked at it this morning. It's pretty much just RPC [19:50] tjholowaychuk: it kinda looks like it tries to do way too much [19:50] tjholowaychuk: kinda lost my interest [19:50] tjholowaychuk: i dont like seeing massive projects that just bundle everything up [19:50] andrewfff has joined the channel [19:51] al3xnull_ has joined the channel [19:52] micheil: tjholowaychuk: it's got my interest, but I think it's the slightly wrong approach [19:53] micheil: tjholowaychuk: although, me working for pusher, we may end up doing a greenfield of a similar style thing. [19:53] micheil: (that is, if I choose to do it) [19:54] taf2: anyone have examples using knox to list files? [19:54] taf2: by folder... kinda s3hub style? [19:55] boaz has joined the channel [19:56] sh1mmer has joined the channel [19:59] rpflo has joined the channel [19:59] indexzero has joined the channel [19:59] sharkbird1 has joined the channel [20:00] swaj: what do you guys think of Faye? [20:00] jameson has joined the channel [20:00] micheil: it's awesome. [20:00] bbttxu has joined the channel [20:00] swaj: noticed any bugginess? [20:00] micheil: not really, I've not used it, but read the code. [20:01] mrryanjohnston-e: daneroo: sorry, yo ustill here? [20:01] micheil: to be honest, I wouldn't use either Faye nor Socket.io, but that's because I work at pusher.com and write node-websocket-server [20:01] tmpvar has joined the channel [20:01] zmbmartin: mrryanjohnston-e: so with this http example off of node.js docs how would I assign the chunk in res.on to a variable? [20:02] zmbmartin: I am just missing something. [20:02] zmbmartin: I am so use to procedural [20:02] iffy|x200 has joined the channel [20:02] asobrasil has joined the channel [20:02] mrryanjohnston-e: zmbmartin: what example? [20:03] zmbmartin: mrryanjohnston-e: https://gist.github.com/1045550 my bad sorry [20:06] jkridner_ has joined the channel [20:06] mrryanjohnston-e: zmbmartin: how you would assign the variable 'chunk' to a variable? [20:07] harth has joined the channel [20:08] Nuck has joined the channel [20:08] niftylettuce has joined the channel [20:08] mrryanjohnston-e: zmbmartin: I'm a bit confused. this doesn't look like the http server examples I've seen before ;) [20:09] mrryanjohnston-e: I'm fairly new myself [20:09] zmbmartin: mrryanjohnston-e: I need to post to a server for an authtoken. So if the response is successful I wanted to authtoken assigned to a variable. [20:09] mrryanjohnston-e: zmbmartin: http://groups.google.com/group/nodejs/msg/5914f1d80f144b86 [20:09] mrryanjohnston-e: also there is an oauth module out there [20:09] mrryanjohnston-e: if youw ant an example that already exists [20:11] mrryanjohnston-e: zmbmartin: 2 actually as far as clients go: https://github.com/ciaranj/node-oauth ; https://github.com/itea/oauthjs [20:12] mrryanjohnston-e: though the latter looks like it hasn't been updated since november [20:12] tahu has joined the channel [20:14] path[l] has joined the channel [20:14] mrryanjohnston-e: zmbmartin: ps, where did you find that example? [20:14] zmbmartin: mrryanjohnston-e: alright I will take a look thanks [20:14] zmbmartin: it was in the node docs under http.request [20:15] zmbmartin: The example works fine if I console.log in the res.on but I am trying to get that res saved to a variable. [20:15] c4milo: http://ricochetvideos.com/cms/video/hippie-needs-vc-money-for-her-share-the-air-air-bottling-company/ [20:15] c4milo: we all should help her to sell air [20:15] c4milo: hehe [20:16] zaerymoghaddam has joined the channel [20:17] zaerymoghaddam has left the channel [20:17] zaerymoghaddam has joined the channel [20:17] zaerymoghaddam has left the channel [20:18] mrryanjohnston-e: zmbmartin: this might be trivial and not what youw ant, but would something like this do what you'd like? https://gist.github.com/1045587 [20:19] eyesUnclouded has joined the channel [20:20] daleharvey: any recommended modules for reading email in node? [20:20] sendark has joined the channel [20:20] Venom_X_ has joined the channel [20:22] zmbmartin: mrryanjohnston-e: that still has me with the same problem that I have. I appreciate the help though [20:23] mrryanjohnston-e: https://gist.github.com/1045587 [20:23] mrryanjohnston-e: sure [20:23] mrryanjohnston-e: check that link [20:23] mrryanjohnston-e: I've literally never done that before :P [20:23] mrryanjohnston-e: I learned the basics of node.js creating some static pages and hopped into express. never looked back [20:24] daneroo has joined the channel [20:25] indexzero has joined the channel [20:26] matyr has joined the channel [20:26] mcluskydodallas has joined the channel [20:28] micheil: tjholowaychuk: is it easily possible to tell connect.static to mount to a specific location on server? [20:28] tjholowaychuk: micheil app.use('/some/path', connect.static(...)) [20:28] micheil: okay [20:28] tjholowaychuk: it's built into connect, so any middleware can use it [20:29] micheil: okay [20:29] jvduf has joined the channel [20:32] darshanshankar has joined the channel [20:34] tenumm: Hello Noders - I am trying to create binding where I want to return custom C++ object in my accessors methods - http://code.google.com/apis/v8/embed.html. I can't see any example returning custom object [20:34] materialdesigner has joined the channel [20:34] daneroo has joined the channel [20:35] rhdoenges: how do I use npm for dev? would I have a node_modules dir in my project? [20:35] isaacs: rhdoenges: yeah [20:35] isaacs: rhdoenges: write a package.json file, and list your dependencies. (you can also use "npm init" to get started) [20:35] bnoordhuis: tenumm: didn't i give you some pointers yesterday? what happened? [20:36] isaacs: rhdoenges: do `npm install` to install your dependencies. (you can also do `npm install blah --save` to install and add "blah" to your package.json file) [20:36] rhdoenges: okay. Can npm set up git submodules for me if the deps are in git? [20:36] rhdoenges: I have a package.json. [20:36] isaacs: rhdoenges: no, but git can :) [20:36] isaacs: rhdoenges: git submodule add git://blahblahblah node_modules/blah [20:36] rhdoenges: I can dream, right? :) [20:37] isaacs: rhdoenges: yeah, i've considered doing some kind of `npm git-submodule foo` to look in the repo.url and set up a git submodule, but it's kinda weird, and already handled better by git itself anyway. [20:37] micheil: tjholowaychuk: why's connect.session still only allow you to ignore exact paths? [20:37] bstahlhood has joined the channel [20:37] micheil: tjholowaychuk: I'm wanting to ignore everything in connect.static [20:37] isaacs: rhdoenges: wouldn't be terrifically hard, though [20:37] xandrews has joined the channel [20:38] tjholowaychuk: micheil put connect.static() above connect.session() [20:38] micheil: can't. [20:38] micheil: as I have to use app.use() [20:39] tjholowaychuk: why can't you [20:39] micheil: unless I construct my whole app using app.use's [20:39] micheil: given: [20:39] micheil: server.use('/', connect.static(WEB_ROOT)); [20:39] micheil: server.use('/javascripts/shared', connect.static(SHARED_ROOT)) [20:39] micheil: server.listen(9595); [20:39] rhdoenges: isaacs: thanks! npm is pretty sweet. [20:39] TheFuzzball has joined the channel [20:39] isaacs: rhdoenges: thanks :) [20:40] tjholowaychuk: micheil: server.use(httpServerInstance) [20:40] tjholowaychuk: works as well [20:40] tjholowaychuk: so you can position it [20:40] micheil: :/ [20:40] micheil: hmm.. [20:40] micheil: tjholowaychuk: https://gist.github.com/837e99d61e0ce87d93bd [20:41] tenumm: bnoordhuis: The problem I have is my native object "bus" is linked via libbus.so and I can't extend class bus. So its more like I have native C++ object and want to return that. Also is it possible to return v8::Object ? [20:41] junkee[]: I get a segfault error when calling Emit in C++ if there is a JS callback in that event. [20:41] micheil: tjholowaychuk: I'm currently cleaning up all the app code.. but the ideas are there. [20:42] tjholowaychuk: so why not just move static above [20:42] tjholowaychuk: the router [20:42] bnoordhuis: tenumm: you would have to define a class MyBus: public ObjectWrap that contains the actual bus object [20:42] tjholowaychuk: the only reason to have it below is if you want to intercept static files [20:42] micheil: because I still have the second static [20:42] tjholowaychuk: so [20:42] micheil: /javascripts/shared/ [20:42] micheil: which has to use server.use [20:42] tjholowaychuk: then just dont use connect() [20:43] micheil: okay. [20:43] bnoordhuis: junkee[]: code or gist? [20:43] tjholowaychuk: nothing wrong with .use() that's what the constructor does anyway [20:43] tjholowaychuk: it's just less flexible [20:43] micheil: tjholowaychuk: so what, var server = connect.createServer(); server.use( ... ); .... .listen() [20:43] tjholowaychuk: yup or server = connect() [20:44] blup has joined the channel [20:44] tjholowaychuk: connect == connect.createServer [20:44] swaj: I wonder how connect's static module compares to nginx performance wise [20:44] tjholowaychuk: node is no doubt slower [20:44] adambeynon has joined the channel [20:44] swaj: sure [20:44] swaj: but I wonder by how much [20:45] micheil: quite a lot [20:45] junkee[]: bnoordhuis: wait a sec. pushing new code [20:45] dguttman has joined the channel [20:45] swaj: thought about putting my express app behind an nginx proxy, and then having nginx serve up the static stuff so I don't even need connect's static module [20:46] tjholowaychuk: it's usually irrelevant [20:46] tjholowaychuk: all our assets are in a CDN anyway [20:46] sylvinus has joined the channel [20:46] robertfw has joined the channel [20:46] jeedey has joined the channel [20:46] tenumm: bnoordhuis : So I was trying that now in my busAttach class I am having a hashmap which stores MyBus objects and if there is a call in JS "busAttach["busName"]" I have to return object stored in hash back to Javascript [20:46] tjholowaychuk: and if it's not a really bottleneck you are just wasting time / effort [20:46] dguttman has joined the channel [20:47] junkee[]: bnoordhuis: https://github.com/swick/node-gstreamer/blob/master/test/test.js#L16 https://github.com/swick/node-gstreamer/blob/master/src/element.cc#L150 [20:48] gde33 has joined the channel [20:48] sylvinus: Informal poll: What would you change/improve in jscoverage ? [20:49] sylvinus: I'm contemplating doing a rewrite based on uglifyjs [20:49] tjholowaychuk: avoiding compilation [20:49] tjholowaychuk: haha [20:49] tjholowaychuk: is pretty much all i would want [20:49] sylvinus: is it that annoying ? [20:49] tjholowaychuk: the rest is easy, with json reporting you can do whatever you want [20:50] tjholowaychuk: i dont mind it that much but it doesn't compile properly on some envs i believe [20:50] sendark has joined the channel [20:50] tjholowaychuk: it's a pretty big library for trivial instrumentation [20:50] sylvinus: you mean compilation of jscoverage itself or your patched JS source ? [20:50] tjholowaychuk: jscov itself [20:50] kmiyashiro: socket.io, how does it work? [20:50] sylvinus: ah yes [20:50] sylvinus: that's what I'm trying to avoid too [20:50] sylvinus: doing it in pure js [20:50] bnoordhuis: junkee[]: don't see anything immediately wrong with it - what does gdb say? is `that` non-NULL? [20:51] sylvinus: tjholowaychuk: think there would be interest for that ? [20:51] tjholowaychuk: yup [20:51] tjholowaychuk: should be pretty easy [20:51] sylvinus: I think too, with uglifyjs' AST [20:51] bnoordhuis: tenumm: if your MyBus objects inherit from ObjectWrap, you can return myBus->handle_ from the accessor [20:53] junkee[]: bnoordhuis: that is non-NULL. [20:54] bnoordhuis: junkee[]: what does the backtrace look like? [20:56] mpoz2 has joined the channel [20:56] PawnStar has joined the channel [20:57] PawnStar: hi. do you folks think that Node Packet Manager is notable enough for Wikipedia [20:57] PawnStar: Package* [20:57] tenumm: bnoordhuis : Awesome that worked. In my bindings I want to setAccessor on busAttach, in JS its like bus.interfac["something"] = {something} and to get this we do bus.interface["something"]. But when I do bus.interface["something"] = {something} it goes to getMethod in C++ [20:58] mileswu has joined the channel [20:59] bnoordhuis: tenumm: glad you got it sorted [21:00] tenumm: bnoordhuis : thanks a lot [21:00] junkee[]: bnoordhuis: I dont get the segfault with gdb [21:00] bnoordhuis: tenumm: my pleasure :) [21:01] bnoordhuis: junkee[]: hah, those are the nasty ones [21:01] bnoordhuis: junkee[]: maybe run it through valgrind? [21:02] junkee[]: bnoordhuis: I'm dont know gdb so much. but i typed start, it started and stopped immediately and I typed continue. Nothing more happned. [21:03] bnoordhuis: junkee[]: `r` (for run) and when/if it crashes, `bt` for the backtrace [21:03] bnoordhuis: junkee[]: you can start your test with `gdb --args node_g yourscript.js` [21:04] bnoordhuis: junkee[]: and it helps a great deal to have node built with debug symbols (hence the node_g) [21:04] junkee[]: bnoordhuis: okay, building node with --debug option in configure? [21:05] TheFuzzball has joined the channel [21:05] bnoordhuis: junkee[]: here is what i use: CXXFLAGS="-g -O0" ./configure --prefix=$HOME/opt/nodejs --debug [21:05] bnoordhuis: junkee[]: the --prefix bit is optional of course [21:05] miretz has joined the channel [21:06] jacekp has joined the channel [21:09] miretz has left the channel [21:09] caolanm has joined the channel [21:10] hexmare has joined the channel [21:11] herbySk has joined the channel [21:11] junkee[]: bnoordhuis: na! got it! Program received signal SIGSEGV, Segmentation fault. [21:11] junkee[]: [Switching to Thread 0x7fffceb82700 (LWP 13297)] [21:11] junkee[]: 0x0000000000556836 in v8::Value::IsArray() const () [21:12] hexmare: using childprocesses and issuing the call child.stdin.write() is there a way to have a callback for that specific write? or is the only way monitoring the stdout event? [21:12] bnoordhuis: junkee[]: are you calling v8 from another thread? [21:13] vnguyen has joined the channel [21:13] junkee[]: bnoordhuis: nope, but I use gstreamer and it uses many threads [21:14] sreeix has joined the channel [21:14] junkee[]: bnoordhuis: backtrace: https://gist.github.com/1045704 [21:14] ianward has left the channel [21:15] junkee[]: bnoordhuis: I have to say that the "GStreamer-CRITICAL" is a bug in gstreamer, well, they told me so. [21:16] elpinguino has joined the channel [21:16] robertfw has joined the channel [21:17] bnoordhuis: junkee[]: is your code called by gstreamer? [21:18] junkee[]: bnoordhuis: jup. [21:19] bnoordhuis: junkee[]: i'm 99% sure your code is running in another thread [21:19] bnoordhuis: junkee[]: v8 is not thread safe so if you call into it, bad things will happen [21:19] bbttxu has joined the channel [21:20] junkee[]: bnoordhuis: okay. thanks! I will ask them in #gstreamer about g_signal_connect [21:21] voodootikigod has joined the channel [21:22] dguttman has joined the channel [21:22] dguttman has joined the channel [21:23] Bwen has joined the channel [21:24] junkee[]: bnoordhuis: Is there any chance to make it work, though? [21:24] sh1mmer has joined the channel [21:25] MGT has joined the channel [21:25] bnoordhuis: junkee[]: yes - but not easily [21:26] bnoordhuis: junkee[]: your gstreamer callback needs to stuff the relevant data somewhere and have the main thread pick it up [21:26] hwinkel has joined the channel [21:26] junkee[]: bnoordhuis: okay, no its official. From #gstreamer: MikeS___: So yes, you are guaranteed to get signal callbacks from multiple threads. [21:27] bnoordhuis: junkee[]: thought so [21:27] tk has joined the channel [21:27] bnoordhuis: junkee[]: question: what should (eventually) be emitted to js land? [21:27] reid has joined the channel [21:27] steffan has joined the channel [21:28] pjacobs: hey guys, I'm getting: Illegal instruction when trying to launch a node app. I'm on 0.4.8.. What gives? [21:28] junkee[]: bnoordhuis: a GstPad*, I think [21:28] xandrews has joined the channel [21:28] PawnStar: can someone here define 'recursion'? [21:29] baudehlo: PawnStar: see: recursion [21:29] PawnStar: *drum roll* [21:29] springmeyer has joined the channel [21:29] bnoordhuis: junkee[]: what's a GstPad* and what's its life cycle? [21:30] tenumm: I am trying to bind property interface to busAttach object. Now in JS when I call busAttach.interface["something"] = {something} I want setNamed function in C++ to be called. I am using setAccessor("interface", setNamed, getNamed) but call is always going to getNamed [21:30] vnguyen has left the channel [21:30] vnguyen has joined the channel [21:30] xeodox has joined the channel [21:32] bnoordhuis: tenumm: you probably need a named property handler instead of an accessor, have a look at ObjectTemplate::SetNamedPropertyHandler() in v8.h [21:33] mapleman has joined the channel [21:33] baudehlo: PawnStar: in case you were after a serious answer, it's when a function calls itself. [21:33] boogyman has joined the channel [21:34] junkee[]: GstPad is subclass of the g_object. I created it in the constructor and it will die when there is no reference left to it (ref/unref and ref_count) [21:34] baudehlo: usually with the view of iteration of some sort. [21:34] unlink has joined the channel [21:34] unlink has joined the channel [21:36] daneroo has joined the channel [21:37] tenumm: bnoordhuis : that will handle bus["something"] but how I will handle bus.interface[something] ? [21:38] bnoordhuis: tenumm: the handler for bus should return an object that also has a named property handler installed (or maybe just an accessor) [21:38] niftylettuce has joined the channel [21:38] junkee[]: bnoordhuis: So, what to do? [21:39] bnoordhuis: junkee[]: this is going to suck - you need to signal the main thread [21:39] bnoordhuis: junkee[]: the only thing i can think of right now is to create a pipe, add it to the main event loop and from your gstreamer callback write a byte to it to wake up the main thread [21:39] riven has joined the channel [21:39] riven has joined the channel [21:40] bnoordhuis: junkee[]: you will still need to think up a safe way to pass the GstPad object to the main thread [21:40] junkee[]: bnoordhuis: damn, I hate c. [21:42] defeated: is there any reason to avoid using setInterval in node? I presume it just gets added to the event loop, so no blocking concerns, and it shouldn't leak in any way normal code wouldn't leak or anything, right? [21:42] niftylettuce has joined the channel [21:43] dtan has joined the channel [21:43] dgathright has joined the channel [21:43] indexzero has joined the channel [21:43] simenbrekken has joined the channel [21:44] bnoordhuis: defeated: correct [21:44] defeated: bnoordhuis: thanks, just wanted a sanity check before I did it :) [21:44] tenumm: bnoordhuis : but lets say If I comment out SetAccessor(String::New("interface") ...) for bus and then in namedPropertyHandler I get error since interface is not defined so you can't do bus.interface["something"] [21:45] mapleman has joined the channel [21:46] bnoordhuis: tenumm: i'm probably not following you - don't comment out the SetAccessor call? [21:46] jakeg has joined the channel [21:46] reid has joined the channel [21:46] devuo has joined the channel [21:47] MGT has joined the channel [21:47] xeodox has joined the channel [21:49] mobius__ has joined the channel [21:50] mehlah has joined the channel [21:51] tenumm: bnoordhuis : I was having interfaces as SetAccessor(String::New("interface") ,setMethod,getMethod) . If I have that my call never go to setMethod when I do bus.interface["something"] . And now after your suggestion I have setNamedProperty and get for bus so I commented out SetAccessor method for interfaces [21:51] mobius__: hey there, i am having a strange error trying to do a get request on a remote server. I am getting the response but afterwards node crashes with a parse error on Clientl.onData [as ondata]. The response looks correct, (i've even recreated it on apache in which it works) [21:51] mobius__: anyone has anyone on how to debug this? [21:51] daneroo has joined the channel [21:51] mobius__: anyone has any idea even :) [21:52] johnnywengluu: ryah: fs.readdir but fs.readFile .. isn't fs.readDir better to be consistent? [21:52] johnnywengluu: if i do fs.readdir() how do i differ files from folders in the returned array? [21:52] ap3mantus has joined the channel [21:52] xerox: fs.stat [21:53] bnoordhuis: tenumm: that's the right approach [21:53] bnoordhuis: tenumm: note that SetNamedPropertyHandler() accepts more than just a getter and a setter [21:55] PanicAttack has joined the channel [21:55] PanicAttack: Hey guys! [21:56] dtan: allo [21:56] storrgie has joined the channel [21:56] johnnywengluu: how does fs.fstat() differ from fs.stat()? [21:57] bnoordhuis: johnnywengluu: fstat works on file descriptors, stat on path names [21:57] Murvin: how to stop the expressjs server? app = require('express').createServer(); and is there app.stop(): or should I app.emit('exit') or app.emit('error') ? [21:58] PanicAttack: What is the recommend pattern for having a for loop: for(var i = 0; i < array.length; i++) and then inside the loop making async calling, but needing the value of array[i] in the callback? [21:58] Aria has joined the channel [21:58] tjholowaychuk: Murvin app.close() [21:58] Murvin: tanks [21:58] Murvin: thanks [21:58] Murvin: :) [21:58] xerox: PanicAttack: making what? [21:58] johnnywengluu: another question: it says fs.Stats looks like this: http://nodejs.org/docs/v0.4.8/api/fs.html#fs.Stats [21:58] tjholowaychuk: Murvin also there's an #express channel if you want :D [21:58] johnnywengluu: then it says it looks like this: http://nodejs.org/docs/v0.4.8/api/fs.html#fs.stat [21:58] johnnywengluu: are those different objects? [21:59] gimpscape has joined the channel [21:59] PanicAttack: @xerox: for like fs.readFile('file.txt', function(err, data) { }); [22:00] jacekp has joined the channel [22:01] PanicAttack: @xerox, see example here: http://pastie.org/2118158 [22:01] daneroo has joined the channel [22:01] jarek has joined the channel [22:01] xerox: you have array and i in there [22:02] k1ttty has joined the channel [22:03] PanicAttack: Basically I need the value of the iteration in the callback. Does that make sense? [22:03] xerox: you have it [22:03] PanicAttack: For example, so I have a list of files, in the array. [22:03] brianm has joined the channel [22:04] Venom_X_ has joined the channel [22:04] PanicAttack: You because the async, in the callback doing array[i] is the last iteration, not the one that was called [22:04] xerox: uhm really [22:05] ptlo: PanicAttack: i've seen and used (function(i){ ... })(i); for that, although it's ugly [22:05] PanicAttack: @xerox, let me write an example [22:05] xerox: I'm doing it [22:06] xerox: quite... [22:06] bnoordhuis: johnnywengluu: no, just an omission in the docs [22:06] ptlo: PanicAttack: http://bonsaiden.github.com/JavaScript-Garden/#function.closures recommends the same [22:07] xerox: another solution could be [22:07] xerox: naming the function [22:07] STUPIDWIFI has joined the channel [22:08] wookiehang0ver has joined the channel [22:09] springify has joined the channel [22:09] PanicAttack: Yeah, so sorry if I am beating a dead horse, but here is the example, output is undefined [22:09] PanicAttack: http://pastie.org/2118184 [22:12] xerox: http://pastie.org/2118206 [22:12] xerox: if you like [22:13] PanicAttack: @ptlo, ok I like the anonymous wrapper method [22:14] xerox: works better when the function uses this but it's the only way I know for currying in js [22:15] tenumm: bnoordhuis : I am working on your suggestion. In case if I take too long just wanted to thank you again :) [22:15] bnoordhuis: tenumm: you're welcome :) [22:15] Determinist has joined the channel [22:15] Determinist: guys, upgraded to 0.4.8 and ever since none of my outgoing requests work properly. [22:15] Tobsn: jquery question, since nobody in #jquery knows it: http://jsfiddle.net/rRtAq/4178/ <- jquery template problem "foo" doesnt get passed into the each - if anyone has an idea... :/ [22:16] rook2pawn has joined the channel [22:16] Determinist: both http and https [22:16] Tobsn: maybe here knows something ;) [22:16] Tobsn: *someone [22:16] Tobsn: Determinist, checked console log on the output string? [22:16] Determinist: seems like the 'end' event is never fired for the clientResponse object i'm getting from the 'response' event handler [22:16] Tobsn: just to make sure any modules etc. didnt passed nothing back [22:16] Tobsn: end is never fired? [22:16] Tobsn: on response? [22:17] Determinist: Tobsn: yup, never [22:17] Tobsn: hmm [22:17] Determinist: Tobsn: sec, i'll gist [22:17] isaacs: tjholowaychuk: hey, what's the easiest way to add a specific object (like a config object) to *all* req objects for all routes? [22:18] Horofox: I have a JS file with validations, how do I "require/include" it on my main app.js file? [22:18] tjholowaychuk: isaacs adding a middleware [22:18] Horofox: (yes, my js sucks whatever) [22:18] tjholowaychuk: isaacs or app.all('*', ...) above the rest [22:18] isaacs: tjholowaychuk: is there something i can do to say "run this middleware for all routes, all methods, all the time, everywhere"? [22:18] xerox: PanicAttack: another idea [22:18] isaacs: aha, perfect, that's exactly it. [22:18] isaacs: thanks [22:18] Determinist: Tobsn: https://gist.github.com/68c5370beaf505b0920a [22:18] tjholowaychuk: isaacs that's what the middleware would be, it doesn't care what the method or url is [22:18] tjholowaychuk: unless you make it care [22:19] xerox: PanicAttack: http://pastie.org/2118237 [22:19] xerox: if you like :) [22:19] Horofox: I have a JS file with validations, how do I "require/include" it on my main app.js file? [22:19] tjholowaychuk: function(req, res, next){ req.config = {}; next() } [22:19] tjholowaychuk: basically [22:19] Tobsn: gmm [22:19] Tobsn: weird [22:19] Tobsn: no clue [22:19] Tobsn: :/ [22:19] bene has left the channel [22:19] isaacs: perfect, thanks [22:20] xerox: ptlo: opinions? [22:20] Determinist: Tobsn: the Request module stopped working too [22:20] FIQ has joined the channel [22:20] daneroo has joined the channel [22:20] dve has joined the channel [22:21] Determinist: any ideas gents? [22:21] isaacs: Horofox: var validations = require("./validations.js") [22:21] Tobsn: hmm not me [22:21] Tobsn: thats odd [22:21] isaacs: Horofox: in "app.js" [22:21] Determinist: it is [22:21] Tobsn: sure its not one of the modules or something? [22:21] Determinist: gonna try downgrading to 0.4.7 and see if it helps [22:21] Determinist: Tobsn: yeah, pretty sure [22:21] Tobsn: maybe you include something way above that breaks it [22:21] Tobsn: hmm [22:21] dtan: hey, can someone tell me what the difference is between "module.exports" and just exports? [22:21] Tobsn: well try downgrading [22:22] isaacs: dtan: you can overwrite the whole module.exports with something else. [22:22] xerox: dtan: the docs does say it very succintly [22:22] Determinist: Tobsn: this stuff worked yesterday before i've upgraded to 0.4.8 [22:22] isaacs: dtan: like, if you want to return a function instead of an object, you could do module.exports = myFunction [22:22] isaacs: dtan: then require("foo") would return myFunction instead of an object [22:22] rhdoenges has joined the channel [22:22] vnguyen has joined the channel [22:23] dtan: so does that just overwrite the exports for that particular file/module? [22:23] PanicAttack: So, now using anonymous wrapper, what is the pattenr for determing when all callback have finished? [22:23] dtan: and then when you do the require("foo") you would just use it like any other module? [22:23] leahculver has joined the channel [22:23] ptlo: xerox: wow, didn't know about currying using .bind [22:23] PanicAttack: Using this example: http://pastie.org/2118230 [22:23] xerox: :D [22:24] dtan: and does not matter if the path to the module is not relative to where it is being called from? [22:24] dtan: lol, panicattack, i was goign to suggest that too but i didn't think it would work in node [22:24] dtan: or at least something simillar [22:25] dtan: well, good to know [22:25] PanicAttack: But, how do I know when all callback have fired, basicallly, we have read all files in the array 'files' [22:25] xerox: use readFileSync [22:25] xerox: lol :) [22:25] PanicAttack: Do I just keep a count [22:25] dtan: i think you want to go a different route [22:26] charleyd has joined the channel [22:26] dtan: are you actually trying to read the files to display on screen? [22:26] dtan: or are you just counting them to see how many there are? [22:26] PanicAttack: This is just a really basically example, want to leran the pattern [22:26] xerox: there are no patterns to accomplish nothing [22:26] ptlo: xerox: strange that .bind only works with named functions [22:26] ptlo: (well, strange to me, at least :) [22:26] xerox: ptlo: hmm I don't think so [22:27] xerox: it's a method of all Function objects [22:27] rhdoenges has joined the channel [22:27] Determinist: Tobsn: downgrading solved the problem [22:27] dtan: panicattack, hmm i thought what i did was the pattern that some people use,but it's actuallly similar tow what you have, sans the closure in the loop [22:27] mraleph has joined the channel [22:28] jarek has left the channel [22:28] _tomb has joined the channel [22:29] junkee[]: bnoordhuis: you are still here? [22:29] bnoordhuis: v8: 4294967295 & 4294967295 [22:29] v8bot: bnoordhuis: -1 [22:29] bnoordhuis: why?! [22:29] ptlo: xerox: aah, my bad, i missed the first param [22:29] Tobsn: Deterministm not good [22:29] bnoordhuis: junkee[]: apparently yes :) [22:29] Horofox: isaacs: ok, so now how do I access a method/class from that validations.js file i required? [22:29] ptlo: xerox: then this works too: var foo = (function(a,b) { return a + b; }).bind(undefined, 4); foo(5); [22:29] bnoordhuis: mraleph: ^ go fix [22:29] Horofox: isaacs: lol [22:29] Determinist: Tobsn: indeed. [22:29] ptlo: xerox: admittedly, not a readibility improvement [22:29] Tobsn: now go find out if its a feature or a bug ;) [22:30] xerox: ptlo: yeah that's why I went for the second idea [22:30] Determinist: isaacs: any idea why this would happen? upgraded 0.4.7 -> 0.4.8 and httpResponse stopped emitting the 'end' event? [22:30] Determinist: Tobsn: yeah, disgusting :) [22:30] mraleph: bnoordhuis: what is the problem? [22:30] isaacs: Horofox: require() returns the exports object [22:30] ptlo: xerox: i learn something every day; thanks, this is cool :) [22:30] xerox: ptlo: http://pastie.org/2118237 [22:30] bnoordhuis: mraleph: why is 4294967295 & 4294967295 == -1? [22:30] isaacs: Horofox: so just look at the stuff on the return value that you exported in that other function [22:30] junkee[]: bnoordhuis: about my problem. You would create a pipe and send the raw c++ object to the main thread? [22:30] ptlo: ah, missed that one [22:30] Horofox: isaacs: got it... i was googling "require javascript" so no way [22:30] mraleph: bnoordhuis: let me think. [22:30] bnoordhuis: junkee[]: not the object itself, just a single byte to wake up the main thread [22:30] xerox: ptlo: the undefined first param feels weird I agree, but works great in a Constructor Function definition [22:31] isaacs: Horofox: read the "modules" documentation on http://nodejs.org/docs/v0.4.8/api/ [22:31] junkee[]: bnoordhuis: okay, and how do I know what the mein thread is? [22:32] PanicAttack: Ok, did this, passing in the `i` value into the anonomous wrapper. Works, any cleaner way of doing it though? [22:32] PanicAttack: http://pastie.org/2118284 [22:32] mraleph: bnoordhuis: because " 1. Return the result of applying the bitwise operator @ to lnum and rnum. The result is a signed 32 bit integer." [22:32] mraleph: ecma-262 5th 11.10 [22:32] ptlo: PanicAttack: you might find xerox' http://pastie.org/2118237 pattern cleaner (or not) [22:33] mraleph: where @ = & in your case [22:33] xerox: :D [22:33] mraleph: bnoordhuis: http://es5.github.com/#x11.10 [22:33] bnoordhuis: mraleph: i hate standards :-/ [22:33] mraleph: bnoordhuis: you should have javascript instead :-) [22:33] mraleph: *hate [22:33] mraleph: which does not provide any sane number system [22:34] bnoordhuis: too true, unfortunately [22:34] bnoordhuis: wanted to do some bit fiddling - this doesn't make it easier [22:34] PanicAttack: @xerox reading through yours. Trying to understand [22:34] tjholowaychuk: mraleph would it be simple to get regexp.exec(str, offset)? in v8? [22:35] bga_ has left the channel [22:35] bnoordhuis: junkee[]: the idea is that you stuff the data you care about in a thread-safe data structure, then write a byte to the pipe [22:35] bnoordhuis: junkee[]: the main thread wakes up (eventually) and pulls the data from that thread-safe data structure and sends it to JS land [22:35] xerox: PanicAttack: OK you just need this bit of knowledge: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind [22:35] mraleph: tjholowaychuk: should not be difficult to implement. [22:36] tjholowaychuk: mraleph wasn't sure if it would get in the way of the codegen or something. that tiny tiny feature alone would be amazing to have [22:36] junkee[]: bnoordhuis: in my case i could use lib_ev to poll if there is a byte on the pipe. But is my lib_ev running in the main thread? [22:37] bnoordhuis: junkee[]: yes, libev (or libuv) runs in the main thread [22:37] mandric has joined the channel [22:37] Determinist: Tobsn: yeah, now who do i ask about whether this is a bug or a feature :P [22:37] Tobsn: ryan [22:37] Tobsn: ;) [22:37] Tobsn: erm ryah [22:37] junkee[]: bnoordhuis: well, that's a plan. Never done something like this before. [22:37] Tobsn: hehe [22:37] junkee[]: bnoordhuis: so, thaaanks a lot! [22:37] Tobsn: or just open an issue with your example code on github [22:37] Tobsn: maybe a better idea [22:38] bnoordhuis: junkee[]: my pleasure :) [22:39] jgv_ has joined the channel [22:39] mraleph: tjholowaychuk: well before geting it in v8 you will probably need to persude TC-39 to standardize it. [22:39] tjholowaychuk: yeah :( [22:40] indutny: tjholowaychuk: yt? [22:40] tjholowaychuk: that *should* be easy since that param is not used for anything else [22:40] tjholowaychuk: but who knows [22:41] indexzero has joined the channel [22:42] mraleph: tjholowaychuk: ok they actually have something like that among harmony proposals but it looks pretty wierd (as everything in JavaScript) http://wiki.ecmascript.org/doku.php?id=harmony:regexp_y_flag [22:42] bnoordhuis: that section on the << operator is a price catch too: http://es5.github.com/#x11.7 [22:42] mrryanjohnston has joined the channel [22:43] PanicAttack: @xerox, thanks a lot. I get it now. Wow, that is clean love it. Thanks again. [22:43] xerox: cool! [22:43] tjholowaychuk: mraleph hmm, seems like that would do the trick for what i need [22:43] tjholowaychuk: definitely weird though [22:43] PanicAttack: @xerox http://pastie.org/2118322 [22:43] tjholowaychuk: offset seems like the obvious solution :s [22:43] bnoordhuis: so ecmascript has a concept of unsigned 32 bits integers but only uses them for left-hand expressions [22:43] bnoordhuis: who comes up with that stuff? [22:43] xerox: PanicAttack: excellent [22:43] ceej has joined the channel [22:44] mraleph: tjholowaychuk: well that's just a proposal. I think they plan to release spec like next year [22:44] xerox: except if you don't use err or data in the callback you can avoid this altogether :P [22:46] rhdoenges has joined the channel [22:48] jensn has joined the channel [22:48] daneroo has joined the channel [22:49] vnguyen has joined the channel [22:49] blup has joined the channel [22:51] _jgr has joined the channel [22:51] Phil has joined the channel [22:52] FIQ has joined the channel [22:53] Phil: why would req.connection.remoteAddress be undefined inside the request listener of a https server? :S [22:53] martyziff has joined the channel [22:53] qrux has joined the channel [22:55] leahculver has joined the channel [22:57] daneroo has joined the channel [22:57] PawnStar: do you folks believe in a god? [22:57] PawnStar: just wondering [22:57] bwinton: PawnStar: Nope. [22:57] tjholowaychuk: nope [22:57] PawnStar: i think there's probably a strong reverse correlation between geekiness and theism [22:58] tjholowaychuk: personally I dont think someone can be both religious and smart [22:58] dguttman_ has joined the channel [22:59] rhdoenges: tjholowaychuk: I'm not religious at all, but I know some jesuits who are the most intelligent people I've ever met and also the most devout catholics I've ever met. [23:00] rhdoenges: ya gotta have some respect for that. [23:00] PawnStar: respect for irrationality? [23:00] PawnStar: religions like Christianity promote un-critical thinking [23:00] tjholowaychuk: i respect the people but not their choices haha [23:00] iFire` has joined the channel [23:00] PawnStar: yeah, same here [23:00] PawnStar: lol [23:01] rhdoenges: on the contrary, critical thinking is a cornerstone of the jesuit order [23:01] bosphorus has joined the channel [23:01] rhdoenges: it just isn't applied to the question of whether there is a god. funky, yes. [23:02] rhdoenges: but they're pretty damn good at philosophizing. [23:02] PawnStar: the basis of their entire belief system disallows critical thinking [23:03] PawnStar: there's a hole the size of infinity [23:03] PawnStar: everything they stand for is based on a lack thereof [23:03] mendel_ has joined the channel [23:04] mikey_p: please please please don't let this channel devolve into politics and religion [23:04] rhdoenges: stopping. [23:04] mikey_p: it's a terrible was to judge someone [23:04] mikey_p: s/was/way/ [23:04] kmiyashiro: javascript vs coffeescript, GO [23:04] mikey_p: ha [23:04] rhdoenges: vim vs whatever else, GO [23:04] steffan has joined the channel [23:04] ptlo: xerox: have a twitter username/blog? want to give credit for the .bind thingy :) [23:04] mikey_p: emacs vs. vim [23:04] tmpvar has joined the channel [23:05] xerox: ptlo: @mreow thanks :) [23:05] MooGoo: hitler vs jews [23:05] MooGoo: go [23:05] rhdoenges: EMACS IS THE LIGHT [23:05] MooGoo: you guys are far too timid [23:05] mikey_p: Hey, Godwin's law. [23:05] rhdoenges: mikey_p: damn. [23:05] MooGoo: hey...stfu about that stupid meme [23:05] MooGoo: hitler has a legitimate place in all discussions [23:05] xerox: can we keep it on topic please [23:06] jesusabdullah: tsk tsk [23:06] mikey_p: Godwin was a meme before memes existed [23:06] bnoordhuis: would hitler have been a node or an erlang guy? [23:06] MooGoo: hm [23:06] mikey_p: well internet memes...maybe not [23:07] rhdoenges: what language would macgyver use? [23:07] MooGoo: I dont think hitler gives a damn about non-blocking code [23:07] MooGoo: perl [23:07] MooGoo: ez [23:07] dtan: he would write his own [23:08] Bonuspunkt: a much cleaner version [23:08] MooGoo: macgyver builds turing complete computers with a handful of paper clips and rubber bands [23:09] bnoordhuis: i think hitler would have written all his code in assembler [23:09] bnoordhuis: why? [23:09] bnoordhuis: because he'd use the gnu assembler: gas [23:10] iffy|x200 has joined the channel [23:10] rhdoenges: gas syntax is horrific, too [23:10] Intel_iX has joined the channel [23:10] SubStack: python seems pretty in-line with what the nazis were trying to do [23:10] Intel_iX: Anything interesting up? [23:11] tjholowaychuk: ACTION needs a good name for a job queue [23:11] rhdoenges: SubStack: There Is One Way To Do It [23:11] Intel_iX: tjholowaychuk : var shit4Later [23:11] bnoordhuis: tjholowaychuk: procrast [23:12] SubStack: rhdoenges: pretty much [23:14] xerox: ptlo: thanks for reminding me I found a puzzle from joyent hah [23:15] ptlo: xerox: http://senko.net/en/javascript-curry/ [23:15] leahculver has joined the channel [23:15] leahculver has joined the channel [23:17] tim_smart has joined the channel [23:17] ptlo: aah, i remember that puzzle :) [23:17] xerox: hehe [23:17] Intel_iX: What puzzle? Mind linking? [23:18] ptlo: Intel_iX: http://joyeur.com/2011/06/24/friday-math-fun-24-checkers-and-dominoes/ [23:18] ryan0x2 has joined the channel [23:19] dget_ has joined the channel [23:19] sweetd_ has joined the channel [23:20] Intel_iX: ACTION is sad, wanted it to be a JS puzzle. [23:20] xerox: :( [23:20] xerox: solve it in js [23:21] Intel_iX: Waste of time imo. [23:22] xerox: true [23:22] slloyd has joined the channel [23:22] Intel_iX: Anyone know a good tutorial for making .node addons? [23:23] tyler-iphone: Intel_iX: like c++ extensions? [23:23] Intel_iX: Yeah [23:23] tyler-iphone: Intel_iX: https://www.cloudkick.com/blog/2010/aug/23/writing-nodejs-native-extensions/ [23:25] level09 has joined the channel [23:25] qrux has left the channel [23:25] sh1mmer has joined the channel [23:26] eyesUnclouded has joined the channel [23:26] Intel_iX: Thanks for the link [23:27] tmm1: ryah: ping re #836 [23:29] themiddleman has joined the channel [23:30] leahculver has joined the channel [23:30] leahculver has joined the channel [23:31] ryah: tmm1: email me - im on holiday atm [23:31] indexzero has joined the channel [23:31] wadey has joined the channel [23:33] Intel_iX: blargh, c++ makes my head spin. :P [23:33] Intel_iX: I wish javascript was a bit faster ._. [23:34] arieru has joined the channel [23:35] mapleman1 has joined the channel [23:40] leahculver has joined the channel [23:40] AvianFlu has joined the channel [23:41] pquerna: tell me about zlib/gzip compression [23:41] pquerna: ie, which one in npm is best [23:41] pquerna: i need one. I just want it to not suck. [23:41] tuhoojabotti: https://gist.github.com/1045566 OMG Writing JSON parser with CoolBasic! ;D [23:43] pquerna: infact, i'd rather have a pure-JS one [23:44] aliem has joined the channel [23:45] wookiehangover has joined the channel [23:47] al3xnull has joined the channel [23:47] veinofstars has joined the channel [23:48] bnoordhuis: pquerna: https://github.com/dankogai/js-deflate [23:49] unomi has joined the channel [23:49] pquerna: I don't always put source code on github, but when I do I don't put a god damn license file on it. [23:49] F1LT3R has joined the channel [23:50] bnoordhuis: that's the downside of that one, yes [23:50] bnoordhuis: apart from that, it works well [23:51] bentruyman has joined the channel [23:51] isaacs: pquerna: yikes. alerts in that code. [23:51] pquerna: i have a better solution [23:51] pquerna: isaacs: please add zlib bindings to core and release 0.4.9 tonight [23:51] isaacs: hahah [23:52] isaacs: your optimism warms my heart, paul. [23:52] pquerna: gotta act quick while ry is on vacation [23:52] isaacs: seriously, we need z bindings in core. [23:52] pquerna: i mean, everyone agreees zlib bindings in core at this point right? [23:53] isaacs: yeah [23:53] isaacs: gzip is a core internet format. [23:53] CrypticSwarm has joined the channel [23:53] isaacs: we're already binding to libz for openssl [23:53] pquerna: yup [23:53] isaacs: there's really no reason not to. just a question of doing it well, and having a good api for it. [23:54] bnoordhuis: have to include libz for windows people though [23:54] isaacs: the api should be an object that supports the ReadStream interface as well as the WriteStream interface. the Decompressor class lets you write plain text, and it outputs gzip, and then the Compressor class is the opposite. [23:54] pquerna: bnoordhuis: already done by openssl [23:55] pquerna: its a dep [23:55] pquerna: everyone already has it [23:55] bnoordhuis: we include openssl? [23:55] pquerna: well [23:55] pquerna: win32 binaries [23:55] isaacs: bnoordhuis: no, but we use it [23:55] pquerna: will include it [23:55] bnoordhuis: ah okay [23:55] bnoordhuis: carry on [23:55] tauren has joined the channel [23:55] darshanshankar has joined the channel [23:56] pquerna: it'll be actually kinda neat [23:56] pquerna: the win32 binaires will have NPN and all the new openssl features :P [23:56] pquerna: while the linux users have to wait for their distros [23:56] cafesofie has joined the channel [23:58] isaacs: ha, nice [23:58] indutny: pquerna: really? [23:58] isaacs: pquerna: yeah, so, this is on like 5 different people's todo lists. but it's not #1 on any of them, is the problem. [23:58] indutny: pquerna: so most of SPDY servers will be running on win32? :) [23:58] F1LT3R has joined the channel [23:58] indutny: pquerna: omg, I'll kill myself [23:59] pquerna: lol [23:59] pquerna: isaacs: yup, exactly. [23:59] pquerna: its only annoying me today because i wanted to make a graylog2 client [23:59] pquerna: but shit [23:59] pquerna: turns out they gzip everything before sending it