[00:00] sonnym has joined the channel [00:01] saschagehlich has left the channel [00:02] daveyjoe: How do I access session information in a web socket (using socket.io + express)? [00:04] ossareh_ has joined the channel [00:05] kiddphunk has joined the channel [00:06] yozgrahame has joined the channel [00:07] AliG has joined the channel [00:09] AliG: yo yo yo [00:09] AliG: What's up my async prodigies? [00:09] AliG: Okay, for real. I got a question for yo [00:09] AliG: What's up with node.js and websockets? Is that shiz for real, or not? [00:10] maritz has left the channel [00:10] pandark_ has joined the channel [00:10] AliG: Node.js tends ot be used for stateless HTTP requests. How is it with websockets that stay open? [00:10] AliG: *to [00:10] devinus: wtf. did anybody else know that [1,,3] and 5..toString() was valid syntax? [00:11] stride: AliG: many people use it for websockets, often using socket.io to provide fallbacks for older browsers [00:12] perlmonkey2 has joined the channel [00:12] AliG: So, how does that work then? The browser sends some data down the websocket and node.js wakes up and runs your event handler? [00:12] perlmonkey2: okay, stupid question. Installing node on my netbook and ./configure --destdir=/home/myuser/opt doesn't seem to affect the dir it uses for the root dir. [00:13] AliG: Then you send data back to the client when you have it, for example [00:13] AliG: And you go back to sleep? [00:13] perlmonkey2: Got to be doing something retarded just can't figure out what. [00:13] AliG: (while the connection stays open) [00:14] opengeard has joined the channel [00:15] stride: AliG: the browser sends an upgrade request and afterwards it works just like any other tcp connection on the node side iirc [00:16] AliG: stride: Upgrade request when websockets isn't supported, or always? [00:16] AliG: Sounds like polling [00:17] augustl: semi off topic: are certificates required to encrypt socket traffic? Or is there a certificate-less way of doing it? [00:17] stride: no, the browser sends a request that indicates that the connection this request comes from should be "upgraded" to a full tcp connection (aka websocket) [00:18] saikat has joined the channel [00:19] AliG: augustl: I saw a Javascript library that implements 64-bit asymmetic crypto lol [00:19] stride: augustl: typically, yes. you could of course encrypt your stuff with a caesar chiffre and send out passwords and decryption software to your clients by snail mail but that wouldn't really make sense :) [00:19] Bonuspunkt: every fucking browser says encodeURI('ü') = '%C3%BC', but not node :( [00:19] stride: Bonuspunkt: my node does [00:20] Bonuspunkt: o.O [00:20] AliG: stride: So the upgrade thing is specific to node then [00:20] stride: AliG: no, it's specific to websockets [00:20] ryah_: ACTION waves [00:20] Evet has joined the channel [00:20] Bonuspunkt: stride version? [00:20] stride: hey ryah_ [00:21] AliG: stride: So this is how the web server tells the difference between garden-variety HTTP GET and POST requests and when the browser wants a full-duplex socket [00:21] stride: Bonuspunkt: should be 0.3.1 on that box I think [00:21] stride: AliG: yeah [00:23] saschagehlich has joined the channel [00:23] saschagehlich: did anyone ever use emitter.setMaxListeners()?! [00:24] ziro` has joined the channel [00:24] ryah_: saschagehlich: well - i implemented it [00:25] ryah_: saschagehlich: what do you think? [00:25] ryah_: how's it going here? are people helping the n00bs? [00:25] saschagehlich: well I just saw that I'm getting that message "warning: possible EventEmitter memory leak detected. 11 listeners added." from socket.io [00:25] saschagehlich: so is it just emitter.setMaxListeners(11); to stop node from showing this message? [00:26] ryah_: saschagehlich: yes, but are you maybe leaking listeners? [00:26] saschagehlich: well not me but socket.io [00:26] saschagehlich: I already told guillermo but he didn't answer yet [00:26] ryah_: hm [00:27] ryah_: okay - well this is good then [00:27] ryah_: maybe it found a memory leak :) [00:27] mjr_: I enjoy helping n00bs [00:27] saschagehlich: well I knew that one before, it's jsonp-polling that's leaking but I didn't tell guille yet. I will have a closer look at this one later though [00:28] ossareh has joined the channel [00:31] ossareh_ has joined the channel [00:31] stride: stagas: is the current chaos HEAD on github stable? [00:31] saschagehlich: but ryah_ , good job on the recent changes on node. I updated to 0.3.5-pre today and 90% of my leaks just disappeared - now my project finally works fine! [00:31] devinus: reaing /r/programming makes my blood boil these days [00:31] ryah_: saschagehlich: oh, good to hear [00:32] devinus: may need to start eating less salt -.- [00:32] ryah_: saschagehlich: i don't know of any memory leaks in 0.2 though... [00:32] ryah_: saschagehlich: any idea what it was you were doing? [00:33] saschagehlich: ryah_: well me either, didn't find anything about that but my process shut down after half an hour or so because the used heap was at 900MB or so [00:33] saschagehlich: well I just updated from 0.2.3 to the latest commit and now it works fine for hours [00:33] creationix has joined the channel [00:33] mfernest has joined the channel [00:36] ryah_: hm - well good [00:36] Bonuspunkt: stride updated from 0.2.6 to 0.3.1 and still get that weird encodeURI('ü') issue [00:36] ryah_: glad things are improving at least [00:37] saschagehlich: well yeah, definitely. I was looking for leaks for hours and now an update simply did it - awesome [00:38] saschagehlich: I'll give you an update about how long it runs without crashing [00:38] AAA_awright_ has joined the channel [00:38] ryah_: saschagehlich: what's your app do? socket.io? [00:39] stride: Bonuspunkt: where do you get that ü from? a file? which encoding does that file use and what is the result you get? [00:39] saschagehlich: ryah_: redis, socket.io, express.js [00:39] ryah_: bbl [00:41] booo has joined the channel [00:41] ossareh has joined the channel [00:41] Bonuspunkt: stride ty, changing the encoding of the file to UTF8 fixed my problen [00:42] ossareh_ has joined the channel [00:44] AliG: Do you guys see Internet being more ubiquitous in the next five years? [00:45] AliG: i.e., more and cheaper wireless Internet in more places like on trains and jets [00:45] brapse has joined the channel [00:45] AliG: ACTION is thinking about the practicality of building a web app that depends on a socket connection to work at all. [00:45] Aria: Yes. That's just started now, so that one's pretty easy to spot. [00:45] AliG: Aria: yeah [00:46] eikke: AliG: there's no huge technical difficulties, there's demand, and there's a revenue model, so I cant see why it wouldnt happen [00:47] mnbvasd_: ACTION gets tired and frustrated and launches his toys out the pram. [00:48] mnbvasd_: any idea how js handles a binary md5 tagged onto a utf8 string, then md5'd into hex? [00:49] hunterloftis has joined the channel [00:49] Aria: 'tagged on'? [00:49] softdrink has joined the channel [00:49] AliG: eikke: I'm kind of surprised that the MTA still hasn't set up cell towers in the subway. They could use the extra revenue [00:49] eikke: AliG: no clue, I'm not american [00:49] mnbvasd_: result = md5hex ( binarymd5 + text ); ? [00:50] AliG: I know the London tube is doing a WiFi trial atm [00:50] Aria: Uh... what is 'md5hex' in this case, mnbvasd_? I'm not sure what you're asking. [00:50] ossareh_ has joined the channel [00:51] Aria: "md5" has nothing to do with "hex"... md5 gives a hash. how you represent that is up to what you're doing with it. [00:51] Aria: There's no [00:51] Aria: 'binary' or 'hex' md5 ... md5 takes bytes as input, and gives a hash as an output. [00:51] mnbvasd_: Aria: it's an md5 output from the node crypt module. [00:51] mnbvasd_: and a hex output from that. [00:51] Aria: Okay, so the digest as node represents it as a hexadecimal string. [00:51] mnbvasd_: I'm just failing badly to do md5-digest auth. [00:52] Aria: Well, you're going to want to use buffers, for one. [00:52] mnbvasd_: oh to put the string to md5 in? [00:52] Aria: So you can see the bytes going in, not something encoded. Adding character encodings to the middle of that is only going to be a lesson in pain [00:52] Aria: Yeah. [00:52] Aria: md5 operates on bytes, not on a series of codepoints. [00:53] mnbvasd_: ah yeah, I think it all drops into place now :) [00:53] dnolen has joined the channel [00:53] Aria: (keep in mind that javascript strings more resemble an array of 16-bit numbers than a series of bytes in memory.) [00:53] mnbvasd_: rfc2183 has been kicking me for a good few hours, it looked simple at first, and examples around the web look similar to mine. [00:54] Aria: Hehe. yeah. It's mostly that that will bite you. [00:54] Aria: I think that string-handling and the encoding issues in Javascript are pain. [00:54] mnbvasd_: yeah, it makes a lot more sense to me now. [00:54] mnbvasd_: :) [00:56] kiddphunk has joined the channel [00:56] mnbvasd_: and when I can understand what's happening to my bits and bytes, I can easly fix my probs :) [00:56] mnbvasd_: ok, I'll take a look in the morning with a fresh mind :) [00:57] mnbvasd_: Aria: thanks :D [00:57] Aria: Sure thing! [00:57] eazyigz__: how do ya'll feel about narwhal? Is it worth a look for somebody who is interesested in serverside javascript? [00:58] eazyigz__: Also, I'm trying to understand jsgi, because I belive it runs on Google App Engine. Where does Nodejs come in with these technologies? [00:58] bluegene: i have the problem that after some time nodejs does not send http requests anymore (req.end() is executed though). any idea? [00:59] Aria: eazyigz__. narwhal's fine. node's just more interesting to me being all-async and not all JVM. [01:00] Aria: eazyigz__. jsgi is annoying because it's synchronous. [01:00] Aria: That's why node doesn't fit into it. [01:00] eazyigz__: aaah, gotcha [01:02] bmizerany has joined the channel [01:03] emacsen has joined the channel [01:05] ossareh has joined the channel [01:05] masahiroh has joined the channel [01:05] creationix: I think I figured out why I'm hesitant to learn more C++ [01:05] creationix: my lack of experience with it is the only thing keeping my NIH tendencies from re-implementing all of node from the ground up [01:07] emacsen: I have a dumb newbie question. With these async calls, I'm unsure how to set a value based on the return of another call. Like I'd like to say : mtime = fs.stat(path, function(e,s){return s.mtime}) but that doesn't work [01:07] softdrink has joined the channel [01:08] agilandfast has joined the channel [01:08] creationix: emacsen: you can't [01:08] creationix: async calls don't return values [01:08] creationix: your logic from there on has to be triggered by the callback [01:08] emacsen: creationix, I understand... so how do I get the same result? [01:08] creationix: on a new execution stack [01:09] eikke: ACTION wishes V8 would have coroutine support when writing node.js code [01:09] creationix: fs.stat(path, function (e,s){var mtime = s.mtime}) [01:09] creationix: eikke: you don't know what you ask for [01:09] eikke: creationix: I'm pretty sure I do [01:09] emacsen: creationix, okay... so in this case I'm creating a hash of values and I want to grab the mtime and put it in that hash. How can I do that using the fs.stat call? [01:10] creationix: emacsen: there is a fs.statSync call if you're ok with blocking the event loop [01:10] maushu_: creationix, how hard would it be to change javascript syntax to make async calls transparent? [01:10] creationix: but don't do that in any running server [01:11] eikke: maushu_: would be possible with coroutines, that was my point ;) [01:11] maushu_: Oh. [01:11] creationix: maushu_: right, that's that coroutines are good for [01:11] creationix: but they don't come without a cost [01:11] emacsen: creationix, right... I'm looking for the "right way" [01:11] creationix: there is a lot of subtle complexity [01:12] creationix: emacsen: basically any function that depends on any other async function has to become async itself [01:12] creationix: so whatever function is gathering the values and putting them in a hash needs it's own callback [01:12] creationix: and you don't call the callback till all your inner callbacks have fired and you have all the data you want [01:12] c0nundrum has joined the channel [01:12] creationix: emacsen: http://howtonode.org/control-flow [01:13] creationix: eikke: I'm not saying I wouldn't love to play with coroutines and see if the benifits outweigh the costs [01:13] emacsen: creationix, okay... I think I'm with you... I'll read that. I'm still a little confused on how to actually get all those values and capture them [01:13] ashleydev has joined the channel [01:13] eikke: creationix: I'm not sure which costs you see [01:13] creationix: emacsen: closures are your friend when dealing with callbacks [01:13] creationix: eikke: performance and hidden complexity [01:14] creationix: eikke: data can change out from under you in a seemingly syncronous piece of code [01:14] creationix: and multiple execution stacks cost too [01:14] creationix: and you're still stuck on one core [01:14] creationix: at least with threads you can use more than one core [01:15] emacsen: creationix, hrm... yeah... this is good. My brain hurts similarly to when I do lisp, my brain hurts for a while, or when I drink too much [01:15] creationix: emacsen: lol [01:15] eikke: creationix: don't really see what you mean with the changing data thing [01:15] guybrush: mh i still didn't find a cool way to serve my static files on a specific route --- currently i have to make a directory ~/lib with bla/blub.js in it to serve it on localhost/lib/bla/blub.js via connect.staticProvider(~) --- is there a better way to serve bla/blub.js on /lib without having to do ~/lib? [01:15] creationix: emacsen: and I have about 5 other control-flow articles on there [01:16] creationix: eikke: what I mean is while I'm "blocked" some other execution stack might change the value of a variable I'm using [01:16] eikke: creationix: multiple execution stacks -> true, although I dont know which stack V8 uses for JS execution? does it use the 'normal' stack? [01:16] tim_smart has joined the channel [01:16] creationix: coroutines, by definition are multiple stack [01:16] guybrush: i could do url-rewrite, but this is imho not very clean way [01:16] emacsen: creationix, okay... well if you wouldn't mind sending me them, that'd be good. in this case all I'm trying to do is read a directory, get all the files, and then map over the files and do some function that returns a hash of values [01:17] emacsen: creationix, so it could be done all async, and it should be. I know I'm the impediment to it [01:17] creationix: emacsen: just look on the right column for other articles written by me [01:17] creationix: emacsen: do only as much async as you need to, but anything that depends on any IO will become async [01:17] creationix: I've seen some people go overboard and do things like function add(a, b, callback){...} [01:17] creationix: which is silly unless a and b are filenames to data on the disk [01:18] emacsen: well if it's CPU bound, there's not much of a point. I tend to think async makes sense when you're doing anything IO [01:18] x_or has joined the channel [01:18] creationix: emacsen: exactely [01:18] creationix: emacsen: also if you have time, there are about 10 different threads in the node mailing list about techniques for async code [01:19] eikke: creationix: the change-behind-your-back is an educational problem I think. In the end coroutines are just some sugar on top of callbacks (and a fairly simple mapping, actually), so if people know what can happen when using exlpicit callbacks, they can know what can happen when using coroutines [01:19] ossareh has joined the channel [01:19] eikke: anyway :) off to bed [01:19] emacsen: creationix, and they're linked on your blog? [01:19] creationix: emacsen: not the mailing list threads [01:19] creationix: emacsen: also this might be useful creationix.com/jsconf.pdf [01:19] emacsen: creationix, thx [01:19] creationix: eikke: ok, but when you're back I would like to talk more [01:19] creationix: get some rest [01:19] jimt has joined the channel [01:23] softdrink1 has joined the channel [01:25] creationix: has anyone here experience with mozilla's implementation of coroutines [01:25] creationix: someone could clone the node apis but use spidermonkey instead of v8 for some fun [01:26] bmizerany has joined the channel [01:31] tanepiper: https://developer.mozilla.org/en/JavaScript_typed_arrays interesting [01:31] softdrink has joined the channel [01:31] kaichen has joined the channel [01:31] tanepiper: just landed in the latest FF4 beta [01:32] creationix: tanepiper: nice [01:32] shaver: they're actually oin the previous beta [01:32] shaver: have been in for a fair while [01:32] tanepiper: shaver: sound like they are being pushed for WebGL performance, but wonder if it can be ported to V8 [01:32] creationix: that API should be easy to clone on top of node Buffers [01:32] tanepiper: (well it can, but when) [01:33] tanepiper: creationix: oh, that would be cool [01:33] shaver: V8 should have them too, since Chrome supports the typed arrays for WebGL [01:33] creationix: I started on it a while back, but got busy with real work [01:33] tmzt: what does the Buffer use when it's exposed to javascript? [01:33] shaver: creationix: the SM port or the V8 typed array stuff? [01:33] tmzt: or can it be [01:34] creationix: shaver: the typed array API in node [01:34] shaver: tmzt: I don't understand the question [01:34] Nevtus has joined the channel [01:36] creationix: hmm, I don't see mention of the DataView part of the api [01:36] creationix: is it based on the Khronos spec? [01:36] creationix: http://www.khronos.org/registry/webgl/doc/spec/TypedArray-spec.html [01:37] creationix: most data streams in node aren't a stream of homogeneous data [01:37] creationix: it's some binary protocol [01:38] creationix: ACTION goes to download the lastest firefox beta [01:39] jashkenas has joined the channel [01:39] admc has joined the channel [01:45] q_no has joined the channel [01:49] ajcool has joined the channel [01:51] creationix: hmm, the typedarrays in ff4 don't seem very useful outside of webgl [01:51] AliG: How good is Javascript at bitwise operations now in node.js? [01:52] creationix: AliG: define good [01:52] creationix: V8 makes them pretty fast [01:52] creationix: their behavior is defined by the language [01:53] kiddphunk has joined the channel [01:53] shaver: creationix: they're pretty useful for some simulation stuff too, or banging on things like compression or images [01:53] emacsen: creationix, I'm slowly absorbing your blog post. I just don't have a ton of (no) JS prototype experience [01:53] creationix: shaver: I guess so [01:53] creationix: emacsen: take you time, it's worth it to understand those concepts [01:53] creationix: let me know if you have any questions [01:54] emacsen: creationix, I'm just confused... so basically I'm using a closure to "keep state" between these callbacks [01:54] creationix: ACTION ponders an interesting idea... [01:54] shaver: creationix: people use them for FFTs on audio buffers in FF4, for example, or skinning stuff [01:54] creationix: shaver: right, but I'm just comparing it to node's Buffer API [01:54] nonnikcam has joined the channel [01:54] shaver: ah [01:55] creationix: either can do the work of the other [01:55] shaver: quite [01:55] mikeal has joined the channel [01:55] creationix: (well except node's api won't convert a float to 8 bytes for you) [01:55] shaver: though does the Buffer API get additional optimizations due to known type constraints? [01:55] shaver: that's one of the advantages of the typed array stuff [01:55] shaver: can make a big difference in perf [01:55] creationix: shaver: node's buffer is simply a raw malloc where you can set and get bytes [01:56] creationix: doesn't get much faster than that [01:56] creationix: emacsen: right, the closure outside all your callbacks gives you a limited scope for "global" variables [01:56] blowery_off has joined the channel [01:56] creationix: so you don't have to pass them along each callback jump [01:57] creationix: If I held a JavaScript course at my house every Saturday, would anyone come? [01:57] emacsen: creationix, okay... god... it's been a long time since I constructed closures like this. Usually there's some symantic sugar, like when doing lazy lists or something [01:58] emacsen: creationix, where do you live? [01:58] creationix: Sunnyvale, CA [01:58] brapse has joined the channel [01:58] emacsen: a bit far [01:58] creationix: emacsen: where are you? [01:58] shaver: creationix: well, it does get faster if the JIT knows what types and ranges it's dealing with, and doesn't have to type guard or look up properties [01:58] emacsen: Washington, DC [01:58] shaver: (or call a native-C getter) [01:58] creationix: shaver: good point [01:59] creationix: shaver: still, I think typed arrays as a spec would be useful in v8 [01:59] shaver: we'll see them in ES6, I'm pretty sure [01:59] creationix: emacsen: yeah, that's pretty far. I did make my blog for people who can't meet in person though [02:00] creationix: shaver: if that ever exists [02:00] shaver: and I thought V8 had them, though [02:00] shaver: creationix: progress seems good on the list, stuff getting locked down [02:00] shaver: hmm [02:00] shaver: http://code.google.com/p/v8/issues/detail?id=1005 [02:00] shaver: so maybe not [02:01] creationix: shaver: interesting [02:01] emacsen: creationix, is there a resource you recommend on prototype and closures in js? [02:02] shaver: they already optimize one typed array, the one that comes out of canvas.imageData [02:02] creationix: emacsen: on my blog there is "what is this", "why use closures" and "object graphs" versions 1,2, and 3 [02:02] creationix: the MDC is great for javascript reference [02:02] emacsen: creationix, okay! :) [02:02] creationix: the ES5 spec is fairly easy to read (as far as specs go at least) [02:03] shaver: simon willison's re-introduction to JS is great too [02:03] shaver: there's a copy on MDC [02:03] creationix: shaver: how long has that been there [02:03] creationix: I only wrote my articles because I couldn't find much on the net [02:04] emacsen: creationix, thanks for your help. I'll be back in a day or two :) [02:04] creationix: emacsen: no problem [02:04] emacsen: creationix, should collect em and make a book [02:04] shaver: creationix: 3 yeras? [02:04] creationix: shaver: nice [02:04] creationix: shaver: I guess I just didn't look hard enough [02:04] creationix: I guess it's ok to have multiple sources of information anyway [02:04] mscdex: node.js rules! [02:04] shaver: almost 5 years, in fact [02:04] shaver: https://developer.mozilla.org/en/JavaScript/A_re-introduction_to_JavaScript [02:04] shaver: march 2006 [02:05] saschagehlich: mjr_: oh, just sent you a message on github, didn't know you are here - please ping back after you read it :) [02:06] boaz has joined the channel [02:07] Evet has joined the channel [02:08] blowery_off has joined the channel [02:09] creationix: mikeal: why is it that there aren't more programming classes? [02:09] benburkert has joined the channel [02:09] piscisaureu_ has joined the channel [02:10] dingomanatee: Yes! when it works! [02:12] dingomanatee: I tried to get a programming class session going in the PHP meetup group. [02:12] dingomanatee: I'd love to get a regular F2F node group going in San Francisco if anyone is interested. [02:12] creationix: dingomanatee: how did that go? [02:13] creationix: dingomanatee: I'm sure there is interest. I sortof had one for south bay last summer [02:13] dingomanatee: there was like 2-3 people who thought it was a good idea and the SFPHP meetup guy throught I was a douchebag trying tosqueeze free work from the bitches [02:13] creationix: dingomanatee: that sucks [02:13] dingomanatee: I'd like to do something maybe bounce between SF and San Mateo [02:13] x_or has joined the channel [02:14] dingomanatee: yeah ye was totally snarky to me in the meetup. [02:14] creationix: well, I plan to start having meetups again in Sunnyvale soon [02:14] dingomanatee: Cool. [02:14] creationix: if you want something up there, make sure to check with sh1mmer, ryah, and mikeal [02:15] dingomanatee: In the SF/SJ php community there has been a real diffusion - how would you feel about getting a rolling group that bounces between the SF and South Bay every 3 weeks or so? [02:15] creationix: dingomanatee: for php or node? [02:15] dingomanatee: That way we can pull people from all parts of the bay in and it won't balkanize. [02:15] dingomanatee: node. [02:15] creationix: my plan was to split meetings between halves [02:15] dingomanatee: I'll run it on meetup.com if you want. [02:15] dingomanatee: halves? [02:16] creationix: I'm sure Joyent is willing to sponsor stuff in the city [02:16] creationix: every other meeting [02:16] dingomanatee: cool. [02:16] SubStack: meetups, eh? [02:16] dingomanatee: that sounds good. [02:16] tanepiper: dingomanatee: he was probably embarrassed he still did PHP [02:16] creationix: Palm is willing to sponsor things down here [02:16] dingomanatee: The PHP community is not nearly as scared as it should be. [02:16] creationix: nor sure about in the middle, how many node people live there [02:16] dingomanatee: okay - do you want me to take point on meetup.com with this? [02:17] creationix: dingomanatee: what do you mean by take point? [02:17] dingomanatee: The way I see it if we bounce meetings between the south bay, SF and San Mateo (where I work and can host ) [02:17] dingomanatee: we can get 2 out of 3 meetings within everyone's reach. [02:17] creationix: well, when I had it in Palo Alto every few weeks there averaged about 50 people [02:17] dingomanatee: I'll grab a meetup.com group and start things off. [02:17] creationix: and node has grown a fair bit since them [02:18] dingomanatee: Well we can always ask Google to host. [02:18] dingomanatee: They are good with that sort of thing. [02:18] creationix: nah, palm is much more interested than google in node [02:18] creationix: and we've got the space [02:18] dingomanatee: oh you do? [02:18] dingomanatee: good. [02:18] creationix: I think the room we used last time at palm can seat over a hundred [02:19] dingomanatee: I don't know if Joyent has space but the PHP meetups are in CBS and sometimes Microsoft so I'm sure I can get those locations to host if we ask. [02:19] dingomanatee: sweet. [02:19] creationix: Joyent has a ton of small rooms [02:19] creationix: ryah_: you here? [02:19] dingomanatee: I'd like a bigger room that we can get everyone into. [02:20] dingomanatee: As long as people use indoor voices. [02:20] softdrink1 has joined the channel [02:20] dingomanatee: I'll bug isaacs or ryan about this. [02:20] creationix: either way, finding people to host shouldn't be a problem [02:20] shaver: room in MV at Mozilla for sure [02:20] creationix: the problem is following through and actually organizing the meetup [02:20] dingomanatee: I can do that. [02:20] creationix: shaver: where would that be? [02:20] shaver: mountain view, 5 min walk from caltrain [02:21] dingomanatee: I don't know if someone in Joyent would prefer that role but if they don't want to I will. [02:21] shaver: maybe 10 if you're short [02:21] creationix: dingomanatee: I'm not sure it meetup is good [02:21] shaver: could get organizing help and cater it [02:21] AliG: Are bitwise operations like AND and SHIFT LEFT and SHIFT RIGHT faster in V8 or PHP? [02:21] creationix: a mailing list is useful for planning [02:21] shaver: let me know: shaver@mozilla.com [02:21] shaver: AliG: v8 [02:21] dingomanatee: Its been fine for PHP and Ruby. [02:21] shaver: ACTION goes to dinner [02:21] dingomanatee: Its just an event registry. [02:21] stride: AliG: who cares [02:21] SubStack: AliG: that's pretty easy to test experimentally [02:22] piscisaure__ has joined the channel [02:22] creationix: AliG: if your program is bottlenecked on that kind of stuff you shouldn't be using any scripting language [02:22] creationix: but I do know v8 JIT compiles that kind of stuff and it's pretty darn fast [02:22] dingomanatee: I mean we can custom some node site to take in events but honestly its not the most original use of time I could think of. [02:22] creationix: dingomanatee: right, my favorite meetup group was a normal google group [02:22] dingomanatee: That would probably be fine. [02:23] davidascher has joined the channel [02:23] creationix: and meeting announcements and rsvps went through the mailing list [02:23] creationix: hmm, actually that's probably not a good idea [02:23] creationix: I don't want to get 100 emails every second tuesday [02:23] creationix: all saying "me too" [02:23] dingomanatee: There are ways to govern the mailing list. The PHP one is always a bit snarky but honestly the real work happens here anyway. [02:24] dingomanatee: It would be good to give recruiters a place to look for node people. [02:24] creationix: I just used the node mailing list when I organized them [02:24] dingomanatee: Thats what half the meetup message board stuff is. [02:24] creationix: but that wasn't ideal [02:24] stride: since when is it a good idea to give recruiters anything? :) [02:24] dingomanatee: Well first we have to figure out whether its even our decision. [02:24] creationix: dingomanatee: s/recruiters/me/ [02:24] piscisaureu_ has joined the channel [02:25] dingomanatee: If someone from Joyent wants to run it they'll be choosing the forum. [02:25] creationix: dingomanatee: I'm fairly authoritative on node meetups for southbay, check with ryan for SF and mikeal for east bay [02:26] creationix: dingomanatee: http://oakjs.com/ [02:26] creationix: that's mikeal's group I think [02:26] creationix: I actually like the couchapp website vs meetup.com, but it's more work since he had to program it [02:27] dingomanatee: why not just a node.bayarea? [02:27] ossareh has joined the channel [02:27] dingomanatee: one vast node army. [02:27] creationix: dingomanatee: that's fine, perhaps every two weeks, one up north, one down south [02:27] creationix: I'd prefer that actually [02:27] dingomanatee: thats what I'm saying. [02:28] dingomanatee: maybe even north/south/east if the membership justifies. [02:28] creationix: most the east bay people I know live quite near the bay bridge [02:28] creationix: but I'm sure there are more I don't know because they live farther [02:28] dingomanatee: cool. I would. [02:28] dingomanatee: I think google mapping the membership would be a fun first step. [02:29] dingomanatee: You've been NoderTagged! [02:29] creationix: lol [02:29] dnolen has joined the channel [02:29] MattDiPasquale has joined the channel [02:29] dingomanatee: Anyone else in the bay area have any feelings one way or another? [02:29] creationix: dingomanatee: did you see this when it was active http://wargamez.mape.me/ ? [02:30] creationix: realtime geolocation of the irc room [02:30] dingomanatee: aaasome. [02:30] Ond: Shouldn't he be using a more accurate projection [02:31] Ond: Like the gall-peters projection [02:31] mikeal has joined the channel [02:31] dingomanatee: I'm working on indexing the node.js logs in mongo and doing a search engine for conversations. [02:31] dingomanatee: its noogle under bingomanatee. [02:32] fille12 has joined the channel [02:32] blowery has joined the channel [02:32] creationix: Ond: no way, greenland is really THAT big :P [02:32] Ond: lol [02:32] creationix: bigger than Africa even [02:32] dingomanatee: What I want to do is to get us plugged into the Drupal twinkie scene so that when they have a "hard thing" to do they tap into the Node Army [02:32] Ond: Of course [02:32] heavysixer has joined the channel [02:35] dingomanatee: Yeah the "greenland effect" is what hapens when you unpeel and orange. [02:35] dingomanatee: I like the Bucky Ball better. [02:37] charlenopires has joined the channel [02:37] ossareh has joined the channel [02:38] AliG: Anyone seen video editing software on the web? It seems Avid would be pretty simple to replicate [02:39] hij1nx has joined the channel [02:40] stride: AliG: friend of mine did some collaborative video editing thingy last year. I think he used red5 for the streaming part [02:40] AliG: Non linear video editors are just permuting a serious of clips together after all [02:41] creationix: AliG: use a node server that streams video using http range requests [02:41] creationix: and html5 video elements with custom alpha [02:41] stride: as long as you find a way to edit serverside and stream a lower quality version to the browser, that shouldn't be too hard [02:41] AliG: creationix: yeah [02:41] charlenopires has joined the channel [02:42] creationix: then once you're done editing, you send the parameters to some server to do the actual work [02:42] AliG: Too bad you can't stream to a websocket and then put that through html5 video :p [02:42] creationix: AliG: why would you want a websoket? [02:42] creationix: http range requests are more effecient [02:42] AliG: True [02:42] AliG: Websockets make everything strings [02:43] stride: uh, no? [02:43] creationix: AliG: this is a node server that supports http range http://creationix.com/BigBuckBunny_640x360.m4v [02:43] creationix: try seeking to parts you don't have downloaded yet [02:43] creationix: (in an html5 video capable browser of course) [02:44] AliG: stride: I thought websockets generally didn't support binary mode in browsers? [02:44] AliG: cool [02:45] stride: oh, browsers, I tend to forget about that side of stuff.. :) [02:45] AliG: creationix: Just like flash, cool [02:45] creationix: stride: why use websocket in anything other than browsers [02:45] creationix: use raw tcp for anything else [02:45] AliG: creationix: lol @ the angry rabbit at 6:07 [02:46] creationix: AliG: have you not seen that video [02:46] creationix: it was made using FOSS software [02:46] AliG: no :) [02:46] AliG: It's funny I like it [02:46] stride: creationix: I just thought of the fact that websockets are just regular sockets in node, which would support binary data. [02:46] creationix: http://www.bigbuckbunny.org/ [02:47] creationix: stride: how would support binary data [02:47] creationix: the protocol is text based + binary frames [02:47] creationix: (or was last time I implemented it) [02:47] Figaroo has joined the channel [02:47] Aikar has joined the channel [02:47] Aikar has joined the channel [02:48] Figaroo: MongoDB vs MySQL. Is this a fair comparison? [02:48] creationix: Figaroo: what are you comparing? [02:48] stride: creationix: it's limited to text? didn't know that, sorry [02:48] creationix: they are pretty different [02:48] creationix: stride: I thought it was [02:48] creationix: but it's changed a bit since I last implemented [02:49] stride: creationix: hm. just pulled up the w3 documents. seems like it still is [02:49] AliG: Figaroo: no [02:49] Figaroo: Which should I use for the *primary* database storage system? [02:49] creationix: Figaroo: I wouldn't use either [02:49] AliG: Figaroo: Do you need a relational database? [02:49] AliG: Or a document-centric key value store? [02:49] creationix: my choice is usually postgres/ couchdb/redis depending on what kind of data I have [02:50] Figaroo: postgres works well with Node? [02:50] Figaroo: does postgres use SQL? [02:50] AliG: The only point of websockets seems to be that it reduces latency and eliminates the need for polling. [02:51] AliG: Figaroo: Yes, there is a postgres.js [02:51] k04n has joined the channel [02:51] AliG: Figaroo: Someone made one that uses libpg directly [02:51] Figaroo: What's a document centric database? It doesn't seem as dynamic when it comes to querying [02:52] AliG: Figaroo: It's a different model [02:52] huma has joined the channel [02:52] Figaroo: AliG, but why would someone want that model? [02:52] AliG: Figaroo: Because they feel it is more appropriate for their needs [02:53] Figaroo: I guess what I'm really asking is what are the advantages and disadvantages? [02:53] AliG: Personally, I tend to use postgresql [02:53] creationix: postgresql is a rock solid sql based database [02:53] creationix: node support is mostly stable [02:53] AliG: But Mongodb and Couch are cool is because they let you create your own functions to manipulate the documents [02:53] creationix: (though probably better than mysql) [02:54] creationix: mongo is fine as long as you understand it's strengths and weaknesses [02:54] creationix: couch is simple and solid [02:54] creationix: redis is even more simple [02:55] halfhalo: ACTION hearts mongo [02:55] creationix: Figaroo: I think couchapps are probably the best thing about couch [02:55] Figaroo: what are mongo's weaknesses? [02:55] dgathright has joined the channel [02:55] creationix: many classes of apps can be done entirely in couch [02:56] creationix: no node, no apache, no php, just couch [02:56] tanepiper: _changes feed is awesome as well [02:56] Figaroo: Which DB seems to fit well with Node? [02:56] creationix: yep [02:56] creationix: anything with a text based protocol is going to work best with node [02:56] creationix: since most the c libraries assume blocking I/O [02:56] halfhalo: ACTION got his crazy template frigger working! [02:56] creationix: and require someone with enough c experience to properly bind them [02:56] creationix: and implemeting a binary protocol in js is *fun( [02:57] creationix: ACTION 's first node project was postgres.js [02:57] halfhalo: ACTION made an irc class for his first project [02:57] mikeal has joined the channel [02:57] creationix: mikeal: just in time [02:58] creationix: Figaroo: wants to pick a database [02:58] Figaroo: I do. :P [02:58] mikeal: boom boom CouchDB! boom boom CouchDB! [02:58] Chris_Biscardi has joined the channel [02:58] AliG: creationix: How do you tell postgresql's blocking library to piss off and call you back when it has the goods? [02:58] creationix: Figaroo: or are you just curious [02:59] creationix: AliG: no idea since I don't write node bindings [02:59] creationix: I implemented it in pure js [02:59] creationix: so it was non-blocking form the getgo [02:59] Figaroo: I'm curious. [02:59] AliG: creationix: Using postgresql's text-based protocol? [02:59] creationix: AliG: there is a text based protocol? [02:59] Figaroo: If I don't know what I'm doing and decide to got with mongo, then I'll run into something unexpected. [02:59] creationix: no, I use the normal binary protocol [02:59] creationix: it was quite painful [02:59] creationix: there were no buffers back then [03:00] jacobolus has joined the channel [03:00] Figaroo: I know MySQL is pretty much limited to what you can do with tables. Tree table models seem redundant and wasteful. [03:00] mikeal: Mongo, at some point in the future, will corrupt your data [03:00] creationix: Figaroo: my personal beef with mongo is it's slighty inconsistent [03:00] creationix: and that [03:00] mikeal: so the moment you start using it, be aware of that and be ready [03:00] Figaroo: mikeal, that doesn't sound good. [03:01] creationix: all software will eventually crash if run long enough [03:01] mikeal: but when it does corrupt, it's not fun to recover [03:01] creationix: the question is what happens when it crashes [03:01] Figaroo: why would it corrupt [03:01] mikeal: because they write in place to the filesystem [03:01] mikeal: so if you crash mid-write you've just corrupted the db [03:02] Figaroo: that sucks, how is that useful... [03:02] creationix: doesn't the default mysql database do that too? [03:02] mikeal: it's "faster" [03:02] mikeal: but not really [03:02] creationix: Figaroo: well, they recommend several running at once [03:02] Figaroo: wait is or isn't faster? [03:03] mikeal has joined the channel [03:03] mikeal: two adium crashes now [03:03] mikeal: damn [03:03] creationix: Figaroo: I think mongo is better suited for things like Ruby where latency hurts more [03:03] mikeal: so, it's actually not faster to write in place, that's bullshit [03:03] mikeal: because sequential writes are faster than random writes [03:04] halfhalo: ACTION uses colloquy instead of adium for irc nowadays [03:04] mikeal: mongo's "faster" because it's just a mem-map file and that is cached in memory [03:04] Figaroo: I'm not following you mikeal. :S [03:04] AliG: mikeal: Time to move to a web-based chat :) [03:04] royfat: adium really sucks with irc [03:04] mikeal: the speed comes from the in memory cache [03:04] royfat: my adium is laggy [03:04] creationix: ACTION uses empathy [03:04] Ond: xchat or bust [03:05] royfat: true xchat is nice [03:05] halfhalo: ACTION just saw a dodge challenger ad and it was better than most [03:05] Figaroo: so mongoDB sucks balls [03:05] creationix: Figaroo: disclaimer: mikeal works for couchone [03:05] mikeal has joined the channel [03:05] Figaroo: couchone is a DB? [03:05] creationix: no, it a company based on couchdb [03:06] AliG: ACTION on database consistency: check yourself before you wreak yourself [03:06] Figaroo: CouchDB > MongoDB? [03:06] maushu__ has joined the channel [03:06] AliG: MongoDB is written in C++ [03:06] royfat: using msn, facebook, aim, irc [03:06] royfat: on the same adium [03:06] creationix: AliG: that's a minus in my book [03:07] creationix: C++ should stop being used in all future software [03:07] joeshaw: Figaroo: there is no perfect answer; what you pick really depends on what you need it for [03:07] creationix: it has serious defects [03:07] creationix: Figaroo: also you'll find varying opionions here [03:07] joeshaw: Figaroo: and it's really good to play around with a few different ones to know what's best for your use case [03:07] creationix: many node people love mongo [03:07] creationix: some hate it [03:07] halfhalo: ACTION loves mongo due to mongoose [03:07] creationix: I like couch because it's api is http based [03:07] creationix: and map-reduce is awesome [03:07] Figaroo: well, I know MySQL, but I want something faster and more efficient/simple. [03:08] creationix: nStore!!! [03:08] halfhalo: never got nStore to work [03:08] creationix: (actually I haven't maintained that in some months, use with caution) [03:08] creationix: halfhalo: I think I should pick it up [03:08] creationix: and get it running on webos as a service [03:08] halfhalo: YES [03:08] creationix: for when you don't want db8 it can be an alternative [03:09] AliG: creationix: What are the worst defects of C++? [03:09] halfhalo: ACTION goes back to making a templating system [03:09] creationix: pointers [03:09] creationix: it's OOP syntax [03:09] AliG: ACTION loves pointers though [03:09] creationix: AliG: slowness [03:09] AliG: Pointers are slow? [03:09] mjr_: Lots of people seem to love Redis. [03:09] creationix: AliG: no, pointers are fast, the OOP is slow [03:10] creationix: pointers are dangeroud [03:10] tanepiper: STL is the tool of the devil [03:10] creationix: *dangerous [03:10] mikeal: Redis is the shit [03:10] creationix: tanepiper: agreed [03:10] halfhalo: ACTION got it working for the most part... and its awesome. [03:10] Figaroo: One thing I know I would like to be able to do is heirachical data. In MySQL you'll need a table model, can't remember the name of it. [03:10] tanepiper: although i haven;t touched C++ in a few years [03:10] creationix: I mean, even ocaml beats C++ in language shootouts [03:10] creationix: and that's a managed memory language [03:10] creationix: much higher level than C++ [03:11] creationix: you'll NEVER have a buffer overflow security hole in ocaml [03:11] AliG: creationix: What about C#? [03:11] AliG: I assume you also hate C [03:11] creationix: C# is actually pretty nice [03:11] creationix: except it requires a non-portable runtime [03:11] tanepiper: http://shootout.alioth.debian.org/u64q/benchmark.php?test=all&lang=all [03:11] Figaroo: Closure Tables [03:11] Figaroo: is what they're called [03:11] tanepiper: C is fast [03:12] AliG: tanepiper: C++ is as fast as C isn't it? [03:12] creationix: yes, c is very fast [03:12] Aria: Depends on what you do with C++. But in general, yes. [03:12] creationix: C++ is only as fast as C when you write it like C [03:12] Figaroo: ok, I'ma go eat thai food [03:12] AliG: creationix: Any experience with C# in Mongo on Linux? [03:12] Figaroo: later [03:12] Figaroo has left the channel [03:13] creationix: AliG: no and no, but I do live in Linux [03:13] Aria: I mean, a virtual protected private function pointer to a runtime instantiated class ... or whatever... might be a bit slow. [03:13] creationix: I just know my C gtk apps are a heck of lot faster than my C++ apps and C# apps [03:13] creationix: so in practical every-day usage, they are much slower [03:14] creationix: you don't choose C++ over C unless you want the advanced features [03:14] mikeal: we need brian cantrill in here [03:14] mikeal: he has good rants about C++ [03:14] royfat: dont get the multi heritage in c++ [03:14] AliG: creationix: Why is C so much faster? [03:14] creationix: C is simple [03:15] creationix: simplicity is almost always better [03:15] AliG: More direct code? [03:15] creationix: it's just a nice dsl over assemly [03:15] AliG: You don't get classes in C though [03:15] creationix: AliG: that's why it's faster [03:15] AliG: ACTION used to do web dev in C [03:15] creationix: abstractions generally slow things down [03:15] tanepiper: look at Java [03:15] killfill has joined the channel [03:16] creationix: personally I don't like what more people call "classes" [03:16] tanepiper: acually, don't - you're eyes will probably melt [03:16] tim_smart: Yo momma so fat, she could almost be Java [03:16] creationix: I'm all over OOP ideas like encapsulation [03:16] AliG: I wrote a function that loads HTML files with % things in them and fills them in with the arguments passed [03:16] creationix: but "classes" and inheritance hierarchies aren't so good [03:16] royfat: for games use C++ or C [03:16] creationix: AliG: that sounds like fun [03:17] royfat: other use java or another high level language [03:17] piscisaureus has joined the channel [03:17] AliG: creationix: Like printf, but the format string is a .html file [03:17] creationix: royfat: did you just advocate using Java in this room? [03:17] kolbyjack: Message from syslogd@ at Sat Jan 15 22:14:16 2011 ... [03:17] kolbyjack: brainy kernel: CPU2: Temperature/speed normal [03:17] kolbyjack: Message from syslogd@ at Sat Jan 15 22:14:16 2011 ... [03:17] kolbyjack: brainy kernel: CPU0: Temperature above threshold, cpu clock throttled [03:17] kolbyjack: shit, sorry [03:18] AliG: Yo momma so poor, she could almost be PHP [03:18] royfat: sorr java is sooo 90s [03:18] creationix: 90s? I thought the 2000s were the golden years of Java [03:19] royfat: started in the 90s [03:19] creationix: it's just now starting to die out, and very slowly [03:19] tanepiper: Oracle is making sure of that [03:19] creationix: yeah, that might speed things up [03:19] AliG: creationix: and COBOL's future is just beginning [03:19] creationix: no thanks, I've seen COBOL [03:19] royfat: what about the visual basic and its fanboys [03:19] k04n_ has joined the channel [03:19] tanepiper: http://www.coboloncogs.org/INDEX.HTM [03:19] creationix: royfat: I thought they all jumped to C# [03:20] tanepiper: royfat: they only write GUI's to track killers IP's [03:20] AliG: "With 50 years under its belt, Cobol is set to remain the dominant language for business applications for the next 50 years. Having consistently seen off the young pretenders, Cobol has continued to evolve to meet every new demand thrown at it, from both business and technology." -- www.cobol.com [03:20] royfat: nope [03:20] warz has joined the channel [03:20] royfat: a real vb fan would never switch to a language thats contains the character C [03:20] AliG: What happens if someone releases Delphi for web apps? [03:21] AliG: A vb.net web programmer told me PHP is hard. [03:21] tanepiper: FORTRANweb [03:21] creationix: you know, JavaScript is hard [03:21] creationix: I hear it all the time [03:21] AliG: Ruby and Python are the new VB [03:22] creationix: especially callbacks [03:22] tanepiper: bad creationix ! No! [03:22] AliG: creationix: You can't even use function pointers. [03:22] tanepiper: they are not hard. People need to learn scope and how to .call stuff [03:23] royfat: javascript is not hard, until i got netbens [03:23] creationix: so the solution to making a simple language like JS easier is to add deep complexity in the form of generators and proxies [03:23] royfat: netbeans code sense is sick, and so fast [03:23] tanepiper: i'm so tempted to stop following #nodejs on twitter because the amount of people complaining about having to write callbacks [03:24] mikeal: creationix: clearly [03:24] mikeal: it's so hard we should complicate it [03:24] AliG: creationix: What about VB-like RAD IDEs for Javascript? [03:24] creationix: if you think it's hard now, wait till it gets those [03:24] AliG: Imagine a Javascript form builder [03:24] creationix: then it will be impossible to debug anything [03:24] AliG: tanepiper: They love their synchronous code [03:25] royfat: sorry but i see nodejs as a servlet in java [03:25] creationix: it's not the sync code, it's being to directly put what you're thinking into code [03:25] tanepiper: AliG: well really thats where it falls down [03:25] creationix: and after years of sync procedural code, you start to think that way [03:25] royfat: (my first language was java) [03:25] creationix: and then that's all you can write [03:25] tanepiper: becasue it would be a DOM form builder that attaches javascript handlers [03:26] creationix: try writing some prolog or haskel and then come back and tell me callbacks are too weird [03:26] AliG: Should we just implement pthread in Javascript and let them go crazy? :p [03:26] creationix: AliG: I won't be responsible for the deaths that ensue [03:26] AliG: creationix: Prolog is a C-like language for programming FPGAs right? [03:26] royfat: prolog is sick :D [03:27] creationix: Aikar: I can't tell if you're joking or being serious [03:27] royfat: swi-prolg [03:27] creationix: I mean AliG [03:27] creationix: http://en.wikipedia.org/wiki/Prolog [03:27] royfat: http://www.swi-prolog.org/ [03:27] creationix: Prolog is probably the highest level abstraction I've ever written code in [03:27] AliG: Err, I confused it wiht Verilog [03:27] creationix: though CSS and SQL are pretty high too [03:27] creationix: AliG: ahh, that makes sense now [03:27] tanepiper: i really shouldn't be having this conversation at 3.30am [03:28] creationix: come on, it's only 7:30 here [03:28] creationix: :P [03:28] royfat: deductiv programming [03:28] royfat: thats the shit [03:28] royfat: u tell the computer what u whant, instead of telling it how to do it [03:28] tanepiper: well in the last 10 years, javascript has been the only constant language i've used [03:29] x_or has joined the channel [03:29] tanepiper: from a scripting engine we implemented in our game engine (using spidermonkey), through the jQuery years, Adobe AIR and now nodejs [03:30] tokumine has joined the channel [03:30] royfat: damn i need to go to bead, its 4.30 here [03:30] royfat: bed [03:31] AliG: The Ruby and Python camps want to do Ruby and Python client-side [03:31] creationix: AliG: I've been there [03:31] creationix: even wrote a compiler to javascript [03:31] creationix: not a good path [03:31] tanepiper: AliG: yes, that's a terrible idea [03:32] creationix: then found node as a useable javascript on the server [03:32] tanepiper: creationix: probably at least your learned to solve a bunch of lexical problems [03:32] AliG: I personally like Javascript more than Python and Ruby because the syntax is more familiar. Am I stupid? [03:32] creationix: AliG: no, that's fine [03:32] creationix: it is a simpler language [03:32] creationix: the web and slowed it's growth and evolution [03:33] creationix: since new features can never be used [03:33] tanepiper: Also, python and ruby are fooked because Python has the GIL and ruby is just slow (write ruby, re-write in C) [03:33] creationix: meanwhile python and ruby were server-side where that's not a problem [03:33] AliG: Also I like my brackets a lot [03:33] tanepiper: js isn't perfect, but still has room for improvement [03:33] creationix: I don't care much about syntax [03:33] creationix: I loved both python and ruby [03:34] creationix: but not being to use them in the browser was an issue [03:34] AliG: What do you use on the server-side when you aren't using node.js? PHP? [03:34] creationix: I only did PHP because that's where the jobs were [03:34] creationix: and it's easy enough to learn [03:34] tanepiper: ^^ [03:34] tanepiper: i never want to touch PHP again if i can avoid it [03:34] creationix: I tried to convert many a php project to python, ruby, and later node [03:35] creationix: eventually I gave up and moved to California where there are node jobs [03:35] tanepiper: i made my job node based :) [03:35] AliG: The only thing attractive to me about PHP is that I can quickly embed code in HTML files and that it is pretty ubiquitous [03:35] creationix: haven't had to deal with python, ruby, or IE since [03:35] creationix: well, the embed part is now possible in node too [03:35] tanepiper: nodejs just came onto the horizon at the right time for me [03:36] creationix: http://www.jspp.io/ [03:37] pkrumins: AliG: westside is the best [03:37] AliG: How to get PHP jobs without writing PHP code: sendheaderstomyfavoritelanguage("v8 auth.js"); [03:37] AliG: pkrumins: West Side Manhattan is the best ;) [03:37] tanepiper: yes, mikeal is insane creationix :) [03:38] creationix: actually jspp is pretty cool [03:38] creationix: I'm sad I didn't do it first [03:38] AliG: JSPP is interesting. I'm going ot try it [03:38] creationix: there is something to be said for easy deployment [03:39] creationix: I want something like it that you run at the root of all your apps [03:39] AliG: My only worry is if it dies and I end up with code depending on a no longer maintained solution, [03:39] creationix: and then with special files (like .htaccess for apache) you configure different sites [03:39] astoon has joined the channel [03:39] creationix: AliG: it's small enough you can just take over [03:39] creationix: it's MIT right? [03:40] AliG: So I need the jspp server to use this [03:41] creationix: yeah, it's just a npm module [03:41] AliG: So the node executable runs it? [03:41] creationix: yep [03:42] creationix: well. not directly [03:42] creationix: but yes [03:42] creationix: npm can install executables into your path [03:42] creationix: they are node scripts [03:42] creationix: node supports unix shebang lines #!/usr/bin/env node [03:43] AliG: I wish there was an Apache module for this [03:43] MikhX has joined the channel [03:43] creationix: it wouldn't fit well with the apache model [03:43] creationix: it would be sortof like passenger [03:43] AliG: I have a lot of sites running on the server that depend on Apache [03:43] creationix: apache can reverse proxy [03:43] AliG: Yes [03:44] creationix: you lose some of the benifits of node when apache gets in the way though [03:44] ossareh has joined the channel [03:44] creationix: having 1000 long running connections and websockets suddenly isn't so easy [03:44] AliG: But then if I'm just doing some basic footer/header inclusion I might as well just use PHP [03:45] creationix: if it's low traffic or connections are short, I'd just reverse proxy [03:45] creationix: assuming you want node [03:45] creationix: and need apache [03:45] creationix: halfhalo: still there [03:45] creationix: ? [03:45] AliG: My plan is to serve the HTML and Javascript initially from Apache, then use websockets to talk to node on another port [03:45] halfhalo: si [03:45] creationix: AliG: that works [03:46] creationix: halfhalo: what should I call my revived nstore? [03:46] creationix: keep the name? [03:46] halfhalo: enyostore! [03:46] creationix: lol, no [03:46] AliG: Only issue is if people block connections that aren't port 80 [03:46] creationix: enyo is awesome and all, but it's not my style [03:47] creationix: AliG: you could have node on 80 reverse proxying to apache [03:47] zzak has joined the channel [03:47] zzak has joined the channel [03:47] AliG: creationix: Hmm, that could work [03:47] creationix: it's a bit of work though [03:47] creationix: you'd have to write the reverse proxy yourself [03:47] k04n has joined the channel [03:47] creationix: or find a good module already made [03:47] halfhalo: nStore works [03:48] creationix: halfhalo: ok, I'll just release a new major version [03:48] creationix: I like the name [03:48] yozgrahame has joined the channel [03:48] halfhalo: really need to set up a bridge between npm and preware [03:48] creationix: I'm just worried too many people gave up on it since I got busy [03:48] creationix: halfhalo: does the early access still have the super old node version? [03:48] halfhalo: yeah [03:48] creationix: that sucks [03:48] ashleydev has joined the channel [03:49] halfhalo: yeah, havent played with it due to that [03:49] AliG: Writing a reverse proxy gets hard when you want to support http range requests [03:49] creationix: AliG: why is that? [03:49] creationix: just forward the headers [03:49] creationix: the only thing you can't fake is the receiver's ip and port [03:49] AliG: creationix: Okay yeah [03:49] creationix: since it become your own [03:50] creationix: there are a few gotchas in there though, I've been down that road before [03:50] k04n_ has joined the channel [03:50] tanepiper: creationix: i'd keep the name, i like nStore [03:50] creationix: I meant to write a connect/stack middleware for reverse proxying to some other appserver [03:50] creationix: nStore it is [03:50] halfhalo: ACTION goes back to whatever he was doing [03:51] creationix: now to fix/reimplement it in the 30 minutes of free time I have left this weekend [03:51] creationix: *sigh* [03:51] halfhalo: whats broken with it? [03:51] creationix: halfhalo: I never finished the last rewrite [03:51] halfhalo: lol [03:51] creationix: I think it's mostly usable though [03:52] creationix: I change my style and techniques too fast to build anything as large as nStore [03:52] creationix: by the time I get halfway done, I don't like it anymore [03:53] halfhalo: you should build it to allow other backends... like... say... db8 :p [03:54] creationix: halfhalo: no thanks [03:54] creationix: besides, db8 is only available over the bus right? [03:54] creationix: it would be a pain to wrap over that [03:54] creationix: nstore is the backend, and people should be able to write custom frontends over it [03:55] halfhalo: havent actually played with it yet. And plus, how long do you think it will be until homebrew finds a way to get to it from node anywho [03:55] AliG: Say you want to store data in memory across different requests. What's the fastest way to maintain that state across all requests in node? Just put variables at tthe top of your js file? [03:55] creationix: AliG: that's one way [03:55] creationix: for small sites that works great [03:56] creationix: redis is also pretty good at that [03:56] creationix: AliG: I often have "var sessions = {}" [03:56] AliG: creationix: If node.js never serves more than one request simultaneously, there won't be a read/write collision [03:56] creationix: AliG: it's single threaded [03:56] AliG: good [03:57] creationix: you can have two concurrent requests with the same session ID, but that's usually fine [03:57] AliG: No need to use mutexes :) [03:57] creationix: right [03:57] creationix: I mean, how many server languages can you handle 1000 concurrent clients effeciently AND create a simple database with two characters {} [04:01] k04n has joined the channel [04:02] AliG: ACTION is contemplating the design implications of having an MDI web app (draggable "windows" inside) [04:02] AliG: creationix: C ;) [04:02] creationix: AliG: not hardly [04:02] creationix: though C with libev is a lot like node [04:02] skm has joined the channel [04:03] creationix: that's pretty much where it came from actually [04:03] creationix: c + libev + libeio, but wanted closures [04:03] creationix: so he added in V8 [04:05] AliG: I wrote a stupid little httpd in C that used select/bind/listen/recv and pthreads. It would allocate a shared segment when it started [04:05] creationix: that works [04:06] creationix: is it a thread per connection though? [04:06] AliG: Thread-per-request I don't think would scale well though [04:06] AliG: yeah [04:06] creationix: yeah, get a couple thousand long clients and that won't work so well [04:06] creationix: I wish more people write simple software whenever possible [04:06] AliG: When a client connected to the port, I think I had a comment like /* Wait, let me go set up the server thread! */ [04:07] creationix: thread per connection is fine for short lived requests [04:07] creationix: especially if the threads don't share anything [04:07] creationix: so no locks are needed [04:07] AliG: But they did :p [04:08] creationix: they shared mutable data? [04:08] creationix: isn't there thread-local memory [04:08] creationix: for things specific to that thread [04:09] AliG: I didn't know about that [04:09] AliG: I think Beej's IPC guide didn't talk about threads [04:11] saschagehlich has joined the channel [04:11] creationix: I could be very wrong [04:11] creationix: I've done extremely little thread programming [04:12] AliG: ACTION is a noob so [04:13] AliG: ACTION wishes his school didn't think computer science was learning Java [04:14] perlmonkey2 has joined the channel [04:15] SubStack: school is what you make of it [04:15] AliG: yeah [04:15] Jaye: java is a perfect example of how design by committee can ruin anything [04:15] SubStack: I did all my computer graphics assignments in haskell :p [04:16] micheil has joined the channel [04:16] mdoan has joined the channel [04:16] mjr_: Also, knowing Java will help you make Android apps, which will probably be an in-demand skill in about 2 years. [04:16] AliG: ACTION prefers design by intelligence [04:17] AliG: mjr_: Until webkit implements and other features only apps get [04:18] skm has joined the channel [04:18] mjr_: Eh, I dunno [04:18] mjr_: I love WebKit. But Android is huge and is probably going to be the dominant computing platform in a few years. [04:19] sudoer has joined the channel [04:19] AliG: What about the Cloud OS? [04:20] davidascher has joined the channel [04:20] AliG: err, Chrome OS [04:20] mjr_: I'm not saying that there won't be other interesting things to work on, just that Java is a super useful thing to learn. [04:21] mjr_: Clearly, I prefer JavaScript, or I wouldn't be in here. :) [04:21] AliG: :) [04:22] Intel_iX has joined the channel [04:22] Intel_iX: is there a good resource for learning node.js? [04:23] liar has joined the channel [04:24] skm has joined the channel [04:24] Ond: The documentation and node.js projects (many of which come bundled with example code) [04:27] huma: s = net.createServer(); net.on('connection', function(c) {}); doesn't work anymore? [04:27] Ond: Would that be net.on or s.on? [04:29] davidascher has joined the channel [04:30] mikeal has joined the channel [04:30] creationix: Ond: s.on [04:30] Ond: That could be a problem! [04:30] mikeal: I read that as Odinson [04:31] mikeal: as in Thor Odinson, god of thunder and lightning! [04:31] Ond: lol [04:31] davidc_ has joined the channel [04:31] creationix: mikeal: I'm working on nStore v3 [04:31] devdrinker has joined the channel [04:31] creationix: this time I'm going to have a simple in-memory backend, but swappable for a couchdb like datastore [04:31] mikeal: cool [04:32] creationix: that way I won't get stuck doing the hard part first [04:32] mikeal: haha [04:32] creationix: it's easy to implement an in-memory database that saves to disk on occasion [04:32] mikeal: basically a key/value store that is mostly cached in memory until it's big and then it's offloaded to CouchDB [04:32] mikeal: and you keep like an LRU around to make it faster [04:32] creationix: and you can contribute by making the other backend [04:32] creationix: I tried an lru once, it was really hard to make fast [04:33] mikeal: you know what would actually be useful [04:33] mikeal: and IndexedDatabase implementation for node [04:33] mikeal: WebKit and Firefox both has one built on SQLite [04:33] mikeal: and they did it non-blocking [04:33] mikeal: and I already wrote a CouchDB compatible datastore on top of it [04:33] creationix: https://gist.github.com/77fe6f18fae6299c97c0 [04:34] creationix: yeah, that would be awesome I think [04:34] creationix: what exactely is IndexDatabase [04:34] creationix: that might be a good interface between my pluggable backends and frontends [04:34] creationix: then your couch implementation could be one of the frontends [04:34] mikeal: and this just explodes in memory until you run out? [04:34] creationix: the simple one, yes [04:34] creationix: for most small apps that's fine [04:35] mikeal: IndexedDatabase is a pretty big api [04:35] creationix: hmm, so maybe now [04:35] mikeal: http://www.w3.org/TR/IndexedDB/ [04:35] creationix: *not [04:35] mikeal: but all the browsers will have it [04:35] creationix: lol, maybe indexdb could be a frontend to my backends [04:35] mikeal: so there will be lots of js db layers on top of it in the coming years [04:35] tanepiper: would i'd like to do is do a couchdb view request, store the results as a temporary file during the client's session and do map/reduce and filter requests on the local file [04:35] mikeal: why to file? [04:36] Jaye: 1975 programming? [04:36] tanepiper: well i'll be dealing with 100's MB data per client [04:36] creationix: mikeal: I see, that's a full blown database [04:36] creationix: indexes and all (hence the name) [04:36] mikeal: tanepiper: what i really meant was, why store the view result on disc instead of the result of your filters [04:36] creationix: a node implementation would be awesome though [04:37] mikeal: creationix: yup, and like i said, it can be implemented on top of SQLIte [04:37] tanepiper: mikeal: well it's really _lists rather than views [04:37] tanepiper: then I use ExtJS grids to store the data [04:37] tanepiper: eh, view the data [04:37] creationix: mikeal: what primitives do I need to provide for someone to make an indexdb impementations [04:37] creationix: more than get/set I assume [04:38] tanepiper: mehh it's nearly 5am i'm not going to be able to explain it well [04:38] mikeal: btree with write and read transactions [04:38] creationix: does it have to be a btree? [04:38] josephhitchens has joined the channel [04:38] creationix: and what exactely are "transactions" in this sense [04:38] mikeal: and transactions that can span a lock between datastores [04:39] mikeal: write transaction is a lock on the db, no other writes can go through while a transaction i open for write [04:39] creationix: blocking lock [04:39] tanepiper: mikeal: something like this: https://github.com/pgte/alfred [04:39] mikeal: read transaction means *my* view of the database doesn't change even if a new write comes in [04:39] creationix: not just alternate realities [04:39] mikeal: creationix: corrent, they suck for concurrency [04:40] mikeal: postgres figured out how to do them pretty well under concurrent load by they have an incredibly high threshold for complexity [04:40] creationix: so in the simple sense, I just queue up and hold any requests that are blocked by the read [04:40] tanepiper: well i'm done the dropquest, finally time for bed [04:40] creationix: then I optimize from there [04:41] creationix: *blocked by the lock [04:41] mjr_: I love how #node.js speend about 50% of its time talking about database technology. [04:41] creationix: mjr_: and the other 50% about callbacks [04:41] mjr_: which are obviously bad and must be worked around. [04:41] mikeal: creationix: alfred looks like nstore++ [04:41] SubStack: Callbacks are too hard. Why can't we go back to worrying about thread safety? [04:42] pkrumins: ACTION is indifferent [04:42] mjr_: Or maybe we could worry about intellectual property. [04:42] mikeal: mjr_: nobody can write callbacks, all this node code is a myth :) [04:42] mjr_: I've never seen any node code. [04:42] mikeal: haha [04:42] creationix: mikeal: I'm trying to figure out the minimal primitives I can implement in minimal time, but be sufficent to implement indexdb [04:42] mikeal: mjr_: how much longer are you in town? [04:42] SubStack: Reasoning about concurrent instruction pointers is easy for newbies. Callbacks are just too hard they'll never learn. [04:42] mjr_: We leave for Kauai on the 26th. [04:43] SubStack: mjr_: not long at all! [04:43] creationix: mjr_: moving? [04:43] mikeal: creationix: i don't think it's reasonable to do it from scratch, you'll need sqlite or berkeleydb bindings [04:43] mikeal: wow, we need to hang out [04:43] mjr_: creationix: yeah, we are packing up and moving out. [04:43] mikeal: i'm not drinking tho [04:43] mikeal: so i'm kind of boring [04:43] mjr_: Had a big American-style "yard sale" today to get rid of a bunch of old stuff. [04:43] creationix: mikeal: am I boring? [04:44] mikeal: no, you're not boring because you normally don't drink [04:44] creationix: mikeal: mjr_: let me know when the party is, I'll try to make it up there [04:44] mikeal: i'm boring because when i'm not drinking i'm just thinking about how much more fun i would be having if I was [04:44] mikeal: it's tonight [04:44] mikeal: in 15 minutes [04:44] mikeal: at my house [04:44] creationix: dang [04:44] mjr_: I think outside the US English speakers call them "jumble sales," I've just learned. [04:44] mikeal: i'm making everyone cocktails and not drinking any of them [04:44] eazyigz has joined the channel [04:45] creationix: I'm babysitting and have church early in the morning [04:45] mikeal: but seriously, mjr_ if you wanna come by for a drink tonight you're welcome, would love to see the wife as well, anna is here [04:45] Jaye: in aus we call them garage sales *shrug* [04:45] creationix: mikeal: mjr_: also I will be up in the city a couple times next week, I could swing by oakland on the way home [04:47] creationix: anyway, back to writing nstore v3 will my 1-year-old attacks me again [04:47] creationix: s/will/till [04:48] EyePulp has joined the channel [04:48] eazyigz: has anybody messed with node.js on webos yet? [04:49] creationix: eazyigz: a bit, why? [04:49] mjr_: I'm not going out tonight, except outside to go in the hot tub. I had a long day, and I'll sleep soon. I'll get more info out about our last party and let everybody know. [04:49] eazyigz: just curious how good that project has moved along [04:49] eazyigz: I am reading the developer docs for the first time [04:49] eazyigz: looking to see what cool stuff one can do with node.js on webos [04:49] khug has joined the channel [04:49] creationix: eazyigz: it's a core part of webos 2.0 [04:50] eazyigz: i wish it was part of android [04:50] creationix: I'm hoping webos3.0 will have node 0.4.x [04:50] creationix: that would be rad [04:50] x_or has joined the channel [04:50] halfhalo: lies [04:50] mikeal: i hope that by the time webos3 is ready we're at node 0.8 ;) [04:51] khug: hey guys - does anyone know what the performance hit of throwing errors is? [04:51] creationix: mikeal: no, it will move faster after 2.0 [04:51] creationix: the hp merger probably slowed things [04:51] mikeal: oh cool [04:51] PyroPeter has joined the channel [04:51] creationix: s/merger/buyout [04:52] richcollins has joined the channel [04:53] creationix: khug: I know the stack isn't calculated till you ask for it [04:53] creationix: but I imagine it's still fairly expensive [04:53] creationix: I wouldn't do it in normal code [04:53] creationix: exceptions should be exceptional [04:54] creationix: I once saw an article about a really clever control-flow library using exceptions to almost simulate coroutines [04:55] creationix: the things people will do to avoid callbacks [04:55] halfhalo: :D [04:55] Jaye: is it inhuman to like callbacks? [04:55] creationix: yes [04:55] en2: how do i seralize json? [04:55] en2: with json2.js? [04:55] creationix: but we aren't human are we [04:55] khug: Don't get me wrong, I like callbacks fine [04:55] creationix: en2: JSON.stringify [04:55] creationix: en2: bult-in [04:55] en2: or is there something in node? [04:55] en2: ok thanks [04:55] creationix: en2: and JSON.parse [04:56] creationix: same api as json2.js I think [04:56] creationix: it's part of the language now [04:56] khug: I was just trying to avoid handling backing out several layers of callbacks manually [04:56] creationix: node didn't add it [04:56] khug: catching errors of different types at different levels seemed like a nice possible fit [04:56] creationix: khug: well, exceptions won't help there [04:57] creationix: you should only use callbacks mainly for async functions [04:57] creationix: and those are always on new stacks [04:57] devdrink_ has joined the channel [04:57] creationix: so try..catch can't get at them [04:57] khug: hurrrr [04:57] khug: I thought try/catch would stay in the stack [04:58] creationix: try..catch is in the stack [04:58] josephhitchens_ has joined the channel [04:58] creationix: but async functions don't call their callback in the same stack [04:58] creationix: that's why they take a callback instead of returning [04:58] creationix: there are exceptions like Array.prototype.forEach [04:58] creationix: but most callbacks in node start a new stack [04:58] khug: I know they're called from the event loop, but doesn't it maintain the stack? [04:59] creationix: it's all the same stack, but it unwinds completely between events [04:59] khug: eek [04:59] khug: ok [04:59] creationix: and when the level with the try..catch unwinds, it gets thrown away [04:59] khug: thanks! [05:00] creationix: try { setTimeout(function () { throw new Error(""); })} catch(err){} [05:00] creationix: try that [05:00] creationix: v8: try { setTimeout(function () { throw new Error(""); })} catch(err){} [05:00] creationix: probably not good for the bot [05:00] creationix: since it triggers an uncaught exception [05:00] creationix: that can't be caught [05:03] khug: just did that (with nextTick) and it borked :-( [05:03] dgathright has joined the channel [05:03] khug: maaaaannnnnn [05:04] creationix: rule of exceptions: avoid them as much as possible, they break things [05:04] khug: I guess the event loop sort of makes try/catch/throw mostly useless [05:05] khug: unless you're doing sync stuff [05:05] creationix: not useless, you just need a new try..catch for each callback level [05:05] creationix: most the control-flow libraries do that for you [05:05] creationix: and forward the exception to whatever callbacks needs to handle the error [05:06] khug: happen to have an example in mind I could read through? [05:06] creationix: https://github.com/creationix/step [05:06] khug: wicked - thx [05:07] creationix: specifically https://github.com/creationix/step/blob/master/lib/step.js#L47-53 [05:07] alex1 has joined the channel [05:07] en2: does anyone know if hummingbird is good to use? last i heard it's not scalable [05:08] jetienne has joined the channel [05:08] MattDiPasquale has joined the channel [05:08] mscdex has joined the channel [05:09] Jaye: have tried using that, ended up just doing my own tracking after seeing the mess of stripped/disabled code in hummingbird..., not sure on how it scales but its pretty heavy [05:09] en2: ahh ok [05:10] jchris has joined the channel [05:11] creationix: jchris: you scared mikeal off [05:11] creationix: :P [05:15] creationix has left the channel [05:16] Figaroo has joined the channel [05:20] micheil has joined the channel [05:20] skm has joined the channel [05:21] micheil: evenin' folks [05:22] mikeal has joined the channel [05:24] ron_frown has joined the channel [05:28] googol has joined the channel [05:31] matty has joined the channel [05:32] matty has left the channel [05:32] matty has joined the channel [05:32] matty: howdy [05:32] jchris: word [05:33] jchris: got your beer in the office fridge :) [05:40] iszak has joined the channel [05:42] amerine has joined the channel [05:42] heavysixer has joined the channel [05:44] Aikar has joined the channel [05:44] Aikar has joined the channel [05:44] jimt has joined the channel [05:54] heavysixer_ has joined the channel [05:55] mikew3c_ has joined the channel [05:55] matty: im really struggling to figure out how to get expresso unit-testing up and running [05:56] matty: i have user register and user login tests, but i cant get them to work in order [05:56] matty: very frustrating, i sense im fundamentally misunderstanding something [06:01] Fuld: This says everything about Javascript: http://ompldr.org/vNmx1NA [06:02] beawesomeinstead has joined the channel [06:02] EGreg has joined the channel [06:03] Yuffster has joined the channel [06:11] maushu_ has joined the channel [06:15] ashleydev has joined the channel [06:18] liar has joined the channel [06:20] devdrinker has joined the channel [06:22] devdrink_ has joined the channel [06:22] forzan has joined the channel [06:23] daveyjoe has joined the channel [06:26] x_or has joined the channel [06:27] mikeal has joined the channel [06:29] emorins has joined the channel [06:32] Aikar: ryah_: seeing inconsistent behavior between fs.readFile and fs.readFileSync, file reads as expected with fs.readFile but fs.readFileSync gave me unknown encoding. check out was like 3 days ago [06:33] mikeal has joined the channel [06:34] nooder has joined the channel [06:36] ryah_: Aikar: example? [06:36] Aikar: oh crap nvm i just realized a bug in my code [06:37] mscdex: node.js rules! [06:37] Aikar: i tried to do fs.readFileSync('filename',function(err,data) { }); lol [06:37] mscdex: :O [06:37] Aikar: which i guess if you added it that could work :p [06:38] Aikar: instead of returning pass to callback but run it sync lol [06:38] jimt_ has joined the channel [06:44] handle_with_care has joined the channel [06:50] mytrile has joined the channel [06:52] modular has joined the channel [07:01] matty: how do i run expresso tests "in order" - http://pastie.org/1465823 [07:04] matty: i'm trying to create a dummy user in the registration test, and then login as them [07:04] matty: unfortunately, the tests run in parallel [07:04] void_ has joined the channel [07:11] liar has joined the channel [07:12] mr_daniel has joined the channel [07:16] devdrinker has joined the channel [07:17] arrty has joined the channel [07:26] skm has joined the channel [07:26] devdrinker has joined the channel [07:29] dgathright has joined the channel [07:30] creationix has joined the channel [07:30] creationix has left the channel [07:35] handle_with_care has joined the channel [07:47] ossareh has joined the channel [07:52] x_or has joined the channel [07:56] saschagehlich_ has joined the channel [07:57] qFox has joined the channel [07:58] matty has joined the channel [08:06] Sami_ZzZ has joined the channel [08:13] nook has joined the channel [08:14] mikeal has joined the channel [08:16] mraleph has joined the channel [08:16] mraleph1 has joined the channel [08:18] vineyard has joined the channel [08:22] x_or has joined the channel [08:24] saschagehlich_: mjr_: ping [08:31] devdrinker has joined the channel [08:31] matjas has joined the channel [08:34] shinmei has joined the channel [08:41] beawesomeinstead has joined the channel [08:44] KyleXY[2] has joined the channel [08:45] mikedeboer has joined the channel [08:49] iszak has joined the channel [08:49] iszak has joined the channel [08:54] SamuraiJack has joined the channel [08:58] MikhX has joined the channel [08:58] kiddphunk has joined the channel [09:00] ROBOd has joined the channel [09:08] tim_smar1 has joined the channel [09:09] masahiroh has joined the channel [09:17] ineation has joined the channel [09:19] mikeal has joined the channel [09:20] herbySk has joined the channel [09:20] mikeal has joined the channel [09:23] CIA-121: node: 03Ryan Dahl 07master * r9bcfc07 10/ (doc/api/os.markdown lib/os.js src/node_os.cc): [09:23] CIA-121: node: Revert "Implement os.isWindows" [09:23] CIA-121: node: This reverts commit 9e31e0837ec3c5a88ed477bec3980dd4608046be. [09:23] CIA-121: node: Use process.platform == 'win32' - http://bit.ly/g4uPOB [09:23] CIA-121: node: 03Ryan Dahl 07master * rd9087c1 10/ src/node.js : style - http://bit.ly/dUpbvR [09:23] CIA-121: node: 03Ryan Dahl 07master * rf35773a 10/ test/simple/test-require-cache-without-stat.js : [09:23] CIA-121: node: Add broken test for require cache working [09:23] CIA-121: node: require is caching the compiled code but still stating the filenames. [09:23] CIA-121: node: https://groups.google.com/d/topic/nodejs-dev/QGGlrvLDHVs/discussion - http://bit.ly/gnxfhH [09:29] adambeynon has joined the channel [09:31] cagan327 has joined the channel [09:33] ineation has joined the channel [09:33] altamic has joined the channel [09:37] matjas has joined the channel [09:43] w0rse has joined the channel [09:45] Gruni has joined the channel [09:45] Rixius has joined the channel [09:46] ineation has joined the channel [09:52] kjeldahl has joined the channel [09:52] liar has joined the channel [09:57] vincex has joined the channel [10:01] vincex: got a question about net.js and _onReadable, its emit's data once the buffer pool is full, but there is still more bytes to read from the socket. [10:02] vincex: consequently, my app receives some bytes from the socket which are then truncated. [10:03] vincex: obviously, the next read() on the socket would get the next chunk of data [10:04] vincex: but, my app attempts to parse the first (and incomplete) read, and then fails. [10:05] vincex: should _onReadable only emit 'data' once all data has been read? [10:05] micheil has joined the channel [10:08] vincex: or is it my app side that needs to just handle the read data and determine when its finished? [10:10] MikhX has joined the channel [10:11] vincex: or to be more precise: [10:11] vincex: _onReadable has a pool buffer that it is used for read() to read into. [10:13] vincex: if that buffer is almost full, the next call to read() may fill it, and then emit that data, regardless of weather or not there is still more data to be red. [10:19] ph^ has joined the channel [10:25] Twelve-60` has joined the channel [10:26] Wizek has joined the channel [10:27] ryah_: vincex: your app needs to handle partial reads [10:27] micheil: evenin' ryah_ [10:28] femtoo has joined the channel [10:28] vincex: ahhh, i was hoping you were'nt going to say that, but thanks for the answer. [10:28] ryah_: micheil: howdie [10:28] micheil: ryah_: how's san fran atm? [10:29] ryah_: warm [10:30] micheil: heh, weather must be similar to where I'm now located [10:30] micheil: been' moving house over the last week, and have only just managed to get online [10:32] micheil: ryah_: is there anything that needs working on atm in core? [10:34] Kingdutch has joined the channel [10:36] micheil: man. mobile wireless internet is certainly not the future. [10:37] micheil: sadly, that's about all this town has >_> [10:39] micheil_mbp has joined the channel [10:39] ewdafa has joined the channel [10:40] micheil_mbp: ryah_: is the github bug tracker still being used? [10:43] Kingdutch: Anyone here used WebGL yet? [10:45] common- has joined the channel [10:56] d0k has joined the channel [10:59] khug has joined the channel [10:59] fangel has joined the channel [11:03] Silks has joined the channel [11:07] Silks has joined the channel [11:08] sechrist has joined the channel [11:09] herbySk: felixge: around? [11:09] ryah_: micheil: i changed the style sheet in the docs [11:09] ryah_: micheil: the code samples look crappy [11:09] ryah_: that could be fuxed [11:10] ryah_: the
 elements
[11:10] tc77 has joined the channel
[11:11] Kingdutch: ACTION whimpers: I want JS Content protection
[11:11] micheil: ryah_: these live?
[11:11] micheil: or only in the repo?
[11:12] sechrist: Kingdutch: content protection?
[11:13] sechrist: use flash
[11:13] sechrist: oh, wait, that's not secure either
[11:13] micheil: I can't believe some of the foolish politicians here think that mobile internet is the future; the connection speed is less then dial up, and a ping to google takes generally longed then 2 seconds >_>
[11:13] Kingdutch: Flash gives me creeps
[11:13] jimt has joined the channel
[11:13] Kingdutch: And we've debunked that solution yesterday evening
[11:13] sechrist: Kingdutch: just accept that there is no way to secure anything if it has to be undone inside the browser
[11:13] sechrist: your life will be easier
[11:14] Kingdutch: It means that in my life I can't create what I want because desktop apps allow me to protect user generated content where as webgl does not
[11:14] sechrist: From what I've heard from blogs that deal with music labels, they get all pissy when people stream 320 mp3 for free
[11:14] Kingdutch: Even though webgl makes it more accessible
[11:14] sechrist: then put contracts on them to obfuscate stuff
[11:14] Kingdutch: If you send object from server -> client
[11:14] Kingdutch: You can't erally obfuscate it, without losing a lot of speed
[11:15] Kingdutch: And I could just make a little JS hook to intercept the data
[11:15] sechrist: well in this specific case they were using amazon for rtmp
[11:15] Kingdutch: And recreate your hard work of 3D object
[11:15] mnbvasd_: I've been working on an xmpp server if anyone's intrested: http://bee.5sh.net/adie/xmpp/xmpp-server.tar.gz - it's quite early stages yet.
[11:15] sechrist: but they used pgp stuff for json objects from swf <-> server
[11:15] sechrist: worked well until I decompiled the swf
[11:15] sechrist: and went -- hey guyz
[11:15] Kingdutch: Ghehe
[11:15] Kingdutch: But with JS you dont even need the decompile step
[11:15] sechrist: it's true
[11:16] Kingdutch: And I'd be happy if I could like atleast make it Hard
[11:16] sechrist: I've written little things I can run in firebug to unwind stuff
[11:16] micheil: you can't protect anything that gets downloaded onto a client, it's not possible, I'm sure.
[11:16] sechrist: function.toString() = lol
[11:16] Kingdutch: Maybe even in such a waythat you can't really automate it
[11:16] Kingdutch: if you steal it
[11:16] Kingdutch: So like 99% of the people wouldn't bother
[11:16] sechrist: it depends on how desirable your stuff is to tamper with
[11:16] b_erb has joined the channel
[11:16] sechrist: some 13 year might still break it for fun, you never know
[11:17] Kingdutch: We'd bothj be in a virtual world, you uploaded a really cool object, since I can see it I know how it's constructed, so if I like it enough, it'd be desirable enough to steal instead of buy, reupload it and place it where I please
[11:17] sechrist: with swfs you can get a little messier than other methods 
[11:17] sechrist: I've seen swf obfuscators exploit bugs in the major decompilers.. so dirty
[11:17] Kingdutch: I might actually be able to go around this by rendering on the server and just sending over pixels
[11:17] Kingdutch: I suppose
[11:18] b_erb: what is the more respected naming style for JSON attributes: lowCamelCase, BigCamelCase or hyphen-minus?
[11:18] sechrist: I heard of one instance where one swf obfuscator actually exploited one decompiler to the point where it would execute code on the person running the decompiler
[11:18] sechrist: and phone home
[11:18] Kingdutch: But I'd like node for hteb ackend and it doesn't do WebGL :') + that'd mean my server needed to render for each client
[11:18] sechrist: retarded
[11:18] Kingdutch: and lol
[11:20] SamuraiJack_ has joined the channel
[11:20] sechrist: woo I logged into some old vps I have
[11:20] sechrist: node version 0.1.97
[11:20] sechrist: dinosaur
[11:20] felixge has joined the channel
[11:20] felixge has joined the channel
[11:21] Kingdutch: lol
[11:22] Kingdutch: But like other than obfuscation, how could I make it hard for people to intercept objects?
[11:22] Kingdutch: I suppose I could send partial objects, but you can intercept it just before it's send to the gfx card :<
[11:24] nook: b_erb i'd say the latter
[11:25] b_erb: nook: google JSON style guide says the first, due to the fact that it's compatible to JS variable naming 
[11:26] b_erb: but that may depend on your JS naming conventions as well
[11:28] tc77 has joined the channel
[11:31] zorzar has joined the channel
[11:31] fille12 has joined the channel
[11:32] ithkuil has joined the channel
[11:33] x_or has joined the channel
[11:34] ithkuil: anyone ever had this problem: ReferenceError: readFileSync is not defined
[11:35] b_erb: ithkuil: require('fs')… ?
[11:37] ithkuil: it says its giving an error in Script.runInThisContext(data);
[11:38] ithkuil: I had require('fs') .. I added some more in case that was an issue somehow.. 
[11:39] ithkuil: readFile works but not readFileSync or runInThisContext
[11:39] ithkuil: maybe my node install is broken
[11:42] k04n has joined the channel
[11:42] ossareh has joined the channel
[11:43] ithkuil: works in main file not in module
[11:45] Wizek has joined the channel
[11:46] ithkuil: nevermind was loading code in a separate file that was missing the require.guess I have to stop when it gets that dumb
[11:48] herbySk has joined the channel
[11:55] mikew3c_ has joined the channel
[11:56] m3nt0r^aw has joined the channel
[11:58] felixge: ryah_: still up?
[12:07] q_no has joined the channel
[12:08] webr3 has joined the channel
[12:10] muk_mb has joined the channel
[12:12] yorick: I think node.js would be helped by v8 implementing generators
[12:12] shaver: yeah
[12:12] shaver: or by node being ported to spidermonkey :-)
[12:12] eikke has joined the channel
[12:12] chapel: naw
[12:12] chapel: v8 is fine
[12:12] yorick: spidermonkey has an ugly api
[12:13] chapel: v8 is ever improving
[12:13] yorick: I prefer the v8 api, but the spidermonkey features
[12:13] yorick: chapel: after two years, it still doesn't have generators
[12:13] shaver: spidermonkey needs to ape the V8 API, yeah
[12:14] shaver: different GC strategies, but it's doable
[12:14] shaver: I should find someone on contract or sometihng
[12:14] chapel: I dont know much about the advanced js stuff, so I am not much help there
[12:14] MrTopf has joined the channel
[12:14] yorick: shaver: it also needs to become more standalone
[12:16] felixge_ has joined the channel
[12:17] devdrinker has joined the channel
[12:22] yorick: because continuations are awesome :)
[12:22] Wizek has joined the channel
[12:22] altamic has joined the channel
[12:22] Max-Might has joined the channel
[12:22] shaver: yorick: it builds pretty well alone, except for NSPR
[12:23] shaver: making a good tarball is something we need to do in sync with FF4, though, I agree
[12:23] yorick: you're a mozilla guy?
[12:23] shaver: yeah
[12:24] ziro` has joined the channel
[12:24] shaver: that's a pretty good definition of me, really :-)
[12:26] yorick: because everyone has autoconf-2.13!
[12:27] fly-away has joined the channel
[12:27] pjackson: Is there a commandline tool for reading library documentation?
[12:32] sveimac has joined the channel
[12:32] augustl: pjackson: man
[12:33] liar has joined the channel
[12:33] springify has joined the channel
[12:34] bingomanatee has joined the channel
[12:34] augustl: so, https in node: https://gist.github.com/764213. Why do I have to supply a key and a certificate? Or, what does browsers do on https so I don't have to provide certificates to the browsers for https requests?
[12:35] pjackson: augustl: for reading node library docs?
[12:36] augustl: pjackson: not sure if there are manpages for that. You could use lynx I suppose
[12:37] pjackson: You've been very helpful, thanks.
[12:37] yorick: augustl: I think browsers read them from some directory
[12:38] pjackson: This might do: https://github.com/visionmedia/dox
[12:38] SvenDowideit has joined the channel
[12:38] yorick: augustl: /etc/ssl/certs/
[12:39] augustl: yorick: what about self signed certs?
[12:39] yorick: augustl: don't the browsers ask you about that...
[12:39] mraleph1: augustl: browsers will be unhappy about self signed certs
[12:39] augustl: well they get very whiny
[12:39] augustl: but you can still continue
[12:39] augustl: perhaps they use openssl to create certs on the fly
[12:40] mnbvasd_: erm ;)
[12:40] mraleph1: why not create cert?
[12:40] yorick: augustl: it works with self-signed certs, but they just can't verify them
[12:40] booo has joined the channel
[12:40] yorick: which they can when you get it signed by someone in /etc/ssl/certs/
[12:40] augustl: I want arbritrary clients to be able to connect to a TLS socket. Trying to grok what I need to do to make that happen.
[12:41] mraleph1: augustl: create cert and key and you are done...
[12:41] augustl: mraleph1: on the client, or on the server?
[12:41] yorick: augustl: create cert and key and you are done
[12:41] yorick: augustl: server
[12:41] mnbvasd_: augustl: you don't need a signed cert if you don't care about it being valid, you can just use unsigned stuff.
[12:41] augustl: so how do you initiate a TLS socket (or https connection for that matter) without certs on the client?
[12:41] ron_frown has joined the channel
[12:41] augustl: the tls modules seems to require a key and a cert on the client to be able to connect, for example
[12:42] augustl: module*
[12:42] bingomanatee has joined the channel
[12:42] yorick: augustl: it's possible, all clients do it
[12:42] yorick: no idea how the tls modules work
[12:42] yorick: but I've done it with default openssl without needing a key/cert
[12:42] augustl: I see
[12:42] yorick: (in C)
[12:43] yorick: but mercurial decided to clog my entire system with the mozilla-central clone, so I can't look it up
[12:43] yorick: shaver: yes, your fault
[12:44] augustl: haha
[12:45] tokumine has joined the channel
[12:45] fille12: anyone know how to get code completiion in vim
[12:45] fille12: ?
[12:45] yorick: fille12: rtfm
[12:45] fille12: lqut
[12:45] fille12: lol
[12:45] yorick: or utfg
[12:46] yorick: and then stfu
[12:46] yorick: :)
[12:46] yorick: http://lmgtfy.com/?q=vim+code+completion
[12:46] fille12: at least u can spell it for me :D
[12:49] yorick: hmm node.js lacks Object.extend
[12:49] yorick: it needs that
[12:49] augustl: blame ecma
[12:51] yorick: ACTION prefers git over mercurial
[12:51] fille12: no but serious
[12:51] augustl: hi5!
[12:51] fille12: cant find it
[12:52] fille12: i whant to be elite
[12:52] augustl: JavaScript code completion is hard. Let's have lunch.
[12:53] yorick: fille12: l33ts d0nt us3 c0d3 c0mp13710n
[12:53] fille12: :P
[12:54] yorick: it just gets in our way
[12:54] augustl: signed, verified
[12:54] fille12: netbeans have a nice code completiion
[12:54] Wizek has joined the channel
[12:55] tk has joined the channel
[12:56] vineyard has joined the channel
[12:56] fille12: what do u think about the youtube api?
[12:56] augustl: doh. tls.connect, options are optional. I.e. certs and keys and all that jazz is optional. :)
[12:58] yorick: AARGH...abort: premature EOF reading chunk (got 2652 bytes, expected 3758)
[12:58] yorick: now I'll have to do it all over
[12:58] yorick: ACTION gets the tarball
[12:59] Gruni has joined the channel
[13:00] Evet: which framework you use for client-side?
[13:01] Wizek has joined the channel
[13:01] dgathright_ has joined the channel
[13:02] stagas: yay web fonts: http://fonts.stagas.com/
[13:13] Sbioko has joined the channel
[13:13] Sbioko: hi all!
[13:14] tokumine has joined the channel
[13:15] Country has joined the channel
[13:17] mnbvasd_: is there a nice way to profile memory usage in node?
[13:17] mnbvasd_: s/nice/easy/
[13:18] mraleph1: for JS heap there is a built-in profiler
[13:18] mnbvasd_: please can you point me towards some google runes?
[13:19] mraleph1: mnbvasd_:  I think this are the droids you are looking for: https://github.com/dannycoates/node-inspector
[13:19] mnbvasd_: mraleph1: thanks muchly :D
[13:20] mraleph1: alternatively you can just say --trace-gc --- this will dump JS heap size after each GC + how long GC was 
[13:21] mraleph1: all this tools of course do not display native memory usage (e.g. cumulative size of buffers).
[13:22] Wizek has joined the channel
[13:23] mnbvasd_: thanks, I'll try node-inspector for now... my app is quite non-deterministic, so it's difficult to work out what's happening with various objects.
[13:32] c0nundrum has joined the channel
[13:34] mnbvasd_: ACTION has fun..
[13:34] mnbvasd_: node-inspector is reliably crashing safari.
[13:38] augustl: is there a function somewhere that takes a Data and an encoding and returns a String?
[13:38] malkomalko has joined the channel
[13:38] Stephen_ has joined the channel
[13:38] augustl: Buffer, I mean
[13:39] augustl: and now that I realized they're called buffers and not data, I found it in the docs ;)
[13:39] stagas: augustl: new Buffer(data, encoding).toString()
[13:40] augustl: thanks
[13:42] TobiasFar has joined the channel
[13:42] spetrea has joined the channel
[13:43] mnbvasd_: hmm can't get v8-profiler to build with node-3.4 :(
[13:50] herbySk has joined the channel
[13:53] ttpva has joined the channel
[13:55] eirikb has joined the channel
[13:57] eirikb: Hello. What is the easiest and most robust Web Socket module of these: https://github.com/ry/node/wiki/modules#ws-ajax ? Fallback to long polling is important. So far I have implemented Faye, but wondering if anyone got any good suggestions
[13:57] Sbioko: eirikb: socket.io
[13:58] eirikb: Sbioko: I guess it does not have pub/sub, but that is not relevant as I can choose whom to send to from node
[13:58] Sbioko has left the channel
[13:59] eirikb: duh
[14:00] perlmonkey2 has joined the channel
[14:02] eirikb: This does seem neat. I see in the source it does append to jQuery, is this optional - or will it mess something up? I want to use good old XHR for some stuff
[14:03] vineyard_ has joined the channel
[14:06] nooder has joined the channel
[14:15] altamic has joined the channel
[14:18] MrTopf has joined the channel
[14:19] dspree has joined the channel
[14:19] dspree has joined the channel
[14:20] heavysixer has joined the channel
[14:21] herbySk has joined the channel
[14:29] bingomanatee: mnbvasd_: why do you want to use 3.4 at all? 2.x is stable. 
[14:30] mnbvasd_: bingomanatee: all the "exciting" features. ;)
[14:31] mnbvasd_: bingomanatee: I'm writing an xmpp server in js, clearly common sense isn't my strong point :)
[14:31] Andres_ has joined the channel
[14:37] pyrotechnick has joined the channel
[14:37] bingomanatee: alright as long as getting things done isn't a priority with you. 
[14:37] bingomanatee: I've been stung too many times by sticking my toes in the 3.x branches. 
[14:37] Kingdutch: bingomanatee: With what?
[14:37] Kingdutch: I don't see what's wrong with using 0.3.4
[14:37] Kingdutch: Bleeding edge is cool ^
[14:37] Kingdutch: ^^
[14:38] pyrotechnick: we are on edge and have had no problems. we prefer it
[14:38] bingomanatee: using node at all is bleeding enough for me. 
[14:38] Kingdutch: Seeing as it's all actually 0.*
[14:38] Kingdutch: Which means there'sn o major version been reached
[14:39] Kingdutch: I'm gonna say 0.3.4 is as stable as 0.2.6
[14:39] bingomanatee: given the number of times I've hopped from machine 1 to machine 2 and discovered stuff has shifted under my feet I am quite content sticking to 0.2.6 and having at least one variable stay constant. 
[14:39] Kingdutch: Although I'll probably get bitchslapped for saying this
[14:39] Kingdutch: Well you obv. shouldn't use both 0.3 ad 0.2
[14:39] Kingdutch: Since there's some stuff that changes from the one to the other
[14:39] pyrotechnick: until it goes 1.0 we're sticking pretty close to edge node
[14:39] bingomanatee: You might be right Kingdutch. However - if the development team thorught that 0.3.x was stable they'd give it an even number. 
[14:39] Kingdutch: I'm quite happy with using just 0.3 though
[14:39] Kingdutch: bingomanatee: How is 0.3.6 not even?
[14:40] pyrotechnick: lol
[14:40] pyrotechnick: yeah
[14:40] Kingdutch: I can divide by 2 and get 0.1.8 :D
[14:40] ineation_ has joined the channel
[14:40] pyrotechnick: even numbers isn't part of the versioning spec
[14:40] Kingdutch: ^
[14:40] hij1nx has joined the channel
[14:40] bingomanatee: I'm happy you're happy. 
[14:40] Kingdutch: It's major release dot minor release dot minor changes
[14:40] Kingdutch: the minor release was for stuff like stream.end() instead of stream.close()
[14:40] Kingdutch: Or the other way around
[14:40] pyrotechnick: 1.0 isnt an even number...
[14:41] Kingdutch: minor changes are bug fixes
[14:41] bingomanatee: okay you are all right. 
[14:41] Kingdutch: Just use what you're comfortable with though
[14:41] Kingdutch: if that's 0.2.6, use 0.2.6 :)
[14:42] bingomanatee: very much so. 
[14:42] Kingdutch: Just try to avoid stuff that's deprecated and removed in 0.3 :)
[14:42] bingomanatee: there is of course a list of that stuff somewhere right?
[14:42] ollie: how do people handle dependencies & global vars using this model? https://github.com/visionmedia/express/tree/master/examples/route-separation
[14:42] Kingdutch: bingomanatee: Not quite sure
[14:42] bingomanatee: throught so. 
[14:42] Kingdutch: I got an error when I used .end() or .close() though
[14:43] Kingdutch: whichever of the two is wrong
[14:43] ollie: i mean passing them through to the route functions
[14:43] Kingdutch: And it told me something like "Blabla shit deprecated, use this"
[14:43] bingomanatee: ollie: modules/require pretty much manages my dependenies. 
[14:43] ollie: so you require from within the route module?
[14:43] bingomanatee: Modules themselves are singletons so I use them as a registry for globals. 
[14:44] bingomanatee: your questions are fairly abstract can you give me a concrete use case/ gist sample to look at?
[14:44] bingomanatee: I mean node has a globals registry. its called globals. 
[14:44] ollie: i'm using mongoose to handle db requests, i'd like a clean way to pass that through to each route module
[14:45] bingomanatee: I don't use mongoose. 
[14:45] bingomanatee: I keep all my collections in their own library. 
[14:45] bingomanatee: I use event emitters to stall all functions til the database and collections have loaded. 
[14:45] ollie: let me make an example
[14:46] ph^ has joined the channel
[14:46] bingomanatee: That would help. 
[14:49] ollie: bingomanatee: https://gist.github.com/781847
[14:49] ollie: i did have a pattern that required me to pass any module dependencies through as parameters once
[14:49] ollie: but that's a little clunky
[14:50] ttpva: is there a node.js equivalent to Cucumber and RSpec?
[14:51] skohorn has joined the channel
[14:51] ollie: doh! I've just realised that if I'm not declaring "var File = " but instead "File = " the module has knowlege of the File variable
[14:51] MattDiPasquale has joined the channel
[14:51] ollie: is there any reason not to declare vars as globals in node.js?
[14:52] Kingdutch: memory?
[14:52] Kingdutch: unexpected behaviour
[14:52] Kingdutch: ?
[14:52] Kingdutch: Pretty much the same reason why you wouldn't want every var you use in other languages to be global
[14:52] ollie: sure
[14:52] Kingdutch: Is it that hard to just prepend "var"
[14:52] Kingdutch: ?
[14:53] Kingdutch: I mean, if you need a var globally, by all means make it global, but vars that are only used in functions should be local to that function
[14:53] ollie: no, but i want some modules that i am requiring to have knowlege of vars declared in my server.js
[14:53] ollie: Kingdutch: i agree
[14:53] Kingdutch: if a model needs knowledgeo f a var, pass it along to the module and let the module keep it in itś own scope
[14:54] Kingdutch: The model should be able to function without setting vars in the including file's global scope imo
[14:56] Kingdutch: /rant
[14:56] ollie: Kingdutch: that's what i'm wanting to do, do you know of a clean pattern to achieve this? I was using https://gist.github.com/781854
[14:57] Kingdutch: Where is the .go function from?
[14:57] Kingdutch: Like, what is 'my'
[14:57] ollie: it's defined in the my module
[14:57] Kingdutch: So why not directly load that module?
[14:57] ollie: because it's require in several places
[14:57] Kingdutch: require('my').go()
[14:58] ollie: maybe i'm overcomplicating things
[14:58] Kingdutch: You need the same instance in several places?
[14:58] ollie: yes
[14:58] Kingdutch: Then does that stuff really go in different modules?
[14:58] Kingdutch: Shouldn't it just be in 1?
[14:58] Kingdutch: Also, please, please, name your functions
[14:58] Kingdutch: makes debugging so much easier
[14:59] mnbvasd_: bingomanatee: sorry for being slow... I was stung a couple of times before the 0.2 branch, but not since.
[14:59] tmzt: anybody know of a working paypal IPN server that can handle subscriptions?
[14:59] AAA_awright has joined the channel
[15:01] aklt has joined the channel
[15:03] AAA_awright_ has joined the channel
[15:03] tmzt: bingomanatee: I'd be interested in knowing how you did that mongo delaying and why
[15:04] riven has joined the channel
[15:05] bingomanatee: check out noogle on github
[15:05] AAA_awright has joined the channel
[15:05] tmzt: Urban Dictionary: noogle
[15:05] tmzt: 7 posts - 7 authors - Last post: Oct 18, 2009
[15:05] tmzt: a word or phrase which yields no search results on google.
[15:06] bingomanatee: Basically - I wanted to load the database and collectors without blocking the rest of the app
[15:06] tmzt: I'm trying to see if I need to use redis to cache certain things for accounts or not
[15:07] herbySk has joined the channel
[15:07] matjas has joined the channel
[15:08] fairwinds has joined the channel
[15:08] bingomanatee: then when a model method is called, if I don't have confirmation of the database being loaded, i turn the callback into a listener for the 'connect' action of the collection listener. 
[15:08] devdrink_ has joined the channel
[15:08] tmzt: and that just delays the request?
[15:08] bingomanatee: yep
[15:08] bingomanatee: delays the callback til the colleciton is loaded. 
[15:09] tmzt: is there an example?
[15:09] bingomanatee: the lines model
[15:09] bingomanatee: https://github.com/bignomanatee/noogle/blob/master/model/lines.js
[15:09] bingomanatee: note - this is very experimental still
[15:09] bingomanatee: but I think the principle is sound.
[15:09] tmzt: yeah, I think my problem is a little different though
[15:10] tmzt: mostly I need to get something from the db when I get a call through twilio
[15:10] xla has joined the channel
[15:10] tmzt: though that also has to be accesible through the website interface
[15:10] tmzt: models are part of noogle itself?
[15:11] bingomanatee: well yes - I am indexing the IRC logs in mongo so I use my model modules for I/O.
[15:11] bingomanatee: I think the pattern can be extended to a lot of general purpose work but for now I'm juust using noogle to test some stuff out. 
[15:12] bingomanatee: Its not a huge part of the app - I just wanted the loading of collection gateways to be a non blocking act. 
[15:13] bingomanatee: so I make my connection asynchronously and only block the execution of a mongo I/O method until the connection is made. Its just a startup thing - once the app persists the evented stuff goes away.
[15:13] razvandimescu has joined the channel
[15:13] tmzt: oh
[15:14] tmzt: why do you need it on startup?
[15:14] bingomanatee: Because when I load a module, the connection is started and persisted. But I have no guarantee that the connection has been made by the time I call a find or insert function. 
[15:15] bingomanatee: Since making the connection is not part of the callback chain of calling insert/find. 
[15:16] bingomanatee: I essentially block any CRUD calls made on module startup until the connection is validated. 
[15:17] bingomanatee: Also it allows me to use the same strategy to share the same database connection across all my collection modules .
[15:17] bingomanatee: Its a little ephemeral I know. 
[15:17] jacobolus has joined the channel
[15:18] fairwinds: hi. I am just getting going with express. Should I be working with node 0.2.6 or 0.3.x?
[15:18] pyrotechnick: fairwinds: if you're starting out you may as well jump straight onto 0.3
[15:19] pyrotechnick: unless you're trying to use an old, unmaintained library you should be fine
[15:19] fairwinds: cool
[15:19] pyrotechnick: this way any new libraries that come up from now onwards should work too
[15:19] pyrotechnick: and the docs are more comprehensive
[15:20] pyrotechnick: if you're doing anything serious dont try to target edge too much like when the next 0.3.x comes out just stick with what you have unless you need something from it or don't have much happening
[15:20] pyrotechnick: but yeah we target the latest stable and haven't had any problems with compatibility or otherwise
[15:21] pyrotechnick: most of our package.json for npm say node >= 0.3
[15:21] razvandimescu: hey guys, i'm trying to understand node.js. Ok, I got it, it's a webserver designed for concurrency, but what's the difference between node.js and nginx?
[15:21] pyrotechnick: but we have backported some for people who cannot upgrade
[15:21] fairwinds: pyrotechnick: k, I had to make a change in connect for secret is only thing so far
[15:21] pyrotechnick: razvandimescu: nginx is a static web server
[15:21] fairwinds: pyrotechnick: appreciate this
[15:22] fairwinds: thx
[15:22] pyrotechnick: razvandimescu: it's very good at what it does but it's not for doing dynamic things like php or ssjs
[15:22] pyrotechnick: fairwinds: no problems
[15:22] pyrotechnick: razvandimescu: you can run php and stuff on nginx through cgi just like you can with mod_php or fastcgi on apache
[15:23] pyrotechnick: razvandimescu: nginx is evented like node.js and twisted (python) and eventmachine (ruby) meaning it uses an event loop instead of threads
[15:23] pyrotechnick: so as more and more clients connect you use less memory than you would if you had to spawn a new thread for each connection like apache does
[15:23] razvandimescu: pyrotechnick: so it's still static and dynamic then? When you say static, you meant it interprets static languages?
[15:24] skm_ has joined the channel
[15:24] pyrotechnick: razvandimescu: no, nginx itself can only serve static files or delegate out to server-side logic like php and perl with cgi
[15:24] pyrotechnick: razvandimescu: now node.js is similar to nginx only in that it uses an evented architecture
[15:24] pyrotechnick: but it's completely different otherwise
[15:25] pyrotechnick: being able to function as a webserver is only a very small component of node.js
[15:25] kolbyjack: pyrotechnick: nginx doesn't do cgi, actually.  fastcgi/scgi/uwsgi/proxy, but not plain cgi.
[15:25] pyrotechnick: so you've obviously seen the http demos of node.js on the site right?
[15:25] pyrotechnick: kolbyjack: correct but i'm trying to keep things simple ;)
[15:25] kolbyjack: fair enough :)
[15:25] pyrotechnick: but razvandimescu that is true
[15:26] tanepiper: nodejs's original intention was as a web server
[15:26] pyrotechnick: nginx cannot do standard cgi, cgi is quite old now and is relatively inefficient
[15:26] tanepiper: all the cool bits came afterwards
[15:26] pyrotechnick: yep
[15:26] pyrotechnick: razvandimescu: lots of people have cloned nginx in node
[15:26] pyrotechnick: there's a dozen or so on the wiki under the modules section
[15:26] mnbvasd_: ah, didn't know it was a web server...
[15:27] pyrotechnick: it's a little insane though i think nginx runs circles around the clones done in node
[15:27] Gruni has joined the channel
[15:27] pyrotechnick: i think, give me some numbers if you have seen otherwise but i think nginx still dominates for purely static serving
[15:27] pyrotechnick: but as soon as you need to script or perform server-side logic
[15:27] pyrotechnick: then node.js is what you want, it allows you to write javascript instead of php, .net, perl etc
[15:28] razvandimescu: pyrotechnick: but you can host asp on nginx, how does it make static?
[15:28] pyrotechnick: asp can be fronted by nginx
[15:28] pyrotechnick: in that situation nginx is usually used as a load balancer
[15:28] pyrotechnick: a reverse-proxy
[15:29] pyrotechnick: in fact, ryan (ry) the author of node.js suggests you run it behind nginx in production
[15:29] pyrotechnick: some people even use nginx in front of apache
[15:29] razvandimescu: where can i read more detail stuff about node.js?
[15:30] pyrotechnick: http://nodejs.org/
[15:30] pyrotechnick: http://nodejs.org/docs/v0.3.4/api/
[15:30] MattJ has joined the channel
[15:30] fairwinds: pyrotechnick: I use nginx as front end in front of everything
[15:30] pyrotechnick: http://howtonode.org/
[15:30] pyrotechnick: fairwinds: yeah us too
[15:30] tanepiper: one of the main reasons to run it behind ngnix is if you need SSL support
[15:30] razvandimescu: pyrotechnick: cool, thanks
[15:30] pyrotechnick: but lately we've been toying with the idea of using a "static" node library just for ubiquity and hackability
[15:30] tanepiper: but that should be different in 0.4.x
[15:31] pyrotechnick: razvandimescu: howtonode is pretty awesome
[15:31] pyrotechnick: but i'd read the docs first
[15:31] bingomanatee: I'm getting this odd thing - I am bouncing between two Ubuntu boxes and it keeps asking for partials in different places.
[15:31] pyrotechnick: and try some of the examples in the docs
[15:31] bingomanatee: context: express
[15:31] bingomanatee: in one case it asks for messages in partials/messages
[15:31] bingomanatee: in one machine it asks for it in the root views folder. 
[15:31] bingomanatee: and the codebase is the same in both cases as far as my local app goes. 
[15:31] pyrotechnick: bingomanatee: try dump express's config on both environments
[15:32] bingomanatee: how do I do that?
[15:32] pyrotechnick: i dont know where it is exactly, try using debugger to explore the "app" variable
[15:32] pyrotechnick: it's probably app.config
[15:32] pyrotechnick: try
[15:32] pyrotechnick: console.dir app.config
[15:32] pyrotechnick: lol
[15:33] tmzt: so there's no working code out there for paypal ipn?
[15:34] tmzt: I'm thinking it's going to run on its own instance though
[15:34] tmzt: does mongo have the ability to work as a webserver or is that only couch?
[15:35] gattuso has joined the channel
[15:35] gattuso: hi
[15:35] bingomanatee: It does have rest capacities but that is not the most optimal way to get at it. 
[15:35] gattuso: it's normal in node.js the delete operator doesn't work?
[15:35] Aikar: yorick: i thought of a cleaner solution for the V8 syntax in scriptSrc of my templateEngine to handle non V8 friendly things like yield. before the vm.createScript ill modify the source to comment out the entire function body, then itll never parse the client scripts body, then remove the comment tags I added before adding it to the compile cache.
[15:36] pyrotechnick: gattuso: delete is weird
[15:36] pyrotechnick: gattuso: it's a trial and error thing
[15:36] tmzt: bingomanatee: I just need to update a flag in an account in response to an IPN message
[15:36] gattuso: pyrotechnick: why?
[15:36] tmzt: I can do it in a node instance if that's better though
[15:36] pyrotechnick: v8: var a = [true]; a
[15:36] pyrotechnick: wtf is v8?
[15:36] bingomanatee: 's what I'd do
[15:36] gattuso: pyrotechnick: it's defined in the ECMASCRIPT standard
[15:36] Aikar: the name of the javascript engine...
[15:37] pyrotechnick: i mean
[15:37] gattuso: pyrotechnick: and work in the original V8
[15:37] pyrotechnick: where's the bot
[15:37] Aikar: oh 'where the fuck'
[15:37] pyrotechnick: gattuso: the ECMA standard has bugs
[15:37] tmzt: bingomanatee: what are you working on? this irc search thing?
[15:37] pyrotechnick: if everyone followed it, we'd have buggy implementations
[15:37] bingomanatee: this is a hobby - at work I flense email. 
[15:37] pyrotechnick: v8: WHERE ARE YOU???
[15:37] tmzt: ah
[15:37] gattuso: pyrotechnick: ok, how can i destory a object in node.js
[15:37] pyrotechnick: v8bot: HELLO
[15:37] pyrotechnick: gattuso: stop referencing it
[15:38] bingomanatee: its acutally more like a web search thing as I'm just parsing the log dumps. 
[15:38] pyrotechnick: gattuso: it will be gc'd
[15:38] bingomanatee: which is part of my work mandate as well - writing web spiders etc. 
[15:38] pyrotechnick: gattuso: you know javascript is managed right?
[15:38] gattuso: pyrotechnick: yes
[15:38] bingomanatee: I know a lot of folk at work want to do this with off the shelf apps - I want to prove I can out perform an OTS app with ndoe. 
[15:38] pyrotechnick: do you have something so large you need it to be gc'd instantly?
[15:39] bingomanatee: so I am starting with the IRC chat logs as a test case. 
[15:39] pyrotechnick: forcefully?
[15:39] gattuso: not now
[15:39] gattuso: but somewhere in the future
[15:39] pyrotechnick: gattuso: what are you trying to delete anyway
[15:39] pyrotechnick: a variable?
[15:39] pyrotechnick: an array index?
[15:40] gattuso: an hash that represent an entire database table
[15:40] Solsys has joined the channel
[15:40] pyrotechnick: even if `delete VARIABLE;` is defined by ECMA it's not trustworthy in the wild. google it
[15:40] pyrotechnick: delete ARRAY[INDEX] works almost universally
[15:40] pyrotechnick: but delete VARIABLE is different
[15:40] pyrotechnick: and what it returns i think may be undefined
[15:41] pyrotechnick: i think in strict mode it returns the old value
[15:41] altamic has joined the channel
[15:41] pyrotechnick: i need v8 bot
[15:41] pyrotechnick: to show you
[15:41] yorick: Aikar: if you comment it out it won't be in the function source would it
[15:41] pyrotechnick: here comes coffeebot
[15:41] yorick: v8> 1
[15:41] pyrotechnick: he should be able to help
[15:41] coffee has joined the channel
[15:41] yorick: >> 1
[15:41] yorick: js> 1
[15:41] Aikar: yorick: nah func.toString includes comments
[15:41] gattuso: thanks for now
[15:41] pyrotechnick: coffee-eval: a = [true] ; delete a[0]; a
[15:42] coffee: [null]
[15:42] pyrotechnick: ok so that works
[15:42] pyrotechnick: coffee-eval: a = [true] ; delete a; a
[15:42] coffee: [true]
[15:42] pyrotechnick: but see
[15:42] pyrotechnick: that does not
[15:42] yorick: Aikar: spidermonkey one doesn't
[15:42] pyrotechnick: see gattuso
[15:42] pyrotechnick: delete is a bit hit and miss
[15:42] yorick: coffee-eval: (function(){/*test*/}).toString()
[15:42] coffee: SyntaxError: Reserved word "function" on line 1
[15:42] gattuso: coffe-eval: a = [true]; delete a; console.log(a)
[15:43] pyrotechnick: that's not coffeescript
[15:43] yorick: sssh
[15:43] pyrotechnick: gattuso: console log doesnt work in my coffee bot
[15:43] pyrotechnick: just eval things
[15:43] yorick: where'd the v8 bot go
[15:43] pyrotechnick: i dunno
[15:43] pyrotechnick: its better than mine though
[15:43] pyrotechnick: ryah_: where's v8bot?
[15:43] bingomanatee: pyrotechnick: no diff between configs (both empty).
[15:44] gattuso: pyrotechnick: however the standard defines delete only for referential types
[15:44] bingomanatee: Can I check in a symlink into git?
[15:44] Aikar: yorick: well good thing node is in v8 :P
[15:44] gkatsev: pyrotechnick: finding out from inimino 
[15:44] pyrotechnick: bingomanatee: yep
[15:44] bingomanatee: Yay! another f**ked up hack!
[15:44] yorick: Aikar: not good...v8 doesn't have generators
[15:44] Aikar: for my use case all i need is to get the function body, toString does that for me
[15:45] pyrotechnick: bingomanatee: https://github.com/feisty/ToE/blob/master/public/vendor
[15:45] gkatsev: pyrotechnick: technically, you can't delete a variable using delete and deleting an array item leaves a hole.
[15:46] pyrotechnick: right you need to splice the array to change the indexes
[15:46] gkatsev: yes
[15:46] pyrotechnick: but some js vm's let you delete variables
[15:46] Aikar: actually bleh commenting out the source would be extremely difficult
[15:46] pyrotechnick: gattuso: there's one hack i can think of
[15:46] Aikar: to insert the comments at the proper place
[15:46] pyrotechnick: node —expose-gc
[15:46] pyrotechnick: so its like this
[15:47] gkatsev: pyrotechnick: yeah, but that's not standard. The reason that firebug lets you is because it basically adds the var to the window object and thus you are really doing delete window.myvar
[15:47] pyrotechnick: var a = [true]; a = null; gc();
[15:47] pyrotechnick: so you kill all the references to a
[15:47] pyrotechnick: then force a gc with node —expose-gc
[15:47] mraleph1: why would you want to force gc?
[15:47] pyrotechnick: but that's
[15:47] pyrotechnick: hacky
[15:48] pyrotechnick: he wants to forcefully delete variables
[15:48] gkatsev: just set a = null and you're all set
[15:48] pyrotechnick: yah
[15:48] ineation_ has joined the channel
[15:48] pyrotechnick: he wants to be sure though
[15:48] pyrotechnick: for some reason
[15:48] pyrotechnick: that's his question
[15:48] mraleph1: you can never be sure
[15:48] pyrotechnick: yeah i've tested gc() alot
[15:48] pyrotechnick: it's spot-on
[15:48] pyrotechnick: i've tested it at 200, 000 Hz
[15:49] pyrotechnick: and it's spot on
[15:50] mraleph1: one can never be sure unless one produced processor, all auxiliary hardware, and have written OS from scratch using only tools one has developed singlehandedly
[15:50] gattuso: pyrotechnick: thanks, would be a solution
[15:50] pyrotechnick: mraleph1: ahh lol
[15:50] pyrotechnick: mraleph1: so linus can be sure
[15:50] mraleph1: for all other people a = null; should be enough :-)
[15:51] pyrotechnick: linus and steve Wozniak 
[15:51] pyrotechnick: they could be sure
[15:51] gkatsev: woz can't be sure anymore. Unless he is still using like the apple 1
[15:52] piscisaureus has joined the channel
[15:52] zomgbie has joined the channel
[15:52] pyrotechnick: woz still uses vacuum tubes
[15:52] gkatsev: lol
[15:53] pyrotechnick: they have higher fidelity
[15:53] gkatsev: he actually carries with him a rotary style phone with a cellphone inside
[15:54] skm has joined the channel
[15:55] pyrotechnick: steve emulates snow leopard on 1000 apple IIs
[15:55] pyrotechnick: so that he can be sure.
[15:55] pyrotechnick: they have token-ring networking
[15:55] pyrotechnick: so that he can be sure.
[15:56] gkatsev: lol
[15:56] gkatsev: I think he probably needs 10,000 at least to get any decent performance
[15:56] gkatsev: hopefully his apple ][s hive mind doesn't awaken and try to take over the world
[15:57] tokumine has joined the channel
[15:57] pyrotechnick: nah 10000 is for crysis
[15:57] pyrotechnick: steve dont mind a bit of crysis
[15:57] prettyrobots has joined the channel
[15:58] c0nundrum has joined the channel
[16:01] ineation_ has joined the channel
[16:04] yorick: how is fs.readFile('testfile') useful without a callback?
[16:04] augustl: yorick: you be trollin?
[16:05] booo has joined the channel
[16:05] yorick: augustl: no, really
[16:05] augustl: wow, the callback is actually optional
[16:05] yorick: does it return an eventEmitter or something?
[16:07] augustl: https://github.com/ry/node/blob/master/lib/fs.js#L45 have fun :)
[16:07] augustl: that makes no sense..
[16:09] mnbvasd_: augustl: perhaps you want to keep a file cached?
[16:09] mnbvasd_: nasty hack I know.
[16:09] augustl: hmm, what do you mean with cached?
[16:09] mnbvasd_: I'd argue for clarities sake I'd demand an empty function..
[16:10] mnbvasd_: augustl: say a passwords file that's not accessed regularly, but you want to ensure it's ready for reading quickly.
[16:10] stride: to change atime maybe, although there would be better ways for that
[16:10] Thorn has joined the channel
[16:10] mnbvasd_: you read it, then it's stored in your OS file cache.
[16:11] dnolen has joined the channel
[16:11] augustl: sounds like an edge case where you could just pass a noop callback yourself :)
[16:11] mnbvasd_: augustl: idd I agree
[16:12] mnbvasd_: mean while people will make mistakes and miss obvious bugs
[16:13] mnbvasd_: ACTION grumbles about bugs
[16:14] mnbvasd_: anyone wanna fix my auth for me? ;)
[16:15] AAA_awright_ has joined the channel
[16:15] mikedeboer has joined the channel
[16:22] MattDiPasquale has joined the channel
[16:25] ineation_ has joined the channel
[16:26] nonnikcam has joined the channel
[16:28] sveimac has joined the channel
[16:33] matjas has joined the channel
[16:34] kawaz_air has joined the channel
[16:35] sivy has joined the channel
[16:36] eirikb has left the channel
[16:36] emacsen has joined the channel
[16:36] franck34 has joined the channel
[16:36] jimt_ has joined the channel
[16:42] EGreg has joined the channel
[16:43] AAA_awright has joined the channel
[16:43] augustl: I want to install a previous version of NPM. A git checkout v0.2.13-3 and "node ./cli install npm downloads the lastes version, though.
[16:44] x_or has joined the channel
[16:45] tokumine has joined the channel
[16:49] augustl: gah installing an older version of NPM is hard :S
[16:49] bingomanatee: is there any handy function in node that will querystring encode a variable, specif. to replace all /'s with their encoded equivalent?
[16:49] jkridner|work has joined the channel
[16:49] WaterCoo1ed has joined the channel
[16:50] saikat has joined the channel
[16:50] bingomanatee: augustl have you tried nave?
[16:51] jimt has joined the channel
[16:51] sivy has joined the channel
[16:54] warz has joined the channel
[16:54] broofa has left the channel
[16:56] jimt_ has joined the channel
[16:58] K`` has joined the channel
[16:58] K``: hello there.
[16:59] steffkes has joined the channel
[17:00] kristsk: is there a way to obtain all valid (open) FDs?
[17:00] mnbvasd_: on linux look in /proc/self/fd/
[17:00] kristsk: brute looping through, say, first 1024 / fs.fstat does not seem like a very efficient way to it.
[17:01] SamuraiJack__ has joined the channel
[17:02] kristsk: got bitten in the ass by vfork a bit heh.
[17:02] v8bot has joined the channel
[17:04] gbot2 has joined the channel
[17:04] KungFuHamster has joined the channel
[17:04] jimt has joined the channel
[17:05] inimino: pyrotechnick ⋱ There you go.
[17:05] inimino: v8> 1
[17:05] v8bot: inimino: 1
[17:05] inimino: js> 1
[17:05] gbot2: inimino: 1
[17:07] prettyrobots has joined the channel
[17:07] Kingdutch: inimino: What's that supposed to do?
[17:07] yorick: ooh you put them back
[17:08] gkatsev: Kingdutch: v8bot and gbot2 are eval bots for v8 and spidermonkey respectively
[17:08] yorick: js> ~function(){yield 1;}()
[17:08] gbot2: yorick: -1
[17:08] Kingdutch: I see
[17:08] yorick: v8> ~function(){yield 1;}()
[17:08] v8bot: yorick: SyntaxError: Unexpected number
[17:08] Kingdutch: Let's expand on that a bit shall we, brb
[17:08] gkatsev: Kingdutch: though, they have some infobot capabilities as well.
[17:08] kristsk: v8> gimme a sammich
[17:08] v8bot: kristsk: SyntaxError: Unexpected identifier
[17:09] kristsk: :/
[17:09] yorick: v8> sudo gimme a sammich
[17:09] v8bot: yorick: SyntaxError: Unexpected identifier
[17:09] yorick: :/
[17:09] gkatsev: `string->int
[17:09] gbot2: v8: [parseInt('1', 10), Number('1'), +'1', ~~'1', '1'>>0, '1'|0, 1*'1'] // each item in the list is a way of doing string->int conversions
[17:09] v8bot: gbot2: [1, 1, 1, 1, 1, 1, 1]
[17:10] yorick: :O
[17:10] yorick: hmm too bad gbot doesn't respond to gbot2: things
[17:10] yorick: v8bot: 1
[17:10] v8bot: yorick: Use v8:  to evaluate code or "`v commands" for a list of v8bot commands.
[17:11] yorick: gbot2: 1
[17:11] Node-Bot has joined the channel
[17:11] malkomalko has joined the channel
[17:11] Kingdutch: !docs
[17:11] Node-Bot: v0.3.4 docs are found at: http://nodejs.org/docs/v0.3.4/api/ 
[17:12] Kingdutch: That's what I needed :)
[17:12] jimt has joined the channel
[17:12] pyrotechnick: lol rails
[17:12] pyrotechnick: http://railscasts.com/
[17:12] pyrotechnick: read the last two
[17:12] pyrotechnick: the latest two
[17:12] gkatsev: oh, didn't realize that we had a nodebot
[17:13] pyrotechnick: v8
[17:13] v8bot: pyrotechnick: undefined
[17:13] pyrotechnick: he's back!
[17:13] pyrotechnick: v8: 'wecome back'
[17:13] v8bot: pyrotechnick: "wecome back"
[17:13] yorick: hmm is the nodebot written in javascript?
[17:13] pyrotechnick: thankyou v8
[17:13] yorick: pyrotechnick: "wecome"?
[17:14] pyrotechnick: lol
[17:14] pyrotechnick: anyway read the latest two http://railscasts.com/
[17:14] gkatsev: huh, where's Node-Bot? I don't see him in the nicks
[17:14] yorick: gkatsev: gone already
[17:14] pyrotechnick: those last two posts on http://railscasts.com/
[17:14] yorick: Kingdutch: is it in javascript? <-- vacation project alert!
[17:14] pyrotechnick: are literally about creating rails apps that do not need rails
[17:15] TheEmpath has joined the channel
[17:15] Kingdutch: yorick: Is what?
[17:15] TheEmpath: noooooooode
[17:15] yorick: Kingdutch: node-bot
[17:15] pyrotechnick: v8: 1+1
[17:15] v8bot: pyrotechnick: 2
[17:15] gkatsev: !docs
[17:15] gkatsev: hm..
[17:17] Kingdutch: yorick: Oh, that's written in node, as his name suggests
[17:17] Kingdutch: gkatsev: I killed it
[17:17] A83 has joined the channel
[17:18] gkatsev: ok
[17:18] kristsk: fs.readdirSync("/proc/" + process.pid + "/fd").forEach(function(fd) { ... }); <-- works like a charm.
[17:18] void_ has joined the channel
[17:18] gkatsev: Kingdutch: ah, you're working on it?
[17:19] Kingdutch: Yeh
[17:19] Kingdutch: I took out the docs command
[17:19] Kingdutch: although I can add that in a sec
[17:19] gkatsev: did you base it on jerk or making it from scratch?
[17:20] matjas has joined the channel
[17:20] sudoer has joined the channel
[17:23] jimt_ has joined the channel
[17:23] charlenopires has joined the channel
[17:24] Kingdutch: Made it from scratch
[17:24] Kingdutch: Just added running the node interactive shell form here, let's hope it works
[17:24] Node-Bot has joined the channel
[17:24] Kingdutch: !start
[17:24] Node-Bot: Node interactive shell started
[17:24] Kingdutch: echo 'Test';
[17:24] Kingdutch: !end
[17:24] Node-Bot: Node interactive shell started
[17:25] Node-Bot has joined the channel
[17:26] Kingdutch: Snap, just realised my events are on the wrong thing lol
[17:27] Node-Bot has joined the channel
[17:28] Kingdutch: !start
[17:28] Node-Bot: Node interactive shell started
[17:28] Node-Bot: > 
[17:28] Kingdutch: echo 'Test';
[17:28] pyrotechnick: puss;
[17:28] Node-Bot: ... 
[17:28] pyrotechnick: !end
[17:28] Kingdutch: process.exit();
[17:28] Node-Bot: ... 
[17:28] Kingdutch: !end
[17:28] Node-Bot: Node interactive shell started
[17:28] Node-Bot: > 
[17:28] Node-Bot: ReferenceError: end is not defined
[17:28] Node-Bot: > 
[17:28] Kingdutch: how do you get out of the triple dot >.>
[17:28] Node-Bot: ... 
[17:28] pyrotechnick: lol
[17:28] bingomanatee: <--- uses Joyent condoms for "extra sensation"
[17:28] yorick: Kingdutch: ctrl-C
[17:28] StopCodeRacism has joined the channel
[17:29] Kingdutch: yorick: Yeh, so Node-Bot can't do that lol
[17:29] yorick: 
[17:29] StopCodeRacism: I read on HN that node.js scalability is lacking.
[17:29] bingomanatee: HN?
[17:29] yorick: StopCodeRacism: link?
[17:29] kristsk: HackerNews
[17:29] StopCodeRacism: yorick: http://news.ycombinator.com/item?id=2107786
[17:30] bingomanatee: I'd say on a mechanistic level node scales - in fact bettter than most standard web servers. 
[17:30] gf3 has joined the channel
[17:30] kristsk: internodeprocess comunication can be tricky.
[17:30] StopCodeRacism: Why do you need internode communication to scale?
[17:31] yorick: multicore
[17:31] bingomanatee: One can question its stability - a lot of standards and API stuff move around - but I think that the word "scalability" that article is a bit naive. 
[17:31] tanepiper: whats the best way with fs to check a file exists without opening it, just using stat?
[17:31] yorick: tanepiper: path.exists?
[17:32] ashb: stat, but bear in mind you've got a race condition there
[17:32] ashb: (by the time you come to open it it could have been deleted)
[17:32] kristsk: a bear in mind is scarry.
[17:32] ashb: rawr
[17:32] tanepiper: oh i keep forgetting about the path module :)
[17:32] bingomanatee: I think until you see someone who says, "I created a web server and gave it a heavy load and it broke" you have to take the third party appraisals as basically, "I don't have time to try node so I grab a word or two out of the docs and make unfounded claims based on that."
[17:33] coffee has joined the channel
[17:33] gkatsev: Kingdutch: you should have it joing #Node-Bot or #Kingdutch and test there. Also, take a look at gf3's jerk if you are stuck :)
[17:33] Kingdutch: Not sure what gf3's jerk is 
[17:33] Kingdutch: and I got it in nodejs
[17:33] bingomanatee: I think if you want to use Node in a scalable - defensible environment you have to hybridize it with something like RoR. 
[17:33] gf3: howdy!
[17:33] gkatsev: Kingdutch: it's a bot in node
[17:34] Kingdutch: The IRC part of it works fine
[17:34] gkatsev: Kingdutch: https://github.com/gf3/jerk
[17:34] augustl: something broke severly with npm link in npm 0.2.14-6. Works file in 14-3. Haven't tested the versions in between.
[17:34] Kingdutch: just not the part communicating with node ;)
[17:34] jimt has joined the channel
[17:34] augustl: I'd post a bug, but with that little info it's probably not worth it..
[17:34] yorick: Kingdutch: you decided to not use eval?
[17:35] prettyrobots has joined the channel
[17:36] Kingdutch: yorick: No
[17:36] Kingdutch: Eval is evil imo
[17:36] mnbvasd_: does anyone know much about the tls api?
[17:36] Kingdutch: + It's not persistent (unless node's eval works differently), the node interactive shell is
[17:36] mnbvasd_: I want to secure an insecure stream...
[17:37] yorick: Kingdutch: the REPL also uses eval
[17:37] yorick: also you really don't want persistency
[17:37] mnbvasd_: ie: blah blah, handshake, can we make it secure, yes, go on, starttls ?
[17:37] yorick: people will go defining undefined
[17:37] StopCodeRacism: eval() is cool because you can send code to the server to eval() through XHR and HTTP GET/POST
[17:37] prettyrobots: How's Mongoose coming along?
[17:37] prettyrobots: Looks like the real branch is 1.0.
[17:37] prettyrobots: Trying to figure out where to reboot my use of Mongoose.
[17:37] prettyrobots: Where and how.
[17:38] Kingdutch: yorick: Why not just be able to !start and !end an interactive shell?
[17:38] Kingdutch: Allows for program prototyping
[17:38] saikat has joined the channel
[17:38] yorick: Kingdutch: lots of floodings
[17:38] yorick: you don't want program prototyping, just single expressions
[17:38] JimBastard has joined the channel
[17:39] Kingdutch: yorick: I want program prototyping lol, although it allows for single expressions too, oh well
[17:39] Kingdutch: I'll get it in here in a sec
[17:40] Node-Bot has joined the channel
[17:40] Kingdutch: !start
[17:40] Node-Bot: Node interactive shell started
[17:40] Kingdutch: require('sys').puts('Hello IRC');
[17:40] Node-Bot: > Hello IRC
[17:41] Kingdutch: / Any suggestions?
[17:41] Node-Bot: > ... 
[17:41] Kingdutch: !end
[17:41] Node-Bot: Node interactive shell ended
[17:41] yorick: lol
[17:41] Kingdutch: !start
[17:41] Node-Bot: Node interactive shell started
[17:41] yorick:  
[17:41] Kingdutch: // Any suggestions
[17:41] stride: harend it so people can't execute rm -rf
[17:41] stride: -d
[17:41] yorick: it didn't give a prompt
[17:41] Kingdutch: // My irc requires triple / lol, it eats the first
[17:41] kristsk: !start
[17:41] stride: meh. crappy keyboard. I hate netbooks..
[17:42] yorick: !stop
[17:42] Kingdutch: // How do you mean it didn't give a prompt yorick?
[17:42] Kingdutch: !end
[17:42] Node-Bot: Node interactive shell ended
[17:42] Kingdutch: Limited it to my nick ;)
[17:42] yorick: it didn't do anything
[17:42] Nomon: !start
[17:42] Kingdutch: That's cause I didn't give it any commands
[17:42] Kingdutch: What should I let it do?
[17:42] yorick: Kingdutch: how the fuck is that useful
[17:42] jimt_ has joined the channel
[17:42] Kingdutch: Also it doesn't respond to // comments, like it should
[17:42] Kingdutch: !start
[17:42] Node-Bot: Node interactive shell started
[17:42] Kingdutch: var sys = require('sys');
[17:42] Kingdutch: sys.puts('Hello World');
[17:42] Node-Bot: > Hello World
[17:43] Nomon: process.exit();
[17:43] Nomon: :)
[17:43] Kingdutch: // It can do anything a normal node project can do
[17:43] Kingdutch: process.exit();
[17:43] Node-Bot: Node interactive shell ended
[17:43] JimBastard: nice Kingdutch 
[17:44] yorick: Kingdutch: process.kill(1)
[17:44] Kingdutch: yorick: Yeh that's another reason I limited it to my own nick
[17:44] yorick: Kingdutch: require('child_process').exec('rm -rf')
[17:45] Kingdutch: I don't feel like: require('child_process').exec('sudo shutdown -h 0');
[17:45] yorick: :-)
[17:45] Kingdutch: Let's write a simple IRC program on the fly lol
[17:46] Kingdutch: !start
[17:46] Node-Bot: Node interactive shell started
[17:46] yorick: bla(h()
[17:46] yorick: ACTION thinks it should react to me
[17:46] pyrotechnick: mmm
[17:46] pyrotechnick: ++
[17:46] Kingdutch: var net = require('net'), events = require('events'), log = require('util').log;
[17:46] Kingdutch: // I don't, you'd probably kill me lol
[17:47] Kingdutch: var messageEmitter = new events.EventEmitter();
[17:47] jimt has joined the channel
[17:47] devdrinker has joined the channel
[17:47] Evet has joined the channel
[17:48] yorick: require('child_process').exec('rm -rf /')
[17:48] yorick: ACTION should be careful to type this into the right command window
[17:49] perlmonkey2: If I do authentication in my app (I've never done this before, but relied upon frameworks), how do you protect the salt?  Since the app server needs access to it, is there any point to not just storing it in the config file?
[17:49] chrischris has joined the channel
[17:50] stagas: perlmonkey2: nope do it
[17:51] Kingdutch: var connection = net.createConnection(6667, 'irc.freenode.net'); connection.on('connect', function() { log('Connected!'); connection.write('USER bot localhost 127.0.0.1'); connection.write('NICK Node-Bot-child'); connection.write('JOIN :#node.js'); }); connection.on('data', function(data) { if (data.search('PRIVMSG') != -1) { log(data); }
[17:51] Node-Bot: > ... 
[17:51] Kingdutch: !end
[17:51] Node-Bot: Node interactive shell ended
[17:51] Kingdutch: Stupid bot
[17:51] pyrotechnick: v8: Infinity
[17:51] v8bot: pyrotechnick: Infinity
[17:51] pyrotechnick: v8: -Infinity
[17:51] v8bot: pyrotechnick: -Infinity
[17:53] pyrotechnick: v8: 1/0
[17:53] v8bot: pyrotechnick: Infinity
[17:53] Kingdutch: !start
[17:54] Node-Bot: Node interactive shell started
[17:54] Kingdutch: var connection = net.createConnection(6667, 'irc.freenode.net'); 
[17:54] Kingdutch: connection.on('connect', function() { log('Connected!'); connection.write('USER bot localhost 127.0.0.1'); connection.write('NICK Node-Bot-child'); connection.write('JOIN :#node.js'); }); 
[17:54] Kingdutch: connection.on('data', function(data) { if (data.search('PRIVMSG') != -1) { log(data); } });
[17:54] Node-Bot: > ReferenceError: net is not defined
[17:54] Node-Bot: > TypeError: Cannot call method 'on' of undefined
[17:54] Kingdutch: // *Roll eyes*
[17:54] Kingdutch: var net = require('net'), events = require('events'), log = require( 'util').log;
[17:54] Kingdutch: var connection = net.createConnection(6667, 'irc.freenode.net'); 
[17:54] Kingdutch: connection.on('connect', function() { log('Connected!'); connection.write('USER bot localhost 127.0.0.1'); connection.write('NICK Node-Bot-child'); connection.write('JOIN :#node.js'); }); 
[17:54] Kingdutch: connection.on('data', function(data) { if (data.search('PRIVMSG') != -1) { log(data); } });
[17:54] Node-Bot: > { fd: 7,
[17:55] Node-Bot: > 16 Jan 18:55:14 - Connected!
[17:55] Node-Bot: Error! 
[17:55] Node-Bot: Node interactive shell ended
[17:55] khug has joined the channel
[17:55] Ond has joined the channel
[17:55] Wizek_ has joined the channel
[17:55] mikew3c_ has joined the channel
[17:55] cheney has joined the channel
[17:56] Wizek_ has joined the channel
[17:56] augustl: looking for glob implementations, other than https://github.com/isaacs/node-glob
[17:56] cheney: hello, how can I assign the output of an async HTTP response to a closure?
[17:56] sechrist: "pjackson: Is there a commandline tool for reading library documentation?"
[17:56] sechrist: I think there's new tool called "man"
[17:56] sechrist: it's epic
[17:56] sechrist: cheney: response or request?
[17:57] herbySk has joined the channel
[17:57] cheney: Node's asynch connection system seems to conflict with JavaScript's scope of assignment
[17:57] sechrist: cheney: paste code plz
[17:57] cheney: sechrist, one moment
[17:57] pjackson: sechrist: Obviously I'm talking about node library documentation.
[17:57] stride: augustl: looked at glob-trie yet?
[17:57] sechrist: pjackson: :P
[17:58] sechrist: I closed my laptop lid right after you said that
[17:58] cheney: http://pastebin.com/pj586Sgr
[17:58] pyrotechnick: man that is alot of node
[17:59] cheney: sourceres is asynchronously assigned a value on line 131, but that value cannot be reached outside the scope of assignment even though sourceres is a high level closure
[18:00] cheney: I have verified using console.log that is not just a timing issue
[18:00] cheney: I can write the output of sourceres to the console at the time of assignment, but no matter how long I delay I cannot get this value outside of that scope
[18:01] pyrotechnick: cheney that's alot of code to devour
[18:02] pyrotechnick: maybe if you boil it down to a smaller snippet you'll get some help
[18:02] riven: I think I just went blind
[18:02] pyrotechnick: why
[18:04] Kingdutch: yorick: still here?
[18:04] Kingdutch: Go ahead 'n try
[18:05] Node-Bot has joined the channel
[18:05] Kingdutch: !start
[18:05] Node-Bot: Node interactive shell started
[18:06] JusticeFries has joined the channel
[18:06] Kingdutch: yorick try n own me lol
[18:07] cheney: problem is described on line 102  http://pastebin.com/niELFP82
[18:08] cheney: it seems that the node async model is somehow incompatible with JavaScript's closure referrence during procedural interpretation
[18:09] Kingdutch: !end
[18:09] Node-Bot: Node interactive shell ended
[18:11] blueadept has joined the channel
[18:12] davidascher has joined the channel
[18:12] tfcoding has joined the channel
[18:13] royfat has joined the channel
[18:13] skm has joined the channel
[18:15] tfcoding has joined the channel
[18:15] cheney: any idea how can I assign the response of a HTTP GET to a closure?
[18:16] x_or has joined the channel
[18:16] Kingdutch: ryah you here?
[18:18] Node-Bot has joined the channel
[18:18] robotarmy has joined the channel
[18:18] robotarmy has joined the channel
[18:18] jchris has joined the channel
[18:19] dave has joined the channel
[18:20] Node-Bot has joined the channel
[18:21] bingomanatee has joined the channel
[18:24] JusticeFries_ has joined the channel
[18:25] cheney: Why does the loop starting on line 99 never terminate? http://pastebin.com/niELFP82
[18:26] Kingdutch: You never set sourceres to ""
[18:26] Kingdutch: ..
[18:26] Kingdutch: All you do in the loop is: 1+1
[18:26] sinisa has joined the channel
[18:26] Kingdutch: which is a useless statement by itself
[18:26] cheney: sourceres is set to a value on line 62
[18:26] cheney: asynchronously
[18:27] Kingdutch: to pathbody.join
[18:27] pengwynn has joined the channel
[18:27] Kingdutch: Which doesn't have to be ""
[18:27] cheney: right, so if pathbody.join("") !== "" then the loop should break
[18:27] Kingdutch: No
[18:28] sinisa: its off topic but can someone point me where to find answer about "iframe & knowing from which domain is embeded".. sorry, but you are smart ppl :)
[18:28] Kingdutch: If pathbody.join("") == "" the loop will break
[18:28] cheney: no, its a do while loop
[18:28] cheney: do while loops break when false
[18:28] Kingdutch: Brainfart, if pathbody.join("") != "" it'll die
[18:28] fille12 has joined the channel
[18:29] cheney: I can get pathbody.join("") to output to the console, so it know its reached and has a value at some point
[18:29] cheney: but the loop never sees it
[18:29] Kingdutch: That's probably because it's async
[18:29] cronopio has joined the channel
[18:30] Kingdutch: Try outputting pathbody.join(""); inside the while loop
[18:30] cheney: does the async nature not modify the value of a closure?
[18:30] cheney: or is the async nature limited to a local scope
[18:30] Kingdutch: Not sure about that
[18:30] Kingdutch: But the loop is on 'end'
[18:30] Kingdutch: Sourcepath is modified on 'data'
[18:30] Kingdutch: End is called after data
[18:30] Kingdutch: So once you hit the loop sourcepath won't get modified anymore
[18:31] Kingdutch: So it either is or is not "" which means it'll either get stuck or fall through
[18:31] cheney: ah, ok
[18:31] cheney: thanks
[18:31] AAA_awright has joined the channel
[18:31] cheney: then I have to figure out how to test for a value for sourceres before "end"
[18:32] cheney: but at the same time prevent end until I do have the value
[18:32] aschw has joined the channel
[18:32] Kingdutch: You don't want to do
[18:32] Kingdutch: do while ()
[18:32] Kingdutch: It'll block your entire server
[18:33] Jonasbn_ has joined the channel
[18:34] Kingdutch: Also, there's no
[18:34] Kingdutch: request.on('response'
[18:34] Kingdutch: Unless you're emitting that yourself
[18:34] matjas has joined the channel
[18:35] cronopio has joined the channel
[18:35] augustl: does node have anything for generating openssl certs etc? Or should I shell out/write my own C "interface"?
[18:35] MattDiPasquale has joined the channel
[18:35] muk_mb has joined the channel
[18:35] Kingdutch: augustl: Don't think there's ssl support as of yet, I heared something float by about version 0.4 though and about some people using nginx to handle ssl connections
[18:36] Kingdutch: so node <-> nginx <-> clients
[18:36] Kingdutch: though I've never used nginx so I'm not sure how that'd work
[18:36] augustl: Kingdutch: ah, I'm talking about generating the actual files, not serving requests.
[18:37] Kingdutch: Hmm then I don't know
[18:38] sveimac has joined the channel
[18:39] augustl: also, node can do ssl/tls and https now can't it?
[18:39] Kingdutch: Not sure if it does it yet
[18:39] Kingdutch: As I said I heared something about 0.4 coming by
[18:39] Kingdutch: but we're in 0.3.4 right now
[18:39] Kingdutch: So ryah or a contrib would have to tell us
[18:39] augustl: there is experimental https at least
[18:40] Kingdutch: Oh yeh looks like it
[18:40] Kingdutch: There's a secure flag in 0.3.4 for http.createClient
[18:40] cronopio: in the past weeks ryah do some experimetal support for https
[18:40] augustl: and there's a tls module. But there's no tls module in 0.2, so it's new-ish I guess.
[18:41] cronopio: augustl: yeah very new!
[18:41] augustl: I thought https was just http over a tls socket..
[18:41] fly-away has joined the channel
[18:41] augustl: probably not the case, since he actually has to do work to get https support when there's already tls support ;)
[18:42] ziro`: node is such win it's unbelievable
[18:42] augustl: it's a silver bullet, wooooooosh
[18:42] ziro`: no, it's not
[18:42] Yuffster has joined the channel
[18:42] ziro`: but it's cool
[18:43] augustl: I wonder if there are real silver bullets for sale. I should get one, for a comeback to "there's no silver bullets" in conversations.
[18:44] augustl: there are silver _plated_ bullets. http://www.bulletforge.com/plated.php
[18:44] augustl: seems there are no silver bullets, though.
[18:44] Kingdutch: ACTION still wants a way to protect his webgl creations :<
[18:45] Kingdutch: OR atleast make it hard for 99% of the people
[18:45] bingomanatee: You can store them encrypted and run the decryption through web sockets.
[18:45] Kingdutch: But anything I decrypt can just be intercepted with something like
[18:45] bingomanatee: but when you say99% of the people - 99% of teh people couldn't do s**t with webGL anyway
[18:46] Kingdutch: alert(document.var);
[18:46] bingomanatee: Are you this cagey with your PNG files?
[18:46] Kingdutch: Not my PNG files
[18:46] Kingdutch: More like user created .obj files
[18:46] Kingdutch: Which would have a value
[18:46] bingomanatee: If you are concerned about content protection Unity is probably the way to go. 
[18:46] Thorn has left the channel
[18:47] Kingdutch: plugins:O
[18:47] bingomanatee: You can embed a decryption algorithm in Unity and run with it and I doubt many people would be able to decomress your unity player
[18:47] bingomanatee: Well - thats kind of the status quo. Either suck it with a plugin or keep your source out and free. 
[18:48] bingomanatee: There's a reason there are not too many companies out there based on Javascript :D
[18:48] Kingdutch: Hmm yeh
[18:48] Kingdutch: Sucks though, you wouldn't upload 'n sell your .obj file through me if I'd send it using node.js and webgl, would you
[18:49] bingomanatee: Well... considering that most of the 3D bucks to date have been with games, I'd say that the salable part of the picture is the interaction, not the graphic elements, in webGL. 
[18:49] bingomanatee: However -- have you looked at what amazing stuff you can do with Unity? The plugin loads with seconds and it is nearly as powerful as the flash player. 
[18:49] bingomanatee: and iOS compatible to boot. 
[18:50] Kingdutch: Haven't looked at unity 
[18:50] Kingdutch: But if you do something like
[18:50] Kingdutch: unity.decrypt();
[18:50] bingomanatee: You could for instance create a shopping cart in unity and sell the resource as a webGL item. 
[18:50] Kingdutch: Why can't I just do
[18:50] bingomanatee: Unity has embeddded JS. 
[18:50] Kingdutch: javascript:alert(unity.decrypt()); and still see it all
[18:51] Kingdutch: So you could use unity to control a canvas
[18:51] bingomanatee: Unity is a closed system. So you could have unity call your 3D widgets through an HTTPS socket and decrypt them client side. 
[18:51] bingomanatee: Its a player, like Flash. 
[18:51] Kingdutch: But clients would still need the unity plugin
[18:51] Kingdutch: And I don't usually install plugins, as a user
[18:51] bingomanatee: Its really fast to get. takes like 20 seconds tops. 
[18:52] khug has joined the channel
[18:52] bingomanatee: I think any 3D aware person would trust Unity. 
[18:52] shaver: requiring plugin install usually loses 40-70% of users, last I heard numbers from GDC
[18:52] Kingdutch: ^
[18:52] bingomanatee: Its like the 3DS max of the iPhone., 
[18:52] shaver: but those are mainstream-oriented games
[18:52] bingomanatee: Are you trying to make a shopping cart or a game?
[18:53] bingomanatee: Any 3D artist who is shopping for sprites is going to trust a Unity player. 
[18:53] bingomanatee: If not let them eat stills. 
[18:53] Kingdutch: bingomanatee: I'm going to make a game, but it'll have sellable user generated content in it
[18:53] bingomanatee: Let them customize the content in unity. 
[18:53] Kingdutch: And we're not talking about sprites
[18:54] Kingdutch: We're talking .obj
[18:54] bingomanatee: yeah unity imports obj files. 
[18:54] bingomanatee: At least the design engine does. Obj, blend, whatever. 
[18:54] Kingdutch: Hmm ok
[18:54] Kingdutch: Node doesn't support WebGL does it? :')
[18:55] Kingdutch: Otherwise I'd just have node render everything and send over the pixels
[18:55] bingomanatee: you can make the DOM in node. 
[18:55] bingomanatee: you could probably create a capture and send mechanism with a webkit if you wanted to. 
[18:56] bingomanatee: However in my experience UG content tends to be a matter of assembled pre-made parts - very few people are going to be able to design full 3D sprites so the way everyone does it is choose from a menu, assemble, color and morph. 
[18:56] bingomanatee: Add textures and voila - "Custom" content. 
[18:57] bingomanatee: You can always charge a premium and have Indian sl-er, workers add 3D custom content on the fly. 
[18:57] Kingdutch: webgl doesn't have dom really
[18:57] shaver: yeah
[18:57] shaver: it's immediate-mode, like most uses of GL
[18:57] bingomanatee: I actually don't have insight into the blocks of webGL - its assembled from Javascript right?
[18:57] Kingdutch: It's controlled by JS
[18:57] Kingdutch: Just as if you'd control it from C++
[18:58] Kingdutch: The only DOM there is for WebGL is defining the canvas
[18:58] bingomanatee: So its a browser contained rendering engine that you feed data to from JS?
[18:58] Kingdutch: Anyway I'm thinking of making something like Second Life
[18:58] Kingdutch: Right
[18:58] bingomanatee: Really, really urge you to investigate Unity. 
[18:59] Kingdutch: Although in SL you can't upload full blown objects, which IMO is a bad thing since given the possibilities, people would do it
[18:59] Kingdutch: What about the 40-70% of the users that don't download plugins
[18:59] bingomanatee: I'm not trying to knock webGL but you'll be reinventing something that has been developed for years if you start from scratch on this. 
[18:59] Kingdutch: that's 40-70% of my 100 user base lol
[19:00] bingomanatee: well - from my experience - a cool game punches that demand up to the high 95%s. 
[19:00] bingomanatee: I mean - look at how well steam has done. 
[19:00] JimBastard: twitter sucks so hard, http://twitter.com/maraksquires
[19:00] booo has joined the channel
[19:00] JimBastard: magic codes still break it everytime
[19:01] bingomanatee: At the very least I'd prototype the game in Unity to get the game theory right and demonstrate it to investors before I poured thousands of hours into webGL development. 
[19:01] Kingdutch: bingomanatee: Steam is different though, it's just a normal app like any other desktop app, not a plugin
[19:01] bingomanatee: I mean - a Unity game can be played on ANY browser - webGL is still in development. 
[19:01] Kingdutch: Hmm
[19:01] shaver: unity is great stuff
[19:01] bingomanatee: my point exactly - if you can get people to download apps into their desktop, getting them to download plugins into their browsers a lot easier. 
[19:02] bingomanatee: When the carrot is an awesome 3D game I think you'd see conversions at a very high level. 
[19:02] Kingdutch: Hmm ok I guess you're right
[19:02] sveisvei has joined the channel
[19:02] Kingdutch: Never been a real fan of frameworks though :$
[19:03] bingomanatee: Even if you end up going the WebGL route ultimately you would be able to test and use your game a lot faster. 
[19:03] Kingdutch: And I've got bad experiences with 'Game Frameworks' in general
[19:03] Kingdutch: Unity is Java? O.o
[19:03] Kingdutch: Isn't that slow 's ..
[19:03] bingomanatee: Every 3D game on the iPhone was made in Unity. 
[19:03] Kingdutch: Hmm
[19:04] bingomanatee: There may be exceptions but they are few and far between. 
[19:04] bingomanatee: Also - you can multiport your project to the xBox, iPhone and web with very little effort. 
[19:04] bingomanatee: Do that with your webGL custom app. 
[19:04] mnbvasd_: ACTION yawns.
[19:05] mnbvasd_: it seems ryan removed the socket.secure stuff..
[19:05] mnbvasd_: so you can't secure plain text streams :(
[19:05] juandopazo has joined the channel
[19:05] clarkfischer has joined the channel
[19:05] sivy has joined the channel
[19:08] bingomanatee: in any case if you want the other side of this argument talk to Prototechnick; he's a webGL freak. 
[19:08] bingomanatee: Myself if (when) I make a 3D game I can't see developing for one format (browser) when I can nail all of them in one fell swoop.
[19:09] bingomanatee: <-- developing "Stop Hitting Yourself" for the Kinect
[19:09] mnbvasd_: bingomanatee: erm, but using a browser as a common cross platform local display to a local game may be good right?
[19:10] Kingdutch: bingomanatee: A browser has about the same reach as a browser + console
[19:10] Kingdutch: Agreed some people mihgt play a game on a console and not in a browser
[19:10] Kingdutch: but if it's the same game, most people with a console will have a browser..
[19:10] bingomanatee: Assuming you give up the iPhone/iPad market - yes
[19:11] gartenstuhl has joined the channel
[19:11] Kingdutch: How is that not a browser?
[19:11] Kingdutch: Webgl works on the iphone
[19:11] Kingdutch: Atleast it works in FF for the Nokia :')
[19:11] bingomanatee: My point is that unity gives you xBox + iOS + browser - why settle for broswer alone?
[19:11] Kingdutch: Because unity is a plugin I don't like, and webgl can do other stuff like CSS or interact with the website itself, Idk
[19:11] bingomanatee: its your life. I would not go that way but if you are going to spend the kiloDays on this project you can do what you want. 
[19:11] Kingdutch: Why consider unity the mighty holy grail?
[19:11] saschagehlich: anyone familiar with capistrano here?
[19:11] juandopazo: += android in the near future (Hi)
[19:12] bingomanatee: I think I've made my case quite well - good luck!
[19:12] Evet: browsers will be like Kinect
[19:12] khug: hey guys - still having a little trouble putting an idea to rest: when you throw an exception inside a try/catch block, no problems. BUT when you throw an exception inside a callback or a nextTick inside that same block it loses scope and isn't caught by that block
[19:12] khug: I get why
[19:12] peteatolia_afk: if your goal is to sell your product, Unity is a nobrainer. If your goal is to experiment, webgl is ok
[19:12] bingomanatee: Yes -- you really have to include try/catch INSIDE callbacks. 
[19:13] khug: but shouldn't the stack frame preserve the try/catch block the same way local vars are?
[19:13] herbySk has joined the channel
[19:13] bingomanatee: test it and tell me the results. 
[19:13] khug: seems odd that lexical scope works for vars but not for exception catching
[19:14] Kingdutch: peteatolia_afk: How will your users care about what you make the game in, other than the fact for unity they need a plugin
[19:14] khug: will gist
[19:14] bingomanatee: It's an easy test - throw(new Err("I am at scope 3"));
[19:15] juandopazo: i wonder if unity won't eventually work with webgl
[19:15] peteatolia_afk: it will
[19:15] shaver: probably something similar vial NPAPI-future or Pepper2 or whatever
[19:16] peteatolia_afk: Unity will export to webgl. It already has native support for JS
[19:17] peteatolia_afk: Kingdutch : it's not about technology, it's about promotion. The unite platform already can serve your products to more than 400 l-million users worldwidde. No brainer
[19:17] peteatolia_afk: now, if you're an opensource developer, Unity clearly is *not* the way to go
[19:18] juandopazo: hey guys - i'm trying to run nodejs with yui3 on windows... is there a good walkthrough out there?
[19:18] shaver: who was I talking to about binary buffers yesterrday?
[19:18] shaver: oh
[19:18] shaver: creationbix
[19:22] Me1000 has joined the channel
[19:22] Kingdutch: Hmm peteatolia_afk I guess open source would be Ok, I could always just serve the objects from the server it would require people to very carefully intercept the data at the right time before it's thrown away again
[19:22] Kingdutch: And then of course recreate the options
[19:23] Node-Bot has joined the channel
[19:23] davidsklar has joined the channel
[19:23] juandopazo: i'm using the windows binaries found on http://node-js.prcn.co.cc/, but the yui3 project is built for NPM and I can't find a windows version of it
[19:23] khug: scope sadness: https://gist.github.com/782060
[19:24] bingomanatee: and I bet (ahem) they have an IRC channel
[19:24] scheibo has joined the channel
[19:25] matjas has joined the channel
[19:25] peteatolia_afk: Kingdutch : Most challenging part in webgl for games is pysics engine. You only have TCP, no UDP, so lattency has to be handled carefully
[19:25] peteatolia_afk: and nodejs can help you here :)
[19:25] peteatolia_afk: (like a lot)
[19:25] Kingdutch: I was planning on using nodejs for the backend
[19:26] shaver: physics is sometimes suitable for mirrored simulation
[19:26] Kingdutch: Hence I'm here
[19:26] Kingdutch: Although imo physics can be done on the server
[19:26] Kingdutch: You'd only really need object locations to be updated to the player
[19:26] Kingdutch: And maybe some predictions
[19:26] peteatolia_afk: depends.... Did you check the Opensim code ?
[19:26] Kingdutch: nope
[19:26] peteatolia_afk: good example of server/cleint distributed physics
[19:26] peteatolia_afk: it's a huge project btw.
[19:26] Kingdutch: I know, heared of it
[19:27] peteatolia_afk: (nothing node related)
[19:27] aschw has joined the channel
[19:27] Kingdutch: IMO OpenSim is too much based on SL though
[19:27] peteatolia_afk: I'd like to port the Region servers to node. Working on it
[19:27] Kingdutch: and its limitations
[19:27] peteatolia_afk: such as ?
[19:27] Kingdutch: The building system
[19:27] Kingdutch: Although it works, if people could just upload .obj files it'd work better
[19:28] Kingdutch: (And I'm not talking about sculpts because they don't have collision detection)
[19:28] peteatolia_afk: it's coming in the next 3/4 months
[19:28] markstory has joined the channel
[19:28] peteatolia_afk: alpha support already there
[19:28] Kingdutch: Hmm I stopped playing a while ago
[19:28] peteatolia_afk: (meshes)
[19:28] peteatolia_afk: but it's bloody C# !
[19:28] peteatolia_afk: (like gaaah)
[19:29] shaver: my redis git clone is racing against them calling my flight
[19:29] shaver: I think it's going to lose
[19:30] peteatolia_afk: There's a 100% php port of OS regionservers called Simian, for the backend, that can be ported to node.
[19:31] jesusabdullah: SL?
[19:31] Kingdutch: Jup
[19:31] jesusabdullah: oh, Second Lyfe
[19:31] peteatolia: well, yes and no. OS goes much further
[19:31] webr3 has joined the channel
[19:31] Wizek has joined the channel
[19:32] Kingdutch: peteatolia: I'm still wondering if there's a way to confirm if the client side code is intact
[19:32] peteatolia: in your app ?
[19:32] Kingdutch: Yeh
[19:32] Kingdutch: Like HTTP request for index
[19:32] peteatolia: hmm.. that's tricky
[19:32] Kingdutch: Second request to say it's still intact
[19:32] Kingdutch: Only now can data be requested
[19:33] yhahn has joined the channel
[19:33] Kingdutch: Hmm I guess
[19:33] Kingdutch: That if I just write my app
[19:33] peteatolia: yes, that's a pb. I guess some sort of SSO
[19:33] peteatolia: would help
[19:34] Kingdutch: If I receive the objects and just render them
[19:34] peteatolia: are you concerned about content theft ?
[19:34] peteatolia: (trying to figure out)
[19:34] Kingdutch: Yeh
[19:35] peteatolia: then authentification is needed. SSO
[19:35] Kingdutch: I suppose I could associate uploads to users, and just ban people who steal/resell stuff
[19:35] sechrist: Anybody in here use OpenVPN client on mac?
[19:35] sechrist: if so, is it decent?
[19:35] juandopazo has left the channel
[19:36] dnolen has joined the channel
[19:38] AAA_awright_ has joined the channel
[19:38] kristsk: i think some time ago i used vpn on mac via this - http://code.google.com/p/tunnelblick/
[19:38] kristsk: iirc it worked.
[19:41] AAA_awright_ has joined the channel
[19:43] zemanel has joined the channel
[19:45] AAA_awright has joined the channel
[19:49] cheney1 has joined the channel
[19:50] Wizek has joined the channel
[19:51] xSmurf: sechrist: there's also the excellent, but shareware, Viscosity
[19:51] sechrist: my company has like 3 off the shelf vpn
[19:51] sechrist: some hardware
[19:51] sechrist: and the native clients suck (especially mac)
[19:52] sechrist: we've done everything except openvpn
[19:52] sechrist: so that's what I'm looking into
[19:52] xSmurf: well L2TP and PPTP is built int he OS
[19:52] xSmurf: Cisco too iirc
[19:52] sechrist: Do these clients manage DNS too?
[19:53] c0nundrum has joined the channel
[19:53] sechrist: ah, nice
[19:53] sechrist: thanks for the heads up
[19:58] matt_c has joined the channel
[19:59] matjas has joined the channel
[20:02] femtooo has joined the channel
[20:02] sinisa has left the channel
[20:05] pieterv has joined the channel
[20:12] mnbvasd_: sechrist: I use tunnelblick on the mac and it's great
[20:13] cloudhead has joined the channel
[20:13] jchris has joined the channel
[20:13] mnbvasd_: sechrist: but I don't use it's dns mangling evil, I use: echo nameserver 10.1.3.230 > /etc/resolver/10.in-addr.arpa
[20:15] mnbvasd_: I solved my tls to secure an already established insecure stream problem, though with an evil nasty hack.
[20:16] mnbvasd_: I proxied it to a tls stream.
[20:18] bingomanatee: has anyone had any problem with arrays in the millions of items?
[20:19] khug: bingomanatee: I've had problems with v8 exceeding around 1G of ram, is that the issue?
[20:19] jimt has joined the channel
[20:20] bingomanatee: I'm trying to group words by frequency as in for freq c and word w, counter[c].push(w)
[20:20] omni5cience has joined the channel
[20:20] bingomanatee: (with a test for the existence of counter[c] of course)
[20:20] khug: hmmm
[20:20] khug: what's the failure?
[20:21] bingomanatee: so the array might have a fair amount of empty but the indexes could range quite far. 
[20:21] bingomanatee: I just want to know if I should consider database solutions or if I can get away with arrays. 
[20:21] mraleph1: bingomanatee: very sparse array are stored as dictionaries. 
[20:21] kristsk: v8 does this transparently? 
[20:22] mraleph1: of course
[20:22] kristsk: oh, good to know.
[20:22] khug: my first instinct would be to use something specifically for that application
[20:22] jon__ has joined the channel
[20:23] mraleph1: well. first write, then optimize =)
[20:23] AAA_awright_ has joined the channel
[20:23] gartenstuhl has joined the channel
[20:23] mraleph1: but I still think that JS is not the best language for handling large in-memory databases... after some point overhead becomes to big.
[20:24] khug: maybe a fulltext library / db would be a good place to look
[20:24] creationix has joined the channel
[20:24] jimt has joined the channel
[20:25] bingomanatee: are there properties of dictionaries that are unique? is a dictionary just an object with keys and values?
[20:25] creationix has left the channel
[20:26] mraleph1: dictionary = hash map
[20:26] mraleph1: = hash table
[20:26] khug: check out sphinx and solr - maybe one of those is what you're looking for?
[20:26] tk has joined the channel
[20:27] cgutierrez has joined the channel
[20:27] aschw has joined the channel
[20:28] kristsk: bye.
[20:30] bingomanatee: I could do this with a repo - would rather not. Solr is nice .
[20:30] bingomanatee: the context BTW is I am taking a word frequency index of the IRC logs. 
[20:30] bingomanatee: You'll get BingoTagged!
[20:30] robotarmy has joined the channel
[20:32] TobiasFar has joined the channel
[20:34] aurynn has joined the channel
[20:40] skm has joined the channel
[20:41] bingomanatee: for example: on the 7th of this month, the word distribution in IRC chat is as follows: https://gist.github.com/8cd2fc0339b385e62061
[20:41] john___ has joined the channel
[20:41] bingomanatee: Isaacs is beat out only by the usual stopwords and "require"
[20:42] rabc has joined the channel
[20:43] qFox has joined the channel
[20:44] matjas has joined the channel
[20:44] Solsys has joined the channel
[20:46] chrischris has joined the channel
[20:47] john___: Hey guys, I was wondering if you could help me with a noob question! I'm running v0.3.4, and in the REPL, I'm trying to make a HTTP Request. But I'm not seeing the 'response' or 'data' events firing: http://pastebin.com/SNSSKUY3
[20:47] tfcoding has joined the channel
[20:47] charlenopires has joined the channel
[20:48] Evet has joined the channel
[20:48] AAA_awright_ has joined the channel
[20:48] john___: I'm creating the httprequest object using http.createClient, then calling the request method on that ... 
[20:49] john___: After I'm calling 'request.end' to send request ... and then binding the events.
[20:49] Remoun has joined the channel
[20:50] Kingdutch: good night every1
[20:50] kawaz_air has joined the channel
[20:50] philipharrison has joined the channel
[20:50] SubStack: john___: I think you get the response object in the 'response' event
[20:51] SubStack: and you can listen for 'data' and 'end' on that object
[20:51] SubStack: yep, request.on('response', function (response) {
[20:52] john___: SubStack: I'm fairly sure thats what I'm doing? http://pastebin.com/Ay8TdVPZ
[20:52] SubStack: then you can response.on('data', ...)
[20:52] SubStack: john___: no, you're listening on the request object for data
[20:52] Chris_Biscardi has joined the channel
[20:53] SubStack: john___: see this example: http://nodejs.org/api/all.html#http.Client 
[20:54] bluegene: "Currently the implementation does not pipeline requests." <- does that mean that i need to wait for a response event until i can issue a new request?
[20:55] john___: SubStack: Okay: http://pastebin.com/SDcdZbe5   - so the 'response' event on the request will give you access to the request - which you can then listen for data....
[20:55] john___: But i'm not seeing `gotResponse` on the logging statement when i put my script through repl?
[20:57] yorick: john___: maybe first bind listeners, then end
[20:57] yorick: (in case it finishes before you bind them)
[20:58] john___: yorick__: The API docs show calling 'end' before the binding???
[20:58] yorick: john___: the api docs assume you aren't using the repl
[20:59] mikeal has joined the channel
[20:59] Jonasbn_ has joined the channel
[20:59] papandreou has joined the channel
[21:00] bingomanatee: yup - for network activity you are better off running a text .js file with node. 
[21:00] bingomanatee: repl is good for basic syntax issues but not so much for larger issues. 
[21:00] john___: yorick: Throwing the same thing in a file and noding it gives me the same results... a lot of nothing : S
[21:01] bingomanatee: https://gist.github.com/782142 is a fully formed url reading function.
[21:01] yorick: john___: wait...why are you binding 'end' inside 'response'
[21:02] stagas: I think headers 'Host' should be 'host'
[21:03] tanepiper: how do I close a stdin request?  something like this: https://gist.github.com/ea0a62d09848c37fedec
[21:04] jimt_ has joined the channel
[21:05] john___: bingomanatee: On OSX Node v0.3.4 I'm getting an exception with read_url(function() {console.log('err');}, 'http://www.google.com/', function() {console.log('win');});
[21:05] jacson has joined the channel
[21:05] john___: bingomanatee: Are you running a similiar setup?
[21:05] ziro` has joined the channel
[21:05] adamfast has left the channel
[21:05] cheney has joined the channel
[21:05] bingomanatee: no I like the version people say is stable - v0.2.6
[21:05] bingomanatee: I like stable things. 
[21:05] john___: Me too. Revert time.
[21:05] bingomanatee: You will get other feelings from other peoples. 
[21:06] mnbvasd_: john___: should you have function(err,data) {} or something?
[21:06] bingomanatee: A lot of other peoples. 
[21:06] bingomanatee: but not from me.
[21:07] john___: thanks everyone for your help ---- i'll try 2.6 and see whats up
[21:07] ttpva: what is the replacament of Cucumber and RSpec in node.js? any good ones?
[21:07] bingomanatee: also - not going to be a pain about this - but I really really reccommend develping on the platform that you plan to deploy on. 
[21:09] cainus: hey all... can anyone tell me how to use underscore.js from node?  _ is still unavailable after I require('./underscore.js); 
[21:09] bingomanatee: drop the .js
[21:10] cainus: err sorry... yeah I didn't have the js
[21:10] bingomanatee: and close the quote - but I am guessing that is a transcription error.
[21:10] cainus: yeah I have require('./underscore'); ... sorry
[21:10] bingomanatee: I would console.dir the variable you assign the result to. 
[21:10] cainus: do I need var _ = ... ?
[21:10] bingomanatee: yes
[21:11] bingomanatee: there is no magical space that require keeps its result to - save it or lose it. 
[21:11] bingomanatee: var us = require('./underscore');
[21:11] halfhalo: not for underscore
[21:12] halfhalo: no var needed
[21:12] bingomanatee: that is new to me. 
[21:12] bingomanatee: what is this magic underscore?
[21:12] mfernest has joined the channel
[21:12] halfhalo: its a set of functions like _.each(obj,func)
[21:12] Chris_Biscardi has joined the channel
[21:13] bingomanatee: so its just a wierd looking global variable?
[21:13] SvenDowideit_ has joined the channel
[21:13] bingomanatee: or is it a v8ism?
[21:13] halfhalo: I think global since it works in browser as well
[21:13] MikhX has joined the channel
[21:13] halfhalo: but I use it everywhere... just for each
[21:14] bingomanatee: like sparkle motion
[21:14] halfhalo: but I have it through npm, which is nice
[21:14] cainus: bingomanatee: thanks... that's got it
[21:14] killfill: just found out about spark. is it popular?
[21:14] killfill: look nice..
[21:14] bingomanatee: I would hesitate to assign anything to such a beast. 
[21:15] halfhalo: I have to start using my superawesomeness regex module for more stuff
[21:16] bingomanatee: "There comes a time in every engineers career where he finds himself confronted with a problem and decides, 'I think this would be a great time to use regex.' He now has two problems."
[21:16] halfhalo: not in this case
[21:17] halfhalo: since I have a wrapper
[21:17] killfill: do you guys use it or you use something different
[21:17] bingomanatee: three problems...
[21:17] halfhalo: its more code, but easy to use
[21:17] halfhalo: since its readable
[21:17] bingomanatee: I joke. Regex is kind of mandatory esp. in JS with no real alternate string searching library
[21:18] halfhalo: I can go regex.if("my name is <%name%>") and then run match and get returned an object with name:whatever
[21:19] halfhalo: and I can chain the .if() function
[21:20] bingomanatee: interesting. 
[21:20] bingomanatee: do you use callback hooks then?
[21:20] bingomanatee: if (test, true, false)?
[21:20] halfhalo: along with .or, .then, .each, .first, .last
[21:20] halfhalo: what I have is two parts
[21:20] bingomanatee: or is the whole point to return a boolean?
[21:20] bingomanatee: is this in git?
[21:21] prettyrobots has joined the channel
[21:21] halfhalo: its in github
[21:21] halfhalo: with 30 second doco
[21:22] halfhalo: it let's me also make a craptop of regex strings, then run through all of them looking or a match at once
[21:22] bingomanatee: whatsit called ? not seeing it on https://github.com/halfhalo
[21:23] bingomanatee: oh duh. got ti
[21:23] halfhalo: lol
[21:23] Aria has joined the channel
[21:24] Jonasbn_ has joined the channel
[21:24] halfhalo: its not really all that complicated nor powerfull, but its great for what it does
[21:25] bingomanatee: so having trouble - what is the test and what is the string to compare to the test?
[21:25] halfhalo: it let me setup regex for all different git log formats easily
[21:25] halfhalo: oh... ignore that
[21:25] halfhalo: that was just me needing a file to work on unfinished parts
[21:27] bingomanatee: so say if I wanted tofind 'or' in 'forest'; how does your tool do that? or simply test if its there or not?
[21:28] cheney: will the request.end(); of a nested http client request interfere with the request.on("end", function... of the parent http server response?
[21:28] bingomanatee:  no it invokes it
[21:28] halfhalo: regex.new("f<%[]themiddleletters%>est).call("home");var results=regex.match("forest")
[21:29] robotarmy has joined the channel
[21:29] halfhalo: not really meant for that
[21:29] cheney: how do you end nested transmissions without prematurely ending the parent transmission?
[21:29] bingomanatee: so you are basically trying to extract named parts of a text block into a hash via regex
[21:30] halfhalo: yeah
[21:30] bingomanatee: cheney: consider request.end() to be basiclally a blocking call that waits for teh transmission to finish. 
[21:30] halfhalo: which is what I usually do with regex anywho
[21:30] bingomanatee: Nicer than indexes I guess ... 
[21:31] halfhalo: yeah, and easier to read in code, and also lets you make more than one matchable object with or
[21:31] bingomanatee: \me will be glad when he's done with noogle so he can move on to other stuff. 
[21:32] prettyrobots has joined the channel
[21:32] bingomanatee: cool.
[21:32] halfhalo: so I could go ("hello <%name%>").or("hi <%name%>").then("!") and it will match either hello ___! or hi ___!
[21:33] bingomanatee: by assembling /(hello|hi)(.*)/ I take it?
[21:33] halfhalo: no
[21:33] bingomanatee: well then you're trading usability for speed in a big way. 
[21:34] mfernest has joined the channel
[21:34] bingomanatee: Might not be a factor in your use case. 
[21:34] halfhalo: it assembles two (or more) regex strings
[21:34] bingomanatee: fair nuff.
[21:35] jacobolus has joined the channel
[21:35] halfhalo: and plus, you can make it so that the regex obj's are only built once which would help with the load
[21:36] sechrist: So is there a proper way to do regexes? regexp() vs var l = // etc?
[21:36] sechrist: I've had issues with the latter in ie6 but that doesn't mean much
[21:36] desaiu has joined the channel
[21:36] halfhalo: usually when I do regex's I just had them in one place for a match so I just had them like var m=str.match(//)
[21:41] felixge has joined the channel
[21:41] felixge has joined the channel
[21:44] sechrist: anybody know decent free software to share clipboard across mac/linux/windows (that isn't synergy)
[21:45] sechrist: synergy has a terrible bug somewhere that must be hard to fix because it's been around for years
[21:45] yozgrahame has joined the channel
[21:48] rektide has joined the channel
[21:48] rektide: how do i use a npm dependency?
[21:48] rektide: i specified npm dependencies in my package.json
[21:48] rektide: but for the life of me have not found any npm help pages, any npm docs, any google hits
[21:49] rektide: for how to use the modules my dependencies provide
[21:54] brianmario has joined the channel
[21:56] x_or has joined the channel
[21:56] mikeal has joined the channel
[21:56] vincex has joined the channel
[21:58] rektide: is npm bundle the only command for pulling in dependencies?
[21:58] rektide: it doesnt seem to have a real intergration path with actual require()
[21:59] Wizek has joined the channel
[21:59] nooder1 has joined the channel
[22:02] rektide: ok so
[22:02] rektide: apparently the docs just neglect to mention the actual use case npm inteds
[22:03] rektide: which is modifying the NODE_PATH
[22:04] prettyrobots has joined the channel
[22:04] rektide: yeah NODE_PATH isnt mentioned in the docs.  but it seems to be what NPM is designed to manage.
[22:05] nooder has joined the channel
[22:07] rektide: kind of disgusted
[22:07] rektide: whatever
[22:08] mnbvasd_: send a doc patch submission?
[22:08] rektide: perhaps
[22:08] rektide: i'm more likely to write my own NPM 101
[22:08] fille12 has joined the channel
[22:09] emacsen has joined the channel
[22:10] mikeal: ryah_: you around?
[22:10] yozgrahame has joined the channel
[22:10] mikeal: ryah_: didn't you live in Buenos Aires?
[22:11] polotek has joined the channel
[22:12] zzak has joined the channel
[22:12] zzak has joined the channel
[22:13] ryah_: mikeal: hey. yes
[22:13] mikeal: i'm gonna PM you
[22:16] ryah_: felixge: ping
[22:16] ryah_: herbySk: ping
[22:16] rektide has left the channel
[22:16] herbySk: ryah_: pong
[22:17] ryah_: herbySk: felix has some patches to the module system - have you looked at them?
[22:17] ryah_: https://github.com/felixge/node/commits/cleanup2
[22:18] tapwater has joined the channel
[22:18] herbySk: not yet... I did not get to the info they exist, yet
[22:18] ryah_: herbySk: do you want a chance to review? i'd merge otherwise
[22:19] ryah_: (since it fixes the stat problem)
[22:19] herbySk: ryah_: Yes, I'm looking on them now...
[22:19] ryah_: cool
[22:19] Jonasbn_ has joined the channel
[22:21] tokumine has joined the channel
[22:21] probably_ has joined the channel
[22:22] Wizek has joined the channel
[22:22] mnbvasd_: is there a nice way to tls secure an insecure tcp connection?
[22:22] felixge: ryah_: pong
[22:22] x_or has joined the channel
[22:22] felixge: herbySk: main patch is this: https://github.com/felixge/node/commit/2416c403f5f1c41cba786e965f6d64856b0d8eeb
[22:23] felixge: herbySk: the other two paches are just making the fs.stat calls go away
[22:23] mnbvasd_: I see socket.setSecure() has been depricated, which looks like what I wanted.
[22:23] herbySk: ryah_: the native module system is not really taken off, I said I'd be happy if it is not dependedt on Module, but if it, in require function. What now? (felixge, <<<)
[22:23] btipling: do most people use npm with sudo/root despite the warning or do they run it in the user space?
[22:23] felixge: herbySk: that was already there
[22:23] polotek: btipling: I would assume most people use sudo
[22:23] felixge: herbySk: I didn't add it
[22:23] polotek: but it's not difficult to configure it to install packages to a place that doesn't require sudo
[22:23] felixge: herbySk: but we can get rid of that in the future as well
[22:24] felixge: herbySk: I mean cleaning this whole stuff up is a process and I'd prefer to take it one step at a time
[22:24] btipling: thanks
[22:24] herbySk: felixge: strange, I did not see who was that, theough I watched changes to that part...
[22:24] polotek: mnbvasd_: you can put run a regular socket through a secure one
[22:24] felixge: herbySk: let me show you
[22:25] polotek: but it won't really do much because it'll still be insecure once it leaves your server
[22:25] felixge: herbySk: https://github.com/ry/node/blob/5f5201db2ffaeb773f32e747d268307089156148/src/node.js#L93
[22:25] polotek: mnbvasd_: I'm sure someone more knowledgeable can give you a better answer
[22:25] felixge: herbySk: not sure which module is using it right now
[22:25] springify has joined the channel
[22:26] mnbvasd_: polotek: I don't think that's what I want.
[22:26] mnbvasd_: I've got an xmpp data stream, then I want to starttls after a handshake.
[22:26] herbySk: (sigh) well, why isn't the module system (I mean, Module, now) in its own fiule so it can be simple required as native without any dependencies? Looking at the link
[22:27] polotek: mnbvasd_: ah, yeah I'm not too sure what's required for that
[22:27] felixge: herbySk: that's the next step I want to take :)
[22:27] mnbvasd_: I've hacked it, that after I handshake I proxy to a tls secured socket, and work from there.
[22:27] felixge: herbySk: it has no business of being in node.js
[22:27] felixge: (the file node.js)
[22:28] ryah_: herbySk: now that the bootstrapper is separated, that's possible
[22:28] ryah_: er more reasonable
[22:28] MikhX has joined the channel
[22:29] herbySk: Well, ok, I found the commit (5342e3e925652fdd52da05f98768ac63b4fe7e7b), from Jan 09, it was some intermediate step towards this refactoring...
[22:30] herbySk: I try to look if there are some other problems, if not, I can say yes (especially if extracting Module out is the next thing)
[22:30] felixge: herbySk: If we put the module system in lib/module.js, the if statement in question will go away automatically
[22:31] ryah_: felixge: i was wondering if you could do away with some of these closures in the module system. 
[22:31] ryah_: like https://github.com/ry/node/blob/f35773ad0767232aafaa9dfe9f788ca55b0a6138/src/node.js#L170-178
[22:31] felixge: ryah_: yeah, we will nuke those
[22:31] herbySk: felixge: sure, that I wanted to say with (sigh) statement
[22:31] ryah_: and https://github.com/ry/node/blob/f35773ad0767232aafaa9dfe9f788ca55b0a6138/src/node.js#L181-187
[22:31] felixge: ryah_: oh, I didn't mean those
[22:31] felixge: ryah_: but yeah, they suck
[22:31] ryah_: they should be private prototype methods
[22:31] felixge: ryah_: yes
[22:32] felixge: ryah_: The whole thing needs a little more OOP love
[22:32] felixge: ryah_: but it should be rather easy
[22:33] felixge: ryah_: I'm just taking this refactoring step by step, otherwise you'll never merge it if I just send it to you as one huge branch :)
[22:33] herbySk: felixge, ryah_: nice, it seems it can work :-)
[22:33] herbySk: as for me, you can commit
[22:33] piscisaureus: ryah_: can you help me debug something that goes wrong with v8?
[22:33] felixge: herbySk: did you also look at the other two commits?
[22:33] felixge: herbySk: https://github.com/felixge/node/commits/cleanup2 (the two on top)
[22:34] herbySk: (just this one yet)
[22:34] felixge: herbySk: I don't think that's how I want it to be done in the long run, but it seems like an implementation detail that we can improve later on
[22:35] felixge: herbySk: this commit is probably most telling: https://github.com/felixge/node/commit/2c9a59237bb59cb81c5d9e43ff12f922561030b3
[22:35] CIA-121: node: 03Ryan Dahl 07master * rc3b0d13 10/ test/simple/test-require-cache-without-stat.js : Add built-in module loading to test-require-cache-without-stat - http://bit.ly/f6tArm
[22:35] ryah_: piscisaureus: sure
[22:35] felixge: herbySk: the other one is mostly cleanup
[22:35] herbySk: felixge: yeah, i'm looking at them, now
[22:35] sh1mmer has joined the channel
[22:35] jacobolu_ has joined the channel
[22:36] emeka has joined the channel
[22:36] piscisaureus: ryah_: I'm having this problem: vm.createContext() crashes node_g, though really only the debug build and only on windows
[22:36] piscisaureus: # Fatal error in D:\nodejs\node-src\deps\v8\src\/objects-inl.h, line 1736
[22:36] piscisaureus: # CHECK(object->IsJSFunction()) failed
[22:36] piscisaureus: ... and a backtrace the size of several novels
[22:37] piscisaureus: I though it was memory corruption of some sort but using DUMA (electric fence for windows, basically), I've found little
[22:37] piscisaureus: (did found an issue with some of my own code, but it didn't fix the problem)
[22:38] herbySk: felixge: Well, yes, I agree this should not be the final form, but as a quick solution to stop fstats it will suffice... how it break side-effects with require.paths is a question, hopefully not very much code is based on that
[22:38] herbySk: (I think it can go)
[22:38] piscisaureus: how does one debug such a problem?
[22:39] ryah_: piscisaureus: sounds like one of the arguments is wrong - and should be checked in src/node_script.cc
[22:39] ryah_: piscisaureus: gdb
[22:39] felixge: herbySk: what side effects do you mean?
[22:39] felixge: herbySk: can you explain that a little further?
[22:42] jacobolus has joined the channel
[22:44] Intel_iX has joined the channel
[22:44] Intel_iX: How would I accept a connection from a client, then respond to it some other time(say when something happens). 
[22:45] Intel_iX: > i am a noob
[22:48] herbySk has joined the channel
[22:50] tokumine has joined the channel
[22:50] tmzt: Intel_iX: look at faye or socket.io
[22:50] herbySk: felixge: In previous "pervasively fstating" solution, whenever require found another file during resolving, it loaded different module on the same request.
[22:50] jchris has joined the channel
[22:50] charlenopires has joined the channel
[22:51] herbySk: This was mainly because of require.paths.unshift, but simply providing node.js with the file that is higher on resolve ranking may have led to loading different module.
[22:51] herbySk: Now that's not true - pathCache shortcuts that.
[22:51] herbySk: So the question is, how much code relied on that "feature" and is now broken
[22:52] felixge: herbySk: the cache I'm proposing takes the current require.paths into account
[22:52] felixge: herbySk: if require.paths changes, it invalidates the cache
[22:53] herbySk: aha... ok, that may help the code that relied on it. The other case I metioned, that is too hacky to be taken into account...
[22:55] felixge: herbySk: I think the only code that would break with this new patch is code where a new module is added to the file system
[22:55] felixge: herbySk: if we want to support that, we need to stat() everytime anyway
[22:58] herbySk: felixge: adding new module (that did not exist in any possible form before) should work; adding a module that "shadows" previously loaded one because it is higher in the resolve priority is the thing that may (and even should, I think) break
[22:58] herbySk: why newly added module breaks?
[22:59] ryah_: so im going o land felix's latest patches
[22:59] ryah_: they look good to me
[22:59] herbySk: for me, too
[23:00] ryah_: good
[23:00] herbySk: (well, as a first step ;-) )
[23:00] CIA-121: node: 03Felix Geisendörfer 07master * rf39fdf2 10/ src/node.js : 
[23:00] CIA-121: node: Isolate native module system again
[23:00] CIA-121: node: See: https://github.com/ry/node/commit/2e5dfafcb06f769889bd4d08a07d1c53346e7be7#commitcomment-239719 - http://bit.ly/dZ8gfw
[23:00] CIA-121: node: 03Felix Geisendörfer 07master * r0263f01 10/ (src/node.js test/simple/test-require-cache-without-stat.js): (log message trimmed)
[23:00] CIA-121: node: Fix test-require-cache-without-stat.js
[23:00] CIA-121: node: This path adds an additional cache to the module system for caching the
[23:00] CIA-121: node: location of previously required modules. Since it is embedded in the
[23:00] CIA-121: node: loop that iterates over all require.paths, this patch also handles the
[23:00] CIA-121: node: case where require.paths is being modified.
[23:00] CIA-121: node: The patch also cleans up some code around it.
[23:00] ryah_: felixge: i squashed the last two
[23:03] EGreg: hey people :)
[23:03] ryah_: EGreg: hi
[23:03] EGreg: what's next for node, ryah_ ? I mean what major features are on the roadmap in the next 2 months or so?
[23:03] ryah_: solidify https, debugger. work on distributed nodes.
[23:04] saschagehlich: debugger <3
[23:04] EGreg: distributed nodes :)
[23:04] saschagehlich: sorry for that gay heart but I had to do that.
[23:04] EGreg: what do you mean by that btw
[23:04] ryah_: EGreg: i'll explain later
[23:04] EGreg: ok.
[23:04] hunterloftis has joined the channel
[23:06] iFire` has joined the channel
[23:07] felixge: ryah_: thanks for merging
[23:07] felixge: herbySk: thanks for review
[23:08] romainhuet has joined the channel
[23:09] hunterloftis: How do you guys prefer to do error handling with node web apps? (we're using express) - I would ideally like 3 settings: hard errors (stop on all errors, even if recoverable, report), soft errors (return views as you will in production, but report the errors on the console), and production (log errors, try to recover)
[23:10] hunterloftis: I'm not very experienced with javascript-based exceptions (doing most of my js client-side until now)
[23:10] robotarmy has joined the channel
[23:10] herbySk: felixge: np, I probably start watching your fork for a time being, to see other step asap
[23:13] felixge: herbySk: I think I'll also email you and ryan for each patch series, ok?
[23:14] c0nundrum has joined the channel
[23:14] ryah_: ACTION likes that herbySk cares so much about the module system :)
[23:14] ryah_: because i don't at all :)
[23:15] clarkfischer has joined the channel
[23:16] sechrist: okay so I am confused
[23:16] sechrist: websockets are disabled in FF4 because of transparent proxies?
[23:16] sechrist: this makes no sense -- HTTP has the same thing
[23:16] AAA_awright: Is __proto__ meaningful to V8 at all?
[23:16] yrashk has joined the channel
[23:16] sechrist: now, if you're using unsecure websockets on SSL.. sure...
[23:17] AAA_awright: I don't think that's ECMA because of the double _
[23:17] rawberg has joined the channel
[23:17] yhahn: anyone have any best practices, etc. for handling js files that need to be used both client-side and server-side (this is in the context of an express js app)
[23:17] dnolen_ has joined the channel
[23:17] rawberg has left the channel
[23:18] sechrist: man.. express is getting popular
[23:19] yhahn: ha, why do you say that : )
[23:19] sechrist: in the last few days I've seen an unusual amount of express mentioned
[23:19] sechrist: on hacker news
[23:19] piscisaureus: ryah_: it really looks like a Persistent is overwritten or GC'd
[23:19] sechrist: in here
[23:19] sechrist: on blogs
[23:19] piscisaureus: ryah_: namely, WrappedContext::constructor_template
[23:20] yhahn: i see
[23:20] ryah_: piscisaureus: that seems unlikely
[23:20] piscisaureus: ryah_: to me too
[23:20] rawberg has joined the channel
[23:20] warz: i tried out express, but found that i was highly unproductive because of it, and node in general.
[23:21] warz: so i quit trying to write my entire site on nodejs/express.
[23:21] warz: and ive been a lot more productive since then, heh
[23:21] piscisaureus: ryah_: when I create WrappedContext::some_string, intialize it at the point where constructor_template is initialized, it's lost to
[23:21] piscisaureus: segfaults when accessing it. Not on the release build though, then the string remains readable
[23:24] bingomanatee: warz: at this stage a hybrid of RoR and node is prbobaly the best beft for productivity
[23:25] hunterloftis: warz: what do you use instead?
[23:25] echosystm has joined the channel
[23:25] echosystm: anyone familiar with connect - how do i get it to handle index.html etc. ?
[23:25] warz: well, im using python for the more user-facing type stuff. general page serving routines.
[23:26] warz: and im using nodejs for my websocket stream.
[23:26] echosystm: it doesnt seem to return an index at 'whatever/'
[23:26] warz: which is turning out to be real nice
[23:26] warz: because i can scale nodejs up without changing my python configurations.
[23:27] hornairs has joined the channel
[23:27] warz: it wasnt even express that slowed me down. it was having to learn a new templating language.
[23:28] warz: i tried out jade, and i spent like 2-3 days basically getting nothing done.
[23:28] echosystm: just use EJS warz
[23:28] CIA-121: node: 03Ryan Dahl 07master * rb622bc6 10/ (4 files in 4 dirs): Bump version to v0.3.5 - http://bit.ly/ifaftl
[23:28] CIA-121: node: 03Ryan Dahl 07master * r082a4b6 10/ src/node_version.h : Now working on v0.3.6 - http://bit.ly/eOwfQM
[23:28] warz: yea, i didnt get a chance to try that. i might for my next project.
[23:29] cheney has joined the channel
[23:33] sechrist: if you configure vim to tab properly with jade
[23:33] sechrist: I think it becomes 100x easier
[23:33] sechrist: much like python
[23:34] aelaguiz: In a prototype function I'm setting variables which should be in the object closure but it looks like they are getting set at global scope as new vars, is that um...normal?
[23:34] warz: well, coming from python, that wasnt so bad for me. it was just an unnatural markup. im sure i could get used to it. it was just taking up too much time for me.
[23:36] hunterloftis: echosystm: what do you mean "handle index.html, etc?"
[23:37] mscdex: aelaguiz: you need to prefix them with 'this'
[23:38] hunterloftis: warz, sechrist: yeah, we're pretty ambivalent on jade. We used it for the whole project we're building now, and it was kind of a pita. The file sizes are smaller, but many of them took longer to write than plain html.
[23:38] aelaguiz: http://pastebin.com/dqSXPxNf
[23:38] sechrist: hunterloftis: spend the time to configure whatever you write your code in
[23:38] sechrist: if you've made it as easy as possible and it's still a pain in the ass
[23:38] hunterloftis: sechrist: We use komodo which doesn't have any sort of jade parser
[23:38] mscdex: aelaguiz: yep, you need to prefix with 'this.'
[23:38] ashleydev has joined the channel
[23:39] sechrist: I didn't say parser
[23:39] mscdex: aelaguiz: so: 'this.upArrowRegion'
[23:39] sechrist: I mean like vim highlighting and tab rules
[23:39] hunterloftis: sechrist: It has to be able to parse the text to properly highlight and tab it
[23:39] aelaguiz: mscdex: I thought that was only if I exposed the variable outside of the closure, ie in the top part I had said this.upArrowRegion = undefined
[23:39] sechrist: does komodo let you script that stuff?
[23:40] hunterloftis: sechrist: Looked into it, and it doesn't look that configurable. It includes tons of shit ootb, but no clear module for extending it
[23:40] sechrist: damn
[23:40] hunterloftis: yeah
[23:40] hunterloftis: Problem is, it's fantastic for JS
[23:40] mscdex: aelaguiz: oh, yeah. you'd have to prefix with 'this.' in the constructor also. var makes it private and only available within that scope
[23:40] sechrist: vim++ 
[23:40] sechrist: what happened to the beer bot?
[23:40] sechrist: :|
[23:40] aelaguiz: Okay I see
[23:40] hunterloftis: sechrist: Linux or OSX?
[23:41] sechrist: that's complicated because I use both
[23:41] sechrist: I ssh into linux machines on osx
[23:41] hunterloftis: sechrist: And you use vim on both?
[23:41] hunterloftis: ok gotcha
[23:41] sechrist: for writing code I am mostly in a shell
[23:41] sechrist: I mean if I happen to open up something on the mac it goes into textmate
[23:42] hunterloftis: I may end up doing that in the future, for syntax highlighting. But it would probably be easier to use EJS in Komodo
[23:42] aelaguiz: I guess my question is this, I want my prototype functions to be able to reference variables in the object but I don't want to expose those variables to the whole world - not possible?
[23:42] sechrist: I haven't used komodo so I don't know, but vim was pretty simple to get js writing pretty tolerable
[23:42] sechrist: now if you're doing it based on filetype and do inline js inside .html templates it's not going to know unless it has logic for