[00:00] sechrist: is there a way to hotload? [00:00] sechrist: or do I have to reload the entire node instance to load new assets [00:00] sechrist: (in express/ejs) [00:01] tjholowaychuk: assets? aka public static files? [00:01] tjholowaychuk: or javascript files? [00:02] sechrist: javascript of course [00:02] sechrist: ie: javascript rendered html [00:02] sechrist: with ejs blocks etc [00:02] tjholowaychuk: in development env those should reload when changed [00:02] tjholowaychuk: since they are just re-evaluated [00:03] tjholowaychuk: and not cached [00:03] sechrist: okay that's pretty baller [00:03] tjholowaychuk: but as far as your node app itself you will need a reloader [00:03] tjholowaychuk: of somekind, plenty to pick from on the modules page [00:03] sechrist: I just don't want to keep restarting node during development of an html page [00:04] ryah: we shouldn't use SIGALRM in case we want event preemption at some point [00:04] _announcer: Twitter: "Node.js played in the morning and V8. This is bad. php and I think 喰Eru." [ja] -- tanarky. http://twitter.com/tanarky/status/24427355970 [00:05] tjholowaychuk: sechrist: hmm well yeah with the views you shouldnt need to [00:06] ryah: (alram + http://github.com/ry/node/blob/ba0c32e2e1aa873728a54df12a3785091f475143/deps/v8/include/v8.h#L2765 ?) [00:06] ryah: ( + eventsource branch) [00:06] _announcer: Twitter: "node.js + rx.js together to build a simple file server. Blog post coming soon: http://bit.ly/dmV8xq #RxJS #nodejs" -- Matthew Podwysocki. http://twitter.com/mattpodwysocki/status/24427552341 [00:10] sechrist: So something like Step is still required to render html even in ejs, right? [00:10] sechrist: like for real world usage.. DB queries, etc [00:13] breccan has joined the channel [00:13] ryah: SIGSYS sounds good [00:15] creationix: doctor.js has a pretty cool way to annotate types http://doctorjs.org/ [00:15] creationix: it's a type inference engine for js [00:15] jesusabdullah: SubStack: ^^ [00:15] creationix: sechrist: I wouldn't say required, but it can help [00:15] creationix: sechrist: I still think template engines allow for async helpers/data providers [00:15] _announcer: Twitter: "Worth reading: Lodge, the HTTP-to-Syslog Proxy w/node.js http://bit.ly/aOS9bS" -- Clay Loveless. http://twitter.com/claylo/status/24428214797 [00:15] creationix: then you can think sync and have it handle the parallel work for you [00:16] sechrist: any of these work yet? [00:16] creationix: just my corn engine [00:16] creationix: I don't think anyone took it on [00:16] sechrist: sigh [00:16] creationix: corn is like ejs without loops or conditionals [00:16] sechrist: so step+ejs = it [00:17] sechrist: ACTION still thinks it's too early to use node to generate dynamic html [00:17] bpadalino: is dynamic html really that useful anymore, or is it easier to just fill in those fields using ajax requests ? [00:17] sechrist: lmfao [00:18] sechrist: it is "easier" sure [00:18] sechrist: if "easier" is what you're going for [00:19] sechrist: I'd rather reduce http requests and have some content show without javascript for crawlers [00:19] bpadalino: ah, crawlers .. [00:19] sechrist: unless it's like a full blown 'webapp" [00:19] wakawaka has joined the channel [00:19] sechrist: I want the fastest loading time possible [00:20] sechrist: having an ajax call on a mobile device just to populate content that should have already loaded [00:20] sechrist: is murder [00:20] bpadalino: what about shipping generated json instead of mucking with the html and having the mobile parse/populate ? [00:21] badaxx: is there a middleware for express where I can access the current request? I want to set "lang" to a value depending on a session value in every request [00:21] creationix: sechrist: I use step + haml-js for wheat [00:21] sechrist: bpadalino: that doesn't address the SEO problem, but sure [00:21] creationix: badaxx: express middlewares are just connect middlewares [00:21] creationix: they have access to every request as it comes through [00:22] sechrist: bpadalino: For my latest project, I'm creating the initial HTML content that loads with the index, then jquery handles the changing content [00:22] sechrist: but i'm just anal [00:22] badaxx: ah cool, but when I set a custom middleware function it seems to be stuck! do i have to return anything in an express middleware? [00:22] creationix: sechrist: what I did for sousaball was to embed json in a script tag on the page and render it on the client [00:22] creationix: one request, but without the bloat of html [00:22] creationix: plus I was rendering to canvas so html wouldn't have helped [00:22] bpadalino: creationix: i think he is saying that doesn't solve his crawlers .. [00:22] HAITI: Im sending my client json rendering it with mustache [00:23] HAITI: i love it [00:23] vvsh_: sechrist: jquery sammy is pretty good http://code.quirkey.com/sammy/ [00:23] creationix: well, for crawlers, there is really only one option [00:23] bpadalino: no robots ? [00:24] sechrist: yeah you literally have to have html elements for crawlers [00:24] sechrist: since they don't execute javascript etc [00:24] sechrist: I'm sure the googlebot will eventually get with the times and run a personalized webkit, THEN parse the dom or something [00:24] sechrist: but for now, and the foreseeable future, nope [00:25] sechrist: now, if you don't care about SEO [00:25] sechrist: providing json in a script tag works [00:25] FuzzYspo0N has left the channel [00:25] bpadalino: are there any glob()-like capabilities built into node? i was looking around fs, and just seem to see the POSIX stuff .. [00:25] pquerna: crawlers <3 [00:26] pquerna: bpadalino: http://github.com/cloudkick/cast/blob/master/lib/util/fs.js#L199 [00:26] sechrist: now, if there was a node project that scanned through the CSS, checked for background images, and checked conditions for tiling and made CSS sprites accordingly [00:26] sechrist: I'd use that in a heartbeat [00:27] sechrist: I use a custom rolled thing atm [00:27] techwraith: Alright, I keep missing stuff. Anyone want to take a stab at answering this SO question? http://stackoverflow.com/questions/3705356/preventing-xss-in-node-js-server-side-javascript [00:27] bpadalino: pquerna: thanks - interesting ..would have never thought of looking there! [00:27] pquerna: bpadalino: well, its not built into node.js, its a util function we have for cast [00:28] sechrist: techwraith: my (vastly uneducated) of the problem is that you either have to parse the html to get proper attribute resolution, or get crazy with regex [00:28] pquerna: regex is the wrong way [00:28] sechrist: of course [00:28] sechrist: but [00:28] _announcer: Twitter: "We are interested in node.js infested, make install and you." [ja] -- kiyoshi hosoda. http://twitter.com/kiyoshih/status/24429170654 [00:28] pquerna: :) [00:28] sechrist: htmlparsers blow in node [00:28] sechrist: or did last I knew [00:28] sechrist: node-bbcode imo [00:29] bpadalino: pquerna: very neat .. thanks .. i'll check this out .. [00:29] SubStack: sechrist: you could roll with jsdom [00:29] technoweenie: hows it handle fucked up html though [00:29] techwraith: sechrist: I found some regex that might work for what I need, but it's not JS compatible from what I can tell: "||<[a-zA-Z][^>]*=['"]+javascript:\w+.*['"]+>|<\w+[^>]*\son\w+=.*[ /]*>" [00:30] technoweenie: replacing [14:38] spetrea: but it's a bit awkward [14:38] wink_: can you not just place that file where ever you want it? [14:38] c4milo: http://www.sencha.com/ [14:38] c4milo: ops , wrong window [14:38] c4milo: sorry [14:39] spetrea: wink_: well, you can.. [14:39] bryanl has joined the channel [14:40] dylang has joined the channel [14:40] rtomayko has joined the channel [14:43] ker2x has joined the channel [14:44] ker2x: hi. i'm compiling node-mongodb-native on another server, and i have tons of error i don't understand. while it worked on another server [14:44] bradleymeck_: is that a question? if so, paste [14:45] ker2x: i will paste. the some error are in french. sorry [14:45] ker2x: http://pastebin.com/fZQUfsVA [14:46] zigfrew has joined the channel [14:46] ker2x: there is something specific. i installed nodejs with ./configure --prefix=/home/nodejs/ [14:46] ker2x: and configured NODE_PATH [14:46] ker2x: hummmm [14:47] ker2x: Checking for node path : not found [14:47] ker2x: line 11 [14:47] ker2x: didn't notice [14:47] ker2x: i try again :) [14:47] ker2x: ok [14:47] ker2x: http://pastebin.com/gkH13sRH [14:49] ker2x: pas de retour chariot à la fin du fichier == no cariage return at EOF [14:49] ker2x: Erreur de segmentation == segmentation fault [14:49] freeall: Are you sure that /home/nodejs is correct? It may be /home/myusername/nodejs [14:50] ker2x: which node [14:50] ker2x: /home/nodejs/bin/node [14:50] Yuffster has joined the channel [14:50] ker2x: of course i added /home/nodejs/bin/ in the PATH [14:50] aheckmann has joined the channel [14:51] freeall: Oki. and you are sure that the path is correct? It's not /home/ker2x/nodejs? [14:51] femtoo has joined the channel [14:51] ker2x: i'm compiling with the user "nodejs" [14:51] _announcer: Twitter: "Learned some amazing things about node.js and Joyent at #cloudcamp. I'm excited to spend some time learning this when I have some downtime" -- Chris Nicola. http://twitter.com/lucisferre/status/24481938342 [14:51] ceej has joined the channel [14:51] freeall: Ahh, ok :) [14:51] ker2x: you can see at the begining of the pastebin : make[1]: entrant dans le répertoire « /home/nodejs/src/christkv-node-mongodb-native-70b279f/external-libs/bson » [14:52] jetienne_: ker2x: notice it is crashing in bson and that you compile something called. node-mongodb-native-70b279f [14:52] hornbeck has joined the channel [14:52] jetienne_: ker2x: aka it seems a lot close to mongodb [14:52] ker2x: ndoejs compiled without problems. it works [14:53] ker2x: and the module is, in fact, compiling "correctly" : 'build' finished successfully (1.469s) [14:53] ker2x: and the test segfault :) [14:53] jetienne_: ker2x: have you talked to the personn doing this mongodb native ? [14:53] jetienne_: bson = bin json = stuff from mongodb [14:54] ker2x: Mmmmmm [14:54] ker2x: jetienne_: not yet [14:54] bradleymeck_: ker2x i remember christkv saying something was off about recent nodes and his stuff [14:54] bradleymeck_: cant find in the logs if he ever had a solution, but it was in past 5 days [14:55] ker2x: Mmmm [14:55] ker2x: i succesfully compiled this module on another server that DO NOT run mongodb [14:56] ker2x: (where mongodb isn't and never was installed) [14:57] _announcer: Twitter: "http://bit.ly/9AaEff - my server #nodejs" -- Fedor Indutny. http://twitter.com/indutny/status/24482399262 [14:58] bradleymeck_: mmm [14:58] nefD: ker2x: FWIW, I had similar issues with the tests, but have been using the module without any problems anyway [14:58] bradleymeck_: node version was the same? [14:58] ker2x: haaaaaaaaaaaa no ! [14:58] nefD: unless im thinking of the othe rmongo module.. hrmm.. cant remember [14:59] ker2x: 2.0.0 vs 2.0.1 on the failing server [14:59] bradleymeck_: ACTION goes off to check changes for that [14:59] _announcer: Twitter: "@Arlen Use nodejs and throw out the other two." -- mathiasx. http://twitter.com/mathiasx/status/24482624066 [14:59] wink_: the mongo modules are a mess, the 10gen guys are supposedly working on a libev driver that should bind up easily [14:59] jamescarr has joined the channel [14:59] wink_: ker2x: i never found that bug btw ;) [14:59] spetrea: with Faye how do I send a message from server-side to all connected clients ? [15:00] spetrea: I tried making a fayeClient and doing .publish but it didn't work out [15:00] jetienne_: since when 0.2.1 is out ? [15:00] bradleymeck_: its in dev [15:00] bradleymeck_: its not *out* [15:00] bradleymeck_: at least as of last i heard [15:01] _announcer: Twitter: "@dalmaer likewise, see you this evening at the nodejs meetup!" -- Ariya. http://twitter.com/ariyahidayat/status/24482750957 [15:01] ker2x: wink_: i run with the native driver 24/7 since a week without problems :) [15:01] wink_: ker2x: join #mongodb and ask them where the libev driver is at, if its more than just me asking for it they may speed it up :> [15:01] ker2x: Mmmmmmm [15:02] ker2x: this server is a total mess (dev server) [15:02] _announcer: Twitter: "This evening's meeting in CologneJS # @ # with the subject cowoco node.js iwcgn in the # (unfortunately without me)" [de] -- Christian Scholz. http://twitter.com/mrtopf/status/24482842654 [15:02] ker2x: i had to install the static legacy version of mongodb [15:02] ker2x: because of a lot of library problems [15:02] jetienne_: http://nodejs.org/api.html <- bradleymeck_ it is there at least [15:02] ker2x: you think it's related ? [15:02] bradleymeck_: mmm nm then [15:03] ker2x: the probleme is... i don't even understand where is the problem [15:03] jetienne_: http://github.com/ry/node/tree/v0.2.1 <- 3days ago [15:03] spetrea: anyone here a Faye fan ? or should I switch to SocketIO ? it makes no sense to me using a technology if I can't find anyone who is using it [15:04] ker2x: well... i try with a 2.0.0 version [15:04] ker2x: thx for your help [15:04] overra has joined the channel [15:05] ker2x: nefD: ok thx :) [15:05] jetienne_: spetrea: socket.io is known to work [15:05] sideshowcoder has joined the channel [15:06] abhinay has joined the channel [15:06] jetienne_: updating ubuntu deb to 0.2.1 [15:07] q_no has joined the channel [15:07] bradleymeck_: spetrea, faye tends to be more ruby ppl im finding, socket.io more node, and raw websockets, just about only node [15:08] ker2x: well... i'll try later, on a clean server :) [15:09] ooooPsss: spetrea: faye should work just fine :) [15:12] jakehow has joined the channel [15:14] ajpiano has joined the channel [15:14] spetrea: ooooPsss: can I then ask you if I have some problems with it ? [15:16] dgathright has joined the channel [15:17] dohtem has joined the channel [15:17] dohtem has joined the channel [15:17] benburkert has joined the channel [15:17] spetrea: I am trying to send a message from the server to all clients using Faye and I don't seem to be very lucky [15:17] overra has left the channel [15:18] overra has joined the channel [15:18] mitkok has joined the channel [15:20] badaxx__ has joined the channel [15:20] tj has joined the channel [15:21] mitkok has joined the channel [15:21] _announcer: Twitter: "@allmarkedup what are you using bash functions for? Much more fun to write tools/scripts in JS with node... more readable as well." -- Stuart Loxton. http://twitter.com/stuartloxton/status/24484527383 [15:22] AAA_awright has joined the channel [15:25] _announcer: Twitter: "Details for, maybe the author of the ebb node.js author?" [ja] -- のりお. http://twitter.com/norio/status/24484820047 [15:25] niemeyer__ has joined the channel [15:27] dilvie has joined the channel [15:29] muellerkyle has joined the channel [15:30] saikat has joined the channel [15:31] AAA_awright has joined the channel [15:31] bradleymeck_ has joined the channel [15:31] ben_alman has joined the channel [15:31] muellerkyle_ has joined the channel [15:31] rwaldron has joined the channel [15:32] isaacs has joined the channel [15:33] daniellindsley has joined the channel [15:37] charlenopires has joined the channel [15:37] bradleymeck_: inimino about? [15:38] mitkok has joined the channel [15:39] _announcer: Twitter: "A continuous integration server written in node.js would be perfect" -- jamescarr. http://twitter.com/jamescarr/status/24485995145 [15:39] hayeah has joined the channel [15:39] freeall: Does anyone here know much about Mongoose? Have a beginners question, I guess. (sorry for the re-repost) [15:40] _announcer: Twitter: "npm has won the packaging war, has it? #nodejs" -- ziromr. http://twitter.com/ziromr/status/24486125231 [15:41] jan____: ryah: are you around? [15:41] mirko_ has joined the channel [15:41] adambeynon has joined the channel [15:42] maushu: * API: forceClose -> destroy for WriteStreams [15:42] maushu: Oh the horror, the API was changed! [15:42] steadicat has joined the channel [15:43] c4milo: no no no [15:43] c4milo: it changes time ago but that was a typo error [15:46] hellp has joined the channel [15:47] maushu: No can do. Initiating world self-destruct in 5... 4... 3... [15:47] Twelve-60` has joined the channel [15:48] bradleymeck_: !tweet @ziromr, yes yes it has [15:50] lakin has joined the channel [15:51] aubergine has joined the channel [15:52] ncursestest has joined the channel [15:52] ncursestest: oops [15:53] dmcquay has joined the channel [15:53] dmcquay: ping [15:53] bradleymeck_: pong? [15:54] dmcquay: lol [15:54] dmcquay: sorry, wrong window. thx anyway bradleymeck_ [15:54] Anti-X: i am actually watching ping pong [15:54] KungFuHamster has joined the channel [15:54] Anti-X: table tennis [15:54] dmcquay: now you get caps [15:55] dmcquay: LOL [15:55] dmcquay: :) [15:55] dmcquay: by the way, if any connect/spark folks are around [15:55] dmcquay: i checked that out finally yesterday and used it w/ upstart for deployment [15:55] dmcquay: and it just made me smile [15:56] dmcquay: fantastic move in the right direction for node.js [15:56] jesusabdullah: upstart is a process monitor right? [15:56] LowValueTarget has joined the channel [15:56] _announcer: Twitter: "@bangpound Sure, lookie: http://bit.ly/9hJJE4 also check out http://bit.ly/dmJMsa which is similar... do you have nodeJS and/or npm up?" -- Ruben. http://twitter.com/cha0s6983/status/24487413086 [15:56] jesusabdullah: (google reminds me that it's not quite a proc-mon, but can be used that way) [15:56] sh1mmer has joined the channel [15:58] _announcer: Twitter: "ebb and was the author of node.js together. The ebb fast libev advanced event driven I never came to fruition with little but a Web server was" [ja] -- のりお. http://twitter.com/norio/status/24487557289 [15:59] cloudhead has joined the channel [16:00] rauchg_ has joined the channel [16:00] mirko_ has joined the channel [16:02] aubergine_ has joined the channel [16:03] inimino: bradleymeck_ ⋱ I'm back [16:04] charlenopires has joined the channel [16:04] polyrhythmic has joined the channel [16:04] rauchg_ has left the channel [16:05] rauchg_ has joined the channel [16:05] mitkok has joined the channel [16:05] _announcer: Twitter: "Also, http://paste.therealcha0s.net is written with nodeJS using JSONTemplate (sex) for render" -- Ruben. http://twitter.com/cha0s6983/status/24488178366 [16:05] stephank has joined the channel [16:05] sideshowcoder has joined the channel [16:06] Eber has joined the channel [16:06] kschzt has joined the channel [16:06] Eber: Does anyone here knows a good resource to learn more and in deep about the javascript's prototype model? [16:07] bradleymeck_: mind if i make a github repo since idk how to give pull requests, i made a commonjs wrapper, did note that js_ast and js_pp have a circular dependency [16:07] bradleymeck_: inimino^ [16:07] nwhite has joined the channel [16:08] sudoer has joined the channel [16:08] _announcer: Twitter: "CouchDB, Node.js, Django ...you're mine now!!!" -- Stephen Bussard. http://twitter.com/sbussard/status/24488411897 [16:09] bmavity has joined the channel [16:09] dgathright_ has joined the channel [16:09] inimino: bradleymeck_ ⋱ Sure, you can just send me a patch at inimino@inimino.org though. [16:10] inimino: bradleymeck_ ⋱ Did you just add a CommonJS wrapper around the existing files? [16:10] nerdEd has joined the channel [16:11] bradleymeck_: i had to munge a little of the files but yea [16:11] inimino: hm, ok [16:11] bradleymeck_: js_ast js_pp circular dep had to do some stuff [16:11] inimino: not sure how I want to handle that yet [16:11] _announcer: Twitter: "http://bit.ly/c1gkE2 is all that is interesting in node.js? . Net / c # can offer a lot more with equal complexity of" [ru] -- Andrew Maraev. http://twitter.com/the__vk/status/24488690370 [16:13] inimino: both js_ast and js_pp are going to be dependencies of PanPG but for that I don't want to have them in separate modules, just add them to PanPG.js in the build. [16:13] bradleymeck_: well i just wanted js_ast so thats what i exposed [16:14] inimino: But for standalone use they should be modules, so I'll probably keep the files as plain JavaScript but add a script that builds those two modules. [16:15] bradleymeck_: !tweet @the__vk node.js is interesting by being async, evented, and front & backend language. [16:15] _announcer: Twitter: "Ill ask again since is morning ish for the west coasters, anyone have a favorite NodeJS templating engine?" -- Greg Ferrell. http://twitter.com/gregferrell/status/24488981676 [16:15] cferris has joined the channel [16:16] abhinay_ has joined the channel [16:16] mies has joined the channel [16:16] benburkert has joined the channel [16:17] ditesh|cassini has joined the channel [16:18] ooooPsss: Eber: I don't know but I'd be interested in knowing as well! tell me if you find something! [16:19] Eber: ooooPsss: ok ;) [16:20] aliem has joined the channel [16:20] Alex-SF has joined the channel [16:20] pippoppo has joined the channel [16:21] aubergine has joined the channel [16:21] wink_: eber, ooooPsss: try this article: http://sweatte.wordpress.com/syntax/javascript-idioms-and-gotchas/ [16:21] dilvie has joined the channel [16:22] Eber: wink_: thanks! it looks great :) [16:22] nerdEd has joined the channel [16:22] Anti-X: :D [16:22] EyePulp has joined the channel [16:23] noahcampbell has joined the channel [16:23] noahcampbell has joined the channel [16:23] captain_morgan has joined the channel [16:25] stagas has joined the channel [16:30] c4milo has joined the channel [16:32] jesusabdullah: ryah: New colors in the REPL are pretty sweet [16:33] tjholowaychuk: I like them too :) [16:33] tjholowaychuk: although kinda high level for core [16:33] tjholowaychuk: but hey [16:33] jesusabdullah: mebbs [16:34] _announcer: Twitter: "@TheMarco @davglass won't be speaking about nodejs and yui until Thu afternoon. Here's to a speedy recovery of @bookaliciouspam" -- Bart Teeuwisse. http://twitter.com/bartt/status/24490532134 [16:35] patientfox has joined the channel [16:36] sudoer has joined the channel [16:36] noahcampbell has joined the channel [16:36] patientfox: hi.. is it possible/feasible to put a synchronous wrapper around async functionality? or does it only work going the other way? [16:37] niemeyer__ has left the channel [16:37] wink_: patientfox: yes, sort of [16:38] wink_: check out Step [16:39] gerred has joined the channel [16:39] patientfox: wink_: thanks [16:39] wink_: http://www.google.com/url?sa=t&source=web&cd=2&ved=0CB0QFjAB&url=http%3A%2F%2Fgithub.com%2Fcreationix%2Fstep&ei=M6WPTOyJE8aqlAe289hE&usg=AFQjCNHOMUbe8IWQ-7sdGnp-j_3cR6Thkw&sig2=fXQFjZlxBUvoVrzqYM4FpQ [16:39] wink_: er [16:39] wink_: http://github.com/creationix/step [16:39] wink_: stupid google :< [16:39] hayeah has joined the channel [16:41] patientfox: does Step block while processing the callback chain? [16:42] wink_: it doesnt, but it won't call the next function in it's list until the first has completed :> [16:42] patientfox: ACTION nods [16:42] patientfox: so yeah.. "sort of", heh [16:42] wink_: :D [16:43] patientfox: i didn't think there'd be a "true" way to block. was hoping, though. [16:43] mbrochh]2 has joined the channel [16:43] patientfox: stupid asynchronous programming, making me come out of my comfort zone [16:43] wink_: well it really depends on what you're trying to block... [16:43] patientfox: and learn new stuff! [16:43] jesusabdullah: Why would you want to block anyways? >:D [16:43] wink_: there isnt a way to just say 'block here' [16:43] jesusabdullah: I've implemented semaphores in the past. At least, I guess you could call them semaphores [16:43] wink_: but if you were convinced of your design and absolutely had to block doing something, you could rewrite the binding to whatever it was so that it was sync [16:43] jesusabdullah: Have some kinda boolean [16:44] jesusabdullah: if (unlocked) { lock(); do_stuff(); unlock(); } [16:44] wink_: however you might get lynched if word gets out ;) [16:44] patientfox: im just being lazy and don't want to unlearn my synchronous habits in certain cases [16:44] patientfox: but its ok, was just seeing if there was some magic dust [16:45] wink_: yeah, you'll need to chuck that one ;> [16:45] jesusabdullah: It's fun patientfox! Really! [16:46] patientfox: i never said it wasn't [16:46] patientfox: you're preachin to the choir here [16:46] tjholowaychuk: patientfox: just abstract your api more, you should not really need something like step [16:46] deepthawtz has joined the channel [16:46] tjholowaychuk: its just an extra dependency [16:46] patientfox: i doubt ill even use it [16:46] tjholowaychuk: maybe for a quick script or for your own app or something [16:47] tjholowaychuk: but I wouldnt use anything with extra pointless cruft like that [16:47] patientfox: since the problem id be theoretically using it to mitigate isn't solvable to my expectations [16:47] patientfox: so expectations.adjust() [16:47] stagas: step is useful if you have multiple actions that need to be done in series [16:48] stagas: the .group() function is very handy [16:48] jesusabdullah: Don't forget, expectations.adjust takes a callback as an argument! [16:48] benburkert has joined the channel [16:50] qFox has joined the channel [16:50] _announcer: Twitter: "@nodejsbot I was specifically talking about the non-blocking continuation implementation in the #mongodb driver for #nodejs" -- Julian Kelsey. http://twitter.com/scrawlings/status/24491858599 [16:52] deadlyicon has joined the channel [16:52] nefD: at least step is still non-blocking :P [16:53] nefD: and i think one of the biggest merits of step (for me, at least) is that you can use it to help ease the transition into asynchronous programming.. my goal isn't to use it as a crutch forever, but to help get things working quickly.. then I can make a second pass later to remove step once i have a better understanding of how to accomplish things [16:55] wink_: its definitely just sugar, but it tastes pretty sweet ;> [16:55] nefD: wink_: indeed ;D [16:57] isaacs has joined the channel [16:57] Twelve-60` has joined the channel [16:59] TooTallNate has joined the channel [17:00] _announcer: Twitter: "@ Meso node.js api.html thank you for it reflects a bit modified. # Nodejs_jp" [ja] -- koichik. http://twitter.com/koichik/status/24492601277 [17:00] endor has left the channel [17:03] mikew3c_ has joined the channel [17:09] q_no has joined the channel [17:12] mies has joined the channel [17:13] trotter1 has joined the channel [17:13] benv has joined the channel [17:13] ivanfi has left the channel [17:14] marcostoledo has joined the channel [17:15] benburkert has joined the channel [17:15] niko has joined the channel [17:17] ngw has joined the channel [17:18] _announcer: Twitter: "We already have 40 members in the group NodeJS Brazil only on the first day nodebr # # # epicwin nodejs - http://bit.ly/cHJDXG" [pt] -- Emerson Macedo. http://twitter.com/emerleite/status/24494026673 [17:20] cardona507 has joined the channel [17:21] Nohryb has joined the channel [17:22] guybrush: tjholowaychuk: i am trying to route into a node-module-dir with express, anyhow it doesnt work with images --- http://gist.github.com/579402 --- is the proper way to do it at all? [17:22] zomgbie has joined the channel [17:22] tjholowaychuk: guybrush: why are you not using a staticProvider? [17:22] tjholowaychuk: not sure what your intention is [17:22] guybrush: i used it already :p [17:23] sh1mmer has joined the channel [17:23] guybrush: i use the staticProvider already for app.use(connect.staticProvider(__dirname + '/public')); [17:24] tjholowaychuk: guybrush: you could probably do a app.get('/foo/*', function(req){ req.params[0] is the "*" splat }) [17:24] tjholowaychuk: guybrush: but howcome you dont use additional static providers to serve these other directories? [17:25] guybrush: hm i didn't think of that to be honest [17:25] tjholowaychuk: there is not much overhead to have a bunch [17:26] tjholowaychuk: I had a CMS in the works, and used that to automatically serve each modules public dir [17:26] isaacs has joined the channel [17:26] isaacs: pgriess: hey, you around? [17:27] pgriess: isaacs: yeah, what's up? [17:27] robotarmy has joined the channel [17:27] boaz has joined the channel [17:28] isaacs: ryah asked me to take a look at that querystring.stringify patch you snet. [17:28] guybrush: tjholowaychuk: ah ok, multiple staticProviders are cool [17:28] isaacs: pgriess: i was wondering if you could briefly explain what's still supported, what isn't, etc? [17:29] pgriess: isaacs: sure [17:29] pgriess: isaacs: (btw the patch is here http://github.com/ry/node/commit/422d3c93bc7391e105cfb4363011088c27ec86a6) [17:29] langworthy has joined the channel [17:29] bradleymeck_ has joined the channel [17:29] isaacs: oh, i guess he already approved it anyhow ;) [17:29] pgriess: isaacs: yeah, i was surprised, too [17:29] pgriess: isaacs: its pretty dramatic [17:30] pgriess: isaacs: (intentionally) [17:30] isaacs: suresure [17:30] isaacs: it looks from the tests like {foo:[1,2,3]} is still supported [17:30] pgriess: isaacs: anyway, what's supported is: splitting a query string at the '=' boundaries into key-value pairs. multiple instances of the same key are glommed into an array. [17:30] isaacs: but without the stupid php-style foo[]=1&foo[]=2 stuff [17:30] pgriess: isaacs: yes [17:30] isaacs: what about foo[bar]=baz? [17:30] pgriess: isaacs: no [17:30] isaacs: does that still make an object? [17:30] isaacs: ok [17:31] isaacs: so that'll just be {"foo[bar]" : "baz"}? [17:31] tjholowaychuk: { 'foo[bar]': 'baz' } ? [17:31] tjholowaychuk: damnit [17:31] tjholowaychuk: beat me [17:31] pgriess: isaacs: foo[bar]=baz will give you {'foo[bar]' : 'baz'} [17:31] pgriess: damnit [17:31] pgriess: beat me too [17:31] pgriess: unpack behavior is very simplistic [17:31] pgriess: just split w/ some basic array support [17:32] bradleymeck_: isaacs, did you want it the exact same as the branch used to be for search? (going over it in a second) [17:32] pgriess: pack is a bit more complex, but only slightly. the complexity comes from the desire to support passing an object and using its keys/values as params [17:33] technoweenie has joined the channel [17:33] isaacs: bradleymeck: i'm not particular. you can use ls2, or create a new branch, or even just do it on your master if you liek. [17:33] bradleymeck_: kk, ill update the mustache to its head and make sure that doesnt break [17:34] bradleymeck_: send you a pull request in a bit [17:35] _announcer: Twitter: "Indeed lscosta @ 44:) - # # nodebr nodejs" [pt] -- Emerson Macedo. http://twitter.com/emerleite/status/24495277914 [17:36] isaacs: pgriess: and since you don't have nested objects, i guess the cycle detection isn't relevant.. [17:36] pgriess: isaacs: exactly. stringification explicitly does not recurse [17:36] matschaffer has joined the channel [17:36] trotter has joined the channel [17:37] isaacs: pgriess: ok, it's got my blessing. [17:38] konobi: isaacs: howdy [17:38] isaacs: konobi: yo [17:38] KungFuHamster has joined the channel [17:41] matschaffer1 has joined the channel [17:41] trotter1 has joined the channel [17:44] mr_daniel has joined the channel [17:46] _announcer: Twitter: "Enjoyed #cloudcamp #vancouver last night. Especially break out session on ssjs/node.js w/ @rob_ellis, @sintaxi and many others." -- Shawn Price. http://twitter.com/sprice/status/24496042028 [17:48] dgathright has joined the channel [17:51] _announcer: Twitter: "Surrounded by ajax library tshirts, foreign accents and people interested in node.js. #londonajaxmeetup" -- Jonathan Holmes. http://twitter.com/yoniholmes/status/24496383607 [17:53] bradleymeck_: so has anyone solved world hunger yet? [17:53] sveisvei_: use [17:53] sveisvei_: nosql [17:53] sveisvei_: w [17:54] aurynn: don't use mysql. if your data is relational, use a relational db. otherwise, don't. [17:54] mdg: use jquery [17:54] zomgbie has joined the channel [17:55] Esteth has joined the channel [17:55] q_no: world hunger? I thought Steve Jobs is gonna cover that [17:55] c4milo1 has joined the channel [17:56] stagas: iFeedU [17:56] Esteth: Does anyone know where I can find a step-by-step on using mongoDB from within node? I've been trying to use node-mongodb-native, but there's so many callbacks and my database doesn't seem to be touched by it, then I tried mongoose, but the docs are inconsistent (methods are mentioned which don't exist, and there seems to be no API page [17:57] q_no: yeah, and the iFood comes in fancy colored socks.. but the downside is. it makes people more hungry [18:00] beppu: http://www.permaculture.org/ [18:00] bradleymeck_: im still waiting on the Apple bionic iEye [18:00] _announcer: Twitter: "update nodejs deb package on ubuntu repository. v0.2.1 is out. have fun http://bit.ly/bmLnza" -- Jerome Etienne. http://twitter.com/jerome_etienne/status/24496994268 [18:00] frode has joined the channel [18:00] voodootikigod: qq: writing native code why the hell would i get this: error: ‘Data’ is not a member of ‘node::Buffer’ [18:01] voodootikigod: I am sures I am just missing a header [18:01] voodootikigod: I have node_buffer.h included [18:01] voodootikigod: trying to do Buffer::Data(buffer_obj) [18:02] bradleymeck_: node::Buffer, are you using namespaces? i havent used that yet heh [18:02] voodootikigod: modelling after node_file.cc [18:02] ajpiano has joined the channel [18:04] jacobolus has joined the channel [18:04] voodootikigod: bradleymeck: is there a better way to handle buffers or just opt for string? [18:05] figital has joined the channel [18:05] isaacs has joined the channel [18:05] bradleymeck_: i forget how i did it, sec [18:06] mjr__ has joined the channel [18:06] pquerna: windows sucks and i hate it. [18:06] huyhong has joined the channel [18:07] captain_morgan has joined the channel [18:07] mjr__: me three [18:07] pquerna: binary file mode. why. [18:07] Anti-X has joined the channel [18:07] mjr__: mjr [18:08] mjr__: uh, that's not how you change your nick [18:08] CrabDude: Hey, does anyone know why "Content-Length" always appears to be wrong here? http://pastebin.com/QBzk4fd4 [18:08] mjr_: One less underscore. [18:08] bradleymeck_: seems like node::Buffer::Data is there for me voodootikigod, are you acidentally using a . instead of ::? [18:09] CrabDude: my browser always cuts off my contents (I'm assuming b/c of an inccorect Content Length) [18:09] voodootikigod: http://github.com/voodootikigod/node-serialport/blob/master/serialport_native/serialport_native.cc#L265 [18:09] pquerna: CrabDude: hmm. seems fine ish. [18:09] CrabDude: ha [18:09] pquerna: CrabDude: can you use curl to look at it? [18:10] Esteth has joined the channel [18:10] CrabDude: I'll try real quick [18:10] mikeal has joined the channel [18:10] pquerna: curl -i -vvv $URL [18:11] voodootikigod: bradleymeck_: i am using the namespace v8, node so i dont have to prefix with node:: [18:11] bradleymeck_: !tweet @the__vk yes it can be said about many things, but node is striving to keep the control flow visible for your program (hiding control flow means semaphore overload for me). plus the browser to server cut/paste is really nice [18:11] voodootikigod: but yes [18:11] voodootikigod: its all there [18:11] bradleymeck_: ill take a look [18:11] voodootikigod: cool [18:11] voodootikigod: i have to grab food [18:11] voodootikigod: else I die [18:11] voodootikigod: whcih is never good [18:12] scnd has joined the channel [18:12] Aria has joined the channel [18:12] ph^ has joined the channel [18:12] ph^ has joined the channel [18:12] CrabDude: pquerna your curl returns the full payload, but just "$curl $URL" gives the shortened content [18:13] blowery: warrior needs food badly [18:14] tjholowaychuk: CrabDude: his just adds verbose output, so that is weird :s [18:14] CrabDude: and the headers "-i" [18:14] tjholowaychuk: yeah [18:14] CrabDude: oh no [18:14] tjholowaychuk: shouldnt alter anything though [18:14] CrabDude: must've been a fluke, just retested [18:14] CrabDude: guess it's unpredictable [18:14] _announcer: Twitter: "All I want to do is get node.js to spit out useful HTTP debugging info. Instead I’m buried under npm not working. #ITSAPROCESS" -- Steve Streza. http://twitter.com/SteveStreza/status/24497936566 [18:15] CrabDude: curl -i -vvv http://api.mefeedia.com/search?q=test [18:15] isaacs: !tweet @SteveStreza Come to #node.js on Freenode and I'll help you out. [18:15] pquerna: CrabDude: add --http1.0 and --raw [18:16] pquerna: CrabDude: --raw will dump the raw http stream including chunked encoding [18:16] sstreza: hi isaacs [18:16] pquerna: (so it won't be valid json), but then we could see if node is doing soemthing wrong with the chunks [18:16] isaacs: hiya, sstreza :) [18:16] marcostoledo has left the channel [18:16] isaacs: what's up? [18:16] huyhong has left the channel [18:16] Esteth has joined the channel [18:16] sstreza: well im trying to get a trace of HTTP requests that i'm making through node, but i cant get it to run through Charles Proxy [18:17] sstreza: i found some log from in here saying i should install node-pcap to do this [18:17] mjr_: uh oh [18:17] isaacs: sure, node-pcap has some goodies for that. [18:17] isaacs: mjr_'s your man there :) [18:17] sstreza: i'll try compiling it from source rather than using npm [18:18] mjr_: sstreza: what problem are you having? [18:18] isaacs: sstreza: what happens when you do npm install pcap? [18:18] MikhX has joined the channel [18:18] sstreza: is there a pastebot [18:18] isaacs: sstreza: that should give you an "http_trace" function [18:18] mjr_: sstreza: I like to use gist.github.com [18:18] isaacs: sstreza: most people use gist.github.com or pastie.org [18:19] sstreza: http://gist.github.com/579506 [18:19] mjr_: Connection refused [18:19] jesusabdullah: gisthub is great [18:19] mjr_: I think that's an issue of npm trying to talk to the registry and failing. [18:19] isaacs: sstreza: ah, now we're being productive! please gist the output from this: npm config ls [18:19] isaacs: sstreza: oh, wait, nvm, you have a very very old version. [18:20] isaacs: sstreza: curl http://npmjs.org/install.sh | sh [18:20] sstreza: weird, i just installed this a couple weeks ago, heh. running the script [18:20] jesusabdullah: s/a couple/fourteen/ [18:20] jesusabdullah: ;) [18:20] isaacs: sstreza: couple of weeks can be a very long time in nodeland :) [18:20] sstreza: haha true :) [18:20] isaacs: time moves differently here. [18:20] mjr_: Oh, I just noticed that node_pcap doesn't work with the latest node, but it does work with 0.2.0 [18:21] bradleymeck_: voodootikigod idk on first glance [18:21] jesusabdullah: ruh-oh? [18:21] mjr_: Something about Buffers looks different [18:22] sstreza: urg, my node is out of date too [18:22] isaacs: sstreza: yeah, update the world, and try again. [18:23] isaacs: mjr_: aha, you're getting bit by fastbuffers [18:23] jesusabdullah: sstreza: 1.0.3 --> 2 series? [18:23] mjr_: Yeah, I was afraid of that [18:23] sstreza: jesusabdullah: i was on 0.1.102 [18:23] tjholowaychu has joined the channel [18:23] isaacs: mjr_: are you sniffing for "[object Buffer]"? If so, use Buffer.isBuffer(buf) instead [18:23] jesusabdullah: CLOSE ENOUGH [18:23] jesusabdullah: XD [18:24] isaacs: mjr_: otherwise, the api should be the same [18:24] mjr_: So isaacs, how do you publish one version of package that works for one version of node and another for the other? [18:24] mjr_: isaacs: the issue is how they look on the C++ side [18:24] isaacs: mjr_: bump the version and the "engines" listing, and publish [18:24] mjr_: oh, "engines" [18:25] CrabDude: pquerna Hmmm... it appears the issue might be with my nginx reverse proxy. I don't see the node headers (i.e., Content-Length) being sent [18:25] isaacs: mjr_: { "engines" : { "node" : ">=0.2.0 <0.3.0"}} [18:25] creationix has joined the channel [18:25] the_giver2 has joined the channel [18:25] joeshaw has joined the channel [18:25] mjr_: isaacs: wow, and you sort out all of those overlapping sets of capabilities and requirements even for the version of node? [18:26] isaacs: mjr_: i think 0.2.x *should* be safe. [18:26] isaacs: mjr_: npm just ignores anything that isn't supported by the current version of node. [18:26] isaacs: mjr_: otherwise, it tries to get the highest version. [18:26] CrabDude: pquerna oh, no I'm retarded, that's not it [18:26] mjr_: gotcha [18:26] isaacs: mjr_: "current" == "the one you're using to run npm right now" [18:26] CrabDude: pquerna but it does have something to do with the chunking, so thanx! [18:26] isaacs: mjr_: so it's entirely possible to install something, and then update node, and now it's broken. [18:27] isaacs: mjr_: but in that case, usually "npm update" will resolve the situation. [18:27] pquerna: CrabDude: i'd suggest debugging it without nginx inbetween first [18:27] CrabDude: pquerna good idea [18:27] bradleymeck_: isaacs the lifecycle thing doesnt appear to be picking up any new commands i make when i merged branches [18:27] up has joined the channel [18:27] isaacs: bradleymeck: ? [18:28] Anti-X has joined the channel [18:28] isaacs: bradleymeck: lifecycle thing? [18:28] maushu has joined the channel [18:29] bradleymeck_: idk this got rehauled since when i last editted, adding "search" in npm.js doesnt seem to make it recognized still [18:29] mjr_: Oh, happy day. git fetch + merge to the latest and greatest head fixed the issue with last week's latest greatest head and pcap. [18:29] hellp has joined the channel [18:30] mjr_: er, but replaced it with an even worse one [18:30] isaacs: bradleymeck: just adding "search" to the npm.js list, and having a "lib/search.js" should make it work, no? [18:30] bradleymeck_: nevermind, forgot the goofy npm install . [18:30] bradleymeck_: make doesnt work ya [18:30] isaacs: ah [18:30] isaacs: bradleymeck: make link [18:31] isaacs: bradleymeck: or "npm link" in the folder [18:32] mjr_: Anybody know how I'm meant to do this in C++ with fastbuffers? http://github.com/mranney/node_pcap/blob/master/pcap_binding.cc#L85 [18:32] mjr_: ryah: ^ [18:32] _announcer: Twitter: "#protip If you want to use node.js for things, install from a git clone and not from homebrew, because they update very, very often." -- Steve Streza. http://twitter.com/SteveStreza/status/24499077736 [18:32] bradleymeck_: do i have to be sudo to install? mmm [18:32] isaacs: mjr_: i think "Buffer" was renamed to "SlowBuffer" and "FastBuffer" was renamed to "Buffer" [18:32] isaacs: bradleymeck: if it's going to a root-owned place, sure [18:33] bradleymeck_: well it seems the docs kill it by trying to install so then .node_libraries gets some sudod crud if i do install [18:33] Twelve-60 has joined the channel [18:33] mbrochh has joined the channel [18:33] mbrochh has joined the channel [18:33] blackbrrr has joined the channel [18:34] isaacs: bradleymeck: npm config set manroot ~/local/share/man or somethign [18:34] c4milo1: ACTION in ESL classes  [18:34] bradleymeck_: cool beans [18:35] sstreza: isaacs: updating node and npm fixed everything, thanks :) [18:35] mjr_: sstreza: does http_trace work for you? [18:36] sstreza: it does, but i installed node 0.2.0, not head [18:36] sstreza: i can try on head if you want [18:36] mikeal has joined the channel [18:36] mjr_: sstreza: it's broken on head [18:36] mjr_: pcap uses Buffers on the C++ side, and that part changed recently. [18:36] sstreza: ah [18:37] mjr_: From a quick read of the source, I can't figure out what the right thing to do is. This requires some C++ wizardry I think. [18:37] mjr_: Or at least some ryah insight. [18:37] mjr_: Hey mikeal, I made a Redis library yesterday for some reason. [18:38] bpot has joined the channel [18:38] _announcer: Twitter: "Someone tell me a nifty use of node.js or a description of why I need it. Thank you" -- Adam Howard. http://twitter.com/skattyadz/status/24499470390 [18:38] mjr_: Mostly because I kept fighting with the existing one. [18:40] silentrob has joined the channel [18:40] ryah: mjr_: it's a bit different with the c++ api [18:40] ryah: mjr_: what's unclear is how we can support both 0.2.x and the new API... [18:40] ryah: might have to ifdef... [18:40] mjr_: ryah: i'm OK with a breaking change moving forward. [18:41] ryah: mjr_: but the new API is this: [18:41] ryah: no more C++ Buffer instances [18:41] ryah: just take the Local which is a FastBuffer and do [18:41] zomgbie has joined the channel [18:41] ryah: Buffer::Data(object) [18:41] ryah: and Buffer::Length(object) [18:41] ryah: to get a char* and size_t respectively [18:42] maushu: Madness. [18:42] mjr_: ryah: is there a Buffer:HasInstance() test? [18:42] ryah: obviously this needs to be thought about/documented etc [18:42] ryah: mjr_: HasInstance still works [18:42] mikeal: mjr_: awesome [18:42] mikeal: is it on github? [18:43] ryah: mjr_: node_net.cc is a good example [18:43] mikeal: i was getting annoyed with that other one as welll [18:43] mjr_: mikeal: yeah http://github.com/mranney/redis [18:43] ryah: mjr_: http://github.com/ry/node/blob/debf3894906e5b52f16c066e81679997538a55e2/src/node_net.cc#L542 [18:43] mikeal: as far as one off custom protocols go Redis did a pretty good one [18:43] mjr_: mikeal: everything isn't done yet, mostly not pub/sub. Everything else seems to work. [18:43] mikeal: i don't know if the other one does pub/sub [18:43] mikeal: the one time i used it I wrote a little one off tcp handler [18:43] mjr_: mikeal: just tediously burning through tests right now. [18:44] dgathright_ has joined the channel [18:44] mjr_: ryah: thanks, that's the one I need. [18:44] tjholowaychuk: /clear [18:44] tjholowaychuk: baha [18:44] tjholowaychuk: fuck [18:44] stephank` has joined the channel [18:44] tjholowaychuk: ps new redis thing looks good [18:44] tjholowaychuk: going to keep an eye on it [18:45] mjr_: mikeal: I'm open to suggestions for how to make a great redis library, especially in ways to make it particularly node-y. [18:46] WALoeIII has joined the channel [18:46] Anti-X has joined the channel [18:46] jesusabdullah: mjr_: more callbacks. Callbacks are like node's cowbell [18:46] mjr_: jesusabdullah: I've got callbacks coming out of my callback's ass. [18:47] ryah: mjr_: suggestions on how to improve that API so that it's backwards compatible would be helpful [18:47] ryah: i jst wanted to get fast buffers landed as quickly as possible [18:47] c4milo1: through events [18:47] mjr_: ryah: yeah, totally. I think it's great to get them in now. [18:47] c4milo1: it could be more readable [18:48] c4milo1: it could be like a message passing approach [18:48] mjr_: ryah: I think it'll make this redis library way faster. Handling the "multi bulk replies" requires returning an array of Buffers. [18:49] mjr_: ryah: and on the C++ side, as long as there's some way to get to the raw memory pointer, who cares. [18:50] _announcer: Twitter: "My first few days of nodejs work have been awesome." -- Jeremy Crapsey. http://twitter.com/jeremycrapsey/status/24500254166 [18:51] derferman has joined the channel [18:54] saikat: mjr_: which redis library are you using? [18:54] mjr_: saikat: I just wrote one [18:54] saikat: ah, nice [18:54] mjr_: still a bit rough, but will probably be usable by the end of the day [18:54] _announcer: Twitter: "taking a moment to look at #node.js Does anyone have any input?" -- Doug. http://twitter.com/douggdev/status/24500537181 [18:55] mjr_: Need to write more tests and remove extra logging, etc. [18:55] saikat: are you making it for fun? or just didn't like fictorial's? [18:55] mjr_: Both [18:55] mjr_: fictorial's has issues on the latest node. [18:55] saikat: with master, does it have issues with 0.2.1? [18:55] saikat: i've been using it on latest stable [18:55] mjr_: And I fear abstractions that I don't understand, so I wanted to understand how the redis protocol worked. [18:55] saikat: but there might be something lurking there i don't know about [18:56] tjholowaychuk: mjr_: let me know when you have a release out, id like to try it and benchmark etc [18:56] tjholowaychuk: ACTION loves the redis protocol [18:56] voodootikigod: ryah: the fastbuffer change is that 0.2.1 or 0.2.x [18:57] ryah: voodootikigod: it won't be on the 0.2.x branch - it'll be 0.3.x [18:57] voodootikigod: fuck me and a donkey [18:57] bradleymeck_: isaacs how do i gen docs on this bad boy? about to send out that request, all seems in order [18:57] voodootikigod: bradleymeck: thats why it was failing [18:57] tjholowaychuk: mjr_: and make sure yours gets on npm lol i still dont think his is [18:57] isaacs: bradleymeck: npm install ronn and then "make doc" [18:57] bradleymeck_: !tweet @douggdev #node.js on freenode can rant and rave forever [18:57] mjr_: tjholowaychuk: yeah, putting it on npm is one of the biggest breakages of the current one. [18:57] isaacs: bradleymeck: but you can just send me the pull req with markdown, i can generate the troff [18:57] _announcer: Twitter: "@nodejsbot http://bit.ly/dABzFB explaining why the native #mongodb driver for #nodejs frustrating me." -- Julian Kelsey. http://twitter.com/scrawlings/status/24500731010 [18:58] isaacs: bradleymeck: it's better to do it all at once, i find, so you don't get as much clutter in the history [18:58] voodootikigod: ryah: eta for 0.3 series? days, weeks, months is fine [18:58] bradleymeck_: im clobering it into a single change [18:59] bradleymeck_: lol ppl always send nodejsbot msgs [18:59] _announcer: Twitter: "@claylo btw, I see you're digging a bit more into node.js lately, or so it would seem. How do you dig it?" -- RyanGahl. http://twitter.com/RyanGahl/status/24500830592 [19:00] bradleymeck_: !tweet @scrawlings yea... db bindings are a bit painful for mongo, cradle and felixge have made some OO bindings to couch and mysql [19:00] voodootikigod: ryah: trying to determine if i should require master for this lib or provide 0.2.1 support [19:00] voodootikigod: is there a way to detect it at the c level? [19:01] Esteth has joined the channel [19:02] ryah: voodootikigod: weeks [19:02] voodootikigod: ryah: cool [19:02] voodootikigod: thanks [19:02] mjr_: ryah: updated pcap to use the new C++ Buffer API, and it seems to work. http://github.com/mranney/node_pcap/blob/master/pcap_binding.cc#L87-90 [19:02] mjr_: hooray [19:03] ryah: voodootikigod: you should provide 0.2.x support [19:03] kwe has joined the channel [19:03] bradleymeck_: make: Circular man <- doc dependency dropped. ... i dont reference any such thing [19:03] voodootikigod: will the 0.2.x still work with 0.3.x or is it being completely rocked out? [19:04] joshholt_ has joined the channel [19:04] CrazyGoogle has joined the channel [19:04] HAITI has joined the channel [19:06] programble has joined the channel [19:08] cloudhead has joined the channel [19:10] ryah: voodootikigod: there will be breaking changes. [19:10] voodootikigod: ok [19:10] ryah: but 0.2 will be supported for a while with bug fixes - it'll be something nice for people to develop on [19:11] skampler: will buffer.slice ever disappear? [19:11] ryah: skampler: hm, i wasn't planning on it [19:11] ryah: why? [19:13] skampler: ok, i have been looking for something like buffer.get(n), i think you've discussed it briefly, where an offset is implicit. it seems more efficient by the same reasoning as net.stream has ondata and on("data" [19:13] maushu: Notice on how ryah says "wasn't planning on it" instead of just "no". [19:14] Aria: There's things you can do with slices that you can't with a get(n) interface. [19:14] Aria: (Overlapping segments for one) [19:14] mjr_: I quite like slices as long as they are fast to create. [19:14] skampler: but are they fast to create? [19:14] mjr_: They should be now. [19:14] ryah: skampler: slice gives you implicit offsets [19:14] skampler: okay that's great! [19:15] dylang_ has joined the channel [19:15] ryah: and i'm removing ondata from net.js [19:15] skampler: aha [19:15] ryah: now that slice is fast [19:16] CIA-77: node: 03isaacs 07master * r686d9f9 10/ (lib/fs.js test/simple/test-fs-realpath.js): [19:16] CIA-77: node: Bug in realpath with symlinks to absolute folder paths which have children. [19:16] CIA-77: node: Found by Cliffano Subagio [19:16] CIA-77: node: http://groups.google.com/group/nodejs/browse_thread/thread/f46f093938265ac0/387e14da08c7dd7b? - http://bit.ly/aq3qcB [19:16] CIA-77: node: 03Ryan Dahl 07master * r83ff473 10/ test/simple/test-fs-realpath.js : Use child_process.exec rather than sys.exec - http://bit.ly/dwrJ5k [19:17] bradleymeck_: and sent [19:18] Anti-X has joined the channel [19:20] ph^ has joined the channel [19:24] admc has joined the channel [19:25] marcostoledo has joined the channel [19:26] jbenesch has joined the channel [19:31] MikhX has joined the channel [19:32] Esteth: Does anyone here have experience with node-mongodb-native? I'm trying to add a document to the database, and it seems to have worked from the code (I don't get an err in the callback), but checking the database, nothing has changed [19:33] gerred has joined the channel [19:33] wink_: Esteth: pastebin your code [19:33] ker2x has joined the channel [19:33] ker2x: meep meep :) [19:33] wink_: wait, is that a roadrunner noise? [19:34] Esteth: wink_: http://gist.github.com/579625 [19:34] ker2x: more like http://www.youtube.com/watch?v=Jn2h6f1EO2k [19:35] ker2x: a 8bits meep [19:35] ker2x: btw, i have this problem with the latest git : http://pastebin.com/r6wTEpi3 [19:35] ker2x: any idea ? [19:35] Esteth: tried it with a local mongod instance too and it failed to do anything [19:36] wink_: Esteth: get rid of the [] in your insert [19:36] ker2x: it's the ./configure of nodejs [19:36] derferman has joined the channel [19:37] ryah: yeah - ondata is still measurably fster than slice [19:37] ryah: can't get rid of i tyet. [19:37] mjr_: well, shit [19:37] ker2x: i sit it int he changelog : [19:37] ker2x: - fix AttributeError on "use_openssl" when doing ./configure --without-ssl - error was: AttributeError: Values instance has no attribute 'use_openssl' [19:37] ryah: but that's okay [19:37] ker2x: okay [19:38] ker2x: if i install openssl lib it's fixed ? [19:38] wink_: ker2x: give it a go [19:38] ker2x: k :) [19:39] ker2x: worked without any warning :) [19:39] noahcampbell has left the channel [19:39] cfq has joined the channel [19:40] noahcampbell has joined the channel [19:40] Esteth: wink_: Doesn't seem to help at all :( [19:40] ben_alman_ has joined the channel [19:40] wink_: ok, one sec [19:41] figital has joined the channel [19:41] rwaldron has joined the channel [19:41] wink_: Esteth: are you sure the insert is succeeding? sys.puts(err) inside the insert callback [19:42] Esteth: that prints null [19:43] wink_: Esteth: what are you using to see if the insert worked? [19:43] ker2x: Mmm, i don't use mongo like this at all [19:43] ker2x: ACTION hate nested function [19:44] Esteth: locally I used the command line mongo client, with the mongohq db I use their interface [19:44] wink_: because outside of the []'s i dont see anything immediately wrong with your gist [19:46] Esteth: wink_: Cool. Thanks for the help, must be some stupid configuration issue or something. Maybe I have a broken version of the library or something. [19:46] ker2x: beside the fact that it call mongo.close inside mongo.open :) [19:46] wink_: you're using mongo-native yeah? [19:47] ker2x: which probably work, but ewww [19:47] Esteth: the library is called node-mongodb-native on github [19:47] ker2x: i use this one too [19:48] Esteth: ker2x: Oh. Where should I call mongo.close? [19:48] aurynn: I ought to addd a postgres trigger in here, so my client squawks. [19:48] wink_: the close should be ok, its in the insert callback [19:48] boaz has joined the channel [19:48] Esteth: aha, success. No mdb.authenticate() in there, so the database must've been silently rejecting me. [19:48] wink_: yay [19:49] ker2x: \o/ [19:49] Esteth: it works now, with an mdb.authenticate('user', 'pass', function(err, something) {...} immediately inside the open, for anyone reading IRC logs [19:49] eazyigz has joined the channel [19:50] Esteth: thank you ker2x and wink_ :) [19:50] Esteth: How is everyone doing on this fine evening, by the way? [19:50] ker2x: i haven't helped at all. but you're totally welcome :) [19:50] wink_: if only it were evening ;> [19:50] creationix: it's early afternoon, good enough [19:51] Esteth: Oh. *feels sorry for the west-of-the-meridian folks* [19:51] Esteth: Though sun would be nice. It's very cold here :( [19:51] creationix: It's cold here for me. I recently moved from Texas [19:51] wink_: be careful what you wish for, it's been a pretty hot summer [19:52] ker2x: i started to read the google v8 documentation [19:52] ker2x: hard to understand for a non c++ coder [19:52] aurynn: time to learn C++? [19:53] ker2x: i have the Bjarn strousomethingup book [19:53] ker2x: it currently help to keep the window opened [19:53] Esteth: creationix: Oh, cool :) I just moved into a new flat 2 weeks ago, but only 10 minutes away from where I was staying before, so it's not exactly a move. Does mean I don't have internet here yet though :( [19:54] creationix: I had very little internet last week, it was an interesting challende [19:54] creationix: *challenge [19:54] jacobolus has joined the channel [19:54] aurynn: Low internet is teh best hacking time. I kill my wifi and keep docs up on my iPad. [19:55] ker2x: when you internet is down, it's time to go explore the big blue room [19:55] ker2x: your* [19:55] aurynn: a 3g ipad makes that really nice, though [19:56] amerine has joined the channel [19:56] ker2x: ACTION won't troll [19:56] Esteth: oh, that sounds fun :) I've been tethering from my phone for the last 2 weeks, but I've just about hit my bandwidth cap, and there's still another week until I even get a phone line :( [19:58] aurynn: Bandwidth cap? [19:58] aurynn: oh [19:58] aurynn: right, my ipad does have one of those. [19:58] cvibes has joined the channel [19:58] ker2x: ACTION insert a subliminal "buy an android device" but still refuse to troll (promise!) [19:58] aurynn: my phone (oddly) doesn't [19:58] aurynn: ker2x, I have a Samsung Galaxy S [19:58] aurynn: :P [19:58] cvibes: hi, does node-utils request support proxy yet? [19:58] Esteth: T-Mobile say I have unlimited internet, subject to a 3GB/mo fair usage policy [19:58] ker2x: \o/ [19:58] tjholowaychu has joined the channel [19:59] Esteth: ker2x: That's what I'm using. <3 my trusty HTC Desire [19:59] aurynn: ker2x, can't wait for Cyanogen on this :) [19:59] mjr_: tjholowaychuk: any thoughts on the best way to do the redis multi/exec API in node? [19:59] ker2x: i have a htc magic. and wait for a good tablet [20:00] ker2x: well, back to code [20:00] noahcampbell has left the channel [20:03] ryan[WIN] has joined the channel [20:04] ker2x: mmm, look like the test bet to understand the nodejs code is to start with learning the libev [20:04] ker2x: best bet [20:04] vvsh has joined the channel [20:06] path[l] has joined the channel [20:06] Guest89673: mjr_: hmm ill gist something up [20:06] Guest89673: one sec [20:06] Guest89673: shit [20:07] mjr_: tjholowaychuk: I was thinking something like this: http://gist.github.com/579672 [20:07] mjr_: But it'll all so ugly [20:07] tjholowaychuk: mjr_: http://gist.github.com/579673 [20:08] mjr_: hmm [20:08] tjholowaychuk: command methods on the multi() "promise" or whatever you want to call it can omit callbacks [20:08] tjholowaychuk: and slice the args [20:09] KungFuHamster_ has joined the channel [20:10] mjr_: tjholowaychuk: that's certainly less typing your way. [20:10] mjr_: seems like it'd be prone to annoying cut and paste errors though with the argument ordering. [20:11] mjr_: does anybody even use multi with redis? [20:12] jakehow has joined the channel [20:12] bradleymeck_: let the battle of the garbage collectors, begin! [20:12] mattikus has joined the channel [20:13] rcy has joined the channel [20:13] bradleymeck_: the one thing i love about oracle taking over sun, they document the jni [20:14] tjholowaychuk: mjr_: dunno, not myself personally since I just grabbed 2.x but probably will in the future [20:14] ryan[WIN]: bradleymeck, nice isn't it [20:14] mjr_: tjholowaychuk: 2.0 is pretty excellent indeed. [20:14] ryan[WIN]: but it's probably because oracle wants to turn java into a super cool plugin handler :D [20:14] tjholowaychuk: yup :D [20:15] tjholowaychuk: I love that for a c library, it actually makes sense [20:15] tjholowaychuk: not crazy function names that are impossible to understand [20:15] bradleymeck_: ryan, yes it is, now if i could just get the garbage collectors to work together i can get us to use all those rhino modules, though trying to figure out if i should offshore the execution into threads [20:16] Eber: tjholowaychuk: hey, are you the mongoose module creator? [20:16] tjholowaychuk: Eber: nope [20:16] tjholowaychuk: Eber: that would be nathan/guillermo [20:16] sudoer has joined the channel [20:17] tjholowaychuk: raugh_ and nwhite [20:17] Eber: tjholowaychuk: ow, I see! I guess you wrote the Class that they use... is that right? [20:17] tjholowaychuk: Eber: way back yea but I think they are removing that dep [20:17] tjholowaychuk: or have already [20:17] tjholowaychuk: and I removed it from my github [20:17] tjholowaychuk: lol [20:18] Eber: tjholowaychuk: I don't think so... I just forked the code, and it's right here, and being heavily used! [20:18] Eber: tjholowaychuk: why are they taking it out? [20:18] tjholowaychuk: Eber: class.js, not mongoose [20:18] tjholowaychuk: because class implementations for js suck [20:20] Eber: tjholowaychuk: what is the "alternative"? [20:20] Astro has joined the channel [20:20] Eber: do it the common way, replacing the prototype? [20:20] tjholowaychuk: Eber: just using plain-jane constructors/protos [20:20] aurynn: ACTION doesn't understand wanting to use classes in a prototype OO scenario [20:20] benoitc has joined the channel [20:22] eazyigz has joined the channel [20:22] saikat has joined the channel [20:22] Eber: tjholowaychuk: right... I'm new to javascript... I just watched the third video from the crockford series... in there he proposes a function that creates/extends "classes"... you are saying that this kind of stuff shouldn't be used? [20:22] bradleymeck_: aurynn ppl "know" how classes work, they arent used to just making an object and saying thats what it should look like [20:22] bradleymeck_: dont talk to me about crockford [20:23] Eber: bradleymeck_: what about him? :P [20:23] bradleymeck_: hes wrong [20:23] Eber: bradleymeck_: that is a bold statement! why is he wrong? [20:24] bradleymeck_: he tends to say , i believe X so Y must be true [20:24] bradleymeck_: semicolon insertion, classes vs prototypes (he doesnt seem to understand prototypal inheritence?), speed issues, JSLint, ... [20:25] inimino: If you look at Crockford's whole career, he started out with class-based patterns and then he moved away from them. [20:25] digitalsanctum has joined the channel [20:25] Eber: If he doesn't get it... I'm really far away from understanding it... :( [20:25] tjholowaychuk: lol god damn semi-colon insertion [20:25] inimino: It's pretty clear that he understands prototypical inheritance, since he championed the Object.create method that's now in ES5 for doing exactly that. [20:25] jakehow has joined the channel [20:26] ker2x: ho ? there is a readline module ? [20:26] digitalsanctum has joined the channel [20:26] ker2x: \o/ [20:26] bradleymeck_: Eber he does have some valid points. but he also says some stuff which makes my blood boil [20:26] Eber: bradleymeck_: I guess that if my blood doesn't boil is because I agree with him or I don't know enough already :P [20:26] eyeofhell_ has joined the channel [20:27] Eber: But I tend to agree with him... I like the way he addresses things in the simplest possible way... [20:27] bradleymeck_: Yea, object.create is closer to prototypal in the classic sense (still wants prototype trees instead of his proxy hack). [20:27] eyeofhell_: Hello. Are where any guides available how to debug node.js in Eclipse? [20:27] figital has joined the channel [20:27] bradleymeck_: s/[()]/*/ [20:28] Eber: can we use Object.create on node? [20:28] Aria: Yes. [20:28] inimino: The proxy hack is just in the ES3 implementation, in ES5 it's implemented natively. [20:28] MikhX has joined the channel [20:28] bradleymeck_: i get trees!? where can i read this!? [20:29] aurynn: What does Object.create do? [20:29] Eber: tjholowaychuk: so you Class module could just be replaced by Object.create, right? [20:29] inimino: I'm not sure what you mean by trees, I'm just saying there's no intermediate constructor function created. [20:29] tjholowaychuk: Eber: could be replaced by function Foo(){}; new Foo [20:30] tjholowaychuk: aurynn: it just accepts a proto, so Object.create(Array.prototype) for example [20:30] tjholowaychuk: and accepts props as the second arg [20:30] aurynn: Ah [20:30] inimino: (If you mean trees instead of chains, no, you don't get that, but you can copy the properties of two objects onto one and then use that.) [20:31] bradleymeck_: pff ill keep my proxy behind a prototype hack then [20:31] Eber: tjholowaychuk: but using function Foo(){}; new Foo, how would I extend the class and yet be able to call the parents method? [20:31] inimino: tjholowaychuk ⋱ It doesn't have to be a prototype object, it can be any object. [20:31] tjholowaychuk: Eber: Foo(){ Parent.call(this) } [20:31] inimino: Object.create(arbitrary_object) // is the primary use case [20:31] tjholowaychuk: inimino: yeah for sure, sorry just me being bad at explaining things lol [20:32] ker2x: tired. need sleep. have fun :) [20:32] Eber: tjholowaychuk: right... I guess I got it :) [20:32] cardona507_ has joined the channel [20:33] tjholowaychuk: Eber: it's not necessarily elegant, but it is "pure" as far as prototypal inheritance goes. Foo.prototype.something = function(){ Bar.prototype.something.call(this); doOtherStuff() } [20:33] tilgovi has joined the channel [20:33] hf35 has joined the channel [20:34] arlolra has joined the channel [20:35] Eber: tjholowaychuk: I see! Got it :) Totally! I guess :P [20:37] creationix: can anyone beat my reverse while? http://jsperf.com/rmurphey-foo-foo-foo/4 [20:38] bradleymeck_: mmm [20:38] creationix: maybe some loop unrolling using switch statements? [20:38] creationix: it's such a small loop, I'm not sure it would help much [20:39] bradleymeck_: how do i edit that darn thing [20:40] creationix: bradleymeck: hah, Alex Sexton did a manual unroll http://jsperf.com/rmurphey-foo-foo-foo/9 [20:41] bradleymeck1 has joined the channel [20:42] aurynn: Wow, the reverse while is quick :) [20:42] bradleymeck: manual unroll breaks pre/post conds though [20:43] creationix: aurynn: about the same as my fast for though [20:43] creationix: the real optimization is to not create array objects [20:43] creationix: and to cache property lookups [20:43] creationix: in v8 string concat is much faster than creating an array and joining [20:43] creationix: for small cases like this at least [20:43] aurynn: Hm. [20:46] tobiassjosten has joined the channel [20:47] jbenesch has joined the channel [20:47] sechrist has joined the channel [20:48] Guest59061 has joined the channel [20:49] dgathright has joined the channel [20:49] dnyy has joined the channel [20:51] Viriix has joined the channel [20:51] rphillips has joined the channel [20:53] bradleymeck1 has joined the channel [20:56] BryanWB has joined the channel [20:57] mitkok has joined the channel [20:58] dilvie has joined the channel [20:58] benoitc has joined the channel [20:58] evilhackerdude: is there something like expresso's assert.respone i can use with vows? (or can i just use expresso's?) [20:59] Eber: sys.inherits is available in which node version? can't find it on the docs... [21:01] creationix: Eber: it's always there, it's a private API [21:01] Eber: creationix: oh! ok :) thanks! [21:02] creationix: Child.prototype.__proto__ = Parent.prototype [21:02] creationix: Eber: ^ that's usually enough [21:02] evilhackerdude: to perhaps rephrase my question: what should i use for integration testing an express app? [21:02] Eber: creationix: __proto__ is exactly what? [21:03] creationix: it sets the parent in the prototype chain directly [21:03] Eber: creationix: but is it present in javascript in general? [21:03] creationix: b = Object.create(a) is the same as b = {}; b.__proto__ = a [21:03] creationix: Eber: nope [21:03] creationix: it's nonstandard [21:03] creationix: but v8 and mozilla have it [21:03] creationix: and I think jsc too [21:04] creationix: Object.create is ES5 standard though [21:04] bradleymeck: creationix imma find a way to beat that [21:04] Eber: creationix: Uhmm, ok... Should make the stantands sometime... :P [21:04] cardona507 has joined the channel [21:04] bradleymeck: the reverse while* [21:04] aliem has joined the channel [21:04] creationix: bradleymeck: good luck, unrolling is the only thing I can think og [21:04] creationix: *of [21:04] bradleymeck: im going to think of stupid optimizations [21:05] pquerna: http trailers almost look real [21:05] deepthawt has joined the channel [21:05] EyePulp: Until XML hippies start living in them... [21:06] ph^ has joined the channel [21:06] captain_morgan has joined the channel [21:06] creationix: pquerna: does anything support them? [21:07] pquerna: creationix: http://github.com/ry/node/pull/275 [21:07] Eber: I'm starting to love JS... :P [21:07] pquerna: creationix: node.js :) [21:08] creationix: pquerna: but do any http clients in the wild support them? [21:08] pquerna: (and no, almost nothing else supports them) [21:08] creationix: the idea seems really useful [21:08] pquerna: but in my case, i'm uploading a file form a node.js client to a node.js server [21:08] pquerna: and wanted hashes [21:08] creationix: that works [21:11] bradleymeck: oh yea, for(;;) ftw [21:12] noahcampbell has joined the channel [21:12] jesusabdullah: for(;;) ? [21:13] jesusabdullah: ah [21:13] jesusabdullah: while(1) XD [21:13] SubStack: v8 'while(1)'.length - 'for(;;)'.length [21:13] v8bot: SubStack: 1 [21:13] SubStack: 1 byte! [21:13] bradleymeck: for(;;) is faster slightly [21:14] SubStack: of course [21:14] SubStack: while(true) too, which is 4 bytes more [21:14] isaacs has joined the channel [21:15] chrisdico has joined the channel [21:16] joshthecoder has joined the channel [21:17] shajith has joined the channel [21:19] bradleymeck: the test values are going up and down oddly [21:21] bradleymeck1 has joined the channel [21:24] PyroPete1 has joined the channel [21:24] adambeynon has joined the channel [21:26] ph^ has joined the channel [21:26] mr_daniel has joined the channel [21:33] rslifka has joined the channel [21:33] rslifka: hey guys, does a 100% CPU bug sound familiar? [21:34] rslifka: We're on 0.1.100 and the CPU usage for node started pegging at 100% [21:34] rslifka: Even after restarts, shoots right up [21:35] bradleymeck: nothing odd on profile? [21:35] aubergine has joined the channel [21:36] jbaron has joined the channel [21:36] rslifka: what's profile? :) [21:36] wink_: run node --v9-options :> [21:36] wink_: er v8-options [21:37] eazyigz has joined the channel [21:37] nerdEd has joined the channel [21:37] sh1mmer has joined the channel [21:41] derferman has joined the channel [21:42] AAA_awright_ has joined the channel [21:43] rtomayko has joined the channel [21:44] Zuardi has joined the channel [21:52] John9e9 has joined the channel [21:53] stagas has joined the channel [21:57] sr has joined the channel [21:57] mape_ has joined the channel [21:58] marek_z has joined the channel [21:58] Eber: what is __defineGetter__ ?!? [21:59] allengeorge has joined the channel [22:00] Zuardi: Eber it is used to define a getter function :P https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/defineGetter [22:00] Akufen has joined the channel [22:00] Akufen has joined the channel [22:00] allengeorge has joined the channel [22:00] Eber: Zuardi: oh! thanks! I thought it was something node specific related! [22:01] mape has joined the channel [22:02] Zuardi: Eber: I don't know if it is standar or not (as in ECMA stuff) [22:03] kjy112 has joined the channel [22:03] creationix: Eber: http://github.com/ry/node/wiki/ECMA-5-Mozilla-Features-Implemented-in-V8 [22:03] Eber: Zuardi: I see! But if V8 runs it... so it's true for node, right? [22:03] cardona507 has joined the channel [22:03] creationix: anything with __foo__ is not standard [22:03] creationix: but, yes V8 implements some of them [22:09] hassox has joined the channel [22:11] mu-hannibal has joined the channel [22:14] nezlooy has joined the channel [22:15] bradleymeck: no __noSuchMethod__ though [22:16] pwrfail has joined the channel [22:19] rslifka: upgraded to 0.2, 100% CPU usage went away [22:19] creationix: yay [22:19] rslifka: (from 0.1.100) [22:19] creationix: yeah, lots of bug fixes between those versions [22:20] mikeal has joined the channel [22:20] JimBastard has joined the channel [22:23] cardona507_ has joined the channel [22:24] bradleymeck2 has joined the channel [22:25] CIA-77: node: 03Mark Nottingham 07master * r4fe3007 10/ (3 files in 3 dirs): Support for outgoing HTTP trailing headers - http://bit.ly/9zYzkU [22:25] gsmcwhirter has joined the channel [22:25] maushu: Finally I'm going to give some use to the ipod touch. [22:26] maushu: Besides, listening to music. [22:26] bradleymeck: mmm? [22:26] bradleymeck: whatever happened to the liveedit integration i cant find docs on it [22:27] maushu: bradleymeck. its gone like magic. [22:27] sonnym has joined the channel [22:27] bradleymeck: ooo magic, *casts magic missiles into the darkness of jni* [22:28] saikat has joined the channel [22:29] derferman has joined the channel [22:29] maushu: Haven't you heard? An wizard did it. [22:29] bradleymeck: an wizard? [22:30] rnewson has joined the channel [22:30] maushu: A wizard. [22:30] maushu: http://tvtropes.org/pmwiki/pmwiki.php/Main/AWizardDidIt [22:31] bradleymeck: wtf is this, java uses non-standard utf8!? [22:32] dmcquay has joined the channel [22:32] Aria: Orly? [22:32] bradleymeck: yea, now i gotta write a converter... [22:33] pquerna: oh doh [22:33] pquerna: i dind't notice that the trailers patch was from Mark [22:33] pquerna: lol [22:33] cloudhead has joined the channel [22:34] bradleymeck: cloudhead++ [22:34] v8bot: bradleymeck has given a beer to cloudhead. cloudhead now has 1 beers. [22:35] derferman has joined the channel [22:35] maushu: bradleymeck-- [22:35] v8bot: maushu has taken a beer from bradleymeck. bradleymeck now has -1 beers. [22:35] bradleymeck: sfine i dont like beer [22:35] maushu: Negative beers. [22:35] maushu: Anti-matter beer? [22:35] aurynn: I'm observing my freakin' head off here, but they're just not actualizing! [22:36] zith_: is there a nice example of a node project that uses a config file loaded with require? [22:37] bradleymeck: ah good ole "use strict" is getting more complex by the day, us normies just dont understand what it gives us [22:38] jamescarr_ has joined the channel [22:38] dilvie has joined the channel [22:39] MikhX has joined the channel [22:39] CIA-77: node: 03Ryan Dahl 07master * r77fc61d 10/ (doc/api.markdown lib/buffer.js test/simple/test-buffer.js): Default value for second arg of Buffer#slice - http://bit.ly/anNJbu [22:40] Lerchmo has joined the channel [22:41] gsmcwhirter: anyone happen to know why the http client freaks out and crashes node if it tries to request from a port on which a node http server is listening? (example: http://gist.github.com/578449) [22:42] Lerchmo: Hey, im having a frustrating problem. I am using node + expressjs / connect. This program works fine on my dev server (ubuntu), on my new live server, all the GET requests work fine and fast. all the POST requests hang and only go through 10% of the time, the rest they just time out [22:42] ryah: gsmcwhirter: because you're somehow sending back invalid HTTP [22:43] rtomayko has joined the channel [22:43] gsmcwhirter: ryah, curl, chrome, and just about everything else handle it fine, and it looks fine looking at it raw though... [22:43] ryah: gsmcwhirter: if you could sniff it, i can tell you what's invalid [22:43] Tim_Smart has joined the channel [22:44] ryah: in that case, node's http parser has a bug [22:44] ryah: it would be good to see what's on the wire [22:44] bradleymeck: ryah would be best to know [22:44] gsmcwhirter: ryah, it may be in the headers (I have been starting to get some weird ones recently), but i can't seem to track down where the wierd ones are getting added [22:45] gsmcwhirter: ryah, what's a good way to do that? [22:45] ryah: gsmcwhirter: tcpdump [22:45] ryah: wireshark, whatever [22:45] ryah: gist me a hexdump with ascii on the side [22:45] ryah: of the response [22:45] gsmcwhirter: k. i'll see what i can come up with [22:46] ryah: if you're doing this locally. maybe something like sudo tcpdump -s 0 -X -i lo0 tcp port 7080 [22:46] jashkenas has joined the channel [22:48] eazyigz has joined the channel [22:51] JimBastard: gsmcwhirter: you should add a error handler to your http client? [22:52] Mikeee has joined the channel [22:52] Mikeee: hello! [22:52] gsmcwhirter: JimBastard, I had it the first time, but it obscured where the error was getting thrown initially [22:52] JimBastard: sup Mikeee [22:52] LowValueTarget has joined the channel [22:52] Mikeee: I've been hacking apart the node.js rtmp script to try to get it working... [22:52] Mikeee: and I believe I have.. [22:52] Mikeee: but [22:52] Mikeee: hmm. [22:52] JimBastard: gsmcwhirter: did it not give you the info you wanted though? we are getting some random parse errors too, same thing you are seeing [22:52] aliem has joined the channel [22:53] JimBastard: there is a node rtmp script? [22:53] tjholowaychuk has joined the channel [22:53] Mikeee: yeah but he's only started it, so full of holes [22:53] gsmcwhirter: JimBastard, i could re-throw the error or sys.debug it, but i got the same output i listed in a different format. still wouldn't get the response [22:53] Mikeee: managed to get it 'running', but hmm. i dont know much about network code.. or rtmp... or anything, really. [22:54] webr3: JimBastard, node-rtmp is part of node-amf [22:55] gsmcwhirter: ryah, output from that tcpdump at http://gist.github.com/579926 [22:55] Mikeee: yes :) [22:55] eazyigz has joined the channel [22:57] Mikeee: I can get past the handshake process, then the client sends an object up with just a few details.. then.. socket.end/socket.close [22:57] nroot7 has joined the channel [22:57] Mikeee: im not entirely sure what im expecting to happen.. [22:57] Mikeee: i suppose I want the connection to stay open? :/ [22:58] ajpiano has joined the channel [22:58] Eber: So... I'm confused... [22:58] tapwater has joined the channel [22:58] Lerchmo: does anyone know why node would choke on Posts but not Gets ? [22:58] Eber: What is the difference of doing Function.method() {...} and Function.prototype.method() {...} ? [22:58] JimBastard: Lerchmo: define choke [22:59] ehaas has joined the channel [22:59] JimBastard: Eber: ones prototype, one isnt [22:59] Lerchmo: timeout 90% of the time, 10% of the time work fine [22:59] tjholowaychuk: Eber: the first you invoke via Foo.method() the second is new Foo().method() [22:59] ryanfitz has joined the channel [22:59] Tim_Smart: Lerchmo: Can you show us a test case? [22:59] Lerchmo: for all posts, and this same application works fine on another server, so I am assuming it has to do with my modules or something [22:59] JimBastard: Eber: http://eloquentjavascript.net/chapter8.html [22:59] Eber: tjholowaychuk: so everything that extends the prototype will only be accessible on an instance? [22:59] Mikeee: ACTION is working on getting rtmp working from Unity3d to node.js [23:00] Lerchmo: Tim_Smart , code or a live demo? [23:00] webr3: Eber, compare Foo.bar to a static method, and Foo.prototype.bar to an instance method (if you're coming from oo) [23:00] tjholowaychuk: Eber thats correct [23:00] derferman has joined the channel [23:00] tjholowaychuk: ^ what he said [23:00] Tim_Smart: Lerchmo: Just some code that we can reproduce with. [23:00] Eber: webr3: got it :) [23:00] bradleymeck has left the channel [23:00] eazyigz has joined the channel [23:01] Lerchmo: I am using expressjs... and connect [23:01] Eber: tjholowaychuk: so the first one I can call Function.method() and the other var function = new Function(); function.method(), right? [23:01] ChrisPart has joined the channel [23:01] Lerchmo: var app = express.createServer( [23:01] Lerchmo: express.logger(), [23:01] Lerchmo: express.cookieDecoder(), [23:01] Lerchmo: express.session({store: new MemoryStore({ [23:01] Lerchmo: reapInterval: 600000000, [23:01] Lerchmo: dbname:'tracking', [23:01] Lerchmo: collection: 'session' [23:01] Lerchmo: }) [23:01] Lerchmo: }) [23:01] Lerchmo: ); [23:01] Lerchmo: err [23:01] Lerchmo: sorry [23:01] tjholowaychuk: Eber: pretty much yeah [23:01] gsmcwhirter: (sorry if someone tried to respond and i missed it -- wireless connection dropped out) [23:01] Validatorian has joined the channel [23:01] tjholowaychuk: woah [23:01] tjholowaychuk: lol [23:01] Tim_Smart: Yeah you should use a paste service. [23:02] tjholowaychuk: Lerchmo: what is the problem you are having? [23:02] Lerchmo: yeah, just realized that as 10 new lines of code showed up, my bad [23:02] aubergine has joined the channel [23:02] webr3: ^o.. does node support data:// URI's or has anybody added support for them? [23:02] Eber: tjholowaychuk: thanks man ;) [23:02] tjholowaychuk: Eber: np [23:03] Tim_Smart: tjholowaychuk: (10:58:28) Lerchmo: does anyone know why node would choke on Posts but not Gets ? [23:03] JimBastard: ___ ____ ____ ___ _ _ _ ____ _ ____ ____ _ _ _ _ [23:03] Lerchmo: Expressjs as well [23:03] JimBastard: |__] |__| [__ | | |\ | | __ | [__ |___ | | |\ | [23:03] JimBastard: | | | ___] | | | \| |__] | ___] | |__| | \| [23:03] gsmcwhirter: ryah, updated the gist with the curl output if that helps any [23:03] mikew3c_ has joined the channel [23:03] onar has joined the channel [23:03] tjholowaychuk: Lerchmo: ah, without seeing more code I cant help muc [23:03] tjholowaychuk: h [23:03] Lerchmo: I was hoping someone had experienced it, I am guessing it is happening somewhere down the series of middleware steps [23:03] Mikeee: Does anyone know how I should be keeping the connection open? :/ [23:04] tjholowaychuk: send me a gist of your middleware config/that route if possible [23:04] Lerchmo: ok will do [23:04] Validatorian: Hey y'all -- is there already a module available to be used as a pub/sub CLIENT only? I want to use node to connect to a server that is using long-polling and log the data, but I have no idea how to do that... the site is https://www.skoreit.com/ [23:04] Lerchmo: tjholowaychuk: http://pastebin.com/T6vQF5Uu [23:04] stagas: why don't we have a nodejs.org paste service [23:05] webr3: Validatorian, you'd be better w/ websockets, but probably something in socket.io [23:05] Lerchmo: btw tjholowaychuk, this works totally fine on another almost identical server [23:05] jamescarr_: commonjs question... is there a way to export something without a var? [23:05] tjholowaychuk: Lerchmo: I would start by taking gzip out (it has issues), umm methodOverride() should be after bodyDecoder() [23:05] jamescarr_: I want to do this: [23:05] eazyigz has joined the channel [23:06] Lerchmo: ok, ill give it a try [23:06] jamescarr_: var config = require('config'); sys.puts(config.db) [23:06] jamescarr_: instead of doing export for every key [23:06] tjholowaychuk: jamescarr_: module.exports = {}; ? [23:06] dnyy has joined the channel [23:06] tjholowaychuk: i think thats what you mean [23:06] tjholowaychuk: maybe not [23:06] Validatorian: webr3: It's my understanding that socket.io only works as a server, not a client... I want to emulate a client, by subbing to a pub [23:06] Validatorian: maybe I'm wrong though [23:07] evilhackerdude: Validatorian: it's also got a client lib [23:07] sechrist has joined the channel [23:07] jamescarr_: tjholowaychuk, guess I'll check ;) [23:07] onar has joined the channel [23:07] Guest36060 has joined the channel [23:07] Lerchmo: tjholowaychuk, same thing... it hangs and doesn't log the post in the terminal [23:08] Lerchmo: if I hit it a bazillion times, it will work 1 of the times [23:08] Validatorian: aha, right you are -- thanks evilhackerdude and webr3 [23:08] Lerchmo: which is strange [23:08] rphillips has joined the channel [23:08] tjholowaychuk: Lerchmo: weird, can you pastebin any of the route? [23:08] nerdEd has joined the channel [23:08] tjholowaychuk: the methodOverride() ordering will only effect PUT/DELETE when using _method in a form [23:09] tjholowaychuk: just something to watch out for [23:09] [[zz]] has joined the channel [23:09] webr3: jamescar, what is the config you're requiring, and if it's a config file for your app why you doing it in js code? [23:09] tjholowaychuk: its easier to read/write [23:10] tjholowaychuk: JSON [23:10] tjholowaychuk: is lame [23:10] tjholowaychuk: for editing [23:10] Tim_Smart: JSON is nice in coffeescript :p [23:10] evilhackerdude: coffee is good though [23:10] evilhackerdude: yeah! [23:10] webr3: JSON.parse(fs.readFile)? [23:10] jamescarr_: webr3, why not do it in js code? [23:10] Lerchmo: tjholowaychuk http://pastebin.com/uNftT9gc [23:10] nerdEd_ has joined the channel [23:10] tjholowaychuk: nothing is nice in coffeescript lol [23:11] jamescarr_: maybe I just want to require it and access it directly [23:11] Lerchmo: I don't think it's something in the application, since it works fine on another server [23:11] jamescarr_: tjholowaychuk, so far I only notice hard core RoRs love coffeescript [23:11] tjholowaychuk: jamescarr_: I came from the ruby world and I dont even like it :s [23:11] tjholowaychuk: js is somewhat ugly in ways, when written .. in an ugly way, but I still find it easier to read than ruby [23:11] Lerchmo: I am wondering if it's a software version thing? something with connect, im not sure how I can debug it [23:11] jamescarr_: that one ruby guy uses it for everything to the point I know a few people under the impression that coffeescript is how you write code in node.js ;) [23:12] Lerchmo: nothing gets logged [23:12] tjholowaychuk: Lerchmo: could be! double check {express,connect}.version [23:12] webr3: Lerchmo, you know that node http drops the connection onEnd ? [23:12] webr3: Lerchmo, the http client that is [23:12] charlenopires has joined the channel [23:12] tjholowaychuk: jamescarr_: I think it's a neat proof of concept and kinda cool as like a toy language [23:12] gsmcwhirter has joined the channel [23:12] tjholowaychuk: if anything shows how flexible js is [23:12] eazyigz has joined the channel [23:13] jamescarr_: yep [23:13] jamescarr_: finally found some documentation on promises http://wiki.commonjs.org/wiki/Promises [23:13] jamescarr_: I couldn't find anything aside from functions called promises in code [23:13] hayeah has joined the channel [23:13] gsmcwhirter: this wireless is terrible right now. I'll try again later. thanks for trying to help ryah, and sorry if you tried to reply while i disappeared [23:13] Mikeee: Does anyone know how I should be keeping the connection open on my rtmp? :/ [23:13] Mikeee: it closes :/ [23:14] tjholowaychuk: Lerchmo: not sure man sorry :( all I can say is I have not ran accross that issue [23:14] tjholowaychuk: Lerchmo: but definitely check the versions [23:14] tjholowaychuk: Lerchmo: node --version as well [23:14] hayeah has joined the channel [23:15] aubergine has joined the channel [23:15] Lerchmo: tjholowaychuk connect is connect@0.2.4 express 1.0.0rc2 node 0.2.0 [23:15] Zuardi_ has joined the channel [23:16] tjholowaychuk: Lerchmo: sounds like that should be fine [23:16] lakin has joined the channel [23:17] tjholowaychuk: Lerchmo: I would try stipping some of your logic though before blaming one of the frameworks, it could be a db misbehaving or something [23:17] Lerchmo: yeah... ill give it a shot [23:19] sideshowcoder has joined the channel [23:19] jamescarr_: dammit! My rvm installation is fucked [23:19] Tim_Smart: Lerchmo: So it won't accept an incoming POST request? [23:19] Tim_Smart: If so, I'll cook up a basic test server for you to try. [23:20] Lerchmo: tjholowaychuk... ahh thanks for the tip! [23:20] tjholowaychuk: Lerchmo: got it? [23:20] Lerchmo: it's my custom mongodb session store [23:20] Lerchmo: replaced that with session() worked like a charm [23:20] Lerchmo: thanks! [23:20] tjholowaychuk: oh lol [23:20] tjholowaychuk: :p [23:20] Lerchmo: now I know where to debug [23:20] tjholowaychuk: np [23:20] Lerchmo: lol [23:20] tjholowaychuk: thought it looked weird I saw new MemoryStore in there with dbname or something [23:21] prettyrobots has joined the channel [23:21] Egbert9e9 has joined the channel [23:21] Lerchmo: haha, yeah mine checks for their IP and uses that session, since I use that store for tracking clicks [23:21] Tim_Smart: Use redis for sessions ;) [23:22] eazyigz has joined the channel [23:22] Lerchmo: well, I also do alot of map reduce on the click data so mongo gives me some of that power [23:23] mikew3c has joined the channel [23:23] Lerchmo: and it's very fast for simple key lookups, pretty close to redis I believe [23:24] Tim_Smart: Not sure, I haven't seen one reliable benchmark between the two yet. [23:24] sh1mmer: is anyone going to the meetup from the cityt [23:24] sh1mmer: and can I get a ride home? [23:24] tjholowaychuk: Lerchmo: if you ever want to switch to redis I have connect-redis [23:24] tjholowaychuk: for that [23:25] mikew3c_ has joined the channel [23:25] Lerchmo: nice, thought about redis [23:26] Lerchmo: but I am a mongo fan boy [23:27] Tim_Smart: Yeah redis has a lot faster insertion speed. Under heavy load about 2x faster. [23:27] dilvie: Lerchmo: are you concerned about data reliability on Mongo? [23:27] Lerchmo: no... since it's click data if I lose 50 clicks here or there it's not a huge deal [23:27] bryanl has joined the channel [23:28] Lerchmo: I do use it like a relational database though for some stuff... which is annoying kinda, but it works well for me [23:28] rauchg_ has joined the channel [23:29] allengeorge_ has joined the channel [23:29] dilvie: Lerchmo: What do you mean by "like a relational database"? [23:29] jashkenas: jamescarr_: who's "that one ruby guy" ? [23:29] Mikeee: Anyone got a minute to help me out? really struggling with this (and out of my depth) [23:29] allengeorge has joined the channel [23:29] [[zz]] has joined the channel [23:30] Lerchmo: dilvie I have some data in my application that is like a hierarchy, and I ended up storing it in seperate tables (publishers, campaigns, adgroups, ads) [23:30] Lerchmo: using key's to link them [23:30] dilvie: Lerchmo: Do you mean you're literally creating relational models in Mongo? That seems a little weird to me. If that's what you nead why not Postgres or MySQL? [23:30] tjholowaychuk: jashkenas: ps dont think im bashing coffeescript, totally not. conceptually its really interesting, just got over my rubyness and actually prefer seeing vanilla js now i guess [23:31] bradleymeck has joined the channel [23:31] evilhackerdude: tjholowaychuk: the destructuring features i'd miss in vanilla js though [23:31] Lerchmo: well, because using that structure, than I store click data in a more document like format [23:31] Lerchmo: and most of my application is parsing the click data [23:31] Lerchmo: not managing that structure, which it does well enough [23:31] jashkenas: tjholowaychuk: no worries. bashes without specifics just show that you care --- specific complaints are what I'm more concerned with. [23:31] dilvie: I see. [23:32] Lerchmo: I thought about using mysql + mongo [23:32] Lerchmo: but decided against it [23:32] jamescarr_: jashkenas, YOU [23:32] tjholowaychuk: jashkenas: its cool. I have implemented similar things for C (more limited of course) but at the end of the day I was like well wait... I like C.. [23:32] tjholowaychuk: although its not elegant [23:32] jashkenas: jamescarr_: ah, speak of the devil then. [23:32] jamescarr_: :) [23:33] tjholowaychuk: same with js really, but it is what it is [23:33] dilvie: Lerchmo: So can you not reference objects directly, rather than by ID? [23:33] tjholowaychuk: and i like how plain and boring/simple js is lol [23:34] zith_: i'm having trouble with closures in javascript [23:34] zith_: http://pastebin.com/MJ14qj1S [23:34] Lerchmo: dilvie, as in storing it as a tree, rather than tables? [23:35] jashkenas: tjholowaychuk: agreed with all that. but here's actually a good case in point. zith_'s paste from a second ago... broken behavior in JS -- wouldn't be a problem in CS. [23:35] zith_: what is the recommended way of saving the value of a variable outside of the closure at the time the closure is created? [23:35] jashkenas: zith_: you'll need to use an inner closure to close over the current value of "i". [23:35] dilvie: like, can't you do "myCampaign":{"adgroups":[group1, group2, group3]} [23:36] jashkenas: zith_: try inserting a closure wrapper in the loop, with a "var index = i;", and use "index". [23:36] dilvie: where group1 is not an ID, but a reference to the group1 addgroup object? [23:36] Lerchmo: dilvie hmmm mongo has Database References which I didn't know about, also I found it annoying to manage when it was all embedded [23:36] jashkenas: zith_: this is the exact issue that ECMA Harmony wants to introduce "let" instead of "var" to solve. [23:37] zith_: jashkenas: i'm not sure i understand what you mean [23:37] zith_: i'm very new to the whole closure thing and dont really know what a closure wrapper is :) [23:37] tjholowaychuk: jashkenas: haha yeah good timing on that one hey [23:37] tjholowaychuk: we need letttt [23:37] tjholowaychuk: jashkenas: it certainly has it's place, and has proven that by the amount of followers etc [23:38] Tim_Smart: zith_: The `i` inside your anonymous function references the outside `i`, meaning it will be incremented as well. [23:38] eazyigz has joined the channel [23:38] zith_: ah, yes of course [23:38] tjholowaychuk: zith_: in your for loop, wrap the current contents with (function(i){ ... old stuff here... })(i); [23:38] tjholowaychuk: block scope in a really ugly manor [23:38] tjholowaychuk: lol [23:38] jashkenas: zith_: http://gist.github.com/579967 [23:39] jashkenas: zith_: or, if you're just writing for Node.js, you can use Array#forEach, and avoid the issue. [23:39] jashkenas: oops. that gist is wrong, one sec. [23:40] Tim_Smart: jashkenas: forEach cannot be applied in this circumstance. [23:40] jashkenas: nevermind, it's fine -- I'm just second-guessing myself. [23:40] Tim_Smart: (Unless you pre-construct the array) [23:40] jashkenas: Tim_Smart: fair enough -- I assumed he was using a real array in the actual code. [23:40] JimBastard: cloudhead: you alive? [23:41] Tim_Smart: jashkenas: I usually prefer http://gist.github.com/579973 [23:41] Tim_Smart: Not sure if it has any performance implications for large loops... [23:41] jashkenas: Tim_Smart: extra fancy -- nice. [23:41] tjholowaychuk: Tim_Smart: thats what i do [23:41] jashkenas: Tim_Smart: would be worth a JSPerf -- I'll throw one together. [23:41] tjholowaychuk: you could leave it as "i" if you wanted [23:41] Tim_Smart: tjholowaychuk: Couldn't be bothered changing the gist :p [23:41] zith_: alright, thanks guys [23:42] zith_: i'm just playing around still [23:42] tjholowaychuk: Tim_Smart: sucks I have to do that in jade to support - if()\n foo\n - else\n bar [23:42] tjholowaychuk: slows things down a little [23:42] zith_: but in my real code i guess Array#forEach would be better [23:42] tjholowaychuk: but i guess its all relative [23:42] bryanl has joined the channel [23:42] zith_: this is how i wrote it after you explained it: http://pastebin.com/hiYdjNY9 [23:42] Tim_Smart: zith_: for loops are actually faster from memory. [23:42] zith_: but i think yours is prettier [23:43] jashkenas: tjholowaychuk: how do you have to do that? for every Jade loop? [23:43] nerdEd has joined the channel [23:43] tjholowaychuk: jashkenas: no no, for buffering code "blocks" otherwise I would have to require the user do - if (cond) { ... - } [23:43] tjholowaychuk: or so hackage to insert that shit [23:43] tjholowaychuk: some* [23:43] Tim_Smart: zith_: Just make sure you store the length in a variable and use that for comparison. [23:44] dilvie: Lerchmo: What is it you're writing? Is it a web app for anybody to use, or something that's going to be used internally somewhere? [23:44] mjr_: tjholowaychuk: speaking of redis, want to give my lib a shot? http://github.com/mranney/redis [23:44] techwraith has joined the channel [23:45] dilvie: Lerchmo: I actually need an analytics solution that I can use to *safely* track use of a web application that makes use of very sensitive data. [23:45] zith_: Tim_Smart: for performance, you mean? [23:45] Tim_Smart: mjr_: How does it differ from http://github.com/bnoguchi/redis-node? [23:45] Tim_Smart: zith_: Yes. [23:45] mjr_: tjholowaychuk: I implemented MULTI, but it took forever. [23:45] tjholowaychuk: mjr_: would love to! I think I might write an Express admin UI for redis, so that will work nice for a test [23:45] Lerchmo: dilvie it's internal, it's an adserver actually more than a web page analytics system [23:45] zith_: sure, thanks [23:45] tjholowaychuk: mjr_: cool man I will check it out [23:45] techwraith: Hey guys, anyone in SF going to the Node meetup tonight that can give me and @xdamman a ride? [23:45] jamescarr_: tjholowaychuk, btw, wanted to ask you a question about jade... I keep running into situations where I want to link multiple bits of text in a paragraph... [23:45] jamescarr_: an indented newline for each feels... odd [23:45] Lerchmo: dilvie but if your doing analytics, mongodb is awesome [23:46] mjr_: Tim_Smart: well shit, I did not know about that one. The only redis client I've seen is the old fictorial one. [23:46] dilvie: Lerchmo: yeah, doing analytics, but hoping I won't have to roll my own. [23:46] jashkenas: Tim_Smart: tjholowaychuk: the two ways perform identically on Safari at least: http://jsperf.com/let-substitute-argument-versus-variable [23:46] tjholowaychuk: jamescarr_: yeah I know what you mean, haml suffers the same issues (AFAIK), but for example you can user :markdown, or you can have markup in the text as well [23:46] SirLucas has joined the channel [23:46] jamescarr_: observe: http://gist.github.com/579976 [23:46] jamescarr_: ah I see [23:46] Lerchmo: dilvie, I haven't found anything even reasonably good that is open source [23:46] jamescarr_: that was the hack I was doing :) [23:47] tjholowaychuk: jamescarr_: haml/jade are not very good for that sort of use-case [23:47] gerred: redis...ugh there are so many object stores out there. [23:47] gerred: i can't keep up. redis, riak, mongo, couch. ;) [23:47] gerred: cassandra [23:47] dilvie: Lerchmo: Well that just sucks. I've done an analytics package before. I can do it again if need be. [23:47] tjholowaychuk: jamescarr_: first is 7% slower for me [23:47] tjholowaychuk: apparently [23:47] Tim_Smart: jashkenas: Yeah they are roughly the same on chrome. Using an argument gets 1000 more iterations in though. [23:47] tjholowaychuk: chrome [23:47] Lerchmo: dilvie mongo is suprisingly well suited for analytics though [23:48] dilvie: Lerchmo: Yeah, it seems like it was built specifically for that use case. [23:48] Tim_Smart: s/chrome/chromium/ [23:48] mjr_: Tim_Smart: yeah, that one looks pretty good. Had I seen it before, I might not have bothered to write this one. [23:48] Lerchmo: dilvie, I had a simple setup a while ago, that allowed me to create arbitrary user funnel reports... something I could never get to work + scale with mysql [23:48] SirLucas: hi there! Can anyone tell me why I'm getting python dll errors when trying to do ./configure in cygwin (following the github.com tutorial on installing it)? "unable to remap \\?\d:\cygwin\lib\python2.6\lib-dynload\time.dll to same address as parent" , bunch of stack trace, then "died waiting for dll, errno 11" and finally "error: could not configure a cxx compiler!" [23:48] Lerchmo: even google analytics makes you pre-define the funnels and they generate them after the fact [23:49] Tim_Smart: mjr_: I haven't used it yet, as I hadn't heard about it after starting work on my project using redis. [23:49] jamescarr_: gerred, heh... you got me there [23:49] dilvie: Lerchmo: I'd just plug in Google Analytics, but I'm encrypting everything else via SSL, and it seems silly to break that by running third-party JavaScript on the same page. [23:49] jamescarr_: just the other day I started seeing a lot of tweets about riak [23:49] gerred: yeah. riak looks interesting...but object stores are becoming flavor of the week. [23:49] zith_: so, a more node.js-related question now... how do i use Array#forEach? ;) [23:49] gerred: and I actually try to keep up. [23:50] Lerchmo: dilvie Well google analytics has an https api / link [23:50] mattikus has joined the channel [23:50] Tim_Smart: js> var array = [1, 2, 3], test = []; array.forEach(function (item) { test.push(item); }); test [23:50] gbot2: Tim_Smart: [1,2,3] [23:50] Tim_Smart: zith_: ---^ [23:51] Tim_Smart: zith_: The index is the second argument to the function. [23:51] gerred: it's to the point of madness though and a fairly religious argument at that point. [23:51] dilvie: Lerchmo: That's interesting. I haven't looked at that. I just assumed it wasn't an option. [23:51] Tim_Smart: The original array is the third argument, zith_ [23:51] tjholowaychuk: mjr_:http://github.com/visionmedia/redis/commit/31b6cfb03a5f0c9437d4149627a2a6680034f71d [23:52] tjholowaychuk: mjr_: just need that so I can use it with ndistro [23:52] tjholowaychuk: etc [23:52] dilvie: Lerchmo: I'll look into it. Quick question though - would you trust it on the same page with somebody's credit card number? [23:52] Lerchmo: dilvie: yes, absolutely [23:52] mjr_: tjholowaychuk: I just pushed a bunch of stuff. I think it is fixed in that one. [23:52] zith_: Tim_Smart: thanks a lot [23:52] zith_: Tim_Smart: is there documentation on this? [23:52] Lerchmo: dilvie... you would be hard pressed to find an ecommerce site that doesn't have google analytics on it [23:53] pplante has joined the channel [23:53] Tim_Smart: zith_: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach [23:53] zith_: ah, i thought it was node-specific for some reason [23:53] zith_: thanks [23:53] Lerchmo: dilvie: in fact I have run 2 ecommerce sites with analytics on the CC page, and website optimizer... it's pretty safe, and their default javascript initialization code will detect if it's an https page and connect via that [23:53] tjholowaychuk: mjr_: would be nice to have the index.js in there so it's require('./redis') vs require('./redis/redis') [23:54] mjr_: tjholowaychuk: once I add the package.json, you can do require("redis") and it should always work. [23:54] mjr_: Lemme go do that. [23:54] tjholowaychuk: im not using npm tho [23:55] SirLucas: hmn... ok second try... does anyone know how to fix "unable to remap \\?\d:\cygwin\lib\python2.6\lib-dynload\time.dll to same address as parent" , when trying to ./configure node.js under cygwin, following this tutorial: http://github.com/ry/node/wiki/Building-node.js-on-Cygwin-(Windows) ? [23:55] tjholowaychuk: I try to have all my libs support npm, and a direct git clone to ~/.node_libraries [23:55] rauchg_: mjr_: if you have {root}/lib/redis/index.js [23:55] rauchg_: and people go require('redis') [23:55] rauchg_: it can work with npm [23:55] rauchg_: or submodules + require.paths.unshift [23:55] rauchg_: so you get best of both worlds [23:55] tjholowaychuk: he doesnt have a ./lib [23:55] tjholowaychuk: which is fine [23:55] tjholowaychuk: but [23:55] tjholowaychuk: we just need that symlink in there [23:55] mjr_: rauchg_: OK, lemme give that a try then. So rename redis.js to lib/index.js? [23:56] mjr_: er [23:56] tjholowaychuk: just renamed ./redis.js to ./index.js [23:56] tjholowaychuk: rename* [23:56] tjholowaychuk: or symlink it [23:56] Lerchmo: tjholowaychuk did you write express? [23:56] Wandrewvious has joined the channel [23:56] tjholowaychuk: Lerchmo: yup [23:56] Eber: so, I see that we have trim function on String prototype... does that mean that the only way to use it is var p = new String('string').trim(); ?! [23:56] mjr_: tjholowaychuk: OK, just a sec [23:56] tjholowaychuk: mjr_: thanks man [23:57] eazyigz has joined the channel [23:57] jashkenas: Eber: "string ".trim() [23:57] Eber: jashkenas: because "string" is already an instance of String, right? [23:57] zemanel: not really node.js related but i need a (re)design for a website, payed work [23:58] Lerchmo: tjholowaychuk 1. thanks, 2 is there a standard way of modularizing an application? I end up creating "controllers" that have a function to apply their routing to app, but it seems hackish [23:58] jashkenas: Eber: bingo. [23:58] tjholowaychuk: Lerchmo: check out ./examples/blog in the repo [23:58] Eber: jashkenas: tks :) [23:58] tjholowaychuk: Lerchmo: I think I have a few exampels that do stuff like that [23:58] Lerchmo: cool [23:58] tjholowaychuk: Lerchmo: alternatively you can do a fs.readdir() and load in a bunch of modules in say.. ./routes or something