[00:00] Spencer__: sorry im new to node.js, i just downloaded cygwin to install it and i want to use it as a socket server between C++ and Flash [00:00] drudge: good luck [00:00] Spencer__: i dont know where the files end up after i got them from github [00:01] kristsk: why expose .js files on web? [00:01] timmywil_ has joined the channel [00:02] Tobsn: kristsk, htdocs/ is next to it [00:02] Tobsn: not above it [00:02] pHcF has joined the channel [00:02] Tobsn: Spencer__, no idea about cygwin [00:02] Spencer__: when i type $ node simpleserver.js it sais Error [00:03] Tobsn: most people here are probably on a mac so they can run it native within the system or use a server [00:03] Tobsn: im sure it doesnt just say "Error" [00:03] Spencer__: : Cannot find modelue '/home/lilfarmer/node/simpleserver.js' [00:03] Spencer__: im on windows 7 [00:03] Tobsn: that has not much to do with the OS [00:04] kristsk: world of pain is where you are at, Spencer__. [00:04] Tobsn: whats modelue?! [00:04] Spencer__: lol, http://labs.blitzagency.com/?p=2634 [00:04] Spencer__: module... sorry [00:04] aw2xcd has joined the channel [00:05] aw2xcd: hello everyone! [00:05] Tobsn: which modules do you include? [00:05] Tobsn: is net the only module? [00:05] Tobsn: which is kinda weird that it doesnt find it [00:05] aw2xcd: been looking for some example code for a file upload, but cant find any [00:06] kristsk: aw2xcd, like with POST request? [00:06] Spencer__: the file is sitting on the desktop right now, i dont know where the /node/ folder is [00:06] blueadept: http://pastie.org/private/qb6osgikhsbjqdzeif96w anyone know why i might be getting this 'product is not defined' even though in my app.get it is clearly defined as 'var product =' ? [00:06] aw2xcd: yea, tryn to use formidablebut it doesnt show how to save the file to the fs [00:06] Tobsn: how did you install it? [00:06] drudge: Linkinus yay [00:07] Tobsn: (i dont even know how cygwin works... i think the last time i tried that out was in 2001) [00:07] Tobsn: drudge, tell me how to close an inspector window [00:07] Spencer__: this is how i installed it https://github.com/joyent/node/wiki/Building-node.js-on-Cygwin-%28Windows%29 [00:07] drudge: in linkinus? [00:07] Tobsn: yeah [00:07] drudge: cmd-i [00:08] Tobsn: it just meeps [00:08] Tobsn: MEEEEP [00:08] Tobsn: when i try to close it [00:08] aw2xcd: Spencer, I had trouble with paths too on ubantu. mine got installer to /local [00:08] Tobsn: i can focus it but i cant close [00:08] drudge: i've never seen that before [00:08] Tobsn: me neither [00:08] Tobsn: it just stays open [00:08] Tobsn: showing me channel details [00:08] drudge: anything in console? [00:08] Tobsn: when i switch it changes content [00:08] mcantelon has left the channel [00:08] Tobsn: nah [00:08] drudge: huh [00:08] Tobsn: its odd [00:08] drudge: do you have detaching enableD? [00:09] Tobsn: dont think so [00:09] Tobsn: if i click the X it meeps too [00:09] drudge: that is pretty nuts [00:09] gazumps has joined the channel [00:09] Tobsn: it doesnt like to be touched. [00:09] Tobsn: ;) [00:09] Tobsn: yeah its odd, very odd [00:09] Tobsn: happend a couple hours ago [00:09] drudge: i'd expect something to log in the console.app [00:09] drudge: since we always log the errors [00:10] Spencer__: thanks aw2xcd that gets me a little closer [00:10] Tobsn: how do i check that? [00:10] thegreatape has joined the channel [00:11] drudge: Tobsn: open Console.app (via spotlight or /Application/Utilities/Console.app [00:11] Tobsn: its open [00:11] beckje01 has joined the channel [00:11] drudge: goto all messages in the sidebar , then search for Linkinus [00:11] Tobsn: which log is it? [00:11] Tobsn: 4/1/11 2:12:25 PM Linkinus[16930] _mthid_copyDeviceInfo(216172782187184128) failed [00:11] drudge: wtf is that o.O [00:12] Tobsn: everything else is pruning [00:12] Tobsn: that fits the time when it happend [00:12] Tobsn: around 5 hours ago [00:12] aw2xcd: spencer, whereis node node: /usr/sbin/node /usr/local/bin/node /usr/local/lib/node [00:12] Tobsn: i even double payed for linkinus [00:12] JianMeng has joined the channel [00:12] Tobsn: so fix it! :P [00:12] Tobsn: hehe [00:12] drudge: haha [00:13] drudge: sample the app in activity monitor when you click the X [00:13] Tobsn: how do i do that at the same time? [00:13] Spencer__: C:/cygwin/home/usr/node [00:14] gazumps has joined the channel [00:14] Tobsn: like when i sample it just grabs a snapshot right? [00:15] Tobsn: how would i be able to click the X and at the same time sample? hehe [00:15] drudge: it should grab a sample of a few seconds [00:15] drudge: to give you enough time to click it [00:17] Tobsn: http://pastebin.com/jYY8cDSJ [00:17] Tobsn: i clicked a couple times [00:17] Tobsn: while it was showing the progress bar [00:18] drudge: well that's not helpful :( [00:18] Tobsn: hehe [00:18] Tobsn: cant find anything? [00:18] drudge: curious, if you enable detaching under prefs > status [00:18] drudge: and you restart, does it persist? [00:18] Tobsn: well if i restart i assume it will be gone [00:18] Tobsn: sure i shouldnt do anything else before i restart? [00:20] tmpvar has joined the channel [00:20] dguttman_ has joined the channel [00:21] marajit has joined the channel [00:22] marajit: .clear [00:22] wirehead has left the channel [00:22] marajit: hi. what can I use to debug server code, express? [00:22] Tobsn: drudge, http://pastebin.com/raw.php?i=a3r7d9JV another one, clicked like crazy as fast as possible [00:23] Tobsn: if that doesnt help well... i guess i just restart and we act like it never happened [00:23] Tobsn: ;) [00:23] yozgrahame has joined the channel [00:24] aw2xcd: Guys, ive installed and reinstalled formidable, but keep getting cannot find module [00:24] aw2xcd: do I have to set a path somewhere> [00:24] k1ttty has joined the channel [00:26] drudge: marajit: node-inspector, express, node debug [00:26] blueadept: http://pastie.org/private/qb6osgikhsbjqdzeif96w anyone know why i might be getting this reference error? the app.get clearly defines it but it's throwing back undefined [00:27] Tobsn: drudge, any last ideas cause if not im restarting the app [00:27] Tobsn: ;) [00:27] drudge: that sample doesn't show much [00:27] Tobsn: hmm [00:27] drudge: i mean i could be an issue with the IPC but the samples don't show it [00:27] tjholowaychuk: blueadept: is products.find() async? [00:27] Tobsn: is there any other way to close such windows? [00:27] Tobsn: or any way to lock them? [00:27] pHcF: anyone interested in helping with https://github.com/pedrofranceschi/Blogode ? [00:27] tjholowaychuk: blueadept: oh I see products is undefined [00:27] samcday: Is it sad that I can jump directly to a node.js core file on github from the address file? :P [00:27] Tobsn: maybe some shortcut i hit [00:28] tjholowaychuk: blueadept: you have "products" not "product" as the key [00:28] Tobsn: pHcF, dont use mysql plz ;) [00:28] pHcF: lol [00:28] Tobsn: :P [00:28] Tobsn: just use mongodb [00:28] tjholowaychuk: blueadept: res.render('products/show', { product: product }) [00:28] pHcF: i dont like mysql too [00:28] drudge: Tobsn: no, cmd-i should toggle the window [00:28] jesusabdullah: I hear mongodb is web scale [00:28] pHcF: the thing is that many people are used to it :/ [00:29] tjholowaychuk: blueadept: or if you have several as an array, res.partial('products/show', products) [00:29] Tobsn: ⁄oh interesting [00:29] Tobsn: the buttons within the window dont work either [00:29] Tobsn: its like the whole thing is locked [00:29] drudge: pHcF: have you seen mysql-oil? [00:29] blueadept: tjholowaychuk: refresh it, i included the find function [00:29] Tobsn: oh it gets even more interesting - if i try to minimize the main window it meeps too [00:29] blueadept: yeah it's an array [00:29] pHcF: drudge: nope [00:29] tjholowaychuk: blueadept: k then try res.partial like i mentioned [00:29] tjholowaychuk: blueadept: render() doesn't handle iteration [00:29] drudge: pHcF: it's on githbu [00:30] tjholowaychuk: partial() does [00:30] drudge: pHcF: it's on github [00:30] blueadept: ah [00:30] blueadept: awesome, let me try it [00:30] pHcF: drudge: oh, seems to be nice :) [00:30] pHcF: i was thinking about creating something like activerecords for nodejs [00:30] drudge: yeah it's pretty nice [00:30] pHcF: but with migrations support [00:30] drudge: if you gotta use mysql :P [00:30] pHcF: nope [00:30] pHcF: hehehe [00:30] drudge: mongoose is nice, check it out [00:31] pHcF: mysql, sqlite [00:31] pHcF: im using mongoose [00:31] Tobsn: yep [00:31] Tobsn: do mongoose [00:31] Tobsn: kthx [00:31] Tobsn: lol yeah the part button meeps too [00:31] pengwynn has joined the channel [00:31] marajit: :drudge thanks [00:31] Tobsn: its like its waiting for some sort of input fomr another higher window [00:31] blueadept: awesome, res.render('products/show', { product: product }) worked [00:32] blueadept: i didnt need the locals set [00:32] blueadept: thanks tjholowaychuk [00:32] Me1000 has joined the channel [00:32] drudge: Tobsn: but it's not :P [00:32] Tobsn: yeah but it acts like it [00:32] Tobsn: i cant even close or minimize linkinus itself [00:32] Tobsn: it blocks the whole thing [00:32] Tobsn: yep [00:32] Tobsn: linkinus X button meeps [00:32] drudge: wow [00:33] Tobsn: i tell you, something is waiting for input [00:33] Tobsn: man thats odd [00:33] drudge: it sounds like IPC is fucked [00:33] Tobsn: yep [00:33] Tobsn: but i bet i caused that [00:33] Tobsn: i hit some shortcuts within linkinus by accident [00:33] drudge: if you can replicate it i'd be really curious :) [00:33] Tobsn: i bet i cant haha [00:33] drudge: you can enable detach and restart the UI [00:34] drudge: you shouldn't lose anything, including your connections to irc [00:34] Tobsn: if i right click the channel tabs all options are greyed out [00:34] matt729 has joined the channel [00:34] drudge: yeah that sounds like IPC isn't communicating [00:34] Tobsn: also on the query tabs [00:34] drudge: between agent and UI [00:35] Tobsn: but its still updating the inspector window [00:35] Tobsn: when i switch tabs [00:35] drudge: yeah and still sending messages [00:35] drudge: yet it thinks it's not connected.. [00:35] Tobsn: and context within right nick list works too [00:35] Tobsn: also context within chat window [00:36] Tobsn: whatever, im going to restart [00:36] [[zzz]] has joined the channel [00:36] Tobsn: lol, right click on dock > quit > nothing. [00:36] Tobsn: hehe [00:36] Tobsn: *force [00:36] drudge: if you enabled detaching we could see if it was ipc [00:36] Tobsn: where is that? [00:36] drudge: prefs > status [00:37] langworthy has joined the channel [00:37] Tobsn: prefs are greyed out [00:37] Tobsn: ;) [00:37] Tobsn: hehe [00:37] drudge: haha [00:37] drudge: ok yeah you're fucked then :( [00:37] Tobsn: also registration etc [00:37] Tobsn: only service and hide stuff is enabled [00:37] Tobsn: even quit is greyed out [00:37] drudge: that's like something modal is up [00:37] dizzdiamonds has joined the channel [00:37] Tobsn: yep [00:37] drudge: behind the scenes [00:37] Tobsn: like i said [00:37] Tobsn: its waiting for something higher up [00:37] Tobsn: but there is nothing [00:38] drudge: haven't heard of that happening before [00:38] jimt_ has joined the channel [00:38] isaacs: be afraid. be very afraid: https://github.com/isaacs/node/commit/3fe4afa7f5fb1a52c1a50ef05b47b5935b8149e4 [00:39] isaacs: ryah: that was easier than i expected^ [00:39] Tobsn: http://pastebin.com/raw.php?i=YiA5sC6N [00:39] Tobsn: try that [00:39] tjholowaychuk: isaacs: haha sweet [00:40] tjholowaychuk: isaacs: should node-waf be in there? [00:40] EyePulp: isaacs: that looks like kissing your sister. [00:40] Tobsn: drudge, thats the open files and ports [00:40] Tobsn: there is a security message thing [00:41] EyePulp: maybe cousin... [00:41] drudge: where [00:41] Tobsn: http://pastebin.com/raw.php?i=YiA5sC6N [00:41] Tobsn: /private/var/db/mds/messages/se_SecurityMessages [00:41] Tobsn: dont know if that means anything [00:41] Tobsn: i just looked for "messages"/dialog etc. [00:42] drudge: flash maybe? [00:42] drudge: like an embed [00:42] xbigboss has joined the channel [00:42] Tobsn: hmm maybe [00:43] Tobsn: post something that should be rendered within the chat [00:43] drudge: http://pastie.org/1745837 [00:43] Tobsn: yeah got displayed within [00:43] Tobsn: hmm [00:44] Tobsn: query me a msg [00:44] Tobsn: just a . or something [00:45] copongcopong has joined the channel [00:47] dguttman has joined the channel [00:48] CIA-1: node: 03isaacs 07master * r7ee8c56 10/ test/simple/test-fs-utimes.js : Modify futimes test to allow ENOSYS - http://bit.ly/gElEzK [00:48] JimBastard: hey isaacs , dumb question, is there any easy way to one-line install npm and then have npm install node? [00:48] CIA-1: node: 03isaacs 07v0.4 * r4d64f36 10/ (lib/util.js test/simple/test-console.js): Closes GH-310 Format slashes properly - http://bit.ly/gPaUCI [00:48] CIA-1: node: 03isaacs 07v0.4 * re1a72f0 10/ (lib/fs.js test/simple/test-fs-read-stream.js): [00:48] CIA-1: node: Closes GH-535 Immediate pause/resume race condition [00:48] CIA-1: node: Calling resume() immediately after calling pause() would trigger [00:48] CIA-1: node: a race condition where it would try to read() from a file [00:48] CIA-1: node: descriptor that was already being read from, causing an EBADF - http://bit.ly/gxoYWY [00:48] CIA-1: node: 03isaacs 07v0.4 * r6d85da1 10/ (3 files in 2 dirs): [00:48] CIA-1: node: Closes GH-721 Set default host header properly [00:48] CIA-1: node: However, this test is failing for some quite unrelated issue. [00:48] CIA-1: node: Getting some odd "socket hangup" crashes, and only the first request [00:48] CIA-1: node: ever makes it to the server. - http://bit.ly/i86NFI [00:49] isaacs: JimBastard: no. [00:49] isaacs: JimBastard: you need node to run npm. it's a node program. [00:49] drudge: npm replies on node [00:49] drudge: relies* [00:49] drudge: fucking scotch :( [00:50] italic has joined the channel [00:50] AAA_awright: ...Why would you want to do that? [00:50] italic: what's the difference between using http.Server() instead of http.createServer() ? [00:50] AAA_awright: drudge: There are programs that do exactly that [00:51] drudge: exactly what [00:51] losing has joined the channel [00:51] JimBastard: im working on a CLI tool that im trying to target for users who may not have node installed [00:51] AAA_awright: italic: http.Server doesn't do anything, http.createServer() returns a new instance of http.Server [00:53] AAA_awright: drudge: Install a particular version of Node.js and libraries [00:53] italic: i'm just trying to understand how it works underneath. http.Server() does create something, is it just not a correct instantiated server object? [00:53] tjholowaychuk: italic: AFAIK it's just an ugly version of createServer() [00:53] xbigboss has left the channel [00:54] tjholowaychuk: italic: otherwise the same as new http.Server() [00:54] AAA_awright: Was there a change I didn't see? I haven't compiled in two days [00:54] italic: tjholowaychuk: that's what i was wondering [00:54] Poetro has left the channel [00:55] isaacs: JimBastard: nave, n, and nvm, are pretty handy bootstrappers [00:56] ljackson has joined the channel [00:56] rfay has joined the channel [00:58] vilsonvieira has joined the channel [01:01] ryah: please test this: http://nodejs.org/dist/node-v0.4.5.tar.gz [01:04] charlenopires has joined the channel [01:05] draginx has joined the channel [01:06] Tobsn: btw. [01:06] JimBastard has joined the channel [01:06] Tobsn: # node -v [01:06] Tobsn: v0.5.0-pre [01:06] Tobsn: thats the default package on debian [01:06] JimBastard: hey isaacs , dumb question, is there any easy way to one-line install npm and then have npm install node? [01:06] JimBastard: im working on a CLI tool that im trying to target for users who may not have node installed [01:06] bentruyman has joined the channel [01:06] isaacs: JimBastard: no. [01:06] isaacs: \ [01:06] isaacs: JimBastard: nave, n, and nvm, are pretty handy bootstrappers [01:06] zakabird has joined the channel [01:06] isaacs: JimBastard: you need node to run npm. it's a node program. [01:07] ryah: Tobsn: you sure? [01:07] ryah: Tobsn: which node [01:07] tim has joined the channel [01:07] Tobsn: youre node [01:07] Tobsn: -e [01:07] ryah: `which node` [01:07] tjholowaychuk: haha your node [01:07] davidascher has joined the channel [01:07] Tobsn: ;) [01:07] Tobsn: hmm [01:07] charlenopires_ has joined the channel [01:07] Tobsn: nevermind that [01:08] ryah: Tobsn: thought so [01:08] Tobsn: i do not understand it but its not debian [01:08] Tobsn: ah yeah [01:09] Tobsn: nevermind, debian installs 0.2.6 [01:09] Tobsn: thats why i compiled latest [01:09] Tobsn: forgot about that [01:09] ryah: if ldd `which node` returns 50 lines, it's debian. if it returns the normal ~15 it's our build [01:09] Tobsn: my bad. [01:09] tfe_ has joined the channel [01:09] Tobsn: i was already confsued because debian is normally 2 years behind latest [01:11] alessio_alexAFK has joined the channel [01:12] tim has joined the channel [01:13] techwraith: does creationix hang out here ever? [01:14] techwraith: Got a question about nvm [01:15] sorens3n has joined the channel [01:16] JimBastard: techwraith: usually he's around. you could always just open an issue too [01:19] k1ttty has joined the channel [01:20] techwraith: I was just wondering if there was a way to silence it's output [01:21] [[zz]] has joined the channel [01:25] gazumps has joined the channel [01:25] blueadept: anyone know what' unexpected token "eos"' means? [01:26] dguttman has joined the channel [01:28] Tobsn: blueadept [01:28] Tobsn: end of string? [01:28] EyePulp: so... are double underscore variables a no-no? eg: var __mr__; [01:28] Tobsn: blueadept, it could also be earth orbiting system... [01:28] SubStack: why would you do that? [01:28] Tobsn: cause its fancy [01:29] Tobsn: _-_ [01:29] SubStack: __javascript_is_not_python__ [01:29] SubStack: __no_need_to_do_this__ [01:29] Tobsn: __Y_U_NO_PYTHON__ [01:29] Tobsn: __maybe_underlining_something__ [01:29] Tobsn: wikipedia syntax [01:30] Tobsn: so... are those variable names a no-no? eg: var ~~~mrs~~~; [01:30] Tobsn: ;) [01:31] brianloveswords has joined the channel [01:32] SubStack: well you could, but why? [01:35] blueadept: Tobsn: i'm getting it on this line: input(type='submit') [01:35] mwdev has joined the channel [01:35] blueadept: using jade [01:35] pengwynn has joined the channel [01:36] Tobsn: jade? no idea [01:36] blueadept: ah, yeah its a template engine [01:37] Tobsn: i know [01:37] techwraith: Still haven't found a really good textmate theme, any ideas? [01:37] Tobsn: never used it tough [01:37] Tobsn: textmate? i tried it out... dont like it [01:37] Tobsn: i use komodo with the jslint extension [01:37] Tobsn: that works pretty welll [01:37] techwraith: komodo looks like it works great, but is shit on the eyes imp [01:37] techwraith: *imo [01:37] raidfive has joined the channel [01:38] Tobsn: i change the themes to black background :) [01:38] blueadept: Tobsn: figured it out, was using it with forms, and the formatting for the lines was strict [01:39] Tobsn: ha [01:41] Yuffster has joined the channel [01:41] zorzar has joined the channel [01:42] blueadept: yeah seams sort of a crappy bug [01:42] blueadept: er way of crashing because of just a line break [01:43] blueadept: i guess there was a good reason [01:52] deepthawtz has joined the channel [01:54] thegreatape has joined the channel [01:55] varioust has joined the channel [01:57] ben_alman has joined the channel [01:57] thegreatape has joined the channel [01:59] rook2pawn has joined the channel [02:00] rook2pawn: i want to setup express to serve straight html and also serve the css.. do i just {layout:false} in my render? [02:01] paulrobinson has joined the channel [02:04] bluekite2000_ has joined the channel [02:07] CIA-1: node: 03Ryan Dahl 07v0.4 * r787a343 10/ (ChangeLog doc/index.html src/node_version.h wscript): Bump version to v0.4.5 - http://bit.ly/hJJqP4 [02:07] CIA-1: node: 03Ryan Dahl 07v0.4 * r61d0b5a 10/ src/node_version.h : Now working on version v0.4.6 - http://bit.ly/hMoZJ9 [02:07] xandrews has joined the channel [02:08] tim: rook2pawn did you set a static folder ? [02:08] rook2pawn: ah, no [02:09] tim: you can provide the server a folder to serve static files from [02:12] isaacs has joined the channel [02:13] tim: http://expressjs.com/guide.html#creating-a server [02:13] tim: go there an search for static for an example [02:20] rfay has joined the channel [02:22] flasomm has joined the channel [02:24] themiddleman has joined the channel [02:26] Tobsn: ha [02:26] Tobsn: http://www.mongodb.org/display/DOCS/Geospatial+Indexing [02:26] Tobsn: ever anyone though about that this means you can save 1,000,000,000 * 1,000,000,000 datapoints [02:27] Tobsn: on a 2d square [02:31] techwraith: Tobsn: What usecase were you thinking of? [02:31] Tobsn: i have no idea [02:31] Tobsn: 1,000,000,000,000,000,000 datapoints on a square [02:31] Tobsn: with the capability of doing a distance search build in [02:32] techwraith: Tobsn: I wonder if that would be faster than 1,000,000,000,000,000,000 in a regular list... [02:32] Tobsn: i think so [02:32] Tobsn: cause its a 2d map [02:32] Tobsn: well at least as fast as inserting two ints [02:32] Tobsn: if you select a single point [02:33] techwraith: I think it would probably work best with things that have an x -> y relationship [02:33] techwraith: I wonder if it would work for storing analytics: y = event id, x = time [02:34] kmiyashiro has joined the channel [02:34] Tobsn: or a 6.25 × 1016 size big image assuming you need 8 bits per pixel [02:34] techwraith: lol [02:34] Tobsn: 10^16 [02:35] techwraith: I've been contemplating using it for the obvious use case: a map for a game [02:35] Tobsn: well it only gives you a benefit if you need distances [02:35] techwraith: I would :) [02:35] Tobsn: but yeah a game map would be obviously interesting [02:35] Tobsn: you can even go 3d [02:35] Tobsn: with more than one collection [02:35] techwraith: Yeah, that's what I was hoping [02:36] Tobsn: wait no the image thing is retarded [02:36] techwraith: lol, I wonder if I could do Minecraft in Mongo, Node, and Canvas [02:36] Tobsn: you can save a imagine the size of 1,000,000,000 * 1,000,000,000 pixels [02:36] Tobsn: yeah [02:36] Tobsn: you could index every single block [02:36] techwraith: That was the plan, lol [02:36] Tobsn: you could calculate travel distance over layers [02:37] techwraith: Not to mention use it for visibility [02:37] Tobsn: hmm? [02:37] techwraith: Say I'm standing somewhere, I need to mark all blocks within x as visible [02:37] techwraith: easy to do with a geo-spacial db [02:38] techwraith: db.blocks.find( { loc : { $near : [50,50] , $maxDistance : 128 } } ) [02:39] Tobsn: well i think the map format is accessable [02:39] Tobsn: cause there are all those tools [02:40] Tobsn: the only problem is that minecraft maps are endless [02:40] techwraith: Yeah, but I wanted to write a clone from scratch :) [02:40] Tobsn: lol [02:40] Tobsn: but it would get complicated hehe [02:40] Tobsn: if its 200 blocks high [02:40] techwraith: And make it massively multiplayer [02:40] Tobsn: you need 200 collections [02:41] Tobsn: well it wouldnt be massive [02:41] Tobsn: cause 1,000,000,000 times 1,000,000,000 blocks isnt that big i think [02:41] techwraith: Yeah, minecraft is 128 high :) [02:41] techwraith: that's 1 billion meters by 1 billion meters [02:41] techwraith: almost 500x the size of the earth [02:41] techwraith: lol [02:41] Tobsn: yep [02:42] Tobsn: hmm [02:42] techwraith: I think that's probably large enough [02:42] Tobsn: http://www.minecraftwiki.net/wiki/Map [02:43] Tobsn: n Infdev, Alpha and Beta maps are not infinitely big. They are made up of chunks; as the player explores the map distant chunks are generated automatically, leading to theoretically infinite maps. In practice, technical reasons force the maximum map size to 8 times the surface area of the Earth [02:43] techwraith: Yeah, I've read this one before :) - it's actually a pretty good way of going about it [02:44] techwraith: The procedural generation is what appeals most to me [02:46] willwhite has joined the channel [02:46] Tobsn: one of my friends started building on a minecraft hosting platform [02:46] techwraith: lmao, I was thinking about doing that [02:47] techwraith: I was going to build a social network around it to, so you can keep different "characters" in different worlds [02:47] pengwynn has joined the channel [02:47] Tobsn: hehe [02:47] Tobsn: well hes pure about the hosting [02:47] Tobsn: hes building some crazy shit around ec2 [02:48] techwraith: Yeah, ec2 is the way to go [02:48] Tobsn: like something about creating one virtual machine over many [02:48] Tobsn: i couldnt follow [02:48] Tobsn: but hes all into that vm stuff [02:48] Tobsn: i really wonder what to do with that 2d stuff [02:48] Tobsn: hmm [02:52] __directory has joined the channel [02:52] pkrumins: that's right. nodejs. [02:52] techwraith: ? [02:53] Tobsn: actually [02:53] Tobsn: techwraith [02:54] Tobsn: 255 036 000 000 x 255 036 000 000 [02:54] Tobsn: is earth [02:54] thegreatape has joined the channel [02:54] Tobsn: in meters [02:54] muk_mb has joined the channel [02:55] hosh_work has joined the channel [02:56] Tobsn: well only 30% is land [02:56] techwraith: really? [02:56] techwraith: hm [02:56] Tobsn: so you could actually store every meter of land in mongodb :P [02:56] Tobsn: yep [02:56] Tobsn: earth is huge [02:56] Tobsn: haha [02:57] thegreatape has joined the channel [02:57] Tobsn: so if you want to save every single square meter on earth you need 3 collections [02:57] Tobsn: hehe [02:58] techwraith: It's only 22,585 x 22,585 [02:58] Tobsn: hmm? [02:58] Tobsn: 510 million square kilometers is the earths surface [02:59] techwraith: 5.1×108 km2 [02:59] Tobsn: ? [02:59] eventi has joined the channel [02:59] Tobsn: 10^8 = [02:59] Tobsn: ? [03:00] techwraith: There we go: 510,072,000 km2 [03:00] techwraith: lol [03:00] Tobsn: yeah thats what i said [03:00] Tobsn: oh [03:00] techwraith: http://www.google.com/search?aq=f&sourceid=chrome&ie=UTF-8&q=square+root+of+510%2C072%2C000 [03:00] Tobsn: youre right [03:00] Tobsn: i did it wrong [03:00] kaichen has joined the channel [03:01] techwraith: Basically, we could store quite a few earths in mongo ;) [03:01] Tobsn: hmm [03:01] techwraith: about 44k earths to be exact [03:02] Tobsn: so you could store 44k earth maps next to each other [03:03] techwraith: or you could make an earth cube by making 22,584 collections and making a 3d geospacial db [03:03] Tobsn: 6,384,404 meters meters deep [03:03] Tobsn: so you could store the depth too [03:03] techwraith: Yep :) [03:03] Tobsn: no you need only one collection [03:03] techwraith: Oh, I see what you're saying [03:04] Tobsn: you just layers next to each other on one map [03:04] Tobsn: *lay out layers [03:04] techwraith: it would be difficult to figure out distance from that though [03:04] ben_alman has joined the channel [03:04] Tobsn: esp because its a sphere hehe [03:04] techwraith: e.g. how far is it from the top of everest to the bottom of the ocean [03:05] Tobsn: on the other side [03:05] Tobsn: haha [03:05] techwraith: yeah, exactly [03:05] Tobsn: i bet there are ways to do that [03:06] Tobsn: oh yeah [03:06] Tobsn: easy [03:06] Tobsn: you know width and height of each map, cause theyare all the same [03:06] Tobsn: you also know that you start at earth center to the top of the mountains [03:07] Tobsn: so by x/y coords you know how many lines of layers youre down and how many layers youre to the right [03:07] Tobsn: you just devide by the width and height [03:07] Tobsn: and than you have the distance in height [03:07] techwraith: yeah, that would work I think [03:07] Tobsn: you could even triangle from that [03:08] Tobsn: still no use case here hehe [03:08] techwraith: I think I'm going to stick with a square world, lol [03:08] Tobsn: oh [03:08] Tobsn: wait a minute [03:08] Tobsn: its 22,000 x 22,000 something right? [03:08] techwraith: yeah [03:09] Tobsn: 22,000,000,000 would be in milimeters ;) [03:09] Tobsn: you could index every single millimeter on earth [03:09] techwraith: lol [03:09] techwraith: you could [03:09] Tobsn: see that would be a great GPS [03:09] techwraith: filling that up with data sounds hellish [03:09] techwraith: lol [03:09] Tobsn: problem would be the 3d thing [03:10] samcday: You people scare me with your crazy talk! [03:10] Tobsn: you would need 6,000,000,000,000 collections [03:10] xiackok has joined the channel [03:11] Tobsn: and that would save every single cubic millimeter [03:11] techwraith: I think that might be a little past the sharding limit [03:11] Tobsn: probably... [03:11] xiackok: hi [03:11] techwraith: hi there! [03:11] Tobsn: you could save the depth per object [03:11] Tobsn: as an int [03:11] Tobsn: bigint [03:11] Tobsn: well [03:11] Tobsn: there ya go [03:12] Tobsn: but you only have 10 units per cubic millimeter [03:12] Tobsn: where 0 is air and 1 is water [03:12] Tobsn: obviously [03:12] kaichenxyz has joined the channel [03:13] xiackok has left the channel [03:13] Tobsn: 115 elements are there right? [03:13] Tobsn: hmm ;) [03:13] techwraith: yeah, that would work, but what would be best is this db.places.find( { loc : [50,50, 50] } ) [03:14] techwraith: xyz axis :) [03:15] Tobsn: nah you need [03:15] Tobsn: 50,50 and also depth [03:15] Tobsn: and from depth you read the position of the bigint [03:15] Tobsn: tostring and than [$depth] [03:15] Tobsn: ;) [03:16] techwraith: Yeah, that would work, but it would be faster if the db handled everythin [03:16] ashc has joined the channel [03:16] Tobsn: 9223372036854775807 + 9223372036854775807 is a bigint [03:16] Tobsn: 18446744073709551615 [03:17] Tobsn: 18,446,744,073,709,551,615 [03:18] techwraith: v8:[18,446,744,073,709,551,615].join("'").toInt(); [03:18] v8bot: techwraith: TypeError: Object 18'446'744'59'709'551'615 has no method 'toInt' [03:18] techwraith: v8:[18,446,744,073,709,551,615].join("'").toNumber(); [03:18] v8bot: techwraith: TypeError: Object 18'446'744'59'709'551'615 has no method 'toNumber' [03:18] doubletap has joined the channel [03:18] Tobsn: ah wait a minute [03:18] Tobsn: i was wrong [03:19] Tobsn: there are only 10mm in a cm [03:19] mscdex: heh [03:19] mscdex: ACTION shakes a fist at the metric system [03:20] Tobsn: so 6000 meter deep is 6,000,000 milimeters [03:20] Tobsn: thats so you could give every depth milimeter 2 digits in a bigint [03:21] Tobsn: means 00 to 99 [03:21] techwraith: So this is a bit of an issue: [03:21] techwraith: v8: parseInt([ 18, 446, 744, 073, 709, 551, 615 ].join("")) [03:21] v8bot: techwraith: 1844674459709551600 [03:22] Tobsn: hmm? [03:23] techwraith: JS can't handle numbers that big :) [03:23] Tobsn: well [03:23] Tobsn: 1844674459709551600 [03:23] Tobsn: is also enough [03:23] Tobsn: you have to take away the one and the last two numbers anyway [03:24] Tobsn: oh no [03:24] Tobsn: youre right [03:24] Tobsn: ah no its okay [03:25] Tobsn: parseInt([ 17,12,34,56,78,90,12,34,56,78 ].join("")) [03:25] Tobsn: v8: parseInt([ 17,12,34,56,78,90,12,34,56,78 ].join("")) [03:25] v8bot: Tobsn: 17123456789012345000 [03:25] Tobsn: hmm [03:25] Tobsn: v8: parseInt([ 16,12,34,56,78,90,12,34,56,78 ].join("")) [03:25] v8bot: Tobsn: 16123456789012345000 [03:25] Tobsn: something broken [03:25] Tobsn: hehe [03:26] Tobsn: anyway, if you lead with 17 you can save 99999999999999 all the way down [03:27] Gotham has joined the channel [03:27] Gotham: sup nodists [03:27] techwraith: n/ [03:28] xiackok has joined the channel [03:29] Tobsn: nah wait thats retarded... [03:29] Tobsn: you need a string with a length of 6,000,000 chars [03:30] Tobsn: ascii has 127 characters ;) [03:30] JimBastard has joined the channel [03:31] Tobsn: so with a string of the length of 6m characters you could store every element in each character of each milimeter [03:32] Tobsn: anyway [03:33] Gotham: Node.js is now te defacto platform for running Javascript on the server-side. [03:35] Tobsn: is it? [03:35] Tobsn: wasnt it like a year ago already? :P [03:37] Spion__ has joined the channel [03:38] JimBastard: does anyone know how to enable auto-complete for a node CLI tool? i see the tty module, but i dont want to spawn a node app first. i want to autocomplete arguments on the initial run. something like a node binding for readline. [03:38] JimBastard: like: http://cc.byexamples.com/2008/06/16/gnu-readline-implement-custom-auto-complete/ [03:38] JimBastard: i think it might be more of a linux question if anything [03:38] Tobsn: yeah [03:38] Tobsn: more of a C question [03:39] Gotham: We should get Madonna to back node.js [03:39] Tobsn: like gaga google? [03:40] Gotham: Lady Gaga too. Then we can topple the PHP bozos. :) [03:40] Tobsn: just go to adly and buy a tweet from someone famous [03:40] adlan has joined the channel [03:40] Tobsn: i think its like 5k to get someone like seth green tweet for you [03:40] Tobsn: probably 50k for team sheen [03:41] Tobsn: ;) [03:41] Gotham: I need Madonna or Gaga :) [03:41] harth has joined the channel [03:42] Tobsn: lemme see [03:42] Gotham: How dumb do people have to be to be influenced by such endorsements though. [03:42] Gotham: ACTION wonders about mankind sometimes :-\ [03:42] pauls: Gotham++ [03:42] v8bot: pauls has given a beer to Gotham. Gotham now has 1 beers. [03:43] ncb000gt has joined the channel [03:43] Gotham: They have Mark Cuba haha [03:43] Tobsn: ha [03:43] Tobsn: they killed my old account [03:43] Tobsn: bastards. [03:44] Tobsn: Gotham [03:44] Tobsn: http://ad.ly/celebrities/celebrities-on-ad-ly/ [03:44] Tobsn: just pick one [03:45] Tobsn: uh [03:45] Tobsn: page 2 [03:45] Tobsn: snookie [03:45] Tobsn: ;) [03:46] Gotham: ad.ly may be clever, but they are using php: X-Powered-By:PHP/5.3.2-1ubuntu4.5 [03:46] Tobsn: hehe [03:46] Tobsn: nah they arent clever [03:46] sor3nsen has joined the channel [03:46] Tobsn: its kinda retarded too [03:46] Gotham: And Apache yeah [03:46] Tobsn: when i signed up in their starting phase they already had some crazy celebs [03:46] Tobsn: but the prices were already nuts [03:46] cloudhead has joined the channel [03:47] mbrochh has joined the channel [03:47] Tobsn: now you probably need to pay 60k+ for a single tweet from one of the top 10 celebs [03:47] Tobsn: http://www.businessinsider.com/chart-of-the-day-how-many-users-does-twitter-really-have-2011-3 [03:47] Tobsn: but [03:47] gmarcus has joined the channel [03:47] Tobsn: you probably reach a lot based on the chart [03:48] ryan[WIN] has joined the channel [03:48] Tobsn: or the other way around [03:49] gmarcus: jsdom question: jsdom/lib/jsdom/level2/languages/javascript.js:17:14 error. Cannot call method 'runInContext' of undefined. anyone? [03:49] Gotham: They don't have Madonna. :) [03:49] Tobsn: yep [03:49] gmarcus: why is this call returning something undefined: process.binding('evals').Script; [03:50] Gotham: ACTION would never sell his tweets [03:50] doubletap has left the channel [03:51] Gotham: I imagine it now: "Hey yo sup my friends... check out this awesome penis enlargement syrup." [03:52] ashc has joined the channel [03:54] ncb000gt: Gotham: stop retweeting my tweets in here... [03:54] Gotham: lol [03:55] willwhite has joined the channel [03:55] phluffy has joined the channel [03:56] blueadept: would anyone might now why my POST method isn't going through with this code? http://pastie.org/private/gf1inbbpncvrcmqfhhjz2q [03:56] ncb000gt: blueadept: you're attaching a function to a put [03:56] Gotham: Ivanka Trump is on there too haha. I don't need this service for here though -- I know her already [03:57] ncb000gt: so if the http method is PUT, your callback will be triggered [03:57] ncb000gt: blueadept: try changing that to app.post( [03:57] blueadept: hm, let me check [03:57] gmarcus: anyone know why process.binding('evals').Script is undefined? [03:58] blueadept: awesome [03:58] blueadept: thanks ncb000gt! [03:58] robtmr has joined the channel [03:58] ncb000gt: gmarcus: it's not for me [03:58] ncb000gt: gmarcus: which version of node are you using? [03:58] ncb000gt: blueadept: glad to help :) [03:59] gmarcus: ncb000gt using v0.5.0-pre [03:59] ncb000gt: gmarcus: hmmm [03:59] ncb000gt: i just built 0.4.5 [03:59] ncb000gt: i'll build master [03:59] shiawuen has joined the channel [04:00] shiawuen has joined the channel [04:00] gmarcus: ncb000gt: thanks. trying to get the "crawler" package to work [04:00] ncb000gt: gmarcus: gotcha, do you need to be running on pre-0.5.0? [04:01] gmarcus: ncb000gt: no...but I just built node today from git. What do you suggest? [04:01] mhooker has joined the channel [04:01] phluffy: can anyone with experience in the mysql module (node-mysql by felixge take a look at this and help me figure out why it is failing, please? https://gist.github.com/899220 [04:02] ncb000gt: gmarcus: process.binding('evals').NodeScript [04:02] ncb000gt: :) [04:02] gmarcus: ncb000gt: will try that now [04:02] ncb000gt: i guess they decided to change the namespacing? [04:03] sivy has joined the channel [04:03] Tobsn: phluffy, look at the example [04:04] ncb000gt: phluffy: you sure the insert worked? [04:04] phluffy: yes [04:04] ncb000gt: did you verify it with mysql on the command line? [04:04] Tobsn: phluffy, use SET thats easier [04:04] Tobsn: INSERT INTO table SET field = "something" [04:04] phluffy: yes - it seems I only have the problem with select statements [04:04] Tobsn: i think its your function [04:05] Tobsn: try [04:05] phluffy: I took it straight from the example - [04:05] Tobsn: query( 'SELECT * FROM test', [], function(err){} ) [04:05] meso_ has joined the channel [04:05] phluffy: i bet that's it, Tobsn jus a sec [04:05] libc\x2Eso has joined the channel [04:06] phluffy: i looked at the constructor and saw that something was missing [04:06] Tobsn: well its [04:06] gmarcus: ncb000gt: wow...NodeScript worked. thanks! [04:06] Tobsn: query, params, callback [04:06] ncb000gt: gmarcus: cool :) [04:06] Tobsn: in the examples there is one that only has the callback [04:06] Tobsn: but the callback also only has "err" and not "fields" and other stuff you have in there.. i guess it wouldnt matter but who knows... [04:07] ncb000gt: Tobsn: in the code it checks to see if params is there, if it is then it uses it, if it's not an array then it sets cb, the callback, to be whatever the second argument was [04:07] Tobsn: yeah i assumed that [04:07] ncb000gt: so i doubt that'll be it unless there is bug in that code [04:07] ncb000gt: however, it might fix the problem [04:07] ncb000gt: ;D [04:07] Tobsn: see! [04:07] Tobsn: ;) [04:07] ncb000gt: but hide something else [04:07] phluffy: no change :( [04:07] Tobsn: always go strict first [04:07] ncb000gt: heh [04:07] Tobsn: no change? [04:07] Tobsn: copy that error [04:08] ncb000gt: Tobsn: boo hiss... just jump to conclusions, more fun that way! [04:08] Tobsn: hehe [04:08] phluffy: no, i still get 'Illegal instruction' - that's all I get [04:08] Tobsn: hmm [04:08] Tobsn: remove all the other stuff [04:08] Tobsn: and do only query( 'SELECT * FROM data' ) [04:08] pkrumins: can't wait for jsbbq [04:08] Tobsn: erm [04:08] Tobsn: FROM test [04:08] phluffy: yeah - tried that too and got the same [04:09] Tobsn: do the same in the command line [04:09] Tobsn: on mysql client [04:09] Tobsn: and see what that thing says [04:09] ncb000gt: yea [04:09] ncb000gt: was just about to say the same [04:09] phluffy: it gives me the table [04:09] Tobsn: hmm [04:09] Tobsn: same user? [04:09] ncb000gt: pkrumins: where at? [04:09] phluffy: well - select * from test... data is a col [04:10] Tobsn: same user as in the script? [04:10] phluffy: in the mysql cli [04:10] phluffy: yes [04:10] Tobsn: sure? [04:10] ncb000gt: I doubt the example would have the real l/p [04:10] phluffy: yes - positive [04:10] Tobsn: well [04:10] ncb000gt: probably his user [04:10] Tobsn: go into the module and start debugging ;) [04:10] ncb000gt: haha [04:10] matschaffer has joined the channel [04:11] Tobsn: just put some console.logs into the query function [04:11] Tobsn: and see what happens [04:11] phluffy: maybe there is an easier to use module for basic mysql? [04:11] Tobsn: well [04:11] ncb000gt: phluffy: what version of mysql are you using? [04:11] Tobsn: that is basic mysql [04:13] Tobsn: 5.0 something i bet [04:16] xandrews has joined the channel [04:17] Validatorian has joined the channel [04:18] seivan has joined the channel [04:18] Croms: Can someone tell me why url.parse(request.url).protocol returns undefined? [04:19] Tobsn: hehhe [04:19] heythisisdave has joined the channel [04:20] Tobsn: isaacs! [04:20] ruggedcoder has joined the channel [04:20] Tobsn: croms, https://github.com/joyent/node/issues/225 [04:20] Tobsn: whats your url look like? [04:21] Croms: Tobsn: http://127.0.0.1/ [04:21] Tobsn: you sure? [04:22] Tobsn: no weird characters in front of it [04:22] ncb000gt: Croms: which version of node? [04:22] gozala has joined the channel [04:22] Croms: v0.4.3 [04:23] Croms: one sec, let me check something real quick [04:23] pkrumins: i wonder why nodejs website says 0.4.5 [04:23] pkrumins: near docs [04:23] Tobsn: https://github.com/joyent/node/blob/master/lib/url.js [04:23] ncb000gt: pkrumins: 0.4.5 was released [04:23] ncb000gt: :) [04:24] ncb000gt: pkrumins: http://blog.nodejs.org/2011/04/02/node-v0-4-5/ [04:24] Tobsn: croms, only way that fails is if you have something in it that doesnt fit the regex in the source [04:24] ckknight has joined the channel [04:24] Tobsn: protocolPattern = /^([a-z0-9]+:)/ [04:24] pkrumins: awesome [04:24] pkrumins: we're still at 0.4.0 [04:24] ckknight: hey beautiful people [04:25] Croms: I'm probably doing something wrong [04:25] ncb000gt: Croms: strange [04:25] ncb000gt: it works for me [04:25] ncb000gt: on 0.4.3 [04:25] ncb000gt: are you sure that request.url is defined? [04:25] Tobsn: yeah you might cant access it ith .protocol [04:25] ncb000gt: console.log it just before that line [04:25] Croms: What do you get when you guys do console.log(request.url);? [04:25] Croms: I just get " [04:25] Croms: "/" [04:26] ncb000gt: Croms: are you using something like express? [04:26] Croms: No, just plain vanilla Node. [04:26] ncb000gt: ok [04:27] Croms: url.parse(request.url).pathname works fine [04:27] Tobsn: erm [04:27] Tobsn: which module is that [04:27] Gotham: Default [04:27] Croms: No modules, just regular Node. [04:27] Tobsn: hmm i thought so too [04:27] Tobsn: ah nevermind [04:27] Tobsn: im doing it in the shell [04:27] Tobsn: *dah [04:28] ncb000gt: Croms: i get the same for request.url [04:28] Croms: I remember someone had the same thing a few weeks ago. [04:28] Tobsn: request.uri? [04:29] Tobsn: http://nodejs.org/docs/v0.3.1/api/http.html#http.ServerRequest [04:29] Tobsn: yep [04:29] Tobsn: url is only path [04:31] bluekite2000_ has joined the channel [04:31] Tobsn: well request is the request [04:31] ncb000gt: Croms: why do you need the full piece? [04:31] Croms: Alrighty, so it's supposed to be just the path. [04:31] ashc has joined the channel [04:31] Croms: ncb000gt: Need to do some forwarding. [04:31] Tobsn: i guess request is coming from the request header... "host:" is in the header... [04:32] ncb000gt: Tobsn: but that doesn't provide the proto [04:32] Tobsn: well [04:32] Tobsn: nope [04:32] Tobsn: as i said, its only the request [04:32] Tobsn: but where else would it be... [04:33] bradleymeck has joined the channel [04:33] ncb000gt: not sure [04:34] kmiyashiro has joined the channel [04:34] Croms: Would be nice to have a normalized string in Node with the full request path. [04:34] Tobsn: ha [04:34] Tobsn: i cant find it [04:34] Tobsn: wtf. [04:35] jakehow has joined the channel [04:36] ashc has joined the channel [04:37] Tobsn: why cant i search inside the source of a repo on git [04:37] Tobsn: ah nevermind [04:38] Tobsn: We're sorry, but there was a problem connecting to our search server. Try again soon. [04:38] Tobsn: aweeee github... [04:40] abraham has joined the channel [04:41] cloudhead2 has joined the channel [04:44] guybrush: Tobsn: git clone; git grep [04:45] robotarmy has joined the channel [04:45] guybrush: gitweb has builtin git grep :D [04:45] Tobsn: :P [04:45] Tobsn: im not interested enough hehe [04:46] xiackok has left the channel [04:46] ncb000gt: guybrush: my mind was just blown [04:46] ncb000gt: i don't know how i didn't know about that [04:46] ncb000gt: :) [04:46] guybrush: haha [04:46] ncb000gt: i still like ack better, but that is good for a set of greppage too [04:46] ncb000gt: :) [04:47] Tobsn: git grep ha [04:47] Tobsn: i ignored everything after git clone hehe [04:50] tmpvar has joined the channel [04:52] Spoofscript has joined the channel [04:52] carllerche has joined the channel [04:52] draginx has left the channel [04:53] Spoofscript has left the channel [04:54] Spoofscript has joined the channel [04:54] ryan[WIN] has joined the channel [04:55] xiackok has joined the channel [04:55] ryan[WTF] has joined the channel [04:57] postwait has joined the channel [04:59] xiackok has left the channel [05:01] indutny has joined the channel [05:02] ryankirkman has joined the channel [05:04] markc: is there anyway to prevent node from sending headers? even if I do not use writeHead() I still get Connection: and Transfer-Encoding: headers [05:04] rfay has joined the channel [05:05] ncb000gt: markc: why do you not want to send headers? [05:05] ncb000gt: markc: the answer is no, but i'm curious about why [05:06] markc: ncb000gt: I'm calling a cgi script and I'd rather it return all the headers [05:06] ncb000gt: markc: you mean just proxy them through? [05:07] markc: ncb000gt: yes, more to the point, I can't figure out how to prevent php-cgi -q from sending headers [05:07] ncb000gt: no idea for php-cgi [05:07] markc: so 100% no way to disable all headers in node? [05:08] ncb000gt: markc: not with the http module [05:09] markc: ncb000gt: right, so feel free to write my own replacement then :) [05:09] ncb000gt: haha [05:09] ncb000gt: you could either do that or just pass the headers through from the cgi script [05:09] ncb000gt: erm, cgi request [05:10] matt_ has joined the channel [05:10] markc: ncb000gt: but node sends a \r\n\r\n before the cgi script sends it's data which then includes it's headers as well [05:10] vnguyen has joined the channel [05:11] ncb000gt: markc: then it sounds like your callbacks are screwed up, can you put some code in a gist [05:11] ncb000gt: ? [05:12] markc: ncb000gt: it'll take me awhile to un-mess my crazy attempts [05:15] vipaca has joined the channel [05:15] vipaca has joined the channel [05:15] muk_mb has joined the channel [05:16] EyePulp has joined the channel [05:17] spinron has joined the channel [05:19] kmiyashiro: does anyone know which markdown processor github uses? [05:20] kmiyashiro: is it just a port of the perl? [05:20] ncb000gt: kmiyashiro: https://github.com/github/github-flavored-markdown [05:20] kmiyashiro: yeah [05:20] markc: ncb000gt: https://gist.github.com/899249 is the basic function [05:20] kmiyashiro: I know about their customizations [05:21] kmiyashiro: but what about the basic implementation? [05:21] kmiyashiro: is it still regex hell? [05:21] kmiyashiro: and is there any other way other than regex magic? [05:24] ncb000gt: markc: yea, you're not proxying the headers through before you call write [05:24] ncb000gt: although, in that case, you're not making an http request so there are no headers to pass through [05:25] jetienne: uploading node 0.4.5 deb [05:25] markc: ncb000gt: can you give me hint how in the context of that function? [05:25] darshanshankar has joined the channel [05:26] ncb000gt: markc: https://gist.github.com/899254 [05:27] dgathright has joined the channel [05:27] ncb000gt: so adding the writeHead function will let you push headers to the client [05:28] markc: ncb000gt: but the headers coming from a PHP script are included with the function (data) as part of the body of the returned data [05:28] tfe_ has joined the channel [05:28] tfe_ has joined the channel [05:28] willwhite has joined the channel [05:29] noocx: which is a good choice for templating? [05:29] ncb000gt: noocx: what are you looking for? [05:29] noocx: template engine [05:29] noocx: like ejs, jade, etc [05:30] ncb000gt: noocx: right, i mean, what kind of templating do you prefer? [05:30] ncb000gt: do you prefer to write it all in js [05:30] noocx: like ejs [05:30] ncb000gt: more like the django style [05:30] noocx: but if there's better i use that [05:30] ncb000gt: ok, so then i'd say to use that [05:30] ncb000gt: meh, do what you prefer [05:30] markc: ncb000gt: I think the only thing I can do is regex out the incoming cgi (php) headers from the returned data and manually add a writeHead [05:30] ncb000gt: they're all about the same [05:31] sor3nsen: mustache for templating! [05:31] ncb000gt: markc: will they always be at the front of the response? [05:31] noocx: is there a big difference in performance? [05:31] ncb000gt: noocx: not from what i've seen [05:31] noocx: ok thanks [05:31] meso__ has joined the channel [05:31] markc: ncb000gt: yes, a typical headers up until 2 blank lines [05:31] ncb000gt: i remembered hearing something about weld having some performance issues, but i thought that the nodejistu guys had hammered through that [05:32] ncb000gt: markc: ok, then use that, create your headers object and then write that from the data [05:32] ncb000gt: gimme a sec [05:32] pyrony has joined the channel [05:32] ncb000gt: transferring my domains to namecheap [05:32] ncb000gt: :) [05:34] ngs has joined the channel [05:37] gazumps has joined the channel [05:38] Tobsn: shouldve been there to begin with :P [05:38] Tobsn: i made a list of all my domains last weekend [05:38] Tobsn: 245 [05:38] ngs has joined the channel [05:39] ncb000gt: Tobsn: i was with godaddy originally [05:39] Tobsn: fail ;) [05:39] ncb000gt: and was slowly transferring my domains [05:39] Tobsn: i have one domain at godaddy which i bid on and won [05:39] Tobsn: and i dont want to transfer it because its too expensive haha [05:40] Tobsn: oh right [05:40] Tobsn: that makes it 246 [05:40] ncb000gt: lol [05:41] Tobsn: funny fact, i dont use a single one [05:42] ncb000gt: markc: https://gist.github.com/899254 [05:42] ncb000gt: that will get you up to checking the headers [05:42] ncb000gt: removes the whole "stream the data through stuff" [05:43] ncb000gt: side of things [05:43] ncb000gt: but it's at least a start [05:43] markc: ncb000gt: awesome, thank you and that'll keep me out of mischief for awhile [05:43] ncb000gt: oh, you'll also need to increment the offset [05:43] ncb000gt: forgot that [05:44] ncb000gt: there, some small updates [05:44] Tobsn: anyone here exp. with streaming sockets and data handling? [05:44] briznad has joined the channel [05:44] Tobsn: if there is no terminator [05:44] markc: ncb000gt: will chunk.copy(buf, offset++, 0); do? [05:44] jetienne: sudo add-apt-repository ppa:jerome-etienne/neoip && sudo apt-get update && sudo apt-get install nodejs <- to install node.js 0.4.5 on ubuntu [05:44] ncb000gt: markc: no, you're not copying single bytes [05:45] ncb000gt: you're copying a chunked data [05:50] tylerstalder has joined the channel [05:52] ljackson: how much data in an object say using it as a hash (assoc array) do you start running into blocking e.g. for(var prop in obj) { do some very short thing} [05:52] ljackson: or is there a better node.js way [05:53] ncb000gt: ljackson: you'll have blocking regardless of the amount of data you have. i think you might be asking at which point does it become relevant? [05:53] ncb000gt: ljackson: and that is dependent [05:53] ljackson: yeah more to the point [05:54] Tobsn: it depends on what you do inside the for ;) [05:55] ljackson: humm... so just profile as you go eh? where would you store state of a hashmap outside of node in some other datastore ? [05:55] ljackson: if you really wanted to scale such operations [05:55] Tobsn: depends on how large and why [05:55] Tobsn: memcache or directly in shared mem i would assume [05:56] ljackson: think 100s or 1000s of xmmp clients keeping track of their roster in a map object so the browser based client doesn't or at least not initially [05:56] Tobsn: roster? [05:56] ljackson: buddy list [05:56] Tobsn: hmm [05:56] seivan has joined the channel [05:56] ljackson: most users ~ 20 or 30 people in their list [05:56] Tobsn: why wouldnt the client keep the buddylist [05:57] Tobsn: always assume the worst [05:57] ljackson: yeah but over socket.io they may come and go...etc. [05:57] Tobsn: 200,000 people with 100 people each [05:57] harth has joined the channel [05:57] ljackson: yeah [05:57] Tobsn: yeah but they load it once and keep it until they disconnect [05:57] ljackson: thats why I am asking now before I get to deep in my arch with node.js in memory [05:57] ncb000gt: assuming the worst is a bad idea [05:57] ncb000gt: leads to architecting for the moon [05:57] Tobsn: well the worst is like 10 millione at one with 200 people each [05:58] Tobsn: -e [05:58] Tobsn: *once [05:58] Tobsn: damn keyboard [05:58] ljackson: ncb000gt, not going to build the rocket version now just want to know what to think about when I need to [05:58] ncb000gt: i'd say to look at something like redis for now, it's KV, but it's all in memory [05:58] ljackson: ya [05:59] ljackson: was thinking voltdb or some other in memory db so you could select the roster and update into it...etc. [05:59] ncb000gt: if you're looking to scale horizontally then you'll likely want something else [05:59] Tobsn: i wouldnt use a db [05:59] timmywil has joined the channel [05:59] ncb000gt: i know very little about volt [05:59] ljackson: any way to have node.js call java ? lol [06:00] Tobsn: look into shared mem [06:00] ncb000gt: Tobsn: why not use a db? [06:00] Tobsn: for what? [06:00] stalled has joined the channel [06:00] ljackson: voltdb is shared mem with horizontall scal [06:00] ljackson: er scale [06:00] dguttman has joined the channel [06:00] Tobsn: for a single array? [06:00] ljackson: all in memory [06:00] Tobsn: which is rarely altered [06:00] Tobsn: i mean its in DB already [06:00] Tobsn: i assume [06:00] ljackson: all presence updates will alter it [06:00] Tobsn: to temp. store it just shuff it up your rams ass [06:00] Tobsn: ;) [06:00] ljackson: so it isn't all that rare [06:01] FireFly|n900 has joined the channel [06:01] Tobsn: well [06:01] Tobsn: still [06:01] Tobsn: at least try it out [06:01] Tobsn: if you store it in a db [06:02] Tobsn: hmm [06:02] Tobsn: yeah if you store it in any db, you still need to [06:02] Tobsn: nah doesnt really apply [06:02] Tobsn: mongodb saves everything in ram [06:02] Tobsn: i think redis uses fam too [06:03] Croms has joined the channel [06:03] Tobsn: i would still try ram first [06:03] Tobsn: just to see if it works and how fast it is [06:03] ljackson: still doesn't offload the interation/updates to some other process so it would still block node [06:03] ljackson: that is my quandry [06:04] Tobsn: https://github.com/dazhazit/node-ipcbuffer [06:04] Tobsn: im not sure if that would block [06:04] Tobsn: if you put it in a callback [06:04] ljackson: ok [06:04] Tobsn: an update function which fires back the result to the client [06:04] Tobsn: when its done [06:04] ErikCorry has joined the channel [06:04] ljackson: thats cool [06:05] Tobsn: just build a listener for update events [06:05] Tobsn: which knows the client id [06:06] JianMeng has joined the channel [06:07] ljackson: Tobsn, thanks for the ideas [06:07] Tobsn: i got one more [06:07] Tobsn: once sec [06:07] ljackson: i will think about it, ok [06:07] Tobsn: *one [06:08] ljackson: on a side note loving node.js and it's eventing model [06:09] beckje011 has joined the channel [06:10] jimt has joined the channel [06:10] Tobsn: http://schumann.cx/ircg/ [06:10] Tobsn: look into that [06:12] ljackson: yeah cool stuff, I am already covered with socket.io for that it works very well and uses websockets,flashsocket or xhr-multipart in a downgrade fastion to handle crazy ammounts of events from node [06:12] ljackson: my only scaling worrie is the roster object per client [06:12] Tobsn: i know [06:12] Tobsn: has nothing to do with ircg [06:12] Tobsn: erm irc [06:12] Tobsn: its about how he handles thousands of connections at the same time [06:12] ljackson: thats why I am using node.js and socket.io :) [06:13] ljackson: otherwise I wouldn't be here [06:13] ljackson: hehe [06:13] Tobsn: yeah you dont get the hint [06:13] Tobsn: anyway, try to use mem, if not memcache, if not redis, if not mongodb [06:13] ljackson: ok good pointers [06:13] ljackson: thanks all gotta goto bed! [06:20] Validatorian has joined the channel [06:23] darshanshankar has joined the channel [06:23] vipaca has joined the channel [06:23] vipaca has joined the channel [06:23] gozala has joined the channel [06:25] JimBastard has joined the channel [06:30] jimt has joined the channel [06:33] dekz: SubStack: you got a mention in the nodeguide :) [06:34] unmatrix has joined the channel [06:35] mhooker has joined the channel [06:38] JimBastard: i still think i got the best mention :-D [06:40] dekz: double l'ed duel! [06:40] robtmr has joined the channel [06:42] JimBastard_ has joined the channel [06:44] copongcopong has joined the channel [06:50] warz has joined the channel [06:51] shiawuen has left the channel [06:51] shiawuen has joined the channel [06:54] dekz: jesus nodes wscript is huge [07:02] beginner has joined the channel [07:04] skm has joined the channel [07:05] beginner: Hi guys and node gurus.... a quick question ... we generally start a node.js script from shell using node script_name.js ..... but there might be a issue / error / end of events ... how would one ensure the script runs again in the event of error ? [07:07] jesusabdullah: you're looking for, umm [07:07] jesusabdullah: shit, what's the word [07:07] jesusabdullah: process manager? [07:08] jesusabdullah: You could use monit or upstart or something like that [07:08] jesusabdullah: There are also a few node projects that do the same [07:08] jesusabdullah: or similar, rather [07:08] dekz: err what's the way to throw configure arguments to node-waf configure [07:08] jesusabdullah: only one I can think of off the top of my head is indexzero's "forever.js" [07:08] jesusabdullah: I made a crappy one too, but it might do what you need [07:08] jesusabdullah: Both on github [07:09] jesusabdullah: Oh, and [07:09] jesusabdullah: while :; do ./proggy.js; done [07:09] robb1e has joined the channel [07:09] jesusabdullah: I used that trick on my thesis [07:10] jimt_ has joined the channel [07:13] GriffenJBS: jesusabdullah: what's wrong with while true; do ./proggy.js; done? [07:14] adambeynon has joined the channel [07:15] beginner: so forever.js is the solution ??? [07:15] beginner: it is again a node js thing wat if that breaks down [07:15] V1 has joined the channel [07:16] jimt has joined the channel [07:16] GriffenJBS: beginner: many of those use a shell, so when the child dies, they spawn a new one [07:17] mattikus has joined the channel [07:18] beginner: some thing like a cron ? [07:19] GriffenJBS: the while do done look is the same, as is the node solutions, unless something starts killing processes your ok [07:19] GriffenJBS: and if that case happens, how do you make sure the monitor/watchdog is not killed? [07:20] GriffenJBS: s/look/loop/ [07:20] jtsnow has joined the channel [07:20] GriffenJBS: wow, even my s/// is wrong -v for me [07:20] msucan has joined the channel [07:23] ballantyne has joined the channel [07:26] jesusabdullah: GriffenJBS: Nothing! I used it on my thesis [07:26] jesusabdullah: GriffenJBS: But some people like bells and whistles, like code change detection and crap like that [07:27] jesusabdullah: GriffenJBS: Or, daemonization [07:27] hellp has joined the channel [07:28] dgathright has joined the channel [07:30] meandi has joined the channel [07:31] Swimming_bird has joined the channel [07:40] tilgovi has joined the channel [07:43] Croms has joined the channel [07:53] saschagehlich has joined the channel [07:56] Country has joined the channel [07:57] dve has joined the channel [07:57] sdecastelberg has joined the channel [07:58] tbassetto has joined the channel [07:59] Druide_ has joined the channel [08:00] d0k has joined the channel [08:07] liquidproof has joined the channel [08:08] seivan has joined the channel [08:13] Nexxy has joined the channel [08:13] Nexxy has joined the channel [08:14] ph^ has joined the channel [08:15] admc has joined the channel [08:19] matjas has joined the channel [08:19] astropirate has joined the channel [08:22] Aikar: beginner: theres not any real known instability issues with node atm i dont think. so if you write good code it shouldnt be a problem :P [08:23] Aikar: you can also write a startup script that checks if its already running and abort, then run it as a cronjob every 1m [08:23] Aikar: or put it in a bash shell script that does while (true) [08:23] Aikar: numerous ways to ensure code stays running [08:24] seivan: So [08:24] seivan: The nodeguide, any way to have deployment strategies going [08:24] seivan: especially load balancers with direct socket connections [08:24] seivan: :D [08:24] seivan: and the OOP guide would be nice as well [08:24] Aikar: im confused, deployment and LB/direct sockets, how do they relate? [08:24] Aikar: deploying code is 1 step [08:24] Aikar: running it is another [08:25] Aikar: and theres plenty of OOP JS strategies [08:25] Aikar: they all work for node [08:26] Aikar: foo.js: module.exports = function foo(){/* constructor*/}; foo.prototype = {method:function(){}}; [08:26] stagas has joined the channel [08:27] Aikar: then var Foo = require('./foo'); var oFoo = new Foo(); [08:27] claudiu__ has joined the channel [08:28] Aikar: but dont make the same mistake tons of people do with OOP. dont make everything in that syntax when you only need 1 instance. if you only need 1 instance, just use [08:28] Aikar: module.exports = {method: function(){}}; [08:28] robb1e has joined the channel [08:29] jesusabdullah: Okay, I'm being dumb: isn't there a filter function for js? [08:29] Aikar: array_map? [08:29] Aikar: err [08:29] jesusabdullah: Or am I herping the derp? [08:29] Aikar: array.map [08:29] jesusabdullah: No, a FILTER [08:29] Aikar: can be used to filter :P [08:29] jesusabdullah: oh? How so? :S [08:30] jesusabdullah: Maybe I've just used underscore's filter in the past [08:32] jesusabdullah: Son of a bitch, THERE's filter [08:32] jesusabdullah: I KNEW it [08:32] Aikar: yeah .filter exists [08:32] jesusabdullah: wtf was I doing wrong?? [08:32] Aikar: i thought you could do it with map [08:33] steffkes has joined the channel [08:33] jesusabdullah: Maybe [08:33] jesusabdullah: but if so, idk how [08:34] shiawuen: in node, .filter only available to Array [08:34] JojoBoss has joined the channel [08:37] jesusabdullah: well [08:37] jesusabdullah: all I want is the array [08:37] jesusabdullah: the problem was that I was trying to use filter like a function, a la underscore, instead of as a method [08:38] mischief has joined the channel [08:39] alessio_alexAFK has joined the channel [08:39] shiawuen: how about just copy the function from underscore? [08:39] shiawuen: https://github.com/documentcloud/underscore/blob/master/underscore.js#L147 [08:39] ph^ has joined the channel [08:40] klara has joined the channel [08:40] klara has left the channel [08:42] ph^ has joined the channel [08:42] Tobsn: hehe [08:42] Tobsn: hurray javascript. [08:43] jesusabdullah: shiawuen: Way ahead of you [08:43] jesusabdullah: shiawuen: I tried doing filter() intead of _.filter and wondered why it wasn't working [08:43] jesusabdullah: shiawuen: but I figured out what was going on [08:44] shiawuen: jesusabdullah: just trying to be busybody =P [08:44] herbySk has joined the channel [08:45] jesusabdullah: Hehe, sure [08:45] SamuraiJack has joined the channel [08:46] shaun_ has joined the channel [08:47] shaun_ has joined the channel [08:49] abraham has joined the channel [08:55] Aikar: \ [08:56] Aikar: i wanna go bac kto sleep;( [08:56] Aikar: but instead im at work at 5am! [08:56] Aikar: stupid deploy :/ [08:56] torgeir has joined the channel [08:56] chapel: v8: 'this is a test boyee'.split(/ +/); [08:56] v8bot: chapel: ["this","is","a","test","boyee"] [08:56] chapel: v8: 'this is a test boyee'.split(/\s/); [08:56] v8bot: chapel: ["this","is","a","","","test","","boyee"] [08:57] chapel: v8: 'this is a test boyee'.split(/ +?/); [08:57] v8bot: chapel: ["this","is","a","","","test","","boyee"] [08:57] Aikar: yeah the + is gonna make it do "1 or more" [08:57] jesusabdullah: Ah, not spaces. My bad! [08:57] chapel: v8: 'this is a test boyee'.split(/ +/); [08:57] v8bot: chapel: ["this","is","a","test","boyee"] [08:57] jesusabdullah: ^__^ [08:57] chapel: :) [08:58] chapel: wonder why coffeescript doesn't like that regexp [08:58] chapel: v8: 'this is a test boyee'.split(/\s+/); [08:58] v8bot: chapel: ["this","is","a","test","boyee"] [08:58] chapel: :) [08:58] chapel: \s passes [08:59] jesusabdullah: Sweet [08:59] chapel: :) [08:59] jesusabdullah: I'd still tell jeremy just in case it's a bug [08:59] chapel: \s = whitespace [08:59] chapel: yeah [08:59] stonebranch has joined the channel [08:59] jesusabdullah: Are you porting that lib, chapel? [08:59] chapel: yeah, going to customize it [08:59] chapel: but first porting it to cs [08:59] chapel: since thats what Im writing my app in [09:02] astropirate: Could someone give some input as to which testing framework to use? [09:02] jesusabdullah: either nodeunit, expresso or vows. [09:02] jesusabdullah: There you go, astropirate. [09:02] jesusabdullah: Pick the one that tickles your fancy. [09:02] astropirate: my fancy isn't ticklish [09:03] dahankzter has joined the channel [09:03] isaacs has joined the channel [09:03] shaunau has joined the channel [09:03] markc has joined the channel [09:05] Gruni has joined the channel [09:06] shaunau has joined the channel [09:07] jesusabdullah: astropirate: My understanding is that nodeunit is maybe more straightforward but not terriffically fast. Vows is verbose, but fast and some people really like it. Expresso is fast and less verbose, but isn't particularly sophisticated [09:07] jesusabdullah: There you go. [09:08] astropirate: jesusabdullah, thats what i wanted :D thanks [09:08] Aikar: "verbose" is optional in vows [09:08] Aikar: you can turn it on if you want it [09:08] Aikar: or use default dotmatrix [09:08] jesusabdullah: I didn't mean the output [09:08] jesusabdullah: I meant the interface [09:08] unlink has joined the channel [09:08] jesusabdullah: I would honestly just look at the interfaces, and choose the one that looks most obvious [09:08] Aikar: yeah vows takes some getting use to. im using it but def no export [09:08] Aikar: expert [09:09] shaunau: someone just asked on the mail list if there was something like DotNetOpenAuth for node, that does all the diff types of authentication, google, facebook, twitter, etc. sounds like a very handy thing to have. Anyone know of such a beast for node? [09:09] Aikar: look at uh connect modules [09:09] mjr_ has left the channel [09:10] Aikar: and wtfux firefox has crashed twice in last 2 hrs on me [09:10] V1: ^___ probably flash ;) [09:12] shaunau: node releases are coming pretty quickly.. i only just built and installed 0.4.4 :/ [09:13] ryah: shaunau: every friday [09:13] ryah: usually [09:13] synkro has joined the channel [09:13] shaunau: ryah: oh ok. thanks [09:14] shaunau: ryah: as luck would have it i think i've been upgrading on thursdays :) now i know better [09:14] V1: node release cycle > IE release cycle ;) [09:15] ryah: release early, release often [09:15] shaunau: Thats is, AU Thus/US Wed. :) [09:15] ryah: (is that how that goes?) [09:15] V1: yup [09:17] synkro: hi [09:17] synkro: I can't update my node to 0.4.5 with npm. [09:17] synkro: is that normal behaviiour? [09:17] V1: NPM cant update node. [09:17] Aikar: well, it technically could ;) [09:18] Aikar: after node was installed the first time that is [09:18] V1: Aikar: even if npm is running on the same node process that needs to get updated ;)? [09:18] synkro: oh okay, thank you [09:18] Aikar: V1: yep [09:18] V1: fork/patch/commit/pull ;O [09:18] Aikar: you can update a binary while its in use, it just doesnt take effect until process is restarted [09:18] shaunau: ryah: i could automate all my builds if the node-latest.tar.gz was automatically sym-linked to the new build, having said that, now that i know which day it's released & i know which version will be next i can just check for it on Saturdays :) [09:18] Aikar: npm can download tar/gz, recompile and install [09:19] V1: Aikar: than, technically, it would be possible to create a "node" package that install's nodejs [09:19] Aikar: and optionally do that step on the npm .sh install [09:20] shaunau: V1:Aikar would be handy. then it could also update all the libs too. [09:20] Aikar: if [ -z `which node` ]; then ; cd node; ./configure && make && make install; fi [09:25] chapel: v8: ['83', '92'].shift() === "+"; [09:25] v8bot: chapel: false [09:25] chapel: hmm [09:25] chapel: v8: ['83', '+92'].shift() === "+"; [09:25] v8bot: chapel: false [09:25] beejeebus has joined the channel [09:26] chapel: v8: var adding = ['32', '+'].shift() === "+"; [09:26] v8bot: chapel: undefined [09:26] Aikar: chapel: trying to turn code into char? [09:26] Aikar: shift pulls an entry off the array [09:27] chapel: yeah [09:27] Aikar: pop for pulling last, shift for first [09:27] chapel: idk https://github.com/martynsmith/node-irc/commit/4cc7f24d8dd72b8e024a884654ebeb4ce40b0a6d#L1R579 [09:27] ph^ has joined the channel [09:28] Aikar: do message.args[1][0] === '+' [09:28] Aikar: and be careful in that, you can have multiple modes [09:28] liquidproof has joined the channel [09:29] Aikar: like /mode +vvp-b aikar chapel blah [09:29] Aikar: +v's aikar and chapel, sets +p on channel, and unbans blah [09:30] mc_greeny has joined the channel [09:31] Aikar: modes = message.args[1].split(''); modes.forEach(function(mode) { }); [09:31] saschagehlich has joined the channel [09:32] Aikar: then do var bCurrent switch (mode) { case '+': bCurrent = true; break; case '-': bCurrent=false; break; then do switch for each mode, and check status of bCurrent to see if adding or removing [09:32] Aikar: then you gotta build up a queue of modes that accepts args [09:33] meso_ has joined the channel [09:33] Aikar: ie v takes an arg, p does not, b does [09:33] chapel: yeah [09:34] Aikar: ill let you figure out the implementation of that :P [09:34] asabil has joined the channel [09:34] johnnywengluu: cloudhead: you there? [09:34] meso___ has joined the channel [09:35] chapel: yeah, thanks [09:35] mraleph has joined the channel [09:36] CIA-1: node: 03Ryan Dahl 07v0.4 * rffb3ee6 10/ doc/api/modules.markdown : Remove reference to CommonJS in documentation - http://bit.ly/e2obXA [09:36] CIA-1: node: 03George Stagas 07v0.4 * r21e3b66 10/ (5 files in 2 dirs): Added favicon.ico - http://bit.ly/fsoKGz [09:36] CIA-1: node: 03George Stagas 07v0.4 * r3002c01 10/ doc/api/all.markdown : Changed script to vm and corrected order to match index - http://bit.ly/ieAKwn [09:38] onr has joined the channel [09:42] gJ|Alex has joined the channel [09:43] kristsk has joined the channel [09:43] stagas: SubStack: is there a way to pass a socket.io config object with dnode browser? [09:43] beawesomeinstead has joined the channel [09:43] beawesomeinstead has joined the channel [09:45] bx2 has joined the channel [09:45] aho has joined the channel [09:46] oplaque has joined the channel [09:47] beawesomeinstead has joined the channel [09:47] beawesomeinstead has joined the channel [09:49] oplaque: Possibly javascript 101, but how do I call a function from the client-side that I defined on server-side? [09:49] dve has joined the channel [09:51] caolanm has joined the channel [09:51] Horofox has joined the channel [09:55] tbassetto has joined the channel [09:57] d0k has joined the channel [09:58] teemow has joined the channel [09:59] Druide_ has joined the channel [09:59] chapel: oplaque: dnode [10:02] muntasir has joined the channel [10:08] Quilck has joined the channel [10:11] stephank has joined the channel [10:12] beawesomeinstead has joined the channel [10:12] beawesomeinstead has joined the channel [10:13] sriley has joined the channel [10:14] insin has joined the channel [10:18] JianMeng has joined the channel [10:20] synkro: I think the installation in the wiki should not get the tip source but the latest stable. [10:20] synkro: it's weird to have a pre-0.5 version [10:20] synkro: especially for newbies. just my 2 cent [10:21] liar has joined the channel [10:23] beawesomeinstead has joined the channel [10:23] beawesomeinstead has joined the channel [10:23] okuryu has joined the channel [10:33] m00p has joined the channel [10:37] thorsteinsson has joined the channel [10:41] stagas has joined the channel [10:41] hlindset has joined the channel [10:41] hlindset has joined the channel [10:42] Bonuspunkt has joined the channel [10:49] felixge has joined the channel [10:49] felixge has joined the channel [10:52] Spoofscript has left the channel [10:54] ngs has joined the channel [10:55] ngs has joined the channel [10:59] johnnywengluu: isaac i need u! [11:05] markwubben has joined the channel [11:06] bergie has joined the channel [11:08] SleH has joined the channel [11:08] broofa has joined the channel [11:10] saebekassebil has joined the channel [11:12] saebekassebil: Hi everybody [11:12] saebekassebil: Experiencing some wierd problems with installing 'forever' module [11:12] saebekassebil: http://pastebin.com/P9tsR0eX [11:13] saebekassebil: Saying that node version: '*' is required, but i have 'v0.4.2' [11:13] saebekassebil: Which should be ok? [11:13] kronos has joined the channel [11:17] jetienne: replace * by '>= 0.0.0' [11:18] jetienne: saebekassebil: or do "nmod install forever' [11:18] johnnywengluu: hm [11:18] johnnywengluu: what is nmod [11:18] saebekassebil: how would i replace it when it isn't my module? [11:19] jetienne: https://github.com/jeromeetienne/nmod nmod is a node_module manager [11:20] Charuru has joined the channel [11:20] jetienne: saebekassebil: if you cant, you can use nmod. i just tested it is installable [11:21] saebekassebil: so your nmod module, install a module locally, what's the difference from npm? [11:21] jetienne: saebekassebil: not the same code. it is compatible tho [11:22] jetienne: and it focus on install, nothing on publishing [11:22] jetienne: publishing may be done on git repo or by npm [11:23] jetienne: oh and yeah the key thing for me is "installed locally" [11:23] jetienne: all is installed in the ./node_modules directory. nothing below current directory. no system install [11:23] jetienne: i find it easier to deploy and understand when it remains local [11:23] Bonuspunkt has joined the channel [11:23] jetienne: i will write that in a blog post one day :) [11:24] johnnywengluu: why nmod and not npm? [11:25] jetienne: johnnywengluu: ? can you rephrase i dont understand the question [11:26] johnnywengluu: why would i want to use nmod and not npm? [11:26] johnnywengluu: npm link [11:26] jetienne: johnnywengluu: i dunno... only you knows what you want [11:26] jetienne: just another alternative [11:26] johnnywengluu: but why would someone want to use nmod [11:27] johnnywengluu: there has to be a purpose for its existence right =) [11:28] jetienne: johnnywengluu: i told you why i use it :) i like the 'small install', the 'only node_modules', the 'all is local' [11:28] jetienne: the simplicity makes it easier to understand for me [11:29] jetienne: johnnywengluu: if those features are cool for you, maybe nmod is cool for you [11:29] johnnywengluu: =) [11:29] johnnywengluu: what do you mean by small install [11:29] johnnywengluu: node_modules [11:29] johnnywengluu: and all is local [11:29] jetienne: arf no time to explain more sorry [11:30] johnnywengluu: ok [11:30] jetienne: johnnywengluu: i only started to unblock the foreever install [11:30] jetienne: johnnywengluu: i will write a blog post on nmod to explain it better [11:31] beawesomeinstead has joined the channel [11:33] johnnywengluu: it says yiengine: latest version cant be found! ensure the package version exists [11:33] johnnywengluu: i have to upload it? [11:36] insin: yay, qs does the sensible thing with multiple identically named parameters [11:36] insin: ACTION was kinda depending on it [11:38] johnnywengluu: insin: what is it doing? [11:38] johnnywengluu: replacing? [11:39] fairwinds has joined the channel [11:39] johnnywengluu: on a talk by ryan he is using the command "ab" on the console that is doing multiple requets [11:39] johnnywengluu: anyone knows more about that command [11:39] johnnywengluu: is it a node module? [11:40] johnnywengluu: or something for linux [11:40] stride: apache benchmark [11:40] johnnywengluu: http://httpd.apache.org/docs/2.0/programs/ab.html [11:40] johnnywengluu: yeah [11:40] johnnywengluu: kinda cool [11:41] alessio_alexAFK has joined the channel [11:41] FireFly|n900 has joined the channel [11:41] johnnywengluu: are there other tools/services for benchmarking your servers? [11:44] insin: require('querystring').parse('test=foo&test=bar') -> { test: [ 'foo', 'bar' ] } [11:44] johnnywengluu: oh [11:44] johnnywengluu: cool [11:44] johnnywengluu: thought it would overwrite [11:45] insin: although that does potentially give you a way to mess with people's processing code if they're not careful [11:46] insin: returning an object with the last specified value and a method to get a list when you're expecting one could alleviate that (as you should really know when you're expecting multiples) [11:47] ph^ has joined the channel [11:48] insin: I just saw that it supports the icky PHP [ ] stuff and was worried that would be the only way to get stuff into a list without extra processing [11:48] Quilck has joined the channel [11:50] insin: hmm... or does it? [11:52] charlenopires has joined the channel [11:54] MikhX has joined the channel [11:55] meso_ has joined the channel [11:56] shiawuen has joined the channel [11:57] sjbreen has joined the channel [11:57] flasomm has joined the channel [11:58] meso__ has joined the channel [11:59] johnnywengluu: http://www.youtube.com/watch?v=jo_B4LTHi3I [11:59] johnnywengluu: this is so fun to watch [11:59] johnnywengluu: "your mom" hahaha [12:01] fly-away has joined the channel [12:01] Tobsn: http://mail.google.com/support/bin/answer.py?hl=en&ctx=mail&answer=1217362 [12:01] Tobsn: oh nice [12:01] Tobsn: i missed that one... [12:01] Tobsn: very funny. [12:03] sdecastelberg has joined the channel [12:04] sorens3n has joined the channel [12:04] matjas has joined the channel [12:05] gmanika has joined the channel [12:08] robb1e has joined the channel [12:10] beckje01 has joined the channel [12:11] stagas has joined the channel [12:20] flasomm has joined the channel [12:25] hellp has joined the channel [12:26] JianMeng1 has joined the channel [12:28] JimBastard has joined the channel [12:28] maushu has joined the channel [12:30] MikhX_ has joined the channel [12:31] hvgotcodes has joined the channel [12:32] xastey has joined the channel [12:33] alessio_alexAFK has joined the channel [12:37] V1 has joined the channel [12:39] perlmonkey2 has joined the channel [12:39] matschaffer has joined the channel [12:39] jetienne: SubStack: seq is working in browsers ? [12:39] robb1e has joined the channel [12:41] matschaffer1 has joined the channel [12:42] MattJ100 has joined the channel [12:45] seivan has joined the channel [12:45] adambeynon has joined the channel [12:45] onr has joined the channel [12:46] Quilck has joined the channel [12:48] onr has joined the channel [12:48] xla has joined the channel [12:48] m64253 has joined the channel [12:49] adambeynon has joined the channel [12:50] johnnywengluu: jetienne: i know https://github.com/caolan/async is [12:51] wilmoore has joined the channel [12:53] kaichenxyz_ has joined the channel [12:57] kristsk has joined the channel [13:00] max_dev has joined the channel [13:09] Muon has joined the channel [13:10] kriszyp has joined the channel [13:10] MikhX has joined the channel [13:10] unlink has joined the channel [13:10] unlink has joined the channel [13:13] matschaffer has joined the channel [13:19] stonebranch has joined the channel [13:20] muntasir has joined the channel [13:27] ph^ has joined the channel [13:30] stephen_mcd has joined the channel [13:34] bradleymeck has joined the channel [13:36] ratsbane has joined the channel [13:36] malkomalko has joined the channel [13:39] thegreatape has joined the channel [13:43] rfay has joined the channel [13:48] baudehlo has joined the channel [13:51] jlecker has joined the channel [13:52] TheFuzzball has joined the channel [13:54] matschaffer has joined the channel [13:55] skyler_brungardt has joined the channel [13:59] jeromegn: anybody ever stumbled on this error using mongodb / mongoose? `$ operator made object too large` [14:01] alek_br has joined the channel [14:01] matschaffer has joined the channel [14:02] nonnikcam has joined the channel [14:03] max_dev_ has joined the channel [14:06] V1 has joined the channel [14:07] bbguitar has joined the channel [14:08] davidcoallier has joined the channel [14:09] pengwynn has joined the channel [14:11] Kingdutch has joined the channel [14:12] matjas has joined the channel [14:14] jiveB has joined the channel [14:15] jscheel has joined the channel [14:15] jscheel has joined the channel [14:16] ji0n has joined the channel [14:16] SubStack: jetienne: yep, seq is even part of the browserify unit tests [14:16] ji0n has joined the channel [14:17] jscheel: wink_: you there? [14:17] jscheel has left the channel [14:17] jscheel has joined the channel [14:18] eb4890 has joined the channel [14:18] jscheel: darnit, dropped out for a sec, didn't see if you responses, wink_ [14:18] SubStack: stagas: there used to be a way to pass in socket.io config params but I seem to have removed that [14:18] jscheel: responded* [14:19] SubStack: I should probably let users pass a socketio handle to .listen() directly [14:20] synkro has joined the channel [14:20] synkro: hi! [14:21] alek_br has joined the channel [14:21] synkro: is there already a pure node.js hosting service that is not in beta anymore or where you need coupons etc. [14:21] SubStack: jetienne: https://github.com/substack/node-browserify/tree/master/examples/npm-seq [14:21] synkro: that already works? [14:21] stagas: SubStack: strange I did DNode({ rememberTransport: false }, cb) and I think it worked [14:22] SubStack: oh it might work client-side already [14:24] FireFly|n900 has joined the channel [14:26] ckknight: What documentation generation tools do people use here? [14:26] jscheel: synkro: have you tried to get a coupon from no.de? [14:26] seivan: So [14:26] mikl has joined the channel [14:26] seivan: Anyone know how to do some load balancing with node sockets? [14:26] synkro: jscheel(); sure, no reply yet [14:26] jscheel: synkro: if you don't want to go that route, I would just set it up on amazon ec2 [14:27] synkro: i also register at all the others like nodester and nodjitsu and node*** [14:27] synkro: jscheel(); no, that is the route I don't want to go [14:28] jscheel: synkro: just curious, why not? [14:29] synkro: I would have to administrate the whole system, I am no admin. [14:29] synkro: I just want to press deploy and that's it [14:29] synkro: and I don't like Amazon [14:30] seivan: synkro: So any advice? [14:30] TheFuzzball has joined the channel [14:30] seivan: Which one is the better? [14:30] dve has joined the channel [14:33] okuryu has joined the channel [14:34] synkro: seivan(); huh? [14:34] synkro: I guess I have to wait [14:36] Charuru: no.de gives everyone a coupon [14:36] larsemil has joined the channel [14:36] Charuru: they send out like every week [14:36] Charuru: dev on local for now you can push in a week [14:37] Charuru: there's also duostack [14:37] Charuru: it says ruby+node but in reality you can just ignore the ruby part and it's basically purely node [14:37] synkro: oh okay, I lookedlike they were focused on ruby [14:37] Rubikzube has joined the channel [14:37] kriszyp2 has joined the channel [14:38] tmpvar has joined the channel [14:38] Charuru: yeah afaik their philosophy about the combo doesn't make sense [14:38] Charuru: but it's ok to just use one part [14:38] dnolen has joined the channel [14:39] dnolen has joined the channel [14:39] sirkitree|break has joined the channel [14:40] Charuru: does anyone know of a node equivalent for varnish? [14:40] stagas: SubStack: also where do I find the connection object on client side? [14:41] Max-Might has joined the channel [14:41] Kholo has joined the channel [14:41] gerad has joined the channel [14:42] SubStack: stagas: it's just the second parameter to the constructor and connect callbacks [14:42] jtsnow has joined the channel [14:43] Quilck has joined the channel [14:43] max_dev has joined the channel [14:46] ruggedcoder has joined the channel [14:49] shiawuen_ has joined the channel [14:49] mattrobenolt has joined the channel [14:49] perlmonkey2 has joined the channel [14:50] davidcoallier has joined the channel [14:53] dgdo has joined the channel [14:55] dgdo has left the channel [14:55] m00p has joined the channel [14:57] confoocious has joined the channel [14:57] stagas has joined the channel [14:58] FireFly has joined the channel [14:59] Muon has left the channel [15:00] trotter has joined the channel [15:02] gausby has joined the channel [15:04] jtsnow has joined the channel [15:05] deepthawtz has joined the channel [15:05] cjm has joined the channel [15:06] pHcF has joined the channel [15:08] Max-Might has left the channel [15:09] syntheze has joined the channel [15:12] stagas: SubStack: conn doesn't seem to be emitting 'end' or any event. reconnect doesn't work also. what am I doing wrong? https://gist.github.com/4df3ff8448962a5406fd [15:13] SubStack: stagas: you've got to call .connect() [15:13] stagas: oh sorry it's DNode.connect(...) [15:14] stagas: that's what I'm doing [15:14] johnnywengluu: it feels like i cannot live without node [15:14] johnnywengluu: am i obsessed? [15:14] SubStack: 'end' is kind of tied to socket.io right now [15:14] SubStack: stagas: try conn.on('ready', console.log) [15:16] stagas: SubStack: it fired, but also console.log doesn't seem to be working in DNode callbacks, in chrome at least [15:16] torgeir has joined the channel [15:16] stagas: SubStack: that's why I use alert() [15:17] SubStack: stagas: are you calling conn.end() server-side? [15:18] stagas: SubStack: no, killing the server [15:18] brianloveswords has joined the channel [15:18] SubStack: dnode just does sock.on('disconnect', function () { self.emit('end') }) [15:18] SubStack: where sock is a socket.io handle [15:18] jakehow has joined the channel [15:19] confoocious has joined the channel [15:20] jtsnow has joined the channel [15:23] DrunkDwarf has joined the channel [15:23] Sorella has joined the channel [15:25] SubStack: cloudhead: cradle.Connection is a variable-argument constructor that must be instantiated with new() [15:25] SubStack: but you can't trivially .apply() new constructors [15:25] SubStack: beh so I need to Object.create() to write a wrapper >_< [15:26] f1lt3r_ has joined the channel [15:28] gtramont1na has joined the channel [15:33] davidcoallier has joined the channel [15:33] FireFly|n900 has joined the channel [15:34] ruggedcoder has left the channel [15:34] copongcopong has joined the channel [15:35] shaunau has joined the channel [15:36] ckknight: SubStack: cradle.Connection.apply(Object.create(cradle.Connection.prototype), myArgs) [15:36] astropirate has joined the channel [15:36] ckknight: no big whoop [15:36] ckknight: that's essentially what new does anyway [15:36] ckknight: though slightly less esoterically [15:37] unlink has joined the channel [15:37] unlink has joined the channel [15:38] ckknight: I need API advice. I'm designing a routing library. Should the parameters as specified in the route be passed into the callback, e.g. function(req, res, params) { }, or should they be placed on req, e.g. fnction(req, res) { req.params }? [15:39] mikl has joined the channel [15:41] baudehlo1 has joined the channel [15:41] gtramont1na: ckknight, I vote for the 1st option. [15:42] ckknight: I'm trying to be as "proper" as possible [15:42] ckknight: I'll likely just do both. [15:42] ckknight: I just don't want to commit a faux pas [15:45] rohit_nsit08 has joined the channel [15:45] rohit_nsit08: hello #node [15:45] gtramont1na: I see. [15:45] mscdex: hello [15:45] matschaffer has joined the channel [15:45] ckknight: howdy, rohit_nsit08 [15:46] rohit_nsit08: hi, glad to be back after a week :-) , guys can someone tell me about the "sys" module? [15:46] mscdex: it's renamed [15:46] dve has joined the channel [15:46] mscdex: :P [15:46] mscdex: to 'util' [15:47] rohit_nsit08: actually i was trying to understand the codebase of a javascript compiler which is using node , there is a line , " var sys = require("sys") [15:47] mscdex: yeah? [15:48] gtramont1na: ckknight, It is a bit hard to give you a better advice. But given the assync nature of node, a callback would be the best choice. [15:48] trotter has joined the channel [15:48] rohit_nsit08: which i traced and found that it is loading core "sys" module which is bundled with node [15:48] bluekite2000_ has joined the channel [15:48] mscdex: yep [15:48] rohit_nsit08: what is the use of "sys" or "util" module [15:48] ckknight: gtramont1na: it's already in a callback :P. And to be clear, this will be a connect middleware. [15:49] mscdex: rohit_nsit08: http://nodejs.org/docs/v0.4.4/api/util.html [15:50] tfe_ has joined the channel [15:50] tfe_ has joined the channel [15:50] gtramont1na: \o/ :-) [15:51] rohit_nsit08: mscdex: thanks , got it . it's for the debugging purpose :-) [15:51] mscdex: ckknight: imo, i'd avoid attaching it to req in case the "params" property is used in the future by core [15:52] ckknight: mscdex: well, I know connect.router attaches it to req, and my lib is meant to be a replacement for it (not to be used alongside, unless separately mounted) [15:52] mscdex: oh [15:54] rohit_nsit08: mscdex: is there any old documentation where information about "sys" can be found, i can't see, util.puts() function in current doc [15:54] rohit_nsit08: mscdex: was there any sys.puts() earlier? [15:56] mscdex: rohit_nsit08: in 0.2.x [15:56] mscdex: but it's the same module [15:56] mscdex: just different name [15:56] mscdex: rohit_nsit08: http://nodejs.org/docs/v0.2.6/api.html [15:56] narph: hmm cloudhead u there? (: [15:57] Vladimir1 has joined the channel [15:57] narph: cloudhead: is there any way to close a http server if tests are run? looks like a listening server keeps vows from running: https://gist.github.com/41f8d1f9c71e3523884e [15:57] mscdex: rohit_nsit08: util.puts() is still there [15:58] mscdex: same with .print and all the others [15:58] rohit_nsit08: mscdex: yup , found it [15:58] mscdex: although most people use console.* nowadays [15:58] tmpvar: v8:console.log(console.log.toString()) [15:58] v8bot: tmpvar: "function (x){console.out.push(pp(x))}" [15:58] stagas: SubStack: 'end' is emitted on another ee, not conn [15:58] stagas: SubStack: if I do conn.socketio.on('disconnect') it works [15:58] rohit_nsit08: mscdex: ya i have to modify the code, so will use util now [15:59] tobmastr has joined the channel [15:59] shaunau has joined the channel [15:59] stagas: SubStack: so it should be DNode.on('end') I think [16:00] f1lt3r_ has joined the channel [16:00] saikat has joined the channel [16:01] jarek has joined the channel [16:01] stagas: SubStack: no you should return this in dnode.prototype.connect and we should attach listeners there right? [16:01] Swimming_bird: i can't get node to recognize any of my npm modules installed [16:02] Swimming_bird: it always says they can't be found [16:02] AntelopeSalad has joined the channel [16:02] thomas has joined the channel [16:03] thomas has left the channel [16:10] SubStack: ah well that is a bug then [16:11] stagas: SubStack: or you can client.emit('end'), if I understand correctly client emits the events from the server? like 'ready'? [16:12] Swimming_bird: can anyone suggest any way for me to figure out why i can't require any npm modules? [16:13] AntelopeSalad: can anyone walk me through setting up mustache to work with express? I'm just getting started with node and google is coming back with 10 different ways to do this, just want to make sure I'm doing it the "right" way. [16:14] stagas: SubStack: return this fixes it for now [16:16] Swimming_bird: i'm not even sure if i can require normal files [16:17] dguttman has joined the channel [16:17] SubStack: stagas: ok I've got a fix [16:19] stagas: SubStack: cool [16:20] SubStack: published [16:20] pauls has joined the channel [16:21] m64253 has joined the channel [16:21] gozala has joined the channel [16:23] fR_ has joined the channel [16:24] fR_ has left the channel [16:24] jetienne has joined the channel [16:25] dilvie has joined the channel [16:25] mikeal has joined the channel [16:25] dfff has joined the channel [16:25] robotarmy has joined the channel [16:26] gozala1 has joined the channel [16:26] vladikoff has joined the channel [16:26] SamuraiJack has joined the channel [16:27] seivan has joined the channel [16:30] SamuraiJack has joined the channel [16:31] micheil has joined the channel [16:32] stagas: SubStack: it's working! :) [16:33] SubStack: \o/ [16:33] dgathright has joined the channel [16:34] johnnywengluu: so im in deep nesting problem [16:34] johnnywengluu: could someone tell me how to refactor this so i dont have to nest forever [16:34] johnnywengluu: https://gist.github.com/899623 [16:35] micheil: johnnywengluu: chain and use named functions instead of anonymous functions? [16:35] johnnywengluu: on lines: 11, 41 and 62 i have callbacks .. but i can't split them out because the first one is dependent of a variable inside the main function [16:35] micheil: so, move runAction out of the forEach function, and then do: forEach(runAction); [16:35] mikl has joined the channel [16:35] jeromegn: johnnywengluu: I'd say: try out a neat async flow control library: https://github.com/caolan/async [16:36] timmywil has joined the channel [16:37] johnnywengluu: jeromegn:maybe i should [16:37] [[zz]] has joined the channel [16:37] micheil: johnnywengluu: first try separating your functions out [16:37] jeromegn: johnnywengluu: micheil's solution would work too [16:37] johnnywengluu: micheil: yeah i did that .. but the functions are dependent on variables inside another function [16:37] micheil: johnnywengluu: or re-think what you're actually doing. [16:37] stagas: johnnywengluu: populate an object on the first callback since you've got an index and grab the variables from there [16:37] micheil: johnnywengluu: in which case a chaining library will not help you [16:38] johnnywengluu: so the function on line 11 is depending on the "app" variable on line 4 [16:38] alessio_alexAFK has joined the channel [16:39] stagas: johnnywengluu: now you're just wasting memory assinging local variables all the time [16:39] alek_br has joined the channel [16:39] johnnywengluu: not that good in memory management ) [16:39] johnnywengluu: =) [16:40] johnnywengluu: micheil: sorry i cant get you [16:40] johnnywengluu: cant you just edit quickly on with the first callback on line 11 as an example .. cant understand [16:40] johnnywengluu: if you dont have time dont bother =) [16:41] micheil: johnnywengluu: well, if you can't separate your functions out, then you can't use a chaining library which requires you to separate your functions out. [16:41] johnnywengluu: yeah [16:41] johnnywengluu: so what was your solution? [16:41] micheil: rethink the way you're doing things [16:41] johnnywengluu: i dont know how to think [16:42] johnnywengluu: its pretty simple stuff im doing .. do one thing .. do another .. etc [16:42] johnnywengluu: kinda leads to this design all the time [16:42] micheil: then you have a bigger problem then nested callbacks [16:42] johnnywengluu: what are the problems here? [16:42] johnnywengluu: nested callbacks are one of them .. i dont even know how to solve it [16:43] micheil: well, if you don't know your problem and can't think of solutions, then those are your problems [16:43] Bogh has joined the channel [16:43] johnnywengluu: someone with experience give me some hints [16:43] micheil: the first problem in solving a problem is knowing your problem [16:43] micheil: your problem isn't nested callbacks. [16:43] johnnywengluu: do you know my problem? [16:44] johnnywengluu: or the problem with this kind of coding [16:44] micheil: not overly, because I don't know what you want to achieve. [16:44] micheil: but I'll give you one thing, that code is really weird with all that variable assignment [16:44] saschagehlich has joined the channel [16:44] SubStack: instead of foo(function () { bar(function () {}) }), you can do foo(f); function f () { bar(g) }) function g () {} [16:45] SubStack: that is what micheil means by using named functions [16:47] synkroBBQ has joined the channel [16:47] pengwynn has joined the channel [16:48] jeff_horton has joined the channel [16:49] mroman has joined the channel [16:49] deepthawtz has joined the channel [16:49] shaunau: johnnywengluu: you might find these pages helpful, http://nodeguide.com/style.html#nested-closures http://stella.laurenzo.org/2011/03/bulletproof-node-js-coding/ [16:50] micheil: .. the problem isn't the closures, it's the approach. [16:50] johnnywengluu: micheil: what about variable assignments? [16:51] micheil: well, you don't need to be doing that many variable assignments. [16:51] johnnywengluu: var workflowPath = element; [16:51] johnnywengluu: var workflowOrder = index; [16:51] johnnywengluu: var workflowsPaths = enumerable; [16:51] johnnywengluu: you mean this? [16:51] micheil: yes [16:51] johnnywengluu: yeah kinda uneccessary [16:51] micheil: just call them that in your function's arguments [16:51] johnnywengluu: yeah [16:51] johnnywengluu: just made it more clear what they are [16:51] onre has joined the channel [16:51] bolvarak has joined the channel [16:52] johnnywengluu: i guess i should use comments instead [16:52] micheil: function(element, index, enumerable) -> function(workflowPath, workflowOrder, workflowPaths) [16:52] johnnywengluu: ah [16:52] johnnywengluu: =) [16:52] micheil: commented code is always good. [16:52] johnnywengluu: its really good with people that are looking at your code [16:53] johnnywengluu: this is gong to be OS .. a very serious project .. so i want it to be good coding .. people get it by reading [16:53] andrewfff has joined the channel [16:54] johnnywengluu: with API documentation, tests, issue tracker .. good way learning how to integrate everything [16:54] bolvarak: leave lots of comments and incorporate some indentation standards and you'll be fine [16:54] johnnywengluu: =) [16:54] johnnywengluu: how do you generate online docs with markdown? [16:54] bolvarak: and always remember KISS [16:55] johnnywengluu: yeah my DSL is really simple [16:55] AntelopeSalad: is this the 100% standard way to use mustache with express? http://bitdrift.com/post/2376383378/using-mustache-templates-in-express [16:55] darshanshankar has joined the channel [16:56] astropirate has joined the channel [16:56] micheil: johnnywengluu: perhaps rather than using an object or array to store your routes you have a method that creates them [16:57] johnnywengluu: its part of the DSL [16:57] micheil: var myapp = mylibrary(app); [16:57] micheil: myapp.route(...) [16:57] micheil: even though you don't really need a layer on top of express for routing. [16:57] micheil: you just need something for loading files. [16:58] johnnywengluu: micheil: yeah its part of the DSL [16:58] johnnywengluu: making a workflow framework for automating stuff on the backend [16:58] micheil: johnnywengluu: seriously, DSL's are overrated. [16:58] johnnywengluu: "DSL" .. using pure js .. i shouldn't call it DSL [16:58] johnnywengluu: its a framework =) [16:59] johnnywengluu: well .. lets see of the outcome [16:59] johnnywengluu: since there are no good "script" automation frameworks for the backend [17:00] perlmonkey2: There wouldn't happen to be a nice fully baked widely used CMS for node is there? [17:00] SleH: Is there any particular reason why you shou? [17:00] SleH: Is there any particular reason why you should/shouldn't run node js without a reverse proxy*? [17:01] johnnywengluu: really .. there has never been one around .. only frameworks for css, js, ruby etc for automating stuff for creating web apps .. but a lot of coders tend to do things manually [17:01] johnnywengluu: or using some scripts to automate some tasks .. i want every task i do twice to be automated [17:01] gazumps has joined the channel [17:02] onr: SleH: no [17:02] johnnywengluu: there should be a solid framework for getting rid of these ridiculous manual tasks once and for all .. so tired of searching and never finds one no matter platform [17:03] SleH: So it's fine to have a nodejs webapp publicly facing? [17:03] onr: SleH: ofcourse [17:03] Bonuspunkt: it is already? [17:04] SleH: Alright, just checking - people suggested putting it behind nginx, but I can't do that sadly, kills websockets. [17:04] johnnywengluu: so this would be kinda new gen framework .. a framework to automate for the coders, so the coders can automate for the users [17:05] astoon has joined the channel [17:06] postwait has joined the channel [17:06] onr: SleH: although i dont give heck to websockets and im an nginx community volunteer, im going to use pure node.js in my startup [17:06] micheil: perlmonkey2: for a CMS, do you _need_ to use node? [17:07] SubStack: johnnywengluu: there are good kinds of automation and bad kinds [17:07] SubStack: good kinds let you describe the problem in an abstract, high-level way [17:07] SubStack: bad kinds use code generation and leave you stuck with crappy scaffolding after the interfaces change [17:07] harth has joined the channel [17:08] micheil: onr: node.js is pretty safe to run bare on the wire (ie, not fronted with a reverse proxy) [17:08] SleH: Alright good to knwo [17:08] SleH: know* [17:08] ralphholzmann_ has joined the channel [17:09] johnnywengluu: SubStack: you mean abstraction [17:09] johnnywengluu: so the underlayer can change without affecting the code [17:09] losing has joined the channel [17:10] dve has joined the channel [17:10] gozala has joined the channel [17:11] ralphholzmann has joined the channel [17:11] tokumine has joined the channel [17:12] edw1 has joined the channel [17:12] johnnywengluu: my framework is not for automating actions for you .. you create these actions (functions) yourself .. then you can put them inside workflows that you can trigger .. if one action fails it calls the undo actions that you have defined so everything will be reverted .. and some more features [17:13] shaunau: with regard to running node http "naked", what about all the good stuff web servers bring for free, load balancing, url rewriting, max connection limits so not to kill your server, htaccess style security, cacheing etc. I'd rather have this stuff from a battle tested web server used by 1000s of sites that build all that into my app. That way i can concentrate on delivering my business logic rather than all the scaffolding. [17:13] jimt_ has joined the channel [17:13] johnnywengluu: so its up to you if you inside your action write code to generate code [17:13] mscdex: shaunau: there are node modules that bring a lot of that stuff [17:14] xandrews has joined the channel [17:14] shaunau: mscdex: yeah i guess [17:15] mscdex: and besides, using htaccess slows things down [17:16] abraham has joined the channel [17:17] johnnywengluu: SubStack: one of the tasks i hate to do manually is to create a project .. i create the folder, git initialize it, create README, LICENSE, subfolders, create package.json, git commit all, create github repo, push it .. etc [17:17] johnnywengluu: i want to get rid of these kind of problems [17:18] jimt has joined the channel [17:18] johnnywengluu: or if i read how to use ssh to generate keygen .. i dont want to rely on memory .. i want to write them down in an action then i have it there and can just use it in a workflow [17:18] jscheel: hey guys, I'm having trouble with the connect's bodyParser (in express). I keep getting an undefined error: http://pastie.org/1747892 [17:19] cronopio has joined the channel [17:19] gtramont1na: Hey all. What is the most common node project structure? [17:20] johnnywengluu: gtramont1na: npm =) [17:20] johnnywengluu: package.json, lib/ , bin/ [17:20] johnnywengluu: README [17:20] johnnywengluu: LICENSE [17:20] johnnywengluu: look around popular modules [17:21] gtramont1na: Where do you keep your tests? along with bin? [17:21] johnnywengluu: tests/ [17:21] gtramont1na: right. [17:21] johnnywengluu: it has to be a npm package [17:21] johnnywengluu: or it isn't a node module [17:21] jakehow has joined the channel [17:21] johnnywengluu: =) [17:22] gtramont1na: Yeah, thats what I've been doing. Just wanted to check with the community what is the most common structure. [17:22] gtramont1na: Thanks a lot! [17:23] syn|code has joined the channel [17:23] gtramont1na: so inside lib/ do you keep your dependencies? [17:23] gtramont1na: Or this is your project itself. [17:24] gtramont1na: When using npm to manage my dependencies it, by default, puts all libs inside node_modules/ [17:24] marcosvm has joined the channel [17:25] johnnywengluu: i think you should put all your project files inside lib/ [17:25] gtramont1na: what goes inside bin/ then? [17:25] johnnywengluu: set the "lib" property in package.json to point to your lib file [17:25] johnnywengluu: the file you want to be able to run on command line [17:25] SubStack: false [17:25] johnnywengluu: no? [17:25] ckknight: anyone have any ideas why expresso --coverage doesn't seem to actually give a coverage report? [17:25] SubStack: johnnywengluu: that's bin [17:26] johnnywengluu: thats what i said [17:26] SubStack: oh I read it with gtramont1na's question [17:26] SubStack: carry on [17:27] johnnywengluu: you specify the bin file location /bin/ in your package.json [17:27] SubStack: jscheel: well paste the code, how about? [17:27] Lagnus has joined the channel [17:28] gtramont1na: So bin/ would only have a single .js (or .coffee or whatever) which is the entry point of the app? [17:28] johnnywengluu: gtramont1na: look at some packages like http-console, npm, underscore, express [17:28] johnnywengluu: look at their package.json [17:28] johnnywengluu: and their structure [17:28] johnnywengluu: and you'll get it pretty fast [17:28] Yuffster has joined the channel [17:28] gtramont1na: I've been looking at some of them, but I noticed the lack of tests in some of them. [17:28] Blazento has joined the channel [17:28] johnnywengluu: gtramont1na: yeah from the command line [17:29] micheil: V1: ping [17:29] SubStack: gtramont1na: There is nothing special about the directory names. They are conventions [17:29] V1: micheil: Pong [17:29] gtramont1na: Correct. These conventions that I want to gather... [17:29] johnnywengluu: and in the lib/ there is the entry point for your module when people do require("lib_name") to get your lib [17:29] johnnywengluu: conventions are good to know [17:30] johnnywengluu: so we talk the same language [17:30] gtramont1na: Exactly! :-) [17:30] johnnywengluu: some do index.js in root to be the "lib" entry point from package.json [17:30] jscheel: SubStack: here's the basics: http://pastie.org/1747913 [17:30] johnnywengluu: others lib/package_name.js [17:30] jscheel: (well, the relevant parts) [17:31] SubStack: I try not to have my packages grow big enough to need a lib/ [17:31] SubStack: just an index.js [17:31] gtramont1na: So here we've been talking about creating a module/lib so someone can use it. But how about a webapp? [17:31] johnnywengluu: okay [17:31] johnnywengluu: gtramont1na: then you don't need a lib/ entry point [17:31] johnnywengluu: or you could [17:32] johnnywengluu: if its a web app others should use in their code [17:32] stagas has joined the channel [17:32] jscheel: SubStack: oops, ignore the incorrect form url in that pastie , it's already fixed [17:32] johnnywengluu: or if its a web app you trigger from the command line .. then its bin/ [17:33] johnnywengluu: or you just have an app.js in your root .. and run it with node app.js [17:33] Horofox: any1 have an idea of how much it would cost me to have ~200 concurrent users, using socket.io and stuff? [17:33] jscheel: SubStack: the error is thrown before the route callback is fired [17:33] jimt has joined the channel [17:33] shiawuen has joined the channel [17:33] johnnywengluu: its pretty simple with express [17:33] V1: Horofox: 1 - 5mb in memory [17:33] johnnywengluu: express my_app and it will create everything for you [17:34] gtramont1na: Hum. I didn't know about this express command line! Thanks for the tip! I was using it manually. I'll give it a try! [17:34] Horofox: V1: ok ty [17:34] johnnywengluu: gtramont1na: express is very good framework that doesn't hide node.js [17:34] devrim1 has joined the channel [17:35] jscheel: hehe, I didn't know about the express cli either, that's great [17:35] felixge has joined the channel [17:35] felixge has joined the channel [17:35] AntelopeSalad: express does seem like a nice start but i wish he had better documentation... [17:35] johnnywengluu: you prefer var fn = function() {} or function fn() {} ? [17:35] johnnywengluu: AntelopeSalad: he has quite good doc [17:36] hasenj has joined the channel [17:36] itistoday has joined the channel [17:36] AntelopeSalad: for example it's been over an hour now and i still can't figure out how to get mustache working it [17:36] johnnywengluu: he has quite good support to =) [17:36] itistoday: where does npm install stuff to on OS X? [17:36] johnnywengluu: just email him [17:36] johnnywengluu: he is always around here too [17:36] gtramont1na: johnnywengluu: var fn = function() {} is different from function fn(); [17:37] AntelopeSalad: it's probably something basic (new to node), but there needs to be way more hand holding going on to get newbies myself going [17:37] AntelopeSalad: *like myself [17:37] johnnywengluu: yeah i know the diff is between parsing and run time [17:37] johnnywengluu: should i care? [17:37] ncb000gt has joined the channel [17:37] johnnywengluu: it sounds like declaring it in parse time is better if it doesn't change [17:38] johnnywengluu: and i save memory dont i? [17:38] jscheel: AntelopeSalad: not sure if moustache and express work together, but the express documentation is pretty clear on registering a different templating engine [17:39] AntelopeSalad: his documentation for template engines includes nothing but a link to the templates [17:39] galaxywatcher has joined the channel [17:39] gtramont1na: I'm not sure about the memory saving. When I'm writing an API, I declare all functions as variables and then return { someFunction: someFunction }; [17:39] jscheel: AntelopeSalad: you haven't read all the documentation then, one sec [17:39] gtramont1na: U know what I mean? [17:40] AntelopeSalad: jsc: nope, i just went to the guide link on the main site and that's all it's giving me [17:40] jscheel: AntelopeSalad: look under settings, and under view rendering [17:41] jscheel: AntelopeSalad: for example, here's what I do for jquery template: http://pastie.org/1747942 [17:41] jscheel: AntelopeSalad: again, I've never tried moustache (I probably should) but it's worth a try [17:42] stonebranch has joined the channel [17:42] AntelopeSalad: this is definitely a start [17:42] mscdex: somehow i think moustache should have a filter function called 'shave' [17:42] markc has joined the channel [17:44] jarek has joined the channel [17:44] jarek has joined the channel [17:44] AntelopeSalad: so in theory if i npm install mustache it should just magically work following the view rendering hints? [17:44] pifantastic has joined the channel [17:45] itistoday: nevermind, figured it out [17:45] Vertice has joined the channel [17:45] itistoday: the FAQ on the github page is wrong... "npm root" is not a command, i think it should read "npm config get root" [17:45] itistoday: same for "npm bin" [17:45] johnnywengluu: hm [17:46] johnnywengluu: i want to use mustache too [17:46] narf_: is there any alternative to connect-auth out there? :) [17:47] trotter has joined the channel [17:48] pengwynn has joined the channel [17:48] crodas has joined the channel [17:48] gtramont1na: Is it only me or I can't make zombie.js work with the latest node version? [17:49] SamuraiJack has joined the channel [17:51] johnnywengluu: hm [17:51] malkomalko has joined the channel [17:51] johnnywengluu: how good is zombie to simulate real browsers .. even if it works on zombie how do i know it will work on FF, Chrome etc [17:52] matschaffer has joined the channel [17:54] gtramont1na: I want to give zombie a try, but I can't install it here. My thoughts about using a headless browser is to perform functional tests and get a fast feedback. Then, if it passes this round of tests, then run against a real browser. [17:54] jarek_ has joined the channel [17:55] timcosgrove has joined the channel [17:55] timcosgrove has left the channel [17:56] gtramont1na: The only down side of using it, I believe we can't reuse the same tests to run agains a real browser. I mean, in order to run agains a real browser we'd need something like Selenium. [17:56] jscheel: well, crap, when I initialize a new project, I don't get the error [17:58] jscheel: I wonder, the error is happening in querystring... could another module I am using be loading a different version of querystring on top of the version connect loads? [17:59] Guest64113 has joined the channel [17:59] sveisvei has joined the channel [18:01] Me1000 has joined the channel [18:03] doubletap has joined the channel [18:03] doubletap has left the channel [18:03] indutny has joined the channel [18:05] blueadept has joined the channel [18:08] jscheel: looks like node-jqtpl is the culprit [18:09] jscheel: haven't debugged it yet, but it looks like node-jqtpl is already parsing the request body for me, so then requestBody in connect tries to parse an object instead of a string [18:09] jscheel: maybe [18:10] tbranyen: jscheel: that doesn't make much sense [18:10] tbranyen: why would jqtpl do anything like that? [18:10] jscheel: tbranyen: ? [18:10] jscheel: tbranyen: hmm, good point, it's only downstream [18:10] malkomalko has joined the channel [18:10] beckje011 has joined the channel [18:10] tbranyen: do you have any code to pastie? seems like you may just be doing something wrong with jqtpl? [18:11] jscheel: tbranyen: http://pastie.org/1747913 [18:12] jscheel: tbranyen: I no jqtpl in there right now, just the relevant code [18:12] m64253 has joined the channel [18:13] tokumine has joined the channel [18:14] hornairs has joined the channel [18:15] astoon has joined the channel [18:18] carllerche has joined the channel [18:19] fadeddata has joined the channel [18:19] jscheel: tbranyen: huh, interesting. The top form works fine, the bottom one throws the error. http://pastie.org/1748051 [18:19] jscheel: tbranyen: this is the error: http://pastie.org/1747892 [18:20] narf_: is there any user auth module besides connect-auth out there? [18:22] jscheel: doh [18:22] jscheel: I'm an idiot [18:23] jscheel: it's been too long since I've written forms by hand [18:23] sivy has joined the channel [18:23] jscheel: user[login] !== [login]user [18:23] jscheel: tbranyen: figured it out, sorry! [18:24] robotarmy has joined the channel [18:24] matschaffer has joined the channel [18:25] cjm has joined the channel [18:25] pauls has joined the channel [18:28] stonecobra has joined the channel [18:32] carllerche has joined the channel [18:34] Locke23rus has joined the channel [18:35] dgathright has joined the channel [18:35] carllerche has joined the channel [18:36] brianmario has joined the channel [18:37] ckknight: Would anybody like to read over a README for my routing library? It's not published yet, just looking for insight and feedback. https://gist.github.com/db195a5575878d90855b [18:37] carllerche has joined the channel [18:38] tokumine has joined the channel [18:39] locke23rus has joined the channel [18:39] tbranyen: ckknight: what's different between that and the routing express provides? [18:40] tbranyen: converters look neat [18:40] ckknight: url generation and the converter system, as well as aggressive caching and performance concerns [18:40] thiessenp has joined the channel [18:41] onr: ckknight: README looks okay. any chance to add a coffeescript example? [18:41] tbranyen: ckknight: yeah i had to scroll to pretty much the bottom to see what was different, might want to display the differences more prominently [18:41] ckknight: onr: coffeescript is easy, just get rid of function, add ->, and remove semicolons :P [18:41] ckknight: tbranyen: well, I wanted to give a beginner's POV initially, then get more advanced. [18:42] thiessenp: hour1 newb here - do people have a favorite DB for node.js - mongolDB looks fun? [18:42] softdrink has joined the channel [18:42] onr: ckknight: well, C is easy too. just define functions before using them :D [18:43] ckknight: onr: I don't wanna do a coffeescript equivalent for every example, but if you'd like me to do one for you, it'd be easy enough [18:43] onr: ckknight: no, thank you very much. it just what im looking for now :) [18:44] ckknight: routing (routes) -> routes.get '/', (req, res) -> res.end 'GET /' [18:44] ckknight: :P [18:44] ckknight: tbranyen: any API suggestions? [18:45] ncb000gt: ckknight: how is this really that different than what already exists? [18:45] ckknight: ncb000gt: quoting myself from a minute ago: "url generation and the converter system, as well as aggressive caching and performance concerns" [18:45] ncb000gt: yea, i failed to read that [18:45] ncb000gt: :) [18:46] ncb000gt: but, cool [18:46] ncb000gt: do you have any benchmarks proving your performance concerns? [18:46] trotter has joined the channel [18:46] ncb000gt: the caching side would be nice, and would add to some nice performance [18:46] ckknight: yeah, some internal ones, but I plan on cleaning them up [18:47] ckknight: things are split up and organized in a tree structure so that (in my real-world example) what would theoretically take 700 regexes is down to 35 in the worst-possible case. [18:47] ncb000gt: ckknight: cool, i'd say, add your reasoning for doing this to the readme, didn't seem to be there [18:47] ncb000gt: and then also show benchmarking proving your case [18:48] matschaffer has joined the channel [18:48] ckknight: I'm more worried about the API being good than benchmarks at this point [18:48] prettyrobots has joined the channel [18:49] ckknight: as far as the feedback I want :P [18:52] kriszyp has joined the channel [18:52] cloudhead2 has joined the channel [18:53] orospakr has joined the channel [18:53] thiessenp: mongoldb it is :) does anyone have experience with express framework (or is there a better one out there to bridge node.js to mongoldb)? [18:53] warz has joined the channel [18:53] warz has joined the channel [18:54] dragonmantank has joined the channel [18:54] ckknight: thiessenp: do you mean mongodb? [18:54] oscarkilhed: ls [18:54] ckknight: oscarkilhed: no files found in this directory. [18:55] ckknight: thiessenp: if so, express has nothing to do with your database provider. I think you are more looking for something like Mongoose. [18:55] thiessenp: ckknight: oh lol yes, indeed I do (for some reason I really want it to be called Mongol so I can picture crazy mongoloids on hourses etc. :-) [18:55] ckknight: mongols and mongoloids are also distinct groups. :P [18:56] thiessenp: ckknight: ouch will hit wikipedia to learn some history first [18:56] ckknight: well, mongols are a subset of mongoloids [18:56] gtramont1na: lol [18:57] gtramont1na: hey, speaking of mongodb and node. Does anyone know about any activerecord nodejs implementation? [18:58] ckknight: Mongoose seemed pretty close as far as getting the job done what one would've used ActiveRecord for [18:58] ckknight: but their APIs do differ [18:58] thiessenp: ckknight: ok so mongol is an umbrella term for tribes, one of which was the mongoloids - ok got it :-) Also, cool, will check out mongoose [18:58] ckknight: no, thiessenp [18:59] ckknight: mongoloids are a term for people of Asian decent. Mongols are a race of people from Mongolia that are of Asian decent. [18:59] saikat has joined the channel [19:00] gtramont1na: Is there a generic active record implementation? Mongoose seems pretty coupled with mongo. [19:00] xdamman has joined the channel [19:00] thiessenp: ckknight: "Its use originated from a variation of the word Mongol, a people who are considered one of its main proto-populations..." and skipping a bit "The term comes from the Mongol people of East Asia, who invaded much of Eurasia during the 1" ... so yes and no [19:00] gtramont1na: I mean, one you can replace your db easy. [19:01] ckknight: thiessenp: what I said was correct. [19:01] thiessenp: ckknight: exactly and so was what I said [19:02] PhilK has joined the channel [19:02] trotter has joined the channel [19:08] joe__ has joined the channel [19:08] perlmonkey2 has joined the channel [19:08] rohit_nsit08 has joined the channel [19:08] mwdev has joined the channel [19:13] ckknight: Oh yeah, I also need help coming up with a better name for my routing library. [19:15] SubStack: ckknight: kraut [19:15] lord_pall has joined the channel [19:15] lord_pall: hiyo [19:15] ckknight: I don't need no Jerries my routing framework [19:15] ckknight: or is it Gerries? [19:15] ckknight: howdy, lord_pall [19:16] lord_pall: Any recs for an ide for node dev? [19:16] tbranyen: vim [19:16] slickplaid: cloud9? [19:16] thiessenp: ckknight: you could call it mongol :-) [19:16] lord_pall: anything with intellisense? [19:16] lord_pall: :) [19:16] slickplaid: http://cloud9ide.com/ [19:16] ckknight: thiessenp: I'd worry that would make people associate it with mongo. [19:16] lord_pall: ooh. hadn't seen cloud9 [19:16] thiessenp: ckknight: hmm good point [19:17] gtramont1na: lord_pall: VI or gmate [19:17] lord_pall: cant use vi. Psychologically incapable [19:17] carllerche has joined the channel [19:17] indutny has joined the channel [19:17] patcito has joined the channel [19:18] tbranyen: trying out cloud0 [19:18] tbranyen: cloud9* [19:18] locke23rus has joined the channel [19:19] gtramont1na: I haven't seen any advantage of using cloud9. Am I missing something? [19:19] tbranyen: you're missing the point of cloud apps [19:19] warz has joined the channel [19:19] tbranyen: i don't see anything particularly great with this editor [19:20] lord_pall: cloud apps rule until you drop connection [19:20] tbranyen: lord_pall: pretty sure this works offline [19:20] lord_pall: saves local? [19:20] lord_pall: 49 bucks a month is steep too [19:20] tbranyen: i'd have to try it, but sure it's not unheard of [19:20] tbranyen: lord_pall: cloud9 is free? [19:20] slickplaid: that's for the hosted version [19:20] lord_pall: free if it's open source [19:21] slickplaid: npm install cloud9 [19:21] slickplaid: win [19:21] lord_pall: wait what? [19:21] lord_pall: derp. That's neat [19:21] tbranyen: i'll stick with vim tho [19:22] slickplaid: komodo for me [19:22] tbranyen: yeah i was using komodo before vim [19:22] lord_pall: what's the best idiot grade db solution for node? just use the persistence framework? [19:22] lord_pall: komodo makes me mad [19:22] lord_pall: it [19:22] lord_pall: s' [19:22] lord_pall: oops. It's in a continual state of brokenness for me [19:22] slickplaid: really? I have yet to have it be broke/crash [19:22] gtramont1na: That's my point. Downloading and installing it, doesn't give me any advantage over other IDEs (or editors). It is not a cloud app anymore then. [19:23] slickplaid: compared to eclipse which crashed regularly [19:23] lord_pall: could be worse. Could be monodevelop. Ha [19:24] dgathright has joined the channel [19:24] alex_b has joined the channel [19:24] kmiyashiro has joined the channel [19:25] Viriix has joined the channel [19:25] slickplaid: I'm not a regular cloud9 user. I just know about it and thought it definitely had potential. It can run/debug node apps in the ide and do several other neat features. Looked promising last time I checked it out [19:26] kmiyashiro has joined the channel [19:27] gtramont1na: Cool! I'm not saying that cloud9 is not a good ide. Just wanted to know which are the features that make it different from the other ides. [19:27] slickplaid: as far as I know, it's written with node.js [19:27] gtramont1na: yep [19:28] lord_pall: so with cloud9, how do i get modules? [19:28] slickplaid: I'm not sure. Maybe just try it out? It'll only cost you a couple keystrokes. [19:29] vipaca has joined the channel [19:29] vipaca has joined the channel [19:30] gtramont1na: I tried it out about 6 months ago. Maybe it is worth it to try again with other eyes... [19:30] fermion has joined the channel [19:31] lord_pall: holycrap [19:31] lord_pall: local cloud9 is neat [19:33] oplaque has joined the channel [19:33] oplaque has joined the channel [19:33] jtsnow has joined the channel [19:33] jtsnow has left the channel [19:37] hellp has joined the channel [19:38] meandi has joined the channel [19:39] herbySk has joined the channel [19:39] fadeddata has joined the channel [19:40] fermion: hey everybody — anyone familiar with mongoose? [19:41] lord_pall: okay so how do I install a module with cloud9? [19:41] lord_pall: or just grab the source manually? [19:43] baudehlo has joined the channel [19:44] langworthy has joined the channel [19:47] ckknight: fermion: I've played with it a little [19:47] fermion: ckknight: cool — just found this post that fixed my issue: http://groups.google.com/group/mongoose-orm/browse_thread/thread/ad1fa0e52588ab20/0c2c4c68192858b1?lnk=gst&q=Schema+undefined#0c2c4c68192858b1 [19:48] fermion: I'd assumed the same thing, that [] around custom types indicated a Collection [19:48] fermion: oops [19:48] fermion: self help ftw [19:50] lord_pall has left the channel [19:55] perlmonkey2: are there any channels with more users? [19:56] warz has joined the channel [19:57] ckknight: perlmonkey2: yes, but they might not be as focused on node.js [19:58] kenbolton has joined the channel [19:59] baudehlo: why do you need more users? [19:59] V1: just type /list in your irc client to see all channels + user count [19:59] robotarmy has joined the channel [20:00] V1: O M G, #nodejs almost beats #rubyonrails in user count ;) [20:01] ckknight: more users isn't always a good thing, too, you want knowledgeable users who are willing to help :P [20:01] matschaffer has joined the channel [20:02] perlmonkey2: ckknight: it offers some type of measure of how popular the project is. [20:02] V1: erm nop? [20:03] ckknight: not everyone uses IRC [20:03] V1: The php channel has less uers than the Node.js channel.. Yet PHP is more populair than node [20:03] ckknight: and even if you were to go by something like github projects, not everyone publishes to there [20:03] perlmonkey2: thank god [20:03] gozala has joined the channel [20:04] perlmonkey2: which is nice, bcause if everyone published there, it might not be so responsive [20:04] ckknight: nah, github is pretty performant, they could just throw more hardware at it, worst case :P [20:07] ngs has joined the channel [20:09] tbranyen: yeah github has a few hiccups every now and again [20:09] tbranyen: but its pretty stable considering [20:10] V1: We all know they are stable because they use Node.js ;) [20:10] tbranyen: They do? [20:10] V1: Yes, there download zip/tar server is powered by node [20:10] tbranyen: oh weird [20:11] tbranyen: kind of a strange thing to use node for [20:11] V1: tbranyen: https://github.com/blog/678-meet-nodeload-the-new-download-server [20:12] pkrumins has left the channel [20:13] disq has joined the channel [20:13] ash_ has joined the channel [20:14] ash_: hi, which async control flow library do you guys recommend? [20:14] ash_: there are quite a few on github, hard to choose [20:14] oplaque: Using NowJs, could anyone educate me on this problem: http://pastie.org/1748297 I left comments in the code. [20:14] ryah: ash_: async looks nice [20:15] ryah: i haven't used it personally [20:15] ash_: https://github.com/caolan/async [20:15] ash_: this one? [20:17] jesusabdullah: v8> ":alnum:anum! doop doop".replace(/[^[:alnum:]]/, '') [20:17] v8bot: jesusabdullah: ":alnum:anum! doop doop" [20:17] jesusabdullah: v8> ":alnum:anum! doop doop".replace(/[^:alnum:]/, '') [20:17] v8bot: jesusabdullah: ":alnum:anum doop doop" [20:17] jesusabdullah: v8> ":alnum:anum! doop doop".replace(/^[:alnum:]/, '') [20:17] v8bot: jesusabdullah: "alnum:anum! doop doop" [20:17] ckknight: I have updated the Readme for my routing framework (which I've named Escort), if anyone would like to view it and give me feedback, I'd appreciate it: https://gist.github.com/db195a5575878d90855b [20:17] jesusabdullah: Now I feel REALLY silly [20:17] jesusabdullah: Now I feel REALLY silly [20:18] ckknight: jesusabdullah: you are pretty silly. [20:18] f1lt3r_ has joined the channel [20:19] Country has joined the channel [20:21] trotter has joined the channel [20:23] devrim has joined the channel [20:23] Andi5 has joined the channel [20:24] roflwffbbq2001 has joined the channel [20:25] roflwffbbq2001: Hi, Does anyone know about a good "deployment" guide / article for a node / express / mongodb application? Just looking around for some good advice. [20:26] jesusabdullah: Hmm [20:26] jesusabdullah: roflwffbbq2001: I don't, but you may find something useful at howtonode.org [20:26] jesusabdullah: That's the site, right? [20:26] jesusabdullah: Yeah [20:27] jesusabdullah: Anyways: I don't KNOW that there's an article there, but it's a place I'd check [20:27] roflwffbbq2001: Ah well, didn't know about that blog, looks like a good resource anyhow, thanks. [20:28] pifantastic has joined the channel [20:30] patzak has joined the channel [20:31] gtramont1na: Hey all. Does anyone know of a good CI server which supports node? I know Jenkins has a nodejs plugin. is there any other CI? [20:40] tim_ has joined the channel [20:42] timcosgrove has joined the channel [20:42] timcosgrove has left the channel [20:44] sam0t has joined the channel [20:45] crodas has joined the channel [20:46] NuckingFuts has joined the channel [20:46] NuckingFuts: Daaaaaamn, Firefox 4, y u so freezy? [20:47] NuckingFuts: I'm actually tempted to go back to Firefox 3.6 or just to an earlier FF4 beta :/ [20:47] NuckingFuts: I liked beta 9, it was a good beta. [20:47] Kiba has joined the channel [20:47] Kiba: hello [20:47] Kiba: I got a problem with installing nodejs [20:47] Kiba: http://pastie.org/1748527 [20:47] NuckingFuts: The UI was way better in FF4b9 than in the released version, it's pathetic. [20:48] Kiba: am using nvm [20:48] Kiba: is that a good idea? [20:49] NuckingFuts: nvm? [20:49] Kiba: Node Version Manager [20:49] Kiba: like rvm, but for node.js [20:49] Kiba: I did nvm install v0.4.5 [20:49] Kiba: and it comes up with this error [20:49] Kiba: http://pastie.org/1748527 [20:50] NuckingFuts: Uh IDK [20:50] NuckingFuts: Never used NVM, what OS is this? [20:50] tbranyen: looks like the wrong version of python or something [20:50] DoNaLd`: nave usemain 0.4.5 [20:50] tbranyen: Kiba: python --version is 2 right? [20:50] NuckingFuts: ACTION retreats and lets others handle it [20:50] Kiba: 3.2 [20:50] tbranyen: Kiba: ;) thats the issue [20:51] tbranyen: do you have python2? [20:51] Kiba: python2 --version [20:51] Kiba: Python 2.7.1 [20:51] Kiba: [20:51] Kiba: yes [20:52] tbranyen: yeah maybe try symlinking python2 to python [20:52] tbranyen: Kiba: are you on arch linux? [20:52] Kiba: yes [20:52] ncb000gt: or just play with the paths for your nvm install [20:52] tbranyen: hehehe [20:52] tbranyen: Kiba: yeah i kind of want to fix up the nodejs python scripts to not fail for us arch users [20:53] tbranyen: ncb000gt: node will not build with python3 as the default python [20:53] ParadoxQuine has joined the channel [20:54] ncb000gt: tbranyen: hence playing with the paths [20:54] ncb000gt: PATH=/somepath/:$PATH nvm install v0.4.5 [20:54] ncb000gt: should do the trick rather than changing symlinks [20:55] tbranyen: ah yeah i see what you mean putting the python2 path first [20:55] ncb000gt: yep [20:55] tbranyen: i haven't looked back from symlinking tho [20:55] ncb000gt: sure, and maybe that is fine [20:55] tbranyen: word isn't ready for python3 yet [20:55] tbranyen: world* [20:55] ncb000gt: heh [20:56] ncb000gt: i haven't moved to py3 yet [20:56] ncb000gt: still work with 2 when i use python [20:56] tbranyen: yeah i don't see the point [20:56] tbranyen: massive api breaking release doesn't entice me [20:56] ckknight: Python3 has a lot of benefits over Python2 [20:57] ckknight: like sane string handling [20:57] ckknight: but yeah, API issues... [20:58] Kiba: hmm [20:58] Kiba: so I must modify nvm script to use python2 [20:58] Kiba: instead of python [20:59] matjas has joined the channel [21:00] Kiba: so you guys suggest that I should get of python3 [21:01] tbranyen: no i suggest that [21:01] Kiba: and symlink python2 to python? [21:01] tbranyen: i don't speak for everyone [21:01] ncb000gt: Kiba: if you don't want to change the symlink try the path bit [21:02] ncb000gt: PATH=/path/to/python2/bin/dir/:$PATH nvm install v0.4.5 [21:02] Kiba: so [21:03] Kiba: I have to modify my .bashrc? [21:03] ncb000gt: no [21:03] ncb000gt: just type that on the command line [21:03] Kiba: what if I have to use nvm again? [21:03] ncb000gt: it'll change the path scoping for that command [21:03] ncb000gt: then you have to type that again [21:03] Kiba: ACTION removed python [21:04] ncb000gt: lol [21:06] jimt_ has joined the channel [21:06] Kiba: http://pastie.org/1748575 [21:06] Kiba: hmm [21:06] joe__ has left the channel [21:07] Kiba: ACTION got rid of the package [21:07] tim_: kiba you could also try nave, nvm is for a similar purpose isnt it ? [21:08] Kiba: tim_: I invested effort in understanding and fixing my nvm installation [21:09] Kiba: b y using nave, I have to start all over again [21:09] Me1000 has joined the channel [21:09] Kiba: ACTION wonders if he is commiting a sunk cost fallacy [21:09] Kiba: well [21:09] Kiba: it's working anyway [21:09] Kiba: so far [21:11] mraleph has joined the channel [21:11] jimt has joined the channel [21:12] synkro has joined the channel [21:12] spinron_ has joined the channel [21:13] spinron__ has joined the channel [21:14] heavysixer has joined the channel [21:15] alex_b has joined the channel [21:20] AlexMax has joined the channel [21:22] jimt_ has joined the channel [21:23] davidcoallier has joined the channel [21:24] Kiba: successful install! [21:24] Kiba: now what? [21:24] brianmario has joined the channel [21:26] tokumine has joined the channel [21:27] m64253 has joined the channel [21:27] k_89 has joined the channel [21:29] AntelopeSalad_ has joined the channel [21:30] jesusabdullah: Kiba: Install it again? XD [21:30] jesusabdullah: Kiba: What did you install? node.js? [21:30] jesusabdullah: Kiba: If that's the case, install npm next! [21:31] Kiba: jesusabdullah: it seems that I had already install npm automagically [21:32] Kiba: ACTION goes looks for coffeescript [21:33] m00p has joined the channel [21:33] alex_b has joined the channel [21:34] pquerna: morning [21:35] jakehow has joined the channel [21:36] mraleph has joined the channel [21:36] jesusabdullah: g'morn? [21:36] jesusabdullah: It's afternoon here [21:37] roflwffbbq2001 has joined the channel [21:37] roflwffbbq2001 has left the channel [21:37] themiddleman has joined the channel [21:38] Yuffster has joined the channel [21:39] volpe has joined the channel [21:40] no-gooder has joined the channel [21:41] ckknight: jesusabdullah: there's no time on the internet [21:41] jesusabdullah: No time at all! I'm LATE! [21:42] jesusabdullah: I'm procrastinating on my thesis by writing an array manipulation library [21:43] volpe: Is there an example somewhere of setting up an expressjs project with coffeescript? (sorry for noob question) [21:45] Aria has joined the channel [21:48] pquerna: always morning somewhere, just like its always beer-o-clock somewhere [21:50] joshbaptiste has joined the channel [21:54] ckknight: Alright, I've published my routing library, escort, please feel free to check it out: https://github.com/ckknight/escort [21:57] skohorn has joined the channel [21:57] xandrews has joined the channel [21:57] no-gooder has left the channel [21:59] kmiyashiro has joined the channel [21:59] beckje01 has joined the channel [22:00] pquerna: ryah: https://www.google.com/adplanner/planning/site_profile?hl=en#siteDetails?identifier=nodejs.org%252F&geo=001&trait_type=1&lp=true [22:01] ryah: nice [22:01] ryah: 100% male. awesome :( [22:02] pquerna: lol [22:02] pquerna: Affinity stuff is pretty cool. [22:04] jimt has joined the channel [22:08] kriszyp2 has joined the channel [22:16] paupau has joined the channel [22:16] dekz: morning [22:16] paupau: So when I stream.pause() it stops emitting 'data' events, but still emits 'end' if end-of-stream happens [22:16] paupau: morning to you too [22:17] paupau: shouldn't it pause the 'end' event too? [22:17] pquerna: paupau: yes, think of pause as more... i_advise_you_dear_neighbor_stream_to_kindly_send_me_less_data [22:17] langworthy has joined the channel [22:17] pquerna: but you might still get a data event [22:17] pquerna: or and end event [22:17] paupau: Oh. [22:17] pquerna: pause is advisory [22:17] pquerna: not absolute [22:18] paupau: Fair enough [22:18] paupau: So I should just buffer it instead then I guess [22:18] pquerna: well, you probally should still send a pause [22:18] pquerna: it'll make everything better [22:18] paupau: yeah [22:18] paupau: cool, thanks. [22:18] pquerna: but yeah, most people have to re-implment buffering possbly [22:18] paupau: docs should elaborate this though [22:18] paupau: stream.pause(): Pauses the incoming 'data' events. [22:19] paupau: Does a guy gotta write him a patch?! [22:19] paupau: TO GITHUB! [22:19] pquerna: +1, patch would be good about that [22:21] ryah: pquerna: did you accomplish compression disablement for twisted? [22:22] doubletap has joined the channel [22:23] kmiyashiro has joined the channel [22:24] pquerna: i ran into some problems with it in production enviromet, due to some load order issues with pyopenssl [22:24] pquerna: need to get back into fixing it [22:24] pquerna: (spent friday in LA, giants vs dodgers) [22:25] michaeld has joined the channel [22:25] doubletap has left the channel [22:29] spinron_ has joined the channel [22:29] spinron__ has joined the channel [22:31] AntelopeSalad has joined the channel [22:33] michaeld: quit [22:34] losing has joined the channel [22:35] sjbreen has joined the channel [22:36] Kholo has joined the channel [22:38] ajsie has joined the channel [22:39] fcarriedo has joined the channel [22:40] jimt_ has joined the channel [22:41] Sean_Colombo has joined the channel [22:41] Sean_Colombo: has anyone else ever had the problem that the redis client doesn't return from an hget clal? [22:41] Sean_Colombo: *call [22:41] slickplaid: which redis client? [22:41] Sean_Colombo: rc.hget('key', 'field', function(err, data){ console.log("THIS IS NEVER REACHED"); }); [22:42] Sean_Colombo: hmm [22:42] Sean_Colombo: npm install redis [22:42] Sean_Colombo: whichever that one gives you [22:43] tim_: also get the hiredis [22:43] Sean_Colombo: what's the hiredis? [22:43] tim_: it will speed up the redis client [22:44] tim_: https://github.com/mranney/node_redis [22:44] Sean_Colombo: do I need to change my require statement? [22:44] tim_: nope [22:44] tim_: it will look for it [22:44] tim_: do everything as normal [22:45] Sean_Colombo: installed... [22:45] Sean_Colombo: same problem [22:46] Sean_Colombo: :/ hmm [22:46] Sean_Colombo: other redis commands have worked with this client (incr, lpush, etc.) but this hget is failing. [22:46] Sean_Colombo: (where failing = never reaching the callback) [22:48] ParadoxQuine: where does the control flow reach before it just stops? as in, where in the client code? [22:48] Sean_Colombo: it gets past the code where i add the call... so execution keeps going. Just the callback never get called. Like this: [22:49] Sean_Colombo: console.log("This shows up"); [22:49] Sean_Colombo: rc.hget('key', 'field', function(err, data){ console.log("THIS IS NEVER REACHED"); }); [22:49] Sean_Colombo: console.log("This also shows up"); [22:49] tim_: look at the client code [22:49] Sean_Colombo: ahhh [22:49] ElZachary has joined the channel [22:49] tim_: the redis client [22:49] ParadoxQuine: yea, set a breakpoint on the call and step into [22:49] perlmonkey2 has joined the channel [22:49] ElZachary: I'm looking to hire a Node.js freelancer - fun and rewarding work - if interested please send me a PM with your hourly rates [22:50] Sean_Colombo: where do the packages get installed to... hmmm [22:50] ParadoxQuine: /usr/local/lib/node/ i think? that's where it is on os x [22:50] Sean_Colombo: ah, foudn it [22:51] ParadoxQuine: well technically to that /.npm/ but it symlinks he stuff in there to /node/ [22:51] Sean_Colombo: it's /usr/lib/node for me apparentyl [22:51] ElZachary: Alternatively just email me -- zackster@gmail.com -- looking for a freelance to help with CompassionPIt.com. Happy to pay your hourly rate. Thx! [22:52] tim_: check out node inspector, it is handy for debugging [22:52] mhooker has joined the channel [22:53] Horofox has left the channel [22:53] sveisvei has joined the channel [22:54] copongcopong has joined the channel [22:59] templaedhel has joined the channel [22:59] templaedhel: Anyone use weld.js here? [23:00] timmywil has joined the channel [23:01] pforpal has joined the channel [23:01] xiackok has joined the channel [23:02] jimt has joined the channel [23:03] pforpal: is there a console.log equivalent that doesnt parse %d and %s [23:03] pforpal: i am actually trying to write a real %d to the log [23:03] pforpal: i dont want it replaced by an integer [23:04] Croms has joined the channel [23:04] kriszyp has joined the channel [23:05] tfe_ has joined the channel [23:05] tfe_ has joined the channel [23:06] ParadoxQuine: escaping the % doesn't work? [23:06] technoweenie has joined the channel [23:06] xiackok has joined the channel [23:07] pforpal: console.log("%d") it outputs NaN, and i understand why [23:07] saikat has joined the channel [23:08] pforpal: i am generating C source code within node, lets not get into why [23:08] dekz: whats d? [23:08] pforpal: and i want to log the source code which contains a printf("%d", whatever) [23:08] gerad has joined the channel [23:09] tfe__ has joined the channel [23:09] ParadoxQuine: what does console.log("\%d") do? [23:09] pforpal: so if i escape the % then the source code is incorrect [23:09] ParadoxQuine: did you try sys.puts? [23:09] pforpal: thats also NaN [23:09] pforpal: oh ok let me try sys.puts [23:10] pforpal: console.log doesnt seem to let me escape no matter what [23:10] dekz: v8: console.log("%d"); [23:10] v8bot: dekz: "%d" [23:10] pforpal: > console.log("%d") NaN > [23:10] dekz: pastie? [23:11] pforpal: http://pastie.org/1748915 [23:11] pforpal: that is in the node console [23:11] tfe_ has joined the channel [23:12] marcosvm has joined the channel [23:14] pforpal: http://pastie.org/1748918 [23:14] aho: try %% [23:14] pforpal: gives %Nan [23:14] aho: odd [23:14] pforpal: very odd [23:14] Aikar: pforpal: % is for format codes [23:14] Aikar: you didnt pass one [23:15] ckknight: pforpal: when it detects % in the first argument, it expects there to be format parameters provided [23:15] ckknight: v8: console.log("%d", 5) [23:15] v8bot: ckknight: "%d" [23:15] ckknight: well that's wrong compared to running node locally (the bot) [23:15] Aikar: > console.log("%s", 1); [23:15] Aikar: 1 [23:15] aho: usually those % thingies can be escaped with yet another % [23:15] pforpal: it doesnt seem to work [23:16] ckknight: yeah, > console.log("%d%%", 50) gives "50%" [23:16] pforpal: im not trying to replace %d with an integer [23:16] Aikar: ckknight: same from wow community? [23:16] pforpal: im actually trying to output the string %d [23:16] ckknight: Aikar: yes [23:16] Aikar: hi :P lol yeah your name is of course known among wow devs :P [23:16] ckknight: as well it should be! [23:16] ckknight: :P [23:16] muk_mb has joined the channel [23:17] Aikar: as well as mine should be for FFXI :P lol [23:17] aho: -sysout String.format("%%d") [23:17] aho: %d [23:17] aho: works fine with java [23:17] Aikar: but ive retired from games now [23:17] aho: <: [23:17] ckknight: don't compare Java to ECMAScript, please. [23:17] tbranyen: lol [23:17] gerad_ has joined the channel [23:18] aho: i'm sure it works in c/c++, too [23:18] ckknight: true, my guess is that console.log is miscoded in that case. [23:18] tbranyen: aho: are you talking about console.log? [23:18] ParadoxQuine: pforpal: did you do sys.puts? [23:18] Aikar: err where the hell is dev tools on chrome [23:18] ParadoxQuine: pforpal: I just tried that and it worked like you want [23:18] aho: i'm talking about escaping those %d or whatever placeholders with an extra % [23:18] Aikar: its not on my menu anymore [23:19] tbranyen: Aikar: ctrl shift i [23:19] tbranyen: or cmd [23:19] pforpal: sys.puts("%d") > %d [23:19] ParadoxQuine: that's what you want right? [23:19] pforpal: yes it is [23:19] pforpal: its inconsistent with the rest of my application though [23:19] pforpal: not a big deal [23:19] tbranyen: aho: ah because console.log as a function always accepts a list of things to output, this is not the same as printf [23:19] pforpal: but im also curious why its not possible with console.log [23:20] tbranyen: so you can do console.log(obj1, obj2, obj3) [23:20] gtramont1na: Aikar: ctrl+shift+j? [23:20] Aikar: chrome nor firefox make %%d > %d so really shouldnt in node [23:20] Aikar: i worked [23:20] tbranyen: avoids the issue of type coercion [23:20] aho: that doesn't explain why %%d doesn't work [23:20] tbranyen: yes it does [23:20] tbranyen: "%%d" is a string that literally means %%d thats what console.log will output [23:20] tbranyen: that'd effing suck if it did anything else [23:21] Aikar: just because other langs may use that format, doesnt mean everything should [23:21] pforpal: > console.log("%%d") > %NaN > [23:21] aho: >>> console.log('asdf %d asdfsadf', 23) [23:21] aho: asdf 23 asdfsadf [23:21] aho: >>> console.log('asdf %%d asdfsadf', 23) [23:21] aho: asdf %d asdfsadf 23 [23:21] aho: works in firefox [23:21] ckknight: aho: just call it a bug. [23:21] ckknight: it's clearly buggy if "%%d" doesn't parse to "%d" [23:21] tbranyen: aho: interesting [23:21] Aikar: yeah WHEN passing an arg to fill the data in [23:21] dekz: v8: console.log('asdf %%d asdfsadf', 23) [23:21] v8bot: dekz: "asdf %%d asdfsadf" [23:21] aho: >>> console.log('asdf %%d asdfsadf') [23:21] aho: asdf %d asdfsadf [23:21] aho: also works [23:22] dekz: v8: console.log('asdf %d asdfsadf', 23) [23:22] v8bot: dekz: "asdf %d asdfsadf" [23:22] aho: in firefox, that is [23:22] dekz: Oh [23:22] tbranyen: heh those actually all work for me in node [23:22] pforpal: im on a mac using homebrew node if that makes a difference? [23:22] Aikar: that last one deks did seems like a bug [23:22] Aikar: %d should of been replaced [23:23] aho: should have :v [23:23] Aikar: is console.log provided by v8 or node? [23:23] flasomm_ has joined the channel [23:23] aho: node [23:24] aho: v8 itself is pretty naked :> [23:24] Aikar: boobs=good [23:24] Aikar: oh right diff kind of naked [23:24] ckknight: woo, chesticles! [23:24] aho: haha [23:24] aho: worst wort creation ever [23:24] aho: *word [23:27] pengwynn has joined the channel [23:27] varioust has joined the channel [23:27] ckknight: so who here is awesome and wants to do a code review of my work? ;-) [23:28] tbranyen: speaking of code reviews [23:29] ckknight: I'm happy to do someone's else's, I just want a little quid-pro-quo [23:29] randallagordon has joined the channel [23:30] tmpvar: ckknight, throw it up someone will peek [23:30] ckknight: https://github.com/ckknight/escort [23:30] tmpvar: `build it and they will come` [23:30] ckknight: I'd feel bad about whoring out my code, but it is an escort... [23:31] ckknight: MIT-licensed, so feel free to share with friends [23:31] ckknight: wonder how many other entendres I can think of... [23:32] __sorin__ has joined the channel [23:33] g3funk has joined the channel [23:39] varioust has joined the channel [23:40] max_dev has joined the channel [23:40] jscheel: anyone know why calling res.redirect() in express would corrupt an object I have stored in a session? [23:41] jscheel: the object has methods on it, which disappear after a redirect [23:41] jscheel: the rest of the objects properties are there though [23:42] heythisisdave has joined the channel [23:43] jscheel: here's the object I am storing in the session: http://pastie.org/1748983 [23:47] Horofox has joined the channel [23:50] max_dev has joined the channel [23:51] saikat has joined the channel [23:53] dilvie has joined the channel [23:53] xdamman has left the channel [23:56] nonnikcam has joined the channel [23:56] tracker1 has joined the channel