[00:00] boaz has joined the channel [00:02] sonnym has joined the channel [00:02] emmanueloga has joined the channel [00:02] sprout has joined the channel [00:07] boaz has joined the channel [00:08] mtodd_ has joined the channel [00:10] josefrichter_ has joined the channel [00:13] banjiewen_ has joined the channel [00:15] mtodd has joined the channel [00:16] TheEmpath has joined the channel [00:16] TheEmpath: hi [00:17] TheEmpath: so if i have javascript in the background... and i have jquery in the front.. does that mean Sun finally invented ASP? [00:17] TheEmpath: background = server-side [00:17] nerdEd has joined the channel [00:17] isaacs: Aria: hey [00:17] Aria: Sun? [00:17] Aria: Hey [00:17] isaacs: Aria: , bin: 'bin/smtpd' <-- that's confounding [00:17] Aria: Oh? [00:17] isaacs: Aria: yeah,supposed to be { "smtpd" : "./path/to/thing" } [00:17] Aria: Aaaah! [00:18] isaacs: but now that i type that, i realize a string should Just Work [00:18] stepheneb has joined the channel [00:18] isaacs: you can also specify a directory of bins [00:18] Aria: Hm [00:18] Aria: Complex. [00:18] isaacs: { "directories" : { "bin" : "./bin" }} [00:18] isaacs: yeah [00:18] isaacs: nvm, i'm gonna just fix it. [00:18] isaacs: but in the meantime, npm install smtp is broken [00:18] Aria: okay then! [00:18] isaacs: you can make it work by changing the json thusly [00:20] batasrki has joined the channel [00:20] isaacs: fixed on ab1fccb1ba8e0e070dfae7327ebce4a0165d8714 [00:20] sonnym has joined the channel [00:23] dannycoates has joined the channel [00:25] UHMA: anyone know a good article about running nodejs apps over multiple servers? [00:25] JimBastard: UHMA: where you want to start? [00:25] Aria: I don't offhand. The usual load-balancing techniques apply. No magic, just good tools to do it. [00:26] JimBastard: ive been working on a hosting solution for a few months now [00:26] UHMA: from the basics, I want to write my program so that I can scale horizontally, but I'm new to node. i've only done it with php apps [00:26] JimBastard: got most of the pieces working well [00:26] JimBastard: UHMA: its easy, keep I/O out of your core app [00:27] JimBastard: have your database and session outside of node [00:27] Aria: And think about concurrent updates to things, and try not to do that, or isolate when it does. [00:27] JimBastard: then just load balance http requests to sitting nodes [00:27] JimBastard: using http-proxy [00:27] JimBastard: thats what we do [00:28] Tobsn has joined the channel [00:28] UHMA: ok, the concept is still sinking in for me [00:29] JimBastard: if you need a business grade scaling solution i got your back [00:29] JimBastard: can help with planning as well [00:29] Figaroo has joined the channel [00:29] JimBastard: what are you trying to build? [00:29] Figaroo: Would it be a good idea to build a web application using only Node and MySQL on the backend? [00:30] UHMA: the chat app as an example, obviously if chat is stored in a server side nodejs array... that's a useless design over multiple servers.. so the chat would need to be stored centrally, like in a db... i just think if I introduce a db to the equation, to handle chat msgs... that's really going to slow things down [00:30] JimBastard: Figaroo: why not? [00:30] Figaroo: I heard from someone that it wasn't ready, maybe not secure enough? [00:30] JimBastard: UHMA: i would think put messages in REDIS [00:30] JimBastard: then you just have node accept connections [00:30] xla has joined the channel [00:30] JimBastard: and get data from redis [00:31] JimBastard: database is for data, persistance layer is for session [00:31] UHMA: looking into redis now. what's the link to ur project jim ? [00:33] JimBastard: www.nodejitsu.com [00:34] Eber has joined the channel [00:34] UHMA: oh I was on your blog yesterday for something or other :) [00:34] JimBastard: nice [00:34] UHMA: so you are creating some sort of auto scaling solution ? [00:35] ashleydev has joined the channel [00:35] nikolaiwarner has joined the channel [00:36] Figaroo: Is node stable enought to be the only server (no apache or nginx) for a large scale web application? [00:36] gerred has joined the channel [00:37] Figaroo: g2g [00:37] Figaroo: bye [00:37] Eber: Does anyone here uses CoffeeScript? Any thoughts on using it? I'm divided between using it or not... [00:41] jashkenas: Eber: feel free to ask questions in #coffeescript, if you'd like to hear from folks who are definitely using it. ;) [00:42] JimBastard: UHMA: yeah [00:43] JimBastard: UHMA: some of the pieces are open-source, more will come [00:43] xla has joined the channel [00:46] TheEmpath: RIP LAMP. [00:46] TheEmpath: Hello NJHM [00:46] TheEmpath: Node + jQuery + HTML5 + MongoDB [00:46] softdrink has joined the channel [00:47] MikhX has joined the channel [00:47] bpadalino: i thought nnnn is the new hotness [00:47] zith_: what is nnnn then? [00:47] bpadalino: not windows, node, nginx, nosql [00:48] TheEmpath: why even bother is nginx when you have node? [00:48] TheEmpath: with* [00:48] prettyrobots has joined the channel [00:48] shaver: caching [00:48] shaver: and load-balancing [00:48] TheEmpath: ahha [00:48] sprout has joined the channel [00:48] TheEmpath: how does that work with node then? [00:48] TheEmpath: is there a require [00:48] TheEmpath: ? [00:49] shaver: speaks wsgi or similar, I imagine [00:49] shaver: or forwards to a node httpd [00:49] Aria: Or http [00:49] TheEmpath: D: [00:49] galaxywatcher has joined the channel [00:51] softdrink has joined the channel [00:53] zith_: i wonder if node.js will make web development fun for me again [00:53] zith_: i really havnt done any real web development since 2004 or something [00:54] zith_: just when all of these fancy web frameworks started picking up [00:54] zith_: back when you always wrote ugly php from scratch [00:55] ooooPsss: you'll have to create a nice web framework then [00:55] Anti-X: frameworks can go in a room and jerk each other off [00:55] Anti-X: they'll be just as useful [00:56] ooooPsss: I'm not sure if node is suitable to create full web applications [00:57] kgf: it's being done, regardless, and I get the impression there are several people who are paying quite close attention to the performance of these things. [00:57] shaver: I think node will really shine with more "data-based" or XHR/AJAXy things [00:58] shaver: because that's where the non-blocking stuff really shines [00:58] shaver: even the blockingest php stuff generally doesn't have trouble getting the templates and such off disk [00:58] zith_: do you think people will use classic framworks like rails and then just have some of the content served by node apps? [00:59] ooooPsss: time will say [00:59] mw_ has joined the channel [01:01] Anti-X: it wouldn't be too difficult to just write a binding for, say, php, that could be used as a template engine (which is what it actually is (or at least supposed to be), you know) [01:01] AAA_awright_ has joined the channel [01:02] Anti-X: nested parentheses, i guess i must be a programmer [01:03] softdrink has joined the channel [01:03] pengwynn has joined the channel [01:07] icicled has joined the channel [01:07] SteveDekorte has joined the channel [01:10] technoweenie has joined the channel [01:11] dnolen_ has joined the channel [01:12] TheEmpath: hrmmm can one emulate a singleton pattern in node.js? [01:12] TheEmpath: for like say an Application Object [01:12] visnup has joined the channel [01:13] jashkenas: var Application = {}; [01:13] TheEmpath: good thinking toots [01:13] Aria: Don't do that in dynamic languages with a functioning global scope. [01:13] Aria: Just what jashkenas said. "Singleton Pattern" is what happens in languages like JAva where classes /are/ the only global scope. [01:14] TheEmpath: hrmm [01:14] jashkenas: One man's singleton is another man's instance, if you know what I mean. [01:14] TheEmpath: i'd just like to make sure only one instance of my Application object exists [01:15] icicled: anyone using socket.io get this: Illegal transport "socket.io.js" [01:15] GriffenJBS: TheEmpath: one per process? one per machine? [01:15] TheEmpath: ah sorry [01:15] TheEmpath: one per process [01:16] GriffenJBS: jashkenas: use a closure to keep from making a mess [01:16] UHMA has joined the channel [01:16] TheEmpath: actually, i can just test that in the constructor can't i? [01:16] TheEmpath: since its all global [01:16] TheEmpath: if(application is Application) throw new Exception [01:16] GriffenJBS: yeah, a socket port makes a nice way to do that, if its a server of any type [01:16] TheEmpath: ya? [01:17] LFabien has joined the channel [01:17] jashkenas: TheEmpath: there are more elegant ways to make a constructor self-destruct, but you're probably better off avoiding them -- after all, what are you worried about? Someone sabotaging your code? [01:18] TheEmpath: not at all [01:18] GriffenJBS: I'm about ready to rip REPL from the tree and burn it [01:18] TheEmpath: i work in an environment where coders of very low understanding are forced to learn enterprise level solutions [01:18] TheEmpath: and i like to install training wheels where i can to prevent needless disasters [01:18] GriffenJBS: I'm sure it has a good purpose, but it's been useless to me. [01:18] jashkenas: TheEmpath, and you'd like to use a constructor function for this? [01:18] GriffenJBS: :-) back up often and let them loose [01:18] TheEmpath: id like a singleton pattern [01:19] GriffenJBS: problems are usually a great teacher [01:19] TheEmpath: or something similar [01:19] jashkenas: TheEmpath: object literal is the nicest singleton pattern in JS. [01:19] GriffenJBS: jashkenas: that's pollution, please don't do that unless you HAVE to [01:20] jamescarr_ has joined the channel [01:20] jashkenas: GriffenJBS: excuse me? [01:20] TheEmpath: ahhh i see [01:20] TheEmpath: useful [01:20] mikew3c has joined the channel [01:21] GriffenJBS: jashkenas: your cute little script with stuff pinned to Object works now, but when you start adding other modules/libs and later projects it's a bad idea [01:21] GriffenJBS: don't learn bad habits, even if they don't affect you yet [01:21] TheEmpath: does object literal support methods? [01:21] jashkenas: GriffenJBS: stuff pinned to object? [01:21] GriffenJBS: Object.prototype.xxx [01:22] jashkenas: TheEmpath: absolutely. [01:22] kgf: I didn't think jashkenas was talking about jacking Object.prototype... [01:22] jashkenas: GriffenJBS: I'm afraid you're mistaken -- no one's talking about extending Object.prototype. [01:22] dgathright has joined the channel [01:22] TheEmpath: aye im looking for a singleton pattern. object literal appears to be it with built in exception tossing [01:22] GriffenJBS: it's like the eval in browser JS or finalize in java, it has a time and place to be used, but most people use it wrong [01:22] TheEmpath: i'd still use prototype for instantiation [01:22] jashkenas: TheEmpath: If you want your original self-destructing constructor, check this out: http://gist.github.com/600224 [01:23] TheEmpath: ha! [01:23] TheEmpath: a flag [01:23] TheEmpath: that works [01:23] TheEmpath: i get my singleton and my constructor [01:23] TheEmpath: nifty [01:23] TheEmpath: thanks [01:24] jashkenas: TheEmpath: yes, but I wouldn't use it. What happens when you're testing, and you'd like to created two, configured differently -- you'll have to reload the process, or patch the constructor, or something crazy. [01:24] GriffenJBS: TheEmpath: what are you trying to guard? I'm curious [01:24] TheEmpath: oh i dont think i'll be making two Application objects [01:24] derferman has joined the channel [01:25] TheEmpath: theres only like a handful of immutable instances i'll ever need [01:25] TheEmpath: one is Application [01:25] GriffenJBS: lol, that's like Windows deciding I don't need two calculators running [01:25] shaver: no, it's like windows deciding that it only needs one kernel running [01:25] jashkenas: shaver: and then you'd like a virtualized instance, and oops... [01:26] GriffenJBS: :-) you say that, I have two VMware players open on this box [01:26] GriffenJBS: so that would be 3 kernels [01:26] shaver: those are just applications, to Windows [01:26] TheEmpath: the application isn't an object for applications lol [01:26] TheEmpath: it means the server application [01:26] ekidd has joined the channel [01:26] TheEmpath: should rename it to server? [01:27] jashkenas: shaver: I just refactored a large javascript project that was set up as a series of global objects, because it was a full-page application. One day we realized we wanted fixed-size versions where you could have multiple embedded within a long article, say. There's no downside to having it be an instance... [01:27] skampler has joined the channel [01:27] jashkenas: shaver: so perhaps I'm just sensitive to the topic this week. [01:27] mtodd_ has joined the channel [01:27] GriffenJBS: that's a great example [01:27] shaver: there's pervasive complexity and noise costs, if you have to pass it to everything [01:28] TheEmpath: hrmmm [01:28] TheEmpath: good discussions on this [01:28] TheEmpath: i are learningz [01:29] nornagon: what's the Way to do long calculations in Node? [01:30] webr3 has joined the channel [01:30] TheEmpath: win it over with a bottle of wine and a backrub [01:30] jashkenas: shaver: you can create the instance and assign it to a global object if you like, just don't make the object depend on the fact that it's a singleton, within itself. Singletons are only justified if there's no state stored in the thing, no state whatsoever. If you can configure it, or it stores values, it's much safer to make it an instance. [01:30] TheEmpath: i see [01:30] nornagon: TheEmpath: i tried that ;( [01:32] boboroshi_ has joined the channel [01:34] jashkenas: shaver: TheEmpath: if either of you would like to see how much work was involved in de-globalizing the project, here's the diff: http://github.com/documentcloud/document-viewer/compare/1892e5...ce98bf [01:34] GriffenJBS: better to do the job right the first time [01:34] atmos has joined the channel [01:34] TheEmpath: D: [01:35] GriffenJBS: Any idea's why repl won't load my module? [01:35] GriffenJBS: it works from a script, but not from with in repl [01:35] GriffenJBS: does repl mangle the path, or something? [01:36] dohtem has joined the channel [01:37] langworthy has joined the channel [01:37] TheEmpath: node.js have guid support? [01:37] GriffenJBS: yes [01:38] TheEmpath: you are a helpful person [01:38] GriffenJBS: all the posix good stuff [01:38] TheEmpath: \o/ [01:38] GriffenJBS: are you asking about a gUUID? [01:41] codetonowhere has joined the channel [01:41] Druide__ has joined the channel [01:41] TheEmpath: dunno what a gUUID is [01:41] TheEmpath: i need something that can generate guarenteed unique identifiers [01:42] TheEmpath: random ain't gonna cut it [01:42] GriffenJBS: Globally Universally Unique Identifier [01:42] TheEmpath: oo that sounds nice [01:42] Aria: How about random combined with a mac address and a time-based ID? [01:42] TheEmpath: 'll take one of those [01:42] Aria: Which is what a GUUID is ;-) [01:42] GriffenJBS: I know node.js can do type 2-5, not sure about [01:42] GriffenJBS: 1 [01:43] GriffenJBS: ... any idea what the collision rate for type 4 is? [01:43] c4milo has joined the channel [01:43] TheEmpath: the mac address is a powerful salt :D [01:44] TheEmpath: random itself isn't sufficient [01:44] GriffenJBS: salt for a GUUID [01:44] Yuffster has joined the channel [01:45] GriffenJBS: ummm... are you sure [01:45] softdrink has joined the channel [01:46] dilvie: Node.JS WTF moment: node: "\\\\" // Result: '\\\' [01:46] dilvie: wtf is going on there? [01:48] AAA_awright: No clue because '\\\' isn't a valid expression [01:49] jashkenas: dilvie: "\" in a string is the escape character. you need to escape your backslashes. [01:49] dilvie: jashkenas: That's what I'm doing. [01:49] kgf: he is. the point is, why's it coming back with 3... [01:49] kgf: and if you put in 6, it comes back with 5... [01:49] dilvie: jashkenas: I want '\\'. [01:49] jashkenas: dilvie: oh right. it should be two. [01:50] jashkenas: dilvie: repl or script? [01:50] GriffenJBS: the // is the start of a comment right? [01:50] GriffenJBS: where is the ; [01:50] GriffenJBS: or the , for a list [01:51] dilvie: I am writing an HTML5 form validation plugin for jQuery that I'm planning to use both on the client, and server side in Node.. I cannot have '\\' in the browser and '\\\' on the server. [01:51] dilvie: wtf. =) [01:51] GriffenJBS: lol [01:51] dilvie: I'm trying to escape the regex pattern that comes from the HTML pattern attribute. [01:52] nroot7 has joined the channel [01:52] AAA_awright: GriffenJBS: It's valid ECMAScript without the ; [01:52] GriffenJBS: AAA, depends on the context [01:53] dilvie: GriffenJBS: Assume the ; [01:53] GriffenJBS: and version [01:53] halfhalo: EVERYTHING depends on context.. [01:53] dilvie: I just put the comment in there for IRC. [01:53] dilvie: context: IRC. [01:53] GriffenJBS: lol @ halfhalo [01:53] AAA_awright: There aren't *that* many versions of ECMAScript [01:53] AAA_awright: Especially not that v8 can do [01:54] sudoer has joined the channel [01:54] dilvie: so, peculiar thing: it works fine in chrome. [01:54] dilvie: and firefox [01:54] zith_: lets just copy and paste from the node prompt to avoid all confusion [01:54] zith_: node> "\\\\" [01:54] zith_: '\\\' [01:54] zith_: node> [01:55] zith_: yay. [01:55] dilvie: LOL [01:55] GriffenJBS: yeah, careful with repl [01:55] dilvie: zith_: you're a rock star. I need a workaround. [01:55] GriffenJBS: it's causing me problems ATM [01:55] halfhalo: methinks its escaping the " [01:55] TheEmpath: so... whats a good reliable web framework for node.js? [01:56] zith_: node> "\\" + "\\" [01:56] zith_: '\\\' [01:56] dilvie: TheEmpath: connect / express [01:56] zith_: :( [01:56] GriffenJBS: it works [01:56] GriffenJBS: it's REPL again [01:56] nornagon: is node-worker suitable for general use? doesn't seem to have been updated since April... [01:56] jashkenas: zith_: ouch. [01:56] halfhalo: bah? [01:56] dilvie: zith_: That was my first try. =) [01:56] halfhalo: stupid logic bugs [01:56] GriffenJBS: make a file containing this: console.info("\\\\"); [01:56] GriffenJBS: then run it [01:56] GriffenJBS: it works [01:57] matt_c has joined the channel [01:57] zith_: you're right, GriffenJBS [01:57] zith_: so what.. node shell bug? [01:57] GriffenJBS: REPL is messing with my module too, it won't load it, but from a script it works [01:57] zith_: dilvie: where did you see your result? [01:57] halfhalo: ACTION goes to completely disprove retarted laptop user on forums [01:58] zith_: GriffenJBS: what is REPL? [01:58] GriffenJBS: Read-Eval-Print-Loop [01:58] GriffenJBS: http://nodejs.org/api.html#repl-309 [02:00] dilvie: GriffenJBS: Cool. So it's a command line shell bug.. [02:00] GriffenJBS: seems to be [02:00] meso has joined the channel [02:01] dipser: mongoose.load('./models'); doesnt work here. it seems that is no longer a method of mongoose. how can i do that now? somebody? [02:04] skampler has joined the channel [02:06] atmos has joined the channel [02:07] mtodd has joined the channel [02:09] dilvie: is there an issue tracker for node that I can submit a bug report to? [02:10] alexb_: On github [02:10] mjr_ has joined the channel [02:10] GriffenJBS: Ok so I was bored, assuming a perfect random number generator and only 64 bit ( not the normal 128 bit UUID) the rate of collision is 1.70141183460469e+38 [02:11] AAA_awright: node> "1\/2\\3\\4\\5\\6" [02:11] AAA_awright: '1/2\\3\\4\\5\\6' [02:11] AAA_awright: node> "1\/2\\3\\4\\5\\6\\" [02:11] AAA_awright: '1/2\\3\\4\\5\\6\' [02:11] AAA_awright: Seems to be forgetting about the last \ [02:11] AAA_awright: I was going to say maybe someone forgot their g in s/\\/\\\\/g [02:13] jonathan has joined the channel [02:14] icicled: logs for this room? [02:16] mikew3c has joined the channel [02:16] GriffenJBS: I figured it out [02:16] GriffenJBS: it's part of REPL displaying data [02:16] GriffenJBS: try this: a = "\\\\"; a.length() [02:17] mikew3c has joined the channel [02:17] ryah: ACTION looks around [02:17] GriffenJBS: it's using sys.inspect, repl.js:60 [02:17] mikew3c_ has joined the channel [02:18] jashkenas: icicled: nodejs.debuggable.com [02:18] GriffenJBS: talking in your head in IRC doesn't work if your fingers part of the conversation [02:19] halfhalo: lol [02:21] charlenopires has joined the channel [02:21] AAA_awright: GriffenJBS: That errors in REPL, but var a = "\\\\"; a.length; gives 2 [02:21] icicled: thanks jashkenas [02:21] AAA_awright: As expected [02:22] GriffenJBS: yeah, the error seems to be in sys.inspect, I'm tracing it now [02:22] Me1000 has joined the channel [02:24] dannycoates: ryah: good jsconf? [02:24] nornagon: ryah: when you say "future versions" of node will support web workers, how "future"y are we talking? What should we use in the meantime? [02:25] mtodd has joined the channel [02:28] AAA_awright: There has to be something better than Web Workers [02:28] nornagon: AAA_awright: i'm all ears [02:30] AAA_awright: I'm having a hard time imagining how programmers aren't going to end up creating one thread per request, pretty much negating all the benefit of using Nodejs in the first place [02:30] TheEmpath: anyone know of session handling for node.js? [02:30] nornagon: personally i need them to do long-running background computation [02:30] nornagon: (writing a game server) [02:30] micheil: hey, ryah, I'm continuing to work on the docs [02:32] AAA_awright: require() is synchronous right? [02:32] AAA_awright: Well of course it is, I mean it's blocking, right? [02:32] micheil: yes [02:33] micheil: one of the only things in node that is. [02:33] ryah: nornagon: http://github.com/pgriess/node-webworker [02:34] micheil: ryah: hmm.. I'm wondering if I should use that with that app that I'm building [02:34] micheil: guess I should try both [02:35] nornagon: ryah: right. thanks :) [02:36] AAA_awright: nornagon: All you need is a single thread that is created at startup, in the same manner require() is used, that operates with an isolated scope, that calls a continuously calls a processing function with the next event in a read-only queue... passing read-only data is the hardest part I can imagine. Web Workers doesn't quite do it in this way, that's optimized for a web browser it seems [02:36] AAA_awright: nornagon: idk, I have a similar need though [02:37] ajpiano has joined the channel [02:37] nornagon: yeah, that would be fine [02:37] nornagon: i guess node-webworkers can do that [02:38] nornagon: i wonder how it passes data around, though -- i'll be passing data through on the order of MBs [02:38] Aria: That's not that much in the grand scheme of things. Even over a local network, that's short, if you can tolerate it actually being aynchronous. [02:38] nornagon: *nod* [02:39] nornagon: just as long as it doesn't try to JSON stringify and destringify or something equally nutty [02:39] Aria: Right. [02:39] nornagon: can it handle sending Buffers as messages? [02:39] rcy has joined the channel [02:40] nornagon: (... what about functions?) [02:40] Aria: (... That'd be harder, since V8 compiles them) [02:41] Aria: But yes, buffers are just an array of bytes. [02:42] shaver: passing functions doesn't work well [02:42] Aria: You might need to, say, send a length first or something trivial, but serializing that over a network would be easy. [02:42] micheil: ryah: what do you think? http://drp.ly/mo6O [02:42] AAA_awright: Is there even a need to isolate the scope, if you can just make it read-only? [02:42] shaver: because functions entrain their scope chains [02:42] shaver: and then you can end up with data races all over again [02:42] micheil: nornagon: it uses websockets. [02:42] micheil: over tcp / unix sockets [02:42] bpot has joined the channel [02:43] shaver: workers have some optimizations for structured cloning (in spidermonkey we avoid copying large strings, f.e.) [02:43] themiddleman has joined the channel [02:43] GriffenJBS: ryah: I think I have a patch I want to give you, lib/sys.js:97 delete one of the '\' [02:43] banjiewen has joined the channel [02:44] GriffenJBS: the test don't catch the current problem and the fix doesn't break anything [02:44] AAA_awright: Only things lower than the worker scope is read-write. Plus, you don't have any blocking calls, like pthread_mutex_lock to cause race conditions, so I really don't see why Nodejs can't be fully threaded [02:44] micheil: GriffenJBS: make sure you add a test case then [02:44] Aria: AAA_awright: Is there a need for it to be threaded? [02:44] mikew3c has joined the channel [02:45] AAA_awright: Aria: Same reasons we want Web Workers, except more functionalit [02:45] Aria: Well, once you get threads, you get people using them and writing yet more horrors... [02:45] AAA_awright: Web Workers has a *lot* of artificial limitations and it's designed for HTML and HTTP [02:46] nornagon: Aria: there are some applications for which you can't avoid them. [02:46] Aria: How so? [02:46] AAA_awright: Artificial limitations as opposed to practical [02:46] Aria: nornagon: Like? [02:46] GriffenJBS: nornagon: like? [02:46] nornagon: Aria: GriffenJBS: long-running background computations. [02:46] AAA_awright: Long running computations [02:46] AAA_awright: ^ [02:46] Aria: .... I do those without threads... [02:47] nornagon: Aria: fork? [02:47] Aria: Yeah. [02:47] GriffenJBS: a little of a pain to redesign, but most can be split in to parts and run through a msg queue in one thread [02:47] nornagon: does node have fork? [02:47] nornagon: GriffenJBS: ew, no [02:47] Aria: It has child processes [02:47] nornagon: Aria: ah, i haven't seen those... [02:47] AAA_awright: Yes you can do that, it's, uh, ugly? I've never liked it [02:47] AAA_awright: And you have to serialize everything [02:47] GriffenJBS: nornagon: laziness will cause as many problems as it fixes [02:47] AAA_awright: Hence the "ugly" [02:47] Aria: Hehe. I rather do. Shows up in the process list and all. [02:47] Aria: Killable and inspectable separately. [02:47] Aria: And the same model can scale across machines, even, if you share nothing. [02:48] mikew3c_ has joined the channel [02:48] nornagon: GriffenJBS: ... we're trying to avoid broken models here. Cooperative multitasking is a broken model. [02:49] Aria: (is it?) [02:49] zith_: is it? [02:49] Aria: (I kinda like it. Though shared memory is kinda broken. [02:49] Aria: ) [02:49] GriffenJBS: nornagon: how is web workers a bad idea? it's threading with out the global problems [02:50] nornagon: Aria: zith_: i shouldn't have to think about scheduling when i'm writing my algorithms [02:50] nornagon: that's the whole point of an OS. [02:50] Aria: Why not? [02:50] AAA_awright: Let's pull apart my implementation I described: You call a blocking function, say, var worker = new workerThread(workerFunc). This creates a thread with a queue, and you can call worker(callback) to add your function to the queue, and hopefully workerFunc will call callback() and eventually return; and start running the next function in the queue. [02:50] GriffenJBS: ps design your long running process as a state machine and this is a much simpler problem [02:50] zith_: having "long running computations" run as normal in node seems like blocking behaviour to me [02:50] nornagon: Aria: because it's Hard. [02:50] Aria: Most of the times I see people use threads, they're either working around a blocking API, or they're using a message queue and an answer event. [02:50] nornagon: and the OS does a better job. [02:50] nornagon: Aria: i want the latter [02:50] GriffenJBS: nornagon: the OS is a base, not a babysitter [02:50] Aria: nornagon: so do that. OSes have had 'processes' for ages. [02:51] Aria: They're like threads, only without having to lock stuff. [02:51] nornagon: erm [02:51] nornagon: what are we actually arguing for/against here? [02:51] GriffenJBS: you can still break the OS, you have to follow rules [02:51] nornagon: because processes are great and i approve. [02:51] Aria: I'm arguing that multiple threads of execution sharing data are Really Hard to get right, and so people generally don't [02:51] AAA_awright: workerThread is a wrapper around calling one function at a time in a threaded queue... Are there any chance for race conditions or other thread-related problems here? [02:51] Aria: They over lock or they actually want to fork something and then get an answer later. [02:51] GriffenJBS: Aria: I agree [02:52] zith_: i can see how firing off a thread that eventually adds a message to the message queue could be neater than starting a new process some times [02:52] Aria: And we have shm segments if we really do want to avoid sending things over sockets. [02:52] nornagon: Aria: yes [02:52] c4milo has joined the channel [02:52] zith_: maybe i'm wrong [02:52] nornagon: shm segments would be nice [02:52] jesusabdullah: So, I got a silly question, and it seems dumb, but here goes: Is there a command line input function for node? [02:52] GriffenJBS: zith_: that's exactly what chrome does [02:52] jesusabdullah: Like, a = input('what is your name?') [02:52] jesusabdullah: y'know? [02:52] GriffenJBS: nornagon: then your back to threading problems [02:52] Aria: jesusabdullah: To emulate a commandline, like the repl, or to parse arguments? [02:53] Aria: Ah, look at the REPL library, jesusabdullah [02:53] jesusabdullah: Just to grab an argument [02:53] GriffenJBS: jesusabdullah: did you run node with no params [02:53] nornagon: GriffenJBS: just wrap it in a 'send' function [02:53] jesusabdullah: No, not like that [02:53] jesusabdullah: I mean, that's why I haven't asked yet [02:53] jesusabdullah: but I want a script to prompt me fo rinput [02:53] GriffenJBS: nornagon: explain your send function [02:54] GriffenJBS: jesusabdullah: input from stdin? [02:54] nornagon: GriffenJBS: alloc shared memory, memcpy to memory, pass control to child [02:54] jesusabdullah: Yeah, basically [02:54] GriffenJBS: jesusabdullah: check out lib/repl.js and how it does it [02:55] jesusabdullah: I suppose I can do that [02:55] stephenjudkins has joined the channel [02:55] GriffenJBS: jesusabdullah: I'm not sure how it does it, but I know it does [02:55] Aria: The one thing I've seen that threads are good for is video encoding. And it's very, very careful work. And could be done with processes and an shm segment, too. [02:55] GriffenJBS: nornagon: and how do you keep from sharing objects? [02:56] nornagon: GriffenJBS: what objects are shared? [02:56] jakehow has joined the channel [02:56] nornagon: GriffenJBS: things are never controlled by more than one process. shm is just used like a fast socket. [02:56] GriffenJBS: if you copy a {} into the shared memory and then pass it, the pointers will pass as well, that's why json is used [02:56] nornagon: ah, i was thinking of just Buffers. [02:56] Aria: Yeah, buffers are a nice simple case [02:56] GriffenJBS: that could work [02:57] shaver: buffers are good that way, yeah -- immutable stuff can be shared [02:57] Aria: It doesn't have to be immutable. [02:57] GriffenJBS: but it would be a detail of how node.js passes the web worker messages [02:57] Aria: It just can't refer to memory outside the shm segment [02:57] nornagon: yes [02:57] nornagon: i gtg [02:57] nornagon: but thanks for the advice :) [02:57] GriffenJBS: later [02:58] deepthawt has joined the channel [02:58] GriffenJBS: micheil: you mentioned the test and patch, I'd rather not get involved with another project, but I want to pass the info on to someone, anyone I should contact? [02:59] aho has joined the channel [02:59] micheil: GriffenJBS: seriously, it's not getting involved, it's just writing one patch that includes the test case to find it and the code to fix it [02:59] micheil: if anything's wrong with the patch, we'll clean it up [03:00] kjftw has joined the channel [03:00] steadicat has joined the channel [03:00] dipser_ has joined the channel [03:01] jacobolus has joined the channel [03:02] AAA_awright: So what would be wrong with a wrapper around a function, that executes said function one at a time in a queue in a separate thread? If there are problems with that, would making the scope above that function read-only (that is, only the function scope is writable) fix that? [03:04] gf3 has joined the channel [03:05] abiraja has joined the channel [03:05] SteveDekorte has joined the channel [03:05] emmanueloga has joined the channel [03:07] shaver: hrm [03:07] shaver: I bet node doesn't work well on Windows under cygwin [03:07] shaver: or msys [03:07] bpadalino: what is your wager ? [03:08] TheEmpath: 4 nude boys. [03:08] shaver: 2 hours of my life, it looks like [03:08] amuck has joined the channel [03:08] shaver: oh, I might have better luck with gcc than msvc [03:09] shaver: or maybe I should just install Linux on this machine in the other partition [03:10] Aria: Node does run under cygwin. [03:10] Aria: Node does not yet work with msvc/msys [03:10] Aria: Ryah was just carping about that in his jsconf slides. [03:11] shaver: maybe I can fix some of that [03:11] shaver: I have some hard-won experience with that sort of multi-platform development [03:11] Aria: Sweet. It's mostly libeio/libev stuff that breaks -- Windows AIO is entirely different. [03:11] shaver: yeah [03:11] Aria: The pipe trick in particular of ev_async is what bites you. [03:11] Aria: (a self-pipe to use as a completion port) [03:11] shaver: I actually had a partial port of some event library to windows aio a while back [03:12] Aria: Nice. [03:12] shaver: until I found another way to solve what I was trying to solve [03:12] shaver: I wonder where that is [03:12] Aria: It's certainly nothing insurmountable. It'll just take some porting and fixing and probably a little adapting node to it. [03:12] Aria: And ryah, I believe, dislikes things that aren't portable. No forked code or ifdefs if possible ;-) [03:12] Aria: Don't quote me on that if possible. [03:12] GriffenJBS: shaver: if you have a few gigs of freespace get VMWare Player and install a linux it it [03:13] shaver: GriffenJBS: this machine is not really "VM host grade" [03:13] Aria: Hehe. Or Virtualbox. [03:13] Aria: Which works remarkably well even without VT instructions [03:13] shaver: well, I guess I could try [03:13] skampler has joined the channel [03:13] GriffenJBS: shaver: what are you trying to do, raytracing.js with it? [03:13] shaver: building an inverted index of 4.4MB of JSON [03:13] shaver: once I get to that part [03:14] GriffenJBS: I stopped using cywin a long time ago, just wasn't worth the hassle [03:14] Aria: Yeah, ditto, GriffenJBS. [03:14] shaver: yeah, I use msys + msvc [03:14] Aria: Another leaky abstraction. [03:14] shaver: that's the standard build-Mozilla-on-Windows setup [03:15] Aria: msys + gcc isn't bad, but it /is/ windows. If you're expecting posix, you'll be sad. [03:15] GriffenJBS: I keep buying windows laptops so the games are there, and then run VMWare and PuTTY [03:15] mikew3c_ has joined the channel [03:15] mikew3c has joined the channel [03:16] GriffenJBS: I have NX on here as well, but I like the CLI [03:16] Aria: Ditto. [03:16] Aria: (though I'm actually alternating MacOS and SuSE these days) [03:16] GriffenJBS: I love showing people what my "windows" machine can do [03:16] GriffenJBS: .... cause it's running linux [03:16] Aria: Hehe [03:17] danielzilla has joined the channel [03:20] boaz_ has joined the channel [03:22] pedrobelo has joined the channel [03:29] sstephenson has joined the channel [03:37] mikew3c^ has joined the channel [03:38] siculars has joined the channel [03:45] themiddleman has joined the channel [03:46] cataska has joined the channel [03:46] bradleymeck1 has joined the channel [03:47] silentrob has joined the channel [03:47] vnguyen has joined the channel [03:48] unomi has joined the channel [03:49] unomi: how are those queues on no.de looking? [03:53] bradleymeck1: they are going slow from what i can tell [03:54] konobi: =0) [03:54] unomi: I can only imagine that they have been hammered [03:54] dannycoates: konobi: hi [03:55] konobi: hey! [03:55] unomi: 311 users in here, quite a speedy growth [03:57] bradleymeck1: its been above 300 for past couple months, now we just need to get documentation up to par and a small takeover shall be complete [03:58] ehaas: takeover of what [03:59] bradleymeck1: exactly. [03:59] skampler has joined the channel [04:00] ehaas: heheh [04:00] bradleymeck1: but yea, with some nice documentation and a lot of examples i think people would ask less questions and be more open to node [04:00] shaver: if I have mymodule.js in the current directory [04:00] shaver: and typing "var mymodule = require('./mymodule')" in the node-repl complaints that there is no such native module /path/to/cwd/mymodule [04:01] isaacs has joined the channel [04:01] shaver: what ridiculous newbie error have I made? [04:01] amerine has joined the channel [04:01] AAA_awright: I'm looking for people also interested in using RDF in Nodejs [04:01] Me1000 has joined the channel [04:01] Yuffster has joined the channel [04:01] bradleymeck1: rdf like the xml nightmare? [04:01] ircretary has joined the channel [04:01] jashkenas: AAA_awright: why would you want to do such a thing? [04:02] AAA_awright: RDF has nothing to do with XML except that you can encode data as XML [04:02] ehaas: that looks ok to me shaver [04:02] amerine has joined the channel [04:02] ehaas: shaver is mymodule trying to include a native module? [04:02] bradleymeck1: i thought rdf was a purely xml based entity description framework [04:02] amerine has joined the channel [04:02] shaver: nope [04:02] AAA_awright: bradleymeck1: If you want to talk about nightmares, go read the Rules and OWL2 specifications [04:03] ehaas: the letters "rdf" make the hairs on the back of my neck stand up [04:03] shaver: oh [04:03] konobi: unomi: the queues are there... not much that can be said beyond that [04:03] shaver: hrm, this is a slightly odd construction [04:04] unomi: konobi: just signed up today, wondering if there were any clues on if we were talking a week or? [04:04] unomi: every minute is like christmas morning [04:04] AAA_awright: bradleymeck1: There are verious serializations for RDF data, including an XML one. What makes RDF different is that RDF data points are globally identifyable by URI, whereas XML is purely contextual. [04:04] konobi: unomi: i won't know until later in the week i'm afraid [04:04] unomi: and the lack of a coupon in my inbox is like a piece of coal in my stocking :p [04:04] AAA_awright: webr3: Have you done anything with SPARQL queries on Nodejs? Does Tabulator do that? [04:04] marshall_law has joined the channel [04:05] shaver: ehaas: http://shaver.pastebin.mozilla.org/799476 in case that helps [04:05] AAA_awright: jashkenas: So I can query RDF data...? [04:05] AAA_awright: It's not terribly different than querying a database [04:05] ehaas: you don't need the '.js' [04:05] ehaas: just do require("./stemmer") [04:05] shaver: oh, I tried without too [04:05] ehaas: ok [04:06] shaver: > var stemmer = require("./stemmer") [04:06] shaver: Error: No such native module /home/shaver/bzsearch/src/load/stemmer [04:06] shaver: http://shaver.pastebin.mozilla.org/799478 is the module in question [04:06] shaver: it's a single function assigned to exports.something [04:07] amerine has joined the channel [04:07] ehaas: works for me...maybe it's a problem with npm [04:07] ehaas: i don't have that installed though [04:07] isaacs: shaver: no, it's a problem with node@0.2.2 [04:07] shaver: oh ho! [04:07] isaacs: shaver: there's a bug where the repl doesn't load non-native modules. [04:07] ehaas: there you go [04:07] shaver: wow. [04:08] isaacs: shaver: fixed on 0.3.x branch already [04:08] shaver: I would never, in a million billion years have guessed that [04:08] shaver: so thank you! [04:08] isaacs: yep [04:08] isaacs: np [04:08] shaver: I can't update to 0.3.x, because it breaks something I depend on (some change to buffers or something?) [04:08] isaacs: yea [04:08] a_meteorite has joined the channel [04:08] isaacs: 0.3.x is not stable [04:08] shaver: but I can still test here, so that's fine [04:08] isaacs: suresure [04:08] isaacs: you can also write a module, and node my-module.js will work finr [04:08] isaacs: *fine [04:09] shaver: but it won't drop me into a repr after, right? [04:10] davidwalsh has joined the channel [04:11] isaacs: shaver: nope. [04:11] isaacs: you'll have to run the program again after each change [04:11] shaver: I wish this stemmer library had a test suite, so that I'd be more comfortable refactoring all the ugly out of it [04:13] isaacs: shaver: that's why i dont test my code. [04:13] isaacs: makes it too easy for people to come along and just refactor it [04:13] shaver: this code really needs it [04:13] shaver: like, I might do it anyway [04:14] Yuffster_work has joined the channel [04:16] a_meteorite has joined the channel [04:17] isaacs: you know, if we just realpathed the shit out of every module every time it was loaded, then homebrew would be a lot easier to deal with [04:17] isaacs: that's where *all* the problems seem to come from. not getting that moving a file to a different location means that its a different program now. [04:18] galaxywatcher has joined the channel [04:19] Aria has joined the channel [04:22] galaxywatcher: I am watching Ryan Dahl's presentation here: http://jsconf.eu/2009/video_nodejs_by_ryan_dahl.html and at 42:10 he mentions asynchronous DNS resolutions with a s source file of domain names using an event loop and to learn more to look at the source coupling and he points off screen somewhere. Is this a code snippet that I can study? If so where can I view it? Thanks. [04:22] technoweenie has joined the channel [04:22] AAA_awright: isaacs: Where is the API for npm that the binary uses to install packages (is there one)? I'm trying to write an HTTP frontend. [04:23] isaacs: AAA_awright: um.. what? [04:23] isaacs: AAA_awright: npm doesn't have a binary. it's just a node program [04:23] isaacs: AAA_awright: 100% js [04:23] AAA_awright: the executable, sorry [04:23] AAA_awright: (force of habbit) [04:23] AAA_awright: How would I use npm as a library, that's what I mean? [04:23] isaacs: oh, yeah, well.. it's just ls [04:23] isaacs: *js [04:23] isaacs: check out the lib directory [04:23] isaacs: require("npm") [04:24] isaacs: read through cli.js, i guess, is the best starting point. it's not as abstracted as i'd like, but it's fairly well separated [04:24] AAA_awright: I'm having trouble getting it to work with a custom-set root and everything. I've tried doing all that on the REPL but it's not very straightforward on how to call the install commands, and it looks like whatever commands there are accept command-line-style arguments [04:25] AAA_awright: (install as one example) [04:28] isaacs: AAA_awright: well, like i said, take a look at cli.js [04:28] isaacs: AAA_awright: you have to do a bit of legwork to load configs, etc. [04:29] isaacs: AAA_awright: and, that's what's not so clean [04:29] isaacs: AAA_awright: but, then, each command is npm.commands.whatever([list, of, args], cb) [04:29] isaacs: AAA_awright: you can change configs with npm.config.set("root", "/some/path") [04:30] isaacs: AAA_awright: or npm.config.set("root", "/some/path", "global") to set it as if it was in the globalconfig file [04:31] AAA_awright: isaacs: Ah cool, and what would be the best way to get a list of packages, and maybe metadata for it? [04:31] polyrhythmic has joined the channel [04:31] isaacs: AAA_awright: a good way to go is to look at the commands that do that [04:31] EyePulp has joined the channel [04:31] isaacs: AAA_awright: there's a "registry" util that you can use to talk to the registry [04:32] isaacs: AAA_awright: look at ls.js or view.js [04:32] AAA_awright: Ha, alrighty thanks [04:32] sudoer has joined the channel [04:35] jchris has joined the channel [04:39] mtodd has joined the channel [04:40] orlandov: huh, i can't enter object literals (e.g. {foo: 'bar'}) into the repl [04:40] orlandov: on master [04:40] shaver: naked like that? [04:40] shaver: need () around them if they start a statement [04:41] orlandov: yeah, just the value [04:41] shaver: otherwise ambiguous parse for LL(1) [04:41] orlandov: really? [04:42] trave has joined the channel [04:42] shaver: yes [04:42] shaver: { label: while(1) { break label; } } [04:43] orlandov: ahhhhh labels [04:46] trave: So, im trying to make a simple deploy to get running on my brothers macbook pro, I am using node-htmlparser installed via npm on mine just fine... Id like to provide him just a copy of the node-htmlparser.js within a tgz of the project's /lib directory, but doing so I am getting: WARNING: No HTML parser could be found. even though ive changed the paths to include it to match "./lib/node-htmlparser" [04:46] trave: is a libs filepath relation relative to itself? [04:47] trave: sorry, that makes absolutely no sense :] [04:48] isaacs: trave: relative require() statements are relative to the module doint the require()ing [04:48] trave: ah k, i was just coming to that conclusion. :] [04:48] trave: thanks :D [04:48] halfhalo: i... hrm... I did not plan this module out well... [04:49] halfhalo: Now, I do the correct thing and refactor it to be all nice and elegant and let me call it from itself.. or I can be lazy and just have it return functions that emulate itself.... [04:50] halfhalo: option b it is! [04:50] dgathright has joined the channel [04:52] halfhalo: maybe... This is getting complicated... [04:54] shaver: I find that my structure instincts aren't very good yet with this level of asynchrony; have to refactor brutally a lot of the time [04:55] trave: shaver: example? [04:55] shaver: figuring out where I need to complete an operation before doing the next one, and when I can stream it right through, for example [04:56] shaver: and which parts I'm going to want to be able to do in parallel, vs those that are inherently serial [04:56] amerine has joined the channel [04:56] shaver: it's good stretching [04:57] trave: yea, thats how Ive felt playing with it so far as well :D [04:57] amerine has joined the channel [04:57] trave: it feels like it gently nudges you in the right direction naturally [04:57] halfhalo: ah screw it, scrapping homemade sqlite psuedo orm for perstore [04:58] trave: i think i'll be able to reuse some good patterns after a little exercise with it [04:59] trave: I just love how concise it feels, im only dealing with pure CSS/JS/HTML files exclusively [04:59] shaver: hrm [04:59] shaver: does node have a hash table? [04:59] shaver: for when objects don't work? [05:00] trave: whats the difference of a hash table and an {name:value, etc:pairs} objecte? [05:00] trave: -e [05:02] shaver: one difference is if one of your names is "__proto__", as is the case I just hit [05:02] trave: ah [05:02] trave: thatd be one. [05:02] AAA_awright: Can't you combine a hash table and a binary tree and make a super-efficient data structure or something? [05:03] path[l] has joined the channel [05:03] shaver: trave: that might be the only difference in v8 [05:03] shaver: I don't think v8 has __parent__ or __noSuchMethod__ or __count__ [05:03] AAA_awright: How would you give that in big-O notation anyways... constant time up until a threshold, and then log time after that [05:05] AAA_awright: No, chance of collisions... hm [05:09] AAA_awright: O(n log n) [05:10] halfhalo: oooohhhh.... mongoose actually works for me now [05:10] trave: whats mongoose do? :] [05:10] halfhalo: mongodb orm [05:11] trave: ooohh. [05:11] trave: im gonna read into that. [05:14] trave: im sold. [05:14] jakehow has joined the channel [05:14] halfhalo: last time I looked into it it wasn't working properly for me, which Is why I never used it [05:14] halfhalo: but now... its win [05:16] trave: I havent messed with mongo too much yet, but I love the idea of object in object out. [05:16] trave: in more ways than one. [05:16] halfhalo: Yeah, and I get to use models! [05:18] dgoodlad has joined the channel [05:21] trave: yowza! [05:21] mtodd has joined the channel [05:25] silentrob has joined the channel [05:29] unomi has joined the channel [05:31] gerred has joined the channel [05:32] shaver: if I want to build a module that wraps a REST API, is there a good exemplar to follow? [05:34] ako has joined the channel [05:39] marshall_law has joined the channel [05:45] derferman has joined the channel [05:49] riq has left the channel [05:50] cloudhead has joined the channel [05:52] Druide__: hm is there a reverse to stringify [05:52] halfhalo: JSON.parse [05:52] Druide__: to make an json object out of an querystring? [05:52] halfhalo: or whatever parse [05:52] Druide__: ah [05:52] Druide__: querystring.parse [05:52] Druide__: got it [05:54] mtodd has joined the channel [05:55] stagas has joined the channel [05:59] stagas_ has joined the channel [06:01] derferman has joined the channel [06:03] TkTech has joined the channel [06:10] jesusabdullah: ryah: Did you make that web irc client? [06:15] hannesw has joined the channel [06:19] shaver: hmm [06:19] shaver: it is difficult to combine object enumeration with the async model [06:20] shaver: is there a way to spin the event loop "by hand"? [06:20] shaver: hrmph [06:20] shaver: I guess I can build an index [06:20] shaver: er, vector [06:21] ivong has joined the channel [06:28] mikew3c has joined the channel [06:32] Nohryb has joined the channel [06:35] ivong has left the channel [06:38] shaver: nice [06:38] nornagon: what is _si_cache_add_item? [06:39] shaver: I've managed to do async object enumeration, albeit destructively [06:39] nornagon: (... seems to be called from node::Loop) [06:40] ThePub has joined the channel [06:40] adambeynon has joined the channel [06:42] mtodd has joined the channel [06:44] mopemope has joined the channel [06:45] Tobsn has joined the channel [06:45] killfill has joined the channel [06:45] Tobsn: hey, is kiwi broken? [06:45] Tobsn: no matter what i try the result is a 404 on the set server [06:51] jesusabdullah: People still use kiwi? [06:51] Tobsn: idk [06:51] jesusabdullah: Why aren't you using npm? >:O [06:51] Tobsn: i just wanted to try express-auth [06:51] jesusabdullah: npm, broski [06:51] Tobsn: jezz... [06:52] jesusabdullah: http://github.com/isaacs/npm [06:52] Tobsn: TJ, update your stupid readme. [06:52] Tobsn: :P [06:52] jesusabdullah: Hah [06:52] jesusabdullah: I think npm is relatively noew [06:52] jesusabdullah: new* [06:52] Tobsn: not really [06:53] Tobsn: though it sucks that kiwi is broken and nobody says anything [06:54] Tobsn: well express.auth is not in the npm packages [06:54] SteveDekorte has joined the channel [06:55] jesusabdullah: >:O [06:55] Tobsn: where does npm install to?! [06:55] codetonowhere1 has joined the channel [06:57] Tobsn: http://github.com/ciaranj/connect-auth/blob/master/examples/app.js [06:57] Tobsn: wow, who wrote that example? [06:57] Tobsn: jesus... [06:59] satori_ has joined the channel [07:02] ph^ has joined the channel [07:03] nornagon: hrrm, i'm getting a bunch of 'LazyCompile' in my profiling output [07:03] nornagon: but it doesn't say what function it's lazycompiled. [07:03] nornagon: just 16596 15.1% 15.1% Builtin: LazyCompile [07:05] Tobsn: jesus that shit blows... [07:06] Tobsn: anyone here working with expressjs? [07:06] ivanfi has joined the channel [07:09] aubergine has joined the channel [07:10] AAA_awright: npm doesn't seem fully... idk. Not designed as good as it could be. [07:10] AAA_awright: I'm mostly maintaining packages by hand. [07:10] Tobsn: i would be happy about a simple db auth example with express.js [07:11] MikhX has joined the channel [07:11] mjr_: nornagon: interpreting the V8 profiler dumps is a special skill that is often baffling. [07:11] mjr_: Baffling to those who don't have it, such as me. [07:11] Tobsn: but it looks like everyone who works with it either writes it super complicated with oauth or does a digest lookup with a single user/pass hardcoded... [07:12] digitalspaghetti: anyone here written an express middleware before? [07:15] themiddleman has joined the channel [07:16] tobiassjosten has joined the channel [07:20] nornagon: mjr_: :/ [07:20] mjr_: nornagon: I've gotten much more useful results from Instruments.app on OSX or oprofile on linux. [07:20] nornagon: ... really? [07:21] mjr_: yeah, there's no single tool that can properly profile node just yet that I've found. [07:21] mjr_: Sometimes instruments is worthless, but the V8 profiler will say something, and sometimes it's the other way around. [07:22] nornagon: surely instruments doesn't have access tot he JS function names? [07:22] mjr_: well [07:23] mjr_: if the function name is something that maps to or is obviously related to a V8 C++ function, then it kinda does. [07:23] Tobsn: hmm in express, if i define layout: false in the renderer... shouldnt it NOT ask for the layout template? [07:23] mjr_: Supposedly there's an oprofile module you can build for V8 that'll expose absolutely everything, but I haven't tried it yet. [07:23] zomgbie has joined the channel [07:24] mjr_: nornagon: give it a try, what have you got to lose? [07:24] nornagon: true [07:24] AAA_awright has joined the channel [07:27] SamuraiJack has joined the channel [07:28] q_no has joined the channel [07:31] nornagon: mjr_: well, i don't get names *at all* in instruments.app [07:31] nornagon: oh, wait, there's a few... [07:32] Druide__: woot [07:32] Druide__: Aria, there? [07:32] Druide__: hey Tobsn! [07:32] Tobsn: hey [07:32] stagas has joined the channel [07:33] mtodd has joined the channel [07:33] mjr_: nornagon: you don't get stuff like this: http://skitch.com/mranney/dar1e/instruments [07:33] mjr_: ? [07:33] shaver: mjr_: boy, I wish antirez gave you (and thus me) a way to load whole sets at a time into redis [07:33] nornagon: mjr_: nope [07:33] nornagon: not much [07:34] nornagon: mjr_: what instrument are you using? [07:34] mjr_: nornagon: the CPU sampler [07:35] jesusabdullah: http://gist.github.com/600560 Thoughts? [07:35] mjr_: shaver: yeah, I've been wishing for extra arguments to sadd as well. Seems like an oversight given how other commands take multiple arguments if unambiguous. [07:36] MikhX has joined the channel [07:36] nornagon: mjr_: i get http://nornagon.net/pics/instruments.png [07:37] mjr_: Well there's yer problem [07:37] mjr_: You need a faster Builtin_HandleApiCall() [07:38] nornagon: ... [07:38] mjr_: seriously [07:38] javajunky has joined the channel [07:38] mjr_: you probably don't [07:39] mjr_: To me that looks like some sort of error. Something is waking node up for IO, and it doens't make it very far before doing it again. [07:40] nornagon: well, it's in heavy JS-side computation [07:42] javajunky has joined the channel [07:42] mjr_: So if you flip the stack over, it's all just Builtin_Handle_ApiCall()? [07:42] mjr_: 100% [07:42] mjr_: ? [07:42] nornagon: um, i guess? [07:42] nornagon: i closed instruments now. [07:43] mjr_: I usually do "running sample times", but I'll bet you see the same thing. [07:43] mjr_: So, probably not very useful. [07:43] hansek___ has joined the channel [07:45] Egbert9e9 has joined the channel [07:46] daglees has joined the channel [07:47] deepthawtz has joined the channel [07:49] deepthawtz: I'm conflicted about how to describe commonjs in one sentence that fits on a slide. any help here? [07:50] mape: supposed "standard2 that isn't used? [07:50] deepthawtz: I guess mostly not sure how much legitimacy to give it [07:51] deepthawtz: so it is a spec, but how important is that to what node is working to solve [07:51] mjr_: deepthawtz: CommonJS: May actually turn out to be a good idea eventually. [07:51] deepthawtz: so "eventually"? [07:51] mjr_: Actually, I have no idea. [07:51] jesusabdullah: When commonjs becomes node? >:P [07:51] jesusabdullah: Can anyone explain commonjs to me? [07:51] mjr_: CommonJS is one of those things that I'm aware of but just don't care about. [07:51] jesusabdullah: I know that's a really vague question [07:52] jesusabdullah: To me, it's in the same 'bin' as RESTful [07:52] mjr_: Oh man, my new API so so full of REST. [07:53] deepthawtz: jesusabdullah: well commonjs isn't working software, it is just proposals? [07:53] jesusabdullah: Like, some kinda meaningless label that HAS meaning to SOMEONE, but has been diluted by most people [07:53] jesusabdullah: so that it's this kinda vague hand-wavey thing for stuff that's kinda-related [07:53] jesusabdullah: I know that's not REALLY the case with commonjs, but I feel that way anyway [07:53] derferman: mjr: how full? [07:54] unomi has joined the channel [07:54] Tobsn: erm does anyone know why someone would use pusher instead of just socket.io? [07:54] jesusabdullah: Do people take the commonjs proposals seriously? I mean, clearly the node devs don't take it TOO seriously [07:54] deepthawtz: jesusabdullah: wait, can you explain how that is the in the same bin as RESTful for you? [07:54] jesusabdullah: It doesn't really make sense, does it? [07:55] jesusabdullah: I guess I mean that they both, to me, seem to be used to talk about things that aren't really the essence of the idea, but something related to a more or less oblique degree [07:55] jesusabdullah: Like, when I think commonjs I just think of commonjs-style "require" [07:55] jesusabdullah: and not what commonjs actually IS [07:56] jesusabdullah: with RESTful, I think web 3.0-style apis, and not really what RESTful actually IS [07:56] jesusabdullah: (whatever they actually ARE ;) ) [07:56] deepthawtz: is commonjs at least the historical catalyst for node.js in any way? [07:56] deepthawtz: maybe it doesn't even need a slide in this pres [07:56] jesusabdullah: huh? [07:57] deepthawtz: i know there is require() [07:57] deepthawtz: but what else other than modules? [07:58] delapouite has joined the channel [07:58] jesusabdullah: tbh I don't actually know [07:58] jesusabdullah: http://wiki.commonjs.org/wiki/CommonJS [07:59] jesusabdullah: It seems to include jsgi and a bunch of modules that a commonjs-compliant system should implement [07:59] aubergine_ has joined the channel [08:00] deepthawtz has left the channel [08:00] deepthawtz has joined the channel [08:01] admc_ has joined the channel [08:01] admc has joined the channel [08:06] shaver: hmm [08:06] shaver: I guess my transaction is too big here [08:06] shaver: I guess it's almost a meg, 80K or so commands [08:06] shaver: mjr_: should I expect that to fail? [08:07] mjr_: no, it should work. I'm experimenting right now with very large command pipelines, and it does seem like something bad is happening [08:07] shaver: oh, it worked, it just choked on the parsing of the results [08:08] shaver: like, all the keys ended up set [08:08] shaver: so that's good [08:08] mjr_: Yeah, that's good news [08:08] mjr_: I'll have to look at this tomorrow. Getting too tired to sift through it. [08:08] shaver: yeah, same [08:08] mjr_: If you get any insight, I'd love to hear it. [08:09] shaver: seems like it's not fully draining the response stream [08:09] shaver: but I'll poke a bit on the plane tomorrow [08:09] ph^ has joined the channel [08:14] mtodd has joined the channel [08:17] ironyboy has joined the channel [08:28] ironyboy has left the channel [08:30] aubergine has joined the channel [08:31] rnewson has joined the channel [08:31] admc_ has joined the channel [08:31] admc has joined the channel [08:32] slaskis has joined the channel [08:32] kjeldahl has joined the channel [08:38] mikew3c has joined the channel [08:38] necrodearia has joined the channel [08:38] virtuo has joined the channel [08:42] sschuermann has joined the channel [08:43] caolanm has joined the channel [08:43] q_no has joined the channel [08:45] TomY has joined the channel [08:47] mikew3c has joined the channel [08:51] rnewson has joined the channel [08:54] stagas has joined the channel [08:58] tisba has joined the channel [09:01] virtuo has joined the channel [09:01] tekky has joined the channel [09:04] olegp has joined the channel [09:05] javajunky has left the channel [09:06] javajunky has joined the channel [09:06] FuzzYspo0N has joined the channel [09:09] aubergine has joined the channel [09:09] jetienne has joined the channel [09:10] beawesomeinstead has joined the channel [09:11] mbrochh has joined the channel [09:12] Nohryb has joined the channel [09:13] frode has joined the channel [09:15] MikhX has left the channel [09:16] MikhX has joined the channel [09:20] Throlkim has joined the channel [09:21] mikew3c_ has joined the channel [09:23] rnewson_ has joined the channel [09:24] davidc_: how can I get the content-type headers of a request in node? I've been trying to play with request.headers but doesn't appear to be retrieving much for me. [09:25] rnewson has joined the channel [09:25] rnewson has joined the channel [09:26] FuzzYspo0N: try : var ct = String(req.headers.contentType); davidc_ [09:26] davidc_: ahh contentType [09:26] davidc_: dar dar [09:26] davidc_: cheers [09:27] mpoz2 has joined the channel [09:28] ph^ has joined the channel [09:28] omarkj has joined the channel [09:39] aubergine has joined the channel [09:39] hansek has joined the channel [09:40] AAA_awright has joined the channel [09:43] dquestions has joined the channel [09:43] aubergine_ has joined the channel [09:43] dquestions: hi, what are people using now, not haml but? [09:43] dquestions: jade? [09:43] dgathright has joined the channel [09:46] ph^ has joined the channel [09:46] dgathright has joined the channel [09:50] path[l] has joined the channel [09:52] Uierth has joined the channel [09:53] Uierth has joined the channel [09:53] path[l] has joined the channel [09:54] rnewson has joined the channel [09:57] xla has joined the channel [09:57] Uierth_ has joined the channel [10:01] DozyPieman has joined the channel [10:03] agnat has joined the channel [10:08] rnewson has joined the channel [10:08] rnewson has joined the channel [10:10] DRMacIver has left the channel [10:11] AAA_awright: dquestions: Yes [10:11] AAA_awright: I am, Jade is really lovely [10:11] AAA_awright: A bit under-documented if anything [10:13] jetienne: . [10:16] path[l] has joined the channel [10:17] DozyPieman` has joined the channel [10:21] aubergine has joined the channel [10:24] dquestions: how do i setup my node git repo so that i can have submodules? [10:24] dquestions: i'm using mostly npm for now [10:25] dquestions: but i read that it is a good idea to learn to use submodules for git? [10:25] dquestions: i see socket.io does this itself with the server and client [10:25] dquestions: i guess i'll have to read up on it [10:25] dquestions: btw, has anyone created a nice load balancer (so to use socket.io without ngnix) [10:26] dquestions: (since i dont think you can use socket.io and ngnix together) [10:26] rauchg_ has joined the channel [10:28] aliem has joined the channel [10:28] jetienne: dquestions: this is quite independant of nodejs. #git channel may be more relevant and is quite helpfull [10:30] tobiassjosten has joined the channel [10:32] ph^ has joined the channel [10:35] mif86 has joined the channel [10:37] ph^_ has joined the channel [10:37] Uierth has joined the channel [10:37] AAA_awright: Anyone trying to use RDF with Nodejs? [10:41] herbySk has joined the channel [10:44] stagas: ok 1 whole day, no answer in the mailing list. I'm ripping them [10:44] dquestions: damn it i'm getting some error with redis client [10:44] dquestions: AssertionError: "testZINTER" "ERR unknown command 'zinter'" [10:44] dquestions: i'm using node v0.2.0 [10:45] dquestions: and tried diff versionf of redis [10:45] stagas: with 20 parallel clients on their unrestricted api :) 500kb/s should take a few minutes for a 1gb db [10:45] dquestions: redis by itself seems to run find [10:45] dquestions: fine * [10:47] AAA_awright: I think I'm encountering a weird scope phenomenon, or something [10:52] AAA_awright: Ah yeah, this was changing on me, I need to use a self variable >_< [10:52] stagas: so far so good I'm at 30%, they haven't noticed the load. [10:55] ooooPsss has joined the channel [10:57] kjftw has joined the channel [11:01] jashkenas has joined the channel [11:02] ooooPsss has joined the channel [11:11] zorzar_ has joined the channel [11:13] ryan[WIN] has joined the channel [11:18] nodding has joined the channel [11:20] fermion has joined the channel [11:21] nodding: hello! myproblem is how to make net listen server step by step read and write? now remote sends data, but "on" event callback fetch data after my writes. how to make it firstly parse incoming data? [11:24] stagas: nodding: ? [11:26] Nohryb has joined the channel [11:28] aheckmann has joined the channel [11:29] nodding: in my code on data event6 then writes. so while debugging i figured out that all incoming data in "on data" is parsed after all code lower (writes, etc) [11:35] s0urce has joined the channel [11:35] s0urce: hi [11:35] AAA_awright has joined the channel [11:36] s0urce: is it easy to port from ape to nodejs? [11:36] dnolen has joined the channel [11:38] AAA_awright: s0urce: It's rather easy to program with Nodejs, assuming you have any AJ experience which is probably a good assumption to make for most Nodejs users [11:38] s0urce: AJ stands for [11:38] AAA_awright: web-browser AJAX, I mean [11:38] delapouite has joined the channel [11:39] s0urce: ah ok [11:39] hassox has joined the channel [11:39] s0urce: because i got a whole project in ape, but i get often some problems wich i can't solve very clear [11:40] lachlanhardy has joined the channel [11:40] s0urce: didn't look all addons, but there must be a mysql one, i am right? [11:40] Druide__: <- looked into ape also [11:40] Druide__: but never started, cause they had no freebsd support [11:40] s0urce: i use debian, and works "ok", not very best, but if u waste 2-3 days, u get a stable version [11:42] s0urce: can any1 say something like: "you can do all u can do with ape, also with nodejs and much more" plz :) [11:43] s0urce: btw. nodejs is persistent, isn't it? [11:44] ph^ has joined the channel [11:45] d0k has joined the channel [11:52] wakawaka has joined the channel [11:53] davidc_: Ok stupid question, if I "export" a function say: exports.fn = fun(...); [11:53] ekidd has joined the channel [11:53] davidc_: can I still add methods to fun after as I would do with fun.prototype.methodname or is there another way of doing this? [11:54] stagas: davidc_: yes you can, it's not copied, it points to it [11:55] davidc_: Ah right makes sense [11:55] davidc_: Cheers [11:55] davidc_: Well in theory I could only do exports.fn = fn(param, param2); right? [11:55] davidc_: that that would require little chnage to my js [11:56] stride: s0urce: persistent? [11:56] s0urce: yeah [11:56] stagas: davidc_: it's just javascript, nothing fancy [11:57] stride: s0urce: what do you mean with persistent? [11:57] davidc_: Might stick that on a t-shirt stagas :: [11:57] stagas: :P [11:57] s0urce: what it means ;) [11:57] s0urce: is there a open listing connection for each client [11:57] s0urce: or more like php [11:59] davidc_: ah stagas I'm a bit daft at times: I was doing: var f = require('f'); var n = new fn(); instead of var n = new f.fn(); [11:59] s0urce: mb this was the wrong word... [12:00] rnewson has joined the channel [12:00] stride: the http server supports keep-alive / persistent connections if you mean that, but you could achieve that in php as well I think [12:00] ironfroggy_: OK, seriously, why are the entire docs in a single page? [12:01] ironfroggy_: Everyone knows that makes googling for something in them pointless, right? because every search has the same dang page as the top hit. [12:01] tobiassjosten has joined the channel [12:01] s0urce: in php u need to do this with a crappy cl workaround, doens't work very well, and very not for protutive server [12:01] stride: ironfroggy_: open it, ctrl-f -> profit? [12:01] ironfroggy_: stride: yeah i know that but its still annoying [12:02] ironfroggy_: i search for sometihng, get a hit and the snippet shows what i want. i click it and i'm just at the top of the docs and have to do a second search. [12:02] ironfroggy_: i mean, the web is links and all the different parts of the docs have no links to them. i cant send a link to a specific section if i want to show someone something [12:03] stride: s0urce: isn't that handled by the httpd anyway? slightly remember that apache has settings for keep-alive modes [12:03] s0urce: ironfroggy_, [12:03] s0urce: http://nodejs.org/api.html#script-98 [12:03] s0urce: like this? [12:03] stagas: ironfroggy_: split them up and contribute it. it's open source [12:04] ironfroggy_: stagas: alright then. [12:04] ironfroggy_: s0urce: yeah but then if i scroll around and find something, otu of habit I'll copy and paste the URL and it will be wrong. [12:05] s0urce: copy the url of the link on the left [12:05] s0urce: same i did [12:05] stagas: node is all about changing habits anyway :P [12:05] ironfroggy_: stagas: touche [12:05] mikeal has joined the channel [12:06] s0urce: stride, yeah, mb i described it wrong - i do a whole user object handling on server-side, but i seems like i can handle this with nodejs like i did with ape [12:08] s0urce: but can nodejs handle same amount of user, up to 100.000 [12:08] mikeal: 100k concurrent connections? [12:08] s0urce: yeah [12:08] ironfroggy_: can I get a stack trace when i catch uncaughtException? seems like logging only the error string itself isn't gonna be really helpful. [12:09] GriffenJBS: :-) that's a lot of ports [12:09] s0urce: didn't test it, but ape tells you, it should be possible :) [12:09] mikeal: last time someone did a test I think we had issues around 40K [12:09] mikeal: but those are just bugs we need to fix [12:09] mikeal: on most OS's you'll hit weird issues with that many open file handlers if you don't modify a bunch of the defaults [12:10] ironfroggy_: hey i like any project that considers "had some issues at 40K concurrent connections" an appropriate bug report to file [12:10] mikeal: i don't know, i haven't seen a respectable test yet [12:10] s0urce: should not be the problem, atm we split the levels at 100 users anyway, cause our render engine can't hanle more :) [12:11] Sembiance: :) [12:11] mikeal: someone who knows how to tune Linux or Solaris is going to need to do one [12:11] mikeal: because it's hard to seperate OS issues from node issues are that scale [12:11] s0urce: so whats a real amount of cons, nodejs can handle without probs? [12:11] mikeal: ulimit -n 8100 [12:11] mikeal: and i would say 8K would be fine without issue [12:12] s0urce: hm... this should be enough for one server i think, witch apache we have about 20k user each server, but i think u can't rly compore this [12:12] s0urce: with* [12:12] JimBastard: we require additional file handlers [12:13] s0urce: there are already any trainings? [12:13] Druide__: I'm still evaluating if i shoult use faye or socket.io [12:14] stride: we need more vespine gas. [12:14] s0urce: sc ftw :) [12:14] s0urce: stride, just get more workers :) [12:14] c4milo has joined the channel [12:16] JimBastard: my brother just told me his wife was preggorz again [12:16] JimBastard: my first response [12:16] JimBastard: "WE REQUIRE MORE OVERLORDS" [12:16] davidc_: Ah ok so btw: request.headers.contentType doesn't find out the content-type that I passed through: curl -H 'Content-Type: text/plain' [12:16] dipser: why response, there wasnt a request [12:18] JimBastard: davidc_: that doesnt make sense [12:19] davidc_: JimBastard, how so? [12:19] davidc_: Well rather what I thought too but why? [12:19] JimBastard: headers like work [12:19] JimBastard: maybe you doing it wrong [12:20] davidc_: Yeah most likely. [12:20] davidc_: I'll refine my approach and see what's wrong. [12:22] aubergine has joined the channel [12:23] sideshowcoder has joined the channel [12:30] Anti-X has joined the channel [12:31] ker2x has joined the channel [12:31] ker2x: friendly greetings ! [12:31] aheckmann has joined the channel [12:31] aheckmann has joined the channel [12:33] Anti-X: hostile greetings! [12:33] mif86 has joined the channel [12:33] JimBastard: ALL HAIL KING NEPTUNE AND HIS WATER BREATHERS [12:33] Anti-X: screw king neptune [12:34] ker2x: ACTION poke Anti-X  [12:34] Anti-X: Egyptian mythology [12:34] Anti-X: Anti, god of ferrymen [12:34] Anti-X: all hail king anti [12:36] lachlanhardy has left the channel [12:38] mw_ has joined the channel [12:40] nerdEd has joined the channel [12:43] adambeynon has joined the channel [12:48] pengwynn has joined the channel [12:52] stepheneb has joined the channel [12:53] EyePulp has joined the channel [12:54] disq has joined the channel [12:54] disq has joined the channel [12:55] ph^_ has joined the channel [12:55] ysynopsis has joined the channel [12:56] trotter has joined the channel [12:57] dmcquay has joined the channel [12:59] davidc_: JimBastard, check out if contentType actually exists in incoming headers. [12:59] davidc_: I believe one has to check using headers.accept [13:00] ph^ has joined the channel [13:00] ker2x: i have a big problem with the node_postgres module. the server where i need node_postgres don't have any compiler and do not run postgresql. so i installed node_postgres on another server [13:01] ker2x: and now i want to compile the binary to the server where there is no compiler [13:01] ker2x: err [13:01] ker2x: to install the binary* [13:01] ker2x: simply said : i compiled it on a server, want to install it on another [13:02] rnewson has joined the channel [13:03] wink_: ker2x: whats up man [13:04] agnat has joined the channel [13:06] jherdman has joined the channel [13:08] EyePulp has joined the channel [13:09] EyePulp: morning folks [13:09] ker2x: wink_: the node_postgres module is a bloody pain in the blip [13:11] ironfroggy_: am i missing what the obvious way to do a redirect is? [13:13] stride: send a 301/302 redirect header with a location entry [13:13] ceej has joined the channel [13:14] ker2x: yep [13:14] ker2x: (if you're talking about a http redirect, of course) [13:14] ker2x: http://en.wikipedia.org/wiki/HTTP_301 [13:15] ker2x: or 307 Temporary Redirect (since HTTP/1.1) [13:15] JimBastard: ironfroggy_: you mean redirect or reverse proxy? [13:16] ironfroggy_: yes i just meant a redirect. i just expected some non-manual way to do it. [13:16] ceej has joined the channel [13:16] ironfroggy_: i'm still finding my way around as far as the boundaries of what node.js handles and what i gotta do [13:17] JimBastard: i think connect has a built in re-direct [13:18] davidc_: yeah JimBastard just confirmed, request.headers.contentType doesn't exist. At least not in this version. [13:19] JimBastard: accept: 'application/json, text/javascript, */*', [13:20] davidc_: */* [13:20] davidc_: I'm passing a specific content-type in my request [13:20] davidc_: Let me try somethign else [13:20] davidc_: just had an idea [13:20] disqk has joined the channel [13:20] JimBastard: just dump req.headers [13:20] stride: huh? why are you using content-type in the request, rather the response? [13:21] davidc_: stride, I want to get the content-type sent by the client [13:21] davidc_: curl -H 'Content-Type: some/content' -v http://yaddy.com/asdf [13:21] davidc_: For instance [13:22] JimBastard: what version of node are you on davidc_ [13:22] davidc_: Let me check [13:22] davidc_: ah that'd explain it: v0.1.94-16-g615d890 [13:23] ben_alman has joined the channel [13:23] davidc_: Let me try with 2.0 [13:24] ceej_ has joined the channel [13:24] stride: in 0.2.2 it's there in the request.headers when setting it with curl [13:24] stride: but just out of curiosity: why would a client send that header? [13:25] proppy has joined the channel [13:25] shockie has joined the channel [13:26] davidc_: stride, just an experiment for restful api with node (I know of geddy and nodejitsu etc) [13:26] FuzzYspo0N: it comes in with the client? [13:26] davidc_: just trying to find a way to handle accept, content, etc. [13:27] davidc_: Mostly investigating node.js and learning as I go :) [13:27] davidc_: I already have the Accept handling. [13:28] davidsklar has joined the channel [13:28] stride: don't get it, sorry. content-type is a response header, you don't really have to handle it [13:28] davidc_: I'm playing. [13:28] stride: ok :) [13:29] davidc_: And I need to handle it on puts and posts iirc [13:29] davidc_: But yeah, playing right now :) [13:30] stride: oh, true, totally forgot about that [13:31] DoNaLd` has joined the channel [13:32] davidc_: one way or the other, I'm not receiving the contentType in 0.1.94 neither with request.headers.contentType nor request.headers['content-type'] [13:32] davidc_: which is good to know :) [13:32] davidc_: hehe homebrew just hung at make install [13:32] davidc_: boo [13:34] davidc_: And yeah stride personally I'd rather see peopel using Content-Type instead of Accept. Accept is just so... soft. Tell me what you want, not what you might accept :P [13:34] jetienne has joined the channel [13:34] Aria: Content-Type tells what they're sending, not what they accept. [13:35] hpoydar has joined the channel [13:35] Aria: But Accept tels what they want, and can be single-valued [13:36] aubergine has joined the channel [13:37] davidc_: Aria, I know and understand. Still I don't agree :) [13:37] jetienne has joined the channel [13:39] chilts has joined the channel [13:41] ehaas has joined the channel [13:43] wink_: any of the node core guys around? [13:44] wink_: i have quick question re: bindings in general [13:46] Throlkim has joined the channel [13:51] evanpro has joined the channel [13:52] stride: anybody here already set up cloud9 on a CentOS host? cloned it and used git-submodules init + update but it seems to be missing some socket.io stuff or something [13:52] ironfroggy_: wink_: you should just ask your question and if someone around can answer it, doesnt matter who they are [13:55] wink_: ironfroggy_: well this is more a philosophical question i'd just like some guidance on [13:55] wink_: but if you're up for it [13:55] wink_: basically my read event loop in my binding is too fast to be efficient, it's reading tiny chunks of data as the kernel isnt pumping the buffer fast enough [13:56] wink_: adding a small usleep(100) actually makes my reads ~50% faster [13:56] wink_: but it will delay events for other things by a little [13:56] wink_: is that acceptable? [13:56] JimBastard: wink_: i dont know, that doesnt sound right [13:57] JimBastard: wink_: i would think there is a better way to throttle [13:57] JimBastard: but i have no clue, i stay away from dragon land [13:57] wink_: JimBastard: i agree, but if i dont pause a little to let my buffer fill, i get tiny reads off the socket causing a huge performance decrease reading my data since i fire twice as many events [13:58] wink_: on a large dataset, it takes twice as long to get all my data [13:58] jetienne: wink_: you do settimeout() and not usleep [13:58] wink_: the difference in 40seconds and 1minute 20 [13:59] wink_: jetienne: settimeout in a c++ binding? [13:59] loincloth has joined the channel [13:59] jetienne: wink_: usleep is no cool as it block everybody, settimeout version cpp is cool [13:59] wink_: um, im not sure what you mean [13:59] jetienne: wink_: all event loop got timer, find the one used in this case [13:59] wink_: this is in my libev event callbacks? [13:59] ironfroggy_: but if you buffered it? [13:59] ironfroggy_: *what if [14:00] jetienne: wink_: you want to read every 100ms to read faster. ok then do it, but not with usleep, do it with async sleep [14:00] jetienne: wink_: async sleep = settimeout in js = find the same in cpp event loop [14:00] jetienne: wink_: and dont forget to remove the fd from "warn me when you got something to read" [14:01] wink_: how is that going to slow down libev from firing EV_READ on my socket fd? [14:01] jetienne: wink_: no clue [14:01] wink_: well thats the issue im contending with [14:01] jetienne: i think the issue is more usleep [14:02] wink_: there isnt an issue with it, it's that using it gives me a 100% performance increase :p [14:02] Akufen has joined the channel [14:02] Akufen has joined the channel [14:03] jetienne: wink_: if you are ok with usleep and got 100%, what is the issue ? [14:03] wink_: well i'd rather my binding not block up any other events if they exist [14:03] wink_: but if they dont, there is an enormous performance penalty without it [14:03] jetienne: wink_: hehe you come back on usleep :) [14:03] sketchup has joined the channel [14:03] ironfroggy_: anyone using cookie-node? I'm getting an unexpected behavior where req.getSecureCookie(name) is returning my value on one request, but null on another. [14:04] ironfroggy_: it is consistantly returning one or the other based on which of two URLs i hit [14:04] mikew3c has joined the channel [14:08] evanpro has joined the channel [14:09] wink_: but if they dont, there is an enormous performance penalty without it [14:09] wink_: oops [14:09] wink_: sorry [14:10] aubergine has joined the channel [14:10] nerdEd has joined the channel [14:11] ironfroggy_: nevermind, i though it defaulted to path=/ but i was wrong there [14:11] Sami_ZzZ has joined the channel [14:12] jetienne: wink_: in short, your solution is nogood in a eventio code. i think you should ask the question in node ml. with a clear definition of the problem and the possible solutions you tried. you will get an answer [14:13] paul_____ has joined the channel [14:15] backthatzachup has joined the channel [14:15] hannesw_ has joined the channel [14:21] ajsie has joined the channel [14:21] ajsie has joined the channel [14:23] papyromancer: would one of you lend me your brain to help me setup a mongoose model? I will give you a package of noodles to offer up to the spaghettin monster [14:24] zomgbie has joined the channel [14:24] hpoydar has joined the channel [14:25] ekidd: Is there any way to tell whether an output stream has pending data? I'm trying to fix a buggy library that installs an on 'drain' handler when the stream is already drained. [14:26] ekidd: Obviously, somebody should have checked the return value from 'write' much earlier, but... [14:30] trotter has joined the channel [14:31] mr_daniel has joined the channel [14:32] mr_daniel: If I understand correctly, then Nodejs implements the Reactor Pattern http://en.wikipedia.org/wiki/Reactor_pattern [14:33] mr_daniel: there is a event loop and a queue of waiting events, and the event loop on each turn removes an event from the queue, executs it, WAITS until the event finished, and then takes the next event [14:33] femtoo has joined the channel [14:34] mr_daniel: Ok, so far so good. But what if an event takes a long time to process? [14:34] mr_daniel: for example, I don't know, a 'compile event' to compile some source code, which takes about 20 mintutes to do so [14:34] LFabien has joined the channel [14:35] jetienne has joined the channel [14:35] c4milo: mr_daniel: you should use additional nodejs processes [14:35] c4milo: mr_daniel: I think there are projects whose can help you. multi-node is one of them [14:36] c4milo: s/whose/who/i [14:36] mr_daniel: first: how or what fills the event queue of Nodejs? it is that events can only be generated by other events? Or it is possible that there are 'external events generators', which can push new events? [14:36] mr_daniel: c4milo: so many node.js processes can talk to each other by filling each others event queue? [14:36] c4milo: nodejs itself manage its queue [14:36] cferris has joined the channel [14:37] c4milo: mr_daniel: good point, I think you have to use some IPC mechanism to do that [14:37] mr_daniel: c4milo: yeah, maybe, but I am not sure if nodejs is the right solution to my problem [14:38] jetienne: mr_daniel: you can pass fd from one process to another too [14:38] c4milo: what is your problem :) [14:39] zmbmartin has left the channel [14:39] AAA_awright has joined the channel [14:39] boaz has joined the channel [14:39] TheEnd2012 has joined the channel [14:40] mr_daniel: Some weeks ago I wrote a simple Python compilation script. It works like this: poll evn server every 2 minutes if new changes are available; if yes make a 'svn update', compile the source twice for 32bit and 64bit, make .zip files, upload them and publish the new version on a webpage [14:40] mr_daniel: it is a little more complicated, because some files need to be generated and uploaded etc. [14:40] davidwalsh has joined the channel [14:41] mr_daniel: the ugly part: the script is completely synchronous and I don't like this. For example: I could run the second compile process, and in the meantime upload the first generated zip file [14:41] c4milo: mr_daniel: I think nodejs also implements the proactor pattern but with IO operations [14:41] isaqual has joined the channel [14:42] mr_daniel: and that is why I search for a solution, read many pages about 'event-oriented programming', and 'event-loop', and sleect/epoll/kqueue, reactor pattern,... [14:42] jetienne: mr_daniel: do you know js... even in a browser ? [14:42] mr_daniel: but I still know where to start and I also do not know yet what I REALLY need [14:42] rcy has joined the channel [14:42] JimBastard: perhaps some whiskey will help [14:43] mr_daniel: jetienne: I would yes, last weeks I read a lot of sites about OOP in JavaScript, I also build a simple 'task scheduler' myself; I think yes, my JavaScript skills should be enough [14:43] mr_daniel: JimBastard: :) [14:43] c4milo: ahahaha [14:43] jetienne: mr_daniel: js is by definition async. nodejs can do what you want but you will have to learn nodejs [14:44] JimBastard: js is a sync language [14:44] jetienne: mr_daniel: but an easy solution would be to do a pipeline in the python script [14:44] mr_daniel: jetienne: ...which is great, but the compileation process takes a long time, can JavaScript 'handle' such big tasks [14:44] mr_daniel: ? [14:44] JimBastard: it just has callbacks [14:44] softdrink has joined the channel [14:44] q_no has joined the channel [14:44] c4milo: mr_daniel: I would use erlang to do that ahaha [14:44] mr_daniel: c4milo: :) [14:44] jetienne: mr_daniel: no problem, nodejs can run for a long time [14:44] c4milo: mr_daniel: seriously [14:44] Yuffster has joined the channel [14:45] c4milo: :) [14:45] stride: I'd use a bashscript, srsly :) [14:45] jetienne: pipeline in existing script seems easy [14:45] nefD has joined the channel [14:45] mr_daniel: stride: ...but I also want to learn something new, and this problem is a perfect reason to start some 'event-oritned' solution [14:46] GriffenJBS: mr_daniel do you understand exactly what blocking is? [14:46] jetienne: mr_daniel: ok then simply mimic the python script, the async will come naturelly [14:46] jpld has joined the channel [14:46] jpld has joined the channel [14:46] JimBastard: worst flow control ever: http://gist.github.com/601119 [14:47] JimBastard: where is cloudhead, i wanna see resourcer released [14:47] c4milo: somebody now how listen for events between nodejs process ? [14:47] JimBastard: i shouldnt he hardcoding relationships [14:47] c4milo: I think that could be a good project [14:47] gwoo has joined the channel [14:47] jetienne: c4milo: which kind of event [14:47] mr_daniel: GriffenJBS: to be honest, I am not sure [14:48] c4milo: whichever I mean, using EventEmitter [14:48] c4milo: user events [14:48] dohtem has joined the channel [14:48] stride: c4milo: you could introduce event handlers that trigger actions in another node process via DNode I guess [14:48] GriffenJBS: a long sort will hog the cpu but is not blocking, work is being done, normal disk IO is blocking, the cpu stops and starts twiddling it's thumbs waiting for the disk to complete [14:48] jetienne: c4milo: like eventemitter+rpc+eventemitter ? [14:48] c4milo: xx.on('process_this_thing', function() {}); [14:48] jetienne: c4milo: dnode got that already no M [14:48] jetienne: ? [14:48] GriffenJBS: in cpu terms blocking takes eons [14:49] GriffenJBS: node.js is trying to get rid of the idle time, so more useful work is done [14:49] c4milo: jetienne: not necesarily rpc it could be also sort of IPC mechanism [14:50] c4milo: pipes, unix sockets, etc [14:50] jetienne: c4milo: agreed. [14:50] GriffenJBS: if your process seems to stall while compiling that is ok, useful work is being done [14:50] ajpiano has joined the channel [14:50] c4milo: dnode ? [14:50] c4milo: I will take a look at it [14:50] jetienne: some rpc lib [14:51] GriffenJBS: if the UI is lagging, then the problem is the design of the program, it's a detail the work is being done, and it's correct data [14:51] mtodd has joined the channel [14:52] GriffenJBS: to keep a responsive ui/server have a parent create children, the children and keep themselves busy compiling, and run in parallel, then when the parent learns they are all done, the next serial function is started [14:53] GriffenJBS: PS if compile time is a problem, check out http://golang.org/ [14:53] jetienne: js compile faster than go :) [14:54] GriffenJBS: jetienne: depends on your needs, js sometimes isn't the right tool [14:55] jetienne: yep [14:55] jetienne: nodejs needs to get sync lib. to write sync scripts in nodejs is rapidly ugly [14:56] jetienne: but it will happen [14:56] GriffenJBS: hard to have a sync lib and keep people from using bad styles/designs [14:57] FuzzYspo0N: any know if there is an ENet wrapper at all in node? i need one but dont wanna start from scratch if someone already dived in. [14:57] jetienne: GriffenJBS: all other languages got sync libs. i guess it is possible to write [14:57] muk_mb has joined the channel [14:57] GriffenJBS: all other languages have problems we don't want, I don't recommend copying those either [14:57] GriffenJBS: getting a good sync lib is hard [14:58] xla has joined the channel [14:59] GriffenJBS: FuzzYspo0N: ENet as in the udp wrapper? [14:59] FuzzYspo0N: GriffenJBS: yep. [14:59] GriffenJBS: not that I know of, I had to google ENet, let me read up on it [15:00] FuzzYspo0N: lol, its just byte headers, message types et [15:00] FuzzYspo0N: nothing complex, i just wondered if someone wrote a server in node, that handles enet clients [15:00] FuzzYspo0N: the rest is all pretty much generics [15:00] jetienne: FuzzYspo0N: udp is available in nodejs. im not aware of any lib already implementing enet tho [15:01] FuzzYspo0N: jetienne: yea , i already have a connect challenge and response handled, but i was curious if someone knew of any others :) [15:02] FuzzYspo0N: dont wanna reinvent wheels (especially gruntwork ones ;p) [15:02] jetienne: FuzzYspo0N: out of curiousity, why do you need a enet implementation ? [15:03] GriffenJBS: actually ENet should be very easy to port [15:04] GriffenJBS: the event loop stuff is already part of node.js and several of the polling functions become useless [15:04] dnolen has joined the channel [15:04] stagas has joined the channel [15:04] FuzzYspo0N: jetienne: im writing a game platform type thingy. the entire engine and game are json/javascript :) so i wanted to use node for the server, cos its js too [15:05] FuzzYspo0N: yea GriffenJBS i did this, on udp request :var msg2 = new Buffer(msg.length); msg2[24] = 2; msg2[40] = 2; msg2[44] = 2; server.send(msg2, 0, msg2.length, rinfo.port, rinfo.address); [15:05] FuzzYspo0N: and then my client was already thinking it was validly connecting (ie it was to respond saying it wants to complete a connect transaction) [15:05] jetienne: FuzzYspo0N: nice! have fun [15:05] FuzzYspo0N: but yea, i wanted to do it cos ENet is cool as a client lib, in c++. why not make a node server for it [15:05] FuzzYspo0N: that makes the code much nicer for games anyway [15:06] FuzzYspo0N: jetienne: check it out : http://img534.imageshack.us/img534/6082/ss160.jpg [15:06] jetienne: FuzzYspo0N: you want to port their lib and bind it in nodejs ? or to reimplement it in js ? [15:06] bradleymeck has joined the channel [15:07] FuzzYspo0N: reimplement the server side only, in node [15:07] FuzzYspo0N: hey bradleymeck [15:07] bradleymeck: yo [15:07] GriffenJBS: FuzzYspo0N: go port it, I didn't see one source file that was over 100 lines [15:08] FuzzYspo0N: GriffenJBS: as i said, its not hard. Just didnt want to redo what someone has. [15:08] FuzzYspo0N: you need'nt motivate me more but thanks :D [15:08] GriffenJBS: yeah, I hear that [15:08] aurynn has joined the channel [15:08] FuzzYspo0N: n't* [15:09] FuzzYspo0N: this will rock when its up, but i want to be able to expose the server code for events on the client side [15:09] GriffenJBS: :-) so much of the code I'm looking at is unneeded, windows functions, event polling, linked list, all already handled/ignored by node [15:10] GriffenJBS: just create two constructors ENetClient() and ENetServer() [15:10] FuzzYspo0N: client for? [15:10] femtooo has joined the channel [15:11] GriffenJBS: well... I guess that changes the API a bit ... nvm [15:11] FuzzYspo0N: currently all i need for a fully functional client is : server.on("message", function (msg, rinfo) { [15:11] FuzzYspo0N: client code stays the same, and server just has the main events [15:11] FuzzYspo0N: ENET_EVENT_TYPE_CONNECT, ENET_EVENT_TYPE_RECEIVE, ENET_EVENT_TYPE_DISCONNECT [15:11] FuzzYspo0N: those 3 so far i have implemented to a point [15:11] FuzzYspo0N: receive is pretty much a catch all, so its where the server can be coded. [15:12] nsm has joined the channel [15:12] FuzzYspo0N: your custom server* [15:12] FuzzYspo0N: oh heh, thats the only 3 events. cool [15:17] dylang_ has joined the channel [15:18] ajsie_ has joined the channel [15:19] [[zz]] has joined the channel [15:20] icicled has joined the channel [15:20] icicled: anyone mess with Joose in node.js? [15:21] icicled: the meta class pieces seem to be missing, any ideas as to why? [15:21] rnewson has joined the channel [15:21] rnewson has joined the channel [15:21] jchris has joined the channel [15:22] charlenopires has joined the channel [15:23] bradleymeck: icicled joose should work fine in v8, it wont magically work on things not built by joose though all the time [15:23] ekidd: I'm trying to figure out how to specify a value for process.exit when stdout may or may not be fully drained. This is the best I've come up with, and it's pretty ugly: http://github.com/emk/vows/commit/b572514ce88cd194d686655ef4b03e8c9cf42976 [15:23] ekidd: Is there a much nicer way to do this? [15:23] ajsie has joined the channel [15:23] icicled: bradleymeck, yea the basic object system works fine, but the meta class stuff seems broke [15:24] bradleymeck: entirely? or just on built in modules etc? [15:24] JimBastard: ekidd: reading [15:25] icicled: bradleymeck, i think i know why it doesn't work [15:25] icicled: probably b/c i'm using v3 which is new [15:25] icicled: installed from npm [15:25] icicled: i'm gonna grab v2 from googlecode & report back [15:25] sonnym has joined the channel [15:25] JimBastard: ekidd: whats the point of that patch? why should you end if a vow fails [15:26] JimBastard: ahh i see [15:26] JimBastard: i think there is a better way to do it [15:26] wink_: bradleymeck: my event loop is executing too fast causing pretty huge performance degredation on large reads, what is the accepted practice to counteract this? basically my read is firing on my socket fd properly, but if i dont have it usleep the read ends up being tiny and causes at least 2x as many read events. on a large read, without the usleep it takes twice as long to read the entire buffer [15:26] JimBastard: maybe add a new word to vows [15:27] ekidd: JimBastard: This is called when the 'vows' command is ready to exit. [15:27] wink_: i could theoretically tune the sleep out if i had a way to peek into libev to find how many other pending events exist since if there are lots of others, it should end up waiting long enough to fill the buffer a little more [15:27] ekidd: It has run all the tests at this point, and just needs to return an exit status to the shell. [15:27] bradleymeck: wink_ can the read lengths be determined before you emit any events? [15:28] ph^ has joined the channel [15:28] icicled: bradleymeck, yep that was the problem, i guess meta class isn't in v3 just yet [15:28] ekidd: JimBastard: It apparently can't call 'process.exit(1)', because stdout might not yet be drained. But it can't just install a drain handler, because stdout _might_ be drained. [15:28] wink_: bradleymeck: yes, except my read is non blocking so its just going to get what it can, i suppose i could spinlock around the read until it got all the data it wanted but that seems just as bad as usleep(100) [15:28] scoates has left the channel [15:28] ekidd: JimBastard: So if you call 'vows' from a Makefile, it always returns 0 (indicating that everything is fine), even if half the tests are failing. [15:29] ajsie: im starting to like javascript =) [15:29] bradleymeck: mmmmm [15:30] ajsie: a miracle =) [15:30] c4milo1 has joined the channel [15:30] kevwil has joined the channel [15:30] c4milo2 has joined the channel [15:30] wink_: i wouldnt worry about it much except it's a huuuge difference. doing all the reads on 42000 mongo documents without a usleep takes 1 minute 22 seconds. add a small usleep(100) and it only takes 40 seconds [15:30] ekidd: Does anybody else know a nice way to set the value returned by 'process.exit' even if there's still some process.stdout.write data pending? [15:30] bradleymeck: wink_ you are going to have to buffer the input somehow if you dont want to emit so many events, so idk, can you force mongo to only send things of a chunk size? [15:31] wink_: its not me emitting the events, it's libev emitting the events into my code [15:31] wink_: when i wire up the socket fd with EV_READ, im getting the event the second a single byte is available [15:31] bradleymeck: ew [15:32] bradleymeck: might have to wait then, unless the libev ppl can suggest something [15:32] JimBastard: ekidd: hrmmm interesting [15:32] wink_: yeah, i just imagined im surely not the first to encounter this, any socket based binding can have this issue [15:32] wink_: since the event fires at byte 1, by the time my read executes, i have maybe 1k in the buffer to be read, i read it and return [15:33] wink_: only to get another event instantly [15:33] wink_: the overhead bouncing in and out is enormous on any large amount of data [15:33] hsuh has joined the channel [15:33] bradleymeck: ryah, how did you deal with sockets ^ [15:34] stride: mape: is nodejs.se broken? there are only two tweets on it that were published 8 hours ago [15:34] mape: stride: yeah it is being wonky, for some reason it just stops working after a while with no error [15:35] stride: oh, ok [15:37] wink_: bradleymeck: i glanced at the node source to see if there was a trick i was missing, but i dont think there is [15:37] gerred has joined the channel [15:38] wink_: socket performance when node is lightly loaded is likely going to be miserable compared to what it could be unless random v8 overhead in the socket binding is causing enough of a delay for the kernel to get more data for the fd [15:38] jakehow has joined the channel [15:41] sudoer has joined the channel [15:41] dohtem has joined the channel [15:41] dohtem has joined the channel [15:41] wink_: i'll hit ryah up when he gets around :) [15:44] aubergine has joined the channel [15:46] bradleymeck: anyone got an idea for how websockets could enhance a wiki? [15:46] JimBastard: why are child processes not dying when i kill the parent [15:47] proppy: bradleymeck: live edit ala etherpad ? [15:47] wink_: bradleymeck: real time edit updates on a busy wiki could be cool [15:47] bradleymeck: could be chaos though too though, would be more fluff than anything mmm [15:49] proppy: bradleymeck: live recent changes, like an airport ticker ? [15:49] bradleymeck: mmm a live ticker would be cool [15:50] wink_: show a list of users currently on that article and be able to access their revision(s) [15:50] matjas has joined the channel [15:51] keturn has left the channel [15:51] dohtem has joined the channel [15:51] dohtem has joined the channel [15:52] proppy: currently connected user list and their current article would be cool too [15:52] steadicat has joined the channel [15:53] stepheneb has joined the channel [15:56] Egbert9e9 has joined the channel [15:58] nefD: http://tinyurl.com/2bjr83r [15:59] silentrob has joined the channel [16:01] sebastianha has joined the channel [16:01] robotarmy has joined the channel [16:01] mbrochh has joined the channel [16:01] mbrochh has joined the channel [16:01] stephank has joined the channel [16:02] galaxywatcher_ has joined the channel [16:02] sebastianha: hi, I wrote a little http server with note just responding a string. When I access with my browser everything works fine. When I access with my palm pre using prototype ajax.request it returns with success but an empty string. The server does not recognize the request. anyone an idea? [16:03] stagas has joined the channel [16:03] mikeal has joined the channel [16:05] bradleymeck: sebastianha did you set content-type and content-length? [16:05] sebastianha: type is text/html [16:06] sebastianha: what should length be? [16:06] bradleymeck: the length of the http body [16:07] sebastianha: mmh, that's not good because I would like to keep the connection open with unknown length [16:09] bradleymeck: then you can do so but ajax.request might need it to be flushed somehow idk , have you tried adding a \n [16:10] sebastianha: even when I set content length it does not work [16:11] sebastianha: the request is not even recognized by the node http server [16:12] cferris: noob js question: what exactly is the comma here doing [16:12] cferris: return arguments.callee.dom.forEach(_), arguments.callee [16:14] jchris has joined the channel [16:14] jchris has joined the channel [16:14] bradleymeck: cferris it shouldt do anything really im surprised that even works honestly cause i didnt think return could accept a list of expressions [16:14] sonnym: cferris: node> (function() { return 1, 2 }()); [16:14] sonnym: 2 [16:15] bradleymeck: well thats odd, good to know [16:15] cferris: weird stuff... [16:15] cferris: so is the forEach even getting called? [16:15] matjas has joined the channel [16:16] bradleymeck: v8: (function() { var x=1return x++, x }()) [16:16] v8bot: bradleymeck: SyntaxError: Unexpected token ILLEGAL [16:16] bradleymeck: v8: (function() { var x=1;return x++, x }())//woops [16:16] v8bot: bradleymeck: 2 [16:16] sonnym: yes [16:16] benburkert has joined the channel [16:16] sonnym: node> (function() { return (function() { console.log("test") }()), 2 }()); [16:16] sonnym: test [16:16] sonnym: 2 [16:16] deepthawtz has joined the channel [16:16] sonnym: so what it's doing is calling a function on each of those items, then returning the second item in the list. [16:17] cferris: ok so same thing as just calling the forEach then returning arguments.callee [16:17] cferris: right. thx [16:17] matt_c has joined the channel [16:17] sonnym: no problem [16:19] sebastianha: When I do this: [16:19] sebastianha: http.createServer(function (req, res) { console.log('Client connecting');}).listen(8124); [16:19] sebastianha: I get no response at the node server when connecting via ajax request. normal browser works [16:19] nerdEd has joined the channel [16:20] sebastianha: but I get a success from the ajax request with no content [16:20] stride: sebastianha: .end()? [16:21] sebastianha: stride: I know it is just the simplest example I could find [16:21] stagas: sebastianha: do you connect to port 8124 in the ajax request? [16:21] sebastianha: yes [16:21] sebastianha: http://url:8124 [16:21] qFox has joined the channel [16:21] sebastianha: when I change the port I do not get a success [16:21] sebastianha: I tested with wireshark [16:21] benreesman has joined the channel [16:21] sebastianha: request is been sent [16:22] sebastianha: but no answer [16:23] sebastianha: really strange [16:23] benreesman: anyone know if any of the express-compatible (ejs, etc.) template libraries can be made to work in the client? my goal is to use the same templates in both the client and the server. [16:25] stephenjudkins has joined the channel [16:25] jpld has joined the channel [16:26] tmpvar has joined the channel [16:28] banjiewen has joined the channel [16:28] mjr_: benreesman: I haven't used any myself, but I think mustache.js has this goal: http://github.com/janl/mustache.js/ [16:28] codelotus has joined the channel [16:28] sprout has joined the channel [16:29] benreesman: mjr_: awesome i'll look into it [16:29] benreesman: it seems like such a no-brainer thing to do [16:29] benreesman: clearly soy is an option but that looks like it needs a hacksaw to be made to work [16:30] mjr_: If I wanted to do templating, I'd start with mustache and then see what happens. [16:30] TheEmpath has joined the channel [16:30] mjr_: time to go to work [16:31] sebastianha: mmh, seems to be a http server problem, when I open a net.Server at least the connection is established [16:31] sebastianha: strange [16:34] benreesman: thanks matt [16:35] stride: sebastianha: can you share more of your http server code? [16:36] hannesw_ has joined the channel [16:36] benreesman: what's the preferred node library for accessing mysql? [16:38] sebastianha: it's not more [16:38] sebastianha: I just began to test [16:38] sebastianha: I will paste it to pastebin [16:38] sebastianha: http://pastebin.com/rTXZpxsQ [16:38] stride: benreesman: node-mysql (pure node implementation by felixge) or node-mysql-libmysqlclient (libmysql wrapper) I think [16:38] sebastianha: that's all [16:38] sebastianha: browser works fine [16:39] benreesman: cool thanks [16:39] sebastianha: with prototype ajax request I get a success with null as parameter [16:39] stride: hm, yeah, that part looks fine - maybe some crossdomain privilege issue because of the different port? [16:40] sebastianha: no, should not be [16:40] sebastianha: but I will try to try [16:43] sebastianha: mmh, no [16:43] banjiewen has left the channel [16:44] saikat has joined the channel [16:45] admc_ has joined the channel [16:45] stride: hm, don't have any other ideas right now, sorry [16:45] admc has joined the channel [16:45] sebastianha: thank you very much, anyway [16:45] sebastianha: I will try to figure it out with wireshark - the hard way :) [16:48] benv has joined the channel [16:49] marshall_law has joined the channel [16:51] Anti-X: http://stackoverflow.com/questions/3814208/is-there-a-general-mechanism-to-timeout-events-in-node-js [16:52] Anti-X: a fairly good question [16:52] sebastianha has joined the channel [16:53] isaacs has joined the channel [16:56] trotter has joined the channel [16:56] adambeynon has joined the channel [16:56] isaacs: AAA_awright: hey [16:57] bpot has joined the channel [16:57] isaacs: AAA_awright: how good could npm be designed? (serious question, i <3 feedback.) [16:57] sebastianha: mmh, stride? It seems that the http of node.js does not like the line "X-$PrototypeBI-Version: 1.6.0.3" of the request [16:58] banjiewen has joined the channel [16:58] sebastianha: it's the $ which causes the disconnect [16:58] sebastianha: "X-PrototypeBI-Version: 1.6.0.3" works [17:00] LionMadeOfLions has joined the channel [17:01] cloudhead has joined the channel [17:02] dgathright has joined the channel [17:04] stride: sebastianha: oh, congratulations on finding that [17:05] MikhX has joined the channel [17:06] galaxywatcher has joined the channel [17:06] stride: strange issue though, I don't really see why that character would break something, at least in the JS part of node's code [17:06] sebastianha: is there an official bugtracker? [17:07] stride: the issue section on github [17:07] sebastianha: it does not break anything, server is running fine [17:07] sebastianha: it just disconnects me [17:07] blowery: sebastianha: see http://www.faqs.org/rfcs/rfc2822.html sec 2.2 [17:08] vnguyen has joined the channel [17:08] blowery: if you want to quote specs in your bug report [17:09] sebastianha: I am not an expert in this [17:09] sebastianha: but I will take a look at this [17:09] slaskis_ has joined the channel [17:09] blowery: it just says that header field names have to be from ascii 33 to ascii 126 [17:09] sebastianha: ah, ok [17:09] blowery: so $ (ascii 36) is valid [17:09] sebastianha: good to know [17:10] sebastianha: so it is not a bug by prototype [17:10] aurynn: Is there a job board yet? :) [17:11] blowery: sebastianha: dunno, but it looks like prototype is trying to do variable replacement in that string. that's the usual case for $someName in a string. [17:11] blowery: sebastianha: so i'd poke a bit more and see if something is missing on the prototype end [17:11] sebastianha: mmh, until now every request was fine [17:11] ivong has joined the channel [17:12] sebastianha: and when I send X-$ with telnet node disconnects me [17:12] sebastianha: that should not happen [17:12] mjr_ has joined the channel [17:12] c4milo has joined the channel [17:13] benburkert has joined the channel [17:13] sebastianha: it does only accept a few non alphabetic characters [17:14] sebastianha: "_" does work [17:14] sebastianha: "[" not [17:14] aliem has joined the channel [17:15] mr_daniel: I have a problem which includes some tasks which can be executed in parallel. I made an image describing the (possible) execution flow: http://img843.imageshack.us/img843/81/executionflow.png [17:16] noahcampbell has joined the channel [17:16] mr_daniel: it includes cpu heavy operations which take 2 minutes (L) or even 20 minutes (H) [17:16] mr_daniel: also network I/O is used (N) [17:16] mr_daniel: various concepts are used, like executiong code in parallel (A) or make different tasks depending on result (B1+B2) [17:16] blowery: sorry, it's actually in rfc2616 [17:16] mjr_: mr_daniel: I suggest using web workers. [17:16] mr_daniel: my question: is it a good idea to use Nodejs and event-oriented programming to implement such execution flow? [17:16] V1 has joined the channel [17:16] chetan51 has joined the channel [17:17] blowery: sebastianha: in rfc2616, look for token = on page 16 [17:17] FuzzYspo0N has left the channel [17:17] blowery: http://www.ietf.org/rfc/rfc2616.txt [17:17] blowery: it's actually more restrictive than 822 [17:17] mr_daniel: or should I use another concepts for concurrent programmin? [17:17] amerine has joined the channel [17:17] jetienne has joined the channel [17:17] Nietecht has joined the channel [17:18] chetan51: Hi, I have a question about Geddy (geddyjs.com). Can I use Mustache for templating instead of EJS? And can I use Mongodb with Geddy? [17:18] amerine has joined the channel [17:18] mr_daniel: mjr_: '...Node will be able to fork new processes (using the Web Workers API )...' http://nodejs.org/, seems like the feature is not available yet [17:19] mjr_: mr_daniel: yeah, it's in a module [17:19] amerine has joined the channel [17:20] mjr_: http://github.com/pgriess/node-webworker [17:20] mjr_: mr_daniel: it seems like that module is made for your use case. [17:20] amerine has joined the channel [17:21] jetienne: yahoo did something on top of webworker... [17:21] sebastianha: blowery: so is "$" allowed in 2616? [17:21] sebastianha: or not [17:21] isaacs: jetienne: pgriess works at yahoo [17:21] sebastianha: and what does node use for its implementation [17:21] jetienne: http://developer.yahoo.net/blog/archives/2010/07/multicore_http_server_with_nodejs.html <- webworker + fd passing [17:21] blowery: sebastianha: allowed [17:21] jetienne: isaacs: ok [17:21] isaacs: jetienne: yeah, that article was written by pgriess :) [17:22] sebastianha: just for my information: where do you read this? [17:22] jetienne: isaacs: quite authoritative then :) [17:22] blowery: sebastianha: http header is field-name:field-value [17:22] blowery: field-name is token [17:22] blowery: token is 1* [17:23] blowery: CTLS and separators do not include $ [17:23] huyhong has joined the channel [17:23] isaacs: sebastianha: implementation: http://github.com/ry/node/blob/master/deps/http_parser/http_parser.c [17:23] silentrob has joined the channel [17:23] mikew3c_ has joined the channel [17:24] chetan51: Anyone? [17:25] JimBastard: chetan51: ask the geddy guys [17:25] JimBastard: mde: [17:25] chetan51: JimBastard: Where can I find them? [17:25] JimBastard: ^^ [17:26] stride: blowery: ahh, I only found #822.. thanks for clearing that up :) [17:26] sebastianha: Ok, I will file a bug report on this later [17:26] sebastianha: have to go now [17:26] sebastianha: thank you very much [17:27] huyhong has left the channel [17:27] mr_daniel: Is it only a coincidence that there are two WebWorker APIs availbale for Nodejs? http://github.com/cramforce/node-worker http://github.com/pgriess/node-webworker [17:28] mjr_: two of something is usually better for everybody, no? [17:28] stride: btw, where's _announcer gone? [17:28] bradleymeck: mr_daniel you mean implementations? [17:28] sprout has joined the channel [17:29] chetan51: mde: Hi, I have a question about Geddy (geddyjs.com). Can I use Mustache for templating instead of EJS? And can I use Mongodb with Geddy? [17:30] mr_daniel: bradleymeck: yes [17:30] bradleymeck: its coincidence, multiple people creating implementations to their needs [17:31] mr_daniel: I am not sure, but it seems like that both projects have the same goal: to provide web workers (multiple 'threads') [17:31] V1: >_< connect sucks >_<.. For some obsecure reason, it starts using the static content provider for all routes.. o_O [17:32] bradleymeck: mr_daniel yes but there are generally multiple implementations of things that are new at any given time, for example proxies, http proxies, url routers, etc. [17:34] ngw has joined the channel [17:34] scnd has joined the channel [17:35] sprout has joined the channel [17:36] nikolaiwarner has joined the channel [17:40] tav has joined the channel [17:40] jpld: might anyone have a suggestion how i could purposely constrain the transfer rate out of a local node server? [17:41] jpld: i'd like to simulate network-like conditions locally [17:42] jacobolus has joined the channel [17:43] MikhX_ has joined the channel [17:46] nsm has left the channel [17:48] dpritchett has joined the channel [17:51] technoweenie has joined the channel [17:55] [[zz]] has joined the channel [17:55] zomgbie has joined the channel [17:56] dgathright has joined the channel [17:57] matt_c_ has joined the channel [17:58] mjr_ has joined the channel [18:00] stephenjudkins has joined the channel [18:00] c4milo1 has joined the channel [18:01] zomgbie has joined the channel [18:03] dgathright has joined the channel [18:04] Nohryb: v8 null [18:04] v8bot: Nohryb: v8 is no longer supported. Try v8: or v8> [18:04] MikhX has joined the channel [18:04] Nohryb: v8: null [18:04] v8bot: Nohryb: null [18:05] Nohryb: v8: Error("") [18:05] halfhalo: v8: makeMeASamich [18:05] v8bot: halfhalo: ReferenceError: makeMeASamich is not defined [18:05] halfhalo: Awwww [18:05] v8bot: Nohryb: at Stream.emit (events:26:26) [18:05] v8bot: Nohryb: at Stream.emit (events:26:26) [18:05] v8bot: Nohryb: at Stream.emit (events:26:26) [18:05] v8bot: Nohryb: at Stream.emit (events:26:26) [18:05] v8bot: Nohryb: at Stream.emit (events:26:26) [18:05] v8bot: Nohryb: [Output truncated...] [18:05] Nohryb: :-)))) [18:06] shockie has joined the channel [18:06] blowery: v8: quit() [18:06] v8bot: blowery: ReferenceError: quit is not defined [18:06] halfhalo: ACTION is playing with jefe and irc bot [18:07] blowery: v8: Object.prototype.toString = function() { return "awesome"; } {}.toString(); [18:07] v8bot: blowery: SyntaxError: Unexpected token { [18:07] blowery: v8: Object.prototype.toString = function() { return "awesome"; }; {}.toString(); [18:07] v8bot: blowery: SyntaxError: Unexpected token . [18:08] blowery: v8: Object.prototype.toString = function() { return "awesome"; }; var f = {}; f.toString(); [18:08] v8bot: blowery: "awesome" [18:08] blowery: v8: var f = {}; f.toString(); [18:08] v8bot: blowery: "[object Object]" [18:08] halfhalo: object smobject [18:09] mjr_: I think v8bot spawns a new child process for every request. [18:09] blowery: i was hoping so [18:09] halfhalo: Now, the question is whether I feel its smart to automatically create mongoose models based on files in a folder, or actually have to have them be defined... [18:09] blowery: just checking :) [18:10] halfhalo: IE loading User.js would result in a User model [18:10] Nohryb: v8: a=27 [18:10] v8bot: Nohryb: 27 [18:10] Nohryb: v8: a [18:10] v8bot: Nohryb: ReferenceError: a is not defined [18:11] Nohryb: short term memory problems... [18:11] halfhalo: Just like me! [18:11] slaskis has joined the channel [18:12] halfhalo: Although with mongoose it lets me more specific user params... [18:15] Nohryb: v8: Error.prototype.toString=function(){return "Resistance is futile"}; Error() [18:15] v8bot: Nohryb: at Stream.emit (events:26:26) [18:15] v8bot: Nohryb: at Stream.emit (events:26:26) [18:15] v8bot: Nohryb: at Stream.emit (events:26:26) [18:16] v8bot: Nohryb: at Stream.emit (events:26:26) [18:16] halfhalo: Ruh roh... [18:16] v8bot: Nohryb: at Stream.emit (events:26:26) [18:16] v8bot: Nohryb: [Output truncated...] [18:16] bradleymeck: mmm [18:20] c4milo has joined the channel [18:22] mif86 has joined the channel [18:23] tilgovi has joined the channel [18:25] mpoz2 has joined the channel [18:26] aubergine has joined the channel [18:28] pedrobelo has joined the channel [18:29] isaacs: Hey, whose got the best HTTP chops in the house? i got an odd question, and google is failing me. [18:29] isaacs: How to do Basic: authentication, through a proxy server, which also requires Basic auth itself. [18:29] isaacs: like, how do you tellthe proxy, "This auth is for you, and this other auth is for the server you're requesting to" [18:30] deepthawt has joined the channel [18:30] isaacs: just put the forward auth in the request url like GET http://username:password@host.com/path? [18:30] twoism has joined the channel [18:30] jakehow has joined the channel [18:32] isaacs: aha, looks like Proxy-Authorization: Basic: base64(username:password) is what I want for the proxy auth [18:32] stride: that or multiple challenges i guess [18:33] stride: meh, nvm that, misunderstood rfc 2617 there, proxy-auth seems to be it [18:37] streampunk has joined the channel [18:40] benreesman: isaacs: don't think this is npm's fault but you might be interested: http://gist.github.com/601521 [18:40] disqk has joined the channel [18:41] mjr_: benreesman: I think that's an issue for felixge, who doesn't hang out in IRC much anymore. [18:41] isaacs: benreesman: yeah, looks like a bug in the wscript [18:41] mjr_: Probably best to send email/gh message. [18:41] benreesman: cool [18:41] benreesman: any pointers on where to begin if i just want to hack it myself? [18:42] isaacs: benreesman: it looks like it's failing to find libmysql -- not mysql itself, but the C headers. [18:42] benreesman: it can't find the dylib [18:42] benreesman: though mysql_config is meant to give it that [18:42] pedrobelo has joined the channel [18:42] isaacs: benreesman: i don't think so, but i'm not really sure [18:43] benreesman: i'm still trying to find a good reference/explanation of how dynamic library paths etc work on os x [18:43] benreesman: isaacs: npm is the shit by the way [18:43] zomgbie has joined the channel [18:43] isaacs: benreesman: thanks :) [18:43] benreesman: brb [18:44] rnewson has joined the channel [18:44] bradleymeck: with connect-auth how am i supposed to give the twitter PIN mmm [18:47] Druide__ has joined the channel [18:47] mjr_: benreesman: for this particular case, you can checkout the git repo, then do: node-waf configure [18:47] saikat has joined the channel [18:50] wink_: ryah: are you around by chance? [18:51] deepthawtz has joined the channel [18:52] langworthy has joined the channel [18:55] Neura has joined the channel [18:56] JimBastard: brb _frankie [18:56] jetienne has joined the channel [18:56] bartt has joined the channel [18:58] TheEmpath: chromeo! [18:59] ikato has joined the channel [18:59] mikeal has joined the channel [18:59] rnewson: mikeal: will your http.js fix be in a release earlier than 0.3.0? [19:00] mikeal: yes [19:00] mikeal: it'll be in the next 0.2.x release [19:00] rnewson: nice [19:02] benreesman: mjr_: also fails :( i think that library just isn't meant to work on os x [19:02] mjr_: I'd expect it to fail, but that's teh command that npm is running. [19:02] ironyboy has joined the channel [19:02] mjr_: So if you want, you can change the wscript file, then re-run node-waf configure to see if it works. [19:03] ironyboy: Hello, is anyone able to help out with the following question on the mailing list? : http://groups.google.com/group/nodejs/browse_thread/thread/b245e63fe7b3ba8f [19:04] TobiasFar has joined the channel [19:05] kriszyp has joined the channel [19:05] streampu_ has joined the channel [19:07] ajsie has joined the channel [19:08] aubergine has joined the channel [19:08] norviller has joined the channel [19:09] dquestions: what are you guys using for css? blueprint? [19:10] isaacs: dquestions: i use TextMate for css [19:10] Anti-X: * { /* reset everything here */ } [19:10] Anti-X: :P [19:10] isaacs: dquestions: but i hear vim is nice, too [19:10] Anti-X: blueprint is a default reset stylesheet isn't it? [19:10] Anti-X: not an editor [19:10] bradleymeck: i use the tears of children as ink for writing css [19:11] chuhnk has joined the channel [19:11] bradleymeck: but yea, just a text editor and less [19:16] isaacs: Anti-X: yeah, i'm being a jackass. (sorry dquestions, it's a worthwhile question.) [19:16] dquestions: ok nvm about the css stuff then [19:17] isaacs: dquestions: i do use the yui reset.css sometimes. [19:17] dquestions: actual important question.. what to use for preventing xss, etc [19:17] dquestions: anything like in ruby? [19:17] isaacs: dquestions: never ever output unsanitized user input. [19:17] isaacs: dquestions: more a practice than a tool, i guess [19:17] dquestions: right [19:18] dquestions: but i mean.. implementing my own function to clean data output seems like a bad idea [19:18] isaacs: dquestions: it's pretty easy to do something like php's striptags or htmlspecialchars [19:19] matt_c: I would think that sass+compass could work well with a node project. [19:19] dquestions: so nothing like rails h fxn? [19:19] matt_c: dquestions: sorry, I was answering your first question. [19:20] dquestions: no problem , i figured that [19:20] dquestions: i looked up compass.. first stuff that came up was the gem version [19:20] bradleymeck: dquestions no, sanitize input as appropriate is the way to go for now [19:20] isaacs: dquestions: str.replace(/&/g, '&').replace(//g, '>') stops about 99% of xss [19:20] emmanueloga has joined the channel [19:20] dquestions: i figure someone must be porting it to node soon [19:20] isaacs: dquestions: i think you know what you need to do!! [19:20] isaacs: dquestions: it'd be a handy module, for sure. [19:20] dquestions: ;P [19:21] ironyboy: anyone able to help? been battling with that one for a few days now... [19:21] norviller has joined the channel [19:21] isaacs: dquestions: it gets dicy when you say "i want to let people use html, but not 'bad' html" [19:21] isaacs: dquestions: then you get into a mess. [19:21] dquestions: yes of course [19:22] dquestions: i guesss i would just opt for markup but some ppl dont like that [19:22] kevwil has joined the channel [19:23] matt_c: ACTION wonders out loud if node-discount has a safe mode. [19:25] norviller has joined the channel [19:25] skampler has joined the channel [19:27] bartt: I'm looking to use nginx to serve up static content and as a reverse proxy to node.js. Has anyone experience doing this? [19:27] themiddleman has joined the channel [19:27] Anti-X: http://www.shinstudio.com/blog/backend-tech/setting-up-node-js-in-nginx/ [19:27] stepheneb_ has joined the channel [19:28] bartt: I'd like nginx to handle SSL connections and proxy secure connections to node.js with a custom header to indicate secure connections. [19:28] bartt: Thanks Anti-X [19:28] isaacs: bartt: you should be aware that node's ssl is a bit wonky atm. [19:28] isaacs: bartt: you may want to have nginx connect to node without ssl [19:29] bartt: isaacs: That's why I want to offload SSL to nginx. [19:29] isaacs: kewl [19:29] Anti-X: wonky yourself [19:29] isaacs: Anti-X: i would, but i'm at work. [19:29] mjr_: how does nginx do ssl right, but node doesn't? [19:29] Anti-X: lol [19:29] mjr_: Doesn't nginx use openssl? [19:29] isaacs: mjr_: not sure. [19:29] isaacs: mjr_: i've run into issues with nginx's ssl as well. [19:29] isaacs: but less so [19:30] matt_c has joined the channel [19:30] mjr_: I've run into issues with python's openssl also. Why must this suck so badly? [19:30] isaacs: uploading large files to either kinda breaks, evne using curl (and curl is like a machine made of rock solid iron and win) [19:30] isaacs: mjr_: remember how awesome gnutls was? [19:30] isaacs: mjr_: like, it just worked so good. [19:30] bartt: Just add X-SSL header to a plain HTTP request from nginx to node.js for incoming SSL requests to nginx. [19:30] Anti-X: isaacs, did you see this scenario? http://stackoverflow.com/questions/3814208/is-there-a-general-mechanism-to-timeout-events-in-node-js [19:30] Anti-X: not sure if it's your area [19:31] Anti-X: but is it something to consider? [19:31] mjr_: isaacs: the issue with gnutls is GPL sucks? [19:31] isaacs: mjr_: sure, but it's LGPL, isn't it? can't we like, use it if it's there, and don't if it isn't? [19:31] isaacs: (suppose i should ask my employer) [19:32] Anti-X: the issue with gnu* is that it starts with gnu [19:32] tmpvar: isaacs, you are at joyent now, right? [19:32] isaacs: yeah [19:32] tmpvar: hows that going? [19:32] creationix has joined the channel [19:32] isaacs: tmpvar: *awesome.* [19:32] isaacs: awesome to the max. [19:32] tmpvar: nice [19:33] tmpvar: do you guys have any dev positions open? [19:33] dilvie has joined the channel [19:33] stepheneb has joined the channel [19:36] Anti-X: http://www.joyent.com/contact/jobs/ [19:36] Anti-X: :P [19:37] tmpvar: Anti-X, doh, thanks [19:38] Anti-X: oddly it is under contact [19:41] ironyboy: I'm having trouble exiting / closing gracefully a HTTP call I make after a "Error: ECONNRESET, Connection reset by peer" error. Any offers? [19:41] jhoweb has joined the channel [19:42] ekidd: cloudhead: I'm trying to integrate vows support into a testing plugin for CoffeeScript/Barista, and I'm hitting a few problems with the vows executable. [19:43] ekidd: cloudhead: I'd be happy to submit some patches if you're interested. :-) [19:43] zith_: some projects really have obscure names [19:43] zith_: barista? [19:43] zith_: someone.. coding.. and serving.. coffeescript? [19:43] themiddleman has joined the channel [19:44] bradleymeck: joyent would be amazing if i could move and if the wanted me lol [19:45] ekidd: zith_: It's a plugin for using CoffeeScript with Rails. Pretty straightforward, really. It's by soto. [19:45] ekidd: I'm trying to add test support. [19:47] norviller has joined the channel [19:48] creationix: bradleymeck: be gave a talk about Proxies at jsconf, it was great [19:48] bradleymeck: ooo [19:48] bradleymeck: multiple inheritance brought up? [19:49] themiddleman has joined the channel [19:50] creationix: not really [19:50] figital has joined the channel [19:50] creationix: he did mention multiple layers of stratification using proxies as the definitions for other proxies [19:51] creationix: really mindbending for most the people there [19:51] pquerna: ProxyProxyProxy for your FactoryFactoryFactory. [19:51] creationix: and FF4 ships with proxies [19:51] creationix: he wants to get us to switch to spidermonkey for node [19:52] bradleymeck: spidermonkey api = evil [19:52] creationix: bradleymeck: he said he's even provide a V8-like api to make it easier [19:52] bradleymeck: ive tried going and making stuff for it multiple times [19:52] bradleymeck: mmmm [19:53] bradleymeck: i wouldnt be against it [19:53] bradleymeck: if we could disable the yield statement [19:53] creationix: nah, he really likes yeild [19:53] creationix: one of his favorite parts [19:54] creationix: I got to meet erik corry too (V8 guy) [19:54] bradleymeck: yield causes a ton of problems though with events and closures :( [19:54] creationix: A microsoft guy wanted to have a node port using Chakra [19:54] creationix: (the IE9 engine) [19:54] bradleymeck: well not a ton, but enough for me to dislike it [19:55] themiddleman has joined the channel [19:55] bradleymeck: chakra is interesting for being able to share functions across things, now that I would want [19:55] creationix: bradleymeck: though I finally understand the true power of proxies [19:55] bradleymeck: yea, they are nice :) but dont abuse them [19:55] creationix: if that ever gets in the spec and is implemented by everyone, the world of js will never be the same again [19:55] creationix: people will abuse them [19:55] creationix: that's not a question [19:56] bradleymeck: well people will, but im hoping hot code wont [19:56] creationix: yeah, node code should be fine [19:56] bradleymeck: as end points thats fine [19:56] creationix: the ruby guys only have method missing and meta classes and look what they did [19:56] hassox has joined the channel [19:57] creationix: imagine that kind of "creativity" with js and proxies [19:57] bradleymeck: i mainly just use em for 3 things : readonly objects, mutliple inheritance, morphing objects (idk the term, but they hurt my brain enough when i need a single ref to refer to multiple things) [19:58] bradleymeck: what i want is for collectors to get in but i know mark would never allow that [19:58] abiraja has joined the channel [19:58] bradleymeck: ACTION prays to the JS engine gods for a job on one of them [19:59] programble has joined the channel [19:59] programble has joined the channel [19:59] zith_: bradleymeck: share functions across "things"? [20:00] bradleymeck: they share them across cores so im sure it could be done across processes [20:00] themiddleman_ has joined the channel [20:01] zith_: i see [20:03] themiddleman has joined the channel [20:04] MikhX_ has joined the channel [20:06] twoism has joined the channel [20:14] hassox has joined the channel [20:15] sveisvei has joined the channel [20:17] rwaldron has joined the channel [20:18] tyfighter has joined the channel [20:21] bbrriiaann has joined the channel [20:21] slaskis has joined the channel [20:21] bbrriiaann has left the channel [20:21] mattly has joined the channel [20:25] trave has joined the channel [20:25] danielqo has joined the channel [20:26] kjeldahl has joined the channel [20:26] trave: I want to get into unit testing my primarily jquery based code, what javascript unit testing frameworks have you guys used? Is qunit good? [20:28] isaacs: trave: i've used it. it works well. [20:28] isaacs: trave: got plenty of documentation, plays pretty nice with jstestdriver [20:28] trave: cool, any tips on pushing myself over the headscratching phase or helpful links on the topic? [20:29] trave: I just need to dive in with qunit, using their tests as examples, and start writing some! [20:30] trave: im just getting to the point where console.log analyzing everything as i work is slowing me down [20:30] trave: i need to take a step back and verify my processes [20:33] hassox has joined the channel [20:33] sveisvei has joined the channel [20:38] sideshowcoder has joined the channel [20:41] ryan[WIN] has joined the channel [20:45] ceej has joined the channel [20:45] papandreou has joined the channel [20:46] codelotus has left the channel [20:47] papandreou: Ah, creationix... I was wondering -- any news about the Connect.gzip issue with large response bodies? [20:47] Tobsn has joined the channel [20:48] papandreou: creationix: I've seen it mentioned a couple of times in the logs and in the group, but it still seems to be broken. [20:48] Tobsn: hey, does anyone here uses expressjs and a auth module? i want to set up auth with mongodb as store and memcache for sessions... anyone an idea? [20:49] hassox has joined the channel [20:50] boboroshi_ has joined the channel [20:50] rnewson has joined the channel [20:52] creationix: papandreou: not sure, I've been working on other things [20:52] norviller has joined the channel [20:53] lakin has joined the channel [20:53] ironyboy has joined the channel [20:54] papandreou: creationix: Ok, who's on duty then? :) [20:54] creationix: papandreou: I don't think anyone is, it's tj and me mainly [20:54] slaskis has joined the channel [20:54] creationix: I wish I could, but there is just too much other stuff to work on too [20:55] saikat has joined the channel [20:55] ivong has left the channel [20:55] papandreou: creationix: Ok, no worries! Other Sencha stuff? [20:56] creationix: other node stuff [20:56] creationix: mainly I've been busy with experiments, conferences, and helping people learn [20:57] bradleymeck: creationix, who was it that was trying to pump out js package -> node binary [20:58] creationix: I want it, but pquerna is the closest to getting it actually done [20:59] hassox has joined the channel [21:00] papandreou: creationix: Those are all fine purposes. Looking forward to hear what you've come up with in November. Maybe I'll take a whack at fixing that bug myself, then. [21:01] creationix: papandreou: go for it, just make sure you've signed the cla before sending pull requests [21:01] creationix: (I think the cla is preventing more people from contributing) [21:01] stepheneb has joined the channel [21:01] papandreou: creationix: Sure, I will! Hope I make it that far... [21:02] deepthawtz has joined the channel [21:02] gerred has joined the channel [21:03] chuhnk- has joined the channel [21:04] auser has joined the channel [21:04] auser has left the channel [21:05] MikhX has joined the channel [21:08] MikhX_ has joined the channel [21:11] hassox has joined the channel [21:13] MikhX has joined the channel [21:13] dilvie has joined the channel [21:18] vtg has joined the channel [21:19] bartt has joined the channel [21:20] |Lurch| has joined the channel [21:21] |Lurch|: hi everyone. [21:21] benreesman has joined the channel [21:22] jesusabdullah: Yo dawg [21:24] bradleymeck: yello [21:26] EyePulp: yo ho ho! [21:26] abiraja has joined the channel [21:26] EyePulp: the cops just came and arrested a guy next door to our office. [21:26] jesusabdullah: :o [21:27] EyePulp: I was like "dude! don [21:27] EyePulp: 't rat me out!" [21:27] EyePulp: except without the line breaks. [21:27] jesusabdullah: ahaha [21:27] DrunkDwarf has joined the channel [21:35] kriszyp has joined the channel [21:35] TheEmpath: so does anyone else find the install for npm to be pretty much the worst thing in hte past 100 years? [21:35] isaacs: TheEmpath: how would you like it to work? [21:36] |Lurch| has left the channel [21:36] TheEmpath: i dunno, a consistant tutorial on how to install it would be nice [21:36] isaacs: TheEmpath: also, you know, hiroshima was bombed less than 100 years ago. [21:36] isaacs: TheEmpath: just sayin. [21:36] isaacs: it's not THAT bad. [21:36] isaacs: it's hot holocaust bad [21:36] TheEmpath: i've seen quantum physics articles explaining how to send photons backwards in time easier to read [21:36] isaacs: s/hot/not/ [21:36] isaacs: TheEmpath: is the readme not clear? [21:36] TheEmpath: not in the slightest [21:36] isaacs: i mean, you either do the curl | sh thing, or you get the code and run "make" [21:37] isaacs: that's it [21:37] isaacs: that's how you install it [21:37] TheEmpath: its full of "well, in this exception, just vi this file and add something that we wont tell you" [21:37] jesusabdullah: I don't think it's that opaque [21:37] TheEmpath: http://arxiv.org/pdf/quant-ph/0008036 is easier to read [21:37] isaacs: TheEmpath: so, either you use the default setup (which is easy), oryou don't (which is possible) [21:37] isaacs: TheEmpath: i would love copy patches. [21:37] jesusabdullah: isaacs: It could use more development in the "what do I put in my .npmrc" department, I think [21:38] isaacs: jesusabdullah: agreed. [21:38] isaacs: so... [21:38] jesusabdullah: By "copy," do you mean that, if I forked npm and modded the readme [21:38] TheEmpath: for example [21:38] jesusabdullah: you'd be interested in pullin? [21:38] TheEmpath: curl http://npmjs.org/install.sh | sh [21:38] jesusabdullah: pulling* [21:38] isaacs: jesusabdullah: YES OMG YES PLEASE YES [21:38] jesusabdullah: *cheer* [21:38] jesusabdullah: *cheer* [21:38] TheEmpath: it fails (no kidding it fails) set up a .npmrc file pointing root, binroot, and manroot to folders that you own. [21:38] TheEmpath: what do you mean point [21:38] TheEmpath: i have a keyboard, not a quiver full of arrows [21:38] TheEmpath: explain yourself [21:38] jesusabdullah: What? That's pretty obvious empath [21:39] isaacs: TheEmpath: fork! edit! pull req!! [21:39] isaacs: yeah, some empath YOU are... seriously.. not even reading my mind a LITTLE. [21:39] isaacs: :) [21:39] TheEmpath: cat "root => /home/user" >> .npmrc [21:39] TheEmpath: ? [21:39] jesusabdullah: It's ini-formatted [21:39] isaacs: not =>. it's ini-formatted, not ruby [21:39] isaacs: just = is fine [21:39] TheEmpath: what an assumption [21:40] jesusabdullah: It says it's ini-formatted in the readme [21:40] jesusabdullah: last I checked [21:41] TheEmpath: the vast majority of packages can be install, make, apt-get/yum/gem/etc [21:41] TheEmpath: when you have some odd caveat that we need to make your stuff work... try providing examples [21:41] jesusabdullah: Ah, but how do you get gem? [21:41] jesusabdullah: npm parallels gem, silly goose [21:41] TheEmpath: thinks like wget and curl are common [21:41] TheEmpath: things like "add this file and let me use this arcane term" [21:41] jesusabdullah: what arcane term? [21:42] TheEmpath: its kinda disconnected [21:42] Tobsn: hey, does anyone here uses expressjs and a auth module? i want to set up auth with mongodb as store and memcache for sessions... anyone an idea? [21:42] isaacs: TheEmpath: i think saying "use this shell script, or else get teh code and run make" is pretty much like the majority of things [21:42] jesusabdullah: The biggest problem with the readme is just that it assumes that auth errors are the exception and not the norm [21:43] TheEmpath: of course they are the norm [21:43] TheEmpath: whose deving in root? [21:43] jesusabdullah: If you installed node at the user-level, they wouldn't be [21:43] jesusabdullah: As you would see if you sudo installed it, "su-DON'T!" [21:43] jesusabdullah: Arguably--and isaacs feels strongly about this--sudo installs are often a terrible idea [21:44] isaacs: sudo is ok if you trust the source. [21:44] isaacs: but npm's registry is a freeforall [21:44] isaacs: using sudo with it is just insanely unsafe. [21:44] jesusabdullah: Which is why it's okay to install node globally <_< [21:45] TheEmpath: im glad that software requires a primer in permissions philosophy before using it [21:45] isaacs: TheEmpath: npm actually works if you use sudo [21:45] winchell has joined the channel [21:45] isaacs: TheEmpath: it just complains [21:45] isaacs: because that's dumb. [21:45] siedrix has joined the channel [21:45] jesusabdullah: Oh man, I could add backdoor.js to npm [21:45] TheEmpath: i can't even get the damn thing to install [21:45] isaacs: TheEmpath: ok, so, follow the instructions. [21:46] TheEmpath: point it to folders i own [21:46] TheEmpath: i own alot of folders [21:46] TheEmpath: should i point them to all of them? [21:46] winchell: wow there are 340 people in here! [21:46] bradleymeck: isaacs one day imma stealth commit that search patch somehow [21:46] jesusabdullah: Indeed, winchell! [21:46] isaacs: TheEmpath: you're being more obtuse than necessary [21:46] TheEmpath: i am being dead serious [21:46] jesusabdullah: TheEmpath: If you can wait half an hour, I can pull up my own npmrc, walk you through it, and even modify the readme [21:46] TheEmpath: the hell do i point it to? [21:47] isaacs: TheEmpath: do you seriously, in all honestly, believe that i mean to set your root config to ALL the folders you own? [21:47] isaacs: come on. [21:47] TheEmpath: i dont wanna drag people away from stuff that they are doing. if its that elaborate, then i'll just use something else [21:47] isaacs: TheEmpath: check out the config documentation. [21:47] isaacs: TheEmpath: it's pretty darn simple, actually [21:47] jesusabdullah: TheEmpath: I'm sure you're frustrated, and we want to be helpful, but man are you pissy this afternoon. :( [21:47] TheEmpath: any readme that relies on assumptions of the end-user is destinated to fail [21:47] TheEmpath: explain everything or dont bother [21:47] isaacs: you have these three settings that tell npm where to install stuff. if you don't have permission to write to those folders, it'll fail. [21:47] TheEmpath: what folders does it mean? [21:47] jesusabdullah: That's most readmes. [21:47] isaacs: TheEmpath: the readme assumes that you can read it. [21:48] TheEmpath: point it to folders i own [21:48] isaacs: TheEmpath: if you can't, whatever. [21:48] TheEmpath: i own thousands of folders [21:48] TheEmpath: what the hell is it talking about [21:48] isaacs: TheEmpath: omg, srsly? [21:48] TheEmpath: yes seriosuly [21:48] isaacs: TheEmpath: you don't know what "root" is? [21:48] TheEmpath: does the readme say folders root owns? [21:48] halfhalo: root is my account [21:48] TheEmpath: are you assuming im logged in as root? [21:48] isaacs: TheEmpath: read this: http://github.com/isaacs/npm/blob/master/doc/config.md [21:48] TheEmpath: are you asuming? [21:48] TheEmpath: did you write the readme? [21:48] TheEmpath: why are you assuming? im never logged in as root [21:48] TheEmpath: what does it mean folders i own [21:49] isaacs: TheEmpath: yes, i wrote the readme, and most of the rest of the files in npm. [21:49] TheEmpath: okay, now that i understand the bias [21:49] jesusabdullah: TheEmpath: root, binroot and manroot [21:49] TheEmpath: please help me udnerstand your intentions [21:49] TheEmpath: i understand that [21:49] TheEmpath: im logged in as an account called "user" [21:49] TheEmpath: i can't even log in as root and i never want to [21:49] halfhalo: like most people are... [21:49] TheEmpath: the "user" is on sudoers [21:49] jesusabdullah: TheEmpath: Set your root to be where node.js lives [21:50] isaacs: TheEmpath: seriously, read this: http://github.com/isaacs/npm/blob/master/doc/config.md [21:50] jesusabdullah: TheEmpath: Set your binroot to be ~/bin or something like this [21:50] jesusabdullah: TheEmpath: set manroot to be somewhere sensible [21:50] isaacs: TheEmpath: when you're done reading that, please let me know what you are still confused about pointing where. [21:50] isaacs: TheEmpath: if you have ideas about what the README.md should say, you can either bitch about it here, or you can write it up and send me a patch. [21:51] jesusabdullah: If you don't, I'll do it when I get to work [21:51] jesusabdullah: ACTION & wark wark! [21:51] TheEmpath: i'll be more than happy to provide something way more comprehensive once i figure it out [21:51] isaacs: i don't know how much more open to feedback i can be, but saying "this is bad!" is not helpful. [21:51] TheEmpath: im just not used to having t o dig through repo config files to udnerstand how to isntall something [21:51] isaacs: TheEmpath: i'm trying to help you figure it out so that you can provide that [21:52] TheEmpath: what i've read about socket.io is that its awesome [21:52] TheEmpath: and im willing to struggle trhough this [21:52] TheEmpath: and when im done, i'd love to help you get that readme to be cleaner [21:52] isaacs: TheEmpath: so. you have 2 options. [21:52] overra has joined the channel [21:52] isaacs: TheEmpath: 1) you can either own the location where node is installed. you can do this by installing node in ~/local/, or by chowning /usr/local, or any of a million other ways. [21:53] TheEmpath: ya i've chowned -R $USER /usr/local [21:53] isaacs: TheEmpath: ok, and is that where node lives? [21:53] TheEmpath: thats one big locate. lemme filter [21:53] bradleymeck: `which node` [21:55] isaacs: TheEmpath: `which node` will tell you where node is [21:55] TheEmpath: ya [21:55] isaacs: TheEmpath: ok, then do this: curl http://npmjs.org/install.sh | sh [21:55] ysynopsis has joined the channel [21:56] TheEmpath: npm ERR! TypeError: Property 'cache' of object # is not a function [21:56] TheEmpath: :( [21:56] isaacs: TheEmpath: please gist the whole thing [21:56] TheEmpath: doing an ll /usr/local i have user:root as owners [21:56] TheEmpath: ubuntu 10.04 as well [21:56] isaacs: TheEmpath: gist the entire error message, please. [21:57] isaacs: TheEmpath: without the line numbers and other logged output, it's kind of useless. [21:57] TheEmpath: k [21:57] TheEmpath: http://gist.github.com/601880 [21:58] isaacs: bradleymeck: i haven't forgotten. it's on my list. just a lot going on lately :) [21:58] bradleymeck: i know but i have to poke to be sure [22:00] phiggins has joined the channel [22:00] TheEmpath: i love the idea of a universal api for socket control shared between client and server [22:00] TheEmpath: it'll make moving forward very easy [22:00] isaacs: TheEmpath: great. typo. fixed. [22:01] HAITI has joined the channel [22:01] isaacs: TheEmpath: thanks :) [22:01] TheEmpath: did i [22:01] HAITI: cheers node.js [22:01] TheEmpath: just help fix an open source project? [22:01] TheEmpath: wow [22:01] TheEmpath: first time ever [22:01] TheEmpath: ACTION is proud. [22:01] isaacs: :) [22:01] TheEmpath: yaaay it worked [22:01] isaacs: yeah, socket.io is cool stuff. [22:02] halfhalo: I really wish could9 had git support.... [22:02] halfhalo: so I cold use it on my laptop to work on remote stuff [22:02] TheEmpath: i'll be pushing to do serious things with it where im working at [22:03] heycarsten has joined the channel [22:04] hassox has joined the channel [22:08] kjy112 has joined the channel [22:10] isaacs: TheEmpath: so, now that you got it working, a patch or issue would be nice. (i think there's one on the list already about the sudo/install/doc stuff being tricky) [22:10] TheEmpath: aye [22:10] isaacs: TheEmpath: comments on an issue are very helpful as well. it doens't have to be a big contribution, but just whatever would have made it less painful for you. [22:10] isaacs: that's how you help the next fellow [22:11] Aria has joined the channel [22:12] TheEmpath: aye [22:12] TheEmpath: i'll get on that [22:12] mape_ has joined the channel [22:12] Tobsn: hmm no one? [22:12] Tobsn: why is nobody using any framework for a real site? [22:12] Tobsn: i dont get that... [22:14] bradleymeck: what do you mean? [22:14] kgf: ACTION pokes far-from-empty bulleted list of "apps using express" at bottom of home page? [22:15] bradleymeck: ACTION is using node for things other than hosting a site? [22:15] hannesw__ has joined the channel [22:16] Aria: I am. [22:16] Aria: SMTP daemon, XMPP daemon coming down the pipe... [22:16] Aria: mail filter. [22:16] halfhalo: I will be... maybe.... [22:17] Aria: IRC daemons and bots, lots of stuff [22:18] halfhalo: irc bots are fun! [22:18] halfhalo: they should be a rite of passage [22:18] kgf: yeah, I want to take a whack at one of those in node at some point too. [22:18] halfhalo: its really easy [22:18] kgf: (currently have one I wrote in irssi scripts years ago) [22:18] halfhalo: im writing one now [22:18] kgf: well I figured it makes enough sense to try in node [22:19] halfhalo: yeah, its easy [22:19] halfhalo: working on plugin support for mine right now [22:19] halfhalo: http://github.com/halfhalo/Node.js-IRC [22:19] TooTallNate has joined the channel [22:20] halfhalo: the basics for plugins are there, but working on db stuff right now [22:20] path[l] has joined the channel [22:21] kgf: gee. is sys.inherits documented? [22:22] kgf: I don't seem to see it [22:22] kgf: seems like it'd be really handy though. and potentially could be referenced somewhere I remember reading in masteringnode... [22:22] halfhalo: Don't recall ever using it before... [22:22] LowValueTarget has joined the channel [22:22] kgf: halfhalo: so you didn't write irc.js? lol [22:22] kgf: 'cause it's uh, in there [22:22] halfhalo: really? [22:23] halfhalo: ACTION wrote that script months ago... [22:23] halfhalo: ACTION goes to look [22:23] halfhalo: OH [22:23] halfhalo: THAT [22:23] halfhalo: That allows the server class to emit events [22:24] kgf: right [22:24] kgf: I assume it might be shorthand for something a la x.prototype.__proto__ = y.prototype [22:24] kgf: e.g. http://github.com/visionmedia/masteringnode/blob/master/chapters/events.md [22:24] boaz has joined the channel [22:25] kgf: I actually kinda wanted to ask tj if there was any upside to that syntax as opposed to X.prototype = new Y(), other than presumably not invoking the constructor... [22:25] halfhalo: Its more like.. I copied and pasted that code a looooooooong time ago and its being replaced with something better but I'm not going to change it till it breaks [22:25] kgf: lol [22:26] kgf: so in other words it might have been deprecated even? [22:26] halfhalo: Think it has [22:26] lakin has joined the channel [22:26] halfhalo: IIRC I wrote that script last... september? [22:26] halfhalo: well, that part at least [22:26] kgf: a year ago? lol [22:26] jashkenas has joined the channel [22:27] halfhalo: its been a while [22:28] halfhalo: And actually, I'm not really using the emmiter in that project, it was for a web-interface that I was playing with [22:30] halfhalo: ACTION is sad that his bot currently does not know how to enter or leave channels... [22:30] halfhalo: ACTION also needs to make a config loader for it [22:33] halfhalo: ACTION also need to comment stuff [22:33] Anti-X: you also need to do it instead of just saying it here [22:34] Anti-X: but maybe that's not how you work [22:34] halfhalo: I would, but I'm on my windows laptop with no dev stuff installed/setup [22:34] omygawshkenas has joined the channel [22:34] halfhalo: I'M LOOKING AT YOU VS2010 AND ECLIPSE [22:34] halfhalo: ACTION is also in class right now [22:35] kgf: I just use komodo edit for js stuff... [22:35] kgf: it's got enough quirks, but nothing I can't deal with [22:35] halfhalo: I use textmate on my mac mini and work mbp [22:36] aurynn: I still love TextMate. [22:36] halfhalo: I do love it... [22:36] halfhalo: That and transmit 4 can solve everything [22:41] saikat has joined the channel [22:43] Anti-X: i'm hardcore [22:43] Anti-X: i program in ms dos edit [22:43] halfhalo: win [22:44] kgf: I think in this day and age that's something we refer to as 'suicide' [22:44] Anti-X: hey i'm not dead ye - [22:45] Anti-X: i don't think i would have minded that [22:45] kgf: quick, someone resuscitate Anti-X with some [22:45] Anti-X: if it was the only thing available [22:45] Anti-X: edit that is [22:45] Anti-X: it does support up and down [22:46] ajpiano has joined the channel [22:46] Anti-X: or should i say, arrow keys, and not overcomplicate shit [22:46] muk_mb has joined the channel [22:47] Anti-X: and it's easier to write code in edit on blue background and system font than it is in notepad and courier new [22:47] Anti-X: as long as you don't care about utf8 obviously [22:50] bradleymeck: boo console based editors [22:52] zith_: being able to ssh into a server and always get the editor you're used to is golden ;) [22:52] jesusabdullah: Okay what have I missed! [22:52] jesusabdullah: vim, obviously [22:53] halfhalo: yeah... but ssh sucks on windows [22:53] lianj: just ssh? [22:53] zith_: a guy at the place i worked this summer used IntelliJ to develop javascript [22:53] zith_: looked very nice [22:54] jesusabdullah: halfhalo: That it does :C [22:54] zith_: putty isnt bad, i think [22:54] jesusabdullah: I just don't like putty's copy-paste style, is all [22:55] jesusabdullah: Otherwise it's okay [22:55] dgathright has joined the channel [22:56] bradleymeck: putty is ok, i just like to be able to have find and replace not be a doomsday operation [22:58] jesusabdullah: indeed [22:58] lakin has joined the channel [22:59] halfhalo: the number of comments in my code have just gone up more than 1000% [23:00] halfhalo: which isn't saying much, since i had 2 before [23:00] bradleymeck: lol [23:00] halfhalo: and they still suck, but its something! [23:01] cha0s has joined the channel [23:01] cha0s has joined the channel [23:05] bradleymeck: twitter oauth over xhr using the pin verifier... i think i will just avoid login using twitter [23:07] kjeldahl has joined the channel [23:08] MikhX has joined the channel [23:11] bradleymeck has left the channel [23:18] sonnym has joined the channel [23:19] charly1 has joined the channel [23:22] fod has joined the channel [23:23] dnolen has joined the channel [23:23] mikew3c_ has joined the channel [23:25] nodejs-log has joined the channel [23:26] halfhalo: yay! got enter channel working! [23:27] charly1: this your bot? [23:27] halfhalo: yeah [23:28] halfhalo: it knows like 3 commands [23:28] salieri: is it opensrc somewhere? [23:28] halfhalo: http://github.com/halfhalo/Node.js-IRC [23:28] Nohryb has joined the channel [23:28] salieri: ah nice thanks! [23:29] halfhalo: Its still very much in the "shit don't work right" phase [23:29] salieri: best phase evar. [23:29] halfhalo: yup [23:29] salieri: i think ppl call that "public beta" [23:29] halfhalo: lol [23:29] aurynn: heh [23:30] kgf: halfhalo: I thought you said making an irc bot was easy. lol [23:30] halfhalo: it is, but the plugin/auth stuff is not [23:30] [[zz]] has joined the channel [23:30] halfhalo: it does respond to !hello :name though [23:31] halfhalo: !hello everyone [23:31] nodejs-log: hello everyone! [23:31] halfhalo: now, I do think I am going to redo the way plugins are handled to be... cleaner [23:32] salieri: huh [23:32] salieri: are your plugins in js too [23:32] halfhalo: it will act really similar but just be a much better implementation [23:32] salieri: or do you mean the C++ plugins [23:32] halfhalo: yup [23:32] salieri: HA awesome [23:32] salieri: i was looking for just that example [23:32] salieri: thanks! [23:32] salieri: (js plugins for js) [23:32] halfhalo: well, by plugins I mean this http://github.com/halfhalo/Node.js-IRC/blob/master/plugins/vendor/hello.js [23:32] stagas: the hard disk is the best key value db [23:32] stagas: never fails [23:33] halfhalo: I WAS using nstore via keys, but it brokked [23:33] stagas: after having fighting all day with redis failing after >1gb values [23:34] halfhalo: yeah, I think I'm going to redo plugins to be more... natural [23:34] danielzilla has joined the channel [23:34] halfhalo: or not, since I'm feeling lazy [23:35] halfhalo: I'll leave that for the inveitable rewrite of the base class [23:36] jamescarr has joined the channel [23:39] WALoeIII has joined the channel [23:41] technoweenie: stagas: look at bigdis [23:42] ShizWeaK has joined the channel [23:43] stagas: technoweenie: interesting. is it stable or proof of concept? [23:43] mjr_ has joined the channel [23:43] technoweenie: probably more like a proof of concept [23:44] jamescarr: what is bigdis? [23:44] stagas: hm it could be ported to node :) [23:44] stagas: jamescarr: http://github.com/antirez/Bigdis [23:45] ashleydev: i'm looking at doing live upgrades (deploys) to my node applications.. anyone already doing this? [23:45] ashleydev: unicorn for rails does this nicely [23:45] ashleydev: maybe this is something that should be a feature in spark [23:45] ashleydev: anyone have an answer to this already? [23:45] technoweenie: node cant fork can it? thats what unicorn does iirc [23:46] deepthawtz: the old unicorn master forks itself [23:46] mjr_: I didn't know about bigdis. Another thing that talk s the redis protocol. Neat. [23:47] codetonowhere has joined the channel [23:48] mjr_: So I've noticed that my HTTP server doesn't seem to get "close" events on req.connection when clients go away. Anybody else noticed this? [23:49] kriszyp_ has joined the channel [23:49] stagas: I wanted to store ~10k keys 150kb values and redis ran out of mem after around 8k keys, I don't have a lot of ram probably that's it, but it was also really really slow when saving now and then. I couldn't restart redis anymore which was frustrating [23:49] mjr_: Trying to track it down in net.js, but getting in too deep. [23:52] mjr_: stagas: have you tried that with redis vm? [23:54] stagas: mjr_: yes, I tried everything. I don't know if it's cygwin problem but vm didn't seem to have any positive effect other than slowing down everything a lot [23:55] mjr_: I haven't tried redis vm myself. Just wondering if it actually works. The docs claim that it does. :) [23:55] ashleydev has joined the channel [23:55] stagas: it works, but it's very very slow on a regular hd (at least here) [23:55] deepthawtz: works fine for me [23:55] trotter has joined the channel [23:55] stagas: and still needs to initialize everything in ram before dumping to vm [23:56] TheEmpath: anyone familiar with socket.io? [23:56] a_meteorite has joined the channel [23:56] Aria has joined the channel [23:56] sonnym: TheEmpath: been using it a bit, been having a few problems with it [23:57] TheEmpath: my server runs and i can connect to it through a web browser [23:57] TheEmpath: but getting the client to work is wonky [23:57] stagas: deepthawtz: how large values? [23:57] a_meteorite has joined the channel [23:57] sonnym: that's pretty much the problem I've been having [23:57] deepthawtz: mostly really small stagas [23:57] sonnym: works fine with chromium, but firefox using xhr-multipart fails a lot [23:57] mjr_: stagas: If you don't have 1.5GB to give to redis, you might have better results sticking the values, or the entire thing, in something like couchdb. [23:57] sonnym: thought I had gotten it figured out last night, since it was working, but it's been failing again today [23:58] TheEmpath: dam [23:58] TheEmpath: damn [23:59] sonnym: what I had thought fixed it was sending a message immediately after connection [23:59] sonnym: and what firebug reports is: this.socket is undefined [23:59] TheEmpath: firebug is telling me that this.socket isn't defined when it goes to close [23:59] TheEmpath: ya [23:59] stagas: I guess redis is optimized for small values. with me, it was slow as hell, failing multiple times throughout the process, segmentation faults until it reached the out of mem thing where I couldn't even start it up