[00:00] opaque: techwraith: hmm. [00:00] aaronblohowiak: techwraith: nonce [00:00] techwraith: How do people ususally handle authentication over socket.io? [00:01] techwraith: (or even sessions?) [00:01] techwraith: Haven't played around with it enough to know... [00:01] aaronblohowiak: techwraith: i have used a nonce [00:02] kriszyp has joined the channel [00:02] therrg has joined the channel [00:02] techwraith: hmmm, interesting [00:03] techwraith: Probably a lot less complicated than it looks [00:03] ruben1194navarro has joined the channel [00:06] aaronblohowiak: techwraith: yes. if you have a session id, you just generate a nonce that you expose into the html that you have the client echo back, and then you can associate that socket.io client with the HTTP session [00:06] prettyrobots: Anyone know of an async JSON module? [00:06] techwraith: prettyrobots: What do you mean? [00:07] prettyrobots: Where I can define functions that will build JSON asynchronously? [00:07] no-gooder has joined the channel [00:07] jasong_at_apache has joined the channel [00:07] prettyrobots: It seems like I'm always doing something like this, building a JSON object with subqueries. [00:08] jonaslund: prettyrobots: what would you propose would happen if the object got mutated while building ? [00:09] Levi has joined the channel [00:09] prettyrobots: I propose that the object would be bunged. [00:10] ruben1194navarro has left the channel [00:10] no-gooder: check this out guys : http://kocakedi.com/ :) [00:10] namelessnotion_ has joined the channel [00:10] prettyrobots: jonaslund: Why would it be mutated. [00:10] prettyrobots: ? [00:10] danheberden has joined the channel [00:11] prettyrobots: I mean outside of the construction pattern? [00:11] jonaslund: oh.. you mean you want some kind of callback based building thing ? [00:12] prettyrobots: Yes. [00:12] ckknight_: ooh, lemme try [00:12] ckknight_: wait, my idea wouldn't be async [00:12] ckknight_: just lazy. [00:12] prettyrobots: I imagine that functions would be callbacks. [00:13] prettyrobots: ckknight_: Hey! I wanna write it if it don't exist! [00:13] ckknight_: pshaw [00:13] prettyrobots: ckknight_: pshaw? [00:14] ckknight_: onomatopoeia [00:14] heavysixer has joined the channel [00:14] ckknight_: okay, I know how to do it both lazy and async [00:14] arpegius_ has joined the channel [00:14] prettyrobots: I'm going to go have a run at this. [00:17] flippyhead_ has joined the channel [00:18] techwraith: prettyrobots, ckknight_: Gonna share when you're done? [00:18] prettyrobots: Absolutely. [00:18] ckknight_: of course [00:18] ckknight_: it'd be rude not to [00:19] Nexxy has joined the channel [00:19] gzmask has left the channel [00:23] wink__ has joined the channel [00:23] wink__: what is the best way to convert a 4 byte buffer to a number? [00:25] brolin has joined the channel [00:25] techwraith: Not sure if it's the best, but parseInt(buffer.toString()) might do it [00:26] techwraith: seems a bit silly though [00:26] ckknight_: wink_: are you treating it as a raw Int32 or is it a string that contains the textual representation of a number? [00:26] ckknight_: prettyrobots: okay, I have a lazy but non-async version: http://pastebin.com/h4BTGugN [00:26] ckknight_: prettyrobots: lemme work on the async version [00:28] techwraith: That's a good point ckknight_ [00:28] ckknight_: wink_: if you are treating it as a raw Int32, is it little-endian or big-endian? [00:30] Ond has joined the channel [00:30] demastrie1 has joined the channel [00:30] demastrie1 has left the channel [00:32] therrg has joined the channel [00:36] wink__: ckknight: sorry about that, i'd like it to be an int keeping the byte order in the buffer [00:36] shaunau: Using express is there any problem with return next() rather than next() for middleware routing? [00:36] tjholowaychuk: shaunau: it does not return a value so no that is fine [00:36] tjholowaychuk: doesnt matter [00:36] gmci has joined the channel [00:37] shaunau: tjholowaychuk: ok. thank you [00:37] ckknight_: next(); return; and return next(); are fundamentally equivalent, since they should both return undefined, and also, nothing looks at the return value anyway. [00:37] Guest98086 has left the channel [00:37] shaunau: ckknight_: cool, i find it reads easier with the return [00:38] wink__: so index 0 would be msb of the 4 byte int [00:38] wink__: i could do it by hand, i was just wondering if there was a shortcut ala toString [00:38] prettyrobots: value += Math.pow(256, bit_offset) * b [00:39] prettyrobots: value += Math.pow(256, bit_offset) * bit [00:39] prettyrobots: wink_: No shortcut last I checked. [00:39] wink__: booo :> [00:39] prettyrobots: Maybe something is exposed in the node.js code. [00:39] langworthy has joined the channel [00:39] wink__: i didnt see anything in the docs, i just wanted to make sure before i went and rolled it by hand [00:40] prettyrobots: There is some pack and unpack stuff in buffer. [00:40] prettyrobots: I'm not sure how far that has come along. [00:40] prettyrobots: Buffer. [00:40] prettyrobots: Look at the CPP code. Maybe there is something there you can use. [00:40] wink__: hasnt made it into the docs yet :P [00:40] prettyrobots: Or maybe it went away. [00:40] wink__: i'll dig through it [00:40] timcosgrove has joined the channel [00:40] tprice has joined the channel [00:40] timcosgrove has left the channel [00:41] tprice: need some advice [00:41] tprice: im doing something like "message = JSON.parse(message.toString());" [00:41] tprice: now the message is a json string [00:41] wink__: yeah, just glancing at the .h, im gonna have to do it by hand [00:41] tprice: but message does not turn into an object [00:42] Corren has joined the channel [00:42] prettyrobots: wink_: I'm not seeing it. [00:42] wink__: tprice: is message.toString() returning an actual json string? [00:42] prettyrobots: Disappeared. Roll your own. [00:42] wink__: on it [00:42] prettyrobots: Actual string string. [00:43] prettyrobots: wink_: Oh, thought you were asking about Buffer. [00:43] wink__: i was, that last one was a response to tprice [00:43] prettyrobots: And apologies in advance if someone else knows the secret int conversion API and you rolled your own. [00:43] tprice: yeah message would look like "{"method":"test","params":[],"id":"amep5rqlmxw"}" [00:43] tprice: i dont get an error on JSON.parse [00:44] wink__: you wouldnt, what does message turn into after that call [00:44] ckknight_: okay, prettyrobots, async version: http://pastebin.com/d6YPrhRe [00:44] tprice: i look the same [00:45] tprice: looks like it does not do anything to the string [00:45] wink__: tprice: hrm, i'd have to see your code, it sounds like you've got a scope issue maybe? [00:45] prettyrobots: ckknight_: Looks good. You should wrap it up. [00:46] ckknight_: yeah, I think I'll make a lib and publish it on github. [00:46] ckknight_: with proper testing. [00:46] prettyrobots: Call it async-json. [00:46] prettyrobots: Sure to be a hit. [00:46] ckknight_: works for me. [00:46] ckknight_: oh, I hope so [00:46] ckknight_: it's synchronous if you have no functions (as it should be), and async if and only if you have a function which takes a callback [00:47] tprice: i dont know about scope problem should not be a problem [00:47] ckknight_: so one could do: uberStringify({ data: function(callback) { fetchSomethingFromMongo(function(err, data) { callback(err, data); } } }, function(err, result) { }) [00:47] tprice: this is the code http://pastebin.com/qY15TPB5 [00:48] tprice: no this http://pastebin.com/Q6RzMWUT [00:48] ckknight_: btw, don't use the code I pasted on pastebin, wait for me to add documentation and testing. Should be no more than two hours, my guess. [00:50] ckknight_: prettyrobots: oh, also a good idea: I could make a streaming API for it as well [00:50] tprice: maybe it was function scope just change var message to var a and it worked [00:51] ckknight_: for anyone who wants to follow: https://github.com/ckknight/async-json [00:51] ckknight_: okay, gonna head home, be back in a bit. [00:52] puffpio_ has joined the channel [00:53] no-gooder has joined the channel [00:54] saikat has joined the channel [00:59] timcosgrove has joined the channel [00:59] rook2pawn has joined the channel [01:00] gqlewis has joined the channel [01:01] thorsteinsson has joined the channel [01:05] tjgillies: you guys see this? http://syntensity.blogspot.com/2011/04/emscripten-10.html?utm_source=javascriptweekly&utm_medium=email [01:06] dekz: pyrotechnick1: you there? [01:07] Aria has joined the channel [01:19] MatthewS has joined the channel [01:20] john____ has joined the channel [01:20] john____: hello--is it possible to spawn a child process and read it's stdout unbuffered? [01:20] eee_c has joined the channel [01:21] SubStack: isaacs: did you mean to send that pull request to https://github.com/rbranson/node-ffi ? [01:21] SubStack: ACTION isn't the maintainer for that one [01:21] isaacs: SubStack: oh, you have the most recent commit [01:21] isaacs: but sure, if it looks good to you, pass it on :) [01:22] tjholowaychuk: cluster IRC plugin FTW [01:23] CrisO has joined the channel [01:31] danheberden has joined the channel [01:32] kriszyp has joined the channel [01:32] danheberden has left the channel [01:32] matschaffer has joined the channel [01:36] techwraith: tjholowaychuk: Cluster IRC what? [01:36] tjholowaychuk: techwraith: I set up a cluster plugin so we can interact with it via irc [01:36] tjholowaychuk: haha [01:36] tjholowaychuk: super .. secure [01:36] techwraith: lol, totally [01:36] mbrevoor_ has joined the channel [01:37] techwraith: tjholowaychuk: Next up twitter? [01:37] langworthy has joined the channel [01:37] heavysixer has joined the channel [01:37] tjholowaychuk: haha [01:37] tjholowaychuk: even better [01:38] ckknight: I got an idea: [01:38] MikeW: Get node speaking IRC and have an async node ircd? [01:38] ckknight: IRC bot that has an HTTP component so you can see logs of what people have put into the bot. Also, keep a context available on a per-user basis so there's state [01:38] MikeW: (although I kinda doubt any good ircd is a thread-per-conn anyway) [01:39] ardcore has left the channel [01:39] systemfault: threads are resource wasters :P [01:39] ampletime has joined the channel [01:39] ckknight: threads don't scale, processes scale. [01:41] prettyrobots: tjgillies: Wow. [01:41] prettyrobots: You guys keep melting my brain. [01:44] john____ has joined the channel [01:45] Me1000 has joined the channel [01:46] prettyrobots: tjgillies: So, that means that there's a PDF library in pure JavaScript now? [01:46] tjgillies: essentially [01:46] tjgillies: any anything else that runs on llvm [01:46] tjgillies: s,any,and [01:47] tjgillies: he ported cpython to javascript [01:47] aho: o_O; [01:47] tjgillies: http://syntensity.com/static/python.html [01:48] prettyrobots: Working with Java... [01:49] cr44 has joined the channel [01:49] aho: ah yea... and there is also that pyjamas thing [01:49] prettyrobots: ...was never this cool. [01:49] aho: haven't tried either of them. i prefer js over python :> [01:50] sako has joined the channel [01:50] prettyrobots: It loads so fast. [01:51] olegp has joined the channel [01:51] softdrink has joined the channel [01:52] edude03_ has joined the channel [01:52] brianmario has joined the channel [01:52] cloudhead2: is there a reliable way to detect if a connection is a websocket connection, vs a standard http connection? [01:52] cloudhead2: I'd like to timeout http connections, but not websocket [01:53] tjgillies: http doesn't stay open. you send request/get reply [01:54] tjgillies: unless i guess you're doing long polling [01:54] cloudhead2: tjgillies: it does with keep-alive [01:54] tjgillies: oh [01:54] cloudhead2: unless you explicitly set it to close [01:55] cloudhead2: and chrome likes to keep many connections open for a long time [01:56] softdrink has joined the channel [01:57] gazumps has joined the channel [01:58] john____ has left the channel [01:58] DTrejo has joined the channel [02:03] davvilla has joined the channel [02:04] davvilla: Would anyone happen to know what causes this error? I can't seem to find anyone else having this on google / wiki: [02:04] davvilla: node.js:134 throw e; // process.nextTick error, or 'error' event on first tick ^ Error with calculation [02:05] DTrejo: davvilla: make a gist of the code? [02:08] davvilla: Nvm! found my own mistake [02:09] termie has joined the channel [02:09] termie has joined the channel [02:09] tdmackey has joined the channel [02:09] timemage has left the channel [02:10] [[zz]] has joined the channel [02:10] secoif has joined the channel [02:10] adamholt has joined the channel [02:11] adamholt has joined the channel [02:12] adamholt has joined the channel [02:12] adamholt has joined the channel [02:13] adamholt has joined the channel [02:14] adamholt has joined the channel [02:14] Corren has joined the channel [02:14] adamholt has joined the channel [02:15] adamholt has joined the channel [02:16] adamholt has joined the channel [02:16] adamholt has joined the channel [02:17] adamholt has joined the channel [02:18] adamholt has joined the channel [02:18] adamholt has joined the channel [02:19] demastrie has joined the channel [02:19] adamholt has joined the channel [02:19] devrim has joined the channel [02:19] adamholt has joined the channel [02:20] mscdex: finally got a yenc decoder [02:20] adamholt has joined the channel [02:20] mscdex: ACTION shakes a fist at silly late night mistakes [02:20] pekim has joined the channel [02:21] themiddleman has joined the channel [02:21] adamholt has joined the channel [02:21] themiddleman_itv has joined the channel [02:21] adamholt has joined the channel [02:22] adamholt has joined the channel [02:23] adamholt has joined the channel [02:23] softdrink has joined the channel [02:24] adamholt has joined the channel [02:24] adamholt has joined the channel [02:25] adamholt has joined the channel [02:26] adamholt has joined the channel [02:26] ngs has joined the channel [02:27] adamholt has joined the channel [02:27] adamholt has joined the channel [02:27] kmwallio has joined the channel [02:28] Emmanuel__ has joined the channel [02:28] dmojoryder has joined the channel [02:28] adamholt has joined the channel [02:28] MikeW: adamholt is having problems tonight it seems [02:28] adamholt has joined the channel [02:29] mscdex: he must be busy bailing out his basement [02:29] adamholt has joined the channel [02:30] adamholt has joined the channel [02:31] adamholt has joined the channel [02:31] adamholt has joined the channel [02:32] box2: i like where this is going [02:32] adamholt has joined the channel [02:33] adamholt has joined the channel [02:33] yibter has joined the channel [02:33] adamholt has joined the channel [02:33] patrickarlt has joined the channel [02:34] adamholt has joined the channel [02:34] adamholt has joined the channel [02:35] adamholt has joined the channel [02:36] adamholt has joined the channel [02:36] adamholt has joined the channel [02:37] adamholt has joined the channel [02:37] flippyhead has joined the channel [02:37] techwraith: is there any way to convert an array into a list of arguments for a function? [02:39] bnoguchi has joined the channel [02:39] therrg: techwraith: yes, by using apply [02:40] wink__: ^^ [02:40] techwraith: just got it, lol [02:40] techwraith: Thanks :) [02:40] donwb has joined the channel [02:40] A_Nub has joined the channel [02:41] techwraith: One more question, is there any way I can get the name of the function that I'm calling? [02:41] techwraith: inside that function? [02:41] techwraith: so somefunction(){console.log(thisFunctionsName);} [02:42] stillmotion: how do I make a script execution end? [02:42] techwraith: process.exit() [02:42] edude03_ has joined the channel [02:42] techwraith: if that's what you mean [02:42] wink__: techwraith: looks like there are some hacky ways you might be able to do it [02:43] wink__: stillmotion: the script will end when there is nothing left to do, if you have listeners waiting for something, it'll hang around [02:43] wink__: 'listening' in that context is still something to do [02:43] stillmotion: how do I know if I have listeners waiting? [02:43] stillmotion: is there some sort of registry? [02:44] wink__: i dont think there is a global one, there is one per emitter though :p [02:45] jb55 has joined the channel [02:46] wink__: techwraith: you're going to fight against javascript assuming your functions have a 'name' [02:47] wink__: for instance, what if you declared your function like: [02:47] wink__: var func = function() { }; [02:47] wink__: what would you expect its name to be [02:48] cloudhea1_: techwraith: `arguments.callee.name` from inside the function [02:48] wink__: mscdex: ping [02:48] b0t has joined the channel [02:48] wink__: is callee.name guaranteed to work? that'd be some dark magic [02:48] cloudhead__: wink__: why not? [02:49] Ond has joined the channel [02:49] wink__: anonymous functions? [02:49] cloudhead__: well an anonymous function doesn't have a name [02:49] wink__: exactly. [02:50] cloudhead__: well then there's nothing to return : ) [02:50] k1ttty has joined the channel [02:50] seivan has joined the channel [02:50] jkdavenport has joined the channel [02:50] cloudhead__: it returns the name if the function has a name [02:54] harth has joined the channel [02:56] mscdex: wink_: pong [02:58] edude03_ has joined the channel [02:58] robotarmy has joined the channel [02:59] mscdex: techwraith: you could use: arguments.callee.name [02:59] mscdex: oops, i was scrolled up [02:59] mscdex: :-D [03:01] dcampano has joined the channel [03:01] captain_morgan has joined the channel [03:03] wink__: mscdex: i've got most of a dhcp server stubbed out now, with pluggable backends [03:04] wink__: holy hell i never realized how nasty the wire protocol was :p [03:04] jeffs has joined the channel [03:04] Viriix has joined the channel [03:05] morando has joined the channel [03:05] mscdex: heh [03:05] mscdex: i've got an nzb downloader almost finished [03:06] morando: I get this error ----> error: inflate: data stream error (incorrect header check) when [03:06] morando: I do git clone git://github.com/joyent/node.git [03:06] morando: on cygwin [03:06] wink__: nice :D [03:06] morando: any ideas? [03:07] wink__: morando: is that the proper git to clone from? shouldnt it be https://github.com/joyent/node.git [03:08] sako has joined the channel [03:08] wink__: mscdex: i'll shoot you the github url to the server in tomorrow or so, im crashing :p [03:08] wink__: s/in// [03:08] zakabird has joined the channel [03:08] morando: its the same [03:09] wink__: morando: i've got nothin then :< [03:09] arrty has left the channel [03:10] morando: thx [03:12] wink__: see you guys later [03:13] jkdavenport has joined the channel [03:17] heavysixer has joined the channel [03:20] CiRlE has joined the channel [03:21] terite_ has joined the channel [03:26] MikeW: carsonm: ping [03:26] franck34 has joined the channel [03:29] unknown_had has joined the channel [03:30] bnoguchi has joined the channel [03:30] saikat has joined the channel [03:31] incon has joined the channel [03:33] shiawuen has joined the channel [03:34] donwb has joined the channel [03:36] jacobolu_ has joined the channel [03:43] bnoguchi has joined the channel [03:49] grudadev3 has joined the channel [03:50] grudadev3: hey, does anyone out there would help me out with some express + jsonp stuff... [03:50] grudadev3: ? [03:51] grudadev3: still getting some "Invalid label" [03:52] skm has joined the channel [03:52] b0t has joined the channel [03:54] techwraith: so what's the best way to figure out how long a process spends in a certain function (including callbacks and such)? [03:55] techwraith: preferably programatically [03:57] rfay|peanuts has joined the channel [03:57] newy_ has joined the channel [03:57] themiddleman_itv has joined the channel [04:01] grudadev3: no one? [04:04] lenard_alm has joined the channel [04:05] Emmanuel__ has joined the channel [04:06] samsonjs has joined the channel [04:13] justintnt has joined the channel [04:13] ckknight: techwraith: function timer(callback) { var start = Date.now(); callback(); return Date.now() - start; }; [04:13] ckknight: techwraith: if you have async callbacks, then it's a different beast [04:14] janne has joined the channel [04:22] techwraith: yeah, I was hoping for an async one :) [04:22] techwraith: got that one already [04:23] jjmalina has joined the channel [04:24] jjmalina: can anyone tell me what mongoose method is used to update an entry in mongodb? [04:26] jjmalina: hmm I guess Model.save works [04:28] dimko has joined the channel [04:29] fairwinds has joined the channel [04:32] seivan has joined the channel [04:33] zcopley has joined the channel [04:38] gazumps has joined the channel [04:39] techwraith: jjmalina: yep, just use .save() [04:42] jano has joined the channel [04:46] Corren: anyone going to the hacknight in seattle next week? [04:47] k1ttty has joined the channel [04:49] mscdex: gah [04:49] mscdex: node-webworkers no worky [04:49] derferman has joined the channel [04:49] mscdex: :( [04:49] rchavik has joined the channel [04:54] Remoun has joined the channel [04:55] jesusabdullah: Corren: I live nowhere near seattle, so unfortunately no. However, that SOUNDS fun. Are you? [04:55] Corren: no I'm pissed off about it :) [04:55] blueadept: what's the best npm to use for facebook/twitter/foursquare connect? [04:55] Corren: i start a new job in two weeks, node.js is a heavy part of it, and I have a stupid HoA meeting I have to go to :( [04:55] muk_mb has joined the channel [04:56] jesusabdullah: HoA? [04:57] jesusabdullah: homeowners association? [04:57] Aria has joined the channel [04:57] jesusabdullah: Alaskan neighborhoods usually don't have those. It's usually a good thing. [04:57] Corren: yes Hoa [04:58] Corren: I'm the god damned president or you can bet I'd be attending the node.js thing [04:58] Corren: =D [04:58] jesusabdullah: Can your VP handle it? [04:58] Corren: it's the yearly election meeting [04:58] jesusabdullah: Oh snap [04:58] Corren: I'm out of office, but I have to run the election [04:58] jesusabdullah: Are you running for reelection? [04:58] Corren: helllz no [04:58] jesusabdullah: Oh good! [04:59] muk_mb has joined the channel [04:59] muk_mb has left the channel [05:01] xiackok has joined the channel [05:04] mAritz has joined the channel [05:05] Croms: Does anyone know why line 7 returns a reference error? https://gist.github.com/b2f2e3d22c5f0ebce69f [05:06] ckknight: because eval is the most evil thing ever and you're using it wrong regardless [05:07] stepheneb has joined the channel [05:07] Croms: why do people freak out when they see eval [05:07] jeromegn has joined the channel [05:07] ckknight: because it's generally unsafe [05:07] path[l]: it's like goto [05:08] ckknight: and especially for what you're trying to do, which is replace a dynamically named object, that is wrong on many levels. [05:08] ckknight: a better thing to do would be to pass in an Object and simply replace a key [05:08] framlin: it seem you wnt to do something like var a = {}; a["object"+name]=value [05:08] ckknight: e.g. obj[name] = value [05:08] Croms: ckknight: what if name went multiple levels deep? [05:09] ckknight: name.split(".") [05:09] ckknight: and go through that. [05:10] ckknight: on a completely separate topic, I made an asynchronous JSON stringify library: https://github.com/ckknight/async-json [05:12] breccan has joined the channel [05:12] Croms: cool, i'll have a look [05:14] path[l]: it takes on object and makes a string out of it? [05:14] path[l]: why does it need to be async? [05:14] ckknight: path[l]: depends on need. If you don't need async, great, use JSON.stringify [05:14] path[l]: no I mean, isnt it all cpu no IO? [05:14] ckknight: if you want to use an asynchronous part of your object, you can use this lib. [05:15] ckknight: path[l]: in the Readme, I discuss an IO-driven async callback [05:15] seivan has joined the channel [05:15] path[l]: ah ok [05:15] indutny has joined the channel [05:15] Croms: how would you go about cycling through name.split(".") without loosing the scope of the object though? [05:16] Croms: probably more of a question for ##javascript [05:16] ckknight: var innerObject = object; var parts = name.split("."); for (var i = 0; i < parts.length - 1; i++) { innerObject = innerObject[parts[i]]; }; innerObject[parts[parts.length - 1]] = value; [05:16] indutny: ryah: ping? [05:17] path[l]: I have a question. If Im writing a large file to a write stream. Like 30,000 rows. Is it better to write one string, or issue several writes all at once? [05:17] Croms: ckknight: i'll give that a try, looks like we're doing the same sort of thing [05:18] Croms: been trying for days to do a similar for loop approach but couldn't get it right [05:19] ckknight: Croms: well, my code should work. [05:19] ckknight: actually, simpler version: [05:19] Croms: kept narrowing down the initial json object [05:19] ckknight: var innerObject = object; var parts = name.split("."); var lastPart = parts.pop(); parts.forEach(function(part) { innerObject = innerObject[part]; }); innerObject[lastPart] = value; [05:20] Croms: but still, regardless of whether or not eval is bad or not, i don't understand why that gist doesn't work [05:20] Croms: might be a bug [05:20] ckknight: it's not a bug. [05:20] ckknight: eval doesn't work like that. [05:20] ckknight: eval always returns an rvalue [05:21] ckknight: you were trying to use it as an lvalue [05:21] timmywil has joined the channel [05:21] path[l]: I dont get that example anyway though. object would have been something like {foo: bar}, wouldnt "object" + name be like {foo: bar}name ? [05:22] jkdavenport has joined the channel [05:22] path[l]: or was name like .baz.qux ? [05:22] Croms: object is a string [05:23] path[l]: ah [05:23] Croms: btw thanks ckknight [05:23] Croms: i'll have a look at those snippets tomorrow [05:24] lorhko has joined the channel [05:27] muz1 has joined the channel [05:29] framlin: Croms: if you do eval("object"+name) it is like var a = "object"+name; //-> "objectcoolname" ... eval("objectcoolname"); // -> "objectcoolname" ... and you cannot do "objectcoolname" = 7 // value == 7 [05:30] muz1 has joined the channel [05:30] framlin: or better eval(a) -> "objectcoolname" [05:30] samsonjs has joined the channel [05:31] kriszyp has joined the channel [05:32] eyesUnclouded has joined the channel [05:35] abraham has joined the channel [05:35] A_Nub: node.js has a JSON parser outside of eval right? [05:35] A_Nub: JSON.parse right? [05:36] jjmalina: JSON.parse() [05:36] A_Nub: Thought so [05:36] A_Nub: Is that a javascript standard now? [05:36] A_Nub: not node specific right? [05:36] jjmalina: i think that one is node specific [05:37] jjmalina: jquery has its own parse JSON method [05:37] blueadept: is there a way to take a screenshot with javascript? [05:37] blueadept: like curl it [05:37] A_Nub: blueadept: since its sanboxed, I would guess no. [05:38] siculars has joined the channel [05:38] blueadept: hm [05:38] A_Nub: no way to access the systems framebuffer. [05:38] blueadept: ah i see [05:39] A_Nub: whats the screenshot for? [05:39] ebaxt has joined the channel [05:39] blueadept: well what i mean is convert html to an image perhaps [05:39] blueadept: not a proper screenshot per se [05:40] blueadept: oh wait, http://code.google.com/p/wkhtmltopdf/ [05:40] A_Nub: is there a reason to do this inside the app/script? [05:40] A_Nub: that too [05:40] micheil: JSON object is pretty much part of javascript as of ES5 [05:41] micheil: section 15.12 of the ECMA-262 Standard Edition 5 specifies the JSON object [05:41] dmojoryder has joined the channel [05:41] Croms: var acme = {"looney": { "roadrunner": "meepmeep" }}; console.log(eval("acme.looney.roadrunner")); [05:41] micheil: jjmalina: ^^ [05:41] Croms: isn't that the same as what i was trying to do? [05:42] jjmalina: micheil: so there is no need to parse json responses in ES5? [05:42] micheil: uhh.. JSON.parse and JSON.stringify are standard methods. [05:42] jjmalina: oh ok [05:42] micheil: if you have a string, then yes, of course you need to do a JSON.parse [05:43] micheil: under the hood, that's what jQuery does too. [05:43] jakehow has joined the channel [05:48] abraham has joined the channel [05:49] kriszyp has joined the channel [05:52] ampletime has left the channel [05:54] framlin: v8bot: var acme = {"looney": { "roadrunner": "meepmeep" }}; console.log(eval(acme)); [05:54] v8bot: framlin: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [05:54] framlin: v8: var acme = {"looney": { "roadrunner": "meepmeep" }}; console.log(eval(acme)); [05:54] v8bot: framlin: {looney:{roadrunner:"meepmeep"}} [05:55] framlin: v8: console.log(eval("acme.looney.roadrunner")); [05:55] v8bot: framlin: ReferenceError: acme is not defined [05:55] framlin: v8: var acme = {"looney": { "roadrunner": "meepmeep" }};console.log(eval("acme.looney.roadrunner")); [05:55] v8bot: framlin: "meepmeep" [05:56] justintnt: oh, nice bot ... [05:57] Croms: back when cartoons didn't suck ;—) [05:57] robotblake has joined the channel [05:57] Croms: but that is exactly what i want eval to do [05:58] Croms: still don't get why it doesn't work [05:58] path[l]: you get the whole rvalue, lvalue thing of languages? [05:59] Croms: apparently not [05:59] path[l]: an rvalue can be used on the right side of an = [05:59] path[l]: an lvalue can be used on the left side [05:59] path[l]: eval returns rvalues [05:59] justintnt: ckeditor for textareas in the browser with node.js on the server : anyone done it? [06:00] path[l]: so for example [06:00] framlin: v8: "meepmeep" = 7 [06:00] v8bot: framlin: ReferenceError: Invalid left-hand side in assignment [06:00] path[l]: a constant or a literal cannot be an rvalue [06:00] justintnt: path: try that again [06:00] framlin: "meepmeep" = 7 makes no sense and so its not possible .... [06:01] path[l]: sorry try what? [06:01] abraham has joined the channel [06:01] justintnt: a constant or literal cannot be an lvalue [06:01] path[l]: like 7 = 3 [06:02] path[l]: or framlin's example I guess [06:02] Croms: var foo = eval("object" + reference); foo = value; [06:03] path[l]: anyway lvalues almost always can be rvalues, but not vice versa. [06:03] Croms: isn't foo a placeholder for an lvalue? [06:03] path[l]: yeah, but you're replacing foo [06:03] path[l]: you've defined a variable called foo [06:03] justintnt: croms: not after its evaluated [06:03] path[l]: and then you replaced what it holds [06:03] path[l]: in the second line [06:04] path[l]: local variables cannot be created dynamically. But you can always do this["foo"] or window['foo'] [06:04] Croms: is there a way to turn the output of eval into a definite lvalue? [06:05] throughnothing has joined the channel [06:05] flippyhead has joined the channel [06:05] path[l]: the object format of js [06:05] Remoun has joined the channel [06:05] Yuffster has joined the channel [06:06] path[l]: O[eval(something)] is an lvalue [06:07] saikat has joined the channel [06:08] framlin: v8: var b = {}; b[eval(1-1)]=1; [06:08] v8bot: framlin: 1 [06:08] Rodtusker has joined the channel [06:09] Croms: eval is made of the devil [06:09] Croms: or i suck [06:09] Croms: i think it's the latter [06:10] framlin: do not use eval ;) [06:10] muz1 has joined the channel [06:10] saikat_ has joined the channel [06:10] path[l]: you use eval when you have a specific problem that's too hard to solve otherwise and with very clear constraints [06:12] Croms: i'll try for-looping and clever variable nesting instead ;—) [06:13] saikat has joined the channel [06:13] sh1mmer has joined the channel [06:14] mikeal has joined the channel [06:14] sako has joined the channel [06:15] justintnt: wysiwyg for textareas with image upload / node.js on the server : anyone done it? [06:17] Croms: justintnt: image upload i've seen in node-formidable i think [06:18] opaque: Is there anyway to pass local variables to public js files (using express)? [06:24] __tosh has joined the channel [06:29] herbySk has joined the channel [06:30] McMAGIC--Copy has joined the channel [06:30] mytrile has joined the channel [06:32] akavlie has joined the channel [06:32] stonebranch has joined the channel [06:32] shaunau: opaque: render them in the html? [06:33] opaque: shaunau: I'm just looking for options to separate html and js. [06:36] shaunau: opaque: have a partial that is JS? [06:37] shaunau: use the script html tag and write the JS file dynamically :) [06:40] opaque: I'll probably init in the html. seems like the cleanest way. [06:42] reid has joined the channel [06:43] Rodtusker has joined the channel [06:44] abraham has joined the channel [06:45] copongcopong has left the channel [06:50] Yalpha has left the channel [06:50] pyrotechnick1 has joined the channel [06:50] Viriix has joined the channel [06:51] Ond has joined the channel [06:51] mikeal has joined the channel [06:53] marlun: Anyone using jasmine-node? I'm having some problems the first being I'm getting an exception when trying to run it. [06:54] steph021 has joined the channel [06:54] muz1 has joined the channel [06:57] jonpacker has left the channel [06:59] path[l] has joined the channel [07:00] mscdex: wink_: finally got a quick and dirty nzb downloader working, yenc decoding and all \o/ [07:00] ajpiaNOU has joined the channel [07:01] Olivier has joined the channel [07:06] techwraith has joined the channel [07:07] konobi: mscdex: nice [07:08] pyrotechnick1 has left the channel [07:17] Olivier: How do I check if 'X' value is in a certain array? I've tried indexOf() but it's not returning the correct result. [07:18] marlun: Does node.js not have a specific function for creating a temporary file? What's the recommended way of doing that? [07:18] ElDios has joined the channel [07:19] micheil: Olivier: what result do you want? [07:19] micheil: marlun: there is a C function for that, tempfile, but I don't think node.js has a direct binding to this, but there may be a module for it. [07:20] Olivier: micheil: I'm doing arr.indexOf(obj) but it keeps returning false when it should be returning true. [07:20] micheil: example? [07:20] marlun: micheil: ok, thanks [07:21] micheil: v8: ['a', 'b', 'c', 'd'].indexOf('a') [07:21] v8bot: micheil: 0 [07:21] micheil: v8: ['a', 'b', 'c', 'd'].indexOf('z') [07:21] v8bot: micheil: -1 [07:21] micheil: v8: ['a', 'b', 'c', 'd'].indexOf('c') [07:21] v8bot: micheil: 2 [07:21] micheil: yeah? [07:22] Olivier: micheil: seems to work here, but it doesn't in my code. It must be something about the fact that I'm looking up an array of mongodb objectids [07:22] micheil: are these from a ORM by any change? [07:23] micheil: I think your array is not an array of strings, but rather an array of objects [07:23] micheil: [ObjectID, ObjectID, ObjectID] [07:23] Olivier: micheil: I'm using mongoose. [07:23] micheil: meaning that you'd need to check for the index of an instance of an ObjectId [07:25] mc_greeny has joined the channel [07:25] Druide_ has joined the channel [07:26] Olivier: objectids aren't objects as far as I know. My schema is document: { _id: ObjectId("id here"), users: [ObjectId("of some user model"), ObjectId("another")] } [07:26] Olivier: I'm looking up in users with an objectid. [07:27] Olivier: I haven't needed to do any converting using the mongoose api, but since this is outside it's scope, there's probably something there. [07:30] beawesomeinstead has joined the channel [07:30] beawesomeinstead has joined the channel [07:32] sholmes has joined the channel [07:32] sholmes: Hello, everybody! [07:32] fangel has joined the channel [07:33] captain_morgan has joined the channel [07:33] sholmes: So, what should I learn in order to be good at Node development? [07:34] prettyrobots: Read JavaScript the Good Parts. [07:34] blkcat: ^ [07:34] SubStack: meh [07:34] blkcat: though i've heard some mixed things about that book [07:35] SubStack: sholmes: you should write programs [07:35] SubStack: hundreds of them [07:35] prettyrobots: Of course. The more you hear about a book the more mixed. [07:35] prettyrobots: Yeah, write lots of code. [07:35] SubStack: and read programs too [07:35] SubStack: but only incorporate the bits of style that you like [07:35] saikat has joined the channel [07:35] prettyrobots: Yeah, read lots of code. [07:35] sholmes: SubStack: in other words, just gain experience through doing. [07:35] mscdex: that book was written by a hollywood action star [07:35] mscdex: did you know that? [07:35] trollboy has joined the channel [07:35] trollboy: Neato [07:36] prettyrobots: Chuck Norris? [07:36] mscdex: http://i55.tinypic.com/30s9cgh.png [07:36] mscdex: ^ [07:36] sholmes: Do I need to know C++? [07:36] SubStack: only if you want to write c++ modules [07:36] SubStack: and nobody *wants* to write c++ modules [07:37] sholmes: Is there an advantage to writing a module in c++? [07:37] prettyrobots: mscdex: Nice. [07:37] SubStack: you can do concurrency madness in c++ land [07:37] mscdex: ;-) [07:37] SubStack: in javascript you only get a single thread to play with [07:38] prettyrobots: sholmes: Short answer, no. [07:38] mscdex: "a single thread is enough for anyone" [07:38] mscdex: :-D [07:38] sholmes: SubStack: I thought Node was concurrent with it's event loop? [07:38] mscdex: william gates said that btw [07:38] mscdex: i think [07:39] trollboy: lol, I miss mscdex sometimes [07:39] trollboy: and himem.sys, lol [07:39] mscdex: hey, i'm always here! :-) [07:39] prettyrobots: I thought it was Henry Louis Gates. [07:39] mscdex: no, not the pbs guy [07:40] prettyrobots: sholmes: No big advantage. You may use it someday if you need to bind to something that has a C or C++ API. [07:40] prettyrobots: You don't have to know C to program in Ruby. [07:40] trollboy: damnit jim... node.js is pretty effin awesome [07:40] trollboy: I just found out about it the other day [07:40] sholmes: prettyrobots: I see [07:41] AnthonyCat has joined the channel [07:41] olegp: does anyone know of a socket.io (websockets, with fallback to long polling) based implemention of a pubsub server on Node? [07:41] olegp: I'm looking to build one for http://akshell.com to allow for server push, but just wanted to check I'm not reinventing the wheel here .. [07:42] prettyrobots: Not that you shouldn't learn C++ and read the V8 and Node.js code. It's fun to read. [07:42] pdelgallego_ has joined the channel [07:42] Ond: olegp, it's not very difficult [07:43] pdelgallego has joined the channel [07:43] Ond: SubStack has a tutorial on rolling your own pubsub with DNode, you should check it out [07:43] olegp: I know, but I'd rather team up with an existing project, rather than writing from scratch, even if its a few hundred lines of code ... ;) [07:43] prettyrobots: I mean, I'm not saying that it is special, it's just absolutely not required. [07:43] sholmes: So, I'm working on an app right now (finally). I need to figure out how to manage my model side of my application. So far, I know I'm putting my model code into modules under a /models directory. Each module will contain an API that interfaces with data from a MySQL database. [07:43] Ond: http://substack.net/posts/9bac3e [07:43] olegp: Ond thank you [07:43] SubStack: \o/ [07:44] sholmes: olegp: did you develop akshell? [07:44] olegp: I'm one of the people involved, Anton did most of the development though [07:44] olegp: sholmes - what do you think about it? [07:44] sholmes: olegp: Nice. I like it. [07:44] olegp: cool [07:45] sholmes: olegp: However, I'd recommend not enforcing it's own framework. [07:45] olegp: we are not enforcing it, but rather suggesting it [07:45] sholmes: olegp: Ah, well I only played with it. [07:45] olegp: its commonjs and jsgi [07:45] ph^ has joined the channel [07:46] olegp: so you can use whichever jsgi framework you want [07:46] olegp: like Stick from RingoJs etc [07:46] olegp: we're not using node btw, there's been a bit of confusion around that [07:46] olegp: have our own sync server using v8, using an apache mpm like setup [07:47] sholmes: olegp: oh. The code sure looks like Node. [07:47] olegp: most node modules should work, as long as they dont do IO [07:47] Bonuspunkt has joined the channel [07:48] marlun: Is it possible in a node script to actually run a shell editor like nano or vim to let the user write to a file and when they save and exit the node script continues? [07:48] sholmes: SubStack: I think you were the one that told me how I should make a module to hold the database connection for my models a long while back. [07:48] marlun: I've been looking att child_process but I'm not sure how to do it. [07:48] SubStack: sholmes: were you trying to have a db global or some such? [07:49] trollboy: so how much over head does node.js take on the server? I've got a memcache server serving up json'd content (mysql/json/php), and I'm about sold on re-writting it in node.js [07:49] prettyrobots: trollboy: Not much. [07:50] trollboy: anyone else have experience doing cache servers in it? [07:50] sholmes: SubStack: Yes. Well, I only have one main db in my app. I was talking about model modules, and you said it would be good for me to put the db connection in it's own module, then require it in the other modules. [07:50] sholmes: ..or something like that. [07:51] Ond: Yes marlun, that's possible [07:51] prettyrobots: sholmes: Sounds to frameworky. I fire off queries directly to MySQL. [07:51] prettyrobots: No "models". [07:51] janogarcia has joined the channel [07:51] sholmes: prettyrobots: The idea is to be frameworky, with the benifits of reusable APIs [07:51] prettyrobots: sholmes: Blah, blah, blah. [07:52] prettyrobots: SQL is plenty reusable. Been being reused for 30+ years now. [07:52] msucan has joined the channel [07:53] sholmes: prettyrobots: I see what you mean. In fact, I'm a PHP guy, who's been NOT doing frameworks and just copying my queries all over my app. The problem is, once I need to change a query, I have to change all the copies of it scattered accross my code. [07:54] prettyrobots: I keep all my queries in a directory and load them into an object (hash). [07:54] prettyrobots: In a single directory. [07:54] trollboy: sholmes, sounds like you need to rewrite your stuff anyway [07:54] prettyrobots: Then I have very thin layer over MySQL. Hmm... [07:54] marlun: Ond: Know of any examle how to do it? :) [07:54] Ond: require('child_process').exec('vim', function(err, stdout) { if (!err) { do_more_stuff; } }); [07:54] sholmes: trollboy: what do you mean? I'm switching over to Node and rewriting it in that. [07:55] prettyrobots: Nevermind, find a nice framework. I'm only going to be confusing. People say *great* things about Backbone.js. [07:55] marlun: Ond: thanks, I'll try that! [07:55] prettyrobots: sholmes: Have a look at Backbone.js. [07:55] prettyrobots: I haven't used it, but I like that guy's work. [07:57] captain_morgan has joined the channel [08:00] sholmes: prettyrobots: isn't this client-side? [08:01] sholmes: I'm not looking to do anything too complicated. [08:02] janogarcia: Hi, I installed Node.js via a Mac OS X package from https://sites.google.com/site/nodejsmacosx/ How should I update Node.js once a new package is available? Just install the new package without uninstalling the old one? [08:02] Nexxy has joined the channel [08:02] boaz has joined the channel [08:02] sholmes: I'm only looking to make modules that are able to get and set data in the DB. [08:02] sreeix has joined the channel [08:03] sholmes: How do I view this chat's history, and search it? [08:03] micheil: sholmes: why are you switching to php? [08:03] sholmes: micheil: from php [08:03] micheil: I mean, why are you switching from php? [08:03] sholmes: micheil: don't like it [08:03] trollboy: I'm keeping php for my ui's and stuff personally [08:03] Ond: Which database sholmes? I haven't been paying attention. [08:03] trollboy: but for my fast stuff I'm doing node.js [08:03] mscdex: for UIs? [08:04] mscdex: :S [08:04] sholmes: Ond: mysql [08:04] micheil: felixge has the best mysql adapter for node.js [08:04] copongcopong has joined the channel [08:04] prettyrobots: sholmes: I guess it is more GUI oriented. [08:04] micheil: (it's actually been directly sponsored by joyent at times, but other companies should chip in here) [08:04] sholmes: micheil: I'm using a mysql module already. Let me see which [08:04] prettyrobots: Guess it's time to go sleep. [08:05] JojoBoss has joined the channel [08:05] sholmes: prettyrobots: yeah, it's more front end. [08:05] dve has joined the channel [08:06] sholmes: micheil: yeah I'm using felixge's mysql module [08:08] micheil: sholmes: there's two approaches to structuring your applications in node.js (that I know of) [08:08] micheil: 1) is to put common stuff in modules and then require it in [08:09] micheil: 2) is to put common stuff centrally, and require other stuff in [08:09] marlun: Ond: I've tried it: https://gist.github.com/922968 but nothing happends when running it. [08:09] sholmes: micheil: don't understand #2 [08:09] micheil: (as in, you load up all you're models and controllers and stuff into one index.js, and then also load up the db, then all instances in index.js share the db) [08:10] micheil: so, rather then having three modules: a, b, and c make a database connection through requiring a "new" 'dbc' [08:10] seivan has joined the channel [08:10] micheil: you have one file that requires a, b, c and dbc [08:10] micheil: then passes each of a, b, and c the instance of dbc [08:14] sholmes: micheil: I'm not really sure why I would do that, and I'm not certain I fully understand. [08:15] micheil: basically in the each module requires in the dbc, you're creating one database connection per module [08:15] micheil: where as in the latter, where you require all modules into one file, then pass a dbc, you create only one database connection and share it between all mdoules [08:16] sholmes: The more obvious way, and the way I'm doing it, is I'm requiring a model when I need it, that module requires the db module and uses it. Same goes for other models I make. [08:16] sholmes: I think I understannd now. Which is better though? [08:17] micheil: well, obviously each has it's own needs. [08:17] micheil: the former I think works well were you have a modular application, then latter I think works well for the more traditional type web application [08:18] micheil: so, always remember, each time you require a file in another module that's a new instance of it. [08:18] sholmes: what's a modular application? [08:19] micheil: modular application in the sense that you have a set of common things that several processes share [08:19] micheil: eg, you might have a data collector for twitter, facebook and last.fm audioscrobbles. [08:19] micheil: you probably would implement that logically as three separate javascript files, each run by a separate node.js process [08:20] micheil: there's little shared data apart from basic settings and configuration and shortcuts on creating specific objects [08:20] Ond: Launch it in a new shell, marlun? [08:20] micheil: a new process. [08:20] sholmes: Each require of a module isn't a new process is it? [08:20] micheil: no [08:21] micheil: but it is a new instance of that module, unless that module already exists in the current module [08:22] sholmes: What's the overhead then? If a module is required, doesn't the script just load and cache for when you use it. If the variable referencing the required module get's destroyed, so does the cache for the script? [08:22] micheil: but it's not the same instance [08:22] micheil: require('database') in module:a != require('database') in module:b [08:22] Olivier has joined the channel [08:23] tk has joined the channel [08:23] micheil: if require('database') returns a constructor [08:23] sholmes: micheil: that makes sense. [08:23] micheil: so I'm pretty sure you can't share connections across modules [08:24] micheil: (it would be very cool if you could, however, but that would imply some form of global scope) [08:24] micheil: and there is no real global scope in node.js [08:25] sholmes: you mean mysql connections? [08:26] d0k has joined the channel [08:28] Phyllio has joined the channel [08:28] sholmes: micheil: hang on. You mean even if I were to require the same module within my model modules and that required module looked like: ... [08:28] micheil: yes, each module that requires that module that defines your database connection will get a new instance of your connection [08:28] sholmes: https://gist.github.com/922971 [08:30] sholmes: micheil: this could potentially blow up in my face though, sense each model has it's own connection, it would seem like that could bit me in the butt. [08:30] micheil: I'm just testing this. [08:30] sholmes: my mysql server could get overloaded [08:30] sholmes: or something. [08:30] garrensmith has joined the channel [08:31] sholmes: Sense these model modules only get required when there's http requestions, maybe it's not so bad. [08:32] sholmes: the database connections would die after my HTTP request has returned a response, right? [08:34] raphdg has joined the channel [08:34] newy_ has joined the channel [08:34] isaacs has joined the channel [08:36] micheil: actually, I think I could be wrong. [08:36] sholmes: micheil: what makes you think that? [08:37] micheil: I just tried it. [08:37] qFox has joined the channel [08:38] micheil: ah, yes, I was wrong. [08:38] micheil: a requires connection, b requires connection [08:38] micheil: internally, connection module is loaded once, then cached. [08:38] micheil: so a's connection module === b's connection module [08:39] sholmes: really? Is this only so with mysql's module? [08:39] micheil: no, this is with all node.js modules [08:39] micheil: isaacs, ryah, and you guys about to comment? [08:39] techwraith: ACTION is also interested [08:39] isaacs: whut? [08:39] isaacs: comment on what? [08:40] sholmes: isaacs: it appears micheil has discovered that modules are cached [08:40] isaacs: yes, that's by design :) [08:40] isaacs: if it's the same file, it's the same object. [08:40] micheil: I originally thought that each instance was a fresh creation, hence no sharing of state across modules [08:40] micheil: by having the same parent modules [08:40] isaacs: nope. [08:41] micheil: a <-> connection <-> b [08:41] micheil: I thought it was actually two isolated instances. [08:41] isaacs: otherwise circular require() paths would be unresolveable [08:41] isaacs: if it resolves to the same filename, it's the same object. [08:41] techwraith: That's how you got around it! [08:41] techwraith: :) [08:41] isaacs: don't rely on that. [08:41] micheil: don't rely on that? why not? [08:42] isaacs: because require("foo") might resolve to a different file in a different place [08:42] micheil: oh, yes, that's very true, but if you're doing relative stuff, you'd be fine. [08:42] Phyllio has joined the channel [08:42] isaacs: yep [08:42] coreb has joined the channel [08:42] micheil: shit. why did I not realise this before? [08:43] isaacs: dunno. probably cause it Just Worked :) [08:43] isaacs: it mostly does [08:43] micheil: I always knew that the file contents was cached, and the resolved paths, just not that the exports objects were too [08:43] isaacs: it's just when you hit some weird edge that this matters. [08:43] ircretary has joined the channel [08:43] sholmes: wait, would this have a side effect? [08:44] micheil: sholmes: possibly. [08:44] __tosh has joined the channel [08:44] isaacs: some side effects: require("x") might not be "finished" when ou get it [08:44] micheil: depends if you want connection pooling / multiplexing databse connections [08:44] seivan has joined the channel [08:44] sholmes: If a module is dynamic enough to create it's exports based on something variable, like time, would a second attempt at requiring the module prevent it from executing? [08:44] micheil: ie, you want a and b to have separate db connections [08:45] sholmes: Or am I missing the point? [08:45] micheil: no, as long as the paths are the same, then it'd be the same module. [08:46] sholmes: micheil: of course, if the paths are the same, it's the same module. However, the point is that two requries to the same module are both the same object. [08:46] sholmes: this would mean a module like: [08:46] micheil: yes, that's correct. [08:46] sholmes: module.exports = new Date(); [08:46] isaacs: micheil: here's the edge case: https://gist.github.com/922986 [08:46] sholmes: would only be the date of the first require. [08:46] isaacs: sholmes: ^ [08:46] micheil: a requires c and b requires c, c is the same in both instances [08:47] isaacs: setting module.exports is even worse in that case. [08:47] isaacs: you *must* set module.exports before some other module require()s it [08:47] isaacs: should be the first thing in the module if you set module.exports [08:47] k1ttty has joined the channel [08:47] isaacs: or don't refer to the things on the returned export object until the requires are all resolved. [08:48] micheil: isaacs: however, something like a database connector, where the method to get a connection will also spawn a connection if no connection already exists would be considered perfectly safe [08:48] sholmes: isaacs: huh? That line is the entire module. [08:49] micheil: (you're no longer referring to properties but instances) [08:49] isaacs: you should not rely on modules being "global" in this way, though. it's an implementation detail. [08:49] isaacs: your code should be such that it might be identical, or might be different, or might have been hot-reloaded, or whatever. [08:49] micheil: isaacs: it's that long standard thing of how do you actually structure an application in multiple files with node.js [08:50] micheil: *long standing [08:50] isaacs: sure [08:50] isaacs: it's not that hard, though [08:50] sholmes: isaacs: btw, I think you made a typo in your gist; line 1 of x.js [08:51] hellp has joined the channel [08:51] isaacs: oh, yeah :) [08:51] sholmes: ;P [08:51] isaacs: fixed :) [08:51] Lef has joined the channel [08:52] sholmes: so x.x is undefined because? [08:52] sholmes: wait. I'm confuzled [08:53] sholmes: in first case: x.x in y.js is undefined because x.js is already loaded (it's the requiring script), correct? [08:57] sholmes: is there an echo in here? [08:58] thalll has joined the channel [08:59] felixge has joined the channel [08:59] felixge has joined the channel [08:59] robhawkes has joined the channel [09:05] [AD]Turbo has joined the channel [09:08] V1 has joined the channel [09:12] techwraith has joined the channel [09:14] hij1nx has joined the channel [09:15] gaving: guys, I was trying to deploy to joyent for a play, but it's failing with the obvious deps e.g. express. I've got what I need in the package.json file, is that enough? [09:15] gaving: or do I npm bundle and commit the result or what [09:15] muz1 has joined the channel [09:15] SamuraiJack has joined the channel [09:19] mraleph has joined the channel [09:19] isaacs: gaving: bundle and commit the result, or log in and npm install it manually. [09:20] isaacs: gaving: soon. soon it will work like it should. i promise :) [09:20] gaving: isaacs: ah right, wasn't sure. thanks :) [09:20] synkro has joined the channel [09:22] apoc has joined the channel [09:24] sholmes: https://gist.github.com/923010 Okay, dispite my attempt to garbage collect time, time2 still equals the same random number. Why? [09:25] micheil: because the module.exports or exports object from each module is cached [09:25] micheil: this is what I just learnt in my "being wrong on the module system" [09:26] ph^ has joined the channel [09:27] coreb: does anyone run node.js on amazon ec2? [09:27] cloudhead__: coreb: yes [09:28] V1: Are there any "best practices" (performance wise) when writing parser on node.js? [09:28] forzan has joined the channel [09:29] sholmes: micheil: then how would I clear that cache? [09:30] mikl has joined the channel [09:30] cloudhead__: V1: there's a bunch of things to consider [09:31] cloudhead__: like what regexps you use [09:31] cloudhead__: you have to try to keep string length low as much as possible [09:31] cloudhead__: if you're going to do matching or slicing on it [09:31] V1: I basically want to get more ops/sec out of my Memcached driver, I already went from 24k ops/sec to 67k ops/sec by caching my key => server lookup, but I do think the parser could use some tweaks as well [09:32] micheil: hmm.. [09:32] V1: this is my parser btw: https://github.com/3rd-Eden/node-memcached/blob/v0.0.1/lib/memcached.js#L264-509 [09:33] graysky has joined the channel [09:33] __tosh has joined the channel [09:33] mikl_ has joined the channel [09:33] V1: I could probalby save a few ms, by caching regexps instead having them created on each parser call. [09:34] cloudhead__: V1: from a quick glance, maybe see if you can iterate differently than shift() [09:34] cloudhead__: and also try to avoid str += foo if str is big [09:34] cloudhead__: try push() then join() in those situations [09:35] jackbach has joined the channel [09:35] V1: Yeh that might be worth a shot [09:35] Astro has joined the channel [09:36] jetienne has joined the channel [09:36] angerman has joined the channel [09:37] jackbach: hi there! [09:37] cloudhead__: V1: it sped things up a lot for me, but I was dealing with several Ks of data on average, and the parser was bigger [09:37] mikl has joined the channel [09:37] mikl has joined the channel [09:37] sholmes: wait, so if I load a model module on one HTTP request, and then load it again on another HTTP request, the second load won't occur because it's already cached? [09:37] cloudhead__: might not be a huge deal for memcached type stuff, especially that you don't really need to parse the data [09:37] cloudhead__: sholmes: yes [09:37] V1: The max length of a single response is limited to a length of 1048576 cloudhead__ [09:38] sendark has joined the channel [09:38] cloudhead__: V1: that's pretty big, but you don't need to parse the data right? [09:39] thalll has joined the channel [09:39] V1: cloudhead__: I depends on "flag" that is returned, as you can also store JSON and with my driver [09:39] boaz has joined the channel [09:39] V1: But it's mainly strings that are returned [09:39] cloudhead__: right, but then the json module takes care of that [09:39] sholmes: cloudhead: to what extent is it cached then? I'm assuming that a method call will always generate something new? [09:40] V1: cloudhead__: I don't need to further parse it, I only need to buffer it sometimes for multiple responses.. but thats about it [09:40] cloudhead__: sholmes: well it's cached as in if you modify the file, it won't change anything [09:40] cloudhead__: sholmes: yes, of course [09:40] cloudhead__: sholmes: the exported object is cached, that's all [09:41] sholmes: cloudhead: so all properties directly exported on an object are essentially worthless. [09:41] cloudhead__: sholmes: they would be 'globals' [09:41] cloudhead__: for that module [09:42] cloudhead__: requiring a module is not like instantiating a class [09:42] cloudhead__: so in that sense, yes [09:43] cloudhead__: V1: ok should be good then [09:43] sholmes: 'globals'? This seems very unconventional of a term in JS; it needs defining for me. I would see these things more or less as public properties, and would consider the private ones 'globals' if I had to say. [09:43] sholmes: not familiar with what it means to instantiate a class (JS kiddie) [09:44] FireFly|n900: 'globals' is a pretty common term [09:44] FireFly|n900: variables in global scope, properties to the global 'this' [09:44] cloudhead__: V1: I'd make sure this isn't a bottleneck: https://github.com/3rd-Eden/node-memcached/blob/v0.0.1/lib/memcached.js#L451 [09:44] marlun: Hmm I had to go before but could someone take a look at https://gist.github.com/922968 and tell me why it doesn't work. I would like to open vim let the user write to a file and then come back to node.js. Ond told me to launch it in a new shell but I don't understand. [09:44] cloudhead__: V1: if there's lots of data, it could be one [09:45] V1: cloudhead__: you suggesting I should use substr methods instead? [09:45] V1: to chop out the data? [09:45] FireFly|n900: [11:41:07] cloudhead: so all properties directly exported on an object are essentially worthless. [09:46] FireFly|n900: What do you mean by this, sholmes? [09:46] cloudhead__: V1: I would try to read the data without adding/cutting/searching as much as possible [09:46] techwraith: sholmes: so you have a module: exports.property = 0; the first time you require it property is 0. then you do property++; Then you require it somewhere else; property is at zero in the second scope, but at 1 in the first scope. [09:46] cloudhead__: V1: if you can get a way with a for() loop which reads by index, that's ideal [09:46] sholmes: FireFly|n900, 'this' isn't that global, in fact, it's local to a function scope, so long as that function is applied to an object or is a method of an object. [09:47] FireFly|n900: Yes, but 'this' refers to the global object in global scope... [09:47] cloudhead__: V1: and if you need to add data to a buffer incrementally, either use push() on an array, or use buffer.write or buffer.copy on a buffer [09:47] angerman has left the channel [09:47] FireFly|n900: v8> var global = this; global [09:47] v8bot: FireFly|n900: {console:{log:function (x){console.out.push(pp…,out:[]},print:function print(x){console.log(x)…,pp:function pp(o,depth){return pp_r…,pp_r:function pp_r(o,d){var a=[],p if…} [09:47] FireFly|n900: and so on [09:47] FireFly|n900: v8> Object.keys(this) [09:47] v8bot: FireFly|n900: ["console","print","pp","pp_r"] [09:47] sholmes: FireFly|n900, I exagerated a bit. Properties to a required module would essentially be static, hard coded. [09:47] V1: cloudhead__: thanks for the advice, will look in to it [09:48] bits58 has joined the channel [09:48] jackbach: the global thing: http://howtonode.org/object-graphs [09:48] jackbach: is a really good post [09:48] cloudhead__: V1: np, just remember everytime you do s += t where `s` is a string, it creates a brand-new string [09:48] FireFly|n900: sholmes, yep, you'll have to use a function to get it dynamic [09:48] V1: cloudhead__: [str,str].join('') also creates a new string [09:49] FireFly|n900: Yep, but [str,str,str].join("") creates one new string, str += str; str += str; creates two [09:49] cloudhead__: V1: yea but only once [09:50] cloudhead__: V1: you would only join() once all the data was appended to the array [09:51] sholmes: techwraith, I don't think so. If you incremented the property then required the same module, the property would be incremented at 1 in the second module. [09:51] V1: cloudhead__: ok. [09:51] techwraith: I'll have to test this [09:51] boaz has joined the channel [09:51] suckerpunch has joined the channel [09:51] zomgbie has joined the channel [09:52] sholmes: techwraith, I just did. It seems like all required modules are actually the same object. [09:52] sholmes: They return the same reference. [09:53] cloudhead__: that's what makes module configuration possible [09:53] cloudhead__: require('foo').configure({...}) [09:53] sholmes: what would that be used for? [09:54] cloudhead__: to setup global settings for that module [09:54] cloudhead__: for instance in a database module [09:54] cloudhead__: you might be using accross 20 files [09:54] cloudhead__: but you always want to connect to the same host/port [09:54] cloudhead__: you would set that up at the module level [09:54] cloudhead__: if the module provided an api for that [09:54] sholmes: I see [09:55] cloudhead__: then everytime you require('dbmodule'), it would have those defaults [09:55] matjas has joined the channel [09:55] AAA_awright: That's not the paradigm you should be using for databases though [09:55] sholmes: this module for example: https://gist.github.com/922971 [09:55] seivan has joined the channel [09:55] sholmes: AAA_awright, why not? [09:56] AAA_awright: Yeah, have it in a seperate file or something [09:56] grzesiek has joined the channel [09:56] angerman1 has joined the channel [09:56] grzesiek: hello world [09:57] sholmes: AAA_awright, yes. What did you think I would do? :P [09:57] AAA_awright: sholmes: You should be passing run-time variable data through arguments [09:57] sholmes: AAA_awright, two what? [09:57] sholmes: to* [09:57] AAA_awright: That's how it really should be done... [09:57] AAA_awright: To anything that uses the database connection [09:58] sholmes: AAA_awright, I should *pass* the db connection to my modules that need it, rather than make them go fetch it? [09:58] AAA_awright: If you have a database configuration module like you linked to, that's good, but even then it should only be require()d once [09:58] AAA_awright: Yes [09:58] cloudhead__: I'm not saying you should set the connection up at the module level, just the default parameters [09:59] cloudhead__: you still db.connect() in every file [09:59] AAA_awright: Maybe sensible defaults [09:59] AAA_awright: But not default values that would kill the program if they changed on you [10:00] AAA_awright: Like, database connection information [10:00] apoc has joined the channel [10:00] cloudhead__: why would they change? [10:00] grzesiek: anyone using node on ubuntu? [10:00] sholmes: cloudhead__: wait, even though I db.connect(), the successive attempts to require db.js will not run the script again. [10:00] cloudhead__: grzesiek: unfortunately, yes [10:00] cloudhead__: sholmes: correct [10:00] AAA_awright: Because it's a default? [10:01] sholmes: cloudhead__: so I'm not calling db.connect() on every file that requires db.js. [10:01] cloudhead__: AAA_awright: well then you're explicitly changing it and you know what you're doing [10:01] AAA_awright: If you're accepting the default that means you're going to let the library pick something sensible [10:01] cloudhead__: well no that's why you configure it [10:02] cloudhead__: require('library').setup(..my_defaults..) [10:02] AAA_awright: So while you're configuring it why not just pass the connection data to the library that depends on it? [10:02] cloudhead__: then any connect() would use those settings, unless specified otherwise [10:02] AAA_awright: Why would you need to connect() to the same database multiple times, anyways? [10:03] grzesiek: i have problem... i instaled node.. everything is ok, but after restart computer node not working... i type "export PATH=$HOME/local/node/bin:$PATH" and itd working with: "Your node instance does not have root privileges" what is wrong? [10:03] grzesiek: ubuntu machine [10:03] sholmes: AAA_awright: you wouldn't. This is the added benefit to having modules cached, I don't need to worry about multiple connections! :D [10:03] cloudhead__: AAA_awright: it depends if you're using a wrapper around the db module or not [10:03] AAA_awright: grzesiek: Can you get to the REPL? [10:04] sholmes: cloudhead__, what's a wrapper? [10:04] cloudhead__: sholmes: like your db.js, that's a wrapper [10:04] grzesiek: AAA_ what is that? im preety new.. [10:04] sholmes: how is it a wrapper? [10:04] AAA_awright: grzesiek: Read the documentation first? [10:04] cloudhead__: it wraps the mysql module [10:04] techwraith: grzesiek: type 'node' in the console [10:05] grzesiek: not all of it [10:05] hwinkel has joined the channel [10:05] grzesiek: node in console is working.. but after node server.js there is that words [10:05] bingomanatee has joined the channel [10:06] sholmes: cloudhead__: Ugh, I'm losing context. :P What depends on whether or not a wrapper is used? [10:07] grzesiek: something is wrong with privilages [10:07] AAA_awright: sholmes: I'm saying if you have a small module that contains the database information and creates a single new connection, and returns the connection instance, that's cool, that's loaded once by the main code and passed as an argument to any called libraries that also need the connection [10:07] AAA_awright: grzesiek: No you shouldn't need root at all [10:08] shaunau_ has joined the channel [10:08] AAA_awright: grzesiek: Wait what program are you running? [10:08] eb4890 has joined the channel [10:08] AAA_awright: A *program* might need root to do stuff [10:09] grzesiek: program? i type in terminal: cd ... & node.js -> it is working but with that words "Your node instance does not have root privileges. This means that the flash XML policy file will be served inline instead of on port 843. This will slow down initial connections slightly" [10:09] sholmes: AAA_awright: I see. Well, I'm doing this, except, I'm not passing it to the libs that need it, rather, I'm requiring it from within the libs. But, I suppose that's fine too, sense it doesn't matter because modules are cached anyway. [10:09] stephank has joined the channel [10:09] grzesiek: ehhh node server.js of course [10:09] AAA_awright: I'm not familiar with server.js what's that [10:10] techwraith: AAA_awright: server.js could be almost anything, half the tutorials out there start with a file called server.js :P [10:10] Spion has joined the channel [10:10] AAA_awright: Exactly my point techwraith [10:10] __tosh has joined the channel [10:11] techwraith: Sounds like he's using socket.io though :) [10:11] techwraith: That's a socket.io warning I think [10:11] sholmes: I call it app.js [10:11] AAA_awright: sholmes: It'll work the same but it's not flexible beyond that, it's a bad coding paradigm because it's looking for some user-defined place for a database connection instead of something passed by the application, uh [10:11] grzesiek: server.js is from "https://github.com/solisoft/Socket.IO-node/blob/master/example/server.js" [10:11] grzesiek: chat example [10:12] indutny has joined the channel [10:12] jackbach has joined the channel [10:12] sholmes: AAA_awright, in other words, it'll be harder to change later on. [10:12] AAA_awright: grzesiek: So it needs to open a port <1024, why you can't do that without root don't ask me I didn't write the OS but just start the thing with sudo [10:12] techwraith: it doesn't need to, it should be ok, it'll just be a bit slow for the flash fallback [10:13] AAA_awright: sholmes: That's the short answer I guess, yes [10:13] sholmes: Well, I'd still have to change the line of code where it's passed for each library, which is an identical scenario. [10:13] AAA_awright: techwraith: I thought it was flash that needed a port<1024 [10:14] grzesiek: sudo node server.js <- not working [10:14] techwraith: AAA_awright: it is, but it's just a fallback, if it can't connect on flash, it'll fallback to another transport (http polling maybe) [10:14] sholmes: identical to having to change the line of code were it's required in each library. [10:14] techwraith: grzesiek: What do you mean by not working? [10:14] AAA_awright: sholmes: You should be implementing as much of the program as possible as libraries, and a library that gets runtime level configuration from a module isn't a library at all [10:14] AAA_awright: That's my reasoning [10:14] grzesiek: message: "sudo: node: command not found" [10:14] AAA_awright: Node.js makes it really easy to do that, though some people still don't for some reason [10:14] AAA_awright: *npm*cough* [10:14] steffkes has joined the channel [10:15] jackbach: I'm getting this error when type $node in shell (MacOS X)-> "dyld: unknown required load command 0x80000022 Trace/BPT trap", any help please? [10:15] sholmes: AAA_awright, what's a runtime level configuration? [10:15] techwraith: grzesiek: Run it without sudo, then go to http://127.0.0.1:{whatever-port-it's-running-on} [10:16] AAA_awright: sholmes: Like, database configuration [10:16] techwraith: grzesiek: most likely - http://127.0.0.1:8080 [10:16] seivan has joined the channel [10:17] AAA_awright: sholmes: Something that doesn't change through any of the calls or anything... Just because of that you *can* put it in a module (since a module doesn't change) doesn't mean you *should*, you should treat it as something that can change, and sometimes it even does (what if you want to connect to two databases) [10:17] jackbach: yesterday i got node working, but don't know why today it thorws this error... [10:17] sholmes: AAA_awright: hmm. Well, firstly, my libraries are really model files. In a way, all my model files plus the db.js will be apart of a whole API. That is in a sense, my library. [10:17] path[l] has joined the channel [10:17] grzesiek: i know... all is working after "node server.js" but i'm affraid of message in terminal "Your node instance does not have root privileges. This means that the flash XML policy file will be served inline instead of on port 843. This will slow down initial connections slightly" [10:18] tmedema has joined the channel [10:18] techwraith: grzesiek: that's just a warning for the flash fallback, it's not a huge issue :) [10:18] mikl_ has joined the channel [10:18] iFire has joined the channel [10:19] grzesiek: ok... i have to belive you ;) [10:19] sholmes: AAA_awright, interesting. Where'd you learn this stuff? [10:19] AAA_awright: grzesiek: Oh that's the problem? That's almost nothing... Look into how Socket.io handles data and then read the documentation [10:19] AAA_awright: sholmes: Some experience here and there? [10:19] techwraith: AAA_awright++ [10:19] v8bot: techwraith has given a beer to AAA_awright. AAA_awright now has 1 beers. [10:20] grzesiek: ok.. thanks yo ;) [10:20] AAA_awright: :D [10:20] techwraith: :D [10:20] sholmes: AAA_awright, I was hoping that this was taught at some college classes or better yet, a book. [10:20] AAA_awright: sholmes: It probably is [10:21] techwraith: Anyways, it's almost 3:30am over here in SF. G'night guys :) [10:21] AAA_awright: sholmes: The very last word on this sort of stuff is a book called Design Patterns [10:21] techwraith: Good recommendation, do I have to get you another beer? [10:21] techwraith: lol [10:21] AAA_awright: I've only paged through it myself but I know of it [10:21] mikl__ has joined the channel [10:22] grzesiek: in poland is 12:21 ;) [10:22] sholmes: techwraith: same timezone...quiter. :\ [10:23] M3l7D0wN has joined the channel [10:23] techwraith: sholmes: :P [10:23] techwraith: sholmes: what the hell are you doing still up then? [10:23] sholmes: I should get to bed too [10:23] techwraith: Where are you located? [10:24] sholmes: friday night, duh, winning! [10:24] techwraith: If you're close we should meet up for beers sometime [10:24] sholmes: San Diego County [10:24] techwraith: Ah, cool [10:24] sholmes: ha, not so much. :P [10:24] techwraith: San Diego's not so bad :_ [10:25] sholmes: Yeah, definitely not bad, but not close. [10:26] techwraith: Anyhoo, I quit (as sholmes says). night all. [10:26] sholmes: lol, later skater [10:28] grzesiek: adios ;) [10:31] Wizek has joined the channel [10:32] jackbach: grzesiek do u speak spanish? [10:32] jackbach: im from barcelona [10:33] sholmes: I best get sleep too [10:33] sholmes: going to plant some trees tomorrow, it's a earth day thing [10:34] FireFly|n900 has joined the channel [10:40] cellvia has joined the channel [10:42] mikl has joined the channel [10:44] V1: Great, I love a good benchmark: FATAL ERROR: JS Allocation failed - process out of memory [10:44] V1: :D [10:44] hojberg has joined the channel [10:45] jetienne: :) [10:46] jetienne: V1: btw was it an actual out of memory using all your system memory ? or just v8 hitting a hardcoded limit ? [10:46] V1: jetienne: The hardcoded limit [10:46] jetienne: stagas had issue in the past with hardcoded limit... like a node process could not use more than 300mbyte [10:47] ziro` has joined the channel [10:47] jetienne: V1: this is still 300mbyte ? maybe we should bother mraleph and ryah to remove it :) [10:47] V1: for some odd reason.. My benchmark spikes to 99% cpu and 1gig memory.. [10:47] stagas: not that, an object can't be larger than 300mb, the process can go up to 1gb now [10:47] jetienne: stagas: ah ok [10:47] stagas: or 500mb maybe, you need to test it [10:47] __tosh has joined the channel [10:48] V1: FATAL ERROR: CALL_AND_RETRY_2 Allocation failed - process out of memory <-- it's getting better and better :D [10:48] jetienne: well still it would be cool to remove those articifial limit (mainly done for watchdog in browser i think) [10:48] jetienne: hehe [10:48] jetienne: soon it will be out of stack :) [10:50] bits58 has joined the channel [10:50] V1: =p [10:51] jetienne: stagas: oh btw i released http://pacmaze.com ! webgl+nodejs i like gamedev more and more :) [10:51] adulteratedjedi has joined the channel [10:52] jonaslund: jetienne: what kind of persistent storage do you have ? [10:52] jonaslund: firefox gives me an ugly popup [10:53] stagas: jetienne: saw it, it's pretty cool! well done [10:53] stagas: jetienne: can you rotate the camera? [10:53] jetienne: stagas: yep with c and v but the player control remains absolute... and the camera will be relative to the player... so good luck :) [10:54] adulteratedjedi: ACTION feels left out  [10:54] jetienne: jonaslund: ah yep the appcache stuff [10:54] jonaslund: what's it caching? [10:54] jetienne: jonaslund: i use appcache offline storage to speedup download [10:54] jetienne: jonaslund: the data used by the game. [10:55] jetienne: jonaslund: not much, the sound, the texture [10:55] jonaslund: wouldn't setting the cache headers from the server be easier ? [10:55] jetienne: jonaslund: yep. http://pacmaze.com is a workinprogress. i will release a new game twice a month [10:55] jetienne: jonaslund: so next version will be eassier on user. this one is the first [10:55] [AD]Turbo: jetienne, it looks really nice [10:56] jetienne: [AD]Turbo: thanks [10:56] jetienne: jonaslund: maybe i should use appcache only on browser which doesnt require popup.. [10:57] jonaslund: it was kinda slow for me (chrome 10.0.648.204) [10:57] jetienne: jonaslund: ok can you do "ping pacmaze.com" and gimme the latency ? [10:57] jonaslund: jetienne: yeah, i never run java applets that requires you to allow it all kind of shit through certificates [10:57] jonaslund: eventhough i know that those certificates are mostly used to get net connection [10:58] jonaslund: 108ms [10:58] jetienne: jonaslund: hehe this is common. people dont like to answer 10 questions before playing a game :) [10:59] jetienne: jonaslund: hmm ok so 2 possibilities. either the slowness you see is due to the high ping (i got 24ms here as the server is in paris) or just your graphics card is not well supported by webgl [10:59] stride: award badges for every hole in the user's firewall and they will click that button. :)) [10:59] jonaslund: jetienne: http://pastebin.com/R6iNgNg1 [11:00] jonaslund: jetienne: i think it's called intel hd4500 or smth ("last gen" intel integrated chipset) [11:00] jetienne: jonaslund: http://aleksandarrodic.com/p/jellyfish/ how fast is this ? [11:01] jetienne: jonaslund: your latency is funky, are you on wifi ? where are you physically [11:01] jonaslund: wifi in sweden [11:01] jonaslund: my net uplink is pretty fast though [11:01] jonaslund: my network is a .11g net [11:01] jonaslund: with plenty of neighbours [11:01] jetienne: jonaslund: yep but the regularity is no good on wifi [11:01] jonaslund: jellyfish looks smooth [11:02] jetienne: jonaslund: ok so the issue is in the network [11:02] jonaslund: jetienne: what do you do with the network ? [11:02] jetienne: jonaslund: being silly :) [11:02] jetienne: jonaslund: pacman is a single player game BUT all the engine behind is for multiplayer game [11:03] jonaslund: cool [11:03] jetienne: well a bit ashamed to require good net connection for a pacman :) [11:04] jetienne: especially as the server is in node.js i should port it to all browsers... [11:04] jonaslund: well i do see the point of testing out stuff [11:05] jonaslund: i'm doing some game stuff aswell and i'm trying to design everything in a timestep fashion [11:05] jonaslund: erm [11:05] jonaslund: not timestep [11:05] jonaslund: time prediction fashion [11:05] jonaslund: so everything looks smooth between iterations even if you have latency [11:06] jetienne: jonaslund: not sure to understand... you mean like "release on time" ? [11:06] jetienne: ACTION failed to sleep last night [11:07] jonaslund: jetienne: i mean more like, the simulation code says "update simulation to time X" [11:07] jonaslund: jetienne: and all objects are simulated from their previous timepoint [11:08] jonaslund: jetienne: now if i send an identical state to the clients from the server i can have the clients calculate the same state for arbitrary times unless some new orders has been given during the time [11:08] jetienne: jonaslund: i think i understand what you mean [11:09] jetienne: jonaslund: ok lets talk more on that later. my brain is so off i cant learn new things :) [11:09] jonaslund: it's nothing groundbreaking really [11:09] jonaslund: but it helps alot if you design the simulation for that from the start [11:10] bits58 has joined the channel [11:11] jonaslund: brb [11:12] mikl has joined the channel [11:12] cellvia: jonaslund: how are you accomplishing that practically? do you have any code to share? [11:13] cellvia: i was running into i think similar issue, i was sending out state changes at every minor change to all clients, causing lag [11:13] matjas has joined the channel [11:14] __tosh has joined the channel [11:15] jetienne: cellvia: out of the blue, maybe to add some small time randomness while sending ? it may smooth the load [11:15] stagas: cellvia: every object needs to be step based, so you get from the server a time or a frame position on every event, and simulate the 'real' position client side by advancing the state on every object * number of frames behind [11:17] liar has joined the channel [11:17] cellvia: wow thats def stimulating my brain, could you explain moer on "nd simulate the 'real' position client side by advancing the state on every object * number of frames behind" [11:17] cellvia: how would you choose the * number of frames [11:17] cellvia: is that referring to lag of the client? [11:18] cellvia: as in, the server will have a stepbased timer, and the client will be updated based on its relationship to the current server-step? [11:19] cellvia: jetienne: where would you insert the randomness? [11:20] jetienne: stagas: this create a lag between user input action and the actual display of the action, no ? if yes how do you handle that ? by having a small number of frames ahead ? [11:20] davidcoallier has joined the channel [11:20] jetienne: cellvia: i was thinking that maybe your problem were about the burst of network at every tick, so i was suggesting to smooth it with some randomness [11:21] jetienne: cellvia: it was out of the blue :) [11:21] cellvia: jetienne: practically that would mean, instead of sending at every tick, skip random amounts of ticks within a certain range of acceptability? [11:22] stagas: cellvia: that's the easy part, the hard part is that for every new data, you need to move back the simulation in time and recalculate the corrected position [11:22] cellvia: jetienne: why not skip a predetermined amount of ticks? i guess the randomness makes it less perceptible to the user? [11:23] cellvia: stagas: wow, that sounds pretty complex... do you know of any use cases with doing this or is it theoretical? do MMOs do that sort of thing? [11:23] jetienne: cellvia: i was thinking more... i need to send a message to X clients every 100ms... so i send messages at various time to spread the load [11:24] jetienne: cellvia: just a tech used for low level network protocols [11:24] stagas: cellvia: I think most fps multiplayer games work that way [11:24] cellvia: jetienne: ohhh ok gotcha, good simple tech! [11:25] jetienne: stagas: nice one. how did you learn it ? how can i learn stuff like that too ? :) [11:25] cellvia: stagas: makes sense, i remember seeing effects like that when i played laggy FPS, where user position seemed to be recalculated on the fly [11:25] devrim has joined the channel [11:25] cellvia: stagas: like as if the other players were being recalculated from an overshoot of their position [11:26] seivan has joined the channel [11:26] cellvia: stagas: yeah do share, whered you learn about that? [11:26] stagas: jetienne: they're not teached anywhere they're top secret [11:26] stagas: :P [11:26] stagas: cellvia: see http://gafferongames.com/ [11:27] jetienne: ACTION goes visits jobs.cia.com :) [11:27] cellvia: awesome, thanks! [11:27] cellvia: are there any existing libraries for node that accomplish such things? [11:28] stagas: not that I know of [11:30] cellvia: http://gafferongames.com/networking-for-game-programmers/what-every-programmer-needs-to-know-about-game-networking/ this looks good [11:30] cellvia: also theres a article just released in jsmag this month called "GAME DEVELOPMENT WITH NODE.JS" but dont feel like paying 5 bucks to read it... [11:31] shaunau_ has joined the channel [11:34] __tosh has joined the channel [11:35] cellvia: ttyl [11:35] jonaslund: ahhh yeah gaffer :D [11:36] jonaslund: but yes that is basically what i'm about [11:37] maushu has joined the channel [11:40] mikl has joined the channel [11:40] mikl has joined the channel [11:40] bergie has joined the channel [11:43] micheil has joined the channel [11:52] koo6 has joined the channel [11:59] jonaslund: anyone who knows a good netradio channel with no annoying dj's and mostly instrumental music ? [12:00] sreeix has joined the channel [12:01] muz1 has joined the channel [12:01] k0Nn3c739 has joined the channel [12:02] shaunau_: jonaslund: i listen to this on my digital radio(http://www.koffee.com.au/) not sure if they stram [12:02] shaunau_: *stream [12:03] shaunau_: there's not much dj or talking, no ads. just chilled out music. [12:03] koo6 has joined the channel [12:03] sreeix has joined the channel [12:04] jonaslund: not too bad, not really my style though [12:05] xla has joined the channel [12:05] M3l7D0wN has joined the channel [12:05] shaunau_: ah [12:06] FireyFly|n900 has joined the channel [12:06] jonaslund: arrr.. vocals [12:06] shaunau_: i like a mixed bag, and anything with no talking or ads rates high for me. [12:06] stagas: jonaslund: http://radioplz.com it's open source too https://github.com/stagas/radioplz [12:07] jonaslund: stagas: and down :D [12:08] jonaslund: ah now it came on [12:08] coreb has left the channel [12:08] stagas: jonaslund: yeah it probably crashed but it restarted :P [12:10] Kingdutch has joined the channel [12:10] jonaslund: stagas: you got good taste :D [12:10] jonaslund: ACTION was looking at radios.js [12:11] jonaslund: ACTION turns his focus on coding now [12:13] Country has joined the channel [12:13] muz1 has joined the channel [12:13] lorhko has joined the channel [12:13] kioopii has joined the channel [12:15] __tosh has joined the channel [12:16] hackband has joined the channel [12:20] jaket has joined the channel [12:24] xiackok has joined the channel [12:25] shaunau_ has joined the channel [12:27] bojicas has joined the channel [12:32] shaunau_: ACTION tried radioplz.com but nothing happens.. [12:33] coreb has joined the channel [12:33] shaunau_ has joined the channel [12:38] tmedema has joined the channel [12:40] demastrie has joined the channel [12:41] smurfr has joined the channel [12:42] kuya has joined the channel [12:52] suckerpunch has joined the channel [12:52] __tosh has joined the channel [12:52] Bj_o_rn has joined the channel [12:53] mytrile has joined the channel [13:00] francescop has joined the channel [13:03] jakehow has joined the channel [13:05] kriszyp has joined the channel [13:06] FireFly has joined the channel [13:10] pomodoro has joined the channel [13:12] ardcore has joined the channel [13:12] broofa has joined the channel [13:13] felixge has joined the channel [13:16] a|i has joined the channel [13:16] a|i has joined the channel [13:22] gmci has joined the channel [13:24] FireFly has joined the channel [13:24] tosh has joined the channel [13:25] unomi has joined the channel [13:25] yozgrahame has joined the channel [13:28] mAritz has joined the channel [13:33] industrial has joined the channel [13:33] pig has joined the channel [13:34] tmedema: How do I make node's require look in the app's directory? [13:34] dcampano has joined the channel [13:34] tmedema: instead of having to do require('./module') I want to do require('module') [13:35] baudehlo1 has joined the channel [13:37] tbranyen: tmedema: make a folder called node_modules [13:37] tbranyen: and put it in there [13:37] tbranyen: my_mproject/node_modules/module/ [13:37] symbel has joined the channel [13:38] tbranyen: tmedema: http://nodejs.org/docs/v0.4.5/api/modules.html#loading_from_node_modules_Folders [13:38] pig has joined the channel [13:39] namelessnotion_ has joined the channel [13:44] zemanel has joined the channel [13:44] pig_ has joined the channel [13:45] dnolen has joined the channel [13:46] tmzt has joined the channel [13:47] fyskij has joined the channel [13:47] fyskij: aloha [13:49] tmedema: tbranyen: I just did require.paths.unshift('./') [13:49] pig has joined the channel [13:50] tbranyen: tmedema: and you read the docs, yes? [13:50] tbranyen: that points out what a bad idea that is [13:50] tmedema: tbranyen: yeah [13:51] tmedema: tbranyen: well node_modules does not fit in my project structure design [13:51] tbranyen: kk, i don't know what you're doing, but glad you figured something that works for you [13:51] k0Nn3c739 has joined the channel [13:51] stonebranch has joined the channel [13:52] F1LT3R has joined the channel [13:53] tmedema: tbranyen: since the paths mutability may be removed I will refrain from using require('someMod') and use require('./someMod'); [13:53] tmedema: thanks [13:53] eyesUnclouded has joined the channel [13:54] pig has joined the channel [13:56] jonaslund: i'm pretty sure you'll be able to modify paths from the commandline if mutability is ever removed [13:56] jetheredge has joined the channel [13:57] tmedema: hmm alright, but I guess pointing to the current path is not a bad thing anyway [14:01] [AD]Turbo has joined the channel [14:02] xtianw has joined the channel [14:02] __tosh has joined the channel [14:03] liar has joined the channel [14:04] tmedema: How would I make Jade interpret headScript as a variable? script(type='text/javascript', src='headScript') [14:04] davidwalsh has joined the channel [14:04] kuya has joined the channel [14:04] dmojoryder has joined the channel [14:05] rfay has joined the channel [14:05] suckerpunch has joined the channel [14:06] xtianw: tmedema: don't put quotes around it [14:07] beawesomeinstead has joined the channel [14:07] beawesomeinstead has joined the channel [14:08] tmedema: xtianw: heh, it's a bit confusing the jade and when something is literal or not, thanks! [14:08] industrial: I installed node from git in ~/Applications/node-git and then installed npm and then did a npm install brunch, brunch however is not in my path. Should I be doing something myself to add it to the path, or should npm do this? [14:08] industrial: There's a brunch bin at ~/.npm/brunch/0.6.2/package/bin/brunch [14:09] industrial: Only did a PATH=~/Applications/node-git/bin:$PATH for node. [14:09] rfay|movie has joined the channel [14:11] hij1nx has joined the channel [14:13] JimBastard has joined the channel [14:13] JimBastard: this...is..NODEJS [14:14] eee_c1 has joined the channel [14:14] eee_c1 has left the channel [14:14] k0Nn3c739 has left the channel [14:15] kriszyp has joined the channel [14:16] Swizec has joined the channel [14:19] piscisaureus has joined the channel [14:20] xtianw: industrial: I'm not sure. I installed npm with sudo so everything is in /usr/local/bin [14:23] industrial: xtianw: does npm do anything with plugin bins? create symlinks? [14:26] xtianw: industrial: Yeah, everything in /usr/local/bin is a symlink to its bin in /usr/local/lib/node/.npm [14:27] yozgrahame has joined the channel [14:27] xtianw: You might be able to create a .npmrc ini file? I don't know if that's still supported [14:29] xtianw: Ah yeah, do npm config list [14:29] xtianw: You can set the binroot and etc [14:29] Kingdutch has joined the channel [14:29] industrial: ah thanks, I'll play around with it :) [14:29] pt_tr has left the channel [14:30] MattJ has joined the channel [14:32] tmedema: Folks, I was hoping to hear about your experiences with VPS/cloud providers. Basically I'm working on an app that'll use a lot of bandwidth, was looking for a cloud/VPS provider that provides high traffic plans for an inexpensive price [14:32] tmedema: any suggestions? [14:33] xtianw: I've never dealt with a lot of bandwidth, but I like linode a lot. [14:35] a|i: when running 'npm install package' does the package get installed globally for all apps, or just for a specified app? [14:35] a|i: confusing. [14:35] tmedema: xtianw: I have credit at linode, but that's a typical example of a low bandwidth provider [14:35] tmedema: for the price that is [14:35] xtianw: How much bandwidth are you looking for? [14:36] xtianw: a|i: globally [14:36] tmedema: xtianw: well no fixed size, but I want to be able to update my bandwidth when needed without having to upgrade RAM / CPU as well - I am only proxying data so I do not need much RAM [14:36] tmedema: because I never store things in memory other than temporary buffers [14:36] tmedema: so I need a lot of bandwidth with relatively low RAM [14:37] a|i: xtianw: why do I get that node_modules/ dir then? the packages are only available if node_modules/ dir axists for an app. [14:38] tmedema: I believe VPSs are much cheaper when it comes to bandwidth than cloud hosters [14:38] xtianw: a|i: http://nodejs.org/docs/v0.4.6/api/modules.html#loading_from_node_modules_Folders [14:39] newy_ has joined the channel [14:40] unknown_had has joined the channel [14:40] wilmoore has joined the channel [14:40] xastey has joined the channel [14:41] a|i: xtianw: so in order to have modules globally available for node apps, all apps projects have to be inside, or nested, the same directory? [14:42] FireyFly|n900 has joined the channel [14:44] xtianw: a|i: not if you're using npm [14:44] fljitovak has joined the channel [14:45] a|i: xtianw: when I run 'sudo npm module' it installs the module the current directory, is it how it's supposed to work? [14:45] xtianw: No [14:46] jonaslund: tmedema: gandi gives you a set price and set speed. so you don't have to worry about extra fees afaik [14:46] xtianw: a|i: How did you install npm? [14:46] jeff_horton has joined the channel [14:47] a|i: xtianw: git clone http://github.com/isaacs/npm.git ** cd npm && sudo make install [14:47] a|i: xtianw: calling 'npm install module' without sudo doesn't work, giving this error: Error: EACCES, Permission denied '/Users//.npm/node-uuid/1.1.0/package.tgz' [14:48] okuryu has joined the channel [14:48] a|i: but I have the write access to that dir [14:48] herbySk has joined the channel [14:49] xtianw: It doesn't install modules locally though [14:49] xtianw: What do you get for npm config get root [14:49] tmedema: jonaslund: gandi says Bandwidth 10 Mbps (about 3.1 TB of data transfer) for 24 euros / m excl. tax, seems like 3.1TB is quite a lot for that price [14:49] a|i: undefined [14:49] xtianw: Well there's your problem [14:50] a|i: I just followed the installation instruction. [14:50] tmedema: jonaslund: quite weird the way they state the bandwidth though.. [14:50] a|i: npm page has 101 ways to install it, and none of them work fine under mac [14:50] Lagnus has joined the channel [14:51] xtianw: I just used the 'curl http://npmjs.org/install.sh | npm_install=rc sh' method [14:51] xtianw: I haven't installed from source in a long time, so I don't know why your config would be empty like that [14:54] a|i: xtianw: that command fails for me, because: /Users//.npm is not writeable for the install script. [14:54] Emmanuel__ has joined the channel [14:55] a|i: the install script is not tun by the current user. [14:56] a|i: sudo might work, but it's odd to sudo for you're own home dir. [14:56] xtianw: Yeah, when I installed it I guess the command to install was 'curl http://npmjs.org/install.sh | sudo sh' [14:57] a|i: heck, even sudo doesn't work! [14:58] hwinkel has joined the channel [14:58] a|i: xtianw: tries it with 'curl http://npmjs.org/install.sh | sudo sh' and 'npm config get root' still gives me undefined [14:59] a|i: that install script is a mess of permissions. [14:59] xtianw: Haha [14:59] xtianw: You might need to delete the old config first? [15:00] prettyrobots has joined the channel [15:01] a|i: where is it? [15:01] steph021 has joined the channel [15:01] a|i: I did run 'sudo npm uninstall npm -g' before re-installing. [15:01] xtianw: npm config get globalconfig [15:01] xtianw: Huh [15:02] xtianw: That's weird [15:02] xtianw: Yeah you could set those config values manually I guess [15:02] a|i: well that get globalconfig gives me a path to a file, that file does not exist. [15:03] a|i: it's just getting better and better. [15:03] xtianw: So the config file isn't getting created at all [15:03] a|i: but the script has the write access. [15:04] a|i: cannot I just set the node_modules path manually? [15:05] ajnasz has joined the channel [15:06] bwinton has joined the channel [15:07] xtianw: Yeah, you can do require.paths.unshift('/path/to/modules'), but that is kind of a pain [15:07] xtianw: Because you have to update new versions manually and etc [15:15] namelessnotion_ has joined the channel [15:18] dmojoryder has joined the channel [15:23] pastak has joined the channel [15:23] a|i: xtianw: 'curl http://npmjs.org/install.sh | sh' worked following: https://github.com/isaacs/npm/issues/736 [15:23] a|i: someone should really edit that installation page. [15:24] suckerpunch has joined the channel [15:24] eldios has joined the channel [15:26] eldios has joined the channel [15:27] timmywil has joined the channel [15:27] ajpiaNOU has joined the channel [15:28] pHcF has joined the channel [15:30] xtianw: a|i: Yeah, what's confusing is that the readme that gets shown on the github page is actually for the next version (1.0), but npmjs.org/install.sh script is for the current version (0.3) [15:30] xastey: odd getting an error when doing request.headers['content-type'].split [15:30] gmci has joined the channel [15:30] xastey: but only happens randomly [15:31] a|i: not sure why this problem is only on *nix, do they just test it on windows or what. [15:31] xtianw: No if you look at the readme for the current version, that's the command it lists: https://github.com/isaacs/npm/tree/v0.3.18 [15:32] boaz_ has joined the channel [15:32] Guest34687 has left the channel [15:33] boaz_ has joined the channel [15:33] a|i: right. [15:34] xtianw: Haha yeah, I had forgotten about that. I had similar issues when it went from 0.2 to 0.3. [15:34] stepheneb has joined the channel [15:35] jjmalina has joined the channel [15:36] brianloveswords has joined the channel [15:39] jetienne has joined the channel [15:39] dnolen has joined the channel [15:39] liar has joined the channel [15:40] Spion has joined the channel [15:41] __tosh has joined the channel [15:41] Aikar: wat http://s8.motherlessmedia.com/dev86/0/496/043/0496043379.jpg [15:41] Aikar: (swf pic but nsfw site so dont go out of it) [15:41] edude03 has joined the channel [15:42] Aikar: sfw* [15:42] tmedema: What's that website with most commonly included packages etc.? [15:42] Aikar: http://search.npmjs.org [15:43] Aikar: and another wat image http://a8.sphotos.ak.fbcdn.net/hphotos-ak-ash4/221772_10150563948950331_793410330_18093808_609984_n.jpg [15:43] galaxywatcher has joined the channel [15:43] tmedema: thanks [15:43] Sbioko has joined the channel [15:43] Sbioko: Hi all! [15:44] Corren: also hi :p [15:44] Sbioko: Does 'static' middleware unallocates resources it used after serving file? [15:45] Aikar: no [15:45] Sbioko: I'm using HTML5 audio(.mp3 4 MB), and the loading process of it gets slower and slower after each request [15:45] Aikar: it keeps em in memory for cache [15:45] Sbioko: Aikar: thanks, how to force it to free resources? [15:45] Aikar: i noticed after testing the speed of a 1gb file that same issue ;( [15:45] Aikar: used express as a quick way to test a file lol [15:45] Sbioko: Aikar: I'm using Express in my app too [15:46] Sbioko: Aikar: so you don't know how to solve this problem? [15:46] Sbioko: how to disable caching? [15:46] Aikar: i udnno how to fix it, but there SHOULD be a config saying "dont cache big files" dunno if there is or not [15:46] Aikar: i havent really explored much with express yet [15:46] Sbioko: Or maybe I should use separate solutions for serving static files [15:46] Sbioko: Node.js-powered too [15:46] Aikar: yeah people seem to suggest using nginx to host static files [15:47] Aikar: caching small js/css files is good [15:47] Sbioko: https://github.com/joyent/node/wiki/modules#web-frameworks-static [15:47] Aikar: just need a way to not cache large files [15:47] Sbioko: If I'm serving CSS/JS from S3, there is no need even for that [15:47] awenkhh has joined the channel [15:47] Aikar: well you could write your own static file loader then [15:47] awenkhh has joined the channel [15:47] Aikar: use the stream .pipe() function [15:47] JimBastard: we use node-static [15:47] Aikar: with fs.readFile() [15:48] Aikar: or try that [15:48] JimBastard: https://github.com/cloudhead/node-static [15:48] abraham has joined the channel [15:48] keyvan: i just got a dedicated server for the first time (serverpronto) and i was supposed to get 4gb of ram... i actually got 3632 MB is that normal? [15:48] tfe_ has joined the channel [15:48] tfe_ has joined the channel [15:48] Sbioko: Aikar: I think no need to write own [15:48] Aikar: i have a pretty big project planned so im working on building 'foundation' libraries, so i havent really gotten to the point of playing with express much [15:48] Sbioko: JimBastard: thanks for the link [15:48] JimBastard: Sbioko: anytime [15:49] Sbioko: keyvan: how did you measure it? [15:49] keyvan: Sbioko: free -m [15:49] Aikar: keyvan: the hosting providers may have harddrive-manufacturer size owned you [15:49] keyvan: Sbioko: top tells me 3719632k which is same as 3632 mb [15:49] Sbioko: keyvan: as I'm understanding this, the number you got is the free memory [15:49] keyvan: Aikar: right thats what i thought but even then its still short by 200mb [15:49] Sbioko: not the whole size of memory you've got [15:50] Aikar: look at top [15:50] jetienne: keyvan: you run macos [15:50] Aikar: Mem: 4057272k tota [15:50] Sbioko: keyvan: so no need for worrying [15:50] Aikar: open top and memory is printed [15:50] keyvan: heres a screen shot of free -m output http://www.keyvanfatehi.com/up/screencap/2011.04.16.08.50.02.png [15:50] keyvan: top: http://www.keyvanfatehi.com/up/screencap/2011.04.16.08.50.27.png [15:50] keyvan: im worrying a lot actually... first time venturing out of VPS-land and into dedicated [15:50] xastey: correct me if i'm wrong but doing /script.js === http://www.site.com/script.js with respect to using a load balancer right [15:51] keyvan: only because im afraid of gettting ripped off or something [15:51] Sbioko: keyvan: I cant see your snaps, not loading [15:51] keyvan: grrr they should [15:51] xastey: it shouldnt matter which way you link to it right? [15:51] keyvan: works for me [15:52] Aikar: keyvan: if you dont like that company i have to recommend serverloft, they have a really sweet deal for quad core xeon 8gb memory, SSD drive, 5tb bw, 1tb of SATA storage, for 120$/mo USD [15:52] Aikar: i had 100% uptime for a year [15:52] keyvan: Aikar: aww that sounds good [15:52] keyvan: im paying 120 for 4gb mem (3.6gb....), 15tb b/w, 1tb hdd [15:52] Aikar: sadly i bought my server last year before they offered that and dont wanna go through hassle of switching IP's ;( [15:52] keyvan: but ireally need the bandwidth [15:52] stride: one of our machines has her 1500 day birthday in two weeks :) [15:53] Aikar: well bw is cheap [15:53] arian_ has joined the channel [15:53] Aikar: you can buy more bw for cheap lol [15:53] arian_: hi [15:53] astropirate has joined the channel [15:53] Aikar: by 100% uptime i also meant network uptime too :P [15:53] Sbioko: arian_: hi [15:53] keyvan: Aikar: thanks i will look into their offers.... i hope i can get rid of the current server and get my money back easily.... [15:53] Guest47238: o whoops, NickServ is changing my names again [15:53] Corren: speaking of ssd, i cant figure wjat to use a spare 160gb drive on :( [15:53] Guest47238: (im arian) [15:53] Corren: 160gb ssd [15:54] tobmaster has joined the channel [15:54] Aikar: keyvan: and even though its a german company, they have english support that is extremely help and answers tickets extremely fast [15:55] Aikar: helpful* [15:55] Corren: already have one in desktop and new laptop on way with one :S [15:55] jetienne: Corren: put a cache [15:55] Corren: example or linky [15:55] keyvan: Aikar: nice ! any ideas how to ditch my current provider..... i just signed up with them yesterday... not sure if i can use the ram thing yet since im not sure if they're truly raping me on it but im pretty sure they are [15:55] keyvan: Aikar: loft looks good [15:55] jetienne: or simply a swap and do large images computations :) [15:55] Corren: haha [15:56] Aikar: keyvan: see if they have a 30d money back guarantee [15:56] Aikar: keyvan: top should say 4gb if you were told 4gb [15:56] Corren: 160gb ssd scratch for photoshop :) awesome, except im a coder :$ not a ps jockey [15:56] Aikar: they prolly are shafting customers and hope they dont notice [15:56] keyvan: Aikar: yeah it doesnt... they're shafting me then [15:57] keyvan: Aikar: even with that 1024 thing its still way too low [15:57] icebox has joined the channel [15:57] fumanchu182 has joined the channel [15:57] keyvan: yesssssss theres money back guarantee found it. im switching. thanks aikar [15:57] Aikar: np [15:57] justinTNT has joined the channel [15:57] justinTNT: hello, [15:58] justinTNT: anyone familiar with jqtpl? [15:58] justinTNT: I'm having trouble with arrays ... [15:58] path[l] has joined the channel [15:58] Aikar: i recommend Ubuntu 10.04 LTS x64 OS :P I recently was on CentOS for a long time and got so tired of it. [15:58] Aikar: it was like living in the 90s :( [15:59] Aikar: -!- Sevokevo_Aikar_Help_Please [Sevokevo@ffo-A9025C6B.austin.res.rr.com] has joined #vanadiel [15:59] tobmaster has joined the channel [15:59] Aikar: i think someones trying to get my attention [15:59] Sbioko: how to get font name from .ttf file? [15:59] Aikar: i dont feel like helping people today :( [16:00] Aikar: i bet one of my opers has shunned him lol [16:00] Aikar: yep [16:01] keyvan: Aikar: ubuntu / deb based definitely. i dont even want to know how to administer anything without apt [16:02] Aikar: lol [16:02] ardcore has joined the channel [16:04] matclayton has joined the channel [16:04] justinTNT: I'm using jqtpl. I pass an array to my view. I can look at data[1].items, but I can't seem to make {{each}} work .. [16:05] Guest47238: It's funny, I was searching for libraries that make evented non-blocking i/o easier in C [16:05] Guest47238: then I found node.js [16:05] Guest47238: learned javascript in 4 hours [16:05] Guest47238: and started writing [16:05] Guest47238: I just love this [16:05] guybrush: wah! http://nodejs.org/docs/v0.4.6/api/tls.html#s_tls.connect point 1 and 2 s/server/client/ [16:05] Aikar: lol [16:05] newy_ has joined the channel [16:05] Aikar: yeah JS is nice, its consistent unlike PHP ;) [16:05] Aikar: makes it easier to pickup [16:06] losing has joined the channel [16:06] Guest47238: well, I'm not using it for a http server :P [16:06] Aikar: dont have to, thats just an example :P [16:06] warz has joined the channel [16:07] Guest47238: My old protocol for a little multiplayer game I wrote, was written using java server backend [16:07] Guest47238: the problem is, I used 64 bit integers (long ints), [16:07] Aikar: well [16:07] Aikar: js isnt too friendly with those [16:07] Guest47238: so now I gotta modify all my client-side code, because javascript doesnt support those [16:07] Guest47238: ): [16:07] Aikar: yea [16:07] dnolen has joined the channel [16:07] FireFly has joined the channel [16:07] sako has joined the channel [16:08] Guest47238: and it's a rather important part of the protocol, they are used to exchange secure-random seeds for the encryption [16:08] Guest47238: and usernames are base37 encoded into a 64 bit number too, so that's 2 things I have to resolve [16:09] Guest47238: but I really want to use node.JS, I love it [16:09] Aikar: well least we know your not a microsoft employee now! [16:09] Guest47238: how that? [16:09] Aikar: had an MS employee bashing on node saying how stupid it was lol [16:09] Guest47238: lol, [16:09] Aikar: "JS should stay in the browser" [16:09] Guest47238: bullshit [16:09] Guest47238: VB should stay on paper [16:10] Guest47238: :3 [16:10] halfhalo: or in a car [16:10] Aikar: a car thats driving off a bridge [16:10] halfhalo: bridge of doom? [16:10] Guest47238: .NET bridge [16:10] stride: Aikar: "it's free, it can't be right"? :))) [16:10] Guest47238: o well, I haven't used windows for like 2 years now [16:11] gqlewis has joined the channel [16:11] Guest47238: it started as a joke, but then I didn't feel the urge to go back anymore [16:11] zman has joined the channel [16:11] mscdex: i guess you're not a heavy gamer then? [16:11] Aikar: i gave up games so i could actually get some coding done [16:12] Guest47238: not at all, I'm 'different' [16:12] mscdex: heh [16:12] Aikar: mmo's and programming dont go together unless your programming for the game [16:12] Guest47238: I play quake live though, which is supported on linux [16:12] Corren: ACTION justvleft ms for a node project ;) [16:12] Aikar: cept my programming for FFXI didnt really make me money :P [16:12] jakehow has joined the channel [16:13] Guest47238: I forgot my shortcuts on irssi, I fail [16:13] jetheredge has joined the channel [16:13] Aikar: im considering spawning up a plugin for FFXI to give v8 as a scripting language, would love to do node but no embed support yet :( [16:13] stride: in soviet russia, irssi forgets your shortcuts [16:13] Aikar: get the base line done then let one of the devs whos still maintaining the project continue it [16:13] Guest47238: I should rape v8 to give me some 64 bit integers [16:13] arlolra has joined the channel [16:14] Aikar: Guest47238: i think people have wrote GMP bindings and such [16:15] Draggor: arianrock: look for bigint [16:15] Aikar: Guest1647: also if its for your own project, you can look into writing C++ bindings to provide features like that [16:15] Draggor: ACTION is currently working on bigfloat [16:15] arianrock: true [16:16] arianrock: or I could just modify my protocol a bit [16:16] arianrock: a 32 bit* [16:16] arianrock: pun intended [16:17] mscdex: is bigfloat compatible with node-parade? [16:17] mscdex: :-D [16:17] Draggor: what is node-parade? [16:17] mscdex: a joke ;) [16:17] mytrile has joined the channel [16:17] Aikar: lol [16:17] arianrock: thanks Draggor, bigint is just what I was looking for [16:18] Draggor: arianrock: if anything is borked or doesn't work, please tell me! [16:18] arianrock: alright [16:18] Draggor: Borked being a technical term [16:19] Sbioko has left the channel [16:23] V1: xzzzzzzzzzzzsssssszzzzzzzzzsssddddd [16:23] V1: whoops, srry was cleaning my keyboar [16:23] V1: d* [16:23] arianrock: ACTION is amazed how intuition actually outputs working javascript code [16:25] namelessnotion_ has joined the channel [16:25] arianrock: who's a fan of the hitchickers guide to the galaxy? [16:26] mynyml has joined the channel [16:26] phiggins: me [16:26] arianrock: I think you're going to like my next project then [16:26] mikeal has joined the channel [16:26] arianrock: :3 [16:26] mnbvasd: arianrock: everybody, unless they can't see through the SEP field. [16:26] arianrock: ): the domain name: theansweris42.com is already taken [16:28] jetienne: thanksforallthefishes.Com ? [16:29] justinTNT: hey, so : anyone using jqtpl as a view rendering engine in express? [16:29] arianrock: no, the idea is a website where people can submit: quotes, pictures, answers to tests, or anything that ends up in 42 [16:29] jetienne: sorryfortheinconveniences.com this is what god say to humans in galatic routard [16:30] jetienne: routard=hitchhicker [16:31] xtianw: justinTNT: most people use jade [16:33] gmci has joined the channel [16:33] graysky has left the channel [16:34] ryanfitz has joined the channel [16:35] a|i has joined the channel [16:35] a|i has joined the channel [16:36] pomodoro has joined the channel [16:37] marcello3d has joined the channel [16:38] ianfarrell has joined the channel [16:38] kriszyp has joined the channel [16:40] unomi has joined the channel [16:43] suckerpunch has joined the channel [16:43] justinTNT: yeah jade but ... I'd rather deal with something more like jqtpl or weld .. [16:45] captain_morgan has joined the channel [16:49] kriszyp has joined the channel [16:49] jdalton has joined the channel [16:49] halfhalo: someone harness the power of node to make this go faster: http://www.aperturescience.com/glados@home/ [16:50] jdalton has left the channel [16:51] edude03 has joined the channel [16:52] k1ttty has joined the channel [16:52] tedsuo has joined the channel [16:54] b0t has joined the channel [16:55] mtsl has joined the channel [16:59] tosh has joined the channel [17:00] Childhood has joined the channel [17:00] polotek has joined the channel [17:01] Swimming_bird has joined the channel [17:01] kioopii has joined the channel [17:02] TheIronWolf has joined the channel [17:02] timcosgrove has joined the channel [17:02] polotek: haven't been in node irc in a loooong time [17:02] timcosgrove has left the channel [17:02] dnunes has joined the channel [17:02] dnunes has left the channel [17:02] boaz has joined the channel [17:03] gqlewis has joined the channel [17:03] xandrews has joined the channel [17:05] mischief has joined the channel [17:08] yhahn has joined the channel [17:08] mikeal has joined the channel [17:11] c4milo1 has joined the channel [17:11] thalll has joined the channel [17:12] pHcF has joined the channel [17:12] eee_c1 has joined the channel [17:12] olympum has joined the channel [17:12] dnunes has joined the channel [17:13] olympum has joined the channel [17:15] timmywil has joined the channel [17:15] V1 has left the channel [17:15] Remoun has joined the channel [17:15] dnunes has joined the channel [17:16] dnunes has left the channel [17:16] ardcore has joined the channel [17:18] matclayton has left the channel [17:19] stepheneb has joined the channel [17:19] stepheneb has joined the channel [17:20] newy_ has joined the channel [17:20] zivester_ has joined the channel [17:25] pomodoro has joined the channel [17:26] mjr_ has joined the channel [17:26] robhawkes has joined the channel [17:28] gqlewis has joined the channel [17:30] kriszyp has joined the channel [17:30] tedsuo has joined the channel [17:31] Casperin has joined the channel [17:33] Casperin: node(1349,0xa032b540) malloc: *** error for object 0x35002f4: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug Segmentation fault [17:33] Casperin: what's that? [17:35] hoodow has joined the channel [17:36] losing has joined the channel [17:40] isaacs has joined the channel [17:41] marcello3d: quiet day [17:41] Johan_____ has joined the channel [17:42] prettyrobots has joined the channel [17:43] Casperin: well if you're up for a challenge, then I got nodejs installed which crashes every time the server is hit with a request (kind of inconvenient), and reinstalling doesn't help ;-) [17:43] ryanfitz has joined the channel [17:44] b0t` has joined the channel [17:46] CrisO has joined the channel [17:47] robhawkes has joined the channel [17:47] Phyllio has joined the channel [17:47] randallagordon has joined the channel [17:48] mjr_: Casperin: what platform? [17:49] mjr_: Also, do you have native code modules in use? [17:50] sleeplessinc has joined the channel [17:50] Casperin: mjr_: Mas osx 10.6, and yes, I believe so (if I understand your question): Express, jade, and sass [17:51] Casperin: mac* [17:51] mjr_: I think those are pure js modules [17:51] Casperin: I guess no then :) [17:51] pquerna: Casperin: can you run it in gdb? [17:51] mjr_: Sadly, your build is messed up somehow. [17:51] pquerna: gdb node [17:51] pquerna: run foo.js [17:52] pquerna: make it crash [17:52] pquerna: then type bt [17:52] pquerna: and then pastebin the output [17:52] stagas: Casperin: did you install with git? [17:52] Casperin: pquerna: what? I'm new to all this… I'm just a poor frontend guy thinking he can now do server stuff :P [17:52] Casperin: bt? [17:52] andi5 has joined the channel [17:52] pquerna: short for backtrace [17:53] bshumate has joined the channel [17:53] bshumate has joined the channel [17:54] Casperin: http://pastebin.com/uPGnjwTC I hope this is what you mean [17:54] markstory has joined the channel [17:54] marcello3d: that's a frightening error [17:54] pquerna: er.. yes. thats what i meant. but. [17:54] pquerna: not what i'd of expected. [17:55] Casperin: stagas: yes, I cloned it… which gave me version 0.5-pre which turned out quite unstable (duh), so I tried to reinstall from the tarball, and now it does tell me it's v. 0.4.6, but that doesn't matter. It still crashes (while it runs smoothly on my two linux machines) [17:55] marcello3d: did you install with ./configure, make, then sudo make install? [17:55] Casperin: while we're on that subject.. mac's just ARE frightening.. [17:56] Clooth has joined the channel [17:56] Casperin: marcello3d: first no, then yes, then.. no I think.. then yes again… I've been at it for a few days ;) [17:56] mscdex: sudo make me a sandwich [17:56] mscdex: :-D [17:56] marcello3d: maybe try make uninstall [17:56] marcello3d: maybe you have something leftover? [17:56] mscdex: make distclean [17:56] pquerna: Casperin: are you sure you are feeling alright? maybe you need to get a re-up on your stevepills [17:56] marcello3d: I run node.js on mac, but never had problems compiling [17:57] Casperin: marcello3d: did that a few times.. and yes I do [17:57] ckknight: Aikar: I went to MIX this week and a lot of Microsoft people that I talked to were excited about node.js [17:57] Casperin: mscdex: what? there's such a command? [17:57] mscdex: Casperin: it clears out any built files [17:57] krl has joined the channel [17:57] krl: any way to supress/redirect console.log output? [17:57] Casperin: pquerna: haha right [17:57] marcello3d: make foo just runs whatever targets are specified in the Makefile [17:57] marcello3d: so it depends on the project [17:57] Casperin: okay, I'll try the distclean.. hold on [17:58] Casperin: ehhh… how do I quit gdp? :-/ [17:58] marcello3d: control c/quit [17:58] Casperin: ^d [17:58] marcello3d: or whatever [17:58] ckknight: krl: var oldLog = console.log; console.log = function() { /* do something else */ }; [17:58] unomi has joined the channel [18:00] Casperin: mscdex: http://pastebin.com/rdap359H :-( [18:01] vikstrous has left the channel [18:01] xtianw: Casperin: Also do make uninstall [18:01] dnunes has joined the channel [18:02] Casperin: I did that :) [18:02] hij1nx has joined the channel [18:03] xtianw: And node -v still works? [18:03] Casperin: now I get a "The project was not configured: run "waf configure" first!" when I try [18:03] Casperin: yes [18:03] gazumps has joined the channel [18:04] krl: ckknight: ah, yes that solved my problem. thanks [18:05] timcosgrove has joined the channel [18:05] timcosgrove has left the channel [18:05] boaz has joined the channel [18:05] Casperin: is there really _nothing_ I can do? Have I tried all? Is the next step really to reinstall my mac? [18:06] hojberg has joined the channel [18:06] marcello3d: where is your node exec [18:06] xtianw: Do which node [18:07] Casperin: /Usr/bin/node [18:07] marcello3d: curious [18:07] marcello3d: mine is in /usr/local/bin/node [18:07] marcello3d: (on mac) [18:07] xtianw: Mine as well [18:07] Casperin: marcello3d: was that an answer to your q as well? Or did you ask about the specific project? [18:07] marcello3d: try deleting/renaming that one [18:08] Casperin: I think it's because I install as sudo [18:08] Casperin: will do [18:08] xtianw: Nah, that shouldn't be the problem [18:08] marcello3d: my guess, at a high level, is you have some borked compiled version that's higher priority in your path [18:08] marcello3d: so you're building new versions, they're being put in /usr/local/bin/node [18:08] Casperin: now it returns nothing (obviously) [18:08] marcello3d: but you're not actually running them when you run node [18:09] marcello3d: returns nothing or says command not found? [18:09] Casperin: sounds very plausible [18:09] Casperin: returns nothing [18:09] Casperin: I might as well have just pressed enter [18:09] marcello3d: what does which node say [18:09] Casperin: nothing [18:09] marcello3d: or that's what you're referring to [18:09] marcello3d: ok [18:09] Casperin: no error, nothing [18:09] newy_ has joined the channel [18:09] marcello3d: so node -v shouldn't work now [18:09] Casperin: :) [18:10] Casperin: right.. that throws an error that /usr/bin/node doesn't exist [18:10] marcello3d: ok [18:10] marcello3d: does it explicitly say /usr/bin/node doesn't exist? or just node doesn't exist? [18:10] Casperin: -bash: /usr/bin/node: No such file or directory [18:10] marcello3d: hmmm [18:11] marcello3d: weird. wonder if you hvae some symlink going on [18:11] harth has joined the channel [18:11] Casperin: there's a /usr/bin/node-waf … I don't know if that tells you anything [18:11] mscdex: sounds like it [18:11] marcello3d: that's a separate program [18:11] marcello3d: you can delete/rename that too [18:12] Casperin: renamed it… doesn't change any commands though [18:12] marcello3d: ok [18:12] Casperin: I had to manually add the PATH to .bash_profile, but I removed that again [18:13] Casperin: (just trying to think of things that could help shed some light here) [18:13] marcello3d: well, not sure why it's complaining about -bash: /usr/bin/node: No such file or directory [18:13] Casperin: because I renamed it? [18:13] mscdex: yeah, it should say "command not found" [18:13] mscdex: :S [18:13] marcello3d: it should say: -bash: node: command not found [18:13] Casperin: hmm interesting [18:13] Casperin: it does say command not found, when I sudo node -v [18:13] mscdex: must be symlinked or something ... [18:13] marcello3d: mscdex: I tried making a symlink though [18:14] suckerpunch has joined the channel [18:14] mscdex: no, i'm saying maybe one already exists somewhere [18:14] marcello3d: and it says the symlink doesn't exist, not the dereferenced symlink [18:14] mscdex: i dunno [18:14] mscdex: i mean a symlink to /usr/bin/node [18:14] marcello3d: I know [18:14] mscdex: :S [18:15] marcello3d: I tried $ sudo ln -s /usr/bin/node /usr/local/bin/node, but running node still returns the same error [18:15] Casperin: did you see my comment that it does say "command not found" when I type "sudo node -v"? [18:15] marcello3d: sudo uses a different environment [18:15] marcello3d: try echo $PATH [18:15] marcello3d: and check if any of the folders on that list have a node in them [18:15] mscdex: and sudo echo $PATH [18:15] Casperin: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/usr/local/mysql/bin/ [18:16] marcello3d: yea, just do like ls -al /usr/bin | grep node [18:16] marcello3d: for each one [18:16] akl: don't "sudo echo $PATH" [18:16] akl: do sudo -i, then echo $PATH [18:16] akl: it's expanding $PATH before it runs sudo, so you're looking at your original $PATH [18:16] Casperin: I didn't… [18:16] Casperin: okay [18:16] cbiscardi has joined the channel [18:17] marcello3d: sudo echo path doesn't matter though =P [18:17] marcello3d: because sudo node -v says command not found [18:17] Casperin: they're the same it seems [18:17] marcello3d: ok that's super bizarre :) [18:17] marcello3d: maybe you have some weird bash memory going on [18:17] mscdex: heh [18:17] marcello3d: try opening a new terminal [18:17] marcello3d: and doing node -v [18:18] Casperin: http://pastebin.com/w5y33whu [18:18] Casperin: oi!! command not found [18:18] pdelgallego has joined the channel [18:18] pdelgallego_ has joined the channel [18:18] marcello3d: ok great [18:18] marcello3d: now go to your tarball [18:18] Yuffster has joined the channel [18:18] marcello3d: and ./configure; make; sudo make install [18:18] Casperin: so it was just caching it? [18:19] Casperin: okay… hold on [18:19] cbiscardi has left the channel [18:19] Casperin: somebody think of a god I can pray to meanwhile :P [18:20] sako has joined the channel [18:21] kriszyp has joined the channel [18:21] timcosgrove1 has joined the channel [18:21] timcosgrove1 has left the channel [18:22] Casperin: … I really wonder how I managed to fuck it up that hard [18:22] mscdex: ACTION shakes a fist at Apple [18:23] gqlewis has joined the channel [18:23] Casperin: yeah... [18:24] marcello3d: so it's working? [18:24] Casperin: I'd be cool with nodejs on just my linux boxes, but this mac (from work) is the one I carry everywhere, and I wanna play with nodejs in trains and at work (*ahem*)… It's just way too cool not to [18:24] Casperin: it's building [18:25] Casperin: okay, installed [18:25] yibter has joined the channel [18:25] mscdex: Casperin: if your mac has more than one core, you can speed up the build process [18:25] marcello3d: mscdex: oh? [18:26] mscdex: export JOBS= [18:26] marcello3d: hmmm, why isn't that just integrated into the makefile/configure? [18:26] mscdex: it used to be [18:26] mscdex: a long while back [18:26] mscdex: it automatically used all available cores [18:27] Casperin: it's okay… I rarely build stuff… this one's a bit of an exception [18:27] max_dev has joined the channel [18:27] marcello3d: mscdex: so why'd they remove it [18:27] mscdex: on my core i7-860, linux reports 8 "cpus" so using `export JOBS=8` before doing `make` lets me build in 34 seconds [18:27] mscdex: :) [18:28] marcello3d: you could probably also do JOBS=8 make [18:28] mscdex: marcello3d: guess they wanted it to be up to the user to use how many cores [18:28] mscdex: marcello3d: true, but i actually have it export upon bash login so i never forget it :) [18:28] marcello3d: heh [18:28] Casperin: http://pastebin.com/Uf1KYY7g [18:29] V1 has joined the channel [18:29] mscdex: omgdb! [18:29] marcello3d: youch [18:29] marcello3d: same problem then [18:29] boaz has joined the channel [18:30] marcello3d: you might want to post it on the github issues page [18:30] Casperin: I'm living on third floor… do you think a macbook pro will break if it his a car from this height?… What if it hits an apple developer? [18:30] mscdex: i think your linux machine sabotaged your mac :P [18:30] Casperin: haha [18:30] marcello3d: Casperin: well, there is a dude who builds mac binaries for node.js [18:30] Casperin: they ganged up on it [18:30] marcello3d: with .pkg installers [18:31] Casperin: dedication... [18:31] dnunes has left the channel [18:31] marcello3d: dont' remember the link [18:31] marcello3d: it was posted on the mailing list [18:31] mscdex: https://sites.google.com/site/nodejsmacosx/ [18:31] mscdex: only 0.4.5 though [18:32] Casperin: don't care if it's 0.1… as long as it takes more than 2 hits to crash it, I'm happy [18:32] marcello3d: hah [18:32] mscdex: here's the guy to bug about updating it: http://groups.google.com/group/nodejs/browse_thread/thread/52f13fc78f49fdfd/ [18:32] mscdex: ;) [18:32] Casperin: does it make sense to try with a .dmg? I mean… will it do anything I didn't just try? [18:33] marcello3d: not necessarily [18:33] marcello3d: unless your build chain is effed up [18:33] marcello3d: do you have xcode/etc installed? [18:33] mscdex: and up to date? [18:33] mscdex: :p [18:34] Casperin: I think so… apple wanted me to download it to make django speak with mysql… I got an old version. It's definitely not up to date, since I wasn't too serious about django [18:34] Casperin: (nodejs is way more fun) [18:34] mscdex: :S [18:34] Casperin: I got pissed off when they wanted me to pay for it haha [18:35] marcello3d: yea, I think xcode 4/etc is like $5 [18:35] mscdex: eh? [18:35] marcello3d: but who knows if that'd even solve your problem [18:35] Casperin: yeah, something like that. Nothing really… but it pisses me off [18:35] mscdex: $5? [18:35] marcello3d: mscdex: yea, on the app store [18:36] mscdex: huh... [18:36] Casperin: its' true [18:36] mscdex: oh, nvm [18:37] mscdex: i thought i had xcode installed on the mini [18:37] mscdex: heh [18:37] marcello3d: does node.js require xcode/dev tools to be installed to build it? [18:37] marcello3d: Casperin: well, if you have an old xcode, it's possible compiling could be wonky... especially if it's not installed properly [18:37] kkaefer: marcello3d: yes [18:38] kkaefer: marcello3d: os x doesn't ship with a compiler by default afaik [18:38] marcello3d: yea I didn't think so [18:38] Casperin: why are macs so shitty? [18:38] __tosh has joined the channel [18:38] Casperin: or… "apple" rather. The machine is good, but apple do suck [18:38] kkaefer: Casperin: I don't think this is the place to troll [18:39] Casperin: oh sorry… didn't mean to. :) [18:39] marcello3d: Casperin: it's not apple, it's you ;D [18:39] Casperin: well.. the real question is…. do I blow too? :P [18:39] Casperin: wait.. nvm [18:41] xtianw: It's easier than getting node to run on Windows I'd wager [18:41] Casperin: I didn't even know it runs on Windows [18:42] mscdex: i think i installed whatever xcode came with 10.6 [18:42] mscdex: heh [18:42] mscdex: on the dvd [18:43] Draggor: getting node to run on windows isn't bad anymore [18:43] Draggor: The tutorial is very accurate [18:43] arlolra_ has joined the channel [18:43] omni5cience has joined the channel [18:44] boaz has joined the channel [18:44] clickpart has joined the channel [18:44] Casperin: mscdex: I just found the dvd… let's see what I can find :) [18:45] marcello3d: Casperin: try the binary first [18:45] marcello3d: easier :) [18:45] marcello3d: and faster [18:45] Casperin: oki [18:45] cellvia has joined the channel [18:45] mscdex: that's what she said [18:45] xandrews has joined the channel [18:46] Casperin: no luck [18:47] marcello3d: you're probably screwed, then :) [18:47] gqlewis has joined the channel [18:47] Casperin: I got xcode 3.2.3 here on the dvd… I'll try to install it and then build again [18:48] marcello3d: I wonder if one of your core OS libs is screwed up somehow [18:48] Casperin: great... [18:48] svenlito has joined the channel [18:48] Casperin: that could be... [18:48] marcello3d: have you done anything funky system related to your comp? [18:49] svenlito has joined the channel [18:49] Casperin: trying to think of something [18:49] Casperin: I have a bunch of web frameworks and php and mysql installed [18:49] softdrink has joined the channel [18:50] Casperin: django.. zend.. nodejs [18:50] Casperin: but I wouldn't count that as funky [18:50] marcello3d: yea, neither would I [18:51] Casperin: I think I might actually reinstall the entire OS… why not [18:51] marcello3d: assuming that's a rhetorical question [18:51] marcello3d: anyway, good luck, I'm off! :-) [18:51] tyler_boyd has joined the channel [18:51] Casperin: unless you have some persuasive argument.. [18:51] Casperin: ciao… thanks :) [18:53] patcito has joined the channel [18:57] FireFly has joined the channel [18:57] boaz has joined the channel [18:57] bentruyman has joined the channel [18:57] jkreeftmeijer has joined the channel [19:00] wapp has joined the channel [19:01] wapp: just followed the node instructions, saved example.js, run node example.js, im getting # node: command not found ? [19:02] svenlito has joined the channel [19:02] wapp: i admit im new to terminal [19:02] xtianw: Means node didn't get installed [19:02] polotek: wapp: check your path. did you build node from source? [19:03] wapp: ya, got an error ran i run the test, perhaps thats where its gone wrong [19:03] polotek: nah, the tests run on the local build [19:03] polotek: did you "make install" ? [19:04] wapp: running it again [19:04] matschaffer has joined the channel [19:05] wapp: successful [19:05] polotek: by default node is installed at /usr/local/bin/node If that's not in your path, that's the problem [19:05] Casperin: mscdex: it worked!!! installed the xcode from my dvd (I'm guessing it was a newer version than what was on the machine already), rebuild node and it seems to be running now! At least the server didn't crash yet and I've hit it with a browser like 5 times now :O …. thaaaaaaaaank you!! I owe you big time =D [19:05] polotek: unless you're running cygwin. in which case I can't help much ;) [19:06] Casperin: marcello too of course, but he left already [19:08] jdalton has joined the channel [19:09] Corren has joined the channel [19:09] jdalton has left the channel [19:09] steph021 has joined the channel [19:10] binaryjohn_ has joined the channel [19:10] max_dev has joined the channel [19:13] namelessnotion__ has joined the channel [19:14] cwang has joined the channel [19:14] wapp: @polotek thanks for your help [19:15] polotek: wapp: no prob [19:15] [1]Corren has joined the channel [19:15] mscdex: Casperin: cool [19:16] liar has joined the channel [19:16] timcosgrove has joined the channel [19:16] Casperin: "cool"? That doesn't quite do. I've been cursing over this for about a week now [19:17] timcosgrove has left the channel [19:17] mscdex: :S [19:17] jgv has joined the channel [19:17] mscdex: should've came in sooner :p [19:17] Casperin: I did! This is the third time I'm here [19:18] Casperin: Only V1 had a go at it, but he gave up too [19:18] V1: Fo sho [19:18] V1: what btw :$? [19:18] Casperin: haha hi.. didn't even see you [19:19] V1: I spend about 15hours a day here :) [19:19] Casperin: you tried helping me yesterday (or maybe the day before? Don't remember), but to no avail :) [19:19] mscdex: that's a long lunch break [19:19] Casperin: haha [19:19] V1: Yeah could be :p [19:20] postwait has joined the channel [19:20] Intel_iX has joined the channel [19:20] Intel_iX: How do you list all the files of a directory using cygwin/node? [19:20] wapp: so whats the ideal db to use with node? [19:20] Intel_iX: JSON [19:21] wapp: how would json be stored on the server [19:21] Intel_iX: In a text file or something... [19:21] Intel_iX: Load it into ram, then write to file every so often and on shut down [19:22] V1: wapp: Any NoSQL database would probably do :p [19:22] Intel_iX: var db = JSON.parse() [19:22] mscdex: Intel_iX: http://nodejs.org/docs/v0.4.6/api/fs.html#fs.readdir [19:28] Corren has joined the channel [19:32] heavysixer has joined the channel [19:34] Charuru has joined the channel [19:36] hojberg has joined the channel [19:36] broofa has joined the channel [19:37] timcosgrove has joined the channel [19:42] timmywil has joined the channel [19:43] Billbad has joined the channel [19:46] andrewfff has joined the channel [19:55] TooTallNate has joined the channel [19:56] deebo: anyone have an open express + database (mongo, mysql whatver) app? [19:56] deebo: id really like to see the sources to a bigger project for examples [19:57] deebo: tutorials always basically one source file and really simple stuff [19:57] ryanfitz has joined the channel [19:58] skohorn has joined the channel [19:58] unknown_had has joined the channel [20:01] timcosgrove has joined the channel [20:01] timcosgrove has left the channel [20:02] symbel has joined the channel [20:02] stisti has joined the channel [20:02] symbel has left the channel [20:03] garrensmith has joined the channel [20:04] eb4890 has joined the channel [20:04] mikl has joined the channel [20:05] stonebranch has joined the channel [20:09] davidcoallier has joined the channel [20:09] Gruni has joined the channel [20:10] Rodtusker has joined the channel [20:11] clintandrewhall has joined the channel [20:12] clintandrewhall: I was wondering if anyone could help me out with a problem that is driving me batty... [20:13] clintandrewhall: I'm participating in startup weekend, and I'm trying to get an access token through Netflix OAuth [20:13] clintandrewhall: I've gone as far as to copy their code verbatim, but my SHA1 encoding + base64 encoding seems to be corrupting the signature [20:13] clintandrewhall: and NetFlix keeps rejecting it [20:13] Casperin: clintandrewhall: I can't help you, but just out of curiosity, in what city are you participating? [20:14] clintandrewhall: Kansas City, MO :-) [20:14] johnnywengluu_ has joined the channel [20:14] jdalton has joined the channel [20:14] Casperin: kewl… I like how much they're spreading. I participated a few times in Denmark :) [20:14] jdalton has left the channel [20:14] jgv has joined the channel [20:14] tfe_ has joined the channel [20:14] tfe_ has joined the channel [20:15] clintandrewhall: it's pretty cool... it's my first and I'm just nearing the end of my rope over here... blech [20:16] Casperin: yah.. challenge is good hehe [20:16] Casperin: good luck with it [20:16] Casperin: and remember to get to know a lot of people! Who cares who wins… it's about making friends and contacts [20:16] clintandrewhall: thanks... :-) [20:17] mikeal has joined the channel [20:18] charlenopires has joined the channel [20:19] osserver_ has joined the channel [20:20] saikat has joined the channel [20:20] timcosgrove has joined the channel [20:22] timcosgrove has left the channel [20:22] andrenkov has joined the channel [20:26] disq has joined the channel [20:26] disq has joined the channel [20:26] RusAlex has left the channel [20:26] shauntain21 has joined the channel [20:27] dmojoryder has joined the channel [20:27] shauntain21: hey i have installed node and when i start node and type include("test.js"); i get the error "ReferenceError: include is not defined"... anyone know whats wrong? [20:29] TooTallNate: shauntain21: Use 'require("./test")' instead [20:30] boaz has joined the channel [20:30] wapp has joined the channel [20:30] shauntain21: TooTallNate: thank you that worked... [20:30] Rob- has joined the channel [20:31] shauntain21: one more question... i have downloaded the repository Sandbox using npm... how do i include it when i run? [20:33] sako has joined the channel [20:33] TooTallNate: probably just `require('sandbox')` [20:33] shauntain21: ... do i need to do a require("Sandbox" ) i get the JSON for the Sanbox function... but it doesnt seem to pull in the functions because when i do var s = Sandbox()... i get an undefined error [20:34] xtianw: Probably need to initialize it with 'new' [20:34] shauntain21: i many be asking a question that is specific to the repository... but i was wondering if there was a general step that i was missing [20:34] eee_c1 has joined the channel [20:34] hackband has joined the channel [20:34] shauntain21: xtianw: i get an undefined error [20:34] xtianw: https://github.com/gf3/sandbox/blob/master/example/example.js [20:34] themiddleman_itv has joined the channel [20:35] shauntain21: i see my mistake [20:35] shauntain21: i wasnt storing the include in the variable Sandbox [20:35] shauntain21: thanks a million [20:36] stonebranch has joined the channel [20:36] kriszyp has joined the channel [20:38] tedsuo has joined the channel [20:38] ardcore has joined the channel [20:40] david has joined the channel [20:40] ardcore has left the channel [20:44] shauntain21: TooTallNate: i just realized i am on your blog trying to solve my next problem... i keep getting "TypeError: Cannot call method 'runInNewContext' of undefined".. how do you fix this [20:44] ckknight has joined the channel [20:47] newy_ has left the channel [20:47] yibter has joined the channel [20:50] TooTallNate: what do you mean you are on my blog? are you looking at a specific article? [20:50] llkazu has joined the channel [20:51] llkazu has joined the channel [20:51] shauntain21: tootallnate: i assume this is you? https://tootallnate.net/implementing-your-protocol-stack-with-stream-stacks [20:51] TooTallNate: Ohhh, ok I see what you mean [20:51] TooTallNate: thanks, i'll look into it [20:51] llkazu: any ideas on how to restrict nodejs' access to ports? i want to restrict binding to a specific range. [20:52] saikat has joined the channel [20:52] defk has joined the channel [20:55] A_Nub has joined the channel [21:02] jeffmoss has joined the channel [21:03] jacobolus has joined the channel [21:05] ckknight has joined the channel [21:10] shauntain21 has joined the channel [21:11] bits58 has joined the channel [21:12] feedtheaimbot has joined the channel [21:12] johnciacia has joined the channel [21:13] Lorentz has joined the channel [21:14] zivester_ has joined the channel [21:14] A_Nub has joined the channel [21:17] llkazu: soooooo who wants YACBNHS? (Yet Another Cloud Based Node Hosting Solution) [21:17] apoc has joined the channel [21:18] industrial: Is there one out there akin to heroku? as in free for small-fry sites? [21:19] llkazu: i think most of the solutions out there, if you can get a coupon, are free. for right now anyway [21:20] llkazu: I'm thinking about putting together my own, I'm not sure why but the current solutions rub me the wrong way [21:21] stepheneb has joined the channel [21:22] blueadept has joined the channel [21:22] breakpointer has joined the channel [21:23] llkazu: I'm thinking there'd be a base free package, then increment $5/mo from there on up to ZOMG amounts [21:23] cloudhead2 has joined the channel [21:23] llkazu: the tricky part is figuring out bandwidth :-/ [21:24] llkazu: since thats the most expensive thing when you're living in the cloud. [21:25] xtianw_ has joined the channel [21:27] mediahack has joined the channel [21:33] McMAGIC--Copy has joined the channel [21:34] llkazu: have you folks found nodes web apps to be mostly memory or mostly cpu intensive? [21:35] arianrock: this happens when I get bored: [21:35] arianrock: I write a 1 lined obfustcated fully functional coffeescript chat serve [21:35] arianrock: http://pastebin.com/0HBeK1HL [21:35] arianrock: :D [21:35] llkazu: im scared. [21:35] llkazu: very, very scared. [21:35] boaz_ has joined the channel [21:35] llkazu: ACTION hides in his coffee script cup [21:35] arianrock: :3 [21:36] A_Nub: How many people are using cloud 9? [21:36] arianrock: i am [21:36] jakehow has joined the channel [21:36] llkazu: i am, kinda. [21:36] arianrock: ooops, forgot to unescape 'utf8' [21:36] A_Nub: im playing around with it [21:36] A_Nub: its cool [21:36] arianrock: I run it locally though [21:36] A_Nub: same [21:36] A_Nub: but [21:36] arianrock: npm install cloud9 [21:36] arianrock: ok [21:36] A_Nub: Coda works better imo. [21:36] arianrock: idk coda [21:36] A_Nub: has autocomplete etc [21:36] A_Nub: its a Desktop application. [21:36] A_Nub: for OS X [21:36] A_Nub: for webdev [21:36] arianrock: im too por for osx [21:37] arianrock: poor* [21:37] zakabird has joined the channel [21:37] arianrock: I used ubuntu ^^ [21:37] arianrock: 8D [21:37] A_Nub: hehe [21:38] industrial: vim all the way ;) [21:38] A_Nub: lol [21:39] Gruni has joined the channel [21:39] mediahack: I'm learning node, i'm familiar with js. I'm building modules like classes, when i call public member functions i get "not a function at method". Is building this way not the right way to build node code? http://jsfiddle.net/TQkPq/ [21:39] Casperin: ubuntu + vim … all you need [21:39] industrial: yep, running that on a macbook pro atm [21:39] industrial: :P [21:39] Casperin: me too! :D [21:39] llkazu has joined the channel [21:40] llkazu: anyone know how to restrict node to only bind to a single port? [21:40] Casperin: well… in a virtual box.. haven't bothered with a dual boot yet [21:40] llkazu: preferably a port defined by an environment variable? [21:40] A_Nub: is there a way to make a scroll box never scroll the window when it hits a bounds? [21:41] arianrock: llkazu [21:41] arianrock: listen(process.env.YOUR_PORT_ENV_VARIABLE) [21:41] llkazu: sure, but i want to restrict node to ONLY listen to that port. and not allow any others [21:41] llkazu: like cloud9 does [21:41] arianrock: euhm, it only listens on that port [21:42] arianrock: It only listens on the port you parse to the listen function? [21:42] arianrock: why would it bind any other ports? [21:42] llkazu: I'm building out a node hosting platform. i want to restrict untrusted code to run only on a port i assign. [21:43] itistoday has joined the channel [21:43] arianrock: euhm, you should do that on os level [21:44] llkazu: been trying to figure that one out ;-) so far i've got CPU, memory, disk io, file handlers, and process limits set up. working on network limits (io and port binding) [21:44] llkazu: haven't quite figured those out [21:45] itistoday has left the channel [21:45] llkazu: ah, hmm, perhaps i should be forcing them to use unix sockets. [21:46] wibby has joined the channel [21:46] arianrock: wait [21:46] arianrock: sec [21:46] llkazu: ACTION sits, waits [21:47] aroop has joined the channel [21:47] wibby: hey, does the current ubuntu 10.10 really come with v0.1.97? when i get the latest version from github i get v0.5.0-pre.. [21:48] arianrock: couldn't you use sysctl net.ipv4.ip_local_port_range [21:48] arianrock: not sure though [21:48] llkazu: wibby, yes. lol. nodejs releases VERY quickly. [21:48] llkazu: arianrock, that would change it system-wide whereas i want to restrict per-user or per-process [21:48] llkazu: :-/ [21:48] arianrock: modify the code? [21:49] wibby: does somebody keep a repository? i actually like installing through synaptic [21:49] arianrock: euhm [21:49] llkazu: i was hoping not to have to modify nodejs itself, but ya thats a possibility. [21:49] arianrock: sudo apt-get install node [21:49] arianrock: then use update manager [21:49] arianrock: it will update to 4.6 [21:49] arianrock: did it for me [21:49] llkazu: another possibility would be to simply prevent all TCP bindings and force the code to use unix sockets. and have nginx proxy form 80 to the appropriate unix socket for whatever application [21:49] arianrock: llkazu, [21:50] arianrock: server._listen = server.listen [21:50] arianrock: server.listen = function (port,etc) { checkport(port); server._listen(port)}; [21:50] arianrock: cheers [21:51] arianrock: wasn't that hard was it? (A) [21:51] llkazu: ah, but then the user could simply revert that in their code by doing: server.listen = server._listen [21:51] llkazu: or just calling server._listen directly [21:51] arianrock: idea [21:52] arianrock: wait, no nvm [21:52] arianrock: well the way cloud9 does it [21:53] wibby: arianrock: you must be mistaken, i just checked the update manager [21:53] arianrock: it locally connects to C9_PORT [21:53] wibby: unless you use a repository i don't know of [21:53] arianrock: then pipes it to 8080 [21:53] llkazu: ACTION nods [21:53] llkazu: hmm... [21:53] arianrock: wait, I do use someone else's [21:53] arianrock: one second [21:53] reid has joined the channel [21:54] Levi has joined the channel [21:54] marcello3d has joined the channel [21:54] marcello3d: what's the correct way to extend the Error class in Javascript? [21:54] marcello3d: such that I can use catch (e) { if (e instanceof MyError) ... else throw e } [21:56] Ond has joined the channel [21:56] fly-away has joined the channel [21:57] arianrock: sudo add-apt-repository ppa:jerome-etienne/neoip && sudo apt-get update && sudo apt-get install nodejs [21:57] arianrock: wibbly [21:57] harth has joined the channel [21:58] arianrock: wibbly I use that one [21:58] eventi has joined the channel [21:59] Opaque has joined the channel [22:00] hojberg has joined the channel [22:01] itistoday has joined the channel [22:02] itistoday has left the channel [22:02] reid has joined the channel [22:03] eventi has joined the channel [22:06] wibby: arianrock: thx [22:06] amerine has joined the channel [22:07] arianrock: no problem [22:07] Intel_iX: What the names of the standard signals and the keys they map to on cygwin [22:07] Intel_iX: Link would be appreciated [22:07] Intel_iX: *what are [22:08] arianrock: 1. use linux <3 [22:08] arianrock: 2. Idk, maybe try google? [22:08] Intel_iX: Cygwin > linux >_> [22:09] xtianw: Trollin [22:09] marcello3d: rollin' for trollin', cruising for bruising [22:10] marcello3d: all I know is cygwin + windows = super annoying [22:10] marcello3d: all the time [22:10] Intel_iX: It's easy to work with once you understand it a bit [22:10] marcello3d: from experience [22:10] Spion_ has joined the channel [22:10] marcello3d: yea I'm sure [22:11] Intel_iX: It lets you compile a lot of linux programs on windows, which is very useful. [22:11] marcello3d: understanding it wasn't on my list of life goals :) [22:11] boaz has joined the channel [22:11] marcello3d: preferred to use mingw [22:11] boaz has joined the channel [22:12] postwait has joined the channel [22:13] Aria has joined the channel [22:14] arianrock: even easier then compiling unix-based apps on windows is getting one of the unixes IMO [22:14] graysky_ has joined the channel [22:14] A_Nub has left the channel [22:19] F1LT3R has joined the channel [22:19] tedsuo has joined the channel [22:19] astropirate has joined the channel [22:19] namelessnotion_ has joined the channel [22:22] astropirate: I have a little question about node's module system: How can i pass in a variale to a module. i made a little test case that doesn't work http://pastie.org/1801937 [22:23] mscdex: astropirate: that console.log() statement is made right when you require() [22:23] mtsl has joined the channel [22:23] mscdex: before you have time to set the variable [22:23] astropirate: ahh [22:23] astropirate: right :p [22:23] astropirate: thanks [22:23] mscdex: :) [22:23] unomi has joined the channel [22:26] kriszyp has joined the channel [22:28] timcosgrove has joined the channel [22:28] timcosgrove has left the channel [22:28] tobiassjosten has joined the channel [22:29] tobiassjosten: I'm installing modules with npm and it reports that all went well. But when I try to require the libs node throws an error, saying it doesn't exist. Anyone know what could cause this? [22:30] TheIronWolf has joined the channel [22:32] Phyllio has joined the channel [22:32] namelessnotion_ has left the channel [22:33] Billbad has joined the channel [22:34] ryan has joined the channel [22:37] hij1nx_ has joined the channel [22:38] indiefan2a has joined the channel [22:39] tobiassjosten: Nevermind. Problem with my require path not being properly set. [22:40] n2liquid has joined the channel [22:40] timcosgrove has joined the channel [22:41] timcosgrove has left the channel [22:41] n2liquid: how can I set the headers for require('https').request()? [22:41] cloudhead2: n2liquid: pass the 'headers' option [22:41] n2liquid: I noticed there used to be a createClient() function, but it doesn't exist anymore, am I right? [22:42] n2liquid: cloudhead2: it's not documented; is that really it? [22:42] billbad has joined the channel [22:42] cloudhead2: it should be documented [22:42] cloudhead2: maybe check http.request [22:42] cloudhead2: it's the same api [22:42] boaz has joined the channel [22:42] cloudhead2: http://nodejs.org/docs/v0.4.6/api/http.html#http.request [22:43] mscdex: http.createClient is deprecated [22:43] n2liquid: crap [22:43] cloudhead2: ah ah I See [22:43] n2liquid: it's there indeed [22:43] n2liquid: sorry, didn't see that, thx [22:43] cloudhead2: it doesn't specify you can send headers [22:43] cloudhead2: but yea [22:43] cloudhead2: you can [22:44] n2liquid: cloudhead2: actually it does: "headers: An object containing request headers." [22:44] n2liquid: derp [22:44] n2liquid: sorry about that [22:44] mscdex: cloudhead2: it does specify [22:44] cloudhead2: oh k didn't see [22:44] mscdex: heh [22:44] mscdex: i'm slow [22:44] rfay has joined the channel [22:45] mscdex: i think i've finally run out of protocols to implement [22:47] ziro` has joined the channel [22:47] isaacs has joined the channel [22:47] n2liquid: mscdex: what was your last feat? [22:48] liar has joined the channel [22:49] themiddleman has joined the channel [22:49] mscdex: i more or less finished an nntp module the other day [22:49] mscdex: i think i may revisit my old rtp module, it needs some love [22:51] n2liquid: hm, sounds interesting [22:51] Transformer has joined the channel [22:51] mscdex: yeah i updated the nzb downloader example to actually do crc checking on the file parts now :p [22:52] bits58 has joined the channel [22:53] n2liquid: hm, actually I know nothing about Usenet, lol [22:53] n2liquid: but RTP seems interesting [22:53] mscdex: oh [22:54] mscdex: i have to see if i can get my cisco phone set up again and get more reliable audio streaming with that module [22:55] n2liquid: mscdex: what do you work with professionally? just curious [22:55] mscdex: what do you mean? [22:55] n2liquid: are you employed? [22:56] mscdex: yeah, freelance stuff [22:56] n2liquid: ah, cool [22:56] mscdex: almost all of my work with node is non-paid though :p [22:56] mscdex: unfortunately [22:56] n2liquid: kudos for it, then :D [22:56] n2liquid: hope that changes soon, though [22:57] sleeplessinc has joined the channel [22:57] n2liquid: so is node a matter of love or something? [22:57] mscdex: pretty much ;) [22:57] mscdex: it's just so easy to do stuff with [22:57] mscdex: and it just works [22:58] n2liquid: yeah, I know [22:58] n2liquid: I've started using it like a few days ago [22:58] n2liquid: and crap, developing is so simple [22:58] hosh_work has joined the channel [22:58] mscdex: i started early last year or so [22:59] n2liquid: I gotta love JavaScript/Node for sometime to come, I think [22:59] unomi has joined the channel [22:59] arianrock: n2liquid, it's awesome [23:00] n2liquid: it's funny to see how simple it is and yet how other language's concepts fit in so well [23:00] n2liquid: I think that's pretty common between scripting languages, but node sets JS appart [23:00] n2liquid: apart* [23:01] n2liquid: btw, are there other worthy CommonJS implementations? [23:01] n2liquid: why is node so cool? [23:01] arianrock: i actually use coffeescript to program in node :P [23:01] n2liquid: arianrock: hah, I see [23:01] n2liquid: gotta try that later [23:01] n2liquid: I just don't like the syntax much [23:01] arianrock: http://pastebin.com/ZNzALubK [23:01] n2liquid: used to C-style brackets [23:01] arianrock: same [23:02] arianrock: coffee = haskell+python+ruby+js mix [23:02] arianrock: xD [23:02] langworthy has joined the channel [23:02] arianrock: btw thats a fully functional chat server in 16 lines [23:02] arianrock: :3 [23:02] n2liquid: can't pure JS do that? [23:03] n2liquid: I saw Ryan doing one in a talk [23:03] n2liquid: didn't look like many lines [23:04] industrial: n2liquid: ehm, pure js can doanything coffee can, thats the point.. [23:04] arianrock: coffee is just one step more minimalistic [23:04] arianrock: ya [23:04] mscdex: you could make a chat server in one line [23:04] mscdex: just don't use newlines [23:04] mscdex: ;) [23:04] arianrock: u can use js libs in coffee [23:04] arianrock: etc [23:04] arianrock: ya I did that [23:04] arianrock: sec [23:04] arianrock: http://pastebin.com/0HBeK1HL [23:04] arianrock: same server [23:04] n2liquid: industrial: I didn't mean he couldn't do a chat server like that, but the same thing with as many lines or something [23:04] Astro has joined the channel [23:05] xandrews has joined the channel [23:06] Ciro has joined the channel [23:08] bnoguchi has joined the channel [23:10] mikeal has joined the channel [23:12] stonecobra has joined the channel [23:14] WarriorSl has joined the channel [23:15] boaz has joined the channel [23:17] Phyllio has joined the channel [23:17] kriszyp has joined the channel [23:17] loungin has joined the channel [23:19] wilmoore has joined the channel [23:21] mikeal has joined the channel [23:22] dmojoryder has joined the channel [23:23] gtramont1na has joined the channel [23:23] bits58 has joined the channel [23:26] febits has joined the channel [23:27] febits has joined the channel [23:30] n2liquid: mscdex: hey, so you're out of node stuff to hack around? [23:30] killfill: anyone use express-resource?.. cannot make .upadte work.. :S [23:33] n2liquid: mscdex: are you satisfied with the NPM modules available? I was thinking about sketching some module guidelines for node and CommonJS in general, but I'd need help from someone more experienced [23:33] mscdex: guidelines? [23:33] febits has joined the channel [23:33] n2liquid: yes [23:33] n2liquid: for example [23:34] n2liquid: I've been looking for a good solution to access Twitter, Facebook and whatnot API's [23:35] n2liquid: but each was tied to their own useless dependencies (e.g. connect), weren't actively developed and I couldn't take many good things from each to actually build something good [23:36] n2liquid: if modules didn't directly depend on modules, but instead exposed their necessities that could be fulfilled by the modules that included them, the world would probably be a better place [23:37] n2liquid: e.g. why require('http') when you're writing something that could also run in a browser? [23:37] broofa has joined the channel [23:37] n2liquid: can you see where I'm going? [23:38] n2liquid: truly reusable, mix-and-matchable pieces of JavaScript goodness! [23:38] xandrews has joined the channel [23:38] mtsl: I'd like to access FOUND_ROWS() with the mysql module, how am I supposed to do that? I can't be sure if there's another query after my LIMIT'd query [23:38] mtsl: when I simply attach "SELECT FOUND_ROWS();" to the query, I don't get this value back in the callback function [23:39] Rob- has joined the channel [23:39] n2liquid: sometimes I'm scared it looks like no one is bothered with tying their code to the tools they have at hand and make them incompatible with anything else where their work could have been useful [23:39] n2liquid: mscdex: don't you? maybe I'm just paranoid [23:39] copongcopong has joined the channel [23:39] langworthy has joined the channel [23:40] n2liquid: or lunatic [23:40] n2liquid: lol [23:41] charlenopires has joined the channel [23:41] n2liquid: JavaScript's first class functions / closures are the gold mine for code reusability [23:44] echosystm has joined the channel [23:44] trollboy has joined the channel [23:44] echosystm: does anyone know if there have been any attempts to use the v8 experimental gc branch in node? [23:46] NuckingFuts has joined the channel [23:46] echosystm: also, has anyone here built high-load systems with node and not experienced problems due to the gc? [23:47] dnolen has joined the channel [23:48] konobi: echosystm: tias [23:48] echosystm: tias? [23:49] konobi: try it and see [23:51] n2liquid: mscdex: didn't agree, eh? [23:55] mscdex: n2liquid: sorry, was afk for a bit [23:55] n2liquid: mscdex: no prob, just wanna hear your opinion [23:55] n2liquid: this is bothering me a little [23:56] n2liquid: I don't love NodeJS if its projects are gonna have the same problems that bothered me on C++ [23:56] konobi: echosystm: ie, you can just checkout the v8 branch into your nodejs checkout [23:56] mscdex: n2liquid: it depends on the module, some utilize things that can't be used/done browser-side [23:57] Aikar: woot [23:57] Aikar: msgpack library fixed [23:57] Aikar: wormhole is now usable! [23:57] konobi: n2liquid: time to volunteer to help isaacs with npants [23:57] n2liquid: mscdex: maybe they can't today, who knows? [23:57] Aikar: so just a lil more polish on it then ready for public release :D [23:57] mscdex: n2liquid: by the way, have you seen node-browserify? [23:57] echosystm: im looking at the experimentalg gc changelog - it doesnt seem to be getting as much attention as i thought it would [23:57] n2liquid: mscdex: nope, but I'll take a look [23:58] echosystm: most of the commits seem to be just merged from the main [23:58] n2liquid: konobi: what's that? [23:58] konobi: n2liquid: ask isaacs =0) [23:58] mscdex: n2liquid: https://github.com/substack/node-browserify [23:58] n2liquid: konobi: isn't that explained somewhere? [23:58] mscdex: n2liquid: you can also use dnode for doing server-side things from the browser [23:59] n2liquid: mscdex: ah, I actually knew browserify, but that's not all [23:59] echosystm: isnt this gc issue a major problem for node? [23:59] echosystm: as in, should be #1 priority? [23:59] n2liquid: mscdex: dnode looks actually interesting