[00:01] mightym_ has joined the channel [00:01] mikl has joined the channel [00:02] avalanche123 has joined the channel [00:03] dreamdust has joined the channel [00:03] diogogmt has joined the channel [00:04] evangenieur has joined the channel [00:05] mightym has joined the channel [00:05] r04r has joined the channel [00:05] enmand has joined the channel [00:07] bnoordhuis: MarkVolkmann: look at MakeCallback in the node source [00:07] janekp has joined the channel [00:07] jhbot: 'Node.js: how to flush socket?' by Fluffy http://stackoverflow.com/q/8957872 (tags: sockets) [00:09] yolin has joined the channel [00:09] niloy__ has joined the channel [00:10] mattgifford has joined the channel [00:10] r04r has joined the channel [00:10] evangenieur_ has joined the channel [00:12] davidbanham has joined the channel [00:13] jhbot: 'Is it safe to use non-local variables in Node.js?' by mattwigway http://stackoverflow.com/q/8957901 (tags: javascript, scope, express) [00:14] themiddleman has joined the channel [00:14] coderarity: isaacs: I originally installed node with brew, and then i used npm to install nave... should I uninstall the brew node since nave has all of the executables now? [00:15] r04r has joined the channel [00:16] jhbot: 'Node.JS PUT Request Incomplete' by CMC http://stackoverflow.com/q/8957927 (tags: http, upload, put) [00:19] agnat has joined the channel [00:20] superjoe: I'm curious about the answer to the non-local variables question too. [00:20] Gekz has joined the channel [00:20] Gekz has joined the channel [00:20] r04r has joined the channel [00:20] r04r has joined the channel [00:22] theBrettman_ has joined the channel [00:23] arkx has joined the channel [00:23] doffm has joined the channel [00:23] trodrigues has joined the channel [00:23] samsonjs has joined the channel [00:24] jetienne has joined the channel [00:24] secoif has joined the channel [00:24] shedi has joined the channel [00:25] r04r has joined the channel [00:25] r04r has joined the channel [00:26] blup_ has joined the channel [00:26] skm has joined the channel [00:27] briancray has joined the channel [00:27] shedinja has joined the channel [00:28] criswell has joined the channel [00:32] r04r has joined the channel [00:32] r04r has joined the channel [00:32] bnoordhuis: superjoe: it's safe, node is single-threaded [00:32] bnoordhuis: i.e. there are no concurrency issues here [00:33] [[zz]] has joined the channel [00:34] HardBit has joined the channel [00:34] bios has joined the channel [00:35] caolanm has joined the channel [00:36] sotosof has left the channel [00:37] r04r has joined the channel [00:37] r04r has joined the channel [00:37] superjoe: bnoordhuis, I thought it used a thread pool? [00:38] dreamdust has joined the channel [00:38] jmar777 has joined the channel [00:39] adrianF has joined the channel [00:39] rtgibbons has joined the channel [00:39] cognominal_ has joined the channel [00:40] Carmivore has joined the channel [00:40] Carmivore has joined the channel [00:40] superjoe: bnoordhuis, see conversation above I had with dtrejo about 20 minutes ago [00:40] misza222 has joined the channel [00:40] dtrejo: (he knows more than me btw, so yeah) [00:40] zcopley has joined the channel [00:41] superjoe: I don't understand how using a variable like that can be safe, and at the same time you can serve two clients concurrently [00:41] dtrejo: I think there's only a thread pool when you're doing certain things, like crawling websites and stuff [00:42] r04r has joined the channel [00:42] bnoordhuis: superjoe: yes, node offloads work to a thread pool [00:42] koo4 has joined the channel [00:42] dtrejo: and it doesn't affect the single-threadedness of it [00:43] bnoordhuis: superjoe: but javascript code itself is thread safe, it runs in a single thread only [00:43] dtrejo: single-threadedness of userland code [00:43] bnoordhuis: exactly [00:43] superjoe: interesting [00:43] superjoe: very cool [00:44] davidbanham: I'm getting a segfault on v0.6.8 installed by nvm on Lion. Anyone else run into this? gdb is pointing to a memory access error related to node_crypto [00:44] bnoordhuis: davidbanham: https://github.com/joyent/node/issues/2498 ? [00:46] davidbanham: bnoordhuis: Yep, looks like it might be related. gdb is pointing to the same line number in node_crypto [00:46] jhbot: 'Is there a module for getting user input from the command line in node.js' by Codemonkey http://stackoverflow.com/q/8958051 (tags: cli, npm) [00:46] bnoordhuis: davidbanham: do you have the same issue with a build compiled from source? [00:46] bnoordhuis: i haven't been able to reproduce it [00:46] davidbanham: bnoordhuis: Haven't tried yet, but happy to have a crack. I'm nervous about installing [00:47] davidbanham: v0.6.8 over my working 0.4.12 install, though. Need this machine for dev. [00:47] bnoordhuis: davidbanham: you don't have to install it, you can run it from the source tree [00:47] davidbanham: Should I just isolate it into a local directory? Will that provide the feedback we need? [00:47] bnoordhuis: davidbanham: can you run configure with --debug? [00:47] mightym: is there a common way checking the client in node.js? in my case I've to pass a different js file depending if its a mobile client or a desktop browser [00:47] bnoordhuis: yeah, that works too: --prefix=$HOME/opt/node [00:47] davidbanham: bnoordhuis: I have 0 experience with gdb. Not sure what you mean by run from source tree. [00:48] r04r has joined the channel [00:48] davidbanham: bnoordhuis: Yep, will configure with --debug now. [00:48] bnoordhuis: davidbanham: the directory you cloned node into [00:48] bnoordhuis: (assuming you're cloning the git repo) [00:48] bnoordhuis: oh, be sure to `git checkout v0.6.8` after cloning it [00:48] davidbanham: bnoordhuis: Nope, I'm downloading the tarball. Happy to clone from git if that'll make a difference, though. [00:49] secoif: wow, process.nextTick is really awesome. [00:49] SubStack: Fact. [00:49] bnoordhuis: davidbanham: no, the tarball is fine [00:49] tilgovi has joined the channel [00:49] Destos has joined the channel [00:50] davidbanham: bnoordhuis: ./configure --debug didn't seem particularly enlightening. Were you after different output than this? https://gist.github.com/1654833 [00:51] secoif: eg, process.nextTick allows me to inject dependencies via properties before 'finishing' constructor operations [00:51] secoif: otherwise i'd have to pollute my constructor with either an options object or more optional params [00:51] bnoordhuis: davidbanham: now run `JOBS= make` [00:51] bnoordhuis: then wait while v8 compiles :) [00:52] bnoordhuis: fun fact: on my core 2 duo, it takes longer to compile v8 than a 3.2 linux kernel [00:52] davidbanham: bnoordhuis: I'm used to running make on EC2 Micro instances. Doing it on this machine is the fastest thing in the world by comparison. [00:53] jocafa has joined the channel [00:53] r04r has joined the channel [00:54] bnoordhuis: okay, i have to be off [00:55] bnoordhuis: davidbanham: can you post the results in that issue? we'll take it from there [00:55] davidbanham: bnoordhuis: Will do. Any specific gdb commands you'd like? [00:55] bnoordhuis: davidbanham: a `backtrace full` of the debug build? [00:55] bnoordhuis: that's out/Debug/node [00:56] jhbot: 'Is there a way to "require" a JS file only once in nodejs?' by atlantis http://stackoverflow.com/q/8958097 (tags: javascript) [00:56] davidbanham: bnoordhuis: I'll do my best. Bear in mind 0 experience with gdb. Guessing The Googles will tell me how to backtrace full [00:57] ivan` has joined the channel [00:57] bnoordhuis: davidbanham: oh, it's easy -> gdb --args out/Debug/node script.js [00:57] bnoordhuis: then `run`, wait for the crash, `backtrace full` [00:57] arturadib has joined the channel [00:58] mikeal has joined the channel [00:58] criswell has joined the channel [00:58] r04r has joined the channel [00:59] davidbanham: bnoordhuis: Not sure I'm getting the out/Debug/node bit. The debug compiled version is in ~/opt/node/ [00:59] dtrejo: I like jhbot [00:59] dtrejo: jhbot++ [00:59] catb0t: jhbot now has 1 beer [00:59] dtrejo: yay [01:00] tlab has joined the channel [01:00] mightym: :D [01:00] mightym: well thank you anyway for your help [01:02] avalanche123 has joined the channel [01:03] r04r has joined the channel [01:05] sdwrage has joined the channel [01:06] satyr has joined the channel [01:07] r04r has joined the channel [01:11] kmiyashiro has joined the channel [01:12] thriple has joined the channel [01:12] r04r has joined the channel [01:12] r04r has joined the channel [01:12] superjoe: is there a node package for connecting to a server? I want to make a node server that is a proxy [01:13] dtrejo: superjoe: npm docs http-proxy [01:13] dtrejo: npm docs bouncy [01:13] AvianFlu: superjoe, also npm docs request [01:14] superjoe: thanks [01:14] AvianFlu: you can just use request and stream.pipe() for a wide variety of cases [01:14] superjoe: perfect [01:14] superjoe: because the server node is talking to is not an http server [01:15] AvianFlu: then use net.createConnection() and stream.pipe [01:15] dtrejo: npm docs socket.io [01:15] AvianFlu: for tcp [01:15] dtrejo: whoops, this is not the command line [01:16] superjoe: dtrejo, yes I'll be using socket.io for the connection between the web site and node.js [01:17] tlab has joined the channel [01:17] r04r has joined the channel [01:19] dtrejo: superjoe: i recommend bookmarking http://eirikb.github.com/nipster/ [01:19] superjoe: thanks [01:20] Me1000 has joined the channel [01:20] MarkVolkmann: I have a C function that expects a Function object. How can I get that argument into a Local so I can call it? Maybe that's not what I should be trying to do. I don't see a ToFunction method in Local. [01:20] skm has joined the channel [01:21] stegro has joined the channel [01:22] r04r has joined the channel [01:23] c4milo has joined the channel [01:23] secoif: superjoe also see toolbox.no.de for module discovery [01:23] superjoe: ty [01:24] Codemonkey1991 has joined the channel [01:25] piscisaureus_ has joined the channel [01:25] QaDeS_ has joined the channel [01:25] khrome has joined the channel [01:26] bradleyg has joined the channel [01:30] superlou has joined the channel [01:32] stagas has joined the channel [01:32] MarkVolkmann: Is this the best way to get a Function in an addon Method that was passed in from JavaScript? [01:32] MarkVolkmann: Local fn = Local::Cast(args[0]); [01:33] bradleyg has left the channel [01:33] MarkVolkmann: It's working, but maybe it's not the normal way to do this. [01:33] mattmcmanus has joined the channel [01:33] mattmcmanus has joined the channel [01:33] mikeal has joined the channel [01:33] draginx has joined the channel [01:33] ivic has joined the channel [01:34] skm has joined the channel [01:35] r04r has joined the channel [01:37] bradleyg__ has joined the channel [01:38] sharkbird has joined the channel [01:38] yawNO has joined the channel [01:39] Kunda has joined the channel [01:40] snuglepuss has joined the channel [01:42] AvianFlu has joined the channel [01:42] jhurliman has joined the channel [01:42] jhurliman: anyone have experience using nedis? [01:43] jhbot: 'Rendering Jade template within Jade script tag, nodejs' by Joel http://stackoverflow.com/q/8958292 (tags: jade, client-side-templating) [01:43] bradleyg has joined the channel [01:46] mansoor has joined the channel [01:48] adrianF has joined the channel [01:48] Kunda has joined the channel [01:49] dilvie has joined the channel [01:50] mattgifford has joined the channel [01:54] heavysixer has joined the channel [01:56] xbayrockx has joined the channel [01:56] josh-k has joined the channel [01:57] stagas has joined the channel [01:57] metapandava has joined the channel [02:02] bradleyg has left the channel [02:02] jldbasa has joined the channel [02:03] criswell has joined the channel [02:03] maushu has joined the channel [02:05] Bradley has joined the channel [02:05] torsd has joined the channel [02:06] creationix has left the channel [02:07] bradleyg has joined the channel [02:08] mh415 has joined the channel [02:09] xpigeonx has joined the channel [02:10] brianseeders has joined the channel [02:10] mattgifford has joined the channel [02:11] bagit has joined the channel [02:13] patcito has joined the channel [02:16] enmand has joined the channel [02:18] mikeal has joined the channel [02:20] _jzl has joined the channel [02:20] youngsolo has joined the channel [02:21] mikeal has joined the channel [02:21] youngsolo: i'm looking for a way to make node-static serve files when a specific url prefix is present (i.e /static/...) [02:21] youngsolo: is there a way to do it? [02:22] stagas has joined the channel [02:23] coderarity: youngsolo: i don't use node-static, but why don't you just put it in a static folder? [02:23] youngsolo: i have.. the problem is not the serving of the files (i've used the documentation and it works well) [02:23] youngsolo: the problem is that it only accept urls starting from the root directory [02:24] youngsolo: for example if i have a css file in my static directory i can access it using "/style.css" [02:24] youngsolo: when i want to access it using /static/style.css [02:24] coderarity: youngsolo: then set the public folder to be the directory above that [02:24] youngsolo: static.Server(".") ? [02:24] youngsolo: i'm not sure what you mean [02:25] coderarity: you would server './public' your css file would be at './public/static/style.css' [02:25] youngsolo: wow, do i feel stupid haha [02:25] youngsolo: thanks :) [02:25] coderarity: np =D [02:25] youngsolo: have a nice day [02:25] solidfusion has joined the channel [02:29] Nuck has joined the channel [02:34] sdwrage has joined the channel [02:34] innociv has joined the channel [02:34] jtsnow has joined the channel [02:35] CarterL has joined the channel [02:35] jhbot: 'communication between two processes running node.js' by Blue sol http://stackoverflow.com/q/8958497 [02:37] nibblebot has joined the channel [02:43] Aria: how to get reputation on stackoverflow: answer node.js questions with "don't do that, try X instead" [02:44] dreamdust has joined the channel [02:46] draginx has joined the channel [02:47] benvie: who invented jhbot [02:47] benvie: that person needs a handshake [02:49] Kunda has joined the channel [02:51] jxie has joined the channel [02:52] mh415: indeed [02:53] shedinja: node exits when I pause a fs.ReadableStream. I thought it would not since it still keeps the file open right? How do I make it not exit? [02:54] dtrejo: benvie: probably thejh [02:54] dtrejo: benvie: https://github.com/thejh [02:55] dtrejo: yep, it's him [02:55] benvie: well that man will get a handshake next time I see him [02:56] mdiamond has joined the channel [02:56] dtrejo: also, jhbot++ [02:56] dtrejo: jhbot++ [02:56] benvie: right beer [02:56] benvie: jhbot++ [02:56] dtrejo: where's catbot [02:56] benvie: .. sup [02:56] dtrejo: catb0t++ [02:56] dtrejo: wierd [02:56] dtrejo: so sad [02:56] catb0t: Exception: ReferenceError: sup is not defined [02:56] catb0t: jhbot now has 1 beer [02:56] catb0t: jhbot now has 1 beer [02:56] benvie: dead =( [02:56] benvie: there! [02:56] dtrejo: haha [02:56] benvie: thejh++ [02:56] dtrejo: .. 1+1 [02:56] catb0t: 2 [02:57] benvie: apparently catbot is busy [02:57] dtrejo: .. process.env [02:57] catb0t: Exception: ReferenceError: process is not defined [02:57] dtrejo: .. process.version [02:57] catb0t: Exception: ReferenceError: process is not defined [02:57] benvie: .. Object.getOwnPropertyNames(this).length [02:57] catb0t: 34 [02:57] dtrejo: .. this [02:57] catb0t: { [object global] } [02:57] dtrejo: .. for(i in this) console.log(i) [02:57] catb0t: Exception: ReferenceError: console is not defined [02:57] dtrejo: .. for(i in this) i [02:57] catb0t: "i" [02:57] dtrejo: arg [02:57] benvie: .. Object.getOwnPropertyNames(this).map(function(s){return !('prototype' in this)}) [02:57] catb0t: [ true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, ... [02:57] benvie: .. Object.getOwnPropertyNames(this).filter(function(s){return !('prototype' in this)}) [02:57] catb0t: [ "TypeError", "decodeURI", "print", "parseFloat", "Number", "URIError", "encodeURIComponent", "RangeError", "ReferenceError", "RegExp", "Array", "isNaN", "Date", "Infinity", "Boolean", "Error", "NaN"... [02:58] benvie: .. Object.getOwnPropertyNames(this).filter(function(s){return !('prototype' in s)}) [02:58] catb0t: Exception: TypeError: Cannot use 'in' operator to search for 'prototype' in TypeError [02:58] benvie: damn it [02:58] dtrejo: haha [02:58] dtrejo: nice [02:58] benvie: .. Object.getOwnPropertyNames(this).filter(function(s){return Object(s) === s && !('prototype' in s)}) [02:58] catb0t: [ ] [02:59] benvie: .. Object.getOwnPropertyNames(this).filter(function(s){return Object(this[s]) === this[s] && !('prototype' in this[s])},this) [02:59] catb0t: [ "decodeURI", "parseFloat", "encodeURIComponent", "isNaN", "Math", "encodeURI", "escape", "unescape", "decodeURIComponent", "eval", "parseInt", "JSON", "isFinite" ] [02:59] jstonne has joined the channel [03:00] materialdesigner has joined the channel [03:00] benvie: oh nevermind, 34 is the right number for a naked context [03:00] benvie: forgot I have --harmony on [03:02] r04r has joined the channel [03:03] mike5w3c has joined the channel [03:03] creationix has joined the channel [03:03] dthompso99 has joined the channel [03:04] plutoniix has joined the channel [03:07] langworthy has joined the channel [03:07] rwaldron has joined the channel [03:07] r04r has joined the channel [03:07] r04r has joined the channel [03:08] innoying: Is there a way to do non async child processes? (I know this goes agianst the way node typically works) [03:08] mdiamond has joined the channel [03:09] akter has joined the channel [03:12] r04r has joined the channel [03:13] konobi: innoying: nope [03:13] innoying: okay. I figured. Thanks [03:14] mikeal has joined the channel [03:15] jtsnow has joined the channel [03:16] amigojapan has joined the channel [03:16] r04r has joined the channel [03:18] jkridner has joined the channel [03:20] akter_ has joined the channel [03:21] r04r has joined the channel [03:21] boehm has joined the channel [03:23] upstream has joined the channel [03:25] jhbot: 'How to create absolute links in Node.js?' by Brandon Montgomery http://stackoverflow.com/q/8958702 (tags: express, connect) [03:26] r04r has joined the channel [03:27] litropy_ has joined the channel [03:30] rwaldron has joined the channel [03:30] meso has joined the channel [03:30] c4milo has joined the channel [03:31] meso has joined the channel [03:31] r04r has joined the channel [03:34] warz has joined the channel [03:34] jhbot: 'Point to Juggernaut's application.js file on heroku' by chourobin http://stackoverflow.com/q/8958734 (tags: ruby-on-rails, heroku, juggernaut) [03:36] r04r has joined the channel [03:37] adrianmg has left the channel [03:40] zzzmon has joined the channel [03:41] r04r has joined the channel [03:41] zzzmon: Hey any express experts know why my req.files is undefined (node 0.6.8, express 2.5.6) [03:41] zzzmon: ? [03:42] dnyy has joined the channel [03:42] zzzmon: var files = req.files; console.log('files: ' + util.inspect(mlsfile, 5)); [03:42] Aria: Using middleware that would set it? [03:42] zzzmon: my only modules are express and jade [03:44] _ding: zzzmon: express github page says you need express 3 for node 0.6 and up... [03:44] unreal-dude has joined the channel [03:45] skm has joined the channel [03:45] secoif: zzzmon are you using bodyParser? are the files coming from a form upload or a test script? [03:45] r04r has joined the channel [03:46] zzzmon: is express 3 stable? [03:46] zzzmon: I'm using bodyParser, yes [03:46] zzzmon: secoif: ^ [03:46] zzzmon: _ding ^^ [03:46] zzzmon: and the files are coming from input(type='file') [03:47] _ding: zzzmon: It's described as "alpha" but I've heard people have been using it just fine... [03:47] a_suenami has joined the channel [03:47] _ding: Not saying that's the problem, but it might be... [03:48] Vennril2 has joined the channel [03:49] lazyshot has joined the channel [03:50] skm has joined the channel [03:50] satyr has joined the channel [03:51] secoif: zzzmon you should post some code [03:55] r04r has joined the channel [03:55] r04r has joined the channel [03:55] draginx: http://pastie.org/private/nqdokons8rmw5ikiosw7dg any idea why i would just get timed out (wont render 'index') if the user entered in the correct login? [03:56] dshaw_ has joined the channel [03:56] martin_sunset_ has joined the channel [03:58] ohtogo has joined the channel [04:00] skm has joined the channel [04:01] r04r has joined the channel [04:01] zzzmon: secoif: _ding: https://gist.github.com/1655401 [04:01] Aria: draginx: It falls through to the empty handler in the get * line, which never returns [04:02] secoif: zzzmon form(action='/parse' [04:02] snuglepuss: help with bison.js? [04:02] Aria: draginx: Or that's my suspicion anyway [04:02] secoif: zzzmon app.post('/parsefile' [04:02] aslant has joined the channel [04:02] Aria: snuglepuss: Don't ask to ask, just ask. [04:02] draginx: Aria: so what should I do? [04:02] draginx: call next(); in that function? [04:03] ovnicraft has joined the channel [04:03] marcello3d has joined the channel [04:03] draginx: yup that worked! :) awesome [04:04] zzzmon: secoif: sorry it's fixed. That's not the problem; I originally had it abstracted to a routes.js and wanted to simplify for the gist. [04:04] tornad has joined the channel [04:04] tmcw has joined the channel [04:04] Aria: Sure thing! [04:04] tmcw has joined the channel [04:04] secoif: zzzmon show your express config [04:04] secoif: plz. [04:06] r04r has joined the channel [04:06] zzzmon: secoif: https://gist.github.com/1655401 [04:06] zzzmon: added the whole app.js [04:06] zzzmon: thanks for taking a look btw. I appreciate it [04:07] monteslu has joined the channel [04:07] snuglepuss: bison decode is returning a boolean. what am i doing wrong? [04:08] secoif: zzzmon I'm just comparing with my config… I have the bodyParser after methodOverride [04:09] secoif: zzzmon i recall that being important [04:09] secoif: zzzmon also I have { keepExtensions: true } in by body parser so it keeps the file extension [04:09] zzzmon: secoif: I don't think that matters. This is the default with command-line express call. Also, bodyParser() works for input(type='text') [04:09] zzzmon: so something about bodyParser is working [04:10] secoif: zzzmon …try it [04:10] draginx: how come req.session.destroy(); doesnt work in expressjs? [04:10] r04r has joined the channel [04:11] secoif: zzzmon it's the only thing I can immediately see that's different from my config [04:11] lwille has joined the channel [04:11] neilk_ has joined the channel [04:11] zzzmon: secoif: same result [04:11] secoif: zzzmon bah. [04:11] zzzmon: and your config works with files? [04:12] leonhardtwille has joined the channel [04:12] secoif: yeah [04:12] secoif: zzzmon sorry, no idea. perhaps ask in #express [04:13] _ding: does bodyParser still provide the request with a rawBody property ? [04:13] Aria: snuglepuss: Returning a boolean from what? [04:14] enobrev has joined the channel [04:14] isaacs has joined the channel [04:15] zzzmon: _ding: no req.rawBody [04:15] zzzmon: secoif: thanks for trying! [04:15] lazyshot_ has joined the channel [04:15] r04r has joined the channel [04:15] secoif: zzzmon I'd perhaps try creating a minimal test case. as in, just express and an html page [04:15] secoif: zzzmon see if you can isolate the issue [04:16] Aria: snuglepuss: I can't get bison current to run on my node current -- no idea what the issue is. Why bison, not something else? [04:16] zzzmon: secoif yeah thanks. I'll try without jade [04:16] Aria: draginx: What does that do? (Are you using a session handler?) [04:17] draginx: Aria: I dont think so.. im using w/e expressjs would use normally (I;m assuming it uses a memorystore by default?) [04:17] draginx: assuming things is a bad idea :P [04:17] draginx: i am not a clever man :o [04:17] Aria: draginx: express defaults to "not much". It lets you build what you want more than it starts off as a huge pile. [04:18] draginx: booooo [04:18] draginx: ok memorystore it is :) as i do no have redis yet :D [04:18] xbayrockx: Honestly [04:18] draginx: or may be I do but forgot password O_o [04:18] snuglepuss: Aria: no reason, im a noob, what would you recomend? Thanks for the help [04:18] xbayrockx: I didn't know how to serve all my files in NodeJS. I installed Express and then in 6-7 lines of code I never had to touch that part again [04:19] jacobolus has joined the channel [04:20] Aria: snuglepuss: json, gzipped json, or maybe [04:20] Aria: mongodb style BSON like https://github.com/marcello3d/node-buffalo [04:21] r04r has joined the channel [04:22] Aria: snuglepuss: What's your use case? [04:23] Sami_ZzZ has joined the channel [04:24] jdparker has joined the channel [04:24] _ding: zzzmon: Thanks. Also just saw this: https://github.com/visionmedia/express/issues/897 [04:25] _ding: Seems like an "npm update outdated" really screwed my app over... [04:25] r04r has joined the channel [04:26] snuglepuss: Aria: entity update, didn't know I could also gzip json, that should help a lot. [04:26] tbranyen: you can gzip like anything [04:26] secoif: _ding I do that nearly daily during dev [04:26] secoif: _ding shit breaks all the time [04:26] secoif: best to catch early [04:26] Aria: snuglepuss: gzip's not amazing, but it's fast enough, and generally whenever you have some somewhat-redundant text, it's a great place to start. [04:27] secoif: _ding once I left it for a month or two, app was broken in about 10 different ways. All simple but to actually nail down what was causing the errors was a pain [04:27] marcello3d has joined the channel [04:28] p1d has joined the channel [04:29] draginx: Aria: ok that didnt fix it.. i placed redis as a memory store [04:29] zackattack has joined the channel [04:29] Aria: draginx: How'd you set up your session handler? [04:30] draginx: app.use(express.session({store: RedisStore}); [04:30] sdwrage has joined the channel [04:30] _ding: secoif, yes, but the removal of rawBody could have handled better. Maybe left for a major release... [04:30] r04r has joined the channel [04:30] r04r has joined the channel [04:31] secoif: _ding agree. [04:31] markq has joined the channel [04:31] secoif: though working with semver is probably hard in practice [04:32] bmeck_vacation has joined the channel [04:33] markq: anyone know how to use the url() function in stylus? I'm trying to repeat a png across the background [04:35] r04r has joined the channel [04:35] zzzmon: secoif: _ding: yeah the weird part is that the file name shows up in req.body but not the content [04:35] zzzmon: req.files is undefined [04:36] secoif: markq perhaps explain problem you're having [04:36] secoif: markq you've obviously read http://learnboost.github.com/stylus/docs/functions.url.html [04:37] zzzmon: req.rawBody ~= req.body though in express-unstable fyi [04:38] fomatin has joined the channel [04:40] orlandovftw has joined the channel [04:41] benop has joined the channel [04:41] benop: hi guys [04:41] r04r has joined the channel [04:42] benop: what's better: cluster vs. forever start multiple independent processes? [04:43] Aria: What are you doing with it? [04:43] benop: running multiple instances under haproxy on each server [04:44] benop: at the moment anyway .... 6 nodejs instances + haproxy [04:44] markq: secoif: I'm having trouble understanding how to use the url() function inside my styl document. Or do I use it within express? [04:44] jtsnow has joined the channel [04:45] markq: I read the page but it still didn't help [04:45] r04r has joined the channel [04:46] gavin_huang has joined the channel [04:46] benop: where's a good place to find a nodejs freelancer who can audit our code and help us figure out + document a deployment strategy? [04:46] markq: basically, I already have a data base64 uri png line but in order to clean up my code area within the styl doc I thought that saving the png and using the url() function to import the png might be a better idea [04:46] benop: you mean css url mark? [04:47] benop: background-image: url(path/to/the/image.png); [04:47] markq: awesome [04:47] markq: but what is the url() function for in stylus then? [04:47] markq: just curious [04:47] benop: i don't know what stylus is, i just know css [04:48] Aria: stylus is tj's awesome css metalanguage [04:48] benop: ah okay [04:48] markq: is it better for performance to serve the png or serve the base64 string? [04:48] Aria: Preprocessor for doing ninjitsu to css [04:48] markq: that's the main question that's been bugging me [04:48] benop: what stylus is doing is changing url(/path/to/the/image.png) to a base64 encoded image for fewer http requests [04:48] Aria: markq: That depends on the client and the image! [04:48] joshkehn has joined the channel [04:48] shesek_: markq, its really only answerable on a case-to-case basis [04:49] benop: Stylus is bundled with an optional function named url(), which replaces the literal url() calls, and conditionally inlines them using base64 Data URIs. [04:49] Aria: base64 is more data to transfer. [04:49] benop: yeah but fewer http requests [04:49] benop: it's a tradeoff [04:49] Aria: Exactly. [04:49] markq: it's a 76 x 119 png after rendering the data uri string [04:49] secoif: markq perhaps check out examples and tests https://github.com/LearnBoost/stylus/blob/master/examples/images.styl [04:50] secoif: markq and https://github.com/LearnBoost/stylus/blob/master/examples/images.js [04:50] shesek_: I would only use it for relatively small images, that're used only once in the CSS file and always displayed (not hidden until some action is done by the user, for example) [04:50] benop: i would just use a spritesheet instead [04:50] benop: and not bother with data uris [04:50] r04r has joined the channel [04:50] shesek_: ... and only if you don't need to support old browsers [04:51] fomatin has left the channel [04:51] benop: so where do all the nodejs experts hang out? we're looking for a freelancer to do some work with us [04:51] draginx: benop: #express [04:51] markq: I want to repeat it x & y on the whole background [04:51] Aria: benop: Here. [04:51] benop: there's only like 3 people talking here lol [04:52] markq: what's a spritesheet? [04:52] Aria: markq: So .. do? That's a feature of background, not of url, ne? [04:52] benop: a bunch of images joined into one [04:52] tomtomaso has joined the channel [04:52] draginx: benop: its a sat night.. [04:52] Aria: A spritesheet you use by sliding the background offset around, to view different parts of that image in different places. [04:52] benop: so you have like [abcdef] and when you want 'a' you set the background image coordinate, width and height, so it only shows that portion [04:52] Aria: So you only have to transfer one file [04:52] Sami_ZzZ has joined the channel [04:52] markq: that's convienient [04:53] markq: should send all static images as one image sprite then [04:53] Aria: If you don't need to scale them, perhaps. [04:53] Aria: There's use cases either way. [04:54] kmiyashiro has joined the channel [04:54] benop: i think i finally have our first nodejs api server working correctly [04:54] secoif: benop whoo [04:54] benop: it hasn't crapped out any of the processes, or lost connection to our other servers, or been overloaded by too many http connections in almost 20 minutes [04:54] secoif: benop in production? [04:54] benop: yep [04:54] secoif: sweet. [04:54] benop: well, 1 of 8 api servers [04:54] benop: the other 7 are .NET [04:55] benop: so it's getting *some* of the live traffic [04:55] perezd has joined the channel [04:55] secoif: .NET soon to be nodejs? [04:55] benop: if we can get it working right [04:55] secoif: benop got tests? [04:55] benop: i've been running into all kinds of problems throwing significant traffic at it [04:55] brianseeders has joined the channel [04:55] r04r has joined the channel [04:55] secoif: benop what kinds of problems? [04:56] benop: i think mostly just being overwhelmed, it ends up having only erratic contact with external servers which cascades down into other problems [04:56] benop: can't even ping a server on our network reliably if i throw serious traffic at it [04:57] mh415: Why the switch from .NET? I assume it was already working in the previous architecture. [04:57] benop: switch is because we do ~800 million hits a day on our API [04:57] secoif: benop considered using node cluser? [04:57] secoif: nice traffic [04:57] shesek_: secoif, with or without a cluster, he shouldn't be getting those kind of issues [04:57] benop: and .NET has all kinds of nasty stuff that gets in our way, like if *anything* goes wrong that drags requests out it can cripple an entire server getting bogged down [04:57] benop: here's an issue i just got [04:58] benop: Error: EMFILE, Too many open files '/home/nodejs/com.playtomic.api/public/crossdomain.xml' [04:58] secoif: shesek_ depends on the type of load [04:58] benop: seen that issue many, many times [04:58] WRAz: benop [04:58] secoif: benop you can raise that on your server [04:58] Aria: TIme to raise your OS's file descriptor limit? [04:58] benop: yeah i ran ulimit -n 999999 [04:58] WRAz: increase file handlers [04:58] WRAz: Aria++ [04:58] benop: and also ulimit -n unlimited [04:58] Aria: Linux? [04:58] Aria: There's also a knob in sysctl [04:58] benop: centos [04:59] WRAz: oh you guys got kong as one of your customers? nice [04:59] benop: they're my friends [04:59] benop: i <3 kongregate [04:59] benop: but i <3 armorgames more, they invested in us heh [04:59] WRAz: well, I'm mostly interested in that because they're owned by gamestop [05:00] shesek_: benop, make sure you aren't leaking anything that should be kept per-request onto the global scope [05:00] shesek_: that can get quite ugly [05:00] panosru has joined the channel [05:00] WRAz: you using codeworker to generate your api? [05:00] benop: no just an ide [05:00] WRAz: ah [05:01] Wizek-other has joined the channel [05:01] WRAz: ACTION also works for a big company who has the problem of distributing the same API client libs in multiple languages. [05:01] benop: shesesk the main workload is basically: we have an array where events are stored and every second flushed to a database, and most requests put something in that array [05:01] benop: is that going to leak something? [05:01] r04r has joined the channel [05:01] WRAz: weird, why not use a MQ? [05:01] shesek_: benop, I would add some logging to check how big it gets [05:01] shesek_: perhaps you should flush it more often [05:02] benop: it's only 10s of entries per process (6 processes) at the moment because it's only getting a tiny slice of our traffic [05:02] benop: although typically it's 1000 - 2000 entries then flush [05:02] WRAz: weird architecture. [05:02] skm has joined the channel [05:03] shesek_: Yeah, it is a bit weird... but somewhat makes sense - most SQL servers handles bulk inserts much better than lots of single ones [05:03] WRAz: yar, I'd toss them into a MQ or even something like kafka [05:03] shesek_: I would try to find some other place to store them temporary, tho... perhaps [RN]edis? [05:03] benop: it goes into mongodb [05:04] benop: batch insert [05:04] shesek_: Isn't mongodb already uber-fast with inserts? [05:04] shesek_: ACTION hasn't played around with mongo as much as he'd wanted yet [05:04] benop: yeah but doing it this way means nobody has to actually hit the database directly, their data just goes into an array and then their request is finished [05:04] WRAz: I usually see something like kafka -> hadoop -> ??? -> profit. [05:05] benop: data: error: Error: failed to connect to [192.168.0.4:27017] [05:05] benop: that's the other error that screws us up [05:05] WRAz: but that pattern is common in the finacial industry [05:05] shesek_: benop, are you sure populating an array and doing bulk inserts is actually better? Any benchmarks on that before you decided? [05:05] benop: the server stops being able to reach our own network [05:05] Aria: What sort of failure to connect? [05:05] benvie: ok, goddamn it [05:05] benop: just local testing shesek [05:05] zzzmon has joined the channel [05:06] benvie: I've comlpetely implemented repl.js and readline.js [05:06] r04r has joined the channel [05:06] benop: although it could have been compounded by that node-mongo-native or w/e it is not releasing memory [05:06] WRAz: does REPL.js offer a web REPL? [05:06] jp232 has joined the channel [05:06] benvie: what is the bit of info I'm missing on making TTY not be so bitchy about stdin and stdout [05:06] sharkbird has joined the channel [05:06] zzzmon: secoif : _ding : Just discovered what I think might be the problem: node-formidable may not be recognizing that it's a file. When I nixed the bodyParser and implemented formidable myself, it recognized it as an on('field') event rather than an on('file') event. hmm. [05:06] benop: ab was giving us ~2500 requests/second on a small virtual machine this way but it wasn't simulating the same load of connections [05:06] benvie: like if I load it as a child process fork, or like anything [05:07] Aria: Yeah, ab is a horrible benchmark. [05:07] Aria: Nothing like reality. [05:07] zzzmon: _ding : secoif : any insight? [05:07] benop: time to take our nodejs node off, it's borking out again and unable to reach our own and others' servers heh [05:07] secoif: zzzmon sorry. pehaps wait until tj gets back [05:07] benvie: I cannot figure out the magical naughty place I need to touch to make TTY not fail outside of running as the primary process and with a TTY stdin/out [05:08] secoif: benop Aria yeah ab is balls, learn to use apache jmeter, much better for benchmarking [05:08] secoif: albeit less intuitive [05:08] shesek_: benop, those issues sounds a bit odd to me... I've been throwing much bigger loads on nodejs than what you're describing without issues [05:08] qmx: benop: another option is tsung [05:08] secoif: fuck jmeter has an awful interface [05:09] qmx: ACTION still thinks jmeter is #1 [05:09] benop: yeah i know they're strange issues, it shouldn't be crapping out on a tiny workload [05:09] Aria: benop: Sounds like you might need better error retry logic, perhaps some internal queues for serving requests instead of going balls-out parallel; you might also need to tune your OS to allow more file handles [05:09] shesek_: benop, I'm sure there's something wrong there... you'll have an "ahhh!" moment at some point [05:09] benop: the "ahhh!" moment will be next week when we hire someone to audit what i've written and our deployment config and strategy hehe [05:10] sh1mmer has joined the channel [05:10] secoif: benop perhaps as an intermediate solution you could limit flow to the node process to some known safe req/minute [05:10] zzzmon: secoif is tj's username just @tj? [05:10] benop: at the moent i just do some work and then toss it on the dns pool with a low ttl to see how it holds up [05:10] secoif: zzzmon tjholowaychuk [05:10] benop: tonight's the best it's been so far [05:11] shesek_: benop, aren't people losing stats from this experiments tho? :O [05:11] zzzmon: thx [05:11] r04r has joined the channel [05:11] benop: nah if it can't insert the data it just puts it back in the array and tries again on the next second [05:12] draginx: why would req.session.user = ""; not update? =/ [05:15] avalanche123 has joined the channel [05:16] r04r has joined the channel [05:17] IrishGringo has joined the channel [05:18] djbell has joined the channel [05:19] fearphage has joined the channel [05:20] luoluoluo has joined the channel [05:21] r04r has joined the channel [05:22] wedtm has joined the channel [05:22] rachet has joined the channel [05:25] MUILTR has joined the channel [05:25] jhbot: 'Express.js: Object # has no method 'call'' by user1163144 http://stackoverflow.com/q/8959181 (tags: methods, express) [05:26] r04r has joined the channel [05:31] r04r has joined the channel [05:33] qsobad has joined the channel [05:34] fomatin has joined the channel [05:34] overra has joined the channel [05:35] jhbot: 'is there a cookies based session store for nodejs (connect, express)?' by Vitaly Kushner http://stackoverflow.com/q/8959233 (tags: express) [05:36] AvianFlu: + [05:36] r04r has joined the channel [05:37] materialdesigner has joined the channel [05:38] ryanrolds: Anyone know a module like jspack that handles c strings better? [05:38] ryanrolds: More specifically, doesn't require a length and looks for a null character instead? [05:39] dreamdust has left the channel [05:42] rtgibbons has joined the channel [05:44] brmouzone has joined the channel [05:46] jhbot: 'triggering everyauth login process without page refresh (facebook auth)H' by Pilgrim http://stackoverflow.com/q/8959279 (tags: javascript, facebook, authentication, everyauth) [05:46] kyle___ has joined the channel [05:47] r04r has joined the channel [05:48] mattgifford has joined the channel [05:49] draginx: anyone know of an alternative to node-crawler? [05:49] dtrejo: node.io [05:49] dtrejo: maybe [05:50] dtrejo: or just http-agent with jsdom [05:50] dtrejo: or just request and jsdom [05:50] dtrejo: draginx ^ [05:51] draginx: node.io seems awesome [05:52] r04r has joined the channel [05:52] r04r has joined the channel [05:53] cpleppert has joined the channel [05:57] dthompso99 has left the channel [05:57] r04r has joined the channel [05:59] agnat_ has joined the channel [06:00] mdel has joined the channel [06:00] CIA-101: node: 03koichik 07v0.6 * r3df7c90 10/ (lib/http.js test/simple/test-http-should-keep-alive.js): (log message trimmed) [06:00] CIA-101: node: http: keep-alive should default with HTTP/1.1 server [06:00] CIA-101: node: As RFC 2616 says we should, assume that servers will provide a persistent [06:00] CIA-101: node: connection by default. [06:00] CIA-101: node: > A significant difference between HTTP/1.1 and earlier versions of [06:00] CIA-101: node: > HTTP is that persistent connections are the default behavior of any [06:00] CIA-101: node: > HTTP connection. That is, unless otherwise indicated, the client [06:02] isaacs has joined the channel [06:03] r04r has joined the channel [06:03] dgathright has joined the channel [06:03] qsobad has left the channel [06:05] luoluoluo has left the channel [06:05] satyr has joined the channel [06:08] CrawfordComeaux has joined the channel [06:08] r04r has joined the channel [06:08] mikeal has joined the channel [06:13] t0mmyvyo has joined the channel [06:13] r04r has joined the channel [06:13] blueadept has joined the channel [06:13] blueadept has joined the channel [06:15] joshkehn has joined the channel [06:18] r04r has joined the channel [06:18] r04r has joined the channel [06:23] r04r has joined the channel [06:23] r04r has joined the channel [06:29] r04r has joined the channel [06:34] r04r has joined the channel [06:36] c4milo has joined the channel [06:38] r04r has joined the channel [06:42] isaacs has joined the channel [06:43] r04r has joined the channel [06:43] r04r has joined the channel [06:48] dgathright has joined the channel [06:48] r04r has joined the channel [06:48] r04r has joined the channel [06:49] jtsnow has joined the channel [06:51] jesusabdullah: This 'use strict' issue is mildly upsetting [06:51] jesusabdullah: I just want to write the javascript I want to. [06:51] jesusabdullah: Don't tell me what to do! [06:51] neilk_ has joined the channel [06:52] ajpiano has joined the channel [06:52] secoif: jesusabdullah whats the use strict issue? [06:52] secoif: ACTION only writes in strict mode [06:53] systemfault: Not sure why would anyone not write in strict mode.. [06:53] r04r has joined the channel [06:53] secoif: systemfault++ [06:53] catb0t: systemfault now has 1 beer [06:54] konobi: there's several very useful features you lose [06:54] systemfault: Example? [06:54] jesusabdullah: I don't mind writing clean javascript [06:54] dr0id has joined the channel [06:54] systemfault: Don't say "with" [06:54] systemfault: Please... [06:54] konobi: arguents.callee [06:54] secoif: that's for performance [06:54] systemfault: Ok.. one :/ [06:54] h4mz1d has joined the channel [06:54] jesusabdullah: I usually don't use any of those things [06:54] secoif: fuck it off [06:54] madhums has joined the channel [06:54] secoif: I mean [06:54] secoif: go away slow performing things. [06:54] jesusabdullah: but I should be allowed to [06:55] jesusabdullah: one of the things I appreciate most about javascript is that it trusts me with enough rope to hang myself with [06:55] systemfault: Why? Javascript isn't the only language in the world to have some features deprecated.. [06:55] ambroff_ has joined the channel [06:55] secoif: jesusabdullah you can still hang yourself, they just give you 2m of rope instead of 20. [06:56] konobi: lint [06:56] tilgovi has joined the channel [06:56] secoif: konobi meh [06:57] jesusabdullah: It's not about deprecation, it's about freedom of speech dammit! [06:57] secoif: konobi I can never be bothered going through all the damn options [06:57] jesusabdullah: This is censorship! [06:58] konobi: in strict mode you can still make mistakes that a decent linter will pick up... it's a false sense of security =0) [06:58] r04r has joined the channel [06:58] secoif: konobi sure, but it picks up on some of the nastier ones [06:59] systemfault: If you love sloppy languages.. PHP is there for you. [06:59] systemfault: IMHO, the strict mode is welcome. [06:59] konobi: i like the idea... it's just an odd set of things to restrict [07:00] secoif: konobi like? [07:00] secoif: most of the reasoning is explained fairly well over https://developer.mozilla.org/en/JavaScript/Strict_mode [07:00] plutoniix has joined the channel [07:00] konobi: arguments, function properties, etc... they're not commonly used... but extremely useful [07:01] konobi: also, why not give me an option to unstrict lexically [07:01] luoluoluo has joined the channel [07:01] kyle____ has joined the channel [07:02] konobi: also... enooctal!? [07:02] plutoniix has joined the channel [07:02] systemfault: Who uses octal? :/ [07:02] systemfault: I think people complain for the fun of complaining... [07:02] r04r has joined the channel [07:02] r04r has joined the channel [07:02] systemfault: Without any "real" reason. [07:03] konobi: systemfault: file/directory permissions? [07:04] secoif: konobi edge case [07:04] systemfault: Cool... let's keep a error-prone feature for a single case. [07:05] isaacs has joined the channel [07:05] systemfault: I would agree if you could specify an octal number with some kind of suffix [07:06] konobi: *shrug* i'm just not convinced it buys me anything over well written and decently linted code [07:06] sakkaku has joined the channel [07:06] systemfault: I think it matters for the future... not really for es5 [07:07] konobi: nb, i only write javascript on the server... so that's all i care about... in the browser may be a different thing [07:08] systemfault: I'd love to write JS for the server at work :P [07:08] r04r has joined the channel [07:08] ryanrolds: Woop, added variable length null terminated strings to jspack. [07:08] luoluoluo has left the channel [07:08] secoif: konobi also you can use parseInt to handle octals, eg parseInt('777', 8) [07:09] secoif: konobi I mainly use it because v8 can optimise it better, and to prevent accidental globals [07:12] gigafied has joined the channel [07:12] mikeal has joined the channel [07:13] r04r has joined the channel [07:14] secoif: konobi do you have lint built into your workflow somehow? eg a git hook or something? [07:14] secoif: konobi in your test makefile perhaps? [07:15] konobi: secoif: vim hook [07:15] secoif: konobi oo [07:16] secoif: does it show the warnings inside vim I think i had something like that for a while but couldn't be bothered with the config [07:17] fangel has joined the channel [07:17] konobi: yeah, spits line into into a split buffer [07:17] secoif: sweet. [07:18] konobi: http://www.vim.org/scripts/script.php?script_id=1431 [07:18] konobi: looks similar to the one i use [07:19] shiawuen has joined the channel [07:20] Locke23rus has joined the channel [07:21] r04r has joined the channel [07:23] esundahl has joined the channel [07:25] r04r has joined the channel [07:26] satyr has joined the channel [07:27] upstream has left the channel [07:29] mikeal has joined the channel [07:30] r04r has joined the channel [07:33] fearphage has joined the channel [07:34] nicholasf has joined the channel [07:34] vishesh has joined the channel [07:35] r04r has joined the channel [07:36] mansoor: Working on a sick Node editor, need a name :) [07:38] orlandovftw has joined the channel [07:41] r04r has joined the channel [07:44] dgathright has joined the channel [07:46] r04r has joined the channel [07:47] superjoe: mansoor, nodinator [07:47] superjoe: noderator [07:48] AvianFlu has joined the channel [07:50] r04r has joined the channel [07:52] mansoor: superjoe, i settled on Vortex :D [07:52] superjoe: cool [07:52] superjoe: why would I use vortex and not vim? [07:52] mansoor: No reason what so ever :) [07:53] superjoe: ha [07:53] mansoor: Ohh, I'm integrating JS-hint and such into it [07:53] mansoor: idk if you can do that with VIM [07:53] dnyy has joined the channel [07:53] superjoe: yeah but probably not quite as nicely [07:53] superjoe: I mean, you can integrate JS-hint with vim, but not as nicely as you could with a custom editor [07:53] mansoor: yah, not planning on making an IDE just an editor thats fast [07:54] mansoor: Right now I'm kinda-sorta coloning Sublime Text 2 [07:54] mansoor: in terms of looks [07:55] sqlserverio has joined the channel [07:55] r04r has joined the channel [07:56] r04r has joined the channel [07:56] sqlserverio: Ok, I'm trying to get cluster and express playing nicely. I just don't get it. nothing I try gets me to a point where I can pass .use() to cluster. [07:56] zaphod1984 has joined the channel [07:56] incon has joined the channel [07:56] satyr has joined the channel [07:57] sqlserverio: when I do a cluster(app).use() it throws an not an object of error. I'm exporting my app via modules.export via var app = module.exports = express.createServer(); [07:58] sqlserverio: lol I guess coming in at 2am CST asking questions isn't the high traffic time to be here. [07:59] Bogh has joined the channel [07:59] amasad has joined the channel [08:01] dmitrig01 has joined the channel [08:01] r04r has joined the channel [08:03] jiboumans has joined the channel [08:03] emilsedgh has joined the channel [08:04] slaskis has joined the channel [08:06] r04r has joined the channel [08:07] t0mmyvyo has joined the channel [08:11] r04r has joined the channel [08:13] iplat has joined the channel [08:15] iplat: i've been trying to build node on osx 10.7 with xcode 4.2 installed. I keep getting cannot configure c compiler error when trying to configure [08:15] Derek has joined the channel [08:16] Derek has left the channel [08:16] iplat: ive been searching for a solution for hours but no luck [08:16] r04r has joined the channel [08:18] munichlinux has joined the channel [08:18] secoif: mansoor seen http://coreh.github.com/nide/ ? [08:18] iplat: im also trying to build version 0.4.7 [08:19] mansoor: secoif, yah its make only [08:19] secoif: iplat can you gist the error [08:19] mansoor: *Mac [08:19] secoif: mansoor as all good software is [08:19] secoif: :{P [08:19] mansoor: ewwww [08:20] iplat: holy crap... i just downloaded the gcc package from github and instsalled it [08:20] iplat: configure worked right away [08:20] secoif: :D [08:20] iplat: and now im building!! [08:20] secoif: iplat yay [08:20] iplat: i need to post this somwhere [08:21] iplat: secoif thanks for replying [08:21] mansoor: Hmm.. how to get the Node api as JSON [08:22] r04r has joined the channel [08:22] r04r has joined the channel [08:23] joelmob has joined the channel [08:24] iplat: https://github.com/kennethreitz/osx-gcc-installer/ [08:25] iplat: that's what finally worked for me [08:25] fangel has joined the channel [08:25] mansoor: secoif, hmm now I'm curious you said best software are for Macintosh's [08:25] mansoor: name one :) [08:26] secoif: vim [08:26] mansoor: sorr you said Mac only [08:26] mansoor: vim is MOST DEFINITELY not mac only [08:27] ryanrolds: OS X [08:27] secoif: mansoor macvim [08:27] galaxywatcher has joined the channel [08:27] mansoor: mac vim is just vim fixed to work better under the draconian rules of osx [08:28] mansoor: :p thats not a good thing [08:28] LarsSmit has joined the channel [08:28] secoif: hahah [08:28] secoif: ok [08:28] r04r has joined the channel [08:28] r04r has joined the channel [08:30] secoif: mansoor most built-in osx apps are pretty nice (perhaps with exception of iCal) [08:30] secoif: mansoor osx twitter client is nice [08:31] mansoor: that would very useful, but i have this thing called a "Browser" that I can access twitter with :p [08:31] secoif: mansoor access via twitter client is nicer ux [08:32] secoif: mansoor what are you running? [08:32] mansoor: Sure Mac apps fit better with the desktop because its all one UI framework but I'd rather not be forced to use one framework to write my programs [08:32] mansoor: sechrist, Linux [08:32] mansoor: woops [08:32] mansoor: secoif, [08:32] secoif: mansoor k, what distro? [08:32] mansoor: At the moment Kubuntu [08:33] cmr: Same software runs on all distros, secoif. [08:33] mansoor: I hop around though [08:33] kyle___ has joined the channel [08:33] plutoniix has joined the channel [08:33] mansoor: from time to time [08:33] secoif: cmr of course [08:34] r04r has joined the channel [08:34] r04r has joined the channel [08:36] skm has joined the channel [08:36] plutoniix has joined the channel [08:39] r04r has joined the channel [08:41] CIA-101: node: 03Brandon Benvie 07v0.6 * rf901443 10/ lib/util.js : (log message trimmed) [08:41] CIA-101: node: util: use getOwnPropertyDescripter [08:41] CIA-101: node: Change formatProperty in util.js to use Object.getOwnPropertyDescriptor [08:41] CIA-101: node: instead of __lookup[GS]etter__. [08:41] CIA-101: node: Use the cached value from the descriptor to reduce number of property [08:41] CIA-101: node: lookups from 3 to 1. [08:41] CIA-101: node: Fallback to standard lookup if the descriptor is empty. This doesn't [08:41] CIA-101: node: 03koichik 07v0.6 * r93298af 10/ test/simple/test-util-inspect.js : test: for #2109 - http://git.io/S-e8Wg [08:42] stagas has joined the channel [08:43] r04r has joined the channel [08:44] d0k has joined the channel [08:47] richardr has joined the channel [08:48] r04r has joined the channel [08:48] r04r has joined the channel [08:51] munichlinux has joined the channel [08:53] r04r has joined the channel [08:53] mike5w3c has joined the channel [08:54] dr0id has left the channel [08:55] mikeal has joined the channel [08:55] plutoniix has joined the channel [08:56] rendar has joined the channel [08:58] r04r has joined the channel [08:58] stayarrr has joined the channel [08:59] gregmoreno has joined the channel [09:00] luke` has joined the channel [09:01] aliem has joined the channel [09:02] r04r has joined the channel [09:03] disappearedng: Hey I am testing some code on the CLIENT side logic which manipulates DOM objects and such. I am using socket.io and I was wondering if you guys have any recommendations for testing tools [09:04] mraleph has joined the channel [09:06] davetayls has joined the channel [09:07] r04r has joined the channel [09:07] r04r has joined the channel [09:11] Aria has joined the channel [09:11] niloy has joined the channel [09:11] yolin has joined the channel [09:12] r04r has joined the channel [09:15] mytrile has joined the channel [09:16] r04r has joined the channel [09:16] r04r has joined the channel [09:18] mara has joined the channel [09:19] icebox has joined the channel [09:19] icebox: SubStack: ping [09:21] astropirate has joined the channel [09:23] r04r has joined the channel [09:27] npa has joined the channel [09:28] CrawfordComeaux has joined the channel [09:28] janekp has joined the channel [09:29] samsonjs has joined the channel [09:32] jetienne has joined the channel [09:33] thalll has joined the channel [09:33] agnat has joined the channel [09:35] japaniel has joined the channel [09:38] hz has joined the channel [09:42] herbySk has joined the channel [09:46] lazyshot has joined the channel [09:47] satyr has joined the channel [09:47] stagas has joined the channel [09:47] lazyshot_ has joined the channel [09:50] jbpros has joined the channel [09:56] Heisenmink_ has joined the channel [09:56] lazyshot has joined the channel [09:57] stagas has joined the channel [09:58] joelmob has joined the channel [10:01] disappearedng: http://stackoverflow.com/questions/8960306/testing-javascript-on-client-end if someone can help I will really appreciate it [10:03] jhbot: 'Testing Javascript on Client end' by disappearedng http://stackoverflow.com/q/8960306 (tags: javascript, jquery, testing, socket.io) [10:04] marcells has joined the channel [10:04] amasad_ has joined the channel [10:04] xavier_d has joined the channel [10:07] jstonne has joined the channel [10:08] mytrile has joined the channel [10:11] tornad has joined the channel [10:11] gigafied has joined the channel [10:13] adambeynon has joined the channel [10:15] lperrin has joined the channel [10:15] stonebranch has joined the channel [10:16] niloy__ has joined the channel [10:16] ph^ has joined the channel [10:18] sz0 has joined the channel [10:19] rgl has joined the channel [10:19] rgl has joined the channel [10:23] icebox: thanks https://github.com/substack/dnode/issues/88 [10:25] chvid has joined the channel [10:26] satyr has joined the channel [10:26] ph^ has joined the channel [10:31] savadi has joined the channel [10:31] benvie: jaj [10:31] benvie: hah [10:32] benvie: I reimplemented all of node's REPL, half of node's RLI, and a quarter of TTY in the meantime [10:33] benvie: I'm not even going to try and get most of it pulled back in [10:33] stagas_ has joined the channel [10:33] mafiya1125 has joined the channel [10:33] robotmay has joined the channel [10:34] mafiya1125: does anyone know where there is a good tutorial for creating a web server, I've only been able to really find "hello world" ones nothing in depth [10:34] ccorda has joined the channel [10:34] benvie: node's own docs are the best examples I know of generally http://nodejs.org/docs/latest/api/http.html [10:35] benvie: all other examples complicate it more than its worth for learning [10:37] benvie: var http = require('http'); http.createServer(function(newClient){ console.log(newClient) }).listen(8080); //port [10:39] mafiya1125: benvie: the trouble I'm having is trying to figure out how to do all the routing [10:39] benvie: so your have a request and you want to make to go somewhere useful based on a ruleset? [10:41] dr0id has joined the channel [10:41] mafiya1125: lets say i have index page, and from index they can go to contact, they click a link how do i get it to do that [10:44] josh-k has joined the channel [10:46] defied has joined the channel [10:46] jbpros has joined the channel [10:47] stagas has joined the channel [10:47] Hanspolo has joined the channel [10:49] benvie: var fs = require('fs'); [10:49] benvie: var http = require('http'); [10:49] benvie: http.createServer(function(request, response){ [10:49] benvie: request.on('data', function(theRequestData){ [10:49] benvie: var text = ''' [10:49] benvie: theRequestData.setEncoding('utf8'); // forces later accesses to get as texts [10:49] benvie: theRequestData.on('data', function(chunk){ [10:49] benvie: text += chunk; //force conversion to utf8 text and concatenation [10:49] benvie: }); [10:49] benvie: }); [10:49] benvie: }) [10:50] Morkel has joined the channel [10:50] benvie: http.listen(portNumber); [10:51] benvie: so at the point before the conversion of the value from a buffer, you need a router [10:51] __doc__ has joined the channel [10:51] __doc__ has joined the channel [10:52] benvie: theRequestData will contain a representation of the request headers, which has the request URI, which is where you interpret the desired route [10:52] benvie: or you just the use a premade lib which handles this all for you [10:53] TheJH has joined the channel [10:56] herbySk has joined the channel [11:01] churp has joined the channel [11:02] stagas has joined the channel [11:03] cognominal has joined the channel [11:03] defied1 has joined the channel [11:05] erichocean has joined the channel [11:07] Nss has joined the channel [11:07] alystair: since node is all async, what's the proper way to deal with standard linear issues that might require 3+ cascades in code... [11:08] robhawkes has joined the channel [11:08] alystair: eg. only so many tabs before it gets silly :P [11:09] Lingerance: Something like async or seq [11:09] benvie: node doea have synchronous represetations of filesystem dara [11:09] Lingerance: ... or feed the events into another event class. [11:09] alystair: seq? [11:10] benvie: every filesystem function has a sync and async form [11:11] Lingerance: It's a module. [11:11] munichlinux has joined the channel [11:11] Nss has joined the channel [11:11] adrianF has joined the channel [11:12] benvie: var someCode = fs.readFileSync('./mycode.js', 'utf8'); vm.runInContext(someCode, vm.createContext()); [11:12] benvie: works synchronously [11:13] misza222 has joined the channel [11:13] superjoe: satyr, I checked out your coco project yesterday. pretty good stuff. I like your "die for dry" principle. [11:13] benvie: I'd die for pie, but not dry [11:13] superjoe: ha [11:14] benvie: I'd rather write terrible undry code, and then write a code generator that makes better code that does the same thing as my original terrible non-dry code [11:15] benvie: oh wait I do that already every time [11:15] jan-- has joined the channel [11:15] benvie: computers write better code than people [11:15] mytrile has joined the channel [11:16] jan-- has joined the channel [11:16] superjoe: computers can't write code [11:17] benvie: but people can give computers relatively instruction sets to generate code [11:17] benvie: and people are terrible are following directions [11:17] dlg: stop this [11:17] superjoe: ok [11:18] benvie: I mean I know, I need to stop compromising the future of mankind, I apologize. I have no intentions of firthering skynet [11:18] benvie: it's hard sometimes [11:18] jan--_ has joined the channel [11:20] lzskiss has joined the channel [11:20] shinuza has joined the channel [11:21] benvie: anyway here's two examples of relatively bad code made with the intention of outputting functinally identical code but more readable/efficient/direct https://github.com/Benvie/node-ffi-tools https://raw.github.com/Benvie/meta-objects/master/examples/partials.js [11:22] booo has joined the channel [11:23] alystair: something about levels of abstraction and turtles all the way down [11:23] BrianE has joined the channel [11:23] benvie: the best code acts like an abstraction but has no compromises [11:24] mehlah has joined the channel [11:29] michaelhartau has joined the channel [11:32] benvie: shoot for the moon and maybe you'll hit the stars [11:32] stagas has joined the channel [11:32] AndreasMadsen has joined the channel [11:34] AndreasMadsen has joined the channel [11:34] insin: don't eat the yellow snow [11:34] benvie: the peep snow is the best [11:35] benvie: http://blog.syracuse.com/dailydose/2009/03/large_0308_yelo_peep.JPG O [11:36] benvie: it captures the combination of indignence and percieved superiority perfectly [11:36] romain_ has joined the channel [11:36] benvie: in a single marshmallow [11:39] bagit has joined the channel [11:42] stagas has joined the channel [11:49] hellp has joined the channel [11:50] hipsters_ has joined the channel [11:51] TheJH has joined the channel [11:51] mAritz has joined the channel [11:52] rachet has joined the channel [11:54] Cromulent has joined the channel [11:54] mAritz1 has joined the channel [11:57] paryz has joined the channel [11:59] gigafied has joined the channel [11:59] foobarbaz has joined the channel [11:59] krebipeti has joined the channel [11:59] krebipeti: hi hi [11:59] krebipeti: anybody home? [12:00] TheJH_ has joined the channel [12:00] nicholasf has joined the channel [12:01] johnhamelink has joined the channel [12:02] krebipeti: i'm a javascript lover, and yet i figure out something called node.js, i've been reading this all day : http://www.nodebeginner.org. [12:03] krebipeti: is there anyone could suggest me a reading? [12:03] krebipeti: i want to develop a real apps with this cool thing... [12:05] krebipeti: i mean i need more about database connection, session handling, templating and more that connected with web development [12:07] zomg: Start coding something [12:07] LeMike has joined the channel [12:07] zomg: That's usually a pretty good way to learn how to use something =) [12:09] krebipeti: yeah, i think that's the only way to master it [12:09] igl: and get inspired by good code, plenty of libs on git out there to learn from [12:09] igl: < remembers printing dojo modules as bed lectures [12:09] igl: ^^ [12:10] krebipeti: but is there something like how to make our code cleaner [12:11] krebipeti: using a html string seems make our code annoying to read [12:11] krebipeti: i mean using html string inside node [12:12] adrianmg has joined the channel [12:12] mytrile has joined the channel [12:14] igl: generate html from a template then [12:14] LarsSmit has joined the channel [12:15] mange has joined the channel [12:19] skm has joined the channel [12:22] stagas has joined the channel [12:25] sidorares has joined the channel [12:32] bradleyg has joined the channel [12:34] larsschenk has joined the channel [12:34] Kunda has joined the channel [12:35] RLa has joined the channel [12:35] larsschenk has joined the channel [12:36] galaxywatcher has joined the channel [12:37] nicholasf has joined the channel [12:37] jhbot: 'When is Node.js a bad choice for a ASP.NET MVC developer?' by Click Ahead http://stackoverflow.com/q/8961087 (tags: asp.net-mvc) [12:38] larsschenk has left the channel [12:39] salva has joined the channel [12:42] mikedeboer has joined the channel [12:45] zaphod1994 has joined the channel [12:46] insin: man, that "strict mode" thread on the mailing list is obnoxious [12:47] stagas has joined the channel [12:49] Codemonkey1991 has joined the channel [12:50] ivic has joined the channel [12:50] Kunda_ has joined the channel [12:51] CarterL has joined the channel [12:57] stagas has joined the channel [12:58] maushu has joined the channel [13:03] Codemonkey1991: A question on how to keep line endings and character encoding the same in all files in a project http://stackoverflow.com/q/8961255/388916 [13:03] bagit has joined the channel [13:03] secoif: insin what's your opinion [13:07] diogogmt has joined the channel [13:07] secoif: krebipeti try using something like jade [13:07] markwubben has joined the channel [13:08] secoif: krebipeti https://github.com/visionmedia/jade + express gives you code presentation separation [13:08] krebipeti: just googling arund and found mustache....which is beter do you think? [13:08] fairwinds has joined the channel [13:08] umren has joined the channel [13:09] secoif: I use handlebars (superset of mustache) on clientside, jade to generate templates on the backend [13:09] gigafied has joined the channel [13:10] galaxywatcher has joined the channel [13:11] larsschenk1 has joined the channel [13:11] secoif: krebipeti depends on your style, I'll being trying out plates on the next project https://github.com/flatiron/plates [13:13] krebipeti: @secoif i'm still confused...which is called client side and server side here in node.js...because from the example that i look at, we just try to make a server isn't it...which is sent html string to client [13:13] larsschenk1 has left the channel [13:13] krebipeti: and in my mind now....how to make this HTML string tidy is using mustache [13:14] krebipeti: so, what do you mean by client side and back end here? [13:14] level09 has joined the channel [13:15] Hanspolo has joined the channel [13:15] secoif: krebipeti it depends whether you render the jade/mustache/whatever template -> html on the serverside and simply send html to the web browser [13:15] webben: krebipeti: typically client = a user agent (e.g. a web browser, an automated agent). backend = behind the webserver [13:15] secoif: krebipeti or send the client a template and let the browser convert the template into html [13:15] ohtogo has joined the channel [13:16] secoif: krebipeti for example, a lot of Backbone applications don't render a lot of html on the serverside [13:16] webben: krebipeti: If in doubt, I'd suggest rendering HTML on the server. [13:16] secoif: krebipeti they send a template with some JSON data and let the browser apply the template to the JSON to make HTML [13:16] webben: (Supports more users in more ways) [13:17] krebipeti: got it secif, getting excited with this stuff [13:17] c4milo has joined the channel [13:17] webben: krebipeti: But it's a good idea to be thinking about how you might reuse some of that code on the client. [13:17] webben: krebipeti: Either by sending the client fragments of HTML or by sending the client data and templates. [13:18] webben: krebipeti: As this can have performance benefits for clients and servers in some situations. [13:18] Vespakoen has joined the channel [13:18] secoif: krebipeti as you're just starting out, probably best to render on server for now [13:18] secoif: maybe. [13:19] mange has joined the channel [13:19] LeMike has joined the channel [13:19] krebipeti: webben + secoif : what is the pro and cons rendering data in client vs server? [13:20] secoif: krebipeti server rendering is simpler, and is how most web apps have been made up until recently [13:20] webben: krebipeti: They aren't mutually exclusive. I'd tend to advise clientside rendering as a progressive enhancement on serverside rendering to improve performance in certain situations. [13:20] webben: krebipeti: Serverside rendering works for more users in more ways, so if I was only going to build one, I'd build that. [13:21] secoif: krebipeti client rendering generally means you need to transfer less data between client and server, as the server only needs to send JSON data and a template, not all data wrapped up in a bunch of html tags [13:21] webben: krebipeti: e.g. some users will distrust your JS, or need to disable your JS when it causes them problems, or use clients that don't execute your JS (such as Lynx or Google). [13:22] webben: krebipeti: For example, my organisation uses Google Spreadsheets - a lot. [13:22] secoif: webben krebipeti the number of people who don't execute javascript is less than IE5 users [13:23] secoif: s/IE5/IE6 [13:23] krebipeti: i see [13:23] webben: krebipeti: It's a serious pain in the neck that I can't access Google Spreadsheets on a remote server and download CSVs... [13:23] krebipeti: but how does the client interpret our design?? [13:23] secoif: webben X11 [13:23] webben: krebipeti: For example, the way Google suggests making JS-dependent apps searchable is to render some HTML. [13:24] secoif: webben google crawler executes JS these days [13:24] webben: secoif: I don't want to install X11 on a remote server just to access Google Spreadsheets, ta. [13:24] webben: secoif: No. [13:24] secoif: ha [13:24] webben: krebipeti: http://code.google.com/web/ajaxcrawling/docs/getting-started.html "HTML Snapshots" [13:24] krebipeti: on the way sir [13:25] N0va` has joined the channel [13:26] webben: krebipeti: Or again, many (well let's face it: most) JS programmers are utterly incompetent at dealing with user's accessibility problems, so at least ensuring apps work without JS can help (although not an excuse for failing in the first place). [13:26] secoif: webben I stand corrected. [13:27] webben: As we can see, disabling JS is not a boolean operation - e.g. most of the time I am using Chrome which runs Google Spreadsheets fine ... other times, I'm trying to use their service from ELinks. [13:27] secoif: webben http://code.google.com/apis/documents/ [13:28] secoif: webben if you really wanted you could suck them down via an api call… [13:28] webben: secoif: Yeah, I realize I could write a Java client or install yet more random code on my servers; I'm not going to do that. [13:28] secoif: fair enough [13:29] evangenieur has joined the channel [13:29] webben: secoif: (My workaround in practice is to download locally and scp.) [13:30] Hanspolo has joined the channel [13:30] webben: krebipeti: Or again, take NoScript: http://noscript.net/ a fairly popular Fx addon [13:30] secoif: webben you could probably set up something to email them to you [13:30] Swizec_ has joined the channel [13:31] webben: krebipeti: Allows selective enabling of scripts from domains you trust on sites your trust. [13:31] webben: Google has built up a lot of (questionably deserved) trust; your site probably hasn't (yet). ;) [13:33] tobias has joined the channel [13:34] webben: Another way to look at it is: if you begin with a web application expressed a series of interactive documents, then you have a webservice API out of the box. [13:35] webben: (This is one of Fielding's critical observations.) [13:35] krebipeti: the conclusion is : on client side rendering, there will be a js that sent which has function to translate the template and json data into HTML layout. am i right? [13:35] webben: you don't have to require users to use tools like a Java SDK! just to pull down a document and use it. [13:36] qsobad has joined the channel [13:36] secoif: krebipeti yes, and that js would be mustache or whatever template tool you use [13:36] webben: krebipeti: yeah, in clientside rendering data is transformed to HTML on the client. [13:36] webben: krebipeti: In serverside rendering data is transformed to HTML on the server. [13:37] krebipeti: phew...i almost lost when you sent me http://code.google.com/web/ajaxcrawling/docs/getting-started.html [13:37] krebipeti: haha kidding [13:37] krebipeti: but thx man...you guys really a great help... [13:37] krebipeti: i will try to code first [13:39] secoif: krebipeti look at Backbone/Spine/Knockout etc if you're interested in client-side rendering. Even if you dont' use these, they'll show you some best practices stuff [13:40] secoif: webben what kind of stuff are you building [13:41] Kunda has joined the channel [13:41] satyr has joined the channel [13:44] cryptix has joined the channel [13:45] mehlah has joined the channel [13:47] cryptix has joined the channel [13:48] webben: secoif: I'm not using NodeJS atm. HATEOAS webservice (for quizzes that derive information about audience) with JSON alternatives for each resource. Progressively enhanced to do more clientside rendering in browsers supporting the history API. [13:49] sqlserverio: Ok, I'm trying to use cluster in node 0.6.7. It says to export your main app. var app = module.exports = express.createServer();? When I then tray and call cluster(app) in my server.js file I get object not a function [13:49] secoif: webben that sounds pretty interesting, what's the stack? [13:49] Kunda has joined the channel [13:49] webben: secoif: (The history API means that JS-enhanced URLs are the same as static URLs, unlike the crazy hash bang stuff Twitter has going on ;) ). [13:51] secoif: webben yeah though you can't do pushstate in many browsers, while you can do hashbangs in almost all [13:51] ovaillancourt has joined the channel [13:51] webben: secoif: Homemade OOP PHP core library; homemade OOP PHP webservice frontend using Twig for HTML templating; bits of Java and Hive in the backend. [13:51] webben: secoif: Yeah because we progressively enhance we just fallback to static HTML in old IE. [13:51] secoif: ACTION looks at Twig [13:51] unomi has joined the channel [13:52] webben: on balance I don't especially recommend Twig _if_ you might want to use your templates clientside; you'd need to write your own JS Twig implementation. [13:52] blup has joined the channel [13:52] secoif: ah I see. yes. [13:53] secoif: reminds be a bit of smarty [13:53] webben: more like Django's templating language than smarty [13:53] webben: tries to avoid reinventing PHP inside PHP [13:53] secoif: I see [13:53] secoif: wow the smarty site is looking a tad dated http://www.smarty.net/ [13:54] webben: I mean I say we progressively enhance; we do redirect IE6 users to an unsupported browsers page (not my call). [13:54] secoif: anyway, I g2g, seeya later [13:54] _pickels has joined the channel [13:54] secoif: webben whoa [13:54] secoif: full on [13:54] kriszyp has joined the channel [13:54] webben: it's not a decision that made sense to me - there are plenty of IE6 users in our userbase [13:54] rowanu has joined the channel [13:55] webben: (and the only reason to do it was IE6's thoroughly broken