[00:00] jgaui has joined the channel [00:00] michaelmartinez: I def didn't use -g flag when installing either [00:00] hobodave: hmm exec doesn't seem to be working as I'd expect [00:00] CoverSli1e: michaelmartinez: did you install npm using homebrew? [00:00] rmttnmd has joined the channel [00:00] michaelmartinez: I am not sure TBH I am however, on version 1.1.1 [00:02] hobodave: if I use a pipe in exec, it seems to wrap the whole thing in a /bin/sh -c and I don't get any data from the process.stdout [00:03] ehazlett has joined the channel [00:03] shedinja has joined the channel [00:04] CoverSli1e: for exec you use a callback with error, stdout, and stderr as arguments [00:04] hobodave: CoverSli1e right [00:04] arthurdebert has joined the channel [00:04] hobodave: oh, wait hmm [00:05] chapel: michaelmartinez: check if there is a node_modules folder above the one you are in [00:05] michaelmartinez: ok [00:05] mattgifford has joined the channel [00:05] hobodave: CoverSli1e but stdout.on("data", function(data) { … ]) is working for an exec'd process that doesn't pipe [00:05] hobodave: is that expected? [00:06] michaelmartinez: chapel: yeah there is... I was testing on the desktop and there is a shit load of them in there. [00:06] michaelmartinez: They went to my /Users/name dir [00:06] hobodave: oh I see an example using stout redirectino [00:06] hobodave: let me try that [00:07] chapel: well Ive found if there is a node_modules above the dir you are at, it can put them in there [00:07] sorensen__ has joined the channel [00:07] chapel: depends on how far, above, only one level that I have seen [00:07] michaelmartinez: chapel: If def did that and now I know its done it waaaayyy more than one level [00:07] michaelmartinez: \ [00:08] CoverSli1e: it's possible it walks all the way up to / looking for node_modules [00:09] michaelmartinez: CoverSli1e: yeah... it walked a loooooong way. [00:09] michaelmartinez: How do I fix that? [00:09] CoverSli1e: mkdir node_modules [00:09] sorensen__ has joined the channel [00:09] CoverSli1e: where you want it to go [00:09] michaelmartinez: Fuck My Life. Thats it? I am giving myself a giant throat punch [00:10] ramitos has joined the channel [00:10] michaelmartinez: Thanks guys.... can I just move the modules in my User dir to where they belong? [00:11] sammmy: Does bouncy and up interfere with eachother? [00:11] chapel: michaelmartinez: I think its in the node docs as well [00:11] sammmy: each other* [00:11] CoverSli1e: yeah that should be fine [00:11] chapel: http://nodejs.org/api/modules.html#modules_loading_from_node_modules_folders [00:12] chapel: michaelmartinez: If it is not found there, then it moves to the parent directory, and so on, until the root of the tree is reached. [00:12] michaelmartinez: Yeah, RTFM. I followed several tuts and they made it sound lke the node_modules dir was created automagically [00:13] michaelmartinez: http://blog.nodejitsu.com/npm-cheatsheet#Installing_a_npm_package_locally [00:14] michaelmartinez: Now I need to move like a hundred fucking modules. [00:14] Vespakoen has joined the channel [00:14] michaelmartinez: Chapel: Gracias! [00:14] michaelmartinez: CoverSli1e: Gracias Tambien! [00:15] context: what [00:15] context: michaelmartinez: why not use a package.json like a real man and just do 'npm install' [00:15] context: and let 100 modules get installed 'magically' [00:15] michaelmartinez: lolwat? [00:16] context: michaelmartinez: node_modules IS created automagically [00:16] chapel: michaelmartinez: if you make a package.json file with dependencies [00:16] chapel: you can do npm install in the dir, and it will handle the rest [00:16] chapel: installing all the modules into the local node_modules folder [00:17] Knowledge has joined the channel [00:17] michaelmartinez: Why did it get created in my /User/ dir in the first place? [00:18] michaelmartinez: because I had a package.json file [00:18] michaelmartinez: I will do some moar tests [00:19] \mSg has joined the channel [00:19] gr-eg_ has joined the channel [00:20] jj0hns0n has joined the channel [00:20] meandi4 has joined the channel [00:21] hostsamurai has joined the channel [00:21] michaelmartinez: context: so you start every project with a package.json before you even install one module? [00:21] average_drifter has joined the channel [00:22] CoverSli1e: that's how i roll [00:22] CoverSli1e: you can do "npm init" to roll out a new package.json easy breezy [00:22] hobodave: damnit [00:23] hobodave: stout redirection isn't working :-\ [00:23] michaelmartinez: ahhh ok [00:23] hobodave: stupid autocorrect [00:23] CoverSli1e: mmm stout [00:23] chapel: also [00:23] chapel: you can do npm install -s [00:23] chapel: or --save maybe [00:23] chapel: and it will put that in your package.json [00:23] chapel: automagically [00:24] isaacs: chapel: --save or -S [00:24] isaacs: -s is --silen [00:24] chapel: :) [00:24] isaacs: --silent [00:24] chapel: kk [00:24] chapel: well I used --save [00:24] chapel: just couldn't remember if -s or -S [00:25] hobodave: CoverSli1e can you see what is going on here? https://gist.github.com/2128946 [00:25] michaelmartinez: chapel: npm install --save vs. npm init ???? [00:26] hobodave: CoverSli1e when I pass a string search parameter to tail_start I never see the "grep STDOUT received data" message logged [00:26] hobodave: but I see the process running [00:26] hobodave: I see the tail message logged though [00:26] CoverSli1e: hobodave: add grep.stdin.resume() [00:26] hobodave: CoverSli1e where? [00:27] CoverSli1e: line 8 if you want [00:27] achiu1 has joined the channel [00:27] hobodave: CoverSli1e no change [00:28] hobodave: same behavior [00:28] CoverSli1e: hmm [00:28] hobodave: this is remarkably similar to the example in the child_process docs [00:28] hobodave: which I am following [00:28] chapel: michaelmartinez: well npm init creates a package json for you [00:29] chapel: npm install --save adds that module + version to the package.json [00:29] Joeysomo has joined the channel [00:29] isaacs: michaelmartinez: first init, then install --save [00:30] michaelmartinez: awesome. thanks so much isaacs and chapel. everything I've wanted to do so far was global.... [00:30] isaacs: np [00:30] isaacs: michaelmartinez: also, if you want to use the one that youv'e already installed globally, and you are not on windows, you can do `npm link modulename` [00:30] michaelmartinez: and I thought npm ls was global hahahaha [00:30] isaacs: michaelmartinez: there's no `npm link blah --save` yet, though [00:31] fluk3 has joined the channel [00:31] isaacs: michaelmartinez: you can do `npm ls --global` [00:31] isaacs: michaelmartinez: any npm command can be done in global mode with -g|--global [00:31] michaelmartinez: yeah... imagine my eyes when I saw that the first time after thinking npm ls was global [00:31] bkaney has joined the channel [00:31] davidban_ has joined the channel [00:31] michaelmartinez: I was like WTF have I done? [00:33] michaelmartinez: isaacs: thanks, can you remove the link if you no longer want it? [00:33] isaacs: michaelmartinez: yeah. npm rm modulename [00:33] isaacs: just like uninstalling [00:33] michaelmartinez: isaacs: perfect. [00:34] ryanseddon has joined the channel [00:36] sorensen__ has joined the channel [00:36] localhost has joined the channel [00:37] lukeholder has joined the channel [00:38] Es0teric has joined the channel [00:39] sammmy: What's a good emailing module for node? [00:40] al3xnull has joined the channel [00:40] markq has joined the channel [00:40] dtrejo has joined the channel [00:40] hobodave: sigh [00:41] stantona has joined the channel [00:41] hobodave: can anyone point me to a *working* example of redirecting the STDOUT of a spawned child process to the STDIN of another child process? [00:41] chadskidmore has joined the channel [00:41] davidbanham has joined the channel [00:42] dtrejo has joined the channel [00:43] AvianFlu: I believe you can set options.stdinStream on a child process [00:43] justicefries has joined the channel [00:44] mikeal has joined the channel [00:44] rlidwka: hobodave: http://nodejs.org/docs/latest/api/child_process.html#child_process_child_process_exec_command_options_callback [00:44] rlidwka: this example does work [00:44] hobodave: I was trying the spawn example [00:44] nym has joined the channel [00:45] hobodave: I guess I'll start over *again* and try this one [00:46] agnat_ has joined the channel [00:47] Druid_ has joined the channel [00:49] hobodave: this is not at all suitable rlidwka [00:49] hobodave: it buffers the output and returns it when the process terminates [00:50] hobodave: adsfadfasdfasdfasd [00:50] nicholas_ has joined the channel [00:52] Karmaon has joined the channel [00:52] ziro`_ has joined the channel [00:53] pendlepa1ts has joined the channel [00:54] hobodave: can anyone point me to a *working* example of redirecting the STDOUT of a spawned child process to the STDIN of another child process? [00:54] therrg has joined the channel [00:54] chrisdico has joined the channel [00:55] wamberg has joined the channel [00:55] Dreamer3 has joined the channel [00:56] ramitos has joined the channel [00:57] BillyBreen has joined the channel [00:57] thetony: hobodave: what is the reason you can't use exec ? [00:58] hobodave: As I said before, it buffers the output and waits for process termination. I need to redirect the STDOUT of a never ending tail process to the STDIN of a never ending grep process [00:58] hobodave: thetony ^ [00:59] thetony: ah, any problem with using the fs.watch functionality and filtering in the program? [00:59] hobodave: I have no idea what that is [00:59] hobodave: I'm trying to use the example in the docs [00:59] hobodave: which now that I test the example code directly, doesn't even remotely work [01:00] hobodave: thetony so you think I should do the grep filtering in the app? [01:00] hobodave: that may be the simplest way for me to proceed now that I think of it [01:00] thetony: not really - but i don't really know what your scenario is - i have been working and only a quarter reading [01:01] dylang has joined the channel [01:01] hobodave: ideally I wouldn't need to do this, but none here can provide me with any actual assistance or working examples. Everything suggested has no effect thus far [01:02] jj0hns0n has joined the channel [01:03] satyr has joined the channel [01:06] thedjinn has joined the channel [01:06] Girls_09 has joined the channel [01:06] chadskidmore has joined the channel [01:06] zackattack: best nodejs twitter client? [01:06] jesusabdullah: ntwitter [01:06] jesusabdullah: probably [01:07] zackattack: i can't authenticate with it [01:07] jesusabdullah: file an issue? [01:07] zackattack: Fair enough [01:07] tmpvar has joined the channel [01:08] dav has joined the channel [01:08] take_cheeze has joined the channel [01:08] jocafa has joined the channel [01:09] jesusabdullah: hobodave: var a = spawn('command', args), b = spawn('someothercommand', otherargs); a.stdout.pipe(b.stdin); easy [01:10] zackattack: is it possible the api's just not working right now? [01:10] jesusabdullah: not unless you're using the 0.7 branch [01:10] jesusabdullah: 0.6 is stable [01:10] hobodave: jesusabdullah that wasn't working for me [01:10] jesusabdullah: What's your code look like? Are you sure your processes are actually piping over those? [01:10] jesusabdullah: what are their stderrs doing? [01:10] kvda has joined the channel [01:10] kirbysayshi has joined the channel [01:11] jesusabdullah: a.stderr.pipe(process.stderr) [01:11] hobodave: jesusabdullah I've moved on. I've spent way too much time and frustration with this. Thanks anyway [01:12] jesusabdullah: alright, well if you change your mind feel free to ask again [01:13] jacobolus has joined the channel [01:14] igl1 has joined the channel [01:14] recursivevirus has joined the channel [01:15] zackattack: hilarious [01:15] zackattack: i think the api's just broken at the moment [01:16] recursivevirus: registry.npmjs.org having issues atm? [01:16] isaacs: recursivevirus: nope [01:16] isaacs: recursivevirus: looks ok to me [01:17] recursivevirus: @isaacs thx for checking. i had a few connect errors... probably some point between. [01:18] recursivevirus: @isaacs also wget complains about the cert. [01:19] recursivevirus: ah, it's self-signed. [01:19] bradleyg has joined the channel [01:19] Girls_09: see @ double click -- > http://twurl.nl/lip7gr [01:20] isaacs: recursivevirus: the CA is in your npm config [01:20] isaacs: recursivevirus: curl -I https://registry.npmjs.org --cacert <(npm get ca) [01:20] Vespakoen has joined the channel [01:21] recursivevirus: @isaacs sweet. thx. [01:21] kevinswiber has joined the channel [01:22] pid has joined the channel [01:24] lohkey has left the channel [01:26] Destos has joined the channel [01:29] ramitos has joined the channel [01:29] redir_ has joined the channel [01:32] Brandon_R has joined the channel [01:32] Brandon_R: is node good for crud apps? [01:32] Brandon_R: with alot of user permissions [01:32] Evanlec has joined the channel [01:33] Brandon_R: something like Zend_Acl [01:33] michaelmartinez: Opinons on this piece: http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis [01:34] timoxley has joined the channel [01:35] bradleymeck has joined the channel [01:38] Brandon_R: semms like strawman logical fallacy [01:38] dtrejo has joined the channel [01:39] tk has joined the channel [01:39] sh1mmer has joined the channel [01:40] pendlepa1ts has joined the channel [01:41] michaelmartinez: really? uhhh... disregard the SQL in the begin and look at the noSQL stuff [01:42] Brandon_R: ok [01:42] Brandon_R: look what it says for couchdb [01:42] Brandon_R: Best used: For accumulating, occasionally changing data, on which pre-defined queries are to be run. Places where versioning is important. [01:42] jerrysv has joined the channel [01:42] Brandon_R: couchdb can do much more than that [01:43] michaelmartinez: I am sure, but if they had to be put in cat's would this suffice? [01:43] michaelmartinez: Or is it just horribly off the mark? [01:44] innociv has joined the channel [01:45] jxie has joined the channel [01:46] jryans has joined the channel [01:46] karterk has joined the channel [01:46] neoesque has joined the channel [01:48] brainss has joined the channel [01:48] jefferai has joined the channel [01:49] blueadept has joined the channel [01:52] zivester_ has joined the channel [01:55] perezd has joined the channel [01:56] wdbl has joined the channel [01:56] CromeDome has joined the channel [01:56] dnz-_: /whois deoxxa [01:56] schredder has joined the channel [01:56] dnz-_: what a fcking idiot [01:56] dnz-_: that guy [01:57] dnz-_: you should all h8 him [01:57] dnz-_: ,_< [01:57] dnz-_: >_> [01:57] dnz-_: -_- [01:57] Joeysomo has joined the channel [01:58] arthurdebert has joined the channel [01:58] Joeysomo has joined the channel [01:58] ditesh|cassini has joined the channel [01:59] brianleroux has joined the channel [01:59] CIA-19: node: 03Shigeki Ohtsu 07master * r891f9de 10/ lib/module.js : No need to have NativeModule.require('fs') in Module._findPath() - http://git.io/FAudTg [02:00] CIA-19: node: 03Felix Geisendörfer 07master * r1824019 10/ (2 files in 2 dirs): [02:00] CIA-19: node: Expose http parse error codes [02:00] CIA-19: node: Currently http parse errors do not expose the error details available [02:00] CIA-19: node: from http_parser. This patch exposes the error code as `err.code`. - http://git.io/FegHJw [02:01] orlandovftw has joined the channel [02:01] wdbl: does anyone ever use NODE_MODULE_CONTEXTS? [02:02] deoxxa: dnz- once kicked a baby in the face [02:02] cody-- has joined the channel [02:02] infynyxx has joined the channel [02:02] maletor has joined the channel [02:04] wdperson has joined the channel [02:04] shanem has joined the channel [02:04] dnz-: deoxxa: true [02:04] dnz-: deoxxa: baby looked at me like a fucking jerk [02:05] dnz-: BAM [02:05] dnz-: take it child [02:06] sdwrage has joined the channel [02:06] emmanuel has joined the channel [02:06] louissmit has joined the channel [02:07] hcchien has joined the channel [02:08] ehazlett has joined the channel [02:09] githogori has joined the channel [02:10] k1ttty has joined the channel [02:10] warz: i was looking for nodejs hdfs clients. does anybody know of another besides https://github.com/forward/node-hdfs ? [02:11] dylang has joined the channel [02:11] warz: just curious [02:11] orlandovftw has joined the channel [02:16] rtgibbons has joined the channel [02:17] kitt has joined the channel [02:17] baudehlo has joined the channel [02:18] paulwe has joined the channel [02:19] pid1 has joined the channel [02:20] HacDan has joined the channel [02:21] stantona has joined the channel [02:22] timoxley: isaacs, SubStack You've sold me on this "don't write classes" business, but now I have no mental framework with which to design solutions. [02:22] isaacs: timoxley: hahah [02:22] isaacs: timoxley: classes is fine. [02:22] isaacs: but they should only be "Classes" if a class is the proper abstraction for your problem [02:24] Brandon_R: is node good for crud apps? [02:24] Brandon_R: with alot of permissions and if conditions in the template? [02:24] Brandon_R: or more single page apps [02:24] lsdafjklsd has joined the channel [02:24] timoxley: Brandon_R that should happen on the front-end anyway [02:25] timoxley: isaacs I wonder about where to hang the functions. I guess a module, which is essentially a static class… but there I go again with the OO [02:26] timoxley: isaacs SubStack what do you feel is your most 'elegant' module [02:26] Brandon_R: what do you mean front end? [02:26] Brandon_R: jade compiles on the server doesn't it? [02:26] dnolen has joined the channel [02:26] Brandon_R: the more elegant node.js module is engine.io in my opinion [02:26] Brandon_R: most* [02:26] Brandon_R: it is the perfect example of the node.js philosphy [02:27] isaacs: timoxley: my most elegant module is probably rimraf [02:27] Brandon_R: small low level modules and let people build on it and toolkits , not frameworks [02:27] isaacs: timoxley: it does one thing, reasonably well. [02:27] timoxley: isaacs how do you feel about… npm? [02:28] isaacs: timoxley: rimraf is also pretty nice in that it's a very well understood problem, so it's easy to use as an example. [02:28] isaacs: timoxley: npm itself? it's kind of shit. [02:28] isaacs: timoxley: everything except for the code is great. [02:28] alejandromg has joined the channel [02:29] timoxley: isaacs haha. ok. cool. that was my impression too. I was just wondering if my quality detector needed recalibrating [02:29] timoxley: isaacs works great though [02:29] isaacs: timoxley: yeah [02:29] isaacs: timoxley: but it shows its age. [02:29] isaacs: timoxley: it's been through a lot, has some grimy parts. [02:29] isaacs: that's normal [02:30] isaacs: timoxley: imo, the "how it works" is quite good. i'm proud of that. [02:30] isaacs: but the code itself is a bit of a mess in a lot of places. [02:32] Emmanuel has joined the channel [02:32] tristanz_ has joined the channel [02:32] colinwd has joined the channel [02:35] copongcopong1 has joined the channel [02:38] timoxley: isaacs understood. [02:39] boltR has joined the channel [02:39] timoxley: Brandon_R you should be making any state-dependent modifications to your html in the browser [02:40] Brandon_R: what about permissions etc [02:41] Brandon_R: i will have to read into this more [02:41] Brandon_R: see what will or won't work [02:41] timoxley: Brandon_R if a user can't see X then don't push X to her. [02:41] timoxley: Brandon_R implement permissions on serverside. push data to browser. [02:42] zackattack: anyone here use node w/ a twitter client? [02:42] Karmaon has joined the channel [02:42] timoxley: Brandon_R render data to html in browser [02:43] Karmaon has joined the channel [02:43] timoxley: zackattack with a twitter client? client? [02:43] zackattack: right, like a lib [02:43] rurufufuss has joined the channel [02:44] Karmaon has joined the channel [02:44] zackattack: timoxley: i can't get verified by the API >_< [02:45] cesar_ has joined the channel [02:45] bmf90 has joined the channel [02:46] timoxley: zackattack tried using something like everyauth? [02:46] Karmaon has joined the channel [02:47] timoxley: zackattack also checkout passport [02:48] Brandon_R: passport sounds like a perfect name for a permission library [02:48] ehazlett has joined the channel [02:48] JmZ_ has joined the channel [02:48] wdbl: Why did node introduce the Buffer type with array-like syntax that is impossible to overload? Porting that to other environments is kind of tough. Wouldn't it have been better to access a byte with a function like buffer.item(0)? [02:49] codepal_ has joined the channel [02:49] tornad has joined the channel [02:49] orlandovftw has joined the channel [02:50] zackattack: timoxley: yeah i'll look into them, thanks [02:50] wdbl: well, that's my only complaint. everything else is great! thx [02:52] Brandon_R: yep [02:52] Brandon_R: node.js is awesome [02:54] wdbl: I think they just wanted an excuse to use v8's SetIndexedPropertiesToExternalArrayData [02:55] wdbl: that and array accessors are nice and terse, but all at the expense of portability [02:56] lsdafjklsd has joined the channel [02:56] mansoor has joined the channel [02:57] Brandon_R: since the buffer class is written in javascript, i don't think it was meant to be portable [02:57] hzin_ has joined the channel [02:58] wdbl: half written in javascript [02:59] criswell has joined the channel [02:59] riven has joined the channel [02:59] wdbl: well, not exactly but the problematic part happens in C++ - in SlowBuffer.makeFastBuffer where it fills the fast Buffer object's data. [03:01] ParadoxQuine has joined the channel [03:01] qsl1pknotp: Anyone here have a good tutorial on callbacks? 'cause i'm confused [03:01] ParadoxQuine: what is confusing you? [03:02] qsl1pknotp: Well i'm using nowjs, and don't want the server to hang while waiting for user input, so if i make a function [03:02] alejandromg: qsl1pknotp: http://www.theprojectspot.com/tutorial-post/nodejs-for-beginners-callbacks/4 [03:02] qsl1pknotp: everyone.now.bet = function(name,callback(err,result)){}; [03:02] qsl1pknotp: and then define the callback elsewhere, is that doing it right? [03:03] ParadoxQuine: not quite. that link is probably good, i found this too http://stackoverflow.com/questions/4506240/help-understanding-the-concept-of-javascript-callbacks-with-node-js-especially [03:03] qsl1pknotp: Ok thanks! gonna read 'em both [03:03] wdbl: try this: everyone.now.bet = function(name, callback) { }; [03:03] alejandromg: btw that's not valid js [03:03] qsl1pknotp: what i just wrote? [03:03] wdbl: and then define your callback as: function callback(err, result) { doStuff(); } [03:04] alejandromg: try as wdbl said [03:04] qsl1pknotp: Oooh ok sweet [03:04] qsl1pknotp: and i don't have to pass the err/result because of the closure right? [03:05] wdbl: whatever calls the callback should pass that stuff [03:05] qsl1pknotp: sweet [03:05] qsl1pknotp: thanks a lot :) [03:07] benvie: https://github.com/Benvie/reified/blob/master/lib/buffer.js [03:07] benvie: I made a sort of middle ground buffer that works in the browser and node at a minimal level [03:07] arthurdebert has joined the channel [03:07] willwhite has joined the channel [03:08] wdbl: nice benvie [03:09] wdbl: can you give me an overview? are you using an array as the final backing data structure? how are you creating views on that? [03:09] jakehow has joined the channel [03:09] gr4yscale has joined the channel [03:09] benvie: my lib isn't too far from being browser ready now [03:09] wdbl: are you supporting square-bracket notation with that? [03:09] andrewdeandrade has joined the channel [03:10] Poetro has joined the channel [03:10] benvie: it uses ArrayBuffer in the browser and a combination of tricks. It only provides indexed access for the first 20 indices which are the most common. Beyond that it provides a common API for reading and writing all the types using the same set of function names [03:10] benvie: and it can fake a lot of the indexed stuff [03:10] benvie: i could map more indices but it's not really needed [03:10] k1ttty has joined the channel [03:10] wdbl: ahh ok, but it's also a wrapper for Node's Buffer too, right? so, if your Node modules use that wrapper, they can run in the browser...correct? [03:10] benvie: it provides the other apis which are more crucial [03:10] benvie: yeah [03:11] benvie: well [03:11] benvie: yeah [03:11] wdbl: if you update your wrapper buffer like: buffer[0] = 255; will it show up in the underlying SlowBuffer? [03:11] benvie: it wraps node's buffer but it also doesn't automatically work with code not designed fro it [03:11] Brandon_R: why does now.js have a limit at 6500 connections? [03:11] benvie: in node it actually inherits directly from Buffer [03:11] benvie: and has full indexed access [03:11] benvie: it basically has everuthing a node buffer does [03:11] benvie: and then some more [03:12] wdbl: ahhhh ok and in the browser, you simply don't have views on an underlying buffer correct? [03:12] benvie: since BuffBuffer.prototype.__proto__ = Buffer.prototype [03:12] Brandon_R: shoudn't it be BuffBuffer.__proto__ ? [03:12] wdbl: i couldn't figure out how to do multiple views to a single array in the browser [03:12] benvie: in the browser it's going to be built primarily on a DataView combirnd with a Uint8Array [03:13] wdbl: maybe using a string [03:13] descipher has joined the channel [03:13] benvie: no since I add new methods to it [03:13] wdbl: ok i see. I'm working with a slightly more limited environment known as Microsoft's shitty jscript/ActiveScript engine [03:13] benvie: I have my the prototype as a new object inheriting from Buffer.prototype [03:13] Brandon_R: oh\ [03:13] benvie: ah if you're not even working with ArrayBuffers [03:14] wdbl: string, right? [03:14] benvie: you need to do out all the types of data types basically [03:14] benvie: yeah [03:14] benvie: I mean the API can work with it but that's a lot more work [03:14] benvie: it's primarily based around the methods [03:14] wdbl: my reason for using jscript/ActiveScript is that I am executing it all within a C# app [03:14] benvie: write/Read Int8, Uint8, etc. [03:14] benvie: plus the most important convenience methods [03:14] pradeepbv has joined the channel [03:14] benvie: slice, clone, fill, copy [03:15] infynyxx has joined the channel [03:15] benvie: it can all be emulated using strings [03:15] ppppaul has joined the channel [03:15] benvie: it'll just be slow [03:15] benvie: and you need the math stuff to support the various types [03:16] benvie: I do have some stuff like that, the BitfieldType has to use bitwise operators in order to read and write at the bit level [03:16] wdbl: this limitation might actually help me anyway since I don't really need a whole port of Node to jscript. I just wanted a really similar module loader and "basic" environment. It's just a view-engine, so it really shouldn't be doing I/O in the same thread anyway. [03:16] benvie: as an example [03:17] benvie: you can see an example in all its glory here https://github.com/Benvie/reified/tree/master/examples/ttf [03:17] wdbl: sweet benvie, thanks a lot [03:17] benvie: that's just a single unlderlying buffer with the mapping built over top of it [03:17] emilepetrone has joined the channel [03:17] chadskidmore has joined the channel [03:18] pizthewiz has joined the channel [03:18] wdbl: good word choice for that project too :) [03:18] benvie: =D [03:19] wdbl: what are you doing with all of your talents anyway? [03:19] benvie: mostly not making any money [03:19] benvie: and being poor [03:19] AdamGoodrich has joined the channel [03:19] wdbl: me too :) I like it better because I get to work on what I want [03:19] benvie: that's the problem [03:19] benvie: I find it hard to not do that [03:19] wdbl: me too haha [03:20] wdbl: I want to fix software development! [03:20] wdbl: it's broken [03:20] benvie: it's not that I don't do useful stuff, it's just whatever I want to do [03:20] wdbl: yeah, I'm the same way [03:20] iangreenleaf has joined the channel [03:20] benvie: and yeah I have an overarching similar concept [03:20] wdbl: I can't resist spending weeks and weeks exploring the most minute problem [03:21] karterk has joined the channel [03:21] benvie: like I built this lib in order to making node-ffi easier for bindings to libraries [03:21] benvie: and that's so I can do stuff like run a chrome browser view on the main node thread [03:21] benvie: too many things [03:22] wdbl: oh so you're going forward with the full-on "run the UI in a node process"? [03:22] benvie: having reified working as well as it does though will help with a bunch of stuff, it drastically simplified anything involving mapping data [03:22] benvie: yeah [03:22] wdbl: that's cool, I'm jealous because I suck at C++ [03:23] benvie: it took a roundabout into this project [03:23] wdbl: I'd love to see someone bind Node.js to Win32 AND Cocoa in a totally framework agnostic fashion [03:23] benvie: because you really need to have good mapping of the data when you're doing ffi [03:23] mattgifford has joined the channel [03:23] wdbl: so if I say var b = new Button(); I get a native button [03:24] benvie: the stuff I was working on was like broken in subtle ways that I couldn't track down because the data abstractions weren't adequate so it was back to the drawing boardf [03:24] wdbl: ok well it sounds like you're making progress now [03:24] benvie: yeah I mean that's sort of the area I'm going [03:24] wdbl: sweet dude I can't wait to see what you come up with [03:24] benvie: I've mapped the windows api and I've run windows guis on the main node process [03:24] wdbl: I'm going a separate route and putting Node.js in it's own process and letting it communicate with the jscript js that runs in my C# app [03:24] benvie: but now I can actually look more towards a platform once this is integrated with some kind of ffi [03:25] redir has joined the channel [03:25] CrankyMonkey has joined the channel [03:25] Es0teric: if you use the mysql module for node... [03:25] benvie: the cool thing about it though is that it's useful with any kind of buffer based api so it has a lot of applications [03:25] Es0teric: how do you hide the password and stuff [03:25] Es0teric: from the client side user? [03:25] benvie: like I did this font thing in a few hours [03:26] k1ttty has joined the channel [03:26] wdbl: I should really learn some C++. I can read it well enough, I just don't know how to use any of the tools [03:26] benvie: I'm not too far from that [03:26] Brandon_R: same gere [03:27] Brandon_R: gyp looks nice but hardly any documentation [03:27] benvie: ultimately I don't really want to spend much time in C or C++ so I keep working to make it accessible from JS [03:27] benvie: i can at least do the stuff I need to get that done though [03:28] codepal has joined the channel [03:28] wdbl: I really don't want JS to be fragmented even more with Microsoft's lame Metro crapification [03:29] wdbl: the people want native JS, Microsoft gives it to them with one catch - it will only ever work on Windows [03:29] benvie: if it's not less limited than I last saw I won't really be interested in it [03:29] mattgifford has joined the channel [03:29] Es0teric: who has used the mysql module for node here? [03:29] benvie: I'm not about to use an interface where I can have one program open at a time [03:29] Es0teric: infact, how would you use node to communicate with the mysql database? [03:29] wdbl: yeah, no thanks to that [03:30] wdbl: Es0teric: sockets [03:30] Es0teric: wdbl say what? [03:30] wdbl: Es0teric: look here, there are node mysql drivers: https://github.com/joyent/node/wiki/modules#wiki-db-mysql [03:31] Es0teric: wdbl i understand that but how would i actually access the tables? [03:31] Es0teric: i'd basically be giving the client side user my db info [03:31] Es0teric: in vars [03:31] Es0teric: :| [03:31] wdbl: Es0teric: you have to pick one of those packages that I linked to first and follow it's instructions [03:32] wdbl: Es0teric: no, your Node.js javascript runs on a server and the client-side javascript runs in a browser or somewhere else [03:32] Es0teric: wdbl ok well i am trying to run ONLY client-side node [03:32] wdbl: I dont' know what that is [03:32] Es0teric: because i want to integrate with my php files [03:32] creationix: browsers can't make tcp connections [03:33] creationix: only http and websocket [03:33] creationix: so a browser can't connect direct to a db [03:33] wdbl: Es0teric: you want your php code to call some Node.js code? [03:33] wdbl: and have Node.js get stuff from MySQL? [03:34] amigojapan has joined the channel [03:34] wdbl: well anyway, excuse me while I go try and turn off my brain [03:34] Es0teric: wdbl [03:34] Spion_ has joined the channel [03:34] deoxxa: he's beat you to it, wdbl [03:34] thurmda1 has joined the channel [03:35] deoxxa: Es0teric: node.js (generally) is a server-side thing - it doesn't run on the client [03:35] Es0teric: deoxxa so then how do i integrate my php with node? [03:35] deoxxa: well, that depends on what exactly you want to do [03:35] Es0teric: deoxxa well i eventually want to push events to the client in real time [03:36] Es0teric: i know i need socket.io and node for that [03:36] deoxxa: well, you have a few options [03:36] deoxxa: you don't necessarily need socket.io for it [03:36] deoxxa: it is a great way to get it done, yes, but it's not the only option [03:36] deoxxa: if you have a large PHP application already, pusher might do what you want [03:37] sh1mmer has joined the channel [03:37] deoxxa: see http://pusher.com/ for more info on that [03:37] deoxxa: however! [03:37] Brandon_R: pubhub.com [03:37] deoxxa: that too, is a great option [03:38] CrankyMonkey: deoxxa: When you say integrate PHP what do you mean? [03:38] Es0teric: deoxxa pusher is a paid app [03:38] Es0teric: i am on a budget here [03:38] jacobolu_ has joined the channel [03:38] deoxxa: CrankyMonkey: i don't remember saying "integrate php" [03:39] deoxxa: Es0teric: well, there's two parts to a socket.io application - the server and the client [03:39] CrankyMonkey: oops [03:39] CrankyMonkey: Sorry.. Es0teric [03:39] deoxxa: you'd run the server "somewhere" and have the client connect to it [03:39] Es0teric: right… deoxxa [03:39] deoxxa: then you could expose an internal api for your php application to hit to push events to it [03:40] Es0teric: expose an internal api? [03:40] Es0teric: you mean create one? [03:40] deoxxa: correct [03:40] jxson has joined the channel [03:40] Es0teric: i would create the API via REST then have node push the information back [03:40] Es0teric: right? [03:41] deoxxa: that'd be a good way to do it, yep [03:41] Es0teric: that sounds like [03:41] kevwil has joined the channel [03:41] Es0teric: ALOT of work [03:41] deoxxa: pimpin' ain't easy [03:41] Es0teric: but then how would i recieve the information that was pushed via node? [03:41] Es0teric: and would this infomation be recieved in real time? [03:41] deoxxa: depends on what you mean by "real time" [03:42] mikl has joined the channel [03:42] deoxxa: you could have your php application tell the node application that "something" has happened [03:42] deoxxa: then the node application can push it out to all the connected clients [03:42] deoxxa: you can also do the same in reverse - have the node application talk to the php application when something is sent in from a client [03:42] orlandovftw has joined the channel [03:42] deoxxa: this is all assuming you have a large php codebase that you don't want to rewrite in javascript [03:43] Es0teric: deoxxa having node talk to the php client seems alot simpler than having the php talk to the node client [03:43] Es0teric: so whatever node pushes out [03:43] deoxxa: well you'd need to have both things happen [03:43] joshontheweb has joined the channel [03:44] Es0teric: deoxxa so then… that would all be via the api i would have to make right/ [03:44] Es0teric: ? [03:44] deoxxa: presumably, yes [03:44] Es0teric: now the pusher app [03:44] Es0teric: it says it supports 20 connections [03:44] warz has joined the channel [03:44] warz has joined the channel [03:45] Es0teric: would that be 20 people connecting to it? [03:45] deoxxa: 20 simultaneous users, yes [03:45] Es0teric: or one setup [03:45] Es0teric: freakin hell... [03:45] Es0teric: -_- [03:45] Es0teric: how about APE as an alternative/ [03:45] Es0teric: ? [03:45] deoxxa: you could build something in node that does something similar in about 10 lines of code [03:45] deoxxa: just so you know [03:45] Es0teric: deoxxa wait what? [03:45] Es0teric: rewind that real quick [03:46] Es0teric: something similar in node [03:46] Es0teric: in 10 lines of code? [03:46] deoxxa: what you want to do, if i understand correctly, is notify the client of something happening as soon as it happens [03:46] deoxxa: no? [03:46] Es0teric: yes, deoxxa [03:46] arduix has joined the channel [03:47] dtrejo: dshaw_: majestic dubstep haha [03:47] deoxxa: well, you build a small application that allows users to connect to the socket.io side and has another interface that your php code talks to to "push" events out [03:48] dshaw_: dtrejo: groan [03:48] dtrejo: yeah I like my own dubstep haha [03:48] dtrejo: the drop took way too long [03:48] dshaw_: That too. [03:48] kvda has joined the channel [03:49] dshaw_: Also, maybe I've just heard that background too much. [03:49] Es0teric: deoxxa how would that work though? how would i have the php code talk to node? [03:49] Es0teric: would i have to json_encode the data? [03:49] dtrejo: dshaw_: have you heard any of masuka's minimixes? all your favorite dubstep artists put together like girltalk: http://soundcloud.com/masuka/sets/micromix-series/ [03:50] deoxxa: Es0teric: there's a couple of approaches - you could shove events into a table in mysql and use it as a message queue, or you could just call out from php over http to node [03:50] deoxxa: (or any number of other mechanisms) [03:51] Es0teric: well deoxxa shove events into a table in mysql like... [03:51] Es0teric: "notify1" [03:51] Es0teric: ? [03:51] dshaw_: dtrejo: nice [03:51] Es0teric: or whatever the user saves into the table [03:51] Es0teric: ? [03:52] dshaw_: ACTION shakes fist at dns. [03:52] subbyyy has joined the channel [03:53] dshaw_: Heed this warning: http://nodejs.org/docs/latest/api/dns.html#dns_dns [03:53] isao has joined the channel [03:53] mattgifford has joined the channel [03:53] deoxxa: Es0teric: you'd just want a message queue sort of setup, so you can push events onto the queue and have the node process pop them off one at a time, distributing them to clients verbatim [03:54] deoxxa: this is getting a little specific though [03:54] deoxxa: so hold on a second, i'll write a gist that shows the basics [03:54] barmaley-exe has joined the channel [03:54] Es0teric: alright, deoxxa [03:56] meandi4 has joined the channel [03:57] jxson has joined the channel [03:58] vipaca has joined the channel [03:58] vipaca has joined the channel [03:58] Vennril2 has joined the channel [03:58] csprite has joined the channel [03:59] satyr has joined the channel [04:00] michaelmartinez has joined the channel [04:02] justicefries has joined the channel [04:04] deoxxa: Es0teric: do you know how to use cURL in PHP? [04:04] Es0teric: deoxxa yes i do [04:04] dukeytoo_ has joined the channel [04:04] deoxxa: excellent, i'll leave that bit out then :) [04:04] isao has joined the channel [04:04] SrPx has joined the channel [04:04] SrPx: any way to change node.js's print color from gray to black? because I have to use white backgrounds on the console (eye problems) and that gray is unreadable on white background... [04:05] Es0teric: deoxxa yeah i'll have to brush up on it… i havent used cURL in a while though... [04:05] Es0teric: only because its slow [04:06] admc has joined the channel [04:07] deoxxa: https://gist.github.com/2131227 [04:08] deoxxa: note: the client list probably isn't necessary, but i've found that .broadcast in socket.io is unreliable for some reason [04:09] benvie: I really hate the dnode turtle [04:09] qsl1pknotp has left the channel [04:09] deoxxa: so you'd run that somewhere, then push objects like {"type": "user-logged-in", "data": {"username": "herp", "nickname": "derp"}} at it [04:09] tristanz has joined the channel [04:10] deoxxa: (you'd want to improve on it a bit though, making sure only your application can push events to it and such) [04:10] Es0teric: deoxxa well give me a minute i am still reading on line 24 lol [04:10] Es0teric: referencing between expressjs and that [04:10] deoxxa: oh, there's a typo too, on line 21 [04:10] deoxxa: should be if (!req.body || !req.body.type) { [04:11] Es0teric: so, deoxxa why are you using expressjs? [04:11] Es0teric: why that specfically? [04:11] deoxxa: it's really just my framework of choice - you could use plain old require("http") but express (and connect, which it's based on) take away a lot of the boilerplate code [04:12] Es0teric: i see [04:12] Es0teric: so its less to call but with the same functionality [04:12] Es0teric: r [04:12] Es0teric: ight? [04:12] deoxxa: yep [04:12] Es0teric: intresting [04:12] dgathright has joined the channel [04:13] Es0teric: so the bodyParser() gets whatever is in the body into the format expressjs accepts? [04:14] Es0teric: i somewhat noticed that because you told it to error 406 - not acceptible [04:14] Es0teric: if it doesnt have the accepted format [04:14] deoxxa: yep [04:15] Es0teric: this is so weird [04:15] Es0teric: i understand most of it [04:15] jryans has joined the channel [04:15] Es0teric: but not all of it [04:15] thinkt4nk has joined the channel [04:15] Es0teric: deoxxa how would i do cURL to get that info from node? [04:16] deoxxa: you don't need to get any info from node [04:16] deoxxa: you're just doing a POST request with the event you want to transmit in the body [04:17] Es0teric: so node wouldnt really be pushing data into the db.. it would just be retrieving the data, php would be inserting the data [04:17] Es0teric: right? [04:17] deoxxa: there's no db involved, there [04:17] deoxxa: to do it via a db would be quite a bit more complicated [04:18] alejandromg has joined the channel [04:18] MelindaACN has joined the channel [04:18] Es0teric: ok, deoxxa if node pushed the data in the db, would it be faster than php inserting it? [04:18] MelindaACN: Hello [04:19] deoxxa: Es0teric: that doesn't have an easy answer, unfortunately [04:19] deoxxa: it sounds like you want to do more than just push events to clients [04:19] Es0teric: well, deoxxa i was logically thinking that if node pushed the data into the db in real time, the data would be retrieved in real time [04:20] deoxxa: magically? [04:20] pid has joined the channel [04:20] Es0teric: no.. well of course there is some way to make it happen [04:20] Es0teric: but [04:20] Es0teric: i was just thinking about it for a minute [04:21] doltank has joined the channel [04:22] willwhite has joined the channel [04:23] zemanel_ has joined the channel [04:23] insanoid has joined the channel [04:24] Es0teric: deoxxa what does body.type [04:24] Es0teric: do? [04:24] deoxxa: req.body is just the body of the request [04:25] Es0teric: right [04:25] deoxxa: so you'd run that somewhere, then push objects like {"type": "user-logged-in", "data": {"username": "herp", "nickname": "derp"}} at it [04:25] Es0teric: ohhhh ok [04:26] Es0teric: deoxxa and whats the specific purpose of .emit? [04:27] deoxxa: see the examples on http://socket.io/ [04:27] merlin83 has joined the channel [04:29] jxson has joined the channel [04:29] Es0teric: so then emit is like EventEmitter [04:29] Es0teric: right? [04:29] deoxxa: pretty much [04:30] yaymukund has joined the channel [04:31] Es0teric: i see [04:32] khrome has joined the channel [04:32] Es0teric: i am going to have to read more on nodejs but this is a good start point… also, you asked me if i knew how to use cURL… why was that, deoxxa ? [04:33] deoxxa: so you can push data to that thing [04:33] michaelmartinez: Anyone wanna talk noSql? Pro v. cons etc. Trying to decide [04:33] Es0teric: wait what, deoxxa ? [04:34] MelindaACN has joined the channel [04:34] blueadept has joined the channel [04:34] blueadept has joined the channel [04:34] Telenull: michaelmartinez: sure. [04:35] michaelmartinez: Telenull: what have you used? [04:35] Telenull: At a previous job I used MySQL exclusively, at my current job I use a lot of CouchDB and a little Redis. [04:36] Telenull: Neither of them involve much in regards to high scale. [04:36] Telenull: and I'm one who enjoys SQL, but I can see the benefits of NoSQL. [04:37] konobi: psql++ [04:37] michaelmartinez: What do you think of everything in couch being basically map/reduce? [04:37] dr0id has joined the channel [04:37] dr0id has joined the channel [04:38] Telenull: I like it. It definitely enforces some design patterns when you're doing things with it. [04:39] gavin_huang has joined the channel [04:39] Telenull: IMO, if you're going to be doing things with data that a) doesn't need a lot of post-processing, b) has roughly equal (within 60/40) reads/writes and c) has complex relationships, then I would say an SQL based system is for you. [04:39] Telenull: If you're doing tons of writes and not a lot of reads that can't be optimized with map/reduce, then NoSQL is a better option. [04:40] al3xnull has joined the channel [04:41] michaelmartinez: Let me describe an app I have in mind [04:41] deoxxa: it's halfway between twitter and facebook [04:41] deoxxa: it's going to make millions [04:41] michaelmartinez: Web based, 700 to 1200 users roughly a third of them online at a time [04:41] Telenull: deoxxa: hahaha [04:42] michaelmartinez: hahah [04:42] michaelmartinez: fucker [04:42] mattgifford has joined the channel [04:42] deoxxa: i get people proposing that stuff to me on pretty much a fortnightly basis [04:42] michaelmartinez: once or twice a year they fucking slam the db [04:42] nicholas_ has joined the channel [04:42] michaelmartinez: and site [04:43] michaelmartinez: To book vacation days [04:43] copongcopong has joined the channel [04:44] michaelmartinez: The rest of the time its mostly read and few to 200 hundred writes a day [04:45] konobi: that's pretty small... what's the turn over... latency requirements... replication requirements... PCI compliance? etc. [04:45] michaelmartinez: What is PCI compliance? [04:46] MelindaACN has left the channel [04:46] michaelmartinez: I am new, very new to db's in general. [04:46] Telenull: payment card industry. [04:46] Telenull: There are stipulations on how you store data if you're taking credit cards. [04:46] michaelmartinez: Front end guy trying to learn backend [04:46] Telenull: legal stipulations. [04:46] ppppaul: a db is a magical thing [04:46] sreeix has joined the channel [04:47] michaelmartinez: This is not a consumer site [04:47] ppppaul: when you meet one, there is a small chance that you will be granted 3 wishes [04:47] candybar: BFM [04:47] michaelmartinez: It is a scheduleing / staffing app [04:47] satyr has joined the channel [04:47] Es0teric: hmm… socket.io is intresting... [04:47] thinkt4nk has joined the channel [04:47] CrankyMonkey has joined the channel [04:48] Telenull: michaelmartinez: since it's pretty small, I would probably go with psql or mysql. [04:48] michaelmartinez: My day job is a Firefighter and our staffing app sucks donkey balls [04:48] Telenull: it's going to be more mature and require less upkeep as the system ages. [04:48] konobi: psql... always psql [04:48] ppppaul: couchdb [04:48] michaelmartinez: I think that is what the current vendor uses. It chokes on the heavy days [04:49] michaelmartinez: Look ups are painfully slow [04:49] ppppaul: your app may not have good db design [04:49] Telenull: ^^ [04:49] konobi: or sufficient hardware [04:49] ppppaul: use s3 [04:49] ppppaul: neo4j is good too [04:50] michaelmartinez: Its not my app, its a vendor that I want to put out of business [04:50] unomi has joined the channel [04:50] thinkt4nk has joined the channel [04:50] konobi: michaelmartinez: JFDI and get to MVP... you can always adjust from there [04:51] michaelmartinez: I get the F in JDI, but WTFS is MVP? [04:51] michaelmartinez: CMD? [04:51] michaelmartinez: lol [04:51] konobi: minimum viable product [04:51] michaelmartinez: Ahhh [04:52] myndzi: looking to set up a proxy server (a real proxy server, not some load balancing reverse proxy stuff); are there any such modules? preferably that implement http proxying with authentication [04:52] michaelmartinez: Thats the point of this discussion. I am green as hell on DB's in general and ... trying to decide what I should dive into [04:52] konobi: michaelmartinez: just pick one [04:52] konobi: that's the point of mvp [04:53] ericmuyser has joined the channel [04:53] petschm has joined the channel [04:53] Telenull: myndzi: squid? [04:54] myndzi: have you ever tried to configure squid? :( [04:54] michaelmartinez: Aight, Thanks. [04:54] myndzi: besides i'm thinking i'll want to move some code to the proxy end later [04:54] Telenull: myndzi: nope :P [04:54] myndzi: so that instead of piping the data back and processing it, i can process it and then send less data [04:54] myndzi: meh ok [04:54] myndzi: guess i'll roll my own :P [04:54] myndzi: maybe i should just write socks5 [04:55] konobi: http-proxy [04:55] konobi: just search on npm [04:55] Telenull: myndzi: https://github.com/nodejitsu/node-http-proxy [04:56] hh__: npm site uses couchdb right? man it's slow [04:56] Telenull: hh__: yes [04:57] sdwrage_ has joined the channel [04:57] merlin83 has joined the channel [04:59] myndzi: i did, in fact, search on npm [04:59] myndzi: http-proxy appears to be precisely what i was asking for alternatives to [04:59] myndzi: which is, in fact, why i wrote the sentence that way :) [05:00] myndzi: i mean, all the examples have a static recipient of the proxy connection; this is the reverse of the desired behavior [05:00] umren has joined the channel [05:01] stantona has joined the channel [05:02] orlandovftw has joined the channel [05:04] langworthy has joined the channel [05:04] mikeal has joined the channel [05:07] PsiliPharm has joined the channel [05:15] confoocious has joined the channel [05:15] confoocious has joined the channel [05:19] kPb_in has joined the channel [05:21] Spion has joined the channel [05:23] pradeepbv has joined the channel [05:32] dax has joined the channel [05:32] niloy has joined the channel [05:38] sammmy: Where are the chat logs for this channel; history? [05:41] alejandromg: sammmy: debuggable has a log since always [05:41] dr0id: sammmy: are you the one who made sammy.js [05:41] nicholas_ has joined the channel [05:41] alejandromg: sammmy: nodejs.debuggable.com [05:42] sammmy: dr0id: no. :P [05:43] fangel has joined the channel [05:46] mikeal1 has joined the channel [05:46] sammmy: alejandromg: thank you [05:48] alejandromg: np [05:48] mikl has joined the channel [05:50] sreeix has joined the channel [05:50] jxson has joined the channel [05:50] khrome has joined the channel [05:52] sammmy: Shouldn't Express' req.redirect() default to HTTP code 303 instead of 302? http://en.wikipedia.org/wiki/HTTP_303 [05:53] pradeepbv has joined the channel [05:54] justicefries: sammmy: it's pretty common and accepted to use 302, despite it being incorrect. :) [05:55] sammmy: justicefries: but why not do the correct thing? [05:56] jryans has joined the channel [05:56] justicefries: this is a fair question. [05:58] justicefries: a 303 makes perfect sense. [05:58] justicefries: especially if you're talking about doing POSTs. [05:58] justicefries: if you're doing a GET with a redirect, a 301 seems more appropriate [05:58] justicefries: given when I'd have a GET redirect. :) [05:58] achiu has joined the channel [06:01] sammmy: Idk. It doesn't really matter I guess. W/e works. [06:04] sammmy: I can't get up to work because of some stupid EADDINUSE errors. I'm not even freaking using --port! [06:09] jsurfer has joined the channel [06:20] schredder has joined the channel [06:27] syntaxiko has joined the channel [06:29] deeprogram has joined the channel [06:29] deeprogram: hi ? [06:29] simenbrekken has joined the channel [06:29] deeprogram: who used JSV before ? [06:29] jkridner__ has joined the channel [06:29] deeprogram: https://github.com/garycourt/JSV [06:30] deeprogram: I want to reference other schema into new schema [06:31] deeprogram: but I didn't find any document [06:35] jacobolus has joined the channel [06:37] lzskiss has joined the channel [06:41] tonist has joined the channel [06:42] benvie: man [06:42] benvie: I swear the only word I ever see in here is proxy [06:43] hh__: what is the 'silicon valley' of europe? [06:43] SamuraiJack has joined the channel [06:44] jimmyy111 has joined the channel [06:45] Hanspolo has joined the channel [06:47] rtyler has joined the channel [06:49] schredder_ has joined the channel [06:51] arturadi_ has joined the channel [06:53] MerlinDMC has joined the channel [06:56] stelcheck has joined the channel [06:57] jetienne has joined the channel [06:57] langworthy has joined the channel [06:58] pid has joined the channel [06:59] kukkelundin has joined the channel [06:59] tornad has joined the channel [06:59] nsolsen has joined the channel [07:01] framlin: berlin seems to be going to be .... [07:02] devrim has joined the channel [07:02] devrim: does anyone know how to fs.stat case sensitive on a mac ? [07:03] framlin: hh__: http://www.spiegel.de/netzwelt/web/0,1518,801128,00.html [07:04] AD7six has joined the channel [07:06] boltR has joined the channel [07:06] devrim: sed find alternatives ? anyone ? [07:07] p6 has joined the channel [07:08] rtyler has left the channel [07:08] AAA_awright has joined the channel [07:09] Dreamer3 has joined the channel [07:11] graeme_f has joined the channel [07:12] konobi: devrim: use a case sensitive file system [07:13] jacobolus has joined the channel [07:14] devrim: gotta reinstall the OS or repartition the disk.. [07:14] pid has joined the channel [07:15] konobi: yup... or you live with it [07:15] devrim: was going to do node.exec "ls "+path [07:15] devrim: and compare the stdout [07:15] devrim: even that gives the input path back http://d.pr/Ksbi [07:16] konobi: pipe it through tr to lowercase everything [07:16] devrim: sucks.. [07:16] neshaug has joined the channel [07:16] aesptux has joined the channel [07:17] devrim: can't live with it, when we deploy the whole stack to linux, crashes the whole thing.. we gotta check this sh*t on build.. gotta find a way.. [07:18] konobi: get a usb drive... make it hfs+ case sensitive and use it [07:18] deeprogram has joined the channel [07:18] Internet13 has joined the channel [07:18] mattgifford has joined the channel [07:19] spolu has joined the channel [07:19] devrim: that's a good idea tho then only i can deploy, trying to find a solution for the whole team. let me see if any commandline tool can do it for me.. or else i will rename the every single file to lower case on build.. [07:20] devrim: and every single folder [07:20] konobi: node is calling stat(2)... so it's what the kernel is giving you... [07:21] sdwrage_ has left the channel [07:22] sammmy: How do you guys usually handle login sessions with Express? Do you just set a req.session.user object? [07:22] davidbanham has joined the channel [07:23] deeprogram has joined the channel [07:25] deeprogram has left the channel [07:25] noganex has joined the channel [07:26] fangel has joined the channel [07:26] devrim: konobi check this out! http://d.pr/mcPr [07:27] devrim: i think this will do.. [07:27] zemanel_ has joined the channel [07:28] sammmy: What sort of info do you store in the req.session.user object? [07:31] SrPx: how to set a variable to local scope when it's name is within another variable? that is: "var a="test"; var = 3; //this should act like "var test = 3" [07:32] SrPx: better explained: var name="test"; var = 3; print(test); //output: 3 [07:34] rendar has joined the channel [07:35] Morkel has joined the channel [07:36] erikzaadi has joined the channel [07:36] jryans has joined the channel [07:37] herbySk has joined the channel [07:37] tornad has joined the channel [07:38] Ping86 has joined the channel [07:39] disappearedng has joined the channel [07:39] rmttnmd has joined the channel [07:40] SrPx has joined the channel [07:41] __main__ has joined the channel [07:42] Swaagie has joined the channel [07:42] ph^ has joined the channel [07:44] `3rdEden has joined the channel [07:47] hipsters_ has joined the channel [07:49] Murugaratham has joined the channel [07:49] groom has joined the channel [07:50] Es0teric has left the channel [07:51] arthurdebert has joined the channel [07:51] kvda has joined the channel [07:52] davidbanham has joined the channel [07:53] arduix has joined the channel [07:53] ablomen has joined the channel [07:54] huggies has joined the channel [07:55] savudin has joined the channel [07:55] k1ttty_ has joined the channel [07:56] yumike has joined the channel [07:59] dpino has joined the channel [07:59] yaymukund: does nodejs/commonjs allow you to use one file as a script and a module? https://gist.github.com/d8b1e681e95f150ba95f [08:00] socketio\test\78 has joined the channel [08:00] deoxxa: yaymukund: check for module.parent, i think [08:01] yaymukund: deoxxa: bingo, thanks! [08:01] deoxxa: \o/ [08:01] __doc__ has joined the channel [08:02] gekko_ has joined the channel [08:02] aliem has joined the channel [08:02] kvda has joined the channel [08:02] savudin: on several sites, even on debuggable.com authors are saying that if my project if "big" I should consider using some other technology like java, ruby etc. [08:03] savudin: why is that? [08:03] savudin: I'm planing a community portal for outdoor activity, pretty complex in features and I am considering of using node.js [08:03] deoxxa: probably because they haven't seen evidence of a successful node.js based application [08:04] deoxxa: which is fair enough, success stories for large applications in node are pretty sparse at the moment [08:04] deoxxa: but that doesn't mean it's not suitable - it's just that most complicated applications aren't, you know, done yet [08:04] savudin: but there are no any huge dissadvanteges in technology? [08:05] deoxxa: well, javascript lets you get yourself into some pretty big messes [08:05] deoxxa: the same way as C [08:05] deoxxa: its flexibility is probably its biggest downfall [08:05] savudin: and debugging on the other hand :) [08:06] konobi: deoxxa: voxer, yahoo, linkedin? not big enough? [08:06] savudin: I am not experienced with javascript at all, but really like what node is offering [08:06] deoxxa: konobi: they're not exclusively node.js though - detractors will assign their success to their other technologies [08:06] konobi: voxer is... linkedin mobile is all node.js [08:07] stagas has joined the channel [08:07] konobi: there's lots of success stories out there... they're just not all in one place [08:08] deoxxa: yes, of course, there's a lot of really cool stuff built with node [08:08] deoxxa: but it hasn't been around long enough to stand the test of time [08:08] emattias has joined the channel [08:08] konobi: (ie: not on one big "marketing" page) [08:08] kPb_in has joined the channel [08:10] hh__: instagram is pretty big [08:10] satyr has joined the channel [08:10] savudin: konobi, deoxxa so, what are pitfalls of node.js development? [08:10] dob_ has joined the channel [08:10] [[zzz]] has joined the channel [08:10] savudin: hh__ isn't instagram native app? [08:11] deoxxa: in my opinion? probably how fast things are moving [08:11] savudin: hh__ maybe you mean for api [08:11] deoxxa: there's a lot of really exciting stuff happening, which makes it a really interesting system to work with, but it also means there's a lot of changes all the time [08:11] hh__: yea [08:12] deoxxa: if you lock yourself to a specific version, you have to give up fixes in some modules [08:12] hh__: but the app is nothing without the backed service so [08:12] deoxxa: if you try to keep up with the latest node release, you risk having to move to new modules when old ones are no longer supported [08:12] sinclair has joined the channel [08:12] deoxxa: that's the only thing i've found to be a problem [08:12] savudin: hh__ yea, i know i'm a full time iOS dev [08:12] deoxxa: (our entire backend and some of our frontend at work is node, so this is from experience) [08:13] sinclair: hey all [08:13] mike has joined the channel [08:13] sinclair: does anyone have any experience with https://no.de/ < [08:13] karterk has joined the channel [08:13] spolu has joined the channel [08:14] wereHamster: sinclair: can you ask a real question? [08:14] savudin: well, it looks like i'll have to be the first one who will make big and successful app with node :) [08:14] deoxxa: savudin: not if we beat you to it :P [08:14] sinclair: wereHamster: looking for reasonable hosting [08:14] savudin: deoxxa hehe [08:14] pp01bit has joined the channel [08:14] sinclair: wereHamster: ideally with a free quota, with the ability to scale out [08:15] deoxxa: i'm guessing you know about heroku [08:15] [AD]Turbo has joined the channel [08:15] deoxxa: (@ sinclair) [08:15] sinclair: wereHamster: second question, does nodejs still suffer from not being able to scale [08:15] wereHamster: sinclair: so, your real question is 'does no.de offer free quote + ability to scale out' ? [08:15] [AD]Turbo: hi there [08:15] nicholas_ has joined the channel [08:15] wereHamster: sinclair: when did it suffer from that? [08:15] deoxxa: sinclair: node.js is webscale [08:15] deoxxa: it's the most webscale [08:16] deoxxa: also it's agile, and uh, other trendy things [08:16] sinclair: deoxxa: wereHamster: how does it scale out? as application instances or some other way? [08:16] hh__: ACTION points to instagram again :p they seem to be scaling fine [08:16] wereHamster: sinclair: you have two choices (as with any other webapp): you either use bigger machines or more machines. [08:16] deoxxa: sinclair: the same way as any other application [08:17] deoxxa: ^^ this [08:17] upb has joined the channel [08:17] sinclair: wereHamster: im more looking for managed hosting in the cloud, similar to how app engine or azure works [08:17] mcoolin has left the channel [08:17] sinclair: deoxxa: you mentioned heroku [08:17] deoxxa: yep [08:17] deoxxa: i did [08:17] sinclair: deoxxa: i don't know much about it other than its some compute cloud platform of some kind [08:18] sinclair: deoxxa: its is IAAS or PAAS? [08:18] deoxxa: PAAS, i think [08:18] deoxxa: but i'm not much of an initialism guy [08:19] konobi: no.de is PAAS-ish IAAS... you want to scale up... you move to a paid version [08:19] deoxxa: they offer a whole range of hosted services, and a program for third parties to do the same through their services [08:19] savudin: sinclair have you checked out nodejitsu? [08:19] deoxxa: and they're pretty expensive [08:19] djcoin has joined the channel [08:19] sinclair: i'll be honest, something with a free quota would be nice [08:19] deoxxa: let me get this straight [08:20] deoxxa: you want to "scale" [08:20] deoxxa: but you don't want to pay for the privilege? [08:20] sinclair: deoxxa: nope [08:20] hh__: geocities fanboy [08:20] deoxxa: then why such a big emphasis on the free quota? [08:21] savudin: sinclair nodejitsu.com [08:21] sinclair: deoxxa: i want a free quota so i can play around, and to be able to pay real money for CPU, Bandwidth and Storage should i ever consider it for a commercial application [08:21] deoxxa: fair enough [08:21] hh__: which heroku lets you do [08:21] deoxxa: most companies will give you a free trial though, if you ask [08:21] sinclair: deoxxa: and it had to be price competitive with say... AppEngine [08:22] wereHamster: sinclair: what exactly do you mean by 'free quota'? [08:23] hh__: hard to compare to appengine, they have different pricing structure [08:23] sinclair: wereHamster: on AppEngine, they offer up a free quota with quite reasonable limits, if your application goes over that, it either shuts down, or automatically scales up (with new instances created by the platform) with billing enabled [08:23] hh__: but just don't use heroku's database service, and its affordable [08:24] wereHamster: sinclair: what 'quota'? The used bandwidth? # of http requests? database size? [08:24] sinclair: wereHamster: im from a AppEngine background, looking for reasons to use nodejs, with plans of looking for something that will handle web sockets over AppEngines channel framework [08:24] sinclair: wereHamster: i don't have the quota limits with me at the moment, but all of the above [08:24] dscape: sinclair: to my knowledge only nodejitsu does websockets [08:24] dscape: so this conversation is done [08:24] dscape: :) [08:25] deoxxa: heh [08:25] dscape: off for coffee now [08:25] wereHamster: no.de does as well. [08:25] wereHamster: you get a solaris zone, whatever you do in it is up to you. [08:25] hh__: if you pay $ [08:25] hh__: free no.de doesn't do websockets [08:26] konobi: nope... it's available on no.de [08:26] konobi: you just need to ensure you use the right websocket versions [08:26] sinclair: it would be nice to know the cost of using sockets from someone who had experience paying for them on whatever platform [08:26] hh__: hmm [08:27] dscape: sinclair: in computing people (and provider) always care about the fundamentals [08:27] dscape: cpu, disk, memory, network [08:27] sinclair: hh__: also, i never used geocities [08:27] hh__: does nodejitsu just use amazon ec2 for servers? [08:27] dscape: websockets is just part of the network (read bandwidth) part of the pricing [08:27] sinclair: dscape: what makes you think i don't care about cpu, disk, memory and network? [08:28] dscape: nothing, you just didnt wait for my next sentence :) [08:28] sinclair: fair enough [08:28] sinclair: hmm, it would be nice to have a comparison of web sockets on no.de vs channels on appengine [08:29] emattias_ has joined the channel [08:29] sinclair: but in general, no.de and heroku are the most popular node.js cloud platforms out there right? [08:31] sinclair: dscape: web sockets would likely have some considerable cpu overhead too [08:31] level09 has joined the channel [08:32] wereHamster: sinclair: depends on what you do with them. Without any traffic there is hardly any cpu involved [08:33] sinclair: wereHamster: but with a lot of traffic, and little activity, that still translates into many many open http connections to the server [08:33] McMAGIC--Copy has joined the channel [08:33] wereHamster: well, of course. [08:33] sinclair: wereHamster: im a little unfamiliar with how modern platforms handle that, [08:33] tvw has joined the channel [08:33] sinclair: automagically [08:33] wereHamster: uhm.. let's say: very well? [08:34] dr0id has joined the channel [08:34] sinclair: wereHamster: yeah, to what extent, and to what cost [08:34] konobi: line rate? [08:35] vguerra has joined the channel [08:36] cosmincx has joined the channel [08:37] `3rdEden: konobi nope it's fully available on no.de [08:37] schredder has joined the channel [08:37] `3rdEden: because the HTTP proxy is to old [08:37] sinclair: heroku offers up a free 1 dyno 50req/sec quota, and is elastic scalable [08:37] sinclair: thats pretty awesome [08:37] `3rdEden: The last time I checked it only supported draf 75/76 websockets, which are no longer used/usefull [08:38] sinclair: http://zao.se/~zao/cats/76851.jpg [08:38] gekko_ has joined the channel [08:39] whitman has joined the channel [08:39] JmZ_ has joined the channel [08:39] stonebranch has joined the channel [08:40] hz has joined the channel [08:41] al3xnull has joined the channel [08:41] ctp6360 has joined the channel [08:42] markwubb_ has joined the channel [08:42] skylamer` has joined the channel [08:42] sinclair: so, what are you guys using node.js for ? [08:43] sinclair: i guess that you are probably from a browser / js background, and nodejs made the most sense in terms of server side development? [08:44] meandi5 has joined the channel [08:44] benvie: https://github.com/Benvie/reified/tree/master/examples/ttf [08:44] benvie: I like javascript [08:45] salva has joined the channel [08:45] TomY has joined the channel [08:45] JmZ_ has joined the channel [08:46] adrianF has joined the channel [08:47] sinclair: benvie: i like javascript too [08:47] sinclair: benvie: sadly, im a .NET developer with a interest in python and looking for a reason to use nodejs [08:48] benvie: this is javascript that may hit something familiar to you [08:48] benvie: https://gist.github.com/1973743 [08:49] yaymukund: is there an event that's triggered after my server has started? I'm using express. [08:49] deoxxa: is that [08:49] sinclair: benvie: lol, is that the win32 API in Javascript? [08:49] deoxxa: winapi [08:49] yaymukund: trying to do basically app.on 'started', begin_tests [08:49] DuoSRX has joined the channel [08:49] benvie: yeah [08:49] deoxxa: wow [08:49] benvie: all of it [08:49] benvie: I tend to do be doing things in JS outside of the norm [08:49] deoxxa: that's simply frightening [08:49] sinclair: benvie: how does one interop with the win32 dll's [08:49] sinclair: with JavaScript [08:50] deoxxa: yaymukund: app.listen(port, host, function() { console.log("Started lol!"); }) [08:50] yaymukund: deoxxa: ahh, app.list takes a function. thanks again [08:51] benvie: sec [08:51] benvie: that's actually the purpose of this project I'm working on [08:52] benvie: https://github.com/Benvie/node-ffi [08:52] sinclair: what are you going to use it for? [08:52] benvie: so I'm working on redoing the API for it [08:52] deoxxa: oh neat, ffi [08:52] sammmy: What's a good module for sending emails? [08:52] deoxxa: i tried to use that for something once [08:52] benvie: to make it easier to map data structures [08:52] mehlah has joined the channel [08:52] sinclair: benvie: windows programming in JavaScript? [08:52] Vennril has joined the channel [08:52] benvie: yeah well I do some similar stuff on linux, but mostly windows [08:53] schredder has joined the channel [08:53] benvie: https://gist.github.com/1938424 [08:53] sinclair: benvie: wouldn't it make more sense to try and interop with a managed framework of some kind? [08:53] benvie: that's code to open a Windows window [08:53] benvie: and runs the event loop for processing messages using setTimeout [08:53] benvie: not exactly, ffi is generally the best route for dynamic languages [08:54] sinclair: benvie: the var wndProc line is hilarious [08:54] davidbanham has joined the channel [08:54] benvie: it's what you'll find in use in ruby, python, haskell, etc. [08:54] bartt has joined the channel [08:54] benvie: yeah this is what I did before I generated the whole api bindings [08:54] benvie: but my plan is to go a lot further [08:54] graeme_f has joined the channel [08:55] sinclair: benvie: its awesome that you are involved in this, however, why? [08:55] benvie: to build that managed framework essentiall [08:55] benvie: automatically handle all the marshalling [08:55] sinclair: benvie: no one actually codes in win32 anymore [08:55] fangel has joined the channel [08:55] xippi has joined the channel [08:55] xippi has joined the channel [08:55] sammmy: Anyone know of a good email module that is regularly commited? [08:55] benvie: but being able to access it enoiugh to get things done [08:55] sinclair: benvie: um [08:56] benvie: my goal right now is to run a chromium instance on the main node process [08:56] sinclair: benvie: get what done? [08:56] benvie: to make node into a desktop application platform [08:56] yumike has joined the channel [08:56] benvie: well, to make that one of it's many skills [08:56] yaymukund: deoxxa: is that documented anywhere? digging through express docs with no luck. [08:57] sinclair: benvie: hmmm, im not sure if it will fly mate, its cool to be able to make a win32 window with JavaScript, but win32 is just not practical anymore [08:57] hzin_ has joined the channel [08:57] benvie: well I don't really want to spend much time in it, I want to bring the web gui to the desktop [08:57] yaymukund: deoxxa: nm, found it [08:57] yaymukund: :D [08:57] ccare has joined the channel [08:57] benvie: I want to use html and css to make desktop apps but that requires a baseline platform to do that on [08:58] benvie: browsers are awesome they just need to be reoriented with something like say node's apis [08:58] benvie: I have no desire to make native guis [08:58] kPb_in has joined the channel [08:58] benvie: but I need to do the minimal level needed for hosting the web rendnerer and requisite stuff [08:58] zomg: Adobe Air? :P [08:58] benvie: NO [08:59] benvie: =( [08:59] benvie: node [08:59] benvie: I've been working on facets of this for a year [08:59] kukkelundin has joined the channel [09:00] sinclair: benvie: hmm [09:00] benvie: the binary data handling was slowing me down for a while, so I'm looking forward to seeing how things go with redoing the ffi API for a third time [09:00] benvie: https://github.com/Benvie/chrome-nodium/blob/master/compiled/bindings.js [09:01] sinclair: benvie: i wish i knew what exactly you had planned [09:01] benvie: primitive bindings [09:01] benvie: this is what I just got finished the bulk of https://github.com/Benvie/reified [09:02] benvie: works for any kind of data structures, the example is TTF file format [09:02] sinclair: benvie: i have my doubts that the win32 Javascript bindings are worth the effort [09:02] benvie: but the purpose is for mapping C data structures [09:02] benvie: I mean that's just one part and not a huge specific difficulty [09:02] benvie: it's the same issue on any platform [09:03] benvie: how bout this [09:03] deoxxa: what would be cool would be node.js's apis on a webkit window [09:03] jacobolus has joined the channel [09:03] sinclair: yeah, win32 offers a lot, but none of it particularly useful to what people would use JS for [09:03] benvie: https://github.com/Benvie/node-clipboard [09:03] benvie: I'm not specifically focusing on windows api [09:03] benvie: that was one adventure [09:04] benvie: but nice side benefits like my ultra repl now has the option to remap copy and paste keybindings [09:05] benvie: https://github.com/Benvie/Node.js-Ultra-REPL/blob/master/settings/controls.js [09:05] sinclair: hmmm [09:05] benvie: and I can copy and paste javascript objects between contexts [09:05] sinclair: i like what you are doing, but im just maybe being a little short sighted to see its use [09:06] kapil has joined the channel [09:06] kapil: hello [09:06] benvie: these are all just trivialities, the prize is in creating a web view gui inside node land [09:06] hipsters_ has joined the channel [09:06] benvie: that's the thing I want, and I want to make it simple [09:06] kapil: can anybody help me to sort iut the hangout issue in node.js [09:06] sinclair: benvie: what about the browser? [09:06] madhums has joined the channel [09:07] benvie: I want the browser with less browser and more node [09:07] sinclair: benvie: the browser "is" the web view [09:07] benvie: the web view is part of a browser [09:07] benvie: the major part [09:07] kmurph79 has joined the channel [09:07] benvie: but not the whole thing [09:07] sinclair: benvie: you want that on a desktop, with access to resources, like the filesystem, and other things? [09:08] benvie: http://code.google.com/p/chromiumembedded/ [09:08] benvie: http://www.chromium.org/developers/content-module/content-api [09:08] sinclair: benvie : excluding the desktop thing, the browser does all of that [09:08] benvie: and a screenshot for good measure [09:08] benvie: browsers don't do this [09:08] kapil: possible issues leading to sicket hangout in node.js [09:09] kapil: socket hangout [09:09] benvie: https://plus.google.com/u/0/photos/105977622763676758576/albums/5650561532044140641/5650561534902838434 [09:09] benvie: https://plus.google.com/u/0/photos/105977622763676758576/albums/5650561532044140641/5650561530276219090 [09:09] kapil: hello guys [09:09] kapil: please help me [09:09] sinclair: benvie: they do do that [09:10] sinclair: benvie: maybe not the semi alpha transparent background, but in general they do that [09:10] benvie: I want to do this [09:10] benvie: require('chromium').open({ width: 500, height: 500 }) [09:11] benvie: for (var x in myOptions) { chromium.document.createElement('div') etc } [09:11] sinclair: so, why win32? [09:11] benvie: because that's what I use mostly [09:11] benvie: and I want it to be cross platform anyway [09:11] mattgifford has joined the channel [09:12] benvie: a large part of the benefit of the web platform is that it can be hosted everywhere [09:12] sinclair: no, i mean, can't you tweak the chromium project to do whatever, without the need to bind JS to win32? [09:12] benvie: no that IS the part you have to weak [09:12] lperrin has joined the channel [09:12] benvie: that's the thing you're missing [09:12] benvie: this is the minimum I need to make it even work at all [09:12] sinclair: but its missing for a reason [09:12] benvie: http://code.google.com/p/chromiumembedded/ that whole project does what I want [09:12] benvie: I just need to bind it to node [09:13] benvie: and guess how you do that [09:13] josh-k has joined the channel [09:13] ccare_ has joined the channel [09:13] benvie: using C/C++ and the Windows API and Cocoa and whatever it is on Linux] [09:13] benvie: each platform, a specific set of steps [09:13] arduix has joined the channel [09:13] benvie: it's just that I'm trying to do it with javascript [09:13] benvie: a lot of manual doing [09:13] sinclair: so Javascript for portability? [09:13] benvie: I like javascript [09:13] sinclair: heh [09:14] sinclair: i don't mean to be mean, im just curious why you would do all this [09:14] benvie: besides the web platform is javascript and there's certain benefits once you get over the hump [09:14] arthurdebert has joined the channel [09:14] benvie: like when you initialize V8 in the same process it automatically has affinity to existing running ones [09:14] benvie: and it's possible to actually combine the event loops of the UI thread and node's main thread [09:15] benvie: which isn't really that possible if you were doing it from some other language or binding [09:15] sinclair: JavaScript is just a scripting language for browsers [09:15] sinclair: (and node) [09:15] sinclair: ow [09:15] sinclair: now* [09:15] JmZ_ has joined the channel [09:16] timoxley has joined the channel [09:16] sinclair: benvie: its possible to do that in other languages [09:16] benvie: javascript is the most popularly used language on the planet and it's use is accelerating which means if your interests tend to align with creating tools that developers use then it's a smart choice [09:16] benvie: not to even go into the qualities of the language or comparisons with others [09:17] sinclair: benvie: id argue that Javascript is lacking things that modern languages are starting to adopt [09:17] pors has joined the channel [09:18] pors has left the channel [09:18] framlin: sinclair: what is JS lacking? [09:18] benvie: ES6, which isn't due to be formalized for another year, has probably one of the most powerful meta programming tools there is [09:18] sinclair: benvie: doesn't mean JS won't have these features eventually [09:19] sinclair: benvie: not looked at it [09:19] sinclair: will look at it now [09:19] benvie: the language you know as javascript is nearly unchanged from how it was a decade ago [09:19] kapil: can anyone exlpain possible issues leading to socket hangout in node.js [09:20] sinclair: benvie: right, but that doesn't necessarily make it the right choice for every domain of programming [09:20] shinuza has joined the channel [09:20] noisebeuter has joined the channel [09:20] benvie: no but it's really good for a lot of stuff [09:21] sinclair: yeah [09:21] benvie: especially things that are at the interaction point between people and computers [09:21] sinclair: a lot of web stuff [09:21] benvie: my favorite part [09:21] arcil has joined the channel [09:21] sinclair: benvie: i've always viewed JS as simply a ideal scripting language, not "THE" language [09:21] sh1mmer has joined the channel [09:22] arcil: hey guys. i have a question concerning child_process.fork. if my child process only has a console.log it does not send an exit event to the master. why is that? [09:22] Vespakoen has joined the channel [09:22] arcil: does it even exist? [09:22] benvie: would would change you mind? [09:23] ccare_ has joined the channel [09:23] lperrin: arcil, node doesn't exit until its event queue is empty [09:23] noisebeuter has joined the channel [09:23] sinclair_ has joined the channel [09:23] sinclair_: back [09:23] sinclair_: benvie: hard to say, i really like JavaScript, but just not for all things [09:24] arcil: lperrin: if i fork a process which has nothing in its event queue i expect it to quit, right? [09:24] sinclair_: benvie: for example, i like to bind JavaScript to applications to enable scripting options for those applications [09:25] sinclair_: benvie: i especially like Javascript for implementing certain business logic, but Python is just a good a language for scripting [09:25] sinclair_: benvie: easy to bind, easy to use [09:25] lperrin: arcil, yes [09:25] framlin: sinclair_: because of its mixture of a functional- with an oo-language js is very very powerfull for enterprise web application stuff [09:25] sinclair_: framlin: its a tough call, id have a hard time imagining JS in the enterprise [09:26] sinclair_: framlin: outside of some scripting role [09:26] prasak has joined the channel [09:26] Franciman_ has joined the channel [09:26] Franciman_: hi [09:26] framlin: sinclair_: I do that since 6 years ... changed from Java and at the beginning I didnt belive that JS is goog for that, but ist is! [09:26] kPb_in: hey guys.. [09:26] sinclair_: framlin: in what way? [09:27] framlin: its extreemly flexible [09:27] dobber has joined the channel [09:27] sinclair_: framlin: so are other languages [09:27] kPb_in: m looking at this code here: https://github.com/joyent/node/blob/master/deps/uv/src/unix/darwin.c line numbers 235 to 238 and wondering why aren't macros used instead of hardcoding constant values ? [09:27] framlin: and you can have "Class"-trees as you have in other OO-Languages [09:27] arthurdebert has joined the channel [09:28] sinclair_: framlin: yes, but thats not really special [09:28] robi42 has joined the channel [09:28] framlin: its that combination between functional-programming with clousures and callbacks and its OO-features [09:28] arcil: then i don't get why i do not receive the exit event here is the example code: http://pastie.org/private/ofmbf8sr0qlhaelliralmw [09:29] Murugaratham has joined the channel [09:29] sinclair_: framlin: and its dynamic, which i like [09:29] lperrin: arcil, when you spawn a node process with fork [09:29] lperrin: it keeps a channel to its parent [09:29] sinclair_: framlin: but its still hard to justify [09:29] lperrin: to pass messages with send, on('message') [09:29] framlin: what other way do you know to build enterprice web applications with FAT-Clients/RIAs? [09:29] lperrin: that's why the child's event queue is never empty [09:30] noisebeuter has joined the channel [09:30] schredder has joined the channel [09:30] robi42_ has joined the channel [09:30] arcil: ahh [09:30] sinclair_: framlin: well, if i was .NET, a web server, a database server, a .NET windows application (if i absolutely had to), and on linux, id roll with Mono [09:30] arcil: can i close this connection? [09:30] maritz has joined the channel [09:31] sinclair_: framlin: that's at a minimum or course [09:31] framlin: or other ways to build distributed platform independant enterprise applications, that work together with Java, PHP and COBOL [09:31] noisebeuter has joined the channel [09:31] sinclair_: framlin: thats the thing, web servers don't restrict you on client tech, its all HTTP at the end of the day [09:31] framlin: sinclair_: and where was yor "logic" with .NET? [09:31] framlin: on the client? [09:32] sinclair_: UI logic on the client [09:32] framlin: ALL logic [09:32] framlin: besides shared "HEAVY" business-logic [09:33] sinclair_: logic to read/write from a web server would be managed by the client too, [09:33] sinclair_: typically, heavy business logic should be handled on the web server [09:33] sinclair_: as thats where business logic 'should' go [09:34] sinclair_: not on the client application (which can disagree with each other) in a distributed environment, [09:34] framlin: yes, but most of the logic is not HAEVY shared BL, but logic with business-concerns that is only needed within one "view" [09:34] sinclair_: but anyway, i don't see that as a justification for JS on the desktop [09:34] robhawkes has joined the channel [09:35] sinclair_: framlin: you are being a little too vauge [09:35] framlin: ??? [09:35] trivol has joined the channel [09:35] sinclair_: what do you mean "view" [09:35] sinclair_: as in a UI view? [09:35] framlin: we have tabbed XUL-Applications [09:35] framlin: a view is most of the time one tab [09:36] framlin: we have hundreds of applications [09:36] framlin: some has 15 tabs some 2 [09:36] framlin: only 20 tabs are shared [09:36] sinclair_: and you script the XUL applications with Javascript? [09:37] framlin: most of the tabs are responsible for a certain business-case [09:37] framlin: yep [09:37] sinclair_: so why not a browser? [09:38] sinclair_: swap XUL for HTML and just script inside a browser (then theres no issue with deployment) [09:38] framlin: all logic, that has to do with workflows between the apps/tabs or that control, what users are allowed to do is coded at the client [09:38] framlin: that are historical reasons ;) [09:38] framlin: we are just migrating to extjs .... horrible IMHO ;) [09:39] sinclair_: framlin: so, if the rules behind what a user can and cannot do is within the client, whats to prevent a client doing other things against the server? [09:39] framlin: what do you mean? [09:39] sinclair_: framlin: "what users are allowed to do is coded at the client", my question is, why isn't that coded at the server? [09:40] argami has joined the channel [09:40] deoxxa: not every application is client/server [09:40] framlin: it has to do with manpower [09:40] sandfox has joined the channel [09:41] framlin: there are mor client-developers and the client-developers are mch or productive in javascript, as the server-developers with cobol and php [09:41] sinclair_: deoxxa: saying a client sorta implys there is a server (especially in the context of a enterprise) [09:41] framlin: and there is a architectural philosophie to imlement the stuff as local as possible [09:42] sinclair_: framlin: that still doesn't sound like a good justification for putting the rules behind what people can and cannot do in the client, it sounds like a security risk, and quite difficult to lock down [09:42] framlin: why [09:43] sinclair_: because the server should be the authority for what people can and cannot do [09:43] gabrtv has joined the channel [09:43] framlin: where is the diffrence, if i code som business decissons with php on the server or with JS on the client. I am the same person with the same knowledge about the business [09:43] sinclair_: framlin: this is in the enterprise right? [09:43] framlin: there should be ONE peace of code, that is the authority [09:44] framlin: yep [09:44] sinclair_: framlin: correct, that code should live on a server [09:44] framlin: why should it live on a server? [09:44] framlin: is that a law? ;) [09:44] mattgifford has joined the channel [09:45] sinclair_: framlin: is your server a web server? [09:45] k1ttty has joined the channel [09:45] framlin: it should live on the server, if its shared with other clients, because of DRY [09:45] sinclair_: so, if there is only one client, its not really a enterprise [09:46] framlin: sinclair_: yep there are apaches and currently there are first tests with node for some special cases, where apache is not feasabel [09:46] sinclair_: what would prevent me from submitting data to the server that i shouldn't be allowed to submit [09:46] sinclair_: what if i could delete data from your server ? [09:46] framlin: oh, there are about 400 clients [09:46] markwubben has joined the channel [09:46] tomasztomczyk has joined the channel [09:46] framlin: If you would do that, you would be fired [09:47] framlin: thats allintranert enterprise [09:47] sinclair_: framlin: that's not the point, it shouldn't be possible [09:47] framlin: why? [09:47] sandfox has joined the channel [09:48] sinclair_: because i could inadvertently corrupt all your data, [09:49] sinclair_: by not authenticating the user, and authorizing "all" requests made to a server, you introduce a huge security hole [09:49] sinclair_: HUGE! [09:49] framlin: in that way, we can react to the market changes within two or three weeks and not within moths as the competitors do ... so we are market leaders and it works .... but we know, there are a lot of consulters that talk like you do and we are reading books that write as you talk .. but it works and its competitive [09:49] sinclair_: but its not safe [09:51] sinclair_: if you are selling this as a product, your expose your company to legal issues as well, being economical and practical doesn't hold up in court [09:51] sinclair_: anyway, something to think about [09:52] framlin: maybe, thats theoreticaly unsave, but it works since 30 years (started witch cobol) that way and it earns mony and it makes it possible to develop a system with a growing team, that started with 5 people and has about 70 people today for a world-wide market-leading business [09:52] sinclair_: its not theoretically unsafe, it is unsafe [09:53] framlin: ther was no problem since decades .... [09:53] dannyamey has joined the channel [09:53] sinclair_: framlin: secure safe applications, its a team effort between the server side developers and the client side developers [09:53] framlin: and have in mind, we are talking about INhouse - apps [09:53] sinclair_: framlin: 30 years is quite the legacy tho [09:54] framlin: for all stuff thats going outside, there are other security-rules ... [09:54] sinclair_: framlin: you really should start authenticating and authorizing all requests [09:54] sinclair_: at least suggest it [09:54] framlin: sinclair_: as I wrote, I had the same "old-school" believes as you some years ago [09:55] sinclair_: heh, its not old-school to write secure applications [09:55] framlin: at my first days with this customer, I thought Its impossible, that this may work ... but ist is ;) [09:55] sinclair_: but back to JavaScript [09:55] hellp has joined the channel [09:55] framlin: ;) [09:56] sinclair_: framlin: for the enterprise (which is a different beast from general online media), i think i'll stick with .NET [09:56] framlin: no problem [09:56] sinclair_: framlin: .NET with IronJS or Jint bindings for scripting with JavaScript [09:57] sinclair_: framlin: for example [09:57] framlin: why do you want to have scripting-capabilities? [09:57] sinclair_: [Database] -> [ORM] -> [Framework] -> [Business Logic] [09:57] framlin: why not pure .NET? [09:58] sinclair_: the only candidate for JS i see is the Business Logic [09:58] framlin: sinclair_: I know that kind of archtecture [09:58] framlin: we have the same, but the BL - Layer is spitted between client and server where usefull [09:59] sinclair_: framlin: .NET is good at a lot of things, but still feels quite rigid for the crazy business rules developers fine themselves writing [09:59] fermion has joined the channel [09:59] framlin: yepp, thats the point, why we use JS for a lot of BL [09:59] sinclair_: framlin: in recent years, i have been turning to Python (specifically IronPython) and very recently, Javascript [09:59] framlin: ist much more flexible [10:00] sinclair_: framlin: right, its flexibility where flexibility is needed [10:00] sinclair_: framlin: that doesn't mean JavaScript for everything [10:00] jimmysparkle has joined the channel [10:00] sinclair_: framlin: "right tools for the right job" [10:01] sinclair_: framlin: in a lot of multitenant applications i have been writing of late, using JavaScript means business logic becomes a resource for that tenant [10:01] framlin: thats what I said. For the hav BL as e.g. calculating the business or creating invoices, we use CObol and more and mor PHP [10:01] sinclair_: ACTION doesn't touch PHP [10:02] sinclair_: though i did spend 5 years developing with PHP back in the early 2000's [10:02] variableNodejs has joined the channel [10:02] TheFuzzb_ has joined the channel [10:02] variableNodejs: i'm using jsdom and html contains script tags [10:03] variableNodejs: but these tags are blank when accessed [10:03] variableNodejs: what am in doing wrong [10:03] variableNodejs: i'm a newbee [10:03] variableNodejs: so please help me [10:03] sinclair_: no [10:04] eldios has joined the channel [10:04] tonymilne has joined the channel [10:04] framlin: but to decide, if the key account manager should be able to change a dealer for a certain product at a certrain state in the lifecycle of the business, we use JS, because the rules for that tend to change very offen and there is only one tab in one application, where you can do that [10:05] sinclair_: framlin: is your client a browser? [10:05] framlin: yep [10:05] framlin: or a xul-runner [10:05] framlin: depends [10:05] sinclair_: so, why don't you restrict access to the UI (html, js, css, XUL) from the server? [10:05] joshgillies has joined the channel [10:06] hzin has joined the channel [10:06] kmurph79 has joined the channel [10:06] sinclair_: [user] -> [server] -> [authenticate] -> [authorize] -> [html, css, javascript, xul resource] [10:06] sinclair_: they only get the asset if they are authorized to receive it [10:06] sinclair_: also [10:06] framlin: there would be a lot of traffic and there are not so much Cobol-Developers as would be needed, to code all that often changed rules [10:06] sandfox has joined the channel [10:06] sinclair_: rewrite the back end? [10:07] schredder has joined the channel [10:07] framlin: there were a lot of tires in the last years with a lot of consultants involved, nut they all could not compete with us JS coders ;) [10:07] sinclair_: security and integrity of data is important enough to warrant a rewrite, especially when all the COBOL developers have since died of old age [10:08] DrPheltRight has joined the channel [10:08] framlin: while they are still thinking about heir models we had the implementation finished ;) [10:09] bergie_ has joined the channel [10:09] sinclair_: they should be thinking about security [10:09] framlin: yes, the backend is going to be rewriten in PHP, but its very old and very huge, so that goes step by step as part of some kind of refactoring scenario [10:09] sinclair_: why PHP? [10:10] sinclair_: why not Java, or .NET? [10:11] framlin: the are thinking about security, too. But if there are no problems without the security and if you make a lot of money over deades without security, and you only have a lot of paper and a calculation about huge costs with security, the first way is the better ;) [10:11] bradleyg has joined the channel [10:11] framlin: same reason [10:12] framlin: all that JAVA and -NET peaople where not agile enough to cpmpete with the PHP-Ones [10:12] sinclair_: framlin: hahaha [10:12] sinclair_: framlin: that's not true for .NET [10:12] framlin: most of the reasons are just pure pragmatic [10:12] Depe has joined the channel [10:12] satyr has joined the channel [10:13] sinclair_: framlin: .NET + visual studio = super productive [10:13] sinclair_: framlin: from database to application, .NET offers everything out of the box with automation tools for everything, but it does cost in licensing windows servers and sql server databases [10:14] framlin: I think its not for all of the JAVA and .NET - Developers all over the worls, but for all of them, that came to my customer and tried to convince them, that they should use JAVA or .NET for some reasons [10:14] pickels has joined the channel [10:14] sinclair_: framlin: in my experiance, that's why people opt for Java [10:14] trivol has joined the channel [10:14] sinclair_: framlin: well, .NET is a sensible choice [10:14] sinclair_: framlin: PHP is not [10:14] framlin: thats the next reasson .... licences .... toooo expansive [10:15] sinclair_: yeah, MS licensing sucks [10:15] sinclair_: yeah, still, you trade the cost of licensing for the cost in development [10:15] sinclair_: In java, you tend to work harder than you do in .NET [10:16] sinclair_: in PHP, you are in a middle ground, but are liable to end up with a poorly written application [10:16] recycl3 has joined the channel [10:17] framlin: as I wrote. The agile style we use as JS/Cobol/PHP-teams is FAR quicker than Java and .NET people was and thats not only cheaper in licences, but cheaper in development, too [10:17] sinclair_: must have some pretty poor .NET developers [10:17] disappearedng has joined the channel [10:18] sinclair_: in Germany right? [10:18] framlin: may be, but the companies that have send them has very well known names ;) [10:18] framlin: yep in Germany [10:18] sinclair_: New Zealand here [10:18] framlin: sounds cool [10:18] sinclair_: just another country [10:19] framlin: so, now I am going to have lunch ;) [10:19] sinclair_: nice talking (hassle your server side teams about security) :) [10:19] framlin: I will do so ;) [10:20] framlin: afk [10:23] josh-k has joined the channel [10:24] sandfox has joined the channel [10:27] _olouv_ has joined the channel [10:27] openros has joined the channel [10:31] julien_devanco has joined the channel [10:32] schredder has joined the channel [10:34] theCole: are there any other groups for posting messages about node other than google group? [10:35] theCole: as far as i know that is the main one [10:36] jetienne has joined the channel [10:36] antdillon has joined the channel [10:36] arduix has joined the channel [10:39] julien_devanco has left the channel [10:40] stalled has joined the channel [10:41] schredder has joined the channel [10:41] michaelhartau has joined the channel [10:42] al3xnull has joined the channel [10:47] hcchien has joined the channel [10:47] satyr has joined the channel [10:48] hackband has joined the channel [10:48] legless_nigga has joined the channel [10:49] legless_nigga: cheers al [10:49] legless_nigga: l [10:50] larsschenk has joined the channel [10:50] legless_nigga: i use a websocket library the a cluster module... will i have problems? I mean if the client connects to a port on a clustered machine, he will be routed to the same process while thewebsocket connection is open? [10:50] legless_nigga: * + the cluster module [10:50] legless_nigga: fuckit i cant write today [10:50] koo_ has joined the channel [10:51] illourr has joined the channel [10:51] illourr: morning noders [10:51] legless_nigga: morning [10:51] legless_nigga: its noon here lol [10:52] illourr: i havent slept! [10:52] illourr: ah ya :) [10:52] legless_nigga: neither I man hope you drank shitload of caffee and you can answer me :D [10:52] illourr: drinking lots of water haha [10:52] legless_nigga: thats aint too energizing is it [10:52] illourr: its not bad [10:53] illourr: you should try it [10:53] legless_nigga: k [10:53] legless_nigga: so i use the node cluster module [10:53] legless_nigga: and also a websocket libryr [10:53] legless_nigga: library*... now my question is, if some nigga connects to a port which is shared by node amongst processes [10:53] stonebranch has joined the channel [10:54] legless_nigga: during the connection, will all action be routed to the same process? [10:54] larsschenk has left the channel [10:55] schredder has joined the channel [10:55] legless_nigga: im pulling my hair out with websocket - socket.io sucks (buggy), everything else is spartan [11:03] enmand has joined the channel [11:04] mikl has joined the channel [11:04] bnoordhuis has joined the channel [11:05] schredder has joined the channel [11:06] igoldny has joined the channel [11:09] level09 has joined the channel [11:10] dylang has joined the channel [11:11] rickibalboa has joined the channel [11:12] Nss has joined the channel [11:12] TomY has joined the channel [11:13] igoldny has left the channel [11:15] level09 has joined the channel [11:19] schredder has joined the channel [11:21] pid has joined the channel [11:25] cjm has joined the channel [11:29] CIA-19: node: 03Alex Kocharin 07master * r415bff2 10/ (lib/repl.js test/simple/test-repl-tab-complete.js): [11:29] CIA-19: node: repl: fix space autocompletion bug [11:29] CIA-19: node: Tapping + would exit the REPL. - http://git.io/BaCruQ [11:31] crutex has joined the channel [11:31] crutex has joined the channel [11:32] aho has joined the channel [11:32] ehedenst has joined the channel [11:36] empyreum has joined the channel [11:36] empyreum has left the channel [11:37] nsolsen: dg [11:37] akshayms has joined the channel [11:37] nsolsen: whoops.. [11:41] dfletcher has joined the channel [11:41] uchuff has joined the channel [11:41] empyreum has joined the channel [11:41] `3rdEden: bnoordhuis: ping [11:42] bnoordhuis: `3rdEden: pong [11:42] dr0id: ping pong [11:42] `3rdEden: that was quick [11:42] bnoordhuis: that's what she shaid [11:42] bnoordhuis: *said, damnit [11:42] zackattack_ has joined the channel [11:43] empyreum: hi guys, looking for JS coders for some interfaces of knowledge-related technology [11:43] empyreum: anybody interested? [11:43] `3rdEden: bnoordhuis: ;D anyways, I have been running against bug in the url.parse() method, i already patched it, but I was wondering if it was intentional [11:44] `3rdEden: https://github.com/joyent/node/pull/2966/files#L1R117 [11:44] bnoordhuis: `3rdEden: i'm afraid i just closed your bug report :) [11:44] `3rdEden: lal [11:44] bnoordhuis: but i've got to go, appointment at the consultatiebureau, be back in an hour [11:44] dfletcher_ has joined the channel [11:44] `3rdEden: k [11:45] devongovett has joined the channel [11:45] Topcat has joined the channel [11:46] empyreum has left the channel [11:48] empyreum has joined the channel [11:48] empyreum has left the channel [11:49] emattias has joined the channel [11:50] broofa has joined the channel [11:50] i42n has joined the channel [11:51] variableNodejs has joined the channel [11:53] nsolsen has joined the channel [11:53] eliocapella has joined the channel [11:57] v_y has joined the channel [11:58] mandric has joined the channel [11:59] t0mmyvyo has joined the channel [12:00] pors1 has joined the channel [12:03] arcil has joined the channel [12:04] thinkt4nk has joined the channel [12:04] dylang has joined the channel [12:05] josh-k has joined the channel [12:06] baudehlo has joined the channel [12:07] morefun has joined the channel [12:07] morefun: yo al [12:07] morefun: l [12:08] pgte has joined the channel [12:09] kPb_in_ has joined the channel [12:10] karterk has joined the channel [12:12] robhawkes has joined the channel [12:13] rynkan has joined the channel [12:13] rynkan: Hey [12:13] __doc__ has joined the channel [12:14] ewalker has joined the channel [12:15] erichynds has joined the channel [12:16] erikzaadi has joined the channel [12:16] TheJH has joined the channel [12:16] kPb_in has joined the channel [12:18] pgte_ has joined the channel [12:21] pgte has joined the channel [12:22] level09 has joined the channel [12:23] brianseeders has joined the channel [12:24] v_y has left the channel [12:24] bshumate has joined the channel [12:25] sadjow has joined the channel [12:31] sadjow has left the channel [12:32] moonlite_ has joined the channel [12:32] bartt has joined the channel [12:32] vkareh has joined the channel [12:32] innociv_ has joined the channel [12:32] voodootikigod1 has joined the channel [12:32] Vennril2 has joined the channel [12:32] hipster__ has joined the channel [12:32] street has joined the channel [12:32] tomaszto_ has joined the channel [12:32] levi501d has joined the channel [12:32] mape has joined the channel [12:32] MitchW has joined the channel [12:32] joshontheweb has joined the channel [12:32] tvw has joined the channel [12:32] Es0teric_ has joined the channel [12:32] fairwinds has joined the channel [12:32] fumanchu182 has joined the channel [12:32] loffe has joined the channel [12:32] unomi has joined the channel [12:33] devdazed has joined the channel [12:33] hobodave has joined the channel [12:33] lsdafjklsd has joined the channel [12:33] pickels has joined the channel [12:33] openros has joined the channel [12:33] aliem has joined the channel [12:34] stalled has joined the channel [12:35] bruitism has joined the channel [12:35] arthurdebert has joined the channel [12:36] xSmurf has joined the channel [12:39] graeme_f has joined the channel [12:39] arduix has joined the channel [12:42] al3xnull has joined the channel [12:43] akshayms_ has joined the channel [12:44] umren_ has joined the channel [12:46] ehazlett has joined the channel [12:47] infynyxx has joined the channel [12:48] stonebranch has joined the channel [12:49] jtsnow has joined the channel [12:49] akshayms has joined the channel [12:51] AaronMT has joined the channel [12:52] lazyshot has joined the channel [12:52] ziro` has joined the channel [12:52] dscape: anyone has deep knowledge of process.uncaught exception mechaniscs? [12:52] ewalker has left the channel [12:54] flou has joined the channel [12:54] openros has joined the channel [12:56] RLa has joined the channel [13:00] karterk has joined the channel [13:06] TomY has joined the channel [13:06] unomi has joined the channel [13:07] tomasztomczyk has joined the channel [13:07] lduros has joined the channel [13:08] karterk has joined the channel [13:10] Andy1991 has joined the channel [13:10] kPb_in has joined the channel [13:12] madtimber has joined the channel [13:13] thurmda has joined the channel [13:15] madtimber has joined the channel [13:15] rwaldron has joined the channel [13:15] shinuza has joined the channel [13:16] arduix has joined the channel [13:16] Andy1991 has left the channel [13:17] thetristan has joined the channel [13:17] karterk has joined the channel [13:17] akshayms has joined the channel [13:17] lperrin has joined the channel [13:17] thetristan has joined the channel [13:17] Andy1991 has joined the channel [13:19] akshayms_ has joined the channel [13:20] aheckmann has joined the channel [13:22] CromeDome has joined the channel [13:24] sugyan has joined the channel [13:24] joshfinnie has joined the channel [13:25] rick- has joined the channel [13:27] ioscale has joined the channel [13:27] karterk has joined the channel [13:28] sugyan has joined the channel [13:30] bnoordhuis: `3rdEden: back [13:31] bnoordhuis: dscape: yes [13:31] blup has joined the channel [13:33] bkaney has joined the channel [13:35] pt_tr has joined the channel [13:36] _akshayms has joined the channel [13:36] karterk has joined the channel [13:36] nsolsen has joined the channel [13:36] `3rdEden: bnoordhuis i already commented on the issue [13:37] LBRapid has joined the channel [13:37] davidsklar has joined the channel [13:37] mattrobenolt has joined the channel [13:38] mattrobenolt: Are there any good logging utilities people recommend? Something other than writing to stderr or stdout. [13:38] thinkt4nk has joined the channel [13:40] thomblake has joined the channel [13:41] ioscale: mattrobenolt: what about the logger included with connect?!? [13:41] mattrobenolt: ioscale: Something more generic. [13:41] mattrobenolt: Not necessarily related to HTTP. [13:42] thomblake has left the channel [13:42] ewalker has joined the channel [13:43] westg has joined the channel [13:43] ioscale: do you want to aggregate across different machones or just local?!? [13:43] karterk has joined the channel [13:44] benvie: lol rofl https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/d30ae1c692ff53c3?pli=1 [13:44] mattrobenolt: I'm writing a tool that hooks into logging, and I realized that there isn't really a ubiquitous logger. [13:44] ioscale: look at nlogger for instance [13:44] ioscale: https://github.com/igo/nlogger [13:45] mattrobenolt: ioscale: That looks more like what I want. Do people use that? [13:45] ioscale: i liked it… but there is no standard like lsf4j or so… [13:46] mattrobenolt: I'm working on https://github.com/mattrobenolt/raven-node [13:46] mattrobenolt: It's a remote error logger. [13:46] mattrobenolt: But I was researching for other hooks that people use for logging errors. [13:46] ioscale1 has joined the channel [13:47] mattrobenolt: Raven comes from Python land, and Python's logger is intense. [13:47] maritz has joined the channel [13:47] tomasztomczyk has joined the channel [13:49] benjixx has joined the channel [13:51] dscape: bnoordhuis: i found that if you process uncaught twice [13:51] dscape: without using nextTick [13:51] dscape: the second throw gets ignored and the process stops [13:51] Poetro has joined the channel [13:52] Andy1991: throws are supposed to skip all execution until the catch block... [13:52] JSONB has joined the channel [13:53] Andy1991: try { throw 'Error'; throw 'Error 2'; }catch(Err) { console.log(Err); } // Error [13:53] devaholic has joined the channel [13:55] karterk has joined the channel [13:55] CrankyMonkey has joined the channel [13:56] dthompso99 has joined the channel [13:56] saikat has joined the channel [14:01] voodootikigod has joined the channel [14:01] dscape: bnoordhuis: https://gist.github.com/2135922 [14:01] dscape: looks ok? [14:02] dscape: thanks Andy1991 but that's not what I was asking for :) [14:02] wink_ has joined the channel [14:02] bnoordhuis: dscape: there's a safety mechanism built into uncaughtException [14:03] tmcw has joined the channel [14:03] bnoordhuis: dscape: if the uncaughtException listener throws, node aborts to avoid an infinite loop [14:03] dscape: bnoordhuis: that's not true if we nextTick [14:03] bnoordhuis: dscape: that was about f.js [14:04] dscape: yeah i noticed, i actually need it to carry on until a syncronous limit is met [14:04] dscape: ( cause we dont have domains ) [14:04] CrankyMonkey has joined the channel [14:04] dscape: bnoordhuis: is this a bug, or expected behavior? [14:05] bnoordhuis: dscape: expected behavior [14:05] dukeytoo has joined the channel [14:05] baudehlo has joined the channel [14:06] bnoordhuis: benvie: hah, hilarious! [14:07] jerrysv has joined the channel [14:07] benvie: lol I can't believe no one said anything until the last guy [14:07] isao has joined the channel [14:07] MerlinDMC has joined the channel [14:08] ramitos has joined the channel [14:09] _akshayms has joined the channel [14:09] `3rdEden: benvie the first guy already said it. [14:09] karterk has joined the channel [14:09] benvie: well I mean everyone else was just like all business [14:10] pandeiro has joined the channel [14:11] ioscale has joined the channel [14:11] yawNO has joined the channel [14:11] yawNO: o/ [14:11] dscape: bnoordhuis: i would agree on behavior [14:12] dscape: but honestly expected that if i removed the listener [14:12] dscape: and readded it [14:12] dscape: node would reset the safety mechanism [14:12] hobodave: ew [14:12] snearch has joined the channel [14:12] dscape: as I, the developer, am stating I want to redo this thing [14:12] dscape: like this there's no way to do it, other than using nextTick since node doesnt know better [14:13] dscape: but if domains where lightweight and node did know, this would be impossible to do [14:13] dscape: ? [14:13] willwhite has joined the channel [14:13] bnoordhuis: dscape: where/when do you remove the listener? do you mean from inside the uncaughtException handler? [14:14] carlyle has joined the channel [14:14] fatjonny has joined the channel [14:14] stagas has joined the channel [14:16] carlyle has joined the channel [14:17] ssteo has joined the channel [14:18] dukeytoo has joined the channel [14:19] robi42 has joined the channel [14:19] dscape: bnoordhuis: yes [14:20] dscape: I would expect that to turn down the safety mechanism [14:20] dscape: thats what I understand by removing and readding another listener [14:20] bnoordhuis: dscape: that's not how it works with uncaughtException [14:20] HacDan has joined the channel [14:21] bnoordhuis: dscape: that's handled from c++ land; node sets a in_uncaught_exception flag. if it's already set, it aborts [14:21] variableNodejs has joined the channel [14:21] dscape: bnoordhuis: that makes sense, as long as there's a workaround (like nextTick) I don't see this as an issue [14:22] robi42 has joined the channel [14:22] dscape: problem would be if that was to go away [14:22] barmaley-exe has left the channel [14:22] nsolsen has joined the channel [14:22] bnoordhuis: dscape: well, there has been talk of removing uncaughtException altogether :) [14:22] kevwil has joined the channel [14:23] dscape: bnoordhuis: is the dev mailing list? i didnt see that [14:23] bnoordhuis: dscape: no, there's an issue for that [14:23] dscape: whats the rationale ? [14:23] yawNO: http://99lime.com [14:24] bnoordhuis: dscape: that it's really easy to break things [14:24] kevinswiber has joined the channel [14:24] bnoordhuis: there are a couple of other issues linked that are good examples of that [14:24] bnoordhuis: dscape: https://github.com/joyent/node/issues/2582 [14:25] erikzaadi has joined the channel [14:25] colinclark has joined the channel [14:26] Progster has joined the channel [14:28] rauchg has joined the channel [14:28] dscape: thanks bnoordhuis [14:28] dscape: commented [14:28] mattgifford has joined the channel [14:28] openros has joined the channel [14:29] plutoniix has joined the channel [14:29] M1l3n1um has joined the channel [14:31] c4milo has joined the channel [14:32] emattias has joined the channel [14:32] flou has joined the channel [14:33] fluk3 has joined the channel [14:34] agnat has joined the channel [14:36] briancray has joined the channel [14:37] brainss has joined the channel [14:37] jmar777 has joined the channel [14:39] Munix has joined the channel [14:39] pendlepa1ts has joined the channel [14:41] ioscale has joined the channel [14:42] bergie has joined the channel [14:42] al3xnull has joined the channel [14:42] Andy1991 has left the channel [14:44] lirla has joined the channel [14:44] bradleymeck has joined the channel [14:46] HacDan has joined the channel [14:47] kmiyashiro has joined the channel [14:48] infynyxx has joined the channel [14:49] Poetro has joined the channel [14:51] jdeibele has joined the channel [14:53] tmcw has joined the channel [14:53] bitprobe has joined the channel [14:53] Raynos: Is there an npm version manager [14:53] Raynos: npm refuses to work with 0.4 :( [14:53] garrensmith has joined the channel [14:54] c4milo has joined the channel [14:56] arduix has joined the channel [14:56] Venom_X has joined the channel [14:57] jj0hns0n has joined the channel [14:57] stantona has joined the channel [14:59] isaacs has joined the channel [15:00] halfhalo has joined the channel [15:01] halfhalo has joined the channel [15:03] Poetro has joined the channel [15:03] jakehow has joined the channel [15:03] epokmedia has joined the channel [15:04] TheFuzzb_ has joined the channel [15:04] akshayms_ has joined the channel [15:04] TheFuzzb_ has joined the channel [15:06] jscheel has joined the channel [15:06] jscheel has joined the channel [15:06] ditesh|cassini has joined the channel [15:07] RLa has joined the channel [15:07] Brightstar has joined the channel [15:07] aaronmcadam has joined the channel [15:07] dshaw_ has joined the channel [15:07] ericmuyser has joined the channel [15:09] sorensen__ has joined the channel [15:10] maritz: Raynos: npm wasn't bundled with node 0.4.x [15:10] yawNO: i think he means that its broke [15:10] yawNO: *n [15:10] Raynos: Yeah thats what I mean [15:10] tjbell has joined the channel [15:10] maritz: well, if he used 0.6.x and then downgraded, it's gonna break :D [15:10] Raynos: I have an old node app that works with 0.4 [15:10] maritz: look up nvm [15:10] Raynos: and im trying to get it to run using nvm [15:10] maritz: heh :D [15:11] Raynos: the problem is nvm use 0.4.12 [15:11] Raynos: installs 0.4 [15:11] Raynos: but then npm refuses to work :\ [15:11] Raynos: because npm is all like "no u, use 0.6" [15:11] maritz: yes [15:11] yawNO: Raynos: y u port it to 0.6 [15:11] maritz: either install an old npm manually or just use npm with 0.6 and then run the app itself with 0.4 [15:11] creationix: Raynos, just use an older npm? [15:11] yawNO: doesnt make sense [15:12] yawNO: just port it [15:12] karterk has joined the channel [15:12] maritz: that might be more work than necessary [15:12] maritz: (although if feasible, do it!) [15:12] yawNO: well it dependse [15:12] creationix: also, you can install versions manually with nvm and it will still manage them [15:12] yawNO: *depends [15:12] creationix: just download the source and configure with the right prefix [15:12] yawNO: if its something you plan to use/improve [15:12] jaha has joined the channel [15:13] creationix: ./configure --prefix=$HOME/nvm/v0.4.12 [15:13] yawNO: theres no way you can stick with .4 [15:13] Venom_X has joined the channel [15:13] creationix: assuming nvm is in $HOME/nvm [15:13] k1ttty has joined the channel [15:14] jocafa has joined the channel [15:14] robotblake has joined the channel [15:14] robotblake has joined the channel [15:15] AviMarcus has joined the channel [15:15] BillyBreen has joined the channel [15:16] itstriz has joined the channel [15:17] mansoor has joined the channel [15:17] piscisaureus_ has joined the channel [15:18] rmttnmd has joined the channel [15:18] devnull1 has joined the channel [15:18] colinclark has joined the channel [15:19] bkaney_ has joined the channel [15:19] colinclark_ has joined the channel [15:19] rtgibbons has joined the channel [15:20] openros has joined the channel [15:21] jetienne has joined the channel [15:22] teixeira has joined the channel [15:22] garrensm_ has joined the channel [15:23] kPb_in has joined the channel [15:23] Guest1637 has joined the channel [15:23] kevwil has joined the channel [15:24] whaley has joined the channel [15:24] orlandovftw has joined the channel [15:25] garrensm_ has joined the channel [15:25] rlidwka has joined the channel [15:25] eliocapella: is there a way of breaking the line in a middle of a long regex expression [15:25] eliocapella: ? [15:26] Zzaichik has joined the channel [15:26] quackquack has joined the channel [15:27] isaacs: eliocapella: like this? [15:27] isaacs: .. "asdf\nfoo\nbar".match(/o\na/) [15:27] yawNO: i dunno if escaping the line break would work [15:27] isaacs: ACTION missing catb0t and v8bot [15:27] yawNO: isaacs: he means multi line regex i think [15:27] isaacs: eliocapella: ohh, like this: [15:27] eliocapella: yeah [15:28] isaacs: new RegExp( [15:28] isaacs: 'f[ob]+' + [15:28] isaacs: 'blerg$' [15:28] isaacs: ) [15:28] isaacs: ? [15:28] eliocapella: ooooooooooooh [15:28] eliocapella: nice [15:28] eliocapella: thanks! [15:28] isaacs: eliocapella: note that then you have to escape things twice: once for the string, and once for the RegExp [15:28] yawNO: isaacs: i cant test right now but [15:28] isaacs: just SOME things [15:28] yawNO: would it work to have \ at the end and then go \n? [15:28] isaacs: new RegExp('\\$') for instance, to match a $ [15:28] isaacs: rather than the eol [15:29] yawNO: without using the new RegExp thing [15:29] yawNO: just // [15:29] isaacs: yawNO: no [15:29] yawNO: :( [15:29] warz has joined the channel [15:29] yawNO: costructors are slow [15:29] isaacs: the /asdf/ style regexps can not contain \n chars [15:29] isaacs: yawNO: i doubt that. [15:29] eliocapella: yeah tried that yawNO and it wont work [15:29] isaacs: yawNO: RegExp is highly optimized and native code. [15:29] yawNO: eliocapella: k [15:30] yawNO: isaacs: using something like new Object instead of {} is like 20x slower [15:30] yawNO: not sure in v8 though [15:30] eliocapella: isaacs, just to know, are new RegExp cached? [15:30] yawNO: i remember just some firefox benchs [15:30] isaacs: ACTION doesn't believe words like "slower" or "faster" without numbers attached [15:31] isaacs: been burned too many times by the oral tradition style of benchmarks. [15:31] yawNO: isaacs: k wait [15:31] kevinswiber_ has joined the channel [15:31] devnull1 has left the channel [15:32] isaacs: write clear code. then profile it. then optimize the slow bits. [15:32] isaacs: that is the only path to sanity. [15:32] rtgibbon_ has joined the channel [15:32] thejefflarson has joined the channel [15:32] isaacs: half the time, writing clear code ends up being fast enough anyhow. [15:32] eliocapella: even if its slower you are only initializing the regex object once per execution [15:32] tomnewmann has joined the channel [15:33] jj0hns0n has joined the channel [15:34] pokoli has joined the channel [15:34] relling has joined the channel [15:34] Vainoharhainen has joined the channel [15:34] ph^ has joined the channel [15:34] yawNO: its faster in v8 [15:35] yawNO: slower anywhere else [15:35] yawNO: http://jsperf.com/pip-constructors [15:35] Topcat_ has joined the channel [15:35] yawNO: looks like they've done a pretty nice job with optimization [15:35] yawNO: :D glad to see that [15:36] Raynos: creatonix: I want an npm version manager like nvm :p [15:36] perezd has joined the channel [15:36] Raynos: yawNO: port large application with 0 unit tests. No thanks [15:37] yawNO: Raynos: :| [15:37] yawNO: no tests? [15:37] isaacs: Raynos: just use nave, and let it install the npm versions that came with the associated node version. [15:37] Raynos: yawNO: write tests for me :D [15:37] yawNO: im sorry for you the [15:37] yawNO: Raynos: i hate tests [15:37] yawNO: but i force myself to write them anyway [15:37] Raynos: isaacs: did 0.4 have an npm version? [15:37] isaacs: Raynos: no [15:37] yawNO: so please, dont ask me that [15:37] yawNO: :) [15:37] isaacs: Raynos: also, stop using v0.4 [15:38] isaacs: yawNO: now try this: var a = new Array(10); for (var i = 0; i < 10; i ++) a[i] = i; [15:38] isaacs: yawNO: vs var a = []; ... [15:38] Raynos: isaacs: I avoid 0.4, but I have no choice, I rather avoid upgrading to 0.6 [15:38] isaacs: knowing the length ahead of time makes v8 about an oom faster. [15:38] stafamus has joined the channel [15:38] meandi5 has joined the channel [15:39] isaacs: Raynos: sorry, then. this train only moves forward. [15:39] Raynos: I know [15:39] pokoli has joined the channel [15:39] isaacs: v0.8 is still flexible. feel free to ask for changes there that would help you. [15:39] Raynos: Im in the progress of porting this but its going to be painful [15:39] yawNO: isaacs: hey thats good to know :O [15:39] yawNO: im impressed [15:40] k1ttty has joined the channel [15:41] justicefries has joined the channel [15:42] _olouv_ has joined the channel [15:42] nsolsen has left the channel [15:43] tk_ has joined the channel [15:44] nsolsen has joined the channel [15:44] pokoli has joined the channel [15:45] joshfinnie has joined the channel [15:45] Guest___ has joined the channel [15:46] arthurdebert has joined the channel [15:46] tekky has joined the channel [15:47] simenbrekken has joined the channel [15:47] intabulas has joined the channel [15:48] kevwil has joined the channel [15:48] hackband has joined the channel [15:50] tylerstalder has joined the channel [15:51] kevinswiber_ has joined the channel [15:52] rmttnmd has joined the channel [15:52] robotblake`alt has joined the channel [15:53] ako has joined the channel [15:53] vereteran has joined the channel [15:54] robotblake|alt has joined the channel [15:54] mikl has joined the channel [15:55] wilmoore has joined the channel [15:55] retornam has joined the channel [15:56] sreeix has joined the channel [15:57] robotblake has joined the channel [15:57] robotblake has joined the channel [15:57] halfhalo has joined the channel [15:57] rtgibbons has joined the channel [15:59] jryans has joined the channel [15:59] lum_ has joined the channel [16:00] diogogmt has joined the channel [16:00] jetienne has joined the channel [16:01] piscisaureus__ has joined the channel [16:03] arcil: i tried to send messages to the clients in a cluster, but these messeages aren't received from the clients [16:03] fresham has joined the channel [16:04] cerebros has joined the channel [16:04] dubenstein has joined the channel [16:04] bindr has joined the channel [16:04] kriskowal has joined the channel [16:04] slloyd has joined the channel [16:05] Brightstar: I'm brand new to node (and to server side development in general), but I have a good size project I'm looking at doing specifically in node. I need some direction and I'm looking to pick somebody's brain. Anybody free for a couple minutes? [16:05] emilepetrone has joined the channel [16:05] bnoordhuis: Brightstar: sure [16:06] Brightstar: K. Well I know my way around java script ok. I've done a fair bit of client side stuff, but I know next to nothing about the server side. I've been working on doing some research, but node resources are fairly thin on the ground. [16:07] artusrocha has joined the channel [16:07] bnoordhuis: Brightstar: have you seen learnboost? [16:07] Brightstar: no, I haven't. [16:08] Brightstar: (I'll look that up) [16:08] dtrejo has joined the channel [16:08] creationix: Brightstar, howtonode.org and nodebits.org can help too [16:09] creationix: learnboost is the company that makes socket.io and express (among other things) [16:09] Brightstar: I'm not afraid of doing my research and I'm quite aware of how much I have to learn, but trying to learn 3 different subject areas all at the same time is usually a good way to run into frustration, just becuase you don't have the background knowledge to know what you're doing wrong. [16:09] thetristan: anyone have issues w/ express seeming to not use middleware the very first request after spinning up a server? [16:09] arcil: cluster masters should send message to the clients, shouldn't they? http://pastie.org/3635685 this does not work. any thoughts about this? [16:09] Brightstar: K. I've seen howtonode. Learned a good bit there, but i haven't seen the others. I'll start there for now. [16:09] thetristan: serves up a 404 on the first request, but all subsequent requests work just fine [16:09] dubenstein has joined the channel [16:09] EyePulp has joined the channel [16:10] rphillips has joined the channel [16:11] user123123123123 has joined the channel [16:11] joshontheweb has joined the channel [16:11] herbySk has joined the channel [16:11] briancray has joined the channel [16:12] arcil: is the code wrong? [16:12] arcil: or is this an issue with cluster? [16:12] arcil: i'm on the latest node version [16:12] thetristan: here's my middleware implementation: https://github.com/thetristan/cobuild/blob/master/lib/middleware.coffee [16:13] bnoordhuis: arcil: you need to listen for the worker.on('listening') event [16:13] tbranyen: man gollum sucks for docs writing [16:13] tbranyen: do people really like committing every time they make a change?? [16:13] tbranyen: is this enjoyable or some shit [16:14] tk: tbranyen: its certainly not a *bad* practice... but I personally do not do micro commits unless they make sense [16:14] thetristan: a test that fires up the server (note the extra request before it gets to the real, tested requests… this always returns 404) https://github.com/thetristan/cobuild/blob/master/spec/02-middleware.spec.coffee [16:15] arcil: bnoordhuis: i want to receive a message in the worker from the master, messages from the worker to the master are working fine [16:15] TimTim` has joined the channel [16:15] Brightstar: Everything I've found so far is just bits and pieces of "how I did this in Node" ...There's zero here that approaches start-to-finish or anything other than a simple "hello world" tutorial. is this just me? [16:16] Youdaman has joined the channel [16:17] TimTimTim has joined the channel [16:18] braoru has joined the channel [16:18] sammmy has joined the channel [16:18] Brightstar: even just an example of a real-world app would go a long way for me. [16:18] mattrobenolt has joined the channel [16:18] meandi5 has joined the channel [16:18] mattrobenolt: Any heavy forever users? [16:18] mattrobenolt: Or forever devs. [16:19] boltR has joined the channel [16:19] sammmy: Using Express, how do I route /path/[number]? I'm using /path/:id?, but that seems to catch everthing; /path/1, path/12, path/something. [16:20] Youdaman has left the channel [16:20] bingomanatee__ has joined the channel [16:20] rlidwka: /path/:id([0-9]+)? [16:20] rlidwka: smth like that [16:22] warz: sammy, its mentioned on the docs page in the routing section. "Typically we may use a “dumb” placeholder such as “/user/:id” which has no restrictions, however say for example we are limiting a user id to digits, we may use ‘/user/:id([0-9]+)’ which will not match unless the placeholder value contains only digits." [16:23] dodo has joined the channel [16:23] kukkelundin has left the channel [16:23] kukkelundin has joined the channel [16:24] cha0s has joined the channel [16:24] mattgifford has joined the channel [16:25] bnoordhuis: arcil: the bug in your code is that you don't the worker time to start up [16:25] CrankyMonkey has joined the channel [16:25] springmeyer has joined the channel [16:25] tylerstalder has joined the channel [16:25] bnoordhuis: arcil: iow, you're sending it a message when it's not ready yet to receive it [16:26] sammmy: warz, rlidwka: ty. I see. However, can any regex go in the () after a placeholder? [16:26] broofa has joined the channel [16:27] warz: try it out [16:27] RobWC has joined the channel [16:27] sammmy: warz: that's a yes. ;P [16:27] RobWC has left the channel [16:28] arcil: bnoordhuis: thank you [16:28] warz: if you say so. i literally do not know, but i'd be willing to bet that any regex that matches a single group would probably work. [16:28] warz: thats why i'd suggest trying it out, or looking at the code. [16:29] Topcat has joined the channel [16:29] maletor has joined the channel [16:29] toxicFork has joined the channel [16:29] toxicFork: hi! [16:32] erichynds has joined the channel [16:32] simenbrekken has joined the channel [16:34] adambeynon has joined the channel [16:35] tmcw has joined the channel [16:36] joshthecoder has joined the channel [16:36] Morkel has joined the channel [16:36] galaxywatcher has joined the channel [16:37] umren has joined the channel [16:37] pgte has joined the channel [16:37] dodo_ has joined the channel [16:38] mattgifford has joined the channel [16:39] michaelmartinez has joined the channel [16:40] retornam has joined the channel [16:40] chadskidmore has joined the channel [16:40] umren has joined the channel [16:41] umren has joined the channel [16:41] gekko_ has joined the channel [16:43] al3xnull has joined the channel [16:43] Progster has joined the channel [16:43] alessioalex has joined the channel [16:44] phoochka has joined the channel [16:45] EhevuTov has joined the channel [16:45] alvaro_o has joined the channel [16:45] Nopik has joined the channel [16:46] pokoli has joined the channel [16:46] mattrobenolt has left the channel [16:47] k1ttty has joined the channel [16:48] nadirvardar has joined the channel [16:49] baudehlo: in jquery (node relevant; I'm using cheerio), if I do: $('whatever').find('a').attr('href'); it gives me the HREF with & escaped as & - how can I decode that? [16:49] baudehlo: (aside from doing .replace() obv) [16:49] jtsnow has joined the channel [16:50] brianleroux has joined the channel [16:50] toxicFork: jquery :( [16:51] xippi has joined the channel [16:51] xippi has joined the channel [16:51] kitt has joined the channel [16:51] Edy has joined the channel [16:52] Poetro has joined the channel [16:54] EhevuTov: baudehlo, would something like this work '$('whatever').html("Hi&There").text();' [16:54] tonist has joined the channel [16:55] EhevuTov: I'm not that familiar with jQuery [16:55] AndreasMadsen has joined the channel [16:55] baudehlo: Me either. And no that clearly wouldn't work (maybe I asked the question poorly though). [16:55] cjm has joined the channel [16:56] sreeix has joined the channel [16:56] TheEmpath has joined the channel [16:56] TheEmpath: hi.. i upgrade from node 0.4 to 0.6 and... require.paths is no longer there? I have to set an environment variable now? what happens if i have multiple projects withl local modules? [16:57] wendall911 has joined the channel [16:58] EhevuTov: baudehlo, try this: http://jsfiddle.net/davidThomas/cC8Ty/ [16:58] kriskowal has joined the channel [17:00] dukeytoo has joined the channel [17:00] dgathright has joined the channel [17:01] tylerstalder has joined the channel [17:01] langworthy has joined the channel [17:01] baudehlo: wow that's horrible :) I guess it works though. [17:01] radiodario: anyone know if i can setup a proxy for my http requests from node? [17:01] radiodario: (i need to bypass ntlm auth) [17:02] timoxley has joined the channel [17:03] isao has joined the channel [17:04] enjalot has joined the channel [17:04] cameronpriest has joined the channel [17:04] meandi6 has joined the channel [17:05] EhevuTov: baudehlo, just focus on the function :) [17:05] Blkt has joined the channel [17:05] regality has joined the channel [17:06] Poetro has joined the channel [17:06] TheEmpath: so any solutions for having multiple node projects and the NODE_PATH problem? [17:07] CIA-19: node: 03ssuda 07master * r253ec6a 10/ src/process_wrap.cc : [17:07] CIA-19: node: process: don't use strdup() [17:07] CIA-19: node: file and cwd can be directly used from Utf8Value. - http://git.io/1X7HyA [17:07] Es0teric has joined the channel [17:08] adamkittelson has joined the channel [17:08] bnoordhuis: radiodario: request supports proxies [17:09] automata has joined the channel [17:10] gwillen has joined the channel [17:11] isaacs has joined the channel [17:13] pdodde has joined the channel [17:13] M1l3n1um has joined the channel [17:13] alessioalex has joined the channel [17:13] caolanm has joined the channel [17:15] hz has joined the channel [17:16] vkandy has joined the channel [17:18] level09 has joined the channel [17:19] rmttnmd has joined the channel [17:20] patcito has joined the channel [17:21] pgte has joined the channel [17:22] yaymukund: anyone know how to make mocha do something after all tests are done? I'd like to 1. start server, 2. run tests, 3. restart server [17:22] yaymukund: those steps should be synchronous [17:22] akshayms has joined the channel [17:22] herbySk: Hello, I recently read about Disruptor and I love the concept... I have though about how to build it in node... someone knowing more about deep unix magic (bnoorhuis?): will it work that way that I create memory backed-store (mdmfs, tmpfs), create a file in it, mmap it to node Buffer (node-mmap) and put the Disruptor ring-buffer there? Does this scenario (mmap'd mem-backed store) work so that whenever someone write to such Buffe [17:22] herbySk: r it "instantly writes" and appears on the mmap'd Buffers of other processes? [17:22] sh1mmer has joined the channel [17:23] gregpascale has joined the channel [17:23] timoxley has joined the channel [17:23] dukeytoo: yaymukund: Before, after [17:23] yaymukund: dukeytoo: I'll be running multiple files of tests [17:23] rlidwka: make[1]: execvp: /bin/sh: Argument list too long [17:23] rlidwka: what's that? [17:23] dukeytoo: yaymukund: Ah. Don't know then. [17:23] josh-k has joined the channel [17:23] rlidwka: i'm getting this message trying to compile node [17:23] jomoho has joined the channel [17:24] otih has joined the channel [17:24] yaymukund: dukeytoo: ty anyway [17:25] felixge has joined the channel [17:25] felixge has joined the channel [17:25] geetarista has joined the channel [17:26] itayneeman has joined the channel [17:26] MrGoodbyte has joined the channel [17:26] felixge: v8 profiling question, does LazyCompile: … indicate the time is being spend by v8 optimizing a function, rather than the function itself doing any work? [17:26] Franciman_ has left the channel [17:26] achiu has joined the channel [17:28] shedinja_ has joined the channel [17:29] wavded: through up a simple streaming htmltopdf server wrapping wkhtmltopdf if anyone is interested, https://github.com/applieddataconsultants/pdfsnag [17:29] wavded: would love to improve if anyone wants to help, quite a small bit of code [17:30] bnoordhuis: felixge: more or less, yes [17:30] sammmy: the route '/path/:num([0-9]+)?' doesn't seem to work for /path/23 [17:30] justicefries has joined the channel [17:30] bnoordhuis: felixge: or maybe... it kind of depends. can you post the call graph? [17:30] sammmy: in express. [17:31] tmcw has joined the channel [17:31] bnoordhuis: rlidwka: what os? [17:31] felixge: bnoordhuis: https://gist.github.com/dbe78f55837ba5c64a73 [17:31] yogig has joined the channel [17:32] felixge: bnoordhuis: If I interpret this correctly, very little time is being spend in JS itself [17:32] felixge: unfortunately the C++ ticks are not very useful [17:32] felixge: but when I use Instruments (on OSX) and disable System Libraries, I see uv_write on top [17:32] felixge: (with 11% running time) [17:34] bnoordhuis: felixge: i think it also could mean that v8 is constantly recompiling your function because some guard fails [17:34] awaage has joined the channel [17:35] jxson has joined the channel [17:35] zemanel has joined the channel [17:35] pokoli has joined the channel [17:36] felixge: bnoordhuis: If I trace_opt I see it doing that quite a bit, but it stops after a while [17:36] felixge: bnoordhuis: and performance doesn't change after it stops [17:36] sammmy: I got it never [17:37] awaage: When I run "lsof | grep node" on my server, I get about 1000+ lines (tcp connections?). However, I know there's not that many connections at the moment. Is this normal? Or am I not ending my connections properly? [17:37] ppcano has joined the channel [17:37] Fuu has joined the channel [17:38] diogogmt has joined the channel [17:38] rlidwka: bnoordhuis: i'm on linux, node was in /home/alex/node-multiline/multiline-repl/ , mounted on /tmp/m/ - works just fine [17:39] mansoor has joined the channel [17:39] bnoordhuis: felixge: does it make a difference if you run with --always_opt? [17:40] jxson has joined the channel [17:40] felixge: bnoordhuis: testing that, thx [17:40] styol has joined the channel [17:40] franciscallo has joined the channel [17:41] pokoli has joined the channel [17:42] _olouv_ has joined the channel [17:42] bnoordhuis: rlidwka: you can bump the limit [17:42] rlidwka: bnoordhuis: that's not an error actually, but it cause one problem: v8 is being recompiled every time I start make :) [17:42] rlidwka: ok... i'll try that [17:42] Brightstar: If I've never used linux before, would you recommend Debian or Ubuntu, with the idea in mind of using Node? Is either one better for node specifically? (Learning curve can be ignored) [17:43] felixge: bnoordhuis: that had an interesting impact: https://gist.github.com/2138541 [17:43] felixge: bnoordhuis: 1.6% unaccounted ticks vs. 0.2% [17:43] felixge: and ___psynch_rw_wrlock completely gone from the C++ tick profile [17:43] CoverSli1e: as much as I hate ubuntu, I'd recommend it to anyone getting their toes wet with linux [17:43] ThatOtherPersonY has joined the channel [17:43] felixge: however, performance was overall a bit worse [17:44] zanefactory has joined the channel [17:44] rlidwka: Brightstar: doesn't matter... I think debian is more suitable for servers and ubuntu is for desktop, but that's not so much difference [17:44] Brightstar: Thanks. [17:44] CoverSli1e: debian is nice, but it's also got older libraries, and that tends to cause problems [17:44] truedat101: Learning linux, I'd recommend ArchLinux and do the "from scratch" set up. It's a really nice distro with great documentation. [17:45] mansoor: If you are learning linux DEFINTLY don't go with arch linux lol [17:45] felixge: that is --always_opt was only ~75% as fast as without this option [17:45] Brightstar: For me the main issue is if I learn something now I'll never bother to change probably. [17:45] dukeytoo has joined the channel [17:45] Brightstar: I might as well start out with something that gives me the most bang. user-friendliness is a non-issue. [17:45] mansoor: Brightstar, Ubuntu or Fedora [17:46] truedat101: But out in the cloud you are going to have a lot of choices, mostly Ubuntu and Centos/fedora, so getting familiar with how they manage packages and services is what you'll be concerned about [17:46] truedat101: But when I say learn, I mean learn how a distro is configured and set up. Arch is a breaze. If you just need a box and don't actually want to learn how it's put together, then Ubuntu is fine. [17:46] bnoordhuis: felixge: sorry, gotta run - ping me in two hours or so [17:47] felixge: bnoordhuis: np, ttyl / thx [17:47] bnoordhuis: rlidwka: there's a sysctl or a setting under /proc that lets you raise the argv limit - i can't remember its name, maybe google can :/ [17:47] pokoli has joined the channel [17:47] bnoordhuis: ACTION is off to dinner [17:48] Brightstar: I'll put it this way-- I'll learn what I need to to get the job done. Right now my project is not a cloud-based app at all. I'm actually going to be using a relational database ona dedicated server. ...Options for OS are Ubuntu, Debian and possibly CentOS. [17:49] meandi7 has joined the channel [17:49] Brightstar: Thanks for the input. [17:49] truedat101: Brightstar ... see what your cloud hoster will be providing. Put that in your VM or on your laptop and you'll learn quickly. [17:50] sadjow has joined the channel [17:50] sammmy: How does apache2 run it's background processes? I can't seem to keep my node.js processes running for very long in the background (every day they're killed and I have to SSH into the server again and run back up). I'm using nohup or the & argument. [17:50] qbert_ has joined the channel [17:50] mraxilus has joined the channel [17:50] qbert_: anyone have a prefered amazon S3 library ? [17:50] creationix: sammmy, use something your os provides [17:50] creationix: on ubuntu upstart works well [17:51] sammmy: creationix: do you think that's what apache2 uses? [17:51] creationix: on ubuntu it does [17:51] creationix: it depends on the system [17:51] Brightstar: They provide Ubuntu, Debian or CentOs. ...So I was trying to figure out which is going to help me most long-term. [17:51] creationix: basically you need to register as a service on whatever os you're using [17:51] boltR has joined the channel [17:52] wavded: centos will be behind in packages, what ubuntu, debian do version do that offer? [17:52] sammmy: creationix: I'm using ubuntu so upstart might be the way to go. [17:52] creationix: here is the upstart script for howtonode.org https://gist.github.com/2138666 [17:52] wavded: i started on centos and life became much easier after moving to ubuntu servers (especially with building binary addons) [17:53] dre has joined the channel [17:53] truedat101: I'm also pretty enthusiastic about the Illumos and OpenIndiana (Illumos being what you'll get with a Joyent SmartOS box). But it's tricky to get things like Mongo in package form. But if you are going to spend time tuning performance, this might be the way to go (with dtrace). [17:53] Brightstar: (Debian 6.0.0, ubuntu 10.04 [17:53] barmaley-exe has joined the channel [17:53] sammmy: creationix: where do I put the upstart script? [17:54] wavded: ok so they go by LTS release for server Ubuntu, 10.04 just got node-canvas support (libjpeg64) before I had to upgrade to 10.10, Ubuntu is releasing another LTS this April 12.04. [17:54] creationix: /etc/init [17:54] truedat101: What's more important with a distro, packages or security? Isn't centos more agressive on this front? And in your experience wavded, what was missing that you had trouble finding on centos? [17:54] sammmy: so /etc/init/howtonode.conf ? [17:54] creationix: so if it's /etc/init/howtonode.conf, then you start it with `sudo start howtonode` and stop it with `sudo stop howtonode` [17:55] creationix: the "respawn" line means to auto-restart the process if it crashes [17:55] creationix: "start on runlevel [23]" means to start up server boot [17:55] creationix: I just copy pasted the PATH variable [17:55] wavded: i'm not sure. centos claims to be more stable since its really really tested but the problem i've found is it has older packages.. so then you are dealing with finding rpms and building from source. which isn't terrible but it not fun to maintain a server like that [17:56] creationix: I think upstart env is very clean [17:56] creationix: ubuntu has more users I think [17:56] creationix: so it gets more testing [17:56] creationix: also you don't have to run the latest version [17:56] Gloorian has joined the channel [17:56] creationix: there is the lts version [17:56] creationix: currently 11.04 I think [17:56] Gloorian: Hello [17:56] creationix: also centos may have upstart too [17:57] CoverSli1e: i think 10.4 is lts [17:57] creationix: many linux variants use it [17:57] nathanielk: lts is 10.04 [17:57] Gloorian: I'm using express and ejs. Do you know a simple way to handle mutliple languages ? [17:57] Brightstar: Wow, node canvas looks interesting. Hadn't heard of it. [17:57] nathanielk: 12.04 will be next lts [17:57] wavded: we run 10.10 for our node servers [17:57] CoverSli1e: because i have 12.04 and that's lts [17:57] Swizec has joined the channel [17:57] nathanielk: CoverSli1e: oh? no pain from it being beta? [17:57] langworthy has joined the channel [17:57] creationix: I just run the latest released version [17:57] creationix: 11.10 works great [17:57] CoverSli1e: oh there's plenty of pain [17:57] creationix: I haven't had any trouble with it [17:57] wavded: creationix: do you have problems upgrading? [17:57] creationix: yeah, ubuntu betas are a pain [17:57] bartt has joined the channel [17:57] nathanielk: creationix: that has screwed me so much i'm a diehard LTS'er now. but this was back with 8.10 etc [17:58] nathanielk: i'm glad it's not painful now :) [17:58] creationix: I just reformat and when I upgrade [17:58] wavded: yeah ubuntu upgrades haven't been pretty for me I usually just take a server down and reformat [17:58] creationix: I have two ubuntu partitions on my linode [17:58] nathanielk: anyway it means new LTSs are super exciting... [17:58] creationix: so it's like 5 minutes downtime every 6 months [17:58] Gloorian: No one knows ? [17:58] wavded: archlinux as a server is interesting [17:58] tbranyen: wavded: why? [17:58] dre: Hello, is there a way to build or modify node so that it's optimized for very high throughput? I am trying to send a large number of (1500 byte) packets through a node server and it starts having a difficult time at less than 80mbps - I see packet loss and the transmission becomes very jittery (normally, the time to process a packet is close to 0ms, but with high throughput it can easily spike to 30+ms). I'm guessing this is related t [17:58] dre: o garbage collection, but I'm hoping there's a way to make it perform better. [17:58] tbranyen: wavded: my combined uptime in between reboots for the free linode stuff as been close to 3 years with arch [17:58] cameronpriest has joined the channel [17:58] wavded: cause its a rolling release, no 'big' upgrades [17:59] tbranyen: um unless you wait a long time and then its a huge upgrad e:-p [17:59] creationix: yeah, arch is nice too [17:59] barmaley-exe: Hello, can anyone tell me what does this if (https://github.com/joyent/node/blob/master/lib/readline.js#L193) is needed to? Why we don't update usedLines number if it is less than newcount? [17:59] CoverSli1e: it also means you're on the same kernel [17:59] hipsters_ has joined the channel [17:59] enos_feedler has joined the channel [17:59] creationix: ubuntu is just easier [17:59] iain_: wavded: rolling releases are not nice [17:59] wavded: wow, that's good [17:59] wavded: have you used arch iain_? [17:59] iain_: not arch, but gentoo [17:59] m00p has joined the channel [17:59] wavded: i am running archlinux on my desktop and love it [17:59] iain_: and thats a real pita these days [17:59] wavded: ahh gentoo, haven't done that [17:59] creationix: arch is much nicer on the user than gentoo [17:59] CoverSli1e: gentoo is a real pita all days [18:00] dre: I'm hoping to get 80+mbps with minimal packet loss and jitter [18:00] iain_: CoverSli1e: heh [18:00] ioscale1 has joined the channel [18:00] creationix: dre, use buffers as much as possible [18:00] creationix: dre, they live outside the js heap [18:00] creationix: just the root object is in the heap [18:00] iain_: ubuntu or plain debian is nicest. Upgrades aren't difficult unless you've installed everything under the sun and hit some kind of dependency conflict [18:00] CoverSli1e: yeah arch isn't source-based, it's more like sabayon, but without all the extra crap [18:01] SamuraiJack has joined the channel [18:01] creationix: dre, I once stored a game tilemap in 1024x1024x8bit buffer arrays [18:01] creationix: one object for every million tiles [18:01] Brightstar: Thanks guys. I'll probably go with Ubuntu just because I haven't heard any reason not to and there seems to be the tiniest reason to. [18:01] wavded: tbrayen: you didn't reboot for kernel updates? thought you had to for them to take effect? [18:01] creationix: Brightstar, if you're new, it's the easiest [18:01] creationix: Brightstar, and the server edition is super minimal [18:02] Brightstar: I'm more concerned with effectiveness than ease, but I don't mind ease when it comes along with effectiveness. [18:02] Brightstar: But thank you, creationix. (and everyone) [18:02] CoverSli1e: if you're ok with a command line go with server edition [18:02] tbranyen: wavded: only if you want the latest kernel [18:02] CoverSli1e: I'm an upgrade fiend [18:02] creationix: on linode a fresh ubuntu server instal has less than a pageful of process running [18:03] creationix: about 10 I think [18:03] maritz has joined the channel [18:03] Country has joined the channel [18:03] alessioalex has joined the channel [18:03] CoverSli1e: i run pacman -Syu every day [18:03] CoverSli1e: means stuff gets broken once in a while too [18:03] CoverSli1e: but usually fixable [18:03] dukeytoo: dre: Did you put optimized settings in sysctl.conf? [18:03] dre: creationix, I am actually seeing that the packets come in as SlowBuffers.. I tried to wrap them with a new Buffer(slowBuffer), but that didn't help... Would it help to find a way to not use SlowBuffer? [18:03] creationix: dre, what are you doing? [18:04] wavded: i run pacman everyday too, first thing on the terminal usually :) [18:04] creationix: node uses Buffer for all public APIs [18:04] dre: dukeytoo, I didn't.. are these runtime settings or is it part of the node build? [18:04] CoverSli1e: If it's larger than 8k, it's a SlowBuffer [18:04] prasak has joined the channel [18:04] creationix: js> new Buffer(10 * 1024) [18:04] purr: creationix: ReferenceError: Buffer is not defined [18:05] dukeytoo: dre: They are network settings for Linux [18:05] ThatOtherPersonY has left the channel [18:05] creationix: meh, is there a node bot in here? [18:05] CoverSli1e: nope [18:05] creationix: anyway, I get back a Buffer instance when I do that [18:05] dre: creationix, I'm making a proxy (though not the HTTP kind) that forwards UDP packets [18:05] CoverSli1e: none that expose Buffer at least [18:05] creationix: with Buffer methods [18:05] kitt has joined the channel [18:05] kitt has joined the channel [18:06] dre: dukeytoo, this needs to work for OS X at the moment and eventually Linux/Windows as well, but I'll definitely check that out [18:07] creationix: dre, use large chunks if you just want raw throughput [18:07] toxicFork: I'm thinking about making an IRC bouncer with node.js. has it been done before? any limitations against it? [18:07] TooTallNate has joined the channel [18:07] dre: creationix, so it's basically a middle man in UDP data transmission.. the goal is to get around some networking issues [18:07] creationix: os buffers are pretty large nowadays [18:08] creationix: as far as GC concerns, just create as few objects and properties as you can [18:08] creationix: closures are objects too [18:08] creationix: so avoid creating functions in loops [18:08] Gloorian has left the channel [18:08] creationix: reuse objects and arrays when possible [18:09] sammmy: creationix: upstart uses the start and stop commands? [18:09] creationix: sammmy, yep [18:09] dre: I actually ran a test on localhost with 64kb UDP packets and the throughput was great... but with 1500 byte packets (which is what I'm limited to over the internet), the performance degrades really quickly [18:09] creationix: dre, yeah, if you packets are small, there isn't much you can do about that [18:09] creationix: just optimize the other paths [18:09] pendlepa2ts has joined the channel [18:09] dre: I believe the only objects that are really created are what I get from on('message')... [18:10] creationix: dre, also, you can give luvit a try if you don't mind lua [18:10] sammmy: creationix: so if I am using bouncy (node module), I could copy your upstart script, call it bouncy.conf then use sudo start bouncy and be done with it? [18:10] creationix: it's engine (luajit) performs differently than v8 [18:10] creationix: sammmy, yep [18:10] creationix: (not sure what bouncy is though) [18:10] dre: creationix, the most recent test I ran was literally an on('message', function(msg){sock.send(msg,...)}); and it was still bogging down.. and I have an i7 [18:11] sammmy: creationix: look it up. It's a proxy script. [18:11] sammmy: creationix: I shouldn't just copy your PATH in the script? [18:11] creationix: dre, maybe dig lower into the libuv bindings [18:11] creationix: skip event emitter [18:11] creationix: but that's undocumented private API [18:11] creationix: sammmy, you want the path on your system [18:11] creationix: it won't be all the same [18:12] creationix: sammmy, just "echo $PATH" [18:12] dre: creationix: hmm yea, that sounds like what I may need.. thanks... looking at luvit now [18:12] sammmy: Okay I'll replace it with my PATH. [18:12] creationix: dre, or if you know C, use libuv directly [18:12] sammmy: However, what if I change my PATH; do I have to change my upstart script everytime I change my path? [18:12] kev_nz has joined the channel [18:12] creationix: then you don't have a GC at all [18:12] creationix: just have to manage it by hand [18:13] creationix: sammmy, yep [18:13] creationix: sammmy, I use nvm [18:13] creationix: sammmy, every time I want to upgrade the server, I have to change the nvm part of my path [18:13] sammmy: creationix: nvm? Why is it that I don't have to change the upstart script for apache servers? [18:13] ramitos has joined the channel [18:13] tilgovi has joined the channel [18:13] creationix: because dpkg upgrades apache in-place [18:13] creationix: nvm allows multiple concurrent installs of node [18:14] creationix: so if you want to use a new node install, you have to point to the new path [18:14] sammmy: I don't need multiple concurrent installs of node. [18:14] creationix: then just install node in /usr/local [18:14] ekryski has joined the channel [18:14] sammmy: I was just saying for other things where I alter my PATH [18:14] creationix: using the normal ./configure;make;make install [18:14] thisandagain has left the channel [18:14] creationix: sammmy, you only need to alter the path in the script if you want your server to see the changes [18:14] CoverSli1e: I'm personally a fan of ./configure --prefix=$HOME [18:14] creationix: sammmy, it only knows what you tell it [18:15] dre: creationix, I was using node to get away from C for the sake of simplicity, but once my actual algorithm is implemented, it looks like I'll need to just put this into multithreaded C code.. that's just a very slow way to develop... Hopefully a module that directly uses libuv will suffice for this development phase [18:15] sammmy: creationix: I see. But couldn't I do something like env PATH=$PATH or something? [18:15] creationix: dre, libuv isn't multi-threaded [18:15] creationix: dre, and there is node.native [18:15] creationix: C++ with callbacks [18:15] sammmy: Also, why is apache2 stored in init.d? [18:15] creationix: sammmy, that's the old system [18:15] dre: yea, I meant rewrite my entire application in C [18:15] kevwil has joined the channel [18:16] sammmy: creationix: init.d is the old way of doing things? [18:16] creationix: dre, the easiest probably is to use node private APIs [18:16] `3rdEden has joined the channel [18:16] creationix: sammmy, right, that's before the new upstart [18:16] creationix: not all services have updated [18:16] dre: creationix... wow these are really helpful, thanks a lot! [18:16] ryan_stevens has joined the channel [18:16] level09 has joined the channel [18:16] sammmy: creationix: the new upstart seems pretty simple. ;P [18:17] sammmy: What's the runlevel for in your upstart script? [18:17] mraxilus_ has joined the channel [18:17] sadjow has left the channel [18:17] ekryski: Does anyone have any suggestions for handling redis failover for session stores? [18:17] ekryski: We've got a master on one server and then the slave on another. [18:18] jimmysparkle has joined the channel [18:18] trivol has joined the channel [18:18] rt7 has joined the channel [18:18] sammmy: also, what's the difference between > and 2>>? [18:18] qbert_: 2 is stderr I belive [18:19] mattgifford has joined the channel [18:19] creationix: sammmy, > access.log means to write stdout to access.log [18:19] khrome has joined the channel [18:19] creationix: sammmy, 2>> error.log means to append stderr to error.log [18:19] creationix: that's not upstart, but shell [18:20] sammmy: I assumed it was shell. [18:20] sammmy: But, I wasn't familiar with 2>> [18:20] creationix: >> is append [18:20] purr: creationix: SyntaxError: Unexpected identifier [18:20] PElshoff has joined the channel [18:20] creationix: > is save [18:20] alessioalex: hey guys [18:20] alessioalex: how do I check for global packs with npm? [18:20] alessioalex: npm ls ... ? what..? [18:20] sammmy: creationix: save is obvious, what's append? [18:20] creationix: it doesn't delete the file when you restart your server [18:20] fangel has joined the channel [18:20] sammmy: oh and what's the 2 for, do I need it? [18:20] rlidwka: "> is overwrite that file", ">> is append to it" [18:20] creationix: 2 is for stderr [18:20] creationix: default is stdout [18:20] sammmy: I see. [18:21] cerebros: creationix: stumbled into your node-webgl project the other day [18:21] cerebros: awesome job man [18:21] sammmy: what other codes are there? [18:21] WarheadsSE has joined the channel [18:21] cerebros: creationix: thanks for extending node [18:21] creationix: sammmy, there are a ton, the others I use all the time are | and < [18:21] creationix: cerebros, :) [18:21] cerebros: 5 stars cross the board [18:22] creationix: cerebros, what are you using it for? [18:22] sammmy: creationix: I mean the other codes for > and >>; the code 2 is for stderr, what other codes for other stds are there? [18:22] cerebros: creationix: i haven't spent much time with webgl, mostly exploring that [18:23] creationix: sammmy, 1 for stdout [18:23] cerebros: creationix: it would make multiplayer validation sooo nice tho [18:23] sammmy: creationix: Is there only two codes, 1 and 2? [18:23] creationix: processes only have two output streams [18:23] toxicFork: and that's why you don't use integers instead of strings, kids [18:24] arcil has joined the channel [18:24] cerebros: creationix: you had a chance to make anything with it other than the nko demo? [18:24] barmaley-exe: Does node.js participate in GSoC 2012? [18:25] AdamGoodrich has joined the channel [18:25] hackband has joined the channel [18:25] creationix: cerebros, no, I was going to make a webos game platform [18:25] galaxywatcher has joined the channel [18:25] creationix: cerebros, but hp canceled the touchpads [18:26] creationix: cerebros, and luvit is better suited for that kind of app [18:26] creationix: it can ffi opengl [18:26] kmurph79 has joined the channel [18:26] sammmy: creationix: Okay. I didn't know that, but now I do. Thanks for answersing my questions about shell scripts, even though it's not on topic. :) [18:27] redir has joined the channel [18:27] creationix: sammmy, no problem, working on node has taught me a ton about operating systems and networking [18:27] Swizec has joined the channel [18:27] creationix: I like how node is so close to the metal [18:27] WarheadsSE: is gyp a pain in the ass for everyone on Arm ? [18:27] WarheadsSE: "[ [18:27] sammmy: creationix: I'm having the same experience; rapid learning with linux. [18:28] TooTallNate: WarheadsSE: i think the master branch needs some tweaks for arm [18:28] creationix: WarheadsSE, any more pain than waf was? [18:28] TooTallNate: WarheadsSE: what are you experiencing? [18:28] TooTallNate: creationix: i think just a couple missing gyp variables [18:28] sammmy: I can't seem to run my daemon though, everytime I do sudo start bouncy, I get a message saying "bouncy start/running, process 9553", but when I run sudo initclt list I get a list with "bouncy stop/waiting". What gives? [18:28] WarheadsSE: Well I stopped having to patch waf after moving v8 to shared. [18:28] creationix: sammmy, probably crashing on start [18:28] WarheadsSE: gyp keeps liking to think I am building for ia32.. [18:28] TooTallNate: creationix: WarheadsSE: i got really close to compiling node v0.7.6 on my iPhone the other night [18:28] sammmy: creationix: what do you mean by caching? [18:29] creationix: sammmy, try running your server manually and see if it errors [18:29] TooTallNate: WarheadsSE: can you show me your config.gypi file? [18:29] WarheadsSE: 1 sec.. [18:29] sammmy: creationix: try running just the command in the shell script? [18:29] TooTallNate: WarheadsSE: and youre trying to compile node itself right? [18:29] iangreen_ has joined the channel [18:29] creationix: sammmy, gist your conf file [18:29] WarheadsSE: yes, arch: community/nodejs [18:29] WarheadsSE: 0.6.13 [18:29] jkridner has joined the channel [18:29] WarheadsSE: its done with waf, just seeing about moving to gyp, since it supports distcc [18:30] yawNO has joined the channel [18:30] sammmy: creationix: https://gist.github.com/2139339 Could it be that I need to sudo bouncy within the exec directive? [18:30] creationix: WarheadsSE, arch arm :) I can't wait till my raspberry pi gets here [18:30] cerebros: creationix: didn't know about luvit. need to read more, but sounds cool [18:30] WarheadsSE: http://pastie.org/private/dgamhe6mn8ks1o3ugpj9g [18:30] sammmy: ACTION uses the term directive loosely [18:30] TooTallNate: creationix: did you get one!!! [18:30] yawNO: yo! [18:31] cerebros: creationix: i can imagine it'd go nicely with redis' new lua scripting features [18:31] WarheadsSE: gah.. i see it. [18:31] creationix: sammmy, what does `which bouncy` output [18:31] jsurfer has joined the channel [18:31] WarheadsSE: despite ./configure-gyp and --dest-cpu=arm it spit out ia32 for host & dest! [18:31] creationix: TooTallNate, they are avaiable for preorder, but have months delay in shipping [18:31] creationix: mine gets here in May [18:31] nikdo has joined the channel [18:31] sammmy: creationix: sorry? [18:31] creationix: sammmy, on your shell type "which bouncy" [18:31] TooTallNate: creationix: but you paid for one already? [18:32] WarheadsSE: ACTION need to get lunch [18:32] TooTallNate: WarheadsSE: oh [18:32] TooTallNate: WarheadsSE: you should try master branch [18:32] creationix: TooTallNate, I think I did, it didn't charge shipping or tax and I don't think I've seen the charge on my card yet [18:32] sammmy: creationix: I don't see that. What line is that? [18:32] creationix: sammmy, no, on your bash shell, not in the script [18:32] TooTallNate: creationix: from where? [18:32] isao has joined the channel [18:32] creationix: TooTallNate, I think it was element14 [18:32] sammmy: creationix: Eh.. when did I say that? :P [18:33] TooTallNate: creationix: thanks! [18:33] tmcw has joined the channel [18:33] creationix: TooTallNate, look at the right on http://www.raspberrypi.org/, RS, element14 and some other [18:33] sammmy: oh. [18:33] TooTallNate: i'm on the email list for RS, but have no clue if they ship to US [18:33] sammmy: sorry. I understand. My bad. [18:33] creationix: TooTallNate, yes, I remember now, it was http://www.newark.com/ (redirected from element14) [18:34] sammmy: ACTION is being stupid [18:34] creationix: newark is us [18:34] sammmy: /usr/bin/bouncy [18:34] creationix: sammmy, hmm [18:34] creationix: sammmy, do `cd /home/sam/apps/` and `sudo su` [18:35] sammmy: are you thinking that the conf isn't finding the bouncy command in the PATH is set? [18:35] creationix: sammmy, I don't know why it's not working [18:35] creationix: sammmy, and then do `PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games bouncy routes.json 80 > boundy-access.log 2>> boundy-error.log` [18:35] sammmy: I know that I need to do sudo bouncy routes.json 80 so I changed my shell script. Let me update the gist. [18:36] creationix: upstart runs as root unless you tell it otherwise [18:36] nikdo has joined the channel [18:36] sammmy: creationix: so I wouldn't need to do this: https://gist.github.com/2139339 [18:36] creationix: no [18:37] insin has joined the channel [18:37] creationix: maybe bouncy needs some other env variables [18:37] creationix: HOME perhaps? [18:37] candybar has joined the channel [18:37] candybar has joined the channel [18:37] jetienne has joined the channel [18:38] sammmy: creationix: I did command you said, and it looks like bouncy is running. [18:38] bindr has joined the channel [18:38] sammmy: creationix: how would I know if it does need another env var? [18:38] adrianF has joined the channel [18:39] cedeon has joined the channel [18:39] eliocapella: there is a user file to define npm properties at ~/.npmrc [18:39] eliocapella: can I have a .npmrc for an specific project? [18:40] sammmy: creationix: what does the respawn and start on runlevel [23] commands do? [18:41] creationix: sammmy, http://upstart.ubuntu.com/wiki/Stanzas [18:41] creationix: sammmy, basically restart on crash and server reboot [18:41] rmttnmd_ has joined the channel [18:42] pgte has joined the channel [18:42] pokoli has joined the channel [18:42] githogori has joined the channel [18:42] pickels has joined the channel [18:43] sammmy: creationix: where do I find all the even names for start on? And where is the 23 arg passed to? [18:43] sammmy: creationix: maybe that's too many questions. [18:43] al3xnull has joined the channel [18:43] jimmyrcom has joined the channel [18:43] kitt has joined the channel [18:43] sammmy: creationix: I think I should just focus on getting this shell script to work rather than learning how it all works right now. ;P [18:44] creationix: 23 is runlevels 2 and 3 [18:44] robi42 has joined the channel [18:45] bizniz98 has joined the channel [18:45] admc has joined the channel [18:46] sammmy: creationix: what are runlevels? [18:46] sammmy: Is there a way to see if my shell script command on line 10 is erroring? [18:46] crescendo has joined the channel [18:47] jimmyrcom: when the browser closes a websocket it sends op code 8 with len 0, but there's 4 bytes afterwards, does anyone know what they are? [18:48] zzzpzzzz has joined the channel [18:48] isaacs: eliocapella: you can put a "config" option in your package.json file, and then define pkgname:foo=bar in ~/.npmrc [18:48] SoapyIllusions has joined the channel [18:48] isaacs: eliocapella: but no, there's no config file per project. [18:49] artusrocha has joined the channel [18:49] hotchkiss has joined the channel [18:49] ajackbot has joined the channel [18:52] argami has joined the channel [18:53] yaymukund: I'm running into a situation where a single test works but running all my mocha tests fails. very odd. [18:53] nikdo has joined the channel [18:54] hotchkiss: yaymukund: use vows, not that you asked but i figured i'd be nosey [18:54] pgte has joined the channel [18:55] sammmy: creationix: "bouncy start/running, process 9801" and then I do ps -AF and I don't see a pid 9801 [18:55] FACEFOX has joined the channel [18:56] iangreenleaf has joined the channel [18:57] soapyillusions has joined the channel [18:58] nikdo has joined the channel [18:59] tornad has joined the channel [19:00] creationix: sammmy, that usually means it crashed [19:00] devongovett has joined the channel [19:00] creationix: sammmy, I'll get that if there is a syntax error in my js for example [19:01] barmaley-exe has joined the channel [19:01] `3rdEden: isaacs is any reason why you wouldn't want to support <> in the hash tags? [19:01] isaacs: `3rdEden: [19:02] isaacs: `3rdEden: the < and > chars are traditionally used to delimit urls, and according to the RFCs, must not be allowed in urls. [19:02] Poetro has joined the channel [19:02] isaacs: `3rdEden: they're only allowed by escaping them [19:02] tuhoojabotti: Yeah [19:02] tuhoojabotti: stupid rfcs [19:02] tuhoojabotti: ":D" [19:02] ioscale has joined the channel [19:02] sammmy: creationix: would the error logs not be empty though? [19:02] creationix: sammmy, dunno [19:03] creationix: maybe syslog has something [19:03] creationix: sammmy, I'm not an upstart expert, I just use it [19:03] sammmy: where's syslog? [19:03] `3rdEden: isaacs ok, I was just wondering why as chrome handles it just fine [19:03] sammmy: haha, I know. Thanks for all your help though in trying to figure out what might be causing this. [19:03] creationix: /var/log/syslog, but looking at it, I don't think that's it [19:04] khrome has joined the channel [19:04] arduix has joined the channel [19:04] tuhoojabotti: `3rdEden: Chrome handles lots of stuff stupid people feed it. :P [19:04] Martin_____ has joined the channel [19:04] tuhoojabotti: And I'm not saying you're stupid [19:04] `3rdEden: tuhoojabotti i'm not stupid, just lazy ;) [19:05] tuhoojabotti: like typing http:/lol.com works [19:05] tuhoojabotti: anyways, good night [19:05] staar2 has joined the channel [19:06] Spion has joined the channel [19:07] fatjonny has joined the channel [19:08] perezd_ has joined the channel [19:08] isaacs: `3rdEden: yeah, web browsers *know* that everything you typed into it is a url, and these days they all escape everything [19:10] coderarity: is 0.8 is going to be the last stable release series before 1.0? [19:10] czzarr has joined the channel [19:10] hotchkiss: yes [19:10] AvianFlu: coderarity, not necessarily [19:11] rlidwka: when 0.8 is going to be released? [19:11] tmcw has joined the channel [19:11] briancray has joined the channel [19:11] coderarity: rlidwka: when it's done [19:12] CoverSli1e: it could be v0.10 [19:12] coderarity: CoverSli1e: yeah, good point [19:13] rlidwka: hmmm... programs are never done. There is always one more bug, remember? :) [19:13] coderarity: rlidwka: still implementing a lot of features, actually [19:13] coderarity: rlidwka: you can watch stuff in the mailing list and on the node-blog [19:14] rlidwka: github, irc, mailing list, blog... that's too much stuff to watch :( [19:14] coderarity: rlidwka: mailing list and blog aren't that frequent [19:14] pizthewiz has joined the channel [19:15] snearch has joined the channel [19:17] springmeyer_ has joined the channel [19:17] eliocapella: what's the correct way of handling properties per package? [19:17] tvw has joined the channel [19:18] eliocapella: for example database URLs for Development and Production enviroments [19:18] eliocapella: ? [19:18] Maxani has joined the channel [19:18] rlidwka: eliocapella: if you're using "npm start" you might want to look "config" options there [19:19] eliocapella: rlidwka, yeah but that properties are defined by user [19:19] jetienne has joined the channel [19:20] hotchkiss has left the channel [19:20] eliocapella: then I would have a user for each environment [19:20] rlidwka: i'm using "config.js" file with something like "module.exports = {...}" and just require it anywhere [19:20] eliocapella: yeah that was my first approach [19:20] eliocapella: then I tried the npm config [19:21] Phoenixz has joined the channel [19:21] bindr_ has joined the channel [19:21] tilgovi_ has joined the channel [19:21] eliocapella: I think I will define a config.json file with the properties for each environment [19:21] eliocapella: a put that file on the project root [19:22] rlidwka: do you need to update it on-the-fly? [19:23] lmorchard has joined the channel [19:23] arduix has joined the channel [19:23] eliocapella: rlidwka, not really [19:23] eliocapella: but I do want different properties for TEST environments, DEVELOPMENT, PRODUCTION [19:23] eliocapella: etc. [19:24] Phoenixz: Question.. I use an object that extends events object, so it can have event listeners.. Now, I have a "destroy" even that emits once an object will be destroyed so that in all list objects where it is registered, it can be deleted. My question now is: As I understand it, I have to remove all event listeners before removing the last reference to that object, or I will get memory leaks.. Now, imagine this object A is registered in 3 diferent list [19:24] Phoenixz: objects.. Once it fires a "destroy" event, these 3 different list objects will get the "destroy" event, and remove it from the list.. Problem is, how can I remove "all" event listeners? If I remove all listeners once the first object gets the event, the other objects will no longer receive that event, right? How would I go about this? [19:24] gr4yscale has joined the channel [19:24] bradleyg has joined the channel [19:25] chrisinajar has joined the channel [19:25] WarheadsSE: TooTallNate: We try to always build right from releases and 0.6.13 was the last stable [19:25] swmdotcc has joined the channel [19:26] fresham_afk has joined the channel [19:26] cha0s has joined the channel [19:26] cha0s has joined the channel [19:27] Vainoharhainen has joined the channel [19:28] hcchien has joined the channel [19:29] spion has joined the channel [19:29] Wizek has joined the channel [19:30] reed_ has joined the channel [19:30] kcf has joined the channel [19:30] Gateway69 has joined the channel [19:31] Gateway69: can anyone recommend the best method of installing hte latest node.js on ubuntu 10.04 lts server, i have seen a few blogs but they are all over the map [19:31] kcf has joined the channel [19:31] Gateway69: was looking at this one.. http://www.lancejian.com/2012/03/12/install-nodejs-in-ubuntu-1004.html [19:32] WarheadsSE: TooTallNate: I do see that the detection code in gyp is 90x better in master. [19:32] jj0hns0n has joined the channel [19:32] WarheadsSE: there should be a ppa somewhere.. [19:33] bradleyg_ has joined the channel [19:33] awaage: Gateway69: this is what I did http://qugstart.com/blog/node-js/how-to-install-node-js-on-ubuntu-and-create-an-app-in-5-minutes/ [19:33] ryan_stevens1 has joined the channel [19:34] klaemo has joined the channel [19:37] Destos has joined the channel [19:37] joshsmith has joined the channel [19:38] jacobolus has joined the channel [19:38] ccare has joined the channel [19:39] felixge: bnoordhuis: ping [19:39] qbert_: god why haven't I been using deferreds before now [19:39] qbert_: sheeshus [19:39] RLa: deferreds? [19:40] Gateway69: awaage thanks [19:40] brianleroux has joined the channel [19:40] qbert_: well, chaining callbacks, client.doSomething().success(function () {}).failure(function () {} ); [19:40] bindr has joined the channel [19:41] Gateway69: awaage: did you install it in /opt ? [19:41] bartt has joined the channel [19:42] Maxani has joined the channel [19:43] jj0hns0n has joined the channel [19:43] RLa: qbert_, they look like promises [19:43] RLa: but yeah, i think lot of browser stuff uses code like that [19:44] hh__: isn't the technical term cascading :p [19:44] awaage: Gateway69: Nope, those are the exact commands I used. It installs node to /usr/local/bin [19:44] WarheadsSE: jQuery does all over the place [19:44] Gateway69: awaage thanks [19:45] eliocapella: Gateway69, the typical ./configure, make, sudo make install works like a charm for nodejs [19:45] lperrin has joined the channel [19:46] Gateway69: thanks.. giving it a go, then going to see how node.js and drupal work together :) [19:46] hh__: huh [19:46] WarheadsSE: oy [19:46] hh__: how do they work together? [19:47] carlyle has joined the channel [19:47] timoxley has joined the channel [19:48] Gateway69: drupal has a module/api that allows it to talk to node.js for real time stuff [19:48] shinuza has joined the channel [19:48] Gateway69: http://drupal.org/project/nodejs and a group around it thats pushing forward with it http://groups.drupal.org/node-js [19:49] whitman has joined the channel [19:50] reed_ has joined the channel [19:50] timoxley has joined the channel [19:51] timoxley: I want to intercept and verify the contents of POST. What would you do? [19:51] timoxley: (for a test suite) [19:51] WarheadsSE: TooTallNate: welp, staying with waf for now :/ [19:51] Gateway69: awaage, hmm this no work git clone http://github.com/isaacs/npm.git [19:52] Gateway69: never mind might of caught it during a github hickup [19:52] awaage: Gateway69: yup works for me ! [19:53] WarheadsSE: TooTallNate: for your review : http://pastie.org/private/z7mrp9aulhoreyknbbig [19:53] sammmy: creationix: do you think I need to run `reboot` on my server to have the runlevel event emitted? [19:53] Gateway69: does node.js get run on reboot .. to make sure its always running [19:54] dtrejo has joined the channel [19:54] CoverSli1e: not on its own [19:54] creationix: sammmy, yes, but shouldn't need it for testing [19:54] creationix: manually running start is the same [19:55] qbert_: whats the best way for file uploads using express ? [19:55] CoverSli1e: you'd have to get your os to run it on startup [19:55] kraft has joined the channel [19:55] sammmy: creationix: start is the same as rebooting? [19:55] creationix: right, meaning both start your service [19:55] creationix: with the config I gave [19:55] sammmy: do I have to run `start bouncy` everytime I change the conf (I have been, just don't know if it's necessary) [19:56] markwubben has joined the channel [19:56] creationix: sammmy, if it's running, you'll have to `sudo stop bouncy;sudo start bouncy` to reload the config [19:56] creationix: but stop it only if it's running [19:56] Gateway69: put something in rc.d nodejs start etc [19:57] pt_tr has joined the channel [19:57] ank has joined the channel [19:58] bkaney has joined the channel [19:58] muddo has left the channel [19:59] sammmy: creationix: I can't sudo stop bouncy, everytime I do so, I get an error: "stop: Unknown instance:" [19:59] reed_ has joined the channel [20:00] bindr has joined the channel [20:00] wavded: sammmy: means it was never started in the first place, or it started and bombed out [20:00] sammmy: wavded: Yeah. But idk why it ever bombed out. It's not sending any logs to the error logs I 2>> to [20:00] Gateway69: ok this is odd, how can i get my user netcom to be able to work with the node js with out sudo .. i know ubuntu question but if anyone knows off hand [20:01] creationix: sammmy, right, that means it never started successfully [20:01] sammmy: creationix: I see. So I wonder why it's not starting successfully? [20:01] creationix: dunno [20:01] mehlah has joined the channel [20:02] creationix: sammmy, try a simpler node process [20:02] sammmy: I know that when I run start bouncy I get this message "bouncy start/running, process 11571" [20:02] creationix: ahh, bouncy daemonizes itself? [20:02] creationix: that changes things [20:02] creationix: nevermind, that's the upstart output [20:02] WarheadsSE: creationix: any hits as to my problems ? [20:02] sammmy: creationix: yeah I don't think it daemonizes itself. [20:03] sammmy: check this out: https://gist.github.com/2140663 [20:03] wavded: it doesnt [20:03] devaholic has joined the channel [20:03] sammmy: I run that with start myupstart and it does the exact same thing [20:03] sammmy: It has nothing to do with bouncy [20:03] kitt has joined the channel [20:03] wavded: what happens when you run bouncy command with your routes.json file (or however you have it configured) [20:03] sammmy: It doesn't even print "Hello" to bouncy-access.log [20:03] sammmy: bouncy-access.log doesn't even exist. [20:03] sammmy: wavded: everything works smoothly [20:03] creationix: sammmy, that's because "hello" isn't a valid command [20:03] wavded: sammy are you using full paths in your init config [20:04] boltR has joined the channel [20:04] maritz has joined the channel [20:04] sammmy: wavded: I can even nohup the command (which is what I've been doing, but that's unreliable) [20:04] creationix: wavded, we're setting PATH [20:04] wavded: oh ok [20:04] maritz: anyone wanna have a free brain tumor? try this: Function.prototype.call.apply(Function.prototype.bind, [function(){}]) [20:04] sammmy: look at this https://gist.github.com/2140663 [20:04] creationix: WarheadsSE, sorry, I don't know gyp very well [20:04] WarheadsSE: np [20:04] WarheadsSE: jsut checking [20:04] WarheadsSE: that's going to be an annoying hurdle for v7, [20:04] sammmy: that doesn't even output "Hello" to the log file [20:04] WarheadsSE: *v0.7.x [20:04] PinguinDude has joined the channel [20:05] creationix: sammmy, that's because "hello" isn't a command [20:05] sammmy: creationix: I see. so I'll use `echo "Hello"` and see if that works? [20:06] wavded: yeah creationix is right, you are trying to run the "hello" command [20:06] creationix: sammmy, try "exec node -e "setInterval(console.log, 1000)"" [20:06] PinguinDude: Hey all, short and quick question. I've found the libraries Bogart and Express. Both seeming to serve the same purpose. They talk about Routing but all force upon using a templating engine. Bogart using Mustache, Express using Jade. I find there is quite a lack of documentation for starting from the ground up. Where do I start if I want to get a basic HTTP server up and running that is secure and what not? [20:06] creationix: PinguinDude, how basic? [20:06] benvie: Array.apply(null, Array(32)).map(Function.call.bind(Number)).map(Math.pow.bind(null, 2)) [20:06] creationix: PinguinDude, and what's "secure" [20:06] yogig has joined the channel [20:07] sammmy: creationix: put that in place of the other command in my shell script? [20:07] PinguinDude: creationix: I want to be able to use Socket.io with it, and be able to serve files on certain "routes" so to speak. It's so basic yet I can't seem to find this. [20:07] PinguinDude: creationix: Also Bogart basically serves my needs but I can't set the root path of the Mustache engine where it to look for my views. [20:07] benvie: kind of a sad state of affairs when there's no js bit in the node channel [20:07] benvie: js bot [20:07] kukkelundin has joined the channel [20:07] creationix: > Array.apply(null, Array(32)).map(Function.call.bind(Number)).map(Math.pow.bind(null, 2)) [20:08] creationix: hmm, there was a bot [20:08] creationix: > "Hello" [20:08] mmalecki: .. "Hello" [20:08] creationix: lol [20:08] benvie: the bots have moved on, tired of humans [20:08] nathanielk: bot is silent [20:08] mmalecki: v8> "hello" [20:08] purr: mmalecki: (string) 'hello' [20:08] mmalecki: creationix: ^ [20:08] benvie: vb> Array.apply(null, Array(32)).map(Function.call.bind(Number)).map(Math.pow.bind(null, 2)) [20:08] benvie: v8> Array.apply(null, Array(32)).map(Function.call.bind(Number)).map(Math.pow.bind(null, 2)) [20:08] purr: benvie: (object) [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648] [20:08] benvie: man [20:08] benvie: v8 is hard to type [20:08] mmalecki: you wanted visualbasic, didn't you? [20:09] benvie: that was a long time ago [20:09] cjlicata has joined the channel [20:09] creationix: PinguinDude, express doesn't require jade [20:09] robi42 has joined the channel [20:09] creationix: PinguinDude, or just use Connect [20:09] brianleroux has joined the channel [20:09] sammmy: creationix: I removed the cd command above and now this works: https://gist.github.com/2140663 [20:09] PinguinDude: creationix: I read that Connect is really slow due to its implementation, despite that I am no expert at these subjects yet. [20:09] creationix: PinguinDude, where did you read that? [20:09] PinguinDude: I come from a 10 year programming background, with javascript included. But Node and like are new to me. [20:09] PinguinDude: creationix: Good question indeed. [20:10] creationix: PinguinDude, (btw I wrote the original connect and there was such an article early on that was way misleading) [20:10] PinguinDude: creationix: I read this on a JSGI blog, so honestly, feel free to fill me in on the truths :) [20:10] creationix: sammmy, does bouncy support absolute paths for the json? [20:10] PinguinDude: I'm here to learn after all ;) [20:10] sammmy: creationix: I believe it does. I might just do that instead of cd [20:10] cjlicata has joined the channel [20:11] creationix: PinguinDude, yes, that one. it's true that jsgi dispatching is like 1000 times faster than connect's dispatcher [20:11] creationix: PinguinDude, but that means nothing [20:11] sammmy: creationix: also, afaik exec is used instead of script...end script, and visa versa, so idk why you used exec and script...end script in the first place? [20:11] creationix: sammmy, not sure, it's a few years old, upstart has evolved [20:12] creationix: PinguinDude, dispath is 0.001% of the overall cost [20:12] WeeJeWel has joined the channel [20:12] sammmy: creationix: you don't use upstart? [20:12] creationix: sammmy, I do [20:12] creationix: and it's ubuntu 11.10 [20:12] WeeJeWel: What's the best way to get the result body of a remote webpage (like file_get_contents) in nodejs? [20:12] PinguinDude: creationix: I see, then the guy was probably just nitpicking on his blog. [20:13] creationix: PinguinDude, anyway, connect has been rewritten since then anyway [20:13] creationix: connect 2.0 is a lot like express, but with less opinion [20:13] sammmy: creationix: I'm on ubuntu 10.10 [20:13] sammmy: I think [20:13] sammmy: how do I check version again? [20:13] creationix: sammmy, ahh, you might have an older upstart [20:13] PinguinDude: creationix: So, I have the feeling you're the right man for answering this. Considering I am experienced at programming and client side JS. What do I need to get up and running if I want to be able to fetch /somePage/someAction/someID/ requests and react to that? [20:13] toxicFork: WeeJeWel afaik http.request() should do it but not sure [20:13] PinguinDude: I already messed around with Node and Socket.io and wrote a chat etc, so all that is fine as well. [20:13] sammmy: creationix: that's probably it. [20:13] PinguinDude: I'm just having a hard time with google I guess [20:14] WeeJeWel: ok thx toxicFork [20:14] toxicFork: i JUST STARTED using njs so i'm very likely to be wrong WeeJeWel [20:14] Gateway69: any reason when i do console.log('hello world); it spits out hello world and then under it undefined ? [20:14] creationix: sammmy, cat /etc/issue [20:14] toxicFork: Gateway69, forgot a ' ? [20:14] benvie: so I made this work in the browser now and it's really cool https://github.com/Benvie/reified [20:14] Gateway69: > console.log('hellow world'); [20:14] Gateway69: hellow world [20:14] Gateway69: undefined [20:15] creationix: PinguinDude, express or connect routes would be easiest [20:15] creationix: (it's the same really, express uses connect internally) [20:15] toxicFork: > 3 + 5; [20:15] rlidwka: Gateway69: the result of function console.log() is always undefined [20:15] larsschenk1 has joined the channel [20:15] sammmy: yup it's 10.10 [20:15] nicholas_ has joined the channel [20:15] sammmy: So, what do I do? [20:15] sammmy: Update my OS? :\ [20:15] creationix: use syntax that works [20:15] sammmy: How do I know what syntax works for this version? [20:15] Gateway69: ok [20:16] pors has joined the channel [20:16] creationix: sammmy, your last gist without the cd worked [20:16] creationix: don't use cd [20:16] PinguinDude: creationix: Yeah so from what I gather, connect is a basic framework which makes working with HTTP requests a breeze. Express goes even further than this and from what I gathered tries to be a real website framework. [20:16] creationix: connect is a plugin system for http middleware layers [20:16] creationix: express is a framework with opionions using connect [20:16] sammmy: creationix: true. But then when I use bouncy with the > and 2>> it doesn't work. Maybe I should try removing thouse [20:16] creationix: like rack and sinatra in ruby [20:17] creationix: I don't know what bouncy does or expects, might be something there [20:18] creationix: PinguinDude, also there is an express mailing list and I think irc channel [20:18] creationix: I don't use express or connect these days [20:18] PinguinDude: creationix: What do you use these days? Or are you out of the whole JS business? [20:18] creationix: I help people get started with node while experimenting with new projects [20:18] sammmy: creationix: GOT IT!!! FINALLY!! XDDD [20:18] creationix: my latest are libuv ports to other scripting langauges [20:18] PinguinDude: creationix: I like your style :-) [20:19] creationix: libuv + luajit, libuv + spidermonkey, libuv + candor [20:19] creationix: sammmy, :) [20:19] sammmy: god damnit [20:19] sammmy: ACTION is relieved [20:19] redir has joined the channel [20:19] yawNO: creationix: luvit looks pretty cool [20:19] creationix: sammmy, sorry my upstart script wasn't portable [20:19] yawNO: i hope its community grows :D [20:19] sammmy: creationix: I don't thinnk the > was doing anything in this version because it never printed error logs [20:20] PinguinDude: creationix: are you on here a lot? And may I ask what timezone you're in? I've had bad experiences with Javascript and IRC channels. Most were empty and not very useful :P [20:20] creationix: yawNO, it's growing slowly, I wish I had more time for it [20:20] sammmy: creationix: I'm just glad it's working now. [20:20] yawNO: im not sure if i like lua or not actually [20:20] sammmy: creationix: however, is there a way to migrate my server to a newer OS so that what I don't run into these problems? [20:20] creationix: PinguinDude, I'm on a lot, but most days I'm not able to help out in this channel [20:20] yawNO: it has some intriguing features but some parts i love bout js are missing [20:20] creationix: sammmy, that's old enough, it might be easiest to reinstall [20:20] PinguinDude: yawNO: Lua has a nice syntax compared to most languages in my opinion. [20:21] creationix: sammmy, but you can try the ubuntu upgrade path [20:21] myndzi: is there a function handy to convert an integer to an dotted-quad string and the reverse? [20:21] PinguinDude: creationix: that's cool, I like to get accustomed to people when joining a channel :) [20:21] creationix: google for instructions, it's different with each version [20:21] gkatsev: PinguinDude: this channel is cool. very helpful. [20:21] PinguinDude: So far it doesn't feel like #C++ haha ;-) [20:21] gkatsev: though, yes, slow, sometimes [20:21] sammmy: creationix: I'll have to look into it later. I need to do some Node.js now. >_< [20:22] gkatsev: PinguinDude: is that better or worse than ##c? [20:22] akiva_ has joined the channel [20:22] PinguinDude: I've never spent time in there, but in #C++ things are tight. [20:22] creationix: node.js = ES5 (V8), luvmonkey = JS1.8.5 (SpiderMonkey) luvit= lua5.1 (luajit), candor.io = candor (candor) [20:22] PinguinDude: creationix: I believe I ran into luvit on google before :) [20:22] gkatsev: PinguinDude: heh, haven't heard muh about #C++ but ##c is hardcore [20:23] yawNO: PinguinDude: if i dont like lua i dont see the point in switching from node to luvit [20:23] yawNO: :D [20:23] argami has joined the channel [20:23] creationix: yawNO, the languages are close enough, don't base a decision on that [20:24] chrisinajar: so hypothetically, how does one get packages into npm? is there a list of requirements somewhere? [20:24] creationix: node is much more mature and has a huge community, luvit is lean and fast [20:24] RLa: lua seems to have even weirder ways to define classes than javascript [20:24] PinguinDude: yawNO: from my experiences with JS and Lua, which are pretty limited compared to my other language experiences. JS and Lua are really similar. [20:24] creationix: chrisinajar, just `npm publish` [20:24] awaage has joined the channel [20:24] yawNO: creationix: i usually base my choice on what is more fun touse [20:24] yawNO: :D [20:24] jomoho has joined the channel [20:25] yawNO: so i cant speak of lua, because i havent tried it yet [20:25] larsschenk1 has left the channel [20:25] bizniz98 has joined the channel [20:25] PinguinDude: I only bothered with it when trying to implement it (Gamedev coder here, doing webdev for the $$$, and just recently figuring out a game idea with it) [20:25] arcil has joined the channel [20:26] fangel has joined the channel [20:26] creationix: PinguinDude, luvit is perfect for networked games [20:26] chrisinajar: PinguinDude: (gamedev remark) you may be interested in my opengl node engine. it uses jQuery as the graphics API. it's not done but it works right now.. [20:26] creationix: node is probably better for webservers [20:26] PinguinDude: Now you two owe me some explaining here [20:26] PinguinDude: haha [20:27] creationix: jquery + opengl [20:27] creationix: now that's interesting [20:27] PinguinDude: chrisinajar: I am an OpenGL lover ;-) [20:27] rlidwka: are you talking about webgl? [20:27] creationix: webgl in node is easy enough [20:27] creationix: just bind opengl es 2.0 to js [20:27] chrisinajar: no, it's a direct binding to openGL, which i then use purely in JS to implement a fake DOM which i then wrap jQuery with [20:27] Prudhvi has joined the channel [20:27] sammmy: creationix: it seems like my version doesn't support local paths, because the error logs were being placed at / the whole time.. [20:27] creationix: how does a dom map to opengl? [20:27] yaymukund: :q [20:28] chrisinajar: the result is jQuery working against an opengl window [20:28] chrisinajar: https://github.com/chrisinajar/jarsmith [20:28] Prudhvi: Hi, what is the recommended sqlite module for nodejs? [20:28] broofa_ has joined the channel [20:28] creationix: sammmy, yep, the cd wasn't working [20:28] creationix: chdir maybe? [20:28] chrisinajar: i've been spending like 2 weeks trying to get it to compile in windows though [20:28] chrisinajar: i'm really really really bad at windows [20:28] sammmy: creationix: why would it be chdir? [20:28] creationix: that's what the upstart docs say [20:28] creationix: I don't know where I got cd from [20:28] creationix: chdir outside the script block [20:29] PinguinDude: chrisinajar: so basically you got a js engine, similar to node for example, except it allows you to use OpenGL in a jquery fashion? [20:29] rlidwka: omg... [20:29] chrisinajar: PinguinDude: it's entirely in node [20:29] chrisinajar: PinguinDude: and not just in a jQuery fassion, i actually ported jQuery's source code to work [20:29] PinguinDude: :D [20:29] creationix: chrisinajar, I like the readme [20:29] creationix: "It's like autism..." [20:30] chrisinajar: engine test has compiling instructions: https://github.com/chrisinajar/plutopia [20:30] sammmy: creationix: also, why does my last bouncy-error.log file have a ? suffixed to it "bouncy-error.log?" ? [20:30] PinguinDude: overdosing on cocaine eh? [20:30] PinguinDude: haha [20:30] chrisinajar: i was explaining to a non-technical person why this engine is neat and that's what i came up with [20:30] chrisinajar: so i copy and pasted it into my readme [20:30] PinguinDude: oh don't get me wrong :) [20:30] joshuajabbour has joined the channel [20:30] hz has joined the channel [20:31] chrisinajar: :D [20:31] creationix: chrisinajar, so what are the dom elements? [20:31] creationix: I've only does GLES2 [20:31] creationix: *done [20:31] chrisinajar: in my DOM, it's instances of my Element class [20:31] creationix: and GLES2 is all raw vertexes and shaders [20:31] sammmy: creationix: and chdir doesn't appear to work either [20:31] chrisinajar: i haven't done anything fancy like that yet [20:31] rlidwka: chrisinajar: doesn't mean that with your app it's possible to make online browser game and a native game using one source code?) [20:31] chrisinajar: i'm bad with ogl so it's an uphill fight [20:31] creationix: sammmy, try `man upstart` see if that helps any [20:32] chrisinajar: but i have animated textured squares right now [20:32] PinguinDude: I was an expert on OpenGL before v3 and up came around :p [20:32] chrisinajar: rlidwka: theoretically, eventually, yes. [20:32] PinguinDude: Still learning to get used to that [20:32] chrisinajar: PinguinDude: i know how to draw squares :P [20:32] PinguinDude: <3 [20:32] PinguinDude: haha [20:32] chrisinajar: it took me a day to figure out how to make it run in 2d made :P [20:32] creationix: PinguinDude, if you want webgl API, I added that to node https://github.com/creationix/node-webgl [20:32] davemo has joined the channel [20:32] creationix: doesn't do it's own windowing though [20:33] creationix: I use SDl for that usually [20:33] chrisinajar: i used sdl in mine for windowing too [20:33] carlyle has joined the channel [20:33] akiva_ has left the channel [20:33] yawNO: lol [20:33] justicefries: mmm sdl. [20:33] yawNO: mass quit @ bostom api jam [20:33] benvie: dom is a useful abstraction for allowing that type of agnostic interoperability, and more things should have dom apis built on top of them [20:33] PinguinDude: I use GLFW these days, prefer it to SDL. [20:33] PinguinDude: Since SDL can't do OGL 3.2 and up unless I use SDL 1.3 which is unstable. [20:33] justicefries: or SFML. [20:33] benvie: hmmm [20:33] creationix: meh, the future is GLES2 [20:33] benvie: gives me an idea [20:34] creationix: that's what all mobile has [20:34] chrisinajar: i use node-sql and node-ogl, neither of which seemed to work without my changes, at least not on my (or my friend's) system.... [20:34] PinguinDude: SFMl is what I prefer but last time I checked it wasn't capable of serving me with OpenGL 3.2 [20:34] chrisinajar: i need to research wtf gles2 is [20:34] benvie: ffi dom [20:34] justicefries: creationix: eh, stuff like Unity is successfully bridging the gap. [20:34] schredder has joined the channel [20:34] PinguinDude: creationix: still, is it just me or are these GL libraries meant for local usage? [20:34] flagg0204 has joined the channel [20:35] chrisinajar: PinguinDude: if you want to help out, i could really use some ogl help :) [20:35] justicefries: creationix: as far as intelligently building out for both GLES2 and OpenGL [20:35] creationix: PinguinDude, I'm pretty sure all opengl bindings are meant to be used locally. It's hard to make GPU calls across a network :P [20:35] PinguinDude: chrisinajar: feel free to bother me for OpenGL questions. I'm on #freenode daily so. [20:36] PinguinDude: creationix: I figured, but you never know with the Node crowd. [20:36] PinguinDude: Crazy bunch of people :D [20:36] creationix: if you want it in a browser, use webgh there [20:36] creationix: 8webgl [20:36] creationix: **webgl [20:36] bizniz98 has joined the channel [20:36] PinguinDude: Yeah I figured, which is what caused my confusion. [20:37] benvie: isn't there some working thing emscripten style for mapping opengl to webgl [20:37] PinguinDude: I like chrisinajar's project though. I had thought about implementing this before except I never got around to figuring out how to implement the DOM. [20:37] wavded has left the channel [20:37] benvie: dom.js is a full fledged js implemented dom which can help understand the concepts behind hosting a dom [20:37] PinguinDude: benvie: I don't believe there is a need for that. WebGL is pretty similar to 3.2 and up. Except I believe WebGL still has the old fashion of building VBO's. [20:38] shinuza has joined the channel [20:38] TooTallNate: WarheadsSE [20:38] TooTallNate: you still there? was at lunch [20:38] benvie: I'm just saying I think it exists [20:38] benvie: not that I did it [20:38] chrisinajar: PinguinDude: cool, will do :) [20:38] benvie: I recall reading about it on the emscripten mailing list a while back [20:38] WarheadsSE: TooTallNate: yup [20:39] TooTallNate: WarheadsSE: so the error you're seeing is armv7 not being defined? [20:39] WarheadsSE: I'm trying to build the master atm [20:39] TooTallNate: ok that's good [20:39] WarheadsSE: once I override the ia32 "default" in configure.gypi [20:39] WarheadsSE: Yes, but master isn't a release :p [20:39] TooTallNate: WarheadsSE: are you cross-compiling? [20:39] benvie: the context would be compilinging existing software that was built in c/c++ using opengl [20:39] WarheadsSE: native on an armv5te [20:39] TooTallNate: ok [20:39] WarheadsSE: we do cross compile, after we get it working native. [20:39] TooTallNate: so then in config.gypi [20:40] benvie: since emscripen compiled c/c++ to js it's a natural reach also compile opengl to webgl too [20:40] TooTallNate: add "armv7": "0" to the "variables" section [20:40] benvie: or whatever that process would entail [20:40] TooTallNate: WarheadsSE: ^ [20:40] WarheadsSE: i saw ; [20:40] justicefries: benvie: that seems like it'd be a slighlty larger leap, unless it's OpenGL ES 2.0 [20:40] justicefries: if it's OpenGL 3.2... [20:40] WarheadsSE: remember though im trying to prevent having to hack in [20:40] justicefries: there's some stuff incompatible [20:41] benvie: like you get the context right? [20:41] benvie: emscripten compiles full c/c++ applications and libraries to js [20:41] benvie: some would say that's not a compatible thing to do [20:41] TooTallNate: WarheadsSE: well the bottom line is that it needs some patches to make arm building smooth [20:41] TooTallNate: specifically, like setting this variable in the ./configure script [20:41] TooTallNate: when the arch is "arm" [20:42] justicefries: no I get the context, yes. [20:42] justicefries: you'd have to strip out OpenGL 3.2 specific shader stuff, though. [20:42] justicefries: it wouldn't be 1:1. :) [20:42] benvie: yeah I imagine it'd involve that kind of thing but I get the impression it's about just making the stuff run [20:43] justicefries: true [20:43] benvie: since it's primarily used for porting things that were already built or whatever [20:43] justicefries: yeah [20:43] antono has joined the channel [20:43] al3xnull has joined the channel [20:44] WarheadsSE: Even larger issue: not all arm is the same :p [20:45] jrpercussion has joined the channel [20:45] TooTallNate: WarheadsSE: well as far as v8 is concerned, you have armv7 or you dont :p [20:46] justicefries: I have a Panda board coming tomorrow. [20:46] justicefries: I'm going to attempt getting it to compile. [20:46] justicefries: which should be ARMv7 [20:46] creationix: so raspbrry pi is arm11? [20:46] creationix: is that armv7? I don't remember [20:46] michaelmartinez_ has joined the channel [20:47] justicefries: it's armv6 [20:47] WarheadsSE: v8 I have fixed, :p [20:47] justicefries: they're the only ones [20:47] justicefries: that are v6 [20:47] WarheadsSE: RPi is ARM11 single core, with a partial fpu [20:47] TooTallNate: WarheadsSE: so it's compiling then? [20:47] WarheadsSE: v8 ? [20:47] WarheadsSE: pfft, yeah [20:47] TooTallNate: haha [20:47] TooTallNate: nice [20:47] Es0teric has joined the channel [20:47] creationix: hmm, so it will never run v8 on raspPI? [20:47] WarheadsSE: moved it out to a seperate lib though [20:48] TooTallNate: creationix: it should work fine [20:48] WarheadsSE: creationix: read my text : its working now [20:48] TooTallNate: v8 doesn't *require* armv7 [20:48] justicefries: i'll tell you next week [20:48] justicefries: oh [20:48] justicefries: nice. [20:48] jaha has joined the channel [20:48] WarheadsSE: nope v8 does not, but their build scripts assume. [20:48] creationix: WarheadsSE, what are you building on? [20:48] TooTallNate: WarheadsSE: what cpu are you using? [20:48] WarheadsSE: atm, a Go Flex Net [20:48] WarheadsSE: armv5te [20:48] Es0teric: when using eventEmitter, EventEmitter.on('name', function(){}); <--- does that trigger when a submit request comes up as name? [20:48] creationix: nice [20:48] jaha has joined the channel [20:49] ramitos has joined the channel [20:49] WarheadsSE: but w have it running curently on Kirkwoods, PLX oxnas 782x's, trimslice, beagles, pandas, gumstix [20:49] RLa: Es0teric, whenever 'name' is emitted [20:49] WarheadsSE: it;d be nice if freenode wever got around to giving alarm our cloaks.. [20:49] Es0teric: RLs, emitted where? [20:49] justicefries: Node: Runs Everywhere. 1/100 the size of the Java VM. [20:49] creationix: WarheadsSE, I should take my pile of webos phones and put something interesting on them [20:49] Es0teric: RLa, emitted where? [20:49] RLa: Es0teric, depends what uses that EE [20:49] Es0teric: what do you mean? [20:49] justicefries: creationix: were you at red dirt ruby conf with wynn last year? [20:50] creationix: justicefries, yep, I gave the node talk and why it's better than ruby [20:50] RLa: Es0teric, var ee = new EventEmitter(); ee.emit('name'); [20:50] justicefries: yeah, I remember. I talked about SOA and used node in my talk. [20:50] creationix: and Dr nik made fun of me [20:50] WarheadsSE: TooTallNate: creationix: master seems to be building [20:50] ant0no has joined the channel [20:50] justicefries: with the group advancing presentation [20:50] Es0teric: RLa, but that event would be fired off when 'name' is detected on POST or GET? [20:50] reed_ has joined the channel [20:50] Es0teric: how does it work? [20:50] Es0teric: or would name be something like whats passed on the body text? [20:51] RLa: Es0teric, that's very specific for the framework/library you use [20:51] justicefries: or rather, queueing systems [20:51] RLa: Es0teric, what lib are you using [20:51] Es0teric: just node [20:51] Poetro has joined the channel [20:51] RLa: Es0teric, so that is http? [20:51] Es0teric: yeah [20:51] RLa: Es0teric, see docs what events it can emit [20:52] toxicFork has left the channel [20:52] WarheadsSE: creationix: what are the SoC in those? [20:52] Es0teric: RLa so then EventEmitter.on() what would lib would that be in? [20:52] RLa: Es0teric, it has nicely documented which events both server and request can emit [20:52] TooTallNate: WarheadsSE: master is surpisingly stable right now, for being the unstable branch [20:52] RLa: Es0teric, that seems events library [20:52] eldios has joined the channel [20:52] scottdware has joined the channel [20:53] RLa: Es0teric, but EE is generic, it has nothing to do with http, anything could use it [20:53] WarheadsSE: TooTallNate: yeah, but I can't make an official package out of unstable! [20:53] Es0teric: RLa, i see… i am trying to get the hang of this nodejs stuff though [20:53] WarheadsSE: its less node js, as event programming ;) [20:53] Es0teric: because an event would be a click or a focus right? [20:54] WarheadsSE: not being familiar with that messes with most people [20:54] creationix: WarheadsSE, mixed, the Pixi is some old Qualcom, the Pre it TI, the newer ones are modern qualcom [20:54] Es0teric: coming from js [20:54] creationix: mostly armv7 [20:54] RLa: Es0teric, it could be anything! [20:54] barmaley-exe: Why am I getting an error [20:54] barmaley-exe: > make -C out BUILDTYPE=Release [20:54] barmaley-exe: > /home/barmaley-exe/tmp/node/out/Release/.deps/all.deps:4: *** target pattern contains no `%'. Stop. [20:54] barmaley-exe: > make[1]: Entering directory `/home/barmaley-exe/tmp/node/out' [20:54] barmaley-exe: > make[1]: Leaving directory `/home/barmaley-exe/tmp/node/out' [20:54] barmaley-exe: > make: *** [node] Error 2 [20:54] barmaley-exe: when I'm trying to run make after compiling once and editing some files? [20:54] WarheadsSE: ARG. [20:54] RLa: Es0teric, in node js [20:54] Es0teric: RLa so wait a minute… even displaying text can be an event? [20:54] RLa: Es0teric, a new incoming request is event too: http://nodejs.org/api/http.html#http_event_request [20:55] iain_: hi guys, is there a fbsd port for node or npm yet? [20:55] RLa: Es0teric, any io [20:55] WarheadsSE: eesh,, i should have told it to use my openssl libs.. [20:55] schredder has joined the channel [20:55] iain_: the building of node shouldn't be a problem, as linux binary support has been in fbsd for years, but what should I be doing for fbsd node/npm installs? [20:55] TooTallNate: WarheadsSE: haha, ya that'll add a little to the compile time :p [20:55] eldios: Es0teric, it would be WAY simpler if you start reading how to implement an EventEmitter [20:56] eldios: there are plenty of tutorials out there [20:56] Es0teric: eldios where in the docs is that? [20:56] WarheadsSE: http://www.js-node.com/tag/freebsd-nodejs [20:56] Es0teric: do you know any tuts on that? [20:56] lohkey has joined the channel [20:56] WarheadsSE: iain_: ^^ [20:56] RLa: Es0teric, here is whole api index: http://nodejs.org/api/index.html [20:56] iain_: WarheadsSE: thanks, that sorts the node bit, npm ok? [20:57] RLa: Es0teric, here is EE docs: http://nodejs.org/api/events.html [20:57] eldios: Es0teric, http://nodejs.org/docs/latest/api/all.html#all_class_events_eventemitter [20:57] TooTallNate: iain_: npm should be fine, it's all javascript [20:57] iain_: as really I want to do n managed node [20:57] WarheadsSE: all I can say then is try it, since npm just runs on top of node. [20:57] isaacs: iain_: you should be able to just nstall node from source, and get npm by default. [20:57] iain_: well I'm trying it in a fbsd jail so doesn't matter if it screws up [20:58] iain_: isaacs: I don't want to just install from random source, hence asking [20:58] argami_ has joined the channel [20:58] WarheadsSE: TooTallNate: lol, it bombed in compiling openssl! unmatched {! [20:58] iain_: really I want a port, which either gives me npm, and an initial node install [20:58] TooTallNate: unmatched what? [20:58] iain_: s/either// [20:59] TooTallNate: what gcc you using? [20:59] iain_: I may have to look at making a port if theres nothing out there already [20:59] admc has joined the channel [20:59] TooTallNate: iain_: you mean a "package"? [20:59] iain_: TooTallNate: no, a port [20:59] iain_: TooTallNate: its fbsd, not linux [21:00] TooTallNate: what needs to be ported over? [21:00] iain_: TooTallNate: you are not in 'ze lingo' [21:00] soapyillusions_ has joined the channel [21:00] iain_: the packaging system on fbsd is ports [21:00] TheEmpath has joined the channel [21:00] iain_: so a port is a package [21:00] TooTallNate: haha, oh right [21:00] TheEmpath: Dear Node.js.... we have to talk.... https://gist.github.com/5206819e1700d9a3ccd0 [21:00] nateps has joined the channel [21:00] iain_: TooTallNate: I know, confusing [21:01] iain_: but its like slices and partitions [21:01] TooTallNate: :p [21:01] mansoor: Where can I find documentations on what features --harmony supports? [21:02] iain_: well actually theres 2 methods of installing stuff on fbsd, one is binary packages (ugh) or src based with ports [21:02] benvie: monsoor at minimum you can do node --v8-options [21:03] benvie: they will be at the top [21:03] argami has joined the channel [21:03] isaacs: WarheadsSE: is http://www.js-node.com/ just an ad farm or something? [21:03] Sadin has joined the channel [21:04] WarheadsSE: idk! first recent google hit :p [21:04] dilvie has joined the channel [21:04] WarheadsSE: isaacs: plus, i have ABP on so I don't see many ads.. [21:04] benvie: the next best place to get info about the flags is here https://github.com/joyent/node/blob/master/deps/v8/src/flag-definitions.h#L110 [21:04] iain_: isaacs: they clearly don't know the order of word groupings [21:05] iain_: or even letter groupings [21:05] mandric has joined the channel [21:05] vkareh has joined the channel [21:06] mxbtty has joined the channel [21:08] justicefries has joined the channel [21:08] zackattack has joined the channel [21:08] doug has joined the channel [21:08] vkareh has joined the channel [21:09] ccare has joined the channel [21:09] WarheadsSE: TooTallNate: btw, gcc 4.6.3, glibc 2.15 [21:10] pid has joined the channel [21:10] TooTallNate: WarheadsSE: seems new enough. were you able to figure out the openssl thing [21:10] TooTallNate: ? [21:10] WarheadsSE: oh, that was cake [21:11] WarheadsSE: but my v8 on the system isnt apparently new enough.. [21:11] WarheadsSE: http://pastie.org/3637563 [21:12] fangel has joined the channel [21:12] WarheadsSE: how do i check that from inside node again, i always forget:p [21:12] doug: does node work via select() or poll()? [21:13] joshsmith has joined the channel [21:13] hellp has joined the channel [21:13] doug: or aio? [21:13] michaelhartau has joined the channel [21:13] timoxley has joined the channel [21:14] AaronMT has joined the channel [21:15] TooTallNate: doug: node uses libuv, it ends up depending on the platform [21:15] TooTallNate: WarheadsSE: check what now? [21:15] TooTallNate: you'd probably be better off using the bundled version :D [21:16] WarheadsSE: TooTallNate: yeah.. my v8 is much older...3.6.6.24 vs master wanting 3.9.17 [21:16] lohkey has joined the channel [21:16] barmaley-exe has left the channel [21:16] WarheadsSE: I agree, if I didnt have to beat v8 over the head! [21:16] beakybal4 has joined the channel [21:16] doug: ah, ok, so libev on mac/linux probably [21:16] schredder has left the channel [21:16] TooTallNate: doug: correct [21:16] dukeytoo has joined the channel [21:16] TooTallNate: WarheadsSE: what's the problem with v8? [21:17] iain_: so, nodejs does exist in ports, as plain node [21:17] iain_: 0.6.11 [21:17] WarheadsSE: it has a problem with recognizing ARM11/ARM926ejs [21:17] iain_: now to try installing it [21:18] WarheadsSE: (aka, not v7-neon) [21:18] vkareh has joined the channel [21:18] WarheadsSE: https://github.com/archlinuxarm/PKGBUILDs/blob/master/community/v8/PKGBUILD [21:18] lohkey has left the channel [21:19] lohkey has joined the channel [21:19] doug has left the channel [21:20] WarheadsSE: I suppose I could put in a v8-unstable .. [21:20] WarheadsSE: overall though, I'd probably have to review the entire v8 code [21:20] CromeDome has joined the channel [21:20] WarheadsSE: *crap* [21:20] WarheadsSE: ACTION heads hmoe [21:23] aaronmcadam has joined the channel [21:24] jjido has joined the channel [21:24] andrewdeandrade has joined the channel [21:26] TheEmpath: sigh [21:26] TheEmpath: I'm tired of every single example of nohup being a total lie [21:26] Vertice has joined the channel [21:27] TheEmpath: I have a client that runs ssh -t user@server.com 'somescript.sh' [21:27] TheEmpath: somescript.sh has 'sudo nohup node server.js &' [21:27] TheEmpath: when I run the script on the server... it works just fine [21:27] TheEmpath: when i run the script via ssh exec, it never loads [21:27] reed_ has joined the channel [21:28] TheEmpath: the script runs.. its executing it just fine. [21:28] TheEmpath: for whatever reason, nohup absolutely cannot remain detached when ran form ssh exec [21:29] enmand has joined the channel [21:29] litejk has joined the channel [21:29] TheEmpath: and its complete bullshit that the entire internet says otherwise and yet, it absolutely does not work [21:29] mmalecki: maybe you need a pseudo-tty? [21:29] TheEmpath: im using ssh -t [21:29] mmalecki: hm... [21:29] litejk has left the channel [21:30] TheEmpath: other commands in the somescript.sh work... like sudo pkill node.. that works just fine [21:31] joshwines has joined the channel [21:31] myndzi: how about socket.write; does it require a string or can you supply a buffer? [21:32] TooTallNate: myndzi: a Buffer is fine [21:32] TheEmpath: welcome to my personal hell: https://gist.github.com/7dc93e863c1fe920c782 [21:32] saikat has joined the channel [21:32] myndzi: a buffer is fine too :> [21:32] TooTallNate: TheEmpath: why not just use upstart? [21:32] TheEmpath: ive been on this stupid problem for over an hour now and it is so infuriating that the entire internet says it works and yet, it does not [21:32] shinuza has joined the channel [21:33] TheEmpath: TooTallNate: nohup comes default on rackspace servers. rather use built in software than add bloat [21:33] TheEmpath: if I login to the server as "me", and run ./postDeploy, it executes perfectly [21:33] TooTallNate: TheEmpath: i only recommend that because we experienced the same thing with nohup before switching to upstart [21:33] TheEmpath: but if I ssh exec it... it never stays [21:33] TheEmpath: god fucking damn it, really? [21:34] Es0teric: how do i make a script work on port 80? [21:34] TooTallNate: TheEmpath: same thing [21:34] TooTallNate: worked locally [21:34] TooTallNate: not through ssh [21:34] TheEmpath: why is no one makign this public? [21:34] TheEmpath: like 938745938475 people say OHHH NOHUP AND NODE WORKS GREAT LULZ [21:34] TooTallNate: *shrug* i'm not a deployment guy :D [21:34] TheEmpath: ACTION rages at nuns. [21:34] stafamus has joined the channel [21:35] jefferai has joined the channel [21:35] bwen has joined the channel [21:35] TooTallNate: TheEmpath: those 938745938475 don't use ssh or something :D [21:35] TheEmpath: TooTallNate: Must be using carrier pidgeons or something [21:35] TooTallNate: :p [21:35] mmalecki: `carrier-pidgeon deploy` [21:35] Es0teric: how do i use nodejs on port 80? [21:36] TheEmpath: it's not nohup at all though [21:36] Maxani has joined the channel [21:36] TheEmpath: its the damned & [21:36] TheEmpath: son of a bitch [21:36] TheEmpath: even without nohup, the goddamned process won't detach with & [21:36] bwen: Hi trying to follow the Cygwin tutorial to install node.js on windows and I get the error "/deps/openssl/openssl/crypto/des/enc_read.c:66:1: note: previous declaration of ‘_hide_DES_rw_mode’ was here" any ideas? [21:36] TheEmpath: what in magical fuck town is that all about [21:36] TheEmpath: ACTION prepares his Google boots. [21:36] Es0teric: LOL [21:37] hh__: normal users don't have permission to listen on ports <1024 [21:37] hh__: lots of cursing going on up in here [21:38] meandi8 has joined the channel [21:39] iangreenleaf: I'm wondering if this module already exists: I want to share some code between server and client. I want something that handles `require` and `module.exports` without extra work on my part, and I want it to be able to concatenate require'd code for serving on production. [21:39] iangreenleaf: Anyone know of such a project? [21:40] rlidwka: browserify? [21:42] sheenobu has joined the channel [21:43] jjido has joined the channel [21:43] dragon: iangreenleaf: https://github.com/raincole/node-template [21:44] iangreenleaf: Thanks folks. I'll take another look at browserify. I had dismissed it before, but perhaps I got the wrong idea about the implementation from reading the docs. [21:44] iangreenleaf: Any others? [21:44] bizniz98 has joined the channel [21:45] timoxley has joined the channel [21:45] paulcrawford has joined the channel [21:46] bwen has left the channel [21:46] TooTallNate: iangreenleaf: or "browserbuild" too [21:46] dfletcher has joined the channel [21:46] EhevuTov has joined the channel [21:48] infynyxx has joined the channel [21:49] tommyvyo has joined the channel [21:51] massalvaro has joined the channel [21:51] totallymike: Does anyone have a simple example of how to test express with mocha? What's the easiest way to test a route? [21:52] graeme_f has joined the channel [21:52] totallymike: I'm kinda new to the whole TDD thing, so setting up tests and such is foreign to me. [21:52] massalvaro: hi everyone. a little MongooseJS help requested.. Trying to build simple database auth but ensureIndex doesn't seem to work [21:53] argami_ has joined the channel [21:53] totallymike: Do you just use before to fire up the server, and then punch requests at it and assert that you get what you want? [21:54] jj0hns0n has joined the channel [21:54] TheEmpath: TooTallNAte: Figured it out [21:54] godu has joined the channel [21:54] michaelmartinez: I love watching rage live. Classic line: "What in the magical fuck town is that all about" lol [21:54] massalvaro: I've heard thats the way to go, but I don't get it… wait by 'server' do you actually mean my app? because I'm testing w/o actually running an ap [21:54] TheEmpath: TooTallNate: You detach the process in the server script, but run nohup on the ssh exec [21:54] totallymike: Also, is there any documentation to mocha, such as what exactly 'describe' and 'it' mean, and so on [21:54] h4mz1d has joined the channel [21:55] TooTallNate: TheEmpath: so you have a little .sh script? [21:55] TheEmpath: ya [21:55] TooTallNate: TheEmpath: well nice find :) i think we're sticking with upstart for now though ;) [21:55] michaelmartinez has left the channel [21:56] TheEmpath: we'll see if it holds! [21:56] totallymike: hup, I guess it's dinner time. I'll poke around later [21:56] ctp6360 has joined the channel [21:56] TheEmpath: im gonig to eat a soup then prepare to understand cluster and forever [21:56] boltR has joined the channel [21:56] TheEmpath: thanks for the help [21:56] TheEmpath: hope everyone enjoyed my colorful language... i try to keep it classy [21:57] kbhit has joined the channel [21:57] benvie: hah that's a good one [21:57] benvie: I'm using that one now [21:57] benvie: magic fuck town indeed [21:57] bizniz98 has joined the channel [21:57] Es0teric: is ther any way for me to have node interface with php? [21:57] Es0teric: *there [21:58] Morkel has joined the channel [21:58] massalvaro: Es0teric I'd start by deleting php :-) [21:58] Es0teric: massalvaro not an option [21:58] rtgibbons has joined the channel [21:58] Es0teric: i want node to be able to show php files [21:58] csprite has joined the channel [21:58] Es0teric: and retrieve data from them [21:59] benvie: v8 php ;) [21:59] Es0teric: right now i did localhost:3000/testing.php and it didnt show it [21:59] Es0teric: v8 php? [21:59] benvie: troll grin [21:59] benvie: it exists [21:59] massalvaro: Es0teric you mean "serve" php files? [21:59] benvie: http://php.net/manual/en/book.v8js.php [21:59] Es0teric: massalvaro yeah [21:59] Lorentz: pass it off to php5-fpm or something? basically do what nginx does [21:59] benvie: or is it this http://code.google.com/p/php-v8/ [22:00] massalvaro: ah. that v8 may be the way to go [22:00] massalvaro: or maybe you have to screenscrape results from php pages [22:01] Es0teric: benvie this sounds soooo comforting -> An attempt at least.. The API is still being developed, since I have no idea what I'm doing. All I want is to be able to run JavaScript inside my PHP applications and maybe even give JavaScript access to all the PHP functions with a PHP 'namespace'. [22:01] benvie: lol [22:01] benvie: I know there's a v8 php thing that isn't terrible [22:01] Lorentz: I like that. [22:01] Lorentz: "I have no idea what I'm doing" [22:01] Es0teric: LMAO [22:02] AvianFlu: quick [22:02] AvianFlu: somebody link that pic of that dog with the tie and his paws on the keyboard [22:02] benvie: I prefer the cat playing the piano or the one riding through space and time on top of a piano [22:02] massalvaro: JQuery FTW [22:03] nateps has joined the channel [22:04] massalvaro: I have to be honest I still kinda don't get the question php/node [22:04] benvie: sometimes I feel it fills me with great forboding, that these are real things, because it seems surely this would be the type of thing that the universe would simply not accept and wink out of existence because a line was crossed that never should have been [22:04] Es0teric: ok [22:04] Es0teric: the v8js from php.net [22:04] Es0teric: has no documentation [22:04] reed__ has joined the channel [22:04] benvie: but it exists ;) [22:05] nateps has joined the channel [22:05] benvie: and now this will gnaw at you if yuo don't figure it out [22:05] meandi8 has joined the channel [22:06] jimmysparkle has joined the channel [22:06] joshgillies has joined the channel [22:07] joshfinnie has joined the channel [22:08] argami has joined the channel [22:08] kukkelundin has joined the channel [22:10] joshgillies has joined the channel [22:13] timoxley has joined the channel [22:13] iain_: isaacs: do you do the npm stuff? [22:13] ljharb has joined the channel [22:13] isaacs: iain_: when i can find time to, yes. [22:14] ljharb: can someone enlighten me on why npmjs.org switched to hash-based navigation?? [22:14] isaacs: ljharb: it's going away. don't worry. [22:14] iain_: isaacs: I have had problems fetching n from npm from a few VMs of late [22:14] iain_: just wondering if there have been issues [22:14] ljharb: isaacs: good, thanks - old links are broken and changing the hash value doesn't go to the new location [22:14] isaacs: iain_: is it just fetching n, or other packages as well? [22:14] EhevuTov has joined the channel [22:14] isaacs: ljharb: yes, that #/ stuff needs to just stp. [22:15] isaacs: *stop [22:15] isaacs: it's not good. [22:15] josh-k has joined the channel [22:15] jesusabdullah: it's not good; it's AMAAAZING! [22:16] st_luke has joined the channel [22:16] ljharb: isaacs: glad that i barged in here all pissed and the first response was what i was looking for :-) yay nerdrage [22:16] isaacs: hahah [22:16] isaacs: ljharb: the worst part is that there's no way any search engine can index that crap. [22:16] ljharb: yeah at least with hashbangs google supports it (altho itd be better if they didnt) [22:16] isaacs: ljharb: joyent's put up budget for a proper designer to do some iterations on a new site. [22:17] iain_: isaacs: just n so far, but I was getting a timeout [22:17] iain_: but wgetting the tgz helped, so perhaps is the many loops you go through to get to the real thing? [22:17] isaacs: iain_: that's weird. [22:18] isaacs: iain_: well, the loops npm goes through to get the "real thing" are pretty straightforward. [22:18] iain_: this was from another VM provider mind, not had the problem before [22:18] iain_: they are 302's [22:18] rmttnmd__ has joined the channel [22:18] isaacs: fetch the json, then look at the dist.tarball, then get that [22:18] isaacs: iain_: you sure they weren't 304s? [22:18] iain_: npm didn't say [22:18] iain_: really [22:18] isaacs: iain_: yeah it did :) [22:18] isaacs: iain_: in the log output [22:18] iain_: I just followed it with curl after [22:19] iain_: ok, one sec let me have a look [22:19] isaacs: $ npm install n [22:19] isaacs: npm http GET https://registry.npmjs.org/n [22:19] isaacs: npm http 304 https://registry.npmjs.org/n [22:19] isaacs: n@0.7.1 ./node_modules/n [22:19] michaelhartau has joined the channel [22:19] isaacs: that's with a full cache, obviously [22:20] iain_: oh, got other issues right now, but npm certainly was failing [22:20] iain_: I went and wget'd the file, and then npm was happy [22:20] awaage has joined the channel [22:21] iain_: but if theres nothing wrong your end, its probably something to do with the vm provider [22:21] iain_: just seems very strange [22:21] iain_: when I see it again, I'll pm you [22:21] crutex has joined the channel [22:21] crutex has joined the channel [22:25] FACEFOX has joined the channel [22:25] isaacs: iain_: could be that it's supposed to be using a proxy? [22:26] niallo: if you already have a node_modules dir populated with deps, and you update the npm-shrinkwrap.json file with a later version, then you run npm install -d, is it expect that npm install -d will *not* update to the version in the newer shrinkwrap ? [22:26] dshaw_ has joined the channel [22:26] isaacs: niallo: i'm not sure. also -d means "debug" [22:26] isaacs: niallo: -dd is more debugging, and -ddd is a silly amount of debugging. [22:26] isaacs: it just makes the output noisier [22:27] iain_: isaacs: proxy, perhaps, but nat is the most likely [22:27] niallo: isaacs: ok. my main question is really around whether npm install is expected to update to whatever is latest in shrinkwrap file. [22:27] isaacs: niallo: it should make your current setup match the shrinkwrap [22:28] isaacs: niallo: but if something is already there, it *might* skip over it, i'm not sure. what version are you using? [22:28] niallo: isaacs: ok, in that case there may be a bug somewhere. i am using 0.6.12 and 0.6.13 along with whatever npm is bundled. [22:28] isaacs: niallo: please post reproducible test. [22:29] isaacs: niallo: worst case, you can always npm rm whatever, then run `npm install` and it'll put whatvers's in the shrinkwrap in place; [22:29] massalvaro has joined the channel [22:29] Wa has joined the channel [22:29] niallo: isaacs: already working on the test case, should have one later on today. i would love for npm install to automatically update to latest shrinkwrap as it makes my deployments faster. [22:31] WarheadsSE: TooTallNate: I'm going to build out a newer v8, and try that... [22:32] hipsters_ has joined the channel [22:34] joshontheweb has joined the channel [22:34] schredder has joined the channel [22:35] schredder has left the channel [22:35] BillyBreen has joined the channel [22:35] dodo has joined the channel [22:37] elijah-mbp has joined the channel [22:37] CIA-19: node: 03Nathan Rajlich 07master * r8517089 10/ lib/readline.js : [22:37] CIA-19: node: Revert "readline: add multiline support" [22:37] CIA-19: node: This reverts commit 443071db5749603f816199b9ec8bc512fb441d98. [22:37] CIA-19: node: Patch was overly compilicated and made some incorrect assumptions about the [22:37] CIA-19: node: position of the cursor being at the bottom of the screen. @rlidwka and I are [22:37] CIA-19: node: working on getting a proper implementation written. - http://git.io/fTzuAg [22:37] CIA-19: node: 03Alex Kocharin 07master * r06a058d 10/ (lib/readline.js lib/repl.js lib/tty.js): [22:37] CIA-19: node: readline: row-agnostic multiline readline implementation [22:37] CIA-19: node: Fixes #2959. - http://git.io/0GMyrg [22:37] Phoenixz: When I added a listener, the only way to remove that listener is with the event name, and the callback function? [22:37] diogogmt has joined the channel [22:38] mcluskydodallas has joined the channel [22:40] FACEFOX has joined the channel [22:40] FredC has joined the channel [22:40] robi42 has joined the channel [22:41] ljharb: has anyone used https://github.com/jacwright/promises yet? am i correct that I should be able to call when([new Deferred(), new Deferred()]).then(callback) and the callback will only be fired when both Deferreds' fullfill() methods are called? [22:41] WarheadsSE: werent promises yanked? [22:41] argami has joined the channel [22:42] ljharb: out of node proper, yes - i'm using a third party library [22:42] ljharb: if anyone has a different Promises library to recommend I'll use that instead, this just seemed to be what i needed [22:42] massalvaro has joined the channel [22:42] SubStack: deferreds, gross [22:43] ljharb: SubStack: what do you prefer? [22:43] isaacs: ACTION popcorn [22:43] AvianFlu has joined the channel [22:44] chapel: lol [22:44] ljharb: (hopefully my genuine question doesn't cause a minor holy war) [22:44] tommyvyo has joined the channel [22:44] jj0hns0n has joined the channel [22:44] tristanz_ has joined the channel [22:44] argami_ has joined the channel [22:45] tylerstalder has joined the channel [22:45] ramitos has joined the channel [22:45] isaacs: ljharb: i think SubStack prefers callbacks and tiny modules. [22:45] SubStack: yes that [22:46] ljharb: tiny modules i can get behind, and i have no problem with callbacks, but i find the promise implementations so much nicer for multiple preconditions [22:46] SubStack: preconditions? [22:47] SubStack: that should not be a programming term [22:47] SubStack: that should be a term that insurance salemen and claims adjustors use [22:47] graeme_f has joined the channel [22:47] TooTallNate: even then companies shouldn't discriminate [22:48] ljharb: lol [22:48] TooTallNate: ACTION fucking insurance [22:48] diogogmt has joined the channel [22:48] ljharb: ie if i have a callback that needs to run after 2 or more other async operations are all finished [22:49] mmalecki: ljharb: use counter or some async flow control library [22:49] mmalecki: many people use async [22:49] yaymukund: I liked iced-coffee-script but it really screws up the resulting JS. I've reverted to Step [22:50] ljharb: http://search.npmjs.org/#/counter ? i'll check it out [22:50] yaymukund: haven't looked at counter... *looks* [22:50] mmalecki: ljharb: no, counter as in "integer variable you change after something happens" [22:50] ljharb: lol [22:51] ljharb: so then while i'm waiting for, say, 2 ajax calls to come back, i just nextTick until the counter is high enough? [22:52] mmalecki: no. you write a function which decrements a counter and calls a callback when it reaches 0 [22:52] mmalecki: you should use this nifty programming thing. [22:52] nadirvardar has joined the channel [22:52] rlidwka: or learn to use "async" library :) [22:52] ljharb: ah [22:53] mmalecki: yeah, also what rlidwka said, don't reinvent the wheel [22:53] ljharb: ok let's tone down the vitriol, i know how to use callbacks and promises, and i'm trying to ask about people's preferred best practices [22:53] ljharb: rlidwka: link? [22:54] rlidwka: ljharb: https://github.com/caolan/async [22:54] ljharb: thanks [22:54] hex` has joined the channel [22:54] hex`: on http://mongod, all options give me "REST is not enabled. use --rest to turn on." [22:55] hex`: Where do I use this --rest option? I tried "mongod --rest" on the command line, but I think that's not the correct place to go [22:55] rlidwka: ljharb: using nextTick for waiting async calls is good only for one job: if you're writing a code for someone you don't like :) [22:55] wilmoore has joined the channel [22:55] jj0hns0n has joined the channel [22:55] westg has joined the channel [22:56] ljharb: rlidwka: yeah that didn't seem like a good way to go. i guess i just don't understand why promises are bad, other than it's adding a module to your project [22:56] artusrocha has joined the channel [22:56] benvie has joined the channel [22:59] devaholic has joined the channel [22:59] al3xnull has joined the channel [23:00] MrNko has joined the channel [23:00] ljharb: mmalecki, SubStack - why are promises not ideal? [23:00] automata has joined the channel [23:00] mmalecki: ljharb: they add unnecessary API and sugar where it isn't really needed [23:00] baudehlo has joined the channel [23:01] westg: unnecessary API sugar [23:01] westg: results in...? [23:01] westg: programming diabetes [23:01] mmalecki: lol [23:01] westg: that's why promises are bad [23:01] westg: :) [23:02] heavysixer has joined the channel [23:02] kitt has joined the channel [23:03] kitt has left the channel [23:03] ljharb: i definitely don't need the majority of the features in a promises library, but since i don't want to reinvent the wheel, it seems to still have value for the parts i need [23:03] perezd: in 0.6 is there a way to inspect the path node is using? [23:04] felixge has joined the channel [23:04] ljharb: rlidwka: ok i found async.series in caolan/async - that might be just what i need. is that what you were thinking of? [23:05] lcampbell has joined the channel [23:05] westg: async + coffeescript looks nearly human readable [23:05] lcampbell: Quick question -- I'm looking for a node module to do per-request method profiling. Anyone know of an existing one? [23:05] ljharb: westg: i'll endure an inordinate amount of work to avoid using coffeescript. i find it far less readable. [23:06] epa_ has joined the channel [23:06] westg: yeah I don't use coffeescript either [23:06] WarheadsSE: TooTallNate: lol @ v8 .. 3.9.17 kicks the same gyp problem about armv7==1 ... [23:06] creationix: lcampbell, if you wrap the event sources you can profile some with Date.new() before and after the root function call [23:06] westg: but async really helps make callbacks look clean [23:06] Es0teric: how do i get node to communivate with php? [23:06] westg: did you really just ask that ^ [23:06] creationix: lcampbell, and chain event sources to a request [23:06] TooTallNate: WarheadsSE: what do you mean? [23:07] creationix: lcampbell, it's very tricky and there is no out-of-the-box module to do that [23:07] lcampbell: creationix: Heh, that's why I was looking for an out-of-the-box solution. [23:07] WarheadsSE: same failure in pulling in the deps name 'armv7' is not defined while evaluating condition 'armv7==1' in tools/gyp/v8.gyp [23:07] lcampbell: There's lots of caveats that I probably won't consider until it's expensive to fix. [23:07] westg: lcampbell: can't you write a module for that [23:07] creationix: lcampbell, here is the event source wrappings I wrote for crabdude https://github.com/CrabDude/trycatch/blob/master/lib/hook.js [23:07] westg: ? [23:08] Raynos: Anyone familiar with how to efficiently use mongodb native driver? [23:08] lcampbell: westg: Certainly. I just wanted to perform due diligence before setting off on an adventure. [23:08] westg: totally agree ^ [23:08] westg: I wish there was a module for that already [23:08] pct has joined the channel [23:08] WarheadsSE: TooTallNate: seems that that is a carry over problem. *whee* [23:09] TooTallNate: WarheadsSE: you mean you having to manually set the variable? [23:09] lcampbell: creationix: that's a much cleaner approach than I was considering. [23:09] AviMarcus: or console.time('name') and console.timeEnd('name') [23:09] AviMarcus: Es0teric, in what way..? [23:09] AviMarcus: you can share a database, messaging with a library like zeromq.. there's other options I'm sure.. [23:09] AviMarcus: php can curl a url served by node [23:10] Raynos: I wrote a mongo benchmark (https://github.com/Raynos/mongo-col/blob/master/benchmarks/benchmarks.js) feedback on best practices appreciated [23:10] Es0teric: AviMarcus my question is would the data be pushed from php to node in real time? [23:10] AviMarcus: Es0teric, what kind of data? what are you doing? You can use zeromq to push out events in php, and have node listen to them and use whatever handlers you want [23:11] Es0teric: AviMarcus oh really? [23:11] AviMarcus: yep: http://www.zeromq.org/ [23:11] argami has joined the channel [23:11] Es0teric: AviMarcus all these events zeromq pushes when node recieves it [23:11] Es0teric: it will be in real time [23:11] Es0teric: right? [23:11] WarheadsSE: TooTallNate: ah! export GYPFLAGS="-Darmv7=0" [23:12] TooTallNate: WarheadsSE: like i've said a few times, node's ./configure script needs some patches to define that variable when necessary [23:12] WarheadsSE: yes, you have to manuall set this variable.. apparently [23:12] Es0teric: so zeromq pretty much gives php socket layers [23:12] WarheadsSE: lol, this is v8! [23:12] Es0teric: like [23:12] Es0teric: socket.io to nodejs [23:12] Es0teric: right? [23:12] TooTallNate: WarheadsSE: are you compiling v8 straight up? as a shared lib? [23:13] jj0hns0n has joined the channel [23:13] AviMarcus: socket.io is made to be used over WAN from a browser [23:13] AviMarcus: this is a far simpler issue [23:14] AviMarcus: but yeah, it's realtime as long as something is pushing and node is listening [23:14] WarheadsSE: TooTallNate: in this case, for testing, yes [23:14] WarheadsSE: it works best for us with v8 seperate lib [23:14] Es0teric: AviMarcus because i just want to have node talk to any php script to recieve events in real time or send events [23:14] thinkt4nk has joined the channel [23:14] brianseeders has joined the channel [23:15] Es0teric: an 'event' in this case would be data into a database [23:15] Es0teric: or something [23:15] satyr has joined the channel [23:15] TooTallNate: WarheadsSE: ok, well i guess v8 expects you to invoke gyp with "-Darmv7=0" [23:15] argami_ has joined the channel [23:15] TooTallNate: or the env variable as you already found [23:15] mattgifford has joined the channel [23:15] westg: php and node are thousands of miles apart in their evolution [23:15] westg: thousands of years* [23:15] bindr has joined the channel [23:15] westg: metaphorically [23:16] Es0teric: westg yeah but i want to be able to talk [23:16] Es0teric: to the php [23:16] westg: plus why would you want one server side lang to communicate with another server side lang [23:16] warz has joined the channel [23:16] warz has joined the channel [23:16] TheFuzzb_: Does anyone here use the sqlite3 module? [23:16] hex`: on http://mongod, all options give me "REST is not enabled. use --rest to turn on." Where do I use this --rest option? I tried "mongod --rest" on the command line, but I think that's not the correct place to go [23:16] AviMarcus: westg, legacy code that's already written? [23:16] TooTallNate: TheFuzzb_: i've used it enough to make it work on windows... which wasn't much :D [23:17] bindr has joined the channel [23:17] Es0teric: westg i was thinking of having node on the client side [23:17] AviMarcus: Es0teric, if you want to LISTEN with php you need to do a funny loop and stuff. It's not nearly as clean as the async listening in node. [23:17] TheFuzzb_: I am doing a query - SELECT artist.name, album.name FROM album INNER JOIN artist ON artist.id = album.artist_id; [23:18] bindr_ has joined the channel [23:18] TheFuzzb_: This works in sqlite3 directly, but because sqlite3 spits this back as an object, and an object cannot have two members with the same name, the album.name always overrides artist.name [23:19] Es0teric: AviMarcus i see.. [23:19] TheFuzzb_: Is there a way to map the results to the full name, or another name? [23:19] AviMarcus: TheFuzzb_, a standard sql thing? [23:19] AviMarcus: " as album_name" [23:20] Es0teric: AviMarcus so basically with node, i'd be writing html files with javascript in them [23:20] Es0teric: right? [23:20] Es0teric: or JSON [23:20] TheFuzzb_: AviMarcus I've not used that before. *googles* [23:20] AviMarcus: you basically always need to do that when you do functions in your query.. e.g. max(amount) or whatever because otherwise you get very funny names.. [23:21] bingomanatee__ has left the channel [23:21] Es0teric: i see [23:21] AviMarcus: erm I was answering TheFuzzb_ [23:21] Es0teric: oh [23:21] AviMarcus: not sure what your question is, Es0teric [23:22] TheFuzzb_: AviMarcus Thanks a lot, looks like I've got a lot more SQL to learn :) [23:22] Es0teric: AviMarcus because i am debating wether i should use ONLY node… or have node talk to php because i am more familiar with php [23:22] AviMarcus: TheFuzzb_, me too :P [23:22] AviMarcus: why would you use node and php? [23:22] Es0teric: AviMarcus because i am more familiar with php [23:22] AviMarcus: you mean use node in the broswer? [23:23] steveoh has joined the channel [23:23] Es0teric: yeah [23:23] steveoh has left the channel [23:23] AviMarcus: that's javascript, not node :x [23:23] nikdo has joined the channel [23:23] Es0teric: node/socket.io in the browser then php on the server end [23:23] AviMarcus: node is an implementation of javascript for the server [23:23] aaronmcadam: Es0teric: there are other projects that might be better suited [23:23] Es0teric: aaronmcadam like what? [23:24] AviMarcus: node isn't for use in the browser [23:24] aaronmcadam: there are socket.io impls for Python, there's probably a Tornado for PHP [23:24] aaronmcadam: Tornadio [23:24] aaronmcadam: depending on what u want to do, Pusher might be better suited? [23:24] Es0teric: yeah but pusher is a paid service [23:24] aaronmcadam: trying to shape node into something if you "prefer" php [23:24] aaronmcadam: sounds like a false economy [23:25] AviMarcus: that said, one common language for your server and client side might be very appealing... but it's very different than php. [23:25] AviMarcus: ACTION is coming from php to node. a very different way of coding.. but oh how some things seem so much easier and faster to be able to do [23:25] AviMarcus: basically anything syncronous to node. [23:25] aaronmcadam: AviMarcus: that's a definite false economy too [23:26] Es0teric: what about APE [23:26] Es0teric: ? [23:27] aaronmcadam: There's also nothing wrong with having your node stuff separate and just have it act like a normal view [23:27] langworthy_ has joined the channel [23:27] aaronmcadam: Es0teric: http://groups.google.com/group/socket_io/browse_thread/thread/74a76896d2b72ccc [23:27] Es0teric: aaronmcadam well thats what i was thinking of [23:27] aaronmcadam: man the PHP curl API is so horrible [23:27] Es0teric: having node on the front, then having PHP cURL to talk to node [23:27] aaronmcadam: it's not node on the front [23:28] aaronmcadam: it's socket.io's js wrapper for web sockets [23:28] aaronmcadam: Es0teric: that google groups post is exactly that [23:28] Es0teric: i see [23:29] aaronmcadam: Socket.io just handles IE fallbacks and everything in a nice unified API [23:29] crutex: �� [23:29] aaronmcadam: on the frontend I mean [23:30] Es0teric: so it would make much more sense [23:30] Es0teric: to just have node [23:30] Es0teric: and socket.io [23:30] aaronmcadam: if that's all you want to do? [23:30] Es0teric: well you see [23:30] Es0teric: the thing is [23:30] Es0teric: i have a template [23:30] Es0teric: for the site [23:30] Es0teric: its already coded in php [23:30] galaxywatcher has joined the channel [23:30] Es0teric: but i didnt really finish all of it [23:30] Joeysomo has joined the channel [23:31] Es0teric: i have foreach loops that get data from the db [23:31] Es0teric: now, i want to be able to push that data in real time [23:31] Es0teric: doing AJAX requests for it [23:31] Es0teric: is rediculous imo [23:31] aaronmcadam: http://stackoverflow.com/questions/6398887/using-php-with-socket-io [23:31] mattgifford has joined the channel [23:32] aaronmcadam: Es0teric: well that's what's gonna happen in IE anyway [23:32] aaronmcadam: but yeah ws is perfect for that [23:32] HacDan_ has joined the channel [23:32] aaronmcadam: god, I just had to stop reading that PHP code, sorry, it's too painful [23:33] TheAlphaNerd has joined the channel [23:33] TheAlphaNerd: anyone around here have any luck with osc in node.js [23:33] TheAlphaNerd: ??? [23:33] TheAlphaNerd: trying to get this working http://automata.cc/osc-web [23:34] TheAlphaNerd: but I think some of the code is deprecated [23:34] gregpascale has joined the channel [23:35] Poetro has joined the channel [23:35] Es0teric: aaronmcadam ok so the idea is.. i connect to that socket then i would be able to push data from php to the specified socket then have node listen for that data? [23:35] crutex: �� [23:35] crutex: �� [23:35] Joeysomo has joined the channel [23:36] bindr has joined the channel [23:37] aaronmcadam: Es0teric: yeah, push json around, that'd work [23:37] aaronmcadam: if you must use php for your db retrieval [23:38] Es0teric: aaronmcadam theres a node module that can retrieve stuff from the db right? [23:38] aaronmcadam: ... [23:38] aaronmcadam: Es0teric: there's db drivers for a few, of course man [23:38] aaronmcadam: node-mysql [23:38] Es0teric: i see [23:39] Es0teric: but why cant i just json_encode the data out to a page then have node recieve it? [23:39] aaronmcadam: is *that* all ur doing? [23:39] kmurph79 has joined the channel [23:39] aaronmcadam: there's nothing stopping u, but it seems like a waste [23:39] Es0teric: aaronmcadam well i am just trying to get this from all angles [23:39] Es0teric: because i want the real time data capability [23:40] aaronmcadam: all ur doing is a db query -> real time stream? [23:40] Es0teric: aaronmcadam well pretty much [23:40] sugyan has joined the channel [23:41] aaronmcadam: i guess it would work if u wanted to let php handle the db and node handle the stream [23:41] Es0teric: thats what i am saying... [23:41] aaronmcadam: yeh [23:41] Es0teric: aaronmcadam thats what i am trying to figure out right now [23:41] aaronmcadam: try it [23:41] Es0teric: would i have to run node side-by-side with php? [23:41] Es0teric: like have php listen to port 3000 [23:42] Es0teric: then have node handle the data being pushed to port 3000? [23:42] aaronmcadam: there is a really dirty hacky way of running node from php [23:42] aaronmcadam: but I'd stay away from that [23:42] Es0teric: aaronmcadam yeah [23:42] aaronmcadam: hmm [23:42] WarheadsSE: sounds like just implement an API in php via REST, and have node call it [23:43] aaronmcadam: bingo [23:43] Es0teric: WarheadsSE say what? [23:43] WarheadsSE: simplest method, just pass JSON around [23:43] aaronmcadam: omg rly? haha [23:43] aaronmcadam: that'd be easy [23:43] WarheadsSE: it'd be cake [23:43] andrewde` has joined the channel [23:44] aaronmcadam: then a bit of sexy front end templating, and your done [23:44] Es0teric: WarheadsSE so you mean create an API? [23:44] WarheadsSE: yes.. "implement an API in php via REST" [23:44] aaronmcadam: even a view [23:44] samuelgoodwin has joined the channel [23:44] Es0teric: hmm [23:44] aaronmcadam: that just returns what you want, same difference [23:44] samuelgoodwin: evening folks [23:44] automata: TheAlphaNerd, yes, that is deprecated, I hope to fix that as soon as possible [23:45] zeade has joined the channel [23:45] TheAlphaNerd: automata: I have a thesis project I am working on right now… that really needs some socket based OSC stuff [23:45] aaronmcadam: something horrible looking like: `return json_encode( $db->excute"SELECT * FROM.." ) ` [23:45] TheAlphaNerd: is there any sort of lead you can give me so that I might try and fix the problem? [23:46] TheAlphaNerd: that being said I'm a total node newb [23:46] automata: TheAlphaNerd, yes, it is a matter of understand node-osc and update that on osc-web repos [23:46] stantona has joined the channel [23:47] misza222 has joined the channel [23:47] copongcopong has joined the channel [23:47] TooTallNate: WarheadsSE: did you get things compiled? [23:47] automata: TheAlphaNerd, https://github.com/hanshuebner/node-osc [23:48] LukeNukem has joined the channel [23:48] LukeNukem: Hello all [23:48] LukeNukem: hi [23:48] automata: TheAlphaNerd, I'd be glad to support on anything possible if you try to update osc-web [23:48] crutex: �� [23:49] TheAlphaNerd: right on… I'll definitely need a bit of handholding :D [23:49] TheAlphaNerd: I'm building an installation [23:49] totallymike: Okay, I'm back. The documentation page for mocha mentions describe and it et cetera quite often, but I'm not exactly sure how they're used. [23:49] TheAlphaNerd: embedding a beagle board, router, and amp in a moded speaker cab [23:49] crutex: �� [23:49] TheAlphaNerd: using another computer on the network to host some web apps [23:49] TheAlphaNerd: trying to make it so people can change the installation from the browser on their phones [23:50] totallymike: What does describe do? Sometimes there are hash marks in front of the term described, sometimes dots, is there a documentation for what all that means? [23:50] pgte has joined the channel [23:50] automata: TheAlphaNerd, wow, sounds pretty interesting! I really want to help you on that [23:50] TheAlphaNerd: thanks :D [23:50] TheAlphaNerd: the project is called the autonomous speaker bot [23:50] automata: I have done some sound installations too [23:50] TheAlphaNerd: I have everything up and going but the web app [23:50] redir has joined the channel [23:50] TheAlphaNerd: which I've never done before [23:51] TheAlphaNerd: I can quickly make something work with php + jquery [23:51] TheAlphaNerd: but I wanted to do something with sexy sexy sockets [23:51] Poetro: totallymike: just check the test directory in the GH repo [23:51] totallymike: Mocha's test directory? [23:51] automata: TheAlphaNerd, you're right, sockets are so pretty [23:51] Poetro: totallymike: y [23:52] h00k has joined the channel [23:52] automata: TheAlphaNerd, a good start is to take a look at node-osc [23:52] WarheadsSE: TooTallNate: lol.. it was.. i forgot to turn swap on.. [23:52] Poetro: totallymike: u'll see a bunch of examples there, that tests mocha itself [23:52] TheAlphaNerd: yeah I've been working in stages [23:52] TheAlphaNerd: I got a hello world thing to work with node.js [23:52] automata: hans huebner did a wonderful work on that [23:52] LukeNukem: Hello [23:52] TheAlphaNerd: and started to get my head wrapped around npm [23:52] TooTallNate: WarheadsSE: ahhh!!! you need zee swap!!! [23:52] TooTallNate: at least i did too :p [23:52] totallymike: Is there a place where exactly what describe means is laid out, and what the first parameter actually does? [23:53] automata: TheAlphaNerd, stay in touch, get my email at http://automata.cc/bio and feel free to write [23:53] TooTallNate: when compiling on my iPhone i don't need any swap :) [23:53] TheAlphaNerd: will do [23:53] WarheadsSE: try compiling on 128MB of ram :p [23:53] Poetro: totallymike: the documentation page has enough information to get u started [23:53] WarheadsSE: TheAlphaNerd: which beagle? [23:53] TheAlphaNerd: XM [23:53] WarheadsSE: ah, omap4 [23:53] TheAlphaNerd: running the CCRMA satellite build [23:53] TheAlphaNerd: ubuntu maverick [23:53] WarheadsSE: ACTION barfs [23:53] automata: speaking in beagle, I'm looking for the rhaspberry pi [23:54] TheAlphaNerd: with jack, puredata, super collider etc etc [23:54] TheAlphaNerd: I have two super colliders on the way [23:54] crutex: �� [23:54] Poetro: totallymike: describe sets up a test suit, it does the test itself [23:54] automata: sc on a beagle, cool [23:54] TheAlphaNerd: WarheadsSE: in retrospect I wouldn't have gone with the beagle… but knowing I had an image with all the dsp stuff working was a total selling point [23:54] WarheadsSE: true [23:54] totallymike: So is the first parameter just a string that gets printed? [23:54] Poetro: totallymike: if u r into TDD there is suit, and test, but they are basically the same [23:55] Poetro: totallymike: y [23:55] ramitos has joined the channel [23:55] totallymike: Poetro: huh? [23:55] TheAlphaNerd: automata: http://pastebin.com/bexUk45X [23:55] totallymike: What are the same? [23:55] Poetro: totallymike: describe just sets up a suit, that has a name, that will be printed [23:55] LukeNukem: Hello good people :) [23:55] totallymike: Okay. [23:56] TheAlphaNerd: this is what happens when I try to run hanshuebner node [23:56] TheAlphaNerd: osc [23:56] totallymike: LukeNukem: you've said hello several times. We're all happy to see you here, but if you have a question, go ahead and ask it. [23:56] Poetro: totallymike: and each suit can have multiple tests [23:56] totallymike: Thank you Poetro [23:56] Poetro: totallymike: and even a suit can have embeded suits [23:56] \mSg has joined the channel [23:57] Poetro: *suite [23:57] LukeNukem: can node.js work alongside php? [23:57] LukeNukem: im confused [23:57] Poetro: LukeNukem: yes [23:57] Poetro: LukeNukem: just define alongside [23:57] dthompso99 has joined the channel [23:57] WarheadsSE: they won't both run on port 80 on the same IP :p [23:58] Poetro: u can set up your webserver to proxy some url to the node process [23:58] LukeNukem: Poetro, alongside as in i can use php for querying data from mysqli and at the same time use node.js for doing it realtime [23:58] LukeNukem: mysql* [23:59] WarheadsSE: aka, can two processes access my MySQL ? [23:59] Poetro: LukeNukem: yes, u can do that, but that'll require the webserver to proxy some requests to Node, or use node on a different subdomain / port