[00:05] dnolen has joined the channel [00:06] logix812: Has anyone experience connect acting one way in a dev env ( OS X) then when I deploy to production (Unbuntu) the same routes don't work [00:06] HAITI has joined the channel [00:07] tjholowaychuk: logix812: node --version on both machines? [00:07] tjholowaychuk: the same? [00:08] logix812: ah! Nope! there we go [00:08] tjholowaychuk: :p [00:08] mjr_: tjholowaychuk++ [00:08] v8bot: mjr_ has given a beer to tjholowaychuk. tjholowaychuk now has 2 beers. [00:08] logix812: hahaha.. awesome I managed to get v0.3.0-pre [00:08] logix812: on one and 2.1 on another... good times.. good times [00:08] isaacs: mjr_: dude, come on, you know he's not old enough to drink ;P [00:08] tjholowaychuk: hahaha [00:08] isaacs: the cops are gonna bust in here and start handing out tickets any second now [00:09] tjholowaychuk: its 18 in canada :p [00:09] isaacs: oh, ok, so like, in 4 more years, then...? [00:09] mjr_: I'm so busted. [00:10] tjholowaychuk: isaacs: serious? lol im 23 [00:10] isaacs: haha [00:10] isaacs: the other day i forgot how old i was [00:11] isaacs: i was filling in a form, and i was like, "what is it... 28? 29?" [00:11] isaacs: i'm 31 [00:11] mjr_: I often forget how old you are as well. I guess it's a common thing. [00:11] [[zz]] has joined the channel [00:11] isaacs: hahah [00:12] mjr_: I often have to do actual math to figure out my age since its a subject that comes up almost never. [00:12] disq: hey, do you think this is a good approach for objects and inheritance? http://gist.github.com/594643 seems to work, but i'm not sure [00:13] isaacs: yeah, it's like you think about yoru age every damn day for the first 20 years of your life, and then you hit 21, and like, it doesn't matter again until your're 65 [00:13] disq: too many options to do the same thing [00:14] pedrobelo has joined the channel [00:14] isaacs: disq: doing a jquery extend is an inefficient mechanism of inheritance, and doesn't give you "instanceof" [00:14] ben_alman has joined the channel [00:14] isaacs: disq: it's better to do something like Room.prototype.__proto__ = events.EventEmitter.prototype [00:14] banjiewen has joined the channel [00:15] bradleymeck1: disq, seems like initialize is duplicating behavior unless it can be called repetitively [00:15] isaacs: disq: check out sys.inherits [00:15] isaacs: disq: i mean, even if you decide not to use it, you could get a lot from its code. it's not a long function. [00:15] disq: ok, thanks. i should read some source anyways [00:17] isaacs: disq: here's some food for thought: http://gist.github.com/363025 [00:20] disq: nice! i'll study that one [00:22] bradleymeck1: i asked it and got #javascript's answer but does anyone here have a decent way to emulate the new operator with varargs [00:22] jashkenas: disq: be careful with __proto__ -- it doesn't fly in IE. [00:23] tjholowaychuk: bradleymeck1: what do you mean? [00:23] sprout has joined the channel [00:23] tjholowaychuk: bradleymeck1: like a new apply()? [00:23] bradleymeck1: yep [00:23] jashkenas: bradleymeck1: CoffeeScript supports calling new with varargs, but you have to create a temporary intermediate constructor to accomplish it. [00:23] bradleymeck1: yea, that was the solution proposed [00:24] bradleymeck1: its that or use Function to return a proper new call but thats slower than dirt [00:24] Tim_Smart has joined the channel [00:24] jashkenas: basically, the intermediate constructor inherits from the real one, then you apply the real one to a new instance of the temporary... [00:25] jashkenas: bradleymeck1: if you find a better way to do it, do let me know. ;) [00:26] Tim_Smart: jashkenas: inheritance in Node? [00:26] bradleymeck1: i will but i just dont think there is one right now [00:26] Tim_Smart: Or in the browser? [00:26] saikat has joined the channel [00:27] jashkenas: Tim_Smart: like, the temporary constructor's prototype chain points to the actual constructor's prototype. for both node and the browser. [00:27] echosystm has joined the channel [00:28] echosystm: can anyone point me towards some SSJS benchmarks? [00:28] echosystm: i'd just like to get a rough idea of performance against python etc. [00:28] eisd: v8 is faster than python [00:28] eisd: `v performance @ echosystm [00:28] v8bot: echosystm: Benchmarks: http://shootout.alioth.debian.org/u32/benchmark.php [00:29] jashkenas: echosystm: v8 is about 5.4 times faster than vanilla Python, and 6.3 times faster than Python 3, according to those benchmarks. [00:30] echosystm: wow! [00:30] bradleymeck1: http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=v8&lang2=python . but remember you dont have those legacy libraries python might, however building upon async is quite interesting [00:31] bradleymeck1: just dont do heavy math in 48 [00:31] bradleymeck1: v8* [00:32] tjholowaychuk: gcc slower than g++? :( [00:33] tjholowaychuk: hehe php is always way up there [00:33] norviller has joined the channel [00:35] bradleymeck1: yea, but php is about streaming data out rather than doing anything with it really, i wonder how hiphop compares [00:41] kjftw has joined the channel [00:43] echosystm: whats wrong with heavy math in v8? [00:44] bradleymeck1: its terrible speed wise [00:44] Tim_Smart: echosystm: If you need to do intense math work and process, write it in C++ withing a node addon. [00:44] Tim_Smart: processing* [00:45] echosystm: how would java perform on a similar task? [00:46] davidwalsh has joined the channel [00:47] eisd: echosystm: that page should allow you to compare various benchmarks (mandelbrot, regex, etc) [00:48] eisd: Although, V8 has a regex optimization option which I think node turns on by default [00:48] prettyrobots has joined the channel [00:49] fizx has joined the channel [00:49] Tim_Smart: tjholowaychuk: I have been hacking away on my ORM.. [00:49] tjholowaychuk: nice :) [00:49] tjholowaychuk: im hacking away on crazy cool new jade features [00:50] SubStack: I want an anti-orm [00:50] logix812 has left the channel [00:50] SubStack: that just figures out what to do with what you've already built [00:50] tjholowaychuk: MRO ? [00:50] tjholowaychuk: haha [00:51] Tim_Smart: tjholowaychuk: I haven't done any benches yet, but I have optimized for several use cases, like saving a collection http://github.com/biggie/biggie-orm/blob/master/lib/adapter/redis.js#L262-407 [00:51] Tim_Smart: Trying to make it super fast. [00:52] tjholowaychuk: so you are indexing in memory? [00:52] tjholowaychuk: or something [00:52] Tim_Smart: And I have several ideas to emulate 'views' and 'indexes' with redis too. [00:52] mjr_: Tim_Smart: I think I fixed the multi-bulk null thing that was causing your hanging problem. [00:52] mjr_: Well, I fixed a problem like that, which might have been your problem. [00:53] Tim_Smart: tjholowaychuk: Instead of calling save() on every model, I take the shortest route instead (I think). [00:53] tjholowaychuk: I only save on stale things [00:53] Tim_Smart: mjr_: Ah cool. I can update http://github.com/biggie/biggie-orm/blob/master/lib/adapter/redis.js#L215-228 :p [00:54] mjr_: Yeah, I saw that comment, which is why I mentioned it. :) [00:54] mjr_: Hopefully that was it. [00:54] tjholowaychuk: Tim_Smart: maybe some of the indexing stuff we can abstract [00:54] tjholowaychuk: some other components [00:54] echosystm: is javascript likely to get much faster? or are things nearing the top of the bell curve? [00:55] Tim_Smart: tjholowaychuk: Yeah I want to keep all 'find' queries as much as possible in the database. [00:55] Tim_Smart: etc. [00:55] tjholowaychuk: I would want all of it there [00:56] Tim_Smart: Yeah, but I don't want to be creating indexes on demand, so it will fallback to filtering in user-space. [00:56] matt_c_ has joined the channel [00:58] sudoer has joined the channel [00:58] bradleymeck1: echosystm the math could get much faster and several function optimizations could be made involving recursion, as for control flow its pretty much at the curve. preprocessing functions and function construction could also improve speed wise [00:59] bradleymeck1: but for just flowing around data i mean its pretty close to C which is about the best you are going to get [01:01] skampler has joined the channel [01:02] dilvie has joined the channel [01:03] Yuffster has joined the channel [01:03] cardona507 has joined the channel [01:04] Tim_Smart1 has joined the channel [01:04] echosystm: i'm sort of looking at javascript as being the future of everything i do one day and i'd like to get involved early [01:05] echosystm: pretty much all the applications im writing at the moment are a restful backend (java) with the entire UI written in JS (no manual html) [01:05] echosystm: how do you find javascript, in general, for server side work? [01:05] zith_: i'm sure you'll use loads of languages [01:05] echosystm: is it a nice language to use, or do you find yourself pulling your hair out? [01:05] zith_: one language will never take over [01:06] echosystm: of course zith_ , but the ability to have the UI and backend in one language is a huge plus from a business perspective [01:06] echosystm: i mean, Google went and made GWT for that very reason [01:08] jchris has joined the channel [01:10] bradleymeck1: i do like being able to do what i do (data mining) in the browser inspector as a prototype and directly use same code, thats for sure [01:11] bradleymeck1: now i just need to find a way to work node full time and ill be happy as a pea in a pod [01:12] tjholowaychuk: bradleymeck1: have you seen selector gadget? [01:12] tjholowaychuk: I found it helpful when I did scraping [01:12] bradleymeck1: we have one, but its not much use when dealing with epubs [01:13] bradleymeck1: css selectors dont deal with streaming element styles they really excel only in nested situations [01:15] sudoer has joined the channel [01:15] batasrki has joined the channel [01:16] bradleymeck1: i always thought it ironic that css was about removing style from data but it requires very specific data layouts to do things of use [01:16] tjholowaychuk: haha yeah [01:16] echosystm: css is a steaming pile of fail [01:17] samsonjs has joined the channel [01:17] echosystm: i use extjs for all the apps im doing at the moment [01:17] echosystm: i put all the themeing in js [01:18] echosystm: instead of css [01:18] Yuffster has joined the channel [01:18] batasrki: echosystm: oh, that's much better [01:18] echosystm: at least it works [01:18] batasrki: echosystm: css works [01:19] echosystm: basic things like two column layouts never work properly with just css [01:19] bradleymeck1: i have to agree that js is better at styling than css [01:19] zith_: bradleymeck1: do you use node for webscraping? [01:19] bradleymeck1: yes these days [01:19] echosystm: you always have to set the overflow or add in unnecessary markup [01:19] echosystm: then your pages get cut off if the viewport is too small etc.... total fail [01:19] zith_: bradleymeck1: how do you deal with sites where htmlparser freaks out because of malformed data? [01:19] bradleymeck1: css completely ignores basic design elements like an hbox and vbox [01:20] echosystm: exactly bradleymeck1 [01:20] batasrki: are we talking about same css? [01:20] bradleymeck1: zith_ i have a guaranteed well formed xml file from what sources we have [01:20] bradleymeck1: batasrki yes [01:20] zith_: ah, how nice :) [01:20] batasrki: your pages get cut off if you work with a fixed width layout [01:21] batasrki: what are you setting the overflow on? [01:21] zith_: i once wrote a system designed to scrape the pages as often as it could, to keep the data in my database updated [01:21] rcy has joined the channel [01:21] zith_: i found most html-beautifiers too slow [01:21] bradleymeck1: batasrki instead of thinking like that lets take an example of an hbox, table in html has a width=*, css cannot emulate this [01:22] bradleymeck1: htmlparser is slow, but heh parsing is the least amount of my time concerns [01:23] batasrki: bradleymeck1: width=*? can you elaborate? [01:23] bradleymeck1: fill all remaining space [01:23] bradleymeck1: but relative to the elements to the left and right [01:24] ehaas has joined the channel [01:25] bradleymeck1: or another example, sizing elements relative to the page is unpredictable in css unless you have full control of how elements are layed out in the data (note that css's goal was against this) [01:25] bradleymeck1: or the absolutely absurd number of exceptions for rules to containing block values [01:25] batasrki: what about grids [01:25] bradleymeck1: what about em? [01:25] batasrki: grids decouple that [01:26] zith_: doesnt styling in javascript cause most browsers to first render the unstyled page and then execute the javascript that styles it? [01:26] bradleymeck1: you wont be able to use em for years, i mean ie9 doesnt support em [01:26] batasrki: if your container corresponds to so many columns that's how it'll align [01:26] batasrki: zith_: yeah, unless you put JS at the top of the page which could block the entire page from rendering [01:26] bradleymeck1: still odd to insist on a non hbox or vbox format like grids (particularly the advanced layout spec) [01:26] batasrki: or at least make it look slow [01:27] batasrki: why is it odd? It fulfills your requirement of hbox doesn't it? [01:27] bradleymeck1: somewhat i havent read the spec in a while but i noted some oddities [01:28] bradleymeck1: still, css grids largely go against the rest of css spec in that they allow relative values [01:28] batasrki: css libs like 960gs can and do set up grids for you and they work with today's browsers [01:28] bradleymeck1: dont get me started on the chaos of % [01:29] bradleymeck1: kind of [01:29] LFabien has joined the channel [01:29] batasrki: the % is problematic due to an enormous array of viewports available today [01:29] echosystm: doesn't 960gs require non-semantic markup? [01:29] bradleymeck1: no its problematic due to it being insane [01:29] batasrki: hahaha [01:29] echosystm: eg. a crapload of divs just to get columns [01:30] bradleymeck1: % on imgs is different from any other elements, %s in position:absolute changes functionality on its parents element [01:30] batasrki: echosystm: no, it imposes certain class names on divs, but how you lay it out is largely up to you [01:30] batasrki: ah, yes, resizable images, the last bastion of fuckery [01:30] bradleymeck1: % in position inline is largely useless [01:30] bradleymeck1: % in inline-block is similar [01:30] bradleymeck1: % in position relative is useful [01:31] ryanfitz has joined the channel [01:31] bradleymeck1: the amount of exceptions on a per property basis is insane [01:32] jameshome_: is it more, or less fucked up than Postscript? [01:32] bradleymeck1: and the properties that change how it works isnt always on the element [01:32] batasrki: the thing is many parts of software and web dev look ugly once one is deeply looking at them [01:32] bradleymeck1: jameshome_ sadly more due to the exceptions [01:32] ryanfitz has joined the channel [01:32] bradleymeck1: i dont care if its ugly, i want consistent [01:32] bradleymeck1: my code is ugly [01:32] jameshome_: I feel like most of the complaints about css forget the complexity of the problemset [01:33] batasrki: the problem with styling through JS is that it's non-intuitive for other team members and the FOUT that happens in a browser with a fresh cache [01:33] jameshome_: and the fact that's it's maintained by a standards body [01:33] jameshome_: I'm amazed it's as usable as it is. [01:34] bradleymeck1: batasrki im not saying to do it with js but there is a large subset of problems you cant do in css that require js if you want to do them [01:34] pedrobelo has joined the channel [01:35] batasrki: bradleymeck1: you're right, but the situation is getting better and the subset smaller, IMO [01:35] bradleymeck1: batasrki agreed i just dont think a dictionary language should be used [01:35] bradleymeck1: the amount of memorization needed to know css decently is already pretty crazy [01:36] jameshome_: it's job security [01:36] jameshome_: *grin* [01:36] batasrki: bradleymeck1: still agreeing with you, but if you think about it, so is for many other things. [01:36] batasrki: I've stopped trying to memorize and learned to be super-quick at lookups [01:37] jameshome_: oops, train comin' [01:37] sprout has joined the channel [01:37] prettyrobots has joined the channel [01:37] bradleymeck1: batasrki thats exactly the problem [01:37] bradleymeck1: it works [01:38] batasrki: bradleymeck1: I've found a subset of CSS that works for about 90% of stuff I need to do with it, so I guess I don't see some of the fuckery you've run into [01:39] bradleymeck1: i see lots of images [01:39] bradleymeck1: and columns [01:40] batasrki: images are definitively a problem. like I said, I've used 960gs for columns and been pretty happy with it [01:41] bradleymeck1: i havent seen any that do some things without going out of my way to wrap things in divs, and i dont have that luxury on an embedded device [01:41] hsuh has joined the channel [01:41] thedayturns has joined the channel [01:42] softdrink has joined the channel [01:43] batasrki: bradleymeck1: have you looked at responsive design techniques? [01:44] bradleymeck1: i havent heard about it [01:44] batasrki: bradleymeck1: hold on, I'll link you up [01:45] batasrki: bradleymeck1: here you go: http://www.alistapart.com/articles/responsive-web-design/ [01:45] skampler has joined the channel [01:46] batasrki: basically, it uses fluid layouts + media queries to adapt a layout to the viewport of a device [01:47] bradleymeck1: i was talking more about i cant waste that space, i only have 10mb total on it [01:47] aconbere has joined the channel [01:49] bradleymeck1: ah i see, yea, we dont do that since we dont have the manpower to style things multiple ways really. we generally target our sites as 2 different ones instead of trying to reconcile whats going wrong [01:49] bradleymeck1: well not really sites on the embedded but heh [01:50] jspiros has joined the channel [01:51] batasrki: bradleymeck1: from what I've read about mobile web, that's the hard way to do it, maintaining two different sites [01:51] batasrki: how are you finding it? [01:52] bradleymeck1: when we do mobile web, its evil, lots of tables because they work [01:52] asfw has joined the channel [01:52] bradleymeck1: but for cross phone support otherwise you are kinda iffy [01:52] bradleymeck1: no frames no advanced css [01:52] bradleymeck1: and cant really include senchatouch as its 1/4th a meg [01:53] batasrki: thomas fuchs released zeppo.js (might be wrong on the name) just yesterday. It supports most things you need on mobile in about 2kb of space or something ridiculously small like that [01:53] bradleymeck1: but its more than that, it doesnt make sense to even have the same design so you have to basically [01:54] bradleymeck1: i can take a look [01:54] bradleymeck1: plus for us, styling epubs is largely on a book to book basis for our device issues we wouldnt really face much since we are designing it for small 4x5~ screens [01:55] bradleymeck1: my only question would be does it support blackberry 4.5 because a lot of our business in europe uses that [01:55] bradleymeck1: well when doing mobile [01:56] matschaffer has joined the channel [01:56] jspiros_ has joined the channel [01:57] batasrki: don't know if it does, but it's worth a check [01:58] salieri: hey sorry for the dumb question but can one actually manipulate threads in node? i see it has libeio but that's below the JS layer, no? [01:59] softdrink has joined the channel [01:59] bradleymeck1: slieri are you doing c++ stuff? if not you shouldnt need to [01:59] bradleymeck1: (in short w/o c++ no) [01:59] salieri: nah i just wanted to know if there was a threading api for node on the js layer [01:59] salieri: hrm [01:59] salieri: but yeah i'm playing with the v8.h api [02:00] bradleymeck1: one of the large points of node is to avoid threads [02:00] salieri: ah ok. [02:00] bradleymeck1: they introduce many problems at the cost of making code come in blocks rather than logical chunks based upon events [02:00] salieri: is it all just handled below the layer then? or does it just not use threads like python [02:01] bradleymeck1: salieri it uses threads when it "has" to, js is always done single threaded though [02:01] Tim_Smart: salieri: Why do you want threads? [02:01] Tim_Smart: I.e. What are you trying to do? [02:02] ajpiano has joined the channel [02:02] huyhong has joined the channel [02:02] salieri: no good reason; was trying to see if i could get a simple example done, like a simple producer consumer model [02:03] bradleymeck1: you can do that using events rather than threads [02:03] salieri: ah so instead of the block on the thread just have an eventemitter signal when the context should switch [02:03] salieri: ? [02:04] bradleymeck1: well the context never switches [02:04] Tim_Smart: salieri: Node has a single stack. [02:04] salieri: ah [02:05] Nohryb has joined the channel [02:05] nroot7 has joined the channel [02:05] bradleymeck1: so be careful when you do producer consumer that you may enter a recursive loop [02:05] bradleymeck1: if its all in js land [02:05] Tim_Smart: salieri: Node ensures you never block on IO. Unless you need to do some heavy computation threads aren't needed. In the case where you do need heavy computation, spawn a worker process. [02:05] salieri: nod [02:06] Tim_Smart: (Or use threads in a C++ addon) [02:06] salieri: nod yeah been playing with the C++ addons; trying to write a module for sqlite as a learning thing [02:11] bradleymeck1: learning the threading bit is tough [02:11] davidwalsh has joined the channel [02:12] salieri: nod [02:12] jspiros has joined the channel [02:12] salieri: actually what i'm eventually trying to do is work this disasm lib into a module [02:12] salieri: so then i can use the js part to do the string manips and higher level stuff [02:13] derencius_ has joined the channel [02:15] bradleymeck1: and inline asm module might be interesting but not sure how you could pass around stuff safely [02:16] BrianTheCoder has joined the channel [02:16] bpadalino: safe asm ? [02:18] dohtem has joined the channel [02:18] dohtem has joined the channel [02:18] trotter has joined the channel [02:18] bradleymeck1: bpadalino, mainly just want a small subset for math [02:20] salieri: oh its just for disassembly [02:22] salieri: rather do the string manips not in C :-) [02:24] robotarmy has joined the channel [02:25] dgathright has left the channel [02:26] gthb has joined the channel [02:27] dnolen has joined the channel [02:46] digitaltoad has joined the channel [02:50] Anti-X: announcer clean the tubes [02:50] Anti-X: :o [02:51] Anti-X: war iz announcar! [02:51] Anti-X: ACTION calls 911 [02:51] Anti-X: "i'd like report a missing irc bot" [02:52] halfhalo: ACTION drives away from the scene in an unmarked panel van [02:53] WALoeIII has joined the channel [02:56] nerdEd has joined the channel [02:56] Aria has joined the channel [02:56] ajsie has joined the channel [02:58] gthb has joined the channel [03:00] dipser_ has joined the channel [03:04] EyePulp has joined the channel [03:06] cloudhead has joined the channel [03:10] iwasbiggs has joined the channel [03:13] noahcampbell has joined the channel [03:16] zk has joined the channel [03:20] prettyrobots has joined the channel [03:34] fizx_ has joined the channel [03:36] badaxx has joined the channel [03:36] ryanfitz has joined the channel [03:39] bpot has joined the channel [03:39] BrianTheCoder has joined the channel [03:45] WALoeIII has joined the channel [03:46] mjr_ has joined the channel [03:58] wakawaka has joined the channel [03:59] Tim_Smart has joined the channel [04:05] noahcampbell has joined the channel [04:11] BrianTheCoder has joined the channel [04:18] TkTech has joined the channel [04:20] halfhalo: curses dynamic module loading! [04:20] dilvie has joined the channel [04:21] salieri: monkeypatcher :-P [04:23] halfhalo: adding plugin support for my irc class [04:25] salieri: hrm oh right i guess i should try to write an irc bot [04:27] halfhalo: it should be a rite of passage [04:27] derencius has joined the channel [04:28] Tim_Smart: lol awesome website: http://www.sequelizejs.com/ [04:28] Tim_Smart: For some reason it is displaying the html as plain text. [04:28] halfhalo: ?me sees html as html... [04:29] halfhalo: well, I totally can't use a shift key today.... [04:32] cferris has joined the channel [04:34] halfhalo: i.... what? [04:34] halfhalo: Its loading the first one? [04:35] salieri: halfhalo: yeah irc bot, disassembler, plugin framework, etc [04:35] abiraja: jade's giving me this weird error when i reinstalled it: Cannot read property 'constructor' of undefined [04:36] ajpiano has joined the channel [04:38] Yuffster_work has joined the channel [04:41] halfhalo: OH YOU SON OF A BITCH WHY DON'T YOU WORK [04:42] echosystm: how does javascript handle multicore cpus? [04:43] halfhalo: it ignores them? [04:43] halfhalo: ACTION doesn't really know [04:43] echosystm: well [04:43] echosystm: i dont really know anything about threads/processes [04:43] echosystm: just wondering what one would do in JS to make a program maximise CPU resources [04:43] salieri: so earlier we sketched about this [04:43] path[l] has joined the channel [04:44] salieri: and they said that [04:44] salieri: (10:00:01 PM) bradleymeck1: one of the large points of node is to avoid threads [04:44] echosystm: yep [04:44] echosystm: my understanding is that, by using functional programming without "side effects", threads become somewhat of a non-issue [04:45] echosystm: but my understanding is just a sentence [04:45] echosystm: i have no idea what that actually means [04:45] salieri: errr [04:45] salieri: heh side effects like printing, using a db, heh [04:45] salieri: er what it means is that some recursive stuff can be parallelized easily [04:45] echosystm: ok [04:46] salieri: tho in reality alot of recursive stuff will kill the stack. unless your interp or compy will optimise tail recursion properly [04:46] mjr_: JavaScript / node makes efficient use of only one CPU core by default. [04:46] mjr_: It is a single process. [04:46] echosystm: ok [04:46] mr_daniel has joined the channel [04:46] echosystm: so thats a bit of a pickle [04:46] salieri: it can fork tho right? [04:46] mjr_: If you run out of CPU, the best way to take advantage of multiple CPUs is to start more node processes somehow. [04:46] mjr_: The web workers module is one easy way to do that. [04:47] mjr_: It uses the same workers API as the browser. [04:47] mjr_: echosystm: what's your issue? [04:47] echosystm: no issue mate, just curiousity and learning [04:48] mjr_: cool [04:50] echosystm: when might web workers be available in SSJS? [04:50] echosystm: are we talking months? years? [04:50] mjr_: They are here now in node. [04:50] mjr_: As an addon. [04:51] echosystm: oh [04:51] echosystm: cool [04:52] dysinger has joined the channel [04:52] mjr_: npm install webworker [04:52] sudoer has joined the channel [04:52] mjr_: http://github.com/pgriess/node-webworker [04:54] halfhalo: ok, I feel stuuupid [04:54] halfhalo: totally forgot I was passing my plugins and object but wasn't actually setting it [04:56] aglemann has joined the channel [04:58] aglemann: does anyone know if node-sqlite supports transactions? [04:58] skampler has joined the channel [04:58] sudoer has joined the channel [05:01] mikew3c has joined the channel [05:02] sudoer has joined the channel [05:03] jimmybaker has joined the channel [05:04] Anti-X: there is an sqlite module that is implemented as that html5 websql thing, which has transactions if i remember correctly [05:04] Anti-X: so i'd assume the module has that too [05:09] jperras has joined the channel [05:10] rubydiamond has joined the channel [05:11] abiraja: can someone help with jade? [05:12] abiraja: i had this template that was working and then, i reinstalled it [05:12] abiraja: and now, it stopped working with error: "Cannot read property 'constructor' of undefined" [05:12] sudoer has joined the channel [05:17] amuck has joined the channel [05:22] bpot has joined the channel [05:23] mikew3c has joined the channel [05:32] SamuraiJack has joined the channel [05:37] ajsie: is there a way to print out an object internals (inspected state) [05:37] mjr_: sys.inspect() [05:37] ajsie: puts(person) just gives me object Object [05:37] ajsie: okay thanks [05:40] mjr_: I really enjoy using "eyes" [05:40] mjr_: npm install eyes [05:40] mjr_: then do: var inspect = require('eyes').inspector(); puts(inspect(person)); [05:40] mjr_: It'll be all pretty colors and nicely indented. [05:42] Tim_Smart: mjr_: Got rid of that fixme ;) [05:42] Tim_Smart: yay [05:42] mjr_: Tim_Smart: great [05:42] Tim_Smart: Working on views and associations atm. [05:42] mjr_: That was a tricky little bug to find. [05:51] nwhite has joined the channel [05:53] WALoeIII has joined the channel [06:05] _numbers has joined the channel [06:05] _numbers has left the channel [06:11] isaacs has joined the channel [06:14] ajsie has joined the channel [06:16] ajsie: sys.inspect(person) doesnt work [06:16] ajsie: nothing shows up [06:16] mjr_: that returns a string, you have to print it [06:16] mjr_: console.log(sys.inspect(person)); [06:17] mjr_: Hmm, I think there is magic in console.log now to inspect objects easily. [06:17] ajsie: thanks [06:17] ajsie: puts(sys.inspect(person)); also works [06:17] Tim_Smart: Hmm data associated are a weird and magical thing... [06:18] Tim_Smart: associations* [06:18] kjeldahl has joined the channel [06:18] ajsie: and yeah .. console.log(person) also worked =) [06:18] ajsie: great [06:18] Tim_Smart: Also, console.dir() inspects an object, ajsie [06:19] mjr_: oh right, console.dir() [06:19] Anti-X: can't you just do json stringify? [06:19] mjr_: you sure can [06:19] Tim_Smart: Anti-X: Yes, but console.dir() and friends have better output. [06:19] mjr_: Although stringify doesn't get you functions and circular refs. [06:19] mjr_: Other stuff too, I think. [06:20] Anti-X: true [06:20] mjr_: getter / setter, and I think more. [06:20] ajsie has joined the channel [06:20] Tim_Smart: <3 debugging withs test and logging :p [06:20] Tim_Smart: *tests [06:21] ajsie_ has joined the channel [06:21] ajsie_ has joined the channel [06:22] ajsie_: whats the diff between console.log and console.dir [06:22] ajsie_: both gave me the same output [06:22] codetonowhere has joined the channel [06:23] ajsie_: and where can i read more about console. [06:23] ajsie_: is that's in node api or w3 javascript api? [06:24] Anti-X: inspect console [06:24] Anti-X: :P [06:24] mjr_: check out src/node.js:491 [06:25] ajsie_ has joined the channel [06:25] mjr_: wow, console.trace(). I did not know about that either. Neat. [06:25] mjr_: Prints a stack trace right where you are without an exception. [06:26] Anti-X: immediate reaction is fright [06:26] Anti-X: and then you realise.. oh i did that [06:26] mjr_: yeah, it does look like a problem [06:26] mjr_: Then you realize it's an awesome problem. [06:28] hassox has joined the channel [06:29] Tim_Smart has joined the channel [06:29] adambeynon has joined the channel [06:35] jacobolus has joined the channel [06:36] siculars has joined the channel [06:40] ajpiano has joined the channel [06:51] nroot7 has joined the channel [06:51] mde has joined the channel [06:54] nwhite has joined the channel [06:55] Nohryb has joined the channel [06:56] JimBastard: okay, so http://localhost:8080/fs/readFile/server.js/async works now [06:56] JimBastard: that will spit out the server.js file to the browser [06:56] JimBastard: i think thats an OK convention [06:56] maqr has joined the channel [06:56] JimBastard: where is stagas when you need him >.< [07:01] herbySk has joined the channel [07:01] Anti-X: he's bathing in a pool of your brilliance [07:01] JimBastard: o.O [07:02] Anti-X: i'm tired [07:02] Anti-X: get off me [07:02] JimBastard: thats what she said [07:02] Anti-X: she ususally does [07:03] Anti-X: can you carry me to my bed? i cba walking [07:03] Anti-X: it's almost 5 meters [07:06] sveisvei_ has joined the channel [07:06] KungFuHamster_ has joined the channel [07:08] vmthehut has joined the channel [07:09] isaacs: JimBastard: you really must make those requests POSTs [07:09] isaacs: what youer 'doing to HTTP semantics, man, it ain't right. [07:09] JimBastard: isaacs: im working on it right now [07:09] JimBastard: ? [07:09] JimBastard: are you looking through the code? [07:09] isaacs: GET might do all kinds of nonrepeatable actions [07:09] voodootikigod_ has joined the channel [07:10] isaacs: GET /foo should be something you can do a billion times or 1ce with the same effect [07:10] ysynopsis has joined the channel [07:10] isaacs: that's why it's cacheable [07:10] JimBastard: im thinking i will just post a JSON array of arguments, and it will work [07:10] isaacs: suresure [07:10] isaacs: that's better [07:10] JimBastard: ill offer both? [07:10] isaacs: though i guess you can't force people to do the Right Thing with http method semantics, but at least it could be easier to be right [07:10] JimBastard: im contemplating right now over mime types and renderers [07:11] JimBastard: i want to serve the output as : json, html template, xml [07:11] isaacs: i'd just do it with POST, and json both ways [07:11] JimBastard: yeah, that would be a way you could use it for sure [07:11] isaacs: do the html templating once you solve all the other problems [07:11] JimBastard: the html templating is just for docs [07:11] chewbranca has joined the channel [07:11] JimBastard: so when you hit up a module, you can see an ul / li with the methods [07:11] JimBastard: and its "pretty" [07:11] freeall has joined the channel [07:11] isaacs: or, do like couch, and have a special function that you can do to change it, or something [07:12] MikhX has joined the channel [07:12] dtzWill has joined the channel [07:12] isaacs: like, if it returns { header : { "content-type" : "text/html" }, body : stream/string } then do that [07:12] JimBastard: ? [07:12] isaacs: otherwise just json encode the return value [07:12] isaacs: er, i dunno. peanut gallery [07:12] isaacs: i don't really know how this thing works [07:13] JimBastard: im going to try and release 0.2.0 in the morning [07:13] JimBastard: its working right now for the most part [07:13] isaacs: dude, that's in like 2 hours! [07:13] isaacs: hiurry up!! [07:13] isaacs: ;) [07:13] JimBastard: ill add post support [07:13] JimBastard: and ill add basic renderers [07:13] JimBastard: for json and html [07:14] isaacs: it does seem like a very diggable standard for rpc [07:14] isaacs: which is basically what web services are [07:14] saikat has joined the channel [07:15] JimBastard: json-rpc? [07:15] JimBastard: or you mean the project? [07:15] isaacs: nono, i mean your webservices js thing [07:15] JimBastard: yeah ! cool [07:15] isaacs: that's basically what you'er doing [07:15] JimBastard: i think its a neat idea [07:15] JimBastard: people will see that and be like, zomg im gonna make a framework [07:15] isaacs: youer' saying "this module? yeah, you can call its stuff over http" [07:15] JimBastard: aye [07:16] isaacs: that's rad. dangerous, but whatevs. be fucking careful, you know? [07:16] JimBastard: we have a lot of repeated code for our models and json api [07:16] isaacs: yeah [07:16] JimBastard: it could be reduced a lot [07:16] isaacs: webservice(require("fs")) is sortof retarded. [07:16] isaacs: of course. [07:16] JimBastard: LOL [07:16] JimBastard: ohh yeah [07:16] JimBastard: i would never expose fs like that [07:16] JimBastard: ever [07:16] isaacs: almost as bad as webservice(require("child_process")) [07:17] mattly has joined the channel [07:17] JimBastard: its more the proof of concept [07:17] isaacs: you might even want to make sure it's not a native module. [07:17] JimBastard: whats sick, is our models are all event emitters [07:17] isaacs: though, i mean, if it's not on a public port? ehhh that's cool. [07:17] JimBastard: so we can expose our models with this thing [07:17] JimBastard: and boom [07:17] JimBastard: yeah [07:17] JimBastard: the pattern would be to create new modules with limited functionality [07:17] JimBastard: and lock them down [07:17] isaacs: right [07:18] isaacs: then it's basically just message passing between nodes [07:18] JimBastard: ala coldfusion! [07:18] JimBastard: the dnode guys would do this too [07:18] JimBastard: could* [07:18] isaacs: you could also route it, and write shared-nothing functor modules, and then scale horizontally [07:18] JimBastard: o.O [07:18] hassox has joined the channel [07:20] inimino has joined the channel [07:20] isaacs: errrrlrllllllanannnannnnnnaaananannngggggggggggg!!!! [07:21] hdon has joined the channel [07:21] wattz has joined the channel [07:22] Tim_Smart: isaacs: Interesting... [07:22] isaacs: JimBastard: what i'm saying is, why have just one server? [07:22] JimBastard: yeah, i mean you can just broadcast messages [07:22] JimBastard: but there are better protocols for that i would think [07:22] isaacs: not broadcast, no [07:22] isaacs: distribute [07:23] JimBastard: balance? [07:23] isaacs: like, "hey, bunch of servers. here's a list of numbers between 0 and 2billion. please average them for me." [07:23] isaacs: "btw, there are a trillion numbers in the list" [07:23] isaacs: "and, i need it kinda now-ish.. so... hurry up." [07:24] maqr has joined the channel [07:24] badaxx: did anyone ever try to use eco as a templating engine for express? [07:24] Tim_Smart: That makes some send, numbers between 0 and 2 billion, which make up a trillion? [07:25] Tim_Smart: s/send/sense/ [07:25] mikew3c has joined the channel [07:25] Tim_Smart: isaacs: Have you been drinking? [07:25] Tim_Smart: :p [07:26] isaacs: Tim_Smart: no, the numbers are each between 0 and 2bil. [07:26] aconran__ has joined the channel [07:26] isaacs: Tim_Smart: and there are a trillion numbers. [07:26] isaacs: Tim_Smart: it's a google interview question, i believe. [07:27] ThePub has joined the channel [07:27] mde has joined the channel [07:27] HAITI has joined the channel [07:27] isaacs: step 1 is knowing about map/reduce. step 2 is figuring out how to get the average in pieces. then the numbers and the list can be arbitrarily ginormous [07:28] inimino has joined the channel [07:28] delapouite has joined the channel [07:28] xla has joined the channel [07:28] Tim_Smart: ACTION goes back to working in association into his redis orm. [07:30] al-maisan: Hello there! Is there a bug tracker for node.js? [07:31] Tim_Smart: al-maisan: http://github.com/ry/node/issues [07:31] al-maisan: Tim_Smart: thanks! [07:31] jetienne has joined the channel [07:31] Tim_Smart: al-maisan: Mailing list gets more attention though. [07:31] huyhong has joined the channel [07:31] Tim_Smart: nodejs-dev [07:31] al-maisan: ah, I see. [07:32] MikhX has joined the channel [07:34] marshall_law has joined the channel [07:35] tobiassjosten has joined the channel [07:37] huyhong has joined the channel [07:41] skampler has joined the channel [07:41] fod has joined the channel [07:44] aubergine has joined the channel [07:46] romainhuet has joined the channel [07:46] javajunky has joined the channel [07:46] teemow has joined the channel [07:47] ajsie has joined the channel [07:52] sveisvei has joined the channel [07:55] mbrochh has joined the channel [07:59] hassox has joined the channel [08:07] brianmario has joined the channel [08:10] tisba has joined the channel [08:16] Tim_Smart: Hmm blip.tv fails. Player is using 180mb of memoery and 100% cpu [08:20] JimBastard: oofa [08:22] JimBastard: whats the easiest way to assert something is valid xml [08:26] al-maisan: Tim_Smart: is there a separate nodejs-dev list or did you mean http://groups.google.com/group/nodejs ? [08:26] ryan[WIN] has joined the channel [08:27] jetienne: al-maisan: there is another, with -dev. look for it [08:28] ajsie: is it possible to create resources on express? [08:28] JimBastard: what you mean resources? [08:29] JimBastard: like routes? [08:29] JimBastard: or like http://github.com/indexzero/resourcer [08:29] al-maisan: thanks jetienne, found it. I guess it should be added to http://nodejs.org/#links [08:30] ajsie: yeah i mean rescource routes [08:30] aubergine has joined the channel [08:30] ajsie: what does that do? [08:34] tpryme has joined the channel [08:35] gthb has joined the channel [08:35] dgathright has joined the channel [08:39] cognominal has joined the channel [08:39] ph^ has joined the channel [08:40] JimBastard: ajsie: the tests explain [08:40] JimBastard: lots and lots of tests [08:42] pdelgallego has joined the channel [08:45] ajsie: ok [08:46] ajsie: what test framework has been used [08:46] ajsie: jspec? [08:50] hannesw_ has joined the channel [08:51] caolanm has joined the channel [08:51] Ori_P has joined the channel [08:52] aubergine has joined the channel [08:56] shockie has joined the channel [08:56] nwhite has joined the channel [09:01] rauchg_ has joined the channel [09:02] mikeal has joined the channel [09:04] mattikus has joined the channel [09:06] spetrea has joined the channel [09:07] MikhX has joined the channel [09:07] xla has joined the channel [09:07] javajunky has joined the channel [09:08] tilgovi has joined the channel [09:08] slaskis has joined the channel [09:10] tpryme has left the channel [09:13] ivong has joined the channel [09:15] shockie_ has joined the channel [09:16] mattikus has joined the channel [09:16] admc has joined the channel [09:17] shockie__ has joined the channel [09:17] sideshowcoder has joined the channel [09:17] TomY has joined the channel [09:20] zmbmartin has joined the channel [09:21] gthb has joined the channel [09:22] aliem has joined the channel [09:23] virtuo has joined the channel [09:28] badaxx has joined the channel [09:30] markwubben has joined the channel [09:30] hannesw_ has joined the channel [09:31] q_no has joined the channel [09:31] markwubben_ has joined the channel [09:32] Ori_P has joined the channel [09:35] agnat has joined the channel [09:37] robotarmy has joined the channel [09:38] daglees has joined the channel [09:39] shockie has joined the channel [09:41] aubergine has joined the channel [09:41] Ori_P_ has joined the channel [09:41] rnewson has joined the channel [09:42] agnat has joined the channel [09:43] Throlkim has joined the channel [09:43] aubergine_ has joined the channel [09:43] shockie_ has joined the channel [09:45] markwubben_ has joined the channel [09:49] omarkj has joined the channel [09:51] Ori_P_ has joined the channel [09:52] markwubben has joined the channel [09:54] virtuo has joined the channel [09:55] adambeynon has joined the channel [09:56] hellp has joined the channel [09:57] shockie has joined the channel [09:58] jacobolus has joined the channel [09:59] romainhuet has joined the channel [10:01] Ori_P_ has joined the channel [10:03] markwubben has joined the channel [10:04] tilgovi has joined the channel [10:11] Ori_P_ has joined the channel [10:20] TomsB has joined the channel [10:20] jashkenas has joined the channel [10:21] Ori_P_ has joined the channel [10:24] d0k has joined the channel [10:25] aubergine has joined the channel [10:26] ooooPsss has joined the channel [10:28] TobiasFar has joined the channel [10:31] Ori_P_ has joined the channel [10:35] Akufen has joined the channel [10:35] Akufen has joined the channel [10:35] admc has joined the channel [10:39] vilhonen has joined the channel [10:39] vilhonen: is there a job scheduler library for node.js? [10:39] vilhonen: I would like to schedule some function to be ran at some time [10:40] vilhonen: if not how it should be implemented? [10:40] vilhonen: looping every second and checking the time or what? [10:41] Ori_P_ has joined the channel [10:42] omarkj: vilhonen: That's one way of doing it. [10:42] omarkj: vilhonen: But for that kind of stuff I just rely on cron. [10:42] pquerna: vilhonen: for simple things, setTimeout. [10:42] d0k has joined the channel [10:43] pquerna: for 'real' job scheduling, reliable against restarts, etc, you'd want to at least journal outstandin things etc, don't think there is something already made in node. [10:43] vilhonen: hmm I guess I'll figure out a way to use cron [10:44] vilhonen: executing node script in cron and calling some api via dnode or something similar [10:44] agnat: vilhonen: a quick look on the node modules page gives me : 'node-cron — Schedule callbacks with cron syntax' ... don't know if it is good though... [10:45] vilhonen: agnat: thank you very much, I don't know how I managed to miss that [10:50] jashkenas has joined the channel [10:50] admc_ has joined the channel [10:53] jashkenas has joined the channel [10:57] kjftw has joined the channel [11:00] hassox has joined the channel [11:02] path[l] has joined the channel [11:05] spetrea: what's the deploying procedure for high-performance or high-availability web apps in node.js ? for apache I know ppl use varnish fastCGI, WSGI , nginx and whatnot .. how about node.js ? [11:06] vilhonen: you can set up any reverse http proxy you like to balance the traffic across you node instances [11:07] vilhonen: reverse proxy is quite easily also implemented in node.js itself [11:07] vilhonen: can be [11:11] zorzar_ has joined the channel [11:14] Nohryb has joined the channel [11:15] ysynopsis1 has joined the channel [11:26] elliottkember_ has joined the channel [11:27] wao: w 22 [11:30] aheckmann has joined the channel [11:33] javajunky: spetrea: I use nginx myself, its evented nature lends itself more cleanly to the node.js way of things [11:34] jacobolus has joined the channel [11:35] err_ok has joined the channel [11:35] vilhonen: javajunky: how the evented nature shows to the end user? [11:36] zemanel has joined the channel [11:40] Ori_P has joined the channel [11:47] zemanel: its a me Mario [11:49] nerdEd has joined the channel [11:55] mikeal has joined the channel [11:56] javajunky: vilhonen: I doubt it would, but if you're using node for its C10K+ capabilities (you may not), then you want a forward proxy that can serve it sufficiently :) [11:56] vilhonen: javajunky: good point [11:57] c4milo has joined the channel [11:58] dnolen has joined the channel [12:01] tilgovi has joined the channel [12:02] aglemann has joined the channel [12:05] jacobolus has joined the channel [12:06] gthb has joined the channel [12:06] sveisvei_ has joined the channel [12:09] gerad has joined the channel [12:11] matschaffer has joined the channel [12:11] beawesomeinstead has joined the channel [12:17] gthb has joined the channel [12:21] path[l] has joined the channel [12:24] bradleymeck1 has joined the channel [12:27] admc_ has joined the channel [12:27] admc has joined the channel [12:30] wakawaka has joined the channel [12:31] siculars has joined the channel [12:33] niemeyer has joined the channel [12:36] badaxx: hey I'm trying to provide static data with express.js via the staticProvider but somehow I always get sth like "Cannot GET /images/backgorund-noise.jpg" [12:40] badaxx: oh okay, typo. works now -.- [12:41] kjeldahl_ has joined the channel [12:44] jetienne_ has joined the channel [12:49] davidsklar has joined the channel [12:50] mischief has joined the channel [12:57] aubergine has joined the channel [13:09] ysynopsis has joined the channel [13:10] ceej has joined the channel [13:10] jacobolus has joined the channel [13:13] delapouite has joined the channel [13:13] jchris has joined the channel [13:14] rkieffer has joined the channel [13:15] EyePulp has joined the channel [13:16] davidwalsh has joined the channel [13:21] jherdman has joined the channel [13:22] mikew3c has joined the channel [13:23] CrabDude has joined the channel [13:23] trotter has joined the channel [13:23] guid has joined the channel [13:24] dipser has joined the channel [13:25] aconbere has joined the channel [13:31] figital has joined the channel [13:36] dohtem has joined the channel [13:36] dohtem has joined the channel [13:41] CrabDude has joined the channel [13:41] admc_ has joined the channel [13:41] admc has joined the channel [13:41] jakehow has joined the channel [13:41] mizerydearia has joined the channel [13:44] ghiu has joined the channel [13:46] shockie: is there a .ini file parser available for node? [13:47] adambeynon has joined the channel [13:50] jacobolus: shockie: you could port this one from python http://refactormycode.com/codes/143-ini-file-parser [13:51] jacobolus: looks pretty simple [13:53] Sembiance: morning :) [13:55] pgriess has joined the channel [13:58] jacobolus has joined the channel [14:00] ghiu: is there any fast and reliable mysql client for node? [14:01] Tim_Smart: ghiu: node-mysql isn't half bad. [14:01] adambeynon has joined the channel [14:01] Tim_Smart: ghiu: http://github.com/ry/node/wiki/modules#database [14:02] ghiu: i've tried them [14:02] ghiu: they don't seem to be very performant [14:02] Tim_Smart: http://github.com/Sannis/node-mysql-libmysqlclient ? [14:02] ghiu: sannis' the faster [14:03] matt_c has joined the channel [14:03] Tim_Smart: I have never used mysql with node, so take your pick. [14:03] ben_alman has joined the channel [14:03] ghiu: did you try mongo? [14:04] Tim_Smart: Nope. I'm a redis guy. [14:04] ghiu: how does redis handle persistance? [14:04] pquerna: And I'm a cassandra guy. [14:04] Tim_Smart: ghiu: Append only file. [14:05] Tim_Smart: ghiu: And / or replication. [14:05] Tim_Smart: You can disable the append only file if you want a in-memory store. [14:05] ghiu: did you have experience in using redis in a large / stable production environment? [14:05] nerdEd has joined the channel [14:05] Tim_Smart: Nope. [14:06] Tim_Smart: ;) [14:06] Tim_Smart: I'm working on a ORM for it atm, so maybe soon... [14:06] ghiu: what are the advantages of redis over mongo? [14:07] JRCARR2 has joined the channel [14:07] Tim_Smart: ghiu: Well redis is a low level 'data store', rather than a document store. [14:07] ghiu: more like a pure k/v datastore? [14:07] ghiu: so i guess it has limited querying capabilities [14:07] Tim_Smart: ghiu: Yes, except it has sets, sorted sets, hashes, and normal key / value. [14:08] Tim_Smart: So how you store your data is up to you. [14:08] Tim_Smart: Oh, and lists. [14:08] ghiu: i see [14:08] ghiu: i'm really intrigued by mongo and couchdb in conjunction with node [14:08] JimBastard: i think http://github.com/marak/webservice.js is just about ready for release [14:08] Tim_Smart: But yes, that means you have to implement your own indexes with redis. [14:09] JimBastard: anyone wanna take a peek? [14:09] jetienne_: mongodb got some weird licensing, agpl. from memory [14:09] JimBastard: brb [14:09] omarkj: ghiu: I'm using Mongo on production with node (and other services). [14:09] ghiu: their json-like sets seems the perfect match to use with it, so use js clientside / serverside / data side [14:09] Tim_Smart: I'm working on a ORM that abstracts associations, indexing and views for redis. [14:09] omarkj: It's under the AGPL, not really that weird. [14:09] jetienne_: omarkj: it is agpl3 no ? does this mean you have to release your own code in gpl ? [14:10] ghiu: omarkj: how is your experience so far? [14:10] loincloth has joined the channel [14:10] jetienne_: omarkj: my reasoning is "there are many alternative to mongodb with less restrictive licenses. why bother with this one ?" [14:11] omarkj: jetienne_: It's a valid point. But AGPL basically fixes a loophole in the GPL when it comes to SaaS solutions. Since we're not doing any major work in the MongoDB codebase this hasn't had an effect on us. [14:12] zmbmartin has joined the channel [14:12] jetienne_: omarkj: ? agpl = if you connect via network to this code, you need to be gpl compatible [14:12] jetienne_: omarkj: your stuff is gpl compatible ? [14:13] jetienne_: maybe im missing something [14:13] omarkj: jetienne_: "Note however that it is never required that applications using mongo be published." [14:14] omarkj: jetienne_: You can create software that uses mongo without releasing that software as GPL. [14:14] omarkj: ghiu: We haven't had any major problems with it, maybe just a lack of tested libraries. But that's getting better by the month. [14:14] jetienne_: omarkj: how come ? isnt that the whole point of agpl ? [14:14] omarkj: jetienne_: No, not the point og AGPL and not the point of GPL. [14:15] dilvie has joined the channel [14:16] jetienne_: The terms "Affero clause", "Affero requirement" and "Affero provision" are occasionally used to refer generically to free software/open source licensing provisions requiring availability of source code when licensed software is deployed as a network service. <- im not lawyer but it seems to say otherwise, no ? [14:17] pquerna: afaik, they on;y license mongo in AGPL, but looser licences on the libraries and/or exceptions for client libraries [14:17] eponym has joined the channel [14:18] pquerna: but either way, its a license I'd prefer to avoid. [14:18] streampunk has joined the channel [14:20] omarkj: jetienne_: But if I were to change MongoDB to fit my needs I would be required to made those changes available. [14:20] omarkj: At lease according to the lawyer we got to read the license. :) [14:20] omarkj: least* [14:21] jetienne_: just for that i find it weird... [14:21] pquerna: well, companies see mysql's exit as a success [14:21] pquerna: so to emulate that, some like mongo are using the agpl. [14:22] jetienne_: sure but there are alternatives with less restrictive licenses... mongo will succeed if it got users [14:23] jetienne_: mysql got a lot of users, history helped thelm a lot during the 90's [14:23] jetienne_: well just my thoughts [14:24] omarkj: Well, MongoDB has a growing base of users. [14:24] omarkj: ..growing userbase. [14:24] EyePulp: ACTION is installing mongo as we speak [14:24] hoodow has joined the channel [14:24] jetienne_: be sure to get a lawyer first :) [14:25] omarkj: 10Gen wrote about the licensing here: http://www.mongodb.org/display/DOCS/Licensing [14:25] jetienne_: ok silly joke i shouldnt have [14:25] EyePulp: =P [14:26] matt_c: omarkj: I still think that's a misinterpretation of the AGPL, but community use counts for something. I could be totally wrong too. [14:26] EyePulp: I can promise if I'm making changes to the mongo source, you don't want my code. run away. [14:27] omarkj: EyePulp: Hah, but it's not often you find yourself in a need to do that. [14:30] femtoo has joined the channel [14:30] softdrink has joined the channel [14:33] EyePulp: interesting - installing mongodb via macports, and it's pulling in sqllite as a dependancy [14:33] aubergine has joined the channel [14:34] hoodow has joined the channel [14:35] adambeynon has joined the channel [14:36] dnolen has joined the channel [14:36] sudoer has joined the channel [14:38] sonnym has joined the channel [14:41] rwaldron has joined the channel [14:41] Tim_Smart: EyePulp: Hah. Then you look at the source code and it is just mapping everything to sqlite... [14:41] EyePulp: greeeeat [14:41] aconbere has joined the channel [14:42] EyePulp: l8r folks [14:43] ajpiano has joined the channel [14:45] Yuffster has joined the channel [14:50] agnat_ has joined the channel [14:54] boaz_ has joined the channel [14:55] mjr_ has joined the channel [14:57] rmetzger has joined the channel [14:57] wink_: bradleymeck: are you awake this early? [14:57] bradleymeck: ya [14:57] wink_: did you see my msg from yesterday? [14:57] bradleymeck: yep, np [14:57] wink_: <3 [14:58] wink_: just wanted to make sure you got it, i really appreciate it [14:58] wink_: and it appears to be stabilizing, although i learned a couple of things about the mongo protocol im not a big fan of [15:00] nefD: hm. so, i'd like to be able to send messages/signals back and fourth between two running node scripts.. any tips or suggestions? [15:02] Anti-Zzz: if one is a child process you can use stdin/out [15:02] Anti-Zzz: you can still do that if its not a child though probably, i just dunno how [15:02] Tim_Smart: Use a named unix socket. [15:03] marshall_law has joined the channel [15:03] Anti-Zzz: see, that's the kind of thing that doesn't pop into your head when you're not a unix dev [15:05] ajpiano has joined the channel [15:05] SubStack: nefD: also, dnode! [15:06] hoodow has joined the channel [15:06] nefD: Tim_Smart: Hmm.. so would I set up a net server and listen on a unix socket rather than a port? I know next to nothing about unix sockets.. [15:06] nefD: SubStack: Is that a module? [15:06] SubStack: yes [15:07] SubStack: http://github.com/substack/dnode [15:10] tilgovi has joined the channel [15:12] nefD: SubStack: *beautiful*. And i'm guessing it'll be no problem to have two scripts running on the same host, and have them act as both clients *and* servers? (ie: they can both send messages to the other)? [15:12] SubStack: yep, it's bi-directional by design [15:13] Tim_Smart: dnode looks cool. [15:13] nefD: SubStack: badass. You are the man.. [15:13] Nohryb has joined the channel [15:13] Tim_Smart: I wouldn't use it if performance was a goal though. [15:14] SubStack: well, you don't use network rpc if you want low latency [15:14] Tim_Smart: Yeah. [15:14] SubStack: Tim_Smart: amusingly, pkrumins and I use it to pass framebuffer updates around [15:14] SubStack: and it's pretty fast at doing that [15:15] Tim_Smart: Nice. [15:15] nefD: hmm.. so theres a performance hit going this route? even if both ends of communication are running on the same machine? [15:15] SubStack: nefD: I wouldn't worry about performance until it's a measurable issue [15:15] Tim_Smart: nefD: Well it has to serialise everything into JSON etc. [15:15] nefD: i mean, for my use a performance hit isn't too much of an issue.. we aren't talking any more than once every couple seconds at the very most [15:16] Tim_Smart: nefD: OK you will be fine. [15:16] nefD: suuuu-weet [15:16] SubStack: this is like a microsecond or two depending on the complexity of the message [15:16] nefD: OH- hey [15:16] vmthehut has joined the channel [15:16] SubStack: well, only a microsecond for pretty large messages given my tests [15:17] nefD: SubStack: You're one of the guys behind stackvm? with pkrumins? [15:17] SubStack: yep [15:17] nefD: :D! [15:17] SubStack: dnode is one of our spin-off modules [15:17] nefD: i signed up for the beta.. can't wait for that to start up [15:17] ryah: h [15:17] nefD: will probably be able to convince my cto to get us signed up for whatever payment plan once its ready [15:18] Tim_Smart: ryah: i? [15:18] SubStack: nefD: wowsy, awesome! [15:18] halfhalo: ACTION managed to get basic plugin support running for his irc class and is working on twitter, rss, and palm-xml plugins [15:18] matschaffer has joined the channel [15:18] SubStack: nefD: also #stackvm [15:19] c4milo: anybody is using jslint with nodejs ? [15:19] Tim_Smart: ACTION is almost done getting associations into his redis ORM [15:19] jakehow has joined the channel [15:19] Tim_Smart: c4milo: Nope, but it isn't a bad idea at all. [15:21] halfhalo: Its pretty sad when I spent an hour yesterday yelling at my code for not loading the modules in the plugins folder correctly until I realized I forgot to actually put anything in the files it was loading... and console.log(e) in a catch statement is weird.... [15:21] matschaffer: c4milo: I've been using jslintrb on code that runs on node.js. But might not be quite what you're getting at [15:22] c4milo: I found this project http://github.com/reid/node-jslint [15:22] c4milo: but it doesn't install , npm throws an error [15:23] halfhalo: but I need halps with mah plugins... well, more with the design of the system than anything [15:24] matschaffer: c4milo: might just be an npm problem. Try just using a clone of the repo, maybe? [15:24] c4milo: anyway, I'm going to clone it [15:24] c4milo: matschaffer: yes [15:24] matschaffer: c4milo: great minds :) [15:24] halfhalo: I don't know if it is better to send all plugins the recieved data from irc, or have a system setup that directs it to the correct one... [15:25] c4milo: hum [15:25] c4milo: seems like package.json is wrong, it lacks of name field, at least that's what npm says [15:26] matschaffer: halfhalo: I'd say it depends on how much data you anticipate [15:26] c4milo: http://github.com/reid/node-jslint/blob/master/package.json#L1 [15:26] skampler has joined the channel [15:26] c4milo: puff [15:26] halfhalo: I'm not worried about data perse, but multiple response messages from different plugins [15:26] evanpro has joined the channel [15:28] matschaffer: halfhalo: sounds like that could be useful in some cases though, maybe a way to have one response take priority? Kinda like the L flag in mod_rewrite? [15:28] halfhalo: And if I do it the second way, then it makes writing a logging plugin much more difficult since I would have to make a special case for plugins like that or put it in with the core plugin group (which right now consists of a db plugin, an auth plugin, and a messageParser plugin, all of which get passed to "regular" plugins) [15:30] matschaffer: halfhalo: sorry, gotta run [15:30] halfhalo: the way I would do the second would be to have a unique short name for each plugin (for twitter it would be... twitter or for facebook just fb) and would activate it [15:30] halfhalo: and np [15:30] halfhalo: just typing it lets me think it through completely and lets other people respond as well [15:33] Kami_ has joined the channel [15:35] prettyrobots has joined the channel [15:36] aconbere has joined the channel [15:36] Guest61869 has joined the channel [15:38] sprout has joined the channel [15:38] timemachine3030 has joined the channel [15:39] benburkert has joined the channel [15:39] bigmack83 has joined the channel [15:40] tisba_ has joined the channel [15:40] Sami_ZzZ has joined the channel [15:41] bigmack83: Anyone here familiar with java?I'm asking because I'm wanting to make a game.I was going to use java.but a friend mentioned it might be beneficial to make the client in java that talks to a node.js backend for the realtime updates [15:41] bigmack83: Just wondering if I could get some input at al.I don't know much about node.js yet [15:42] halfhalo: mmmmmmm [15:42] rkieffer has joined the channel [15:42] halfhalo: circular...... [15:42] frodenius: so, if you do your game in java, do the server in java too [15:42] bigmack83: I'm not even sure if its the right/best solution [15:42] frodenius: there is no 'right' here [15:42] JimBastard: java is never the answer son [15:42] bigmack83: That's what I was thinking of at first. [15:43] bigmack83: Lol [15:43] halfhalo: Java IS the answer if you hate yourself though... [15:43] frodenius: you will have to code it, if you know javascript as well as java, then maybe you should do it [15:43] JimBastard: you make game in canvas on browser [15:43] bigmack83: Well I want a downloadable client [15:43] JimBastard: ill take my producers credit in the study [15:44] paulwe has joined the channel [15:45] bigmack83: I was thinking about a canvas/svg combination,but there is graphics limitations doing it like that and using php(which is what I know as a primary language) [15:46] bradleymeck: is there any way to get the http status code off a window in the browser [15:46] tj has joined the channel [15:46] bigmack83: Another reason I was thinking a java client was because I will have it so ppl can host their own games on ther own servers. [15:47] bigmack83: So I'm not sure if that level of stuff can be done with node.js [15:47] nefD: bigmack83: I was able to get a C#/Mono app to communicate with a node.js server just fine.. I don't see why it wouldn't work with java.. I have no idea about scalability though [15:48] ben_alman has joined the channel [15:48] bigmack83: Well I've always seen scalability as the skill of the developer and how its designed.so if its done right... [15:48] Blink7 has joined the channel [15:49] bigmack83: Just that I'm still trying to find that best way. [15:49] frodenius: scalability is not an issue you should be concerned with when starting game development [15:50] frodenius: or rather, when you don't know if your game will attract thousands of people [15:50] bigmack83: Well if its all built right,scalability will just work [15:50] bigmack83: Well yea [15:52] nsm has joined the channel [15:52] robotarmy has joined the channel [15:52] JimBastard: nooo more blogggginnn ahhh [15:53] JimBastard: tests and blogging all night [15:53] JimBastard: wtf [15:53] JimBastard: THATS NOT CODING [15:53] SubStack: tests aren't coding? [15:53] SubStack: unit tests? [15:53] JimBastard: i liked it better when i wrote code in a box that no one else saw [15:53] JimBastard: SubStack: it is..lol [15:53] JimBastard: also, congrats on you guys getting into y comb. im putting down cash that says you'll make it [15:54] mtodd has joined the channel [15:54] JimBastard: ahaha , premature [15:54] bradleymeck: jimbastard blog faster! [15:54] SubStack: JimBastard: hah we haven't even applied yet [15:54] JimBastard: IM BLOGGIN AS FAST AS I CAN [15:54] JimBastard: SubStack: just dont mess up the application and you are in [15:54] JimBastard: you guys are too good to turn down [15:54] SubStack: roger [15:54] mischief has joined the channel [15:54] mischief has joined the channel [15:55] SubStack: we just need to hurry up and launch already I think [15:55] matt_c has joined the channel [15:57] bradleymeck: ACTION waves fist at lack of time [15:57] Blink7 has joined the channel [15:58] bradleymeck: and i think both of you need to launch XD [15:58] dylang: Is there a way to short circuit or dirty the connect middleware cache? [15:59] dylang: or ignore for certain requests [16:00] stephank has joined the channel [16:00] jspiros has joined the channel [16:01] virtuo has joined the channel [16:03] q_no has joined the channel [16:03] JimBastard: bradleymeck: working on it! [16:03] vmthehut has joined the channel [16:03] JimBastard: also doing consulting work / raising more cash [16:03] JimBastard: hopefully getting 50k or so in the next month [16:03] ph^ has joined the channel [16:03] JimBastard: >.< [16:03] dgathright has joined the channel [16:03] bradleymeck: wish i was getting paid for node lol [16:04] bradleymeck: so no complinain! [16:04] JimBastard: you looking for any consulting work? [16:04] JimBastard: i dont have anything immediately, but we are trying to fill up our pipeline atm [16:06] stephank: Anyone here formed an opinion on ØMQ (zeromq.org)? I was thinking about doing some experiments with it, in combination with node.js somehow. [16:07] mtodd has joined the channel [16:07] bradleymeck: i could do some consulting, but would need a firmer base upon what i would consult about [16:07] JimBastard: node.js stuff [16:07] olauzon has joined the channel [16:07] wink_: stephank: yes, 0mq is pretty awesome, binding it to node is gonna be a little quirky though [16:07] JimBastard: seems most clients need web-service stuff or scraping [16:08] JimBastard: but could be anything [16:08] JimBastard: ill keep you posted [16:08] stephank: wink_: Sounds like you've given it some thought? [16:08] bradleymeck: i do a lot of scaping already haha [16:08] wink_: stephank: i have :> [16:09] wink_: it's definitely doable, but i havent had a chance to dig into it [16:09] wink_: i just finished rewriting the mongo binding so it works properly now :> [16:09] stephank: I see :) [16:10] wink_: basically the challenge is going to be that zeromq's 'socket' isnt really a socket [16:10] wink_: its an abstraction on top of N number of fd's, so wiring libev directly on top of it's file descriptors to handle eventing isnt really feasible [16:11] wink_: but a worker thread handling zeromq's io and signaling back to the binding that there were 'io' events is probably the way to do it [16:11] pgriess has joined the channel [16:12] stephank: This may be a stupid idea, but what about replacing libev in node.js itself? [16:12] gerred has joined the channel [16:12] wink_: what do you mean? [16:13] stephank: Well, ØMQ has a poll call that takes ØMQ sockets /and/ regular sockets. It seems possible, but I've only skimmed the node.js code. [16:14] wink_: i think 0mq opens up a lot of interesting possibilities for doing cheap IPC between node processes [16:14] wink_: which would be badass :> [16:14] SubStack: meh [16:14] stephank: absolutely :) [16:15] JimBastard: i hope people dont hate me for bringing coldfusion ideas to node.js [16:15] JimBastard: /not really [16:15] c4milo: :s [16:15] c4milo: people kidding usually say the true :P [16:15] banjiewen has joined the channel [16:16] banjiewen has joined the channel [16:18] langworthy has joined the channel [16:18] franksvalli has joined the channel [16:23] aubergine has joined the channel [16:23] mif86 has joined the channel [16:25] rikarends has joined the channel [16:25] bradleymeck: jimbastard, depends on the ideas :) [16:25] Nohryb has joined the channel [16:25] rikarends: hi guys, hows the binary compatibility of nodejs modules going? [16:25] rikarends: will it be frozen from 0.3.0 or is 0.2.x compatible with 0.3.0 [16:26] rikarends: or is it up to v8 [16:26] isaacs has joined the channel [16:27] devinus has joined the channel [16:29] bpot has joined the channel [16:30] isaacs: c4milo: hey [16:30] isaacs: saw you wrestling with npm in the logs. everything get sorted? [16:31] c4milo: isaacs: huh ? [16:31] c4milo: isaacs: how can I update npm ? [16:31] isaacs: c4milo: seems like package.json is wrong, it lacks of name field, at least that's what npm says [16:31] isaacs: ^ [16:31] isaacs: c4milo: what version do you have now? [16:32] c4milo: 0.1.27 [16:33] iwasbiggs has joined the channel [16:34] sprout has joined the channel [16:35] c4milo: isaacs: 0.1.27 [16:36] isaacs: c4milo: great. curl http://npmjs.org/install.sh | sh [16:36] isaacs: c4milo: or, get the code, and do "make" [16:36] c4milo: hum [16:36] c4milo: isaacs: it doesn't work [16:36] isaacs: c4milo: orly? [16:36] isaacs: gist? [16:37] dilvie: I was missing a couple dependencies when I installed npm. After installing the dependencies, it worked fine. [16:37] dilvie: I don't remember what they were. [16:38] c4milo: isaacs: http://gist.github.com/595642 [16:38] isaacs: dilvie: dependencies? the only dependency should be tar (and curl, for the easy install script) [16:38] c4milo: isaacs: I know using sudo isn't recommended [16:38] isaacs: c4milo: you need to sudo the sh, not the curl [16:38] isaacs: and yes, it's not recommended [16:38] c4milo: ouch ! [16:38] isaacs: ;) [16:38] c4milo: ahaha, crap, I need to sleep [16:39] prettyrobots has joined the channel [16:39] hoodow has joined the channel [16:39] isaacs: c4milo: you could also wrap the whole thing in parens, i think [16:40] isaacs: c4milo: sudo (curl .... | sh ) [16:40] isaacs: then it'll subshell [16:40] amerine has joined the channel [16:41] dilvie: isaacs: Hmmm.. "should" is the operative word, I think. The install failed twice. I was installing on turnkey linux core (very stripped down) ubuntu hardy [16:41] steadicat has joined the channel [16:41] isaacs: dilvie: can you gist the output from the times when it failed? [16:42] isaacs: npm doesn't fail. it just tells you that yoer' doing something wrong ;) [16:42] isaacs: or it tells you that I'M doing something wrong... [16:42] dilvie: isaacs: it failed very gracefully. =) [16:42] isaacs: hehe [16:42] dilvie: isaacs: I was very impressed. =) [16:42] isaacs: like a ballet dancer falling off a truck [16:42] dilvie: isaacs: yeah. [16:42] dilvie: exactly like a ballet dancer falling off a truck. [16:43] isaacs: anyway, yeah, logs. gist them. [16:43] mikew3c_ has joined the channel [16:43] dilvie: isaacs: does it keep install logs somewhere? [16:43] isaacs: dilvie: no, it just spews them out to stderr [16:43] isaacs: i should really have it keep some kind of log, or write to the console or something, but.. meh. [16:43] dilvie: isaacs: d'oh.. I didn't really consider it an error if I needed to install dependencies, so I didn't think to log and report. [16:43] isaacs: is ee [16:44] digitaltoad has joined the channel [16:44] dilvie: isaacs: if you grab a fresh turnkey linux core, you can reproduce it. [16:44] isaacs: dilvie: when you say "dependencies", you mean dependencies for npm itself? [16:44] isaacs: dilvie: ie, installing node and gnu tar? [16:44] dilvie: isaacs: I just mean I needed to install a couple other packages BEFORE I installed NPM, and no, I'm not talking about node. That was installed. ;) [16:44] isaacs: is ee. [16:44] dilvie: I may have had to install tar. [16:45] isaacs: that could be it, but that's SUPER odd, since I think ubuntu requires tar to work [16:45] dilvie: it was a very new, very stripped down turnkey core. [16:45] isaacs: doesn't apt-get use it? [16:45] dilvie: I don't know.. maybe. [16:45] langworthy has joined the channel [16:46] dilvie: isaacs: if you're really curious, grab a turnkey core (they're free) and run your installer on it. [16:46] dilvie: before installing anything else. [16:46] isaacs: well, anything except node [16:46] dilvie: npm was one of the first packages I installed. =) [16:46] isaacs: kewl :) [16:46] dilvie: <-- npm fanboy [16:46] isaacs: the next batch of no.de machines will come with npm pre-installed [16:47] isaacs: <-- also npm fanboy ;) [16:47] dilvie: rock and roll [16:47] isaacs: actually, no, i've learned to sort of hate it a little. [16:47] isaacs: i love it like a toddler that keeps shitting on the carpet. [16:47] dilvie: LOL [16:47] tjholowaychuk: hahaha [16:48] tjholowaychuk: when do I get to npm instsall isaacs [16:48] mw_ has joined the channel [16:48] isaacs: tjholowaychuk: i'm not sure i want you installing me. [16:48] isaacs: that's a little personal. [16:49] tjholowaychuk: hahaha [16:50] mattly has joined the channel [16:51] ooooPsss has joined the channel [16:51] virtuo_ has joined the channel [16:51] bpot has joined the channel [16:51] steadicat has joined the channel [16:52] daglees has joined the channel [16:52] xslasherx has joined the channel [16:53] dgathright has joined the channel [16:54] zmbmartin: did search get removed from npm? [16:54] isaacs: zmbmartin: it was never in it [16:54] ooooPsss has left the channel [16:55] isaacs: zmbmartin: i have a pull req to implement a fancy thing that bradleymeck wrote, but i haven't gotten to it yet. too much jsconf/joyent work [16:55] ooooPsss has joined the channel [16:55] isaacs: and they pay me... so... they win. [16:55] zmbmartin: It wasn't oh I thought that it was [16:55] benv has joined the channel [16:55] isaacs: zmbmartin: there's "npm ls foo" to search for stuff, though [16:55] zmbmartin: isaacs: cool thanks [16:55] isaacs: zmbmartin: and "npm view connect@latest" will show you its package.json [16:56] niko has joined the channel [16:56] halfhalo: What about npm make measamich? [16:56] halfhalo: :p [16:56] tjholowaychuk: isaacs: cool didnt know that [16:56] Anti-X: npm install sammich [16:56] tjholowaychuk: kinda wish console.log() would check isatty and show colors [16:56] tjholowaychuk: though [16:56] isaacs: tjholowaychuk: that'd be nice, yeah [16:56] bradleymeck: mmm? [16:56] isaacs: tjholowaychuk: once my stdio stuff gets in (0.3.x), it'll work like that. [16:57] tjholowaychuk: nice! [16:57] Anti-X: interstring [16:57] isaacs: tjholowaychuk: there's actually no way to check for isatty atm, but it'll be something like stdio.isATTY( stdio.stdin ) [16:57] dylang: tjholowaychuk: do you know how you fixed the caching redirect problem? http://github.com/senchalabs/connect/issuesearch?state=open&q=cache#issue/84 [16:57] isaacs: or stdio.isStdinATTY() [16:57] zmbmartin: tjholowaychuk: is there inflection built into express or a recommended plugin [16:58] tjholowaychuk: zmbmartin: funny you ask, early this morning I was working on one [16:58] tjholowaychuk: that will be in npm soonish [16:58] halfhalo: Well damn.. I'm at the stage where ihave to use regex for input handling... And I suck at regex [16:59] tjholowaychuk: dylang: so long ago I cant remember, the cache() middleware? I dont even remember what that was about [16:59] zmbmartin: tjholowaychuk: cool [16:59] tjholowaychuk: but that middleware sucks [16:59] tjholowaychuk: its kinda useless to be honest [16:59] tjholowaychuk: aside from very static sites [17:00] dylang: tjholowaychuk: i figured the cache middleware would be a performance boost, but i do hate that i can't dirty or kill it on a per-request basis. [17:00] tjholowaychuk: I wouldnt use it [17:00] tjholowaychuk: I think tim built it mostly for the blog thing [17:00] tjholowaychuk: wheat [17:00] rauchg_ has joined the channel [17:00] rauchg_ has left the channel [17:01] tjholowaychuk: but other than something like that I wouldnt use it [17:01] dylang: tjholowaychuk: the site i use it for is mostly static - http://opowerjobs.com/ - content only changes when we add or remove jobs. [17:01] noahcampbell has joined the channel [17:01] tjholowaychuk: thats the thing though, with that middleware it could be displayed very late, and disregard authenticated users all together blah blah [17:02] tjholowaychuk: its just not good to have your cache strategy be "cache everything" [17:02] dylang: tjholowaychuk: yeah i always thought that was wierd. [17:02] SubStack: isaacs: oh I have learned to hate npm too, diving into the code a few months back [17:02] SubStack: but I still use it everywhere [17:03] halfhalo: I use npm everywhere but my work mpb, where it somehow got itself messed up and i can't be arsed to fix it [17:04] SubStack: rm -rf $(npm config get root) [17:04] isaacs: SubStack: i like to think it's a halfway decent approach to a fundamentally tricky problem set. [17:04] SubStack: hard problems are hard like that [17:04] isaacs: SubStack: you can also "make uninstall" which just removes npm and its stuff, but not the installed libs [17:04] SubStack: nifty [17:04] WALoeIII has joined the channel [17:05] isaacs: i should add a "make scorch-the-earth" that removes *EVERYTHING* [17:05] isaacs: even the .npmrc [17:06] SubStack: npm apocalypse [17:06] SubStack: then you don't have to hunt down the source dir [17:06] isaacs: right [17:07] SubStack: perfect for those late-night flights of rage [17:07] isaacs: hehe [17:07] siculars has joined the channel [17:08] deepthawtz has joined the channel [17:08] mytrile has joined the channel [17:09] halfhalo: Yeah... But as of right now the two things I need, underscore and express, are installed so it's to much effort to fix it [17:09] SubStack: my problem is that I write code and am concerned about it being shit [17:09] SubStack: then I write unit tests and once they pass I don't care anymore [17:09] jbenesch has joined the channel [17:09] LFabien has joined the channel [17:10] halfhalo: Now, see, I work for a school, I couldn't care less about the quality of code. [17:10] noahcampbell has joined the channel [17:10] SubStack: I work for a company that doesn't even exist yet [17:10] halfhalo: As long as it works and can be easily maintained, im happy [17:12] halfhalo: ACTION is going to break the extremely loud clock in this room in a second... [17:13] cferris has joined the channel [17:17] deepthawtz has joined the channel [17:19] mjr_ has joined the channel [17:20] dgathright has joined the channel [17:21] MikhX has joined the channel [17:22] pgriess1 has joined the channel [17:23] hoodow has joined the channel [17:24] benburkert has joined the channel [17:26] ajpiano has joined the channel [17:27] MikhX_ has joined the channel [17:27] prettyrobots has left the channel [17:31] Gla has joined the channel [17:32] Gla: hey guys, anyone here ? [17:32] markt has joined the channel [17:32] codemanki has joined the channel [17:32] markt has joined the channel [17:34] xAFFEE has joined the channel [17:37] langworthy has joined the channel [17:37] ashleydev: where's a good example of an express app using mongodb [17:37] ashleydev: ? [17:38] rkieffer has joined the channel [17:38] codemanki: Hello. maybe this is not a right channel, but nevertheless, when i install npm i always get this error - Error: EACCES, Permission denied '/usr/local/bin/npm@0.2.2' [17:38] tjholowaychuk: source? [17:38] tjholowaychuk: ashleydev: source code or just an app using that? [17:38] mjr_: codemanki: do you own /usr/local ? [17:38] ashleydev: tjholowaychuk: source [17:39] tg: codemanki: you can set install path in ~/.npmrc [17:39] ngw has joined the channel [17:39] tjholowaychuk: ashleydev: ah nvm :p [17:39] codemanki: yes..i tried to install in ~/local [17:39] rikarends_ has joined the channel [17:39] codemanki: but in this case, node js throws me an error when tries to bind to ANY port...connection refused [17:39] digitaltoad has joined the channel [17:40] ashleydev: tjholowaychuk: docs say that express comes with mongo support built in, but I don't see it. [17:40] tjholowaychuk: :s [17:40] tjholowaychuk: no they dont [17:40] tjholowaychuk: where do they say that?.. [17:40] ashleydev: hmmm [17:40] tjholowaychuk: it doesnt though I can garantee you that :p [17:40] JimBastard: damn, so close [17:40] ashleydev: ACTION digs up a link... maybe it was on some slides [17:40] sstreza: hey guys. i have a javascript file i need to include both from within a web app, and within a node.js app. is there an easy way to detect which i'm running on (so i can add my objects to window or exports depending on the environment)? [17:40] codemanki: i mean, when i try to install in regular way, to /usr/local i cannot install npm and when i install to ~/local, i CAN install npm and mongo driver BUT i cannot simply start any app, even the basic hello world [17:40] deepthawtz: misinformin' peeps [17:41] mjr_: sstreza: you could just check for the existence of a window or exports object, right? [17:41] jesusabdullah: I just wrote my first expresso test :D [17:42] codemanki: guys...anyone? :( [17:42] jesusabdullah: Huh? [17:42] stephank: wink_: Hey, I just found some hidden but public API in ØMQ that actually makes things a lot easier! [17:42] jesusabdullah: Oh [17:42] jesusabdullah: Yeah [17:43] jesusabdullah: codemanki: http://github.com/isaacs/npm under "simple install" [17:43] mjr_: stephank: that's awesome, but not as awesome as using Ø. [17:43] sstreza: mjr_: derp. i tried doing if(window) but got an exception, but if(typeof window != "undefined") seems to work [17:43] jesusabdullah: My .npmrc looks something like [17:43] stephank: wink_: ØMQ uses socketpairs internally to communicate, and the way zmq_poll works is by polling on one end of that socketpair. The way it gets that descriptor is using public API, with zmq_getsockopt and ZMQ_FD. [17:43] jesusabdullah: root=/home/josh/.node_libraries/ [17:43] jesusabdullah: binroot=/home/josh/bin/ [17:43] jesusabdullah: manroot=/home/josh/.node_libraries/man [17:44] ashleydev: tjholowaychuk: ok can't find it... sorry about the misinformation [17:44] jesusabdullah: You want your root to be somewhere that node itself will look [17:44] mjr_: sstreza: yeah, typeof window or typeof process seems reasonable. [17:44] tjholowaychuk: ashleydev: no worries :) [17:44] codemanki: jesusabdullah: thanks, will try to... [17:44] stephank: mjr_: I need to figure out how to type it, rather than copy-paste it. :B [17:44] sstreza: mjr_: awesome, thanks :D [17:44] jesusabdullah: codemanki: good luck :) [17:44] codemanki: jesusabdullah: but in this way, you installed node in /usr/local ? [17:45] codemanki: jesusabdullah: or in /home/josh/bin/ ? [17:45] ashleydev: tjholowaychuk: I'm trying to understand what the right place to put all the mongodb connection initialization code is w/in the express app, any pointers? [17:45] hoodow has joined the channel [17:45] tjholowaychuk: ashleydev: id shove it in one of the configure() callbacks [17:45] tjholowaychuk: so you can differentiate between dev/prod/stage etc [17:45] stephank: mjr_: for reference and giggles, I can type it with AltGr(+Shift)+L on my system. ø Ø [17:46] stephank: a clumsy key combo [17:46] mjr_: I forgot that there was altgr. Too much time on a mac, I guess. [17:46] jarfhy has joined the channel [17:46] stephank: I occasionally use it for € [17:46] dgathright has joined the channel [17:46] stephank: and “” [17:47] stephank: that's about it I think [17:47] mjr_: Hey, on a Mac you can do option-shift-o to get Ø [17:48] hsuh has joined the channel [17:48] stephank: Minor indulgences ftw. [17:50] mattly has joined the channel [17:52] SubStack: ACTION mapped the right option key to Multi with xmodmap then configured ~/.XCompose [17:52] nwhite has joined the channel [17:53] SubStack: so I can do üñιçøδεś [17:53] xAFFEE has left the channel [17:53] stephank: You mean úñí©óðéß? [17:54] SubStack: oh yes right [17:54] stephank: XD [17:54] SubStack: ☃ [17:54] codemanki: guys, when i install node not in /usr/local but in ~/local/ on start up i always getting "Error: ECONNREFUSED, Connection refused " [17:54] codemanki: on every port [17:55] jesusabdullah: unicodess? [17:56] SubStack: codemanki: αll of the ports? [17:56] ajsie has joined the channel [17:56] codemanki: yep [17:57] codemanki: what it can be related to? [17:57] codemanki: and if node is installed in regular way in /usr/local everything is ok, node starts app... [17:57] SubStack: sounds like another problem [17:58] SamuraiJack has joined the channel [17:58] codemanki: yep...node in /usr/local - npm doesn't want to install. node in ~/local - npm installs but node doesn't want to start up ... dunno what to do :( [17:59] zpoley has joined the channel [17:59] isaacs: codemanki: gist the "doesn't want to install" output [17:59] xAFFEE has joined the channel [17:59] isaacs: ACTION thinks there be clues in there. [18:00] iwasbiggs has joined the channel [18:00] codemanki: isaacs: one moment... [18:00] isaacs: sure [18:01] codemanki: isaacs: http://pastie.org/private/egoyeucopvvfjpcn45xxwg [18:01] bradleymeck: working with python sometimes makes me think about what its like to talk to grandparents [18:02] ezmobius has joined the channel [18:02] codemanki: isaacs: node is 0.2.0 [18:02] xAFFE has left the channel [18:02] ryah: hi [18:03] jesusabdullah: Man where is announcer? [18:03] isaacs: codemanki: so, you see above where jesusabdullah was sharing what's in his .npmrc file? put that stuff in a file in ~/.npmrc [18:03] isaacs: codemanki: or, just do this: sudo chown -R $USER /usr/local [18:03] agnat has joined the channel [18:04] isaacs: codemanki: or follow these instructions: http://gist.github.com/579814 [18:04] JimBastard: okay, does anyone feel like testing this out? just pushed to npm, about to push blog post [18:04] JimBastard: http://github.com/marak/webservice.js [18:04] JimBastard: kinda low on sleep [18:05] tjholowaychuk: JimBastard: what did you end up going with for that issue? [18:05] tjholowaychuk: the callback thing [18:05] rikarends has joined the channel [18:05] codemanki: isaacs: http://pastie.org/private/byhpr5jtbx5ljjaipvs1q [18:05] JimBastard: tjholowaychuk: its in the docs, but the idea is you have to specifcy "/async" as the last argument [18:05] codemanki: it looks for node in home [18:05] JimBastard: if you do that, the web-service wont respond until the callback is complete [18:05] tjholowaychuk: ah cool [18:05] JimBastard: no sending of any methods or anything like that [18:05] JimBastard: its way out of scope for this [18:06] isaacs: codemanki: is there in fact a /home/aleksey/local/bin/node? [18:06] codemanki: isaacs: but node is in /usr/local ... and "sudo chown -R $USER /usr/local" is it ok? [18:06] isaacs: codemanki: sure, that gives you permission to do things in /usr/local without being sudo [18:06] isaacs: codemanki: if it's a single-user machine, like about 99% of all machines, then that's probably fine. [18:07] isaacs: or, you can install node in $HOME, and do everything there. [18:07] hsuh has joined the channel [18:07] isaacs: codemanki: so, does /home/aleksey/local/bin/node exist? not sure how you're getting into this state. [18:07] codemanki: isaacs: nope. i have a problem. when i install node in /usr/local i cannot install npm. when i install node in ~/local following those instructions, i can install npm but when i start up node i get "connection refused" on any port! [18:08] codemanki: currently node is in /usr/local and i understand why npm cannot find it in ~/bin ... [18:08] isaacs: ok, you cannot simply remove node and expect npm to continue to work. it links to where it is at install time. [18:08] isaacs: moving node -> reinstall npm [18:09] isaacs: when you start up node and get the "connection refused"... let's get to that point, and debug that. [18:09] codemanki: isaacs: ehm..one more time..which steps should i follow? install node to /usr/local ? [18:09] isaacs: chances are you 're trying to start on a lower-than-1024 port, and you need to do "sudo node my-program.js" [18:09] isaacs: codemanki: what would you like to have? [18:09] codemanki: i would like to have node+npm+mongo native drivers working all together [18:10] isaacs: ok, cool. [18:10] codemanki: yep :) [18:10] isaacs: where would you like that to live? if you're ok with chown'ing /usr/local, i'd recommend that, because it's very simple, and a common default. [18:10] isaacs: but if it's a multiuser machine, ti's better to install stuff in $HOME, even though that means a bit of extra legwork when you ./configure stuff sometimes [18:11] eazyigz has joined the channel [18:11] codemanki: isaacs: so in case of multiuser, i should follow http://gist.github.com/579814 ? [18:11] codemanki: i mean multiuser machine [18:11] isaacs: yeah, that'd be my recommendation. [18:12] eazyigz: I want to spawn a daemon process within node - that will allow for node to continue executing while this daemon runs in the background [18:12] eazyigz: what is the best way to do that? [18:12] jesusabdullah: eazyigz: Look into node's child_process [18:12] jesusabdullah: eazyigz: You may also like github.com/marak/node-expect, depending [18:12] eazyigz: child_process is not a true daemon, is it? [18:12] jesusabdullah: Oh, a "true demon" [18:13] JimBastard: http://blog.nodejitsu.com/create-nodejs-web-services-in-one-line [18:13] JimBastard: jesusabdullah: thats not a link [18:13] JimBastard: its http://github.com/nodejitsu/nexpect [18:13] jesusabdullah: ah [18:13] jesusabdullah: My bad [18:13] codemanki: isaacs: and in case i will get "connection refused"..can you recommend something? [18:13] JimBastard: i should blog about nexpect [18:13] jesusabdullah: eazyigz: There's a node-daemon project somewhere [18:13] codemanki: isaacs: google cannot help me with this error :( [18:13] isaacs: codemanki: ok, get to that point, then gist the command you'er running, the code in your program, and the output [18:14] isaacs: and let's dig into that. [18:14] LFabien has joined the channel [18:14] codemanki: wow, thanks...in couple minutes...sorry for wasting your time [18:14] isaacs: codemanki: it's ok :) [18:15] jameshome has joined the channel [18:18] claudiu__ has joined the channel [18:18] zmbmartin: I am getting complete undefined with connect-form. I had it working in a single app.js but I am trying to use the mvc example from expressjs? [18:18] Druid__ has joined the channel [18:18] tjholowaychuk: hmm gist? [18:19] tjholowaychuk: what were you wanting earlier? i already forgot [18:19] tjholowaychuk: or you mentioned something [18:19] zmbmartin: tjholowaychuk: I will gist it. You answered me about inflection [18:20] tjholowaychuk: ohh right right [18:20] zmbmartin: tjholowaychuk: I guess I am not getting the flow in the mvc example you have. I am trying to add in models and use mongoose also am having issues. [18:20] JimBastard: no announcer? [18:20] JimBastard: wtf maushu [18:20] tjholowaychuk: zmbmartin: hmm I can try to help [18:21] Druid__: hm [18:21] Druid__: does anyone use nginx? [18:21] Druid__: especially the http_push_module (comet) [18:21] jesusabdullah: Not me, at least not yet [18:21] ehaas has joined the channel [18:21] JimBastard: im building web-services for people today, who needs one? [18:22] JimBastard: webservice.createServer({'fs': fs}).listen(8080); boom! [18:22] JimBastard: fs module [18:22] jameshome: heh [18:22] JimBastard: i'll take my sandwich in the study [18:22] jameshome: I'm goin' on break [18:22] jesusabdullah: and here I was thinking about using rails to make my restful interface [18:22] jesusabdullah: but with webservice? Fuck that [18:22] halfhalo: I completely fail at regex.... [18:23] jesusabdullah: Me too, but you get a little better with practice [18:23] eisd has joined the channel [18:23] zmbmartin: tjholowaychuk: http://gist.github.com/595789 I just added the mongoose stuff the the controller from now but I am not getting any params when submitting /users/new and I am getting complete undefined. [18:24] aubergine has joined the channel [18:24] zmbmartin: tjholowaychuk: I added bootModels to mvc.js but I was not sure how to do that so that didn't really work [18:24] tjholowaychuk: one sec sorry [18:24] zmbmartin: No problem [18:24] halfhalo: trying to use string.replace to replace all works that start with : with the result of another function, like how connect does it, but I just utterly fail at it [18:25] tjholowaychuk: halfhalo: what are you doing? [18:25] brianmario has joined the channel [18:25] tjholowaychuk: replace ":"?? [18:25] halfhalo: im at :(.[^\s]) in my stage of guessing for the regex [18:26] tjholowaychuk: i dont get what you are trying to do though [18:28] halfhalo: Im trying to write a function that takes in a string like "help :me" and makes a regex string which I can use to parse another string in the format of "help blah", and I think I just found my issue [18:28] halfhalo: well, A issue at the very least [18:28] aconbere has joined the channel [18:29] hoodow has joined the channel [18:29] tjholowaychuk: ohhh [18:29] halfhalo: but I can't seem to make a regex that both replaces :me with something that can be parsed AND gives me "me" or whatever the value next to : is [18:30] eisd: help\x20*:?\x20*(?:me|something) [18:30] tjholowaychuk: /:(\w+)/g [18:30] tjholowaychuk: is more what you would want [18:30] tjholowaychuk: depends I guess [18:30] codemanki: isaacs: omg..i am so awkward..but i think that "connection refused" was because of mongo db... [18:30] isaacs: hehe [18:30] isaacs: codemanki: sometimes it just takes someone telling you to do what you already did to see what the problem was :) [18:31] codemanki: :) [18:31] codemanki: isaacs: thank you one more time! [18:32] hannesw has joined the channel [18:32] halfhalo: yup! That works! Thank you very much! [18:34] karboh has joined the channel [18:35] rkieffer has joined the channel [18:36] grahamalot has joined the channel [18:37] hoodow has joined the channel [18:43] gerred: as much as I love node.js and I'm changing my opinion on its best practices [18:43] gerred: it still feels like black magic to me. :) [18:45] mjr_: gerred: I'm not sure that's entirely fair. [18:45] mjr_: I think it's more like white magic. [18:45] tjholowaychuk: zmbmartin: k hi sorry. so when you say its not working [18:45] tjholowaychuk: what happens [18:45] rikarends has left the channel [18:45] mytrile has joined the channel [18:45] gerred: so I did the blood sacrifice to the node gods for no reason? [18:46] timemachine3030: Question: if I want to modify node.js to add some debugging information, would I then need to rebuild the executable? [18:46] zmbmartin: tjholowaychuk: I am more worried about the complete undefined error. [18:46] tjholowaychuk: zmbmartin: what line is that on [18:46] jakehow has joined the channel [18:47] zmbmartin: tjholowaychuk: I am trying to understand exactly how your mvc example works. [18:47] zmbmartin: tjholowaychuk: line 47 of user.js [18:48] tjholowaychuk: that is not part of my example [18:48] tjholowaychuk: and you dont need connect-form really unless you are doing multipart stuff [18:48] tjholowaychuk: so image uploads etc [18:48] tjholowaychuk: but hmm [18:48] zmbmartin: tjholowaychuk: yeah I am going to be doing uploads [18:49] tjholowaychuk: off hand im not sure why req would not be there [18:49] tjholowaychuk: the example as-is was working fine [18:49] mjr_: gerred: you are going to want to balance that out with some moon-based spirit crystal energy balancing pretty quickly. [18:49] tjholowaychuk: hard to say without diving in and debugging [18:50] zmbmartin: tjholowaychuk: So does the module.exports export to the Object.keys in mvc.js ? [18:50] kriszyp has joined the channel [18:51] tjholowaychuk: uhh [18:51] luddep: does anyone know if expresso can test if an error gets thrown? [18:51] Druide__ has joined the channel [18:51] tjholowaychuk: luddep: it will dump uncaughtExceptions to stderr [18:51] mytrile has joined the channel [18:51] tjholowaychuk: or try to catch immediate exceptions within a test callback [18:51] tjholowaychuk: s/callback/function/ [18:51] mjr_: tjholowaychuk: you can isaacs need to clone yourselves a few times just to support the critical pieces of node software you both maintain. [18:52] mjr_: you and [18:52] tjholowaychuk: hehe [18:52] isaacs: heh [18:52] mjr_: this shit does not scale. [18:52] tjholowaychuk: some clones would be nice [18:52] isaacs: mjr_: srsly [18:52] tjholowaychuk: im an event loop its all good [18:52] tjholowaychuk: multitasking is what i do [18:52] mjr_: heh [18:52] jameshome: yeah, I'm sort of amazed by how responsive you are on irc [18:53] isaacs: i need child processes [18:53] skampler has joined the channel [18:54] luddep: tjholowaychuk: alright, thanks [18:54] mjr_: isaacs: forking children is more expensive in real life than it is in Unix. [18:54] isaacs: heh [18:54] luddep: tjholowaychuk: alright, thanks [18:54] luddep: whops. [18:56] halfhalo: ok, two more replace thingies and I think I'm good.... [18:58] eisd: ...mozilla has mouse gesture dom events? [18:58] eisd: does webkit have this awesomeness? [18:58] eisd: [18:59] nwhite has joined the channel [19:01] halfhalo: I need to replace . and / with regex compatible stuff, and then make it match "help" or whatever the work is and im golden for message parsing [19:01] eisd: halfhalo: ? [19:01] eisd: you mean escape them? [19:01] halfhalo: yeah [19:01] eisd: replace(/\./g, "\\.") [19:02] konobi: ryah, how's it kicking? [19:02] halfhalo: now, see, I was one character away from that myself... but would have taken years to guessimate my way there [19:03] jameshome: the Crockford book is worth it for the regex railroad diagrams alone [19:03] jesusabdullah: The Good Parts? [19:03] jameshome: y [19:03] jesusabdullah: hmm [19:03] jesusabdullah: Have not read yet [19:03] eisd: halfhalo: Just be aware there is a lot more to escaping in regex than just that [19:04] rnewson has joined the channel [19:04] jesusabdullah: I've only recently learned me some jabbascripts [19:04] rnewson has joined the channel [19:04] eisd: e.g. - does not need to be escaped anywhere but character classes, and even then, it depends on where the - appears in the character class [19:04] jameshome: it's useful [19:05] pydroid has joined the channel [19:05] programble has joined the channel [19:05] programble has joined the channel [19:06] halfhalo: now, matching a word would just be (word) correct? [19:07] eisd: only if you want to capture it [19:07] eisd: halfhalo: #regex - I can help you there [19:07] dylang: i updated my source on heroku, it started crashing. so i rolled back to the older code that was working. still crashing. nothing in the logs. any ideas? [19:07] halfhalo: else I just ignore it, right? [19:07] MikhX_ has joined the channel [19:07] eisd: halfhalo: depends on what you're doing, sometimes the full match may be returned [19:09] bmavity has joined the channel [19:09] skampler has joined the channel [19:09] halfhalo: hmm... I'm wondering if I'm caring about that.... [19:11] stepheneb has joined the channel [19:14] codetonowhere has joined the channel [19:15] c4milo has joined the channel [19:15] gerad has joined the channel [19:19] sonnym has joined the channel [19:21] mikew3c_ has joined the channel [19:22] MikhX has left the channel [19:23] digitaltoad has joined the channel [19:23] aho has joined the channel [19:25] cloudhead has joined the channel [19:26] bradleymeck: mmmm so for jni, do you guys think it would be reasonable to not expose js functions to java since java executes in a 2nd thread? [19:29] rnewson has joined the channel [19:31] hannesw has joined the channel [19:32] cardona507 has joined the channel [19:32] deepthawtz has joined the channel [19:32] MikhX has joined the channel [19:34] delapouite has joined the channel [19:38] dylang: has anybody pushed new code to heroku today? [19:39] MikhX has joined the channel [19:39] iwasbiggs has joined the channel [19:40] codemanki: guys, how can i get an url of site i'm currenly running in node js ? [19:42] jbenesch has joined the channel [19:42] bradleymeck: codemanki, im not sure i understand the question, the ip address or the url (like a whois)? [19:42] codemanki: url...like http://localhost:8000/ [19:43] muk_mb has joined the channel [19:44] MikhX has joined the channel [19:44] dipser: http://renegat.org/ip copy your ip and put it on the place where localhost is [19:44] dipser: @ codemanki [19:45] wink_: bradleymeck: check it out, that script is doing 10,000 inserts (simple documents) http://pastebin.com/MEKgwxZP [19:45] codemanki: ehm..i mean...i want to use it in my node app... [19:45] Anti-X: codemanki, http://stackoverflow.com/questions/3653065/get-local-ip-address-in-node-js [19:45] bradleymeck: wink_ very nice [19:45] AAA_awright: codemanki: If you are trying to know the URL that is in the address bar, HTTP doesn't exactly work like that [19:46] codemanki: AAA_awright: so i need to use some constant to define it? [19:46] codemanki: or via config ? [19:46] Anti-X: where do you want to use it? [19:46] AAA_awright: What are you trying to do? Using a URL starting with / is good enough for most cases [19:47] AAA_awright: If you need to know the domain name that the page was loaded with, look for the HTTP Host: header [19:47] lief has joined the channel [19:47] AAA_awright: I forget where that is, I think request.headers.host [19:47] codemanki: AAA_awright: hm..maybe you are right...i do not really need it, i can just use / :) [19:47] codemanki: AAA_awright: Anti-X: tnx :) [19:48] bradleymeck: dont forget either, browsers optimize using / just as much as the same domain name :) its extra dns that hurts [19:48] AAA_awright: codemanki: It would serve you well to look at the HTTP headers of a request and response, and read the HTTP 1.1 spec [19:48] AAA_awright: It's not hard [19:49] codemanki: bradleymeck: tnx :) [19:49] codemanki: AAA_awright: i will [19:50] wink_: bradleymeck: thats the same test case from the original that took 1.441s :>, smarter buffer handling ftw on that one [19:50] technoweenie has joined the channel [19:50] bradleymeck: yea, if we could get copy on write slices i would die with joy [19:51] jacobolus has joined the channel [19:52] MikhX_ has joined the channel [19:53] jbenesch has joined the channel [19:54] wink_: and twice as fast as the native driver, yay [19:54] codetonowhere has joined the channel [19:54] noahcampbell has joined the channel [19:54] wink_: oh wait, 3x [19:57] jakehow has joined the channel [19:59] pedrobelo has joined the channel [19:59] digitaltoad has joined the channel [19:59] jesusabdullah: v8bot: 483.15/293.15 [19:59] v8bot: jesusabdullah: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [19:59] jesusabdullah: Thanks! [19:59] jesusabdullah: v8: 483.15/293.15 [19:59] v8bot: jesusabdullah: 1.6481323554494287 [20:00] jesusabdullah: v8: 1- (483.15/293.15)**(-1) [20:00] v8bot: jesusabdullah: SyntaxError: Unexpected token * [20:00] Anti-X: math.pow [20:00] jesusabdullah: How do you do exponenti---thx brah [20:00] Anti-X: :p [20:00] jesusabdullah: v8: 1- math.pow(483.15/293.15, -1) [20:00] v8bot: jesusabdullah: ReferenceError: math is not defined [20:00] Anti-X: big M [20:00] jesusabdullah: v8: 1- Math.pow(483.15/293.15, -1) [20:00] v8bot: jesusabdullah: 0.39325261306012627 [20:00] jesusabdullah: herp derp [20:00] pgriess has joined the channel [20:00] jesusabdullah: almost 40%! [20:01] jesusabdullah: Poor heat engines [20:01] jesusabdullah: v8: 20/39.3 [20:01] v8bot: jesusabdullah: 0.5089058524173028 [20:02] jesusabdullah: I need to add an evaluator to MY bot [20:02] jesusabdullah: Is v8bot open source? [20:02] jesusabdullah: v commands [20:02] Anti-X: really? you couldn't have figured out in your head that 20/39.3 was just about .5? :p [20:02] eisd: Indeed it is. [20:02] jesusabdullah: Anti-X: It's for homework sollutions [20:02] eisd: jesusabdullah: #v8bot [20:02] jesusabdullah: Thanks :D [20:03] eisd: jesusabdullah: source code should be in topic [20:03] jesusabdullah: Yup, just found it [20:03] jesusabdullah: watching! [20:03] eisd: :) [20:04] WALoeIII has joined the channel [20:06] eazyigz has joined the channel [20:06] Anti-X: i'm not tired of coding at all... "if ('listen' in data) { no u listen" [20:06] jbenesch has joined the channel [20:07] halfhalo: lol [20:09] softdrink1 has joined the channel [20:11] MikhX_ has joined the channel [20:12] dmcquay has joined the channel [20:14] auser has joined the channel [20:14] auser: hola [20:16] rcy has joined the channel [20:16] bradleymeck: hello [20:17] mjr_: tjholowaychuk: I merged in your changes for redis MULTI, but I modified it a bit. Let me know what you think. [20:18] jbenesch has joined the channel [20:18] mjr_: tjholowaychuk: I wanted to support the chaining style as well as the array style, so you can still do this: http://github.com/mranney/node_redis/blob/master/test.js#L151 [20:20] hansek__ has joined the channel [20:20] tjholowaychu has joined the channel [20:24] jbenesch has joined the channel [20:28] jbenesch1 has joined the channel [20:30] dgathright has joined the channel [20:32] daglees has joined the channel [20:35] mape: Hmm everyone got the peepcode PM on Github? [20:35] jesusabdullah: idk what peepcode is :( [20:36] jesusabdullah: i certainly didn't get a pm! [20:36] jbenesch has joined the channel [20:37] tjholowaychu: mape: I got one [20:37] tjholowaychu: most of their vids are rubyish tho so not sure ill grab anything :( [20:37] tjholowaychu: can save them for later [20:38] mape: Hmm k, wondered if I got one since the screencast was pretty much a clone of my wargamez or if they just sent it to everyone who comitted to node.js [20:38] mape: Their URL is the message seems borked [20:38] tjholowaychu: would suck if he took most your code too [20:38] jesusabdullah: oh, THOSE guys [20:38] jesusabdullah: I remember now [20:39] mape: Nah doubt it [20:39] mape: It doesn't even do IRC [20:40] SubStack: I didn't get a PM but then I haven't forked node either [20:41] benreesman has joined the channel [20:41] benreesman: hey anyone have time to answer a quick question? [20:41] jesusabdullah: How quick IS it? [20:41] mape: benreesman: More likely to get an answer if you just ask [20:41] jesusabdullah: I'll have to see it first. [20:41] mjr_: benreesman: we have time for you [20:41] jesusabdullah: We *always* have time [20:41] jesusabdullah: for you <3 [20:42] mjr_: awww [20:42] jesusabdullah: j/k--but seriously, shoot. [20:42] aho: PEW PEW [20:42] aho: you asked for it :l [20:42] benreesman: i'm looking for a framework to do lightweight routing and templates for a web application in node, and also to do lightweight web services [20:42] benreesman: would be great if it were the same one [20:42] benreesman: any advice on where to start, there seem to be a lot of them [20:43] mjr_: benreesman: you probably want connect, or perhaps express, which uses connect. [20:43] benreesman: cool [20:43] tjholowaychuk: http://expressjs.com [20:43] aho: http://howtonode.org/getting-started-with-express [20:43] kschzt has joined the channel [20:43] tjholowaychuk: benreesman: what you mention is pretty much all express is [20:44] benreesman: thanks guys [20:44] benreesman: i'll give that a go [20:44] benreesman: cheers [20:44] mjr_: benreesman: then you can ditch all of your PHP. [20:44] tjholowaychuk: hit up the google group if you have issues [20:44] jesusabdullah: You use php?! >:O [20:44] ashleydev: isaacs: how does require.paths get populated with the npm install dirs? my require.paths is empty after npm install... ? [20:45] isaacs: ashleydev: how have you come to believe that require.paths is empty after npm install? [20:45] isaacs: ashleydev: if your answer is "require.paths in the repl is empty" then that's a node bug, fixed on HEAD already, but not yet merged into stable 0.2.x branch [20:45] ashleydev: `node` > require.paths [20:45] isaacs: right [20:45] isaacs: ^^ [20:45] ashleydev: same in test script [20:46] jameshome: oh interesting [20:46] isaacs: you have a test script that does console.log(require.paths)? [20:46] ashleydev: require can't find any npm install stuff [20:46] isaacs: and you do node test.js and it's empty? [20:46] ashleydev: one sec... I'll try it that way [20:46] zmbmartin: tjholowaychuk: I am curious how you organize your apps? [20:46] tjholowaychuk: zmbmartin: depends on what I am doing [20:46] mape: Is there any live content from jsconf? [20:47] ashleydev: isaacs: ok that way doesn't show up empty [20:47] isaacs: kewl [20:47] isaacs: what's this show you: npm config get root [20:47] zmbmartin: tjholowaychuk: do you follow a mvc pattern or does that depend also? [20:48] tjholowaychuk: zmbmartin: no I dont personally [20:48] isaacs: (just stdout, stderr is gonna be some logs and such) [20:48] ashleydev: isaacs: /home/ashleydev/.nvm/v0.2.2/lib/node [20:48] isaacs: greeaaattt [20:48] isaacs: ok [20:48] isaacs: so nvm use 0.2.2 and you should be all set, i'm guessing. [20:48] tjholowaychuk: zmbmartin: I much prefer the typical WYSIWYG aspect of raw express routes [20:48] isaacs: i mean, not in the repl, cuz of that bug [20:49] ashleydev: OH, so maybe my real issue is that I never did an npm use? [20:49] isaacs: v [20:49] isaacs: yeah [20:49] ashleydev: wait... no [20:49] isaacs: or, wait, nvm [20:49] isaacs: nvm [20:49] isaacs: not nave [20:49] isaacs: i don't really know how nvm works ^_^ [20:49] ashleydev: cause npm is installing stuff under there... [20:49] isaacs: right [20:49] ashleydev: infact that's where nvm is installed [20:49] zmbmartin: tjholowaychuk: ok thanks [20:49] isaacs: what is `which node` [20:50] ashleydev: ~/.nvm/v0.2.2/bin/node [20:50] isaacs: ashleydev: hm... then anything installed in ~/.nvm/v0.2.2/lib/node should be seen [20:50] tjholowaychuk: zmbmartin: but hey I mean even the mvc example has way less magic than rails so I dont hate it [20:50] isaacs: that is, your require.paths includes npm's target [20:50] isaacs: soo.... [20:50] isaacs: yeah... [20:51] isaacs: my powers are fading. i need food. if you don't have it figured out by the tiem i get back, i'll help out then. [20:51] ashleydev: isaacs: ok reinstall of npm fixed it... [20:51] ashleydev: don't know why but... [20:51] ashleydev: it did [20:51] zmbmartin: tjholowaychuk: Yeah but I don't know that I need that much either for just learning. I like to break things up but I might see if I can simplify more for me [20:51] ashleydev: thx [20:52] zmbmartin: tjholowaychuk: If I can figure it out ;) [20:53] siculars has joined the channel [20:53] tjholowaychuk: :) [20:54] tg has joined the channel [20:54] sonnym has joined the channel [20:55] rcy has joined the channel [20:57] halfhalo: sweet jesus its alive... [20:58] mattly has joined the channel [20:59] jacobolus has joined the channel [21:00] zmbmartin: tjholowaychuk: how can I access app from another file? [21:00] tjholowaychuk: yeah [21:01] tjholowaychuk: look at the examples [21:01] tjholowaychuk: you have to pass it around explicitly though [21:01] tjholowaychuk: like anything else w/ commonjs modules [21:02] aconbere has joined the channel [21:06] zmbmartin: tjholowaychuk: which example? [21:06] tjholowaychuk: blog i think [21:06] mjr_: tjholowaychuk: take a peek at the node_redis MULTI stuff when you get a minute. [21:07] mytrile has joined the channel [21:07] tjholowaychuk: mjr_: will do, what changed? [21:09] gf3 has joined the channel [21:11] mjr_: I merged in your multi change, so you can do fancy chaining [21:11] tjholowaychuk: wahoo! [21:11] mjr_: But I modified it a bit, because there was an issue with error reporting. [21:11] tjholowaychuk: looks good [21:11] mjr_: If you feed in a command to a multi with an invalid syntax, it calls the callback with an error, but redis actually runs the transaction. [21:12] mjr_: So that's a bit misleading. [21:12] tjholowaychuk: ah right I remember reading that in the docs [21:12] mjr_: Anyway, I changed it so that each command still has individual callbacks if you like, and if you don't supply one for a command that errors, it throws. [21:13] tjholowaychuk: k cool sounds reasonable :) [21:13] mjr_: Also, while I was in there, I made it so that you can re-use multi objects, which seems neat. [21:13] mjr_: http://github.com/mranney/node_redis/blob/master/examples/example_multi.js [21:13] mjr_: So you can make a queue of commands in a multi, then call exec() on them as many times as you like, and that set of commands will be run atomically. [21:14] tjholowaychuk: ah nice :) I like it [21:14] tjholowaychuk: slick stuff [21:14] mjr_: Yeah, this chaining API is way better. [21:15] zmbmartin: tjholowaychuk: awesome thanks. I think that is as split up as I want but we will see. [21:15] mjr_: But I also made it work with something like the old API where you can pass in an array of commands, which is what Tim_Smart is doing I think. [21:15] halfhalo: ACTION does a little dance [21:16] mjr_: tjholowaychuk: so does this work for you? [21:16] rahulkmr has joined the channel [21:16] tjholowaychuk: mjr_: yup that should be good thanks man [21:16] bmavity has joined the channel [21:16] mjr_: Cool. Hopefully I can stop spending so much time fiddling with this thing and actually use it for real work. [21:17] mjr_: It's super valuable to have actual users though. [21:17] rahulkmr: Anyone knows how to resolve this ext.js issue? http://github.com/visionmedia/ext.js/issues#issue/50 I am facing the same issue [21:17] brianmario has joined the channel [21:18] tjholowaychuk: uhhh [21:18] tjholowaychuk: dunno [21:18] tjholowaychuk: i dont use that lib anymore really [21:18] tjholowaychuk: it needs some loven [21:18] rahulkmr: Did you switch to some alternative? Or just dropped it? [21:18] tjholowaychuk: I would like to split it up into separate libs eventually [21:18] tjholowaychuk: date lib in the works, linguistics lib in the works [21:18] tjholowaychuk: etc [21:18] rahulkmr: I use Coffeescript which covers a lot of extensions. But some of things in ext.js look good [21:19] rahulkmr: Ok I was refering to the modules list on github and this sounded interesting. Though nothing that can't be found in individual modules listed there [21:19] wink_: bradleymeck: http://pastebin.com/aJ5NCmga , pretty stark contrast in speed, not to mention the native binding seems to have problems with following the cursors properly, it's not returning the number of documents it should be.. [21:20] bradleymeck: i look forward to it :) [21:21] wink_: its done, for today anyhow, i need to bolt on gridfs support and authentication [21:21] wink_: that'll have to wait till next week most likely, i really just needed the find to work properly ;p [21:22] kordless has joined the channel [21:23] wink_: then i get to start bothering isaacs getting an npm package put together [21:23] wink_: :> [21:25] satori_ has joined the channel [21:27] sudoer has joined the channel [21:29] halfhalo has joined the channel [21:30] halfhalo has joined the channel [21:33] dysinger has joined the channel [21:33] halfhalo has left the channel [21:34] halfhalo has joined the channel [21:40] mytrile has joined the channel [21:41] dgathright has joined the channel [21:41] siculars has joined the channel [21:45] eazyigz has joined the channel [21:50] mape: tjholowaychuk: Did you find out the cause for my and dylangs issue with staticProvider? [21:50] path[l] has joined the channel [21:51] tjholowaychuk: mape: nope, worken on jade sorry [21:51] mape: Oh so ejs specific? [21:52] virtuo_ has joined the channel [21:52] tjholowaychuk: oh no, I meant I am working on jade [21:52] tjholowaychuk: haha [21:52] tjholowaychuk: my bad [21:52] mape: tjholowaychuk: Oh k [21:52] cloudhead has joined the channel [21:54] aurynn: Is there a ctypes library for node yet? [21:54] sechrist: hmm I'm having weird behavior with Step [21:55] sechrist: a step is being skipped sometimes hehe [21:55] mape: sechrist: doing? [21:55] sechrist: output that should be going to the second step is going to the third [21:55] sechrist: in some cases [21:55] mape: you mean in order of a step or different steps? [21:56] sechrist: http://pastie.org/private/xm3k0pc3vugc0yarwx4rra [21:56] tjholowaychuk: mape: sorry man. feel free to keep asking I have a bad memory [21:56] sechrist: what's happening is getTweetBook is being skipped sometimes, meaning that getEmbedlyData is outputting straight to the third step! [21:57] sechrist: now, granted I'm spawning a shitload of steps.... sounds like a bug in Step [21:57] mape: tjholowaychuk: I say the same thing when I don't really wanna do it but not come of as a douche ;) But I'll try to look at it and let you know if I find anything. [21:57] tjholowaychuk: haha no i do, course I want to support my stuff [21:57] tjholowaychuk: just other things gotta get done [21:57] tjholowaychuk: sounds good [21:58] mape: Yup, probly something simple that is messing it up [21:58] tjholowaychuk: wouldnt doubt it [21:58] tjholowaychuk: strange side-effect though [22:01] zmbmartin: tjholowaychuk: can you module.exports 2 var? [22:03] tjholowaychuk: zmbmartin: nope [22:03] mape: tjholowaychuk: process.ENOENT is undefined so return err.errno === process.ENOENT ? next() : next(err); passes the error [22:03] tjholowaychuk: exports.one = 1, exports.two = 2; [22:03] tjholowaychuk: or module.exports = { one: 1, two: 2}; are the same [22:03] tjholowaychuk: mape: right right we talked about this yesterday [22:04] tjholowaychuk: or someone did [22:04] tjholowaychuk: its on constants.ENOENT now [22:05] mape: Ah k [22:06] mape: I'd pull req you but going through the CLA hassle seems like a pain for something this small [22:07] tjholowaychuk: backwards compat [22:07] tjholowaychuk: will be annoying with that change [22:07] tjholowaychuk: one sec [22:08] tjholowaychuk: im assuming constants is a global [22:08] isaacs[away]: var consts ; try { consts = require("consts") } catch (ex) { consts = process } [22:08] Uierth has joined the channel [22:08] isaacs: tjholowaychuk: ^ [22:08] mape: Don't think it is? Or my spelling is awful [22:08] isaacs: er, s/consts/constants/ [22:09] tjholowaychuk: oh its a module? [22:09] isaacs: yeah, it's a native module [22:09] gerred has joined the channel [22:10] aurynn: http://github.com/rbranson/node-ffi <3 [22:12] rkieffer has joined the channel [22:14] deedubs has joined the channel [22:14] deedubs: Are there any good resources on non-websocket tcp socket communications? [22:14] deedubs: I'm looking to write a client/server in node [22:16] kjftw has joined the channel [22:17] Nohryb has joined the channel [22:17] Sami_ZzZ_ has joined the channel [22:18] ysynopsis has joined the channel [22:19] rkieffer has joined the channel [22:21] Ori_P has joined the channel [22:21] hellp has joined the channel [22:22] trotter has joined the channel [22:23] mbana has joined the channel [22:23] mbana: hi [22:24] mbana: im looking for a java / c++ client for something like the 'dirty' key-value store [22:24] mbana: basic persistence [22:26] tjholowaychuk: jades new feature: http://tjholowaychuk.com/post/1180958201/jade-templates-introspection [22:26] tjholowaychuk: possibly slightly insane [22:27] sechrist: I am slowly falling in love with jade [22:27] sechrist: | :D [22:27] tjholowaychuk: ahaha :) [22:28] sechrist: I'm guessing everybody is using felixge's couch module? [22:28] sechrist: or what? [22:28] aurynn: I'm not using couch. [22:28] aurynn: so.. [22:28] aurynn: no. [22:28] aurynn: :) [22:29] sechrist: well I mean, for people using couch :) [22:29] halfhalo: ACTION wrote his first plugin for his irc bot [22:30] Tim_Smart has joined the channel [22:30] aurynn: is there a text-based templating language? jade looks a bit too yaml-y for me. [22:30] tjholowaychuk: text-based? [22:30] tjholowaychuk: you need to represent a hierarchy [22:31] tjholowaychuk: otherwise markdown will do [22:31] tjholowaychuk: just fine [22:31] tjholowaychuk: but that is cool actually, you could use jade for a config lang haha [22:31] aurynn: as in, doesn't require an internal hierarchy - just parses for special tags in the markup [22:31] tjholowaychuk: String#replace() [22:32] sstephenson: aurynn, you might be interested in Eco: http://github.com/sstephenson/eco [22:33] sstephenson: or EJS, if CoffeeScript doesn't float your boat [22:33] aurynn: that's more what I'm looking for [22:33] tjholowaychuk: aurynn: ejs is the equiv of that minus CS [22:33] aurynn: tjholowaychuk, what are you using to handle lexing your template language? [22:33] tjholowaychuk: aurynn: my lexer [22:33] tjholowaychuk: :p [22:33] aurynn: :) [22:33] sstephenson: Eco is fast: http://jsperf.com/dom-vs-innerhtml-based-templating/11 [22:34] tjholowaychuk: just a hand written lexer [22:34] ben_alman has joined the channel [22:34] aurynn: Did you write a bnf-ish rule handler? [22:34] tjholowaychuk: no [22:34] aurynn: I keep playing with the idea of writing something like pyparsing in js [22:34] Salve has left the channel [22:36] ashleydev: does anyone have a good javascript.vim syntax file? [22:36] ashleydev: isaacs: do you use vim? [22:36] isaacs: ashleydev: naw, i'm a textmate douche [22:36] tjholowaychuk: jade is only slow on there [22:36] tjholowaychuk: because it gives you *real* error reporting [22:36] mape: Hmm Eco seems quite a bit fastr [22:36] mape: *faster [22:36] tjholowaychuk: realistically none of those are slow [22:36] Tim_Smart: ashleydev: I has one, not sure how good it is though. [22:36] tjholowaychuk: but relative to eachother I suppose so [22:36] ashleydev: isaacs: does it handle your formatting style for .js? [22:36] sstephenson: Eco doesn't use with() [22:36] mape: Relative :) [22:36] isaacs: ashleydev: not well [22:36] Tim_Smart: ashleydev: Google is your friend there. [22:37] ashleydev: Tim_Smart: i'm using the one on vim.org but it sucks [22:37] isaacs: ashleydev: most of my formatting i do by hand. it does some basic indenting stuff. [22:37] sstephenson: that's what kills the others [22:37] Tim_Smart: ashleydev: http://www.vim.org/scripts/script.php?script_id=1491 ? [22:38] Tim_Smart: http://github.com/pangloss/vim-javascript looks interesting as well. [22:38] aurynn: with luck, I'll have a usable alpha of postgres.js tonight or tomorrow. [22:39] tjholowaychuk: sstephenson: yeah for sure [22:39] tjholowaychuk: mine is a bit worse too because I have lots of error handling built in render() [22:39] ashleydev: Tim_Smart: vim.org link is down for me , looks like their mysql is down [22:39] tjholowaychuk: s/handling/reporting/ [22:39] Tim_Smart: Yeah haha. [22:39] ashleydev: but that github one looks promising, i'm gonna load that up and try it [22:40] ashleydev: Tim_Smart: but Yeah, I've tried all the ones on vim.org a month or two ago, and none are good [22:40] Tim_Smart: ashleydev: I'm about to try that repo. [22:40] tjholowaychuk: isaacs: does node-bench still work? [22:40] tjholowaychuk: last time I tried it was just hanging [22:40] isaacs: tjholowaychuk: hm... um... look at the stuff in the examples folder [22:41] isaacs: tjholowaychuk: i think the interface might've changed a bit [22:41] tyfighter has joined the channel [22:41] tjholowaychuk: hmmm [22:41] bradleymeck: oi who took away my pistachio on that [22:41] ashleydev: Tim_Smart: I tried this one yesterday: http://github.com/hallettj/jslint.vim [22:42] ashleydev: but it only works if you do C style formatting, not isaacs style [22:42] Tim_Smart: ashleydev: That is just a lint plugin? [22:42] Tim_Smart: Yeah I do C style. [22:42] Tim_Smart: ACTION is not a fan of comma first. [22:42] ashleydev: it activly marks part of your code highlighted in red [22:42] isaacs: ashleydev: if you write a isaacs-style javascript.vim file, i will probably switch to vim [22:42] bradleymeck: sstephenson do you know who killed pistachio on those tests? [22:42] ashleydev: isaacs: i'll let you know when I get too frustrated and write it... :) [22:43] sstephenson: bradleymeck: dunno, I just forked the latest version [22:43] mbana: im looking for a java / c++ client for something like the 'dirty' key-value store [22:43] Tim_Smart: isaacs: isaacs-style huh? You are now famous. You can now quit the internet. [22:43] bradleymeck: http://jsperf.com/dom-vs-innerhtml-based-templating/8 [22:43] isaacs: hahaha [22:43] bradleymeck: pistachio is fast f the rest [22:43] ashleydev: yeah, it's actually known as isaacs-style in my circle [22:43] huyhong has joined the channel [22:43] isaacs: hahah, that's fantastic [22:44] huyhong has left the channel [22:44] ashleydev: isaacs: which on monday is gonna include bartt :) [22:44] sstephenson: wow yeah it is quite fast [22:44] ashleydev: (first day) [22:45] jesusabdullah: bartt? [22:45] bradleymeck: though i had to make it handicapped due to its streaming nature so i gave its output chunks +"" [22:45] ashleydev: jesusabdullah: a friend of isaacss [22:45] isaacs: ashleydev: neat! [22:45] isaacs: he's a cool guy [22:45] Tim_Smart: ashleydev: Hmm that syntax file isn't bad. But the extras/ctags definitions are awesome. [22:45] ashleydev: ACTION has been chatting not installing... [22:46] jesusabdullah: ah [22:46] Tim_Smart: I can now jump to declarations of anything in ecmascript, in vim. [22:46] tjholowaychuk: bradleymeck: after one more jade feature I think I will start the whole perf optimization thing [22:46] ashleydev: Tim_Smart: with ^[ ? [22:46] bradleymeck: tell me when i can make it fast as f [22:46] Tim_Smart: ashleydev: Yes. [22:46] ashleydev: Tim_Smart: nice [22:47] bradleymeck: though i will make the generated code burn eyes [22:47] Tim_Smart: Just have to :!ctags lib/*.js first. [22:47] Yuffster has joined the channel [22:47] tjholowaychuk: bradleymeck: haha :) the compiled code doesnt matter much to me [22:47] tjholowaychuk: its not pretty as-is [22:47] tjholowaychuk: just landed a cool feature though [22:47] bradleymeck: oooo :D [22:47] bradleymeck: ? [22:47] tjholowaychuk: bradleymeck: http://tjholowaychuk.com/post/1180958201/jade-templates-introspection [22:48] bradleymeck: yea i just made pistachio as a proof, wanted to work on jade when had a good amount of time (never do cause of work haha) [22:48] jesusabdullah: What's pistachio? [22:48] mape: something dumb simple? [22:49] mape: Oh guess not [22:49] Tim_Smart: mjr_: If I update node_redis, I will just have to append .exec() to all my multi calls? [22:49] mjr_: Tim_Smart: you pass the final callback to exec() also [22:50] Tim_Smart: mjr_: Ah cool. [22:50] bradleymeck: jesusabdullah its a close to optimal streaming template generator that was a proof of concept [22:50] mjr_: So you do client.multi([commands]).exec(final_callback) [22:50] tjholowaychuk: bradleymeck: I added LL(*) for jade too [22:50] tjholowaychuk: so potentially some cool things [22:50] bradleymeck: aaaah LL(*) is a hard to optimize thing [22:50] Tim_Smart: mjr_: I can still have my callbacks per command? [22:50] mjr_: Tim_Smart: check out examples/example_multi.js and example_multi2.js [22:50] mjr_: Tim_Smart: oh yes [22:50] tjholowaychuk: bradleymeck: compile speed is irrelevant though [22:50] bradleymeck: true [22:51] sstephenson: is pistachio async? if so, those jsperf tests won't be accurate [22:51] Tim_Smart: mjr_: That array syntax was pretty nice for dynamically making transactions. [22:51] jesusabdullah: Whose project is pistachio? I wanna see [22:51] mape: http://gist.github.com/raw/578481/3f58dc6775a988da9c160c099fdd1f68d262d55a/pistachio1.js [22:51] mjr_: Tim_Smart: yeah, you can still use something very similar if you like. [22:51] sstephenson: cuz it won't wait for the render to finish [22:51] bradleymeck: sstephenson it isnt async it runs sync [22:51] bradleymeck: it could be attached to async writers though [22:51] sstephenson: I see [22:52] bradleymeck: jesusabdullah it was a drunken affair by me [22:52] jesusabdullah: I could use a good template rendering engine [22:52] jesusabdullah: but I wouldn't be doing html [22:52] Tim_Smart: mjr_: So no passing an array as the second element? [22:52] jesusabdullah: latex, markdown and rtf [22:52] mjr_: Tim_Smart: oh, that should still work, but you don't need to do it anymore. I guess I should test that as well. [22:53] Tim_Smart: mjr_: Yeah, I use it as a feature :p [22:53] mjr_: Tim_Smart: OK, well let me know if that doesn't work then. [22:54] mjr_: Tim_Smart: I use it for mset/mget a lot, but I haven't tried all of the permutations in multi. [22:54] mattly has joined the channel [22:54] Tim_Smart: mjr_: I'm using it to process almost everything in my ORM. [22:56] tjholowaychuk: Tim_Smart: what was the issue? cleared the screen [22:56] tjholowaychuk: with the new api [22:56] Tim_Smart: tjholowaychuk: No issue, just checking what I have to change. [22:56] tjholowaychuk: ohh ok [22:57] ajpiano has joined the channel [23:00] rkieffer has joined the channel [23:01] abiraja has joined the channel [23:02] mattly has joined the channel [23:03] jesusabdullah: Can anybody recommend a non-html-specific templating engine? :/ [23:04] jesusabdullah: I see there aren't too many for node! [23:04] dacc has joined the channel [23:04] devinus has left the channel [23:04] sstephenson: Eco or EJS should work fine [23:04] sstephenson: Eco lets you define a custom escape handler, if you want to escape for a format other than HTML [23:05] bradleymeck: or mustache or something else, but if eco is the fastest, probably the way to go [23:05] tjholowaychuk: eco has more deps though [23:05] jesusabdullah: eco? link? :v Don't see it in ry/node/wiki/modules [23:05] tjholowaychuk: or does it ship with CS? [23:05] sstephenson: it depends on CS [23:06] sstephenson: but the compiled templates don't [23:06] tjholowaychuk: course [23:06] sstephenson: jesusabdullah: http://github.com/sstephenson/eco [23:06] jesusabdullah: thx dawg [23:07] sstephenson: I guess I'll add it to the wiki [23:07] jesusabdullah: Oh, coffeescript [23:07] jesusabdullah: I like coffee [23:07] sstephenson: you and me both [23:07] jesusabdullah: Hmm [23:08] jesusabdullah: I'll have to convert my yaml to json [23:08] jesusabdullah: hmm [23:09] jesusabdullah: sstephenson: The ecs templates compile to ejs? [23:09] jesusabdullah: er, eco? [23:09] HAITI has joined the channel [23:09] HAITI has joined the channel [23:11] bsstoner has joined the channel [23:11] pedrobelo has joined the channel [23:12] sstephenson: compiles to JS [23:12] jesusabdullah: Oh, neato [23:12] tjholowaychuk: oddly my old haml is faster than ejs [23:12] tjholowaychuk: x2 [23:13] jashkenas has joined the channel [23:14] trave has joined the channel [23:18] amerine has joined the channel [23:19] zmbmartin: how do I require all files in a folder? [23:19] jesusabdullah: Maybe use the fs module to get a list of files in the folder, and then .forEach over them? [23:20] ivong has joined the channel [23:20] ivong has left the channel [23:23] halfhalo: thats what I do! [23:26] emmanueloga has joined the channel [23:26] prettyrobots has joined the channel [23:29] trave: is .forEach built into Node? [23:29] prettyrobots: trave: Yes. [23:29] mape: V8 [23:29] trave: I have been using jsdom, and jqueryifying the window object [23:30] halfhalo: I use underscore for mine, but its close enough [23:31] trave: Im gonna have to learn what Node has over just vanilla js ... I do like working with the jQueryified dom, to easilly find/replace elements with selectors [23:31] prettyrobots: trave: http://github.com/ry/node/wiki/ECMA-5-Mozilla-Features-Implemented-in-V8 [23:31] trave: phanks prettyrobots, reading... [23:31] prettyrobots: trave: On the server side, you don't use DOM. [23:31] prettyrobots: You use a templating language, like nun. [23:32] prettyrobots: This is the server side template language I use: [23:32] prettyrobots: http://github.com/akaspin/nun [23:32] trave: I'll have to look into that, I do kind of like the persistent page view to deal with though, its fun. [23:33] dnolen has joined the channel [23:34] halfhalo: hehehehe.... plugin system works! [23:34] Anti-X: plugin to the socket [23:34] Anti-X: then we'll see what's what [23:34] prettyrobots: isaacs: Unexpected behavior when I attempt to install from a tarball. [23:34] isaacs: prettyrobots: what's up? [23:35] prettyrobots: I'm trying to build a *.deb for a package. [23:35] halfhalo: I added an easy to use plugin system to my irc class [23:35] halfhalo: and its awesome [23:35] prettyrobots: So... [23:37] zmbmartin: tjholowaychuk: I want to use some of your mvc example but I am running into something. How do I pass app into the controllers so I can remove the actions from the mvc.js and do my routes as app.get? [23:38] trotter has joined the channel [23:38] tjholowaychuk: zmbmartin: if that is all you want then you only really need to loop over a list of files [23:38] prettyrobots: I create directory foo. [23:38] tjholowaychuk: and require() them [23:38] prettyrobots: Then I ... [23:38] prettyrobots: cd foo && npm config set root . && npm cache add coffee-script 0.9.4 [23:38] isaacs: prettyrobots: npm config set root $PWD [23:38] isaacs: prettyrobots: . is not a valid root [23:39] prettyrobots: Its been working. [23:40] prettyrobots: Let me try with abosolute paths. [23:42] prettyrobots: isaacs: Okay. Made progress. [23:42] prettyrobots: Thank you. [23:44] kschzt has joined the channel [23:44] prettyrobots: isaacs: What is `npm install .` supposed to do? [23:44] prettyrobots: Or, no never mind. [23:44] isaacs: prettyrobots: it installs the current folder [23:44] isaacs: prettyrobots: but in that case, it works, because it's also the cwd [23:45] isaacs: prettyrobots: i should add support for npm config set root . [23:46] kschzt: next i need to make a better version of jqgrid :) [23:46] prettyrobots: isaacs: Okay. I'm really getting somewhere now. Thanks. [23:46] isaacs: np [23:48] kschzt: using mongoose a lot now [23:49] kschzt: going to use bully to elect 1 node responsible for rendering snapshots in a multiuser editor [23:50] Yuffster has joined the channel [23:52] kschzt: but tbh flipping over this news: Zynga buys Dextrose: http://tcrn.ch/bgB8Ux [23:53] trave: So what are the "hot" must have modules to get via npm these days? [23:54] kschzt: eyes ;) [23:54] agilandfast has joined the channel [23:54] trave: nun for templates? [23:54] trave: what does eyes do? [23:54] MikhX_ has joined the channel [23:55] kschzt: guys there is more to node.js than npm :) [23:56] isaacs: kschzt: put another way, even if you use npm, there's more to node than what's on the npm registry. there's also anything you write yourself. [23:56] kschzt: trave, http://github.com/cloudhead/eyes.js/tree/ [23:57] kschzt: i heart npm and all [23:57] trave: yes isaacs, im lovin it, just curious whats popular out there now, its kind of wild wild west still with Node, right? [23:57] isaacs: kschzt: i mean, it's like saying there's more to perl than cpan, or more to ruby than gems [23:58] kschzt: isaacs :) [23:58] agilandfast: isaacs: How much does the npm hosting costs? [23:58] isaacs: agilandfast: zero [23:58] isaacs: well, that's not quite true. i pay for the homepage. [23:58] agilandfast: How come? [23:58] isaacs: but the registry is sponsored by couchone [23:58] trave: ooh, that eyes does look handy kschzt :] [23:58] trave: thanks [23:58] sudoer has joined the channel [23:59] isaacs: agilandfast: it's just a couchapp [23:59] kschzt: trave, word, np, package.json is the most important thing about node now :D [23:59] agilandfast: But you host the packages [23:59] isaacs: agilandfast: well, yeah, but "you" == "couchone" in that sentence [23:59] rauchg_ has joined the channel [23:59] isaacs: agilandfast: they're couchdb attachments