[00:00] wafflesburger: is this an actual competition or just for lolz [00:00] xsyn has joined the channel [00:00] ryah: for nerd cred [00:00] wafflesburger: ah :) [00:00] Charuru: wafflesburger: if you cache templates on the serverside then speed doesn't matter at all :) [00:00] wafflesburger: i mean clientside templating charuru :D [00:01] wafflesburger: i only ask in here because it's more active than jquery or other relevant channels :d [00:01] Charuru: oh [00:01] Charuru: well yeah on the client i do use doT [00:01] Charuru: ACTION shrugs [00:01] wafflesburger: is that benchmark i linked to broken [00:01] wafflesburger: templat generated in 1.7 nanoseconds? :D [00:03] Charuru: i write my serverside templates in jade [00:03] wafflesburger: same [00:03] Charuru: and that is compiled into more regular html with dot interpolation [00:04] wafflesburger: whats the difference in doT and doU [00:05] syskk: do you guys use underscores or camelCase in JS? [00:06] wafflesburger: camcel [00:06] wafflesburger: camel* [00:06] ion-: is there a recommended way of setting extra fields for a new Error object? [00:06] aaronblohowiak: syskk: camel [00:07] aaronblohowiak: ion-: you dont have to throw an error, you know. [00:07] aaronblohowiak: ion-: you can throw anything. a function, even. [00:07] syskk: I usually camelCase properties/methods and under_score local variables , anyone else does this? [00:07] aaronblohowiak: syskk: madness! [00:07] wafflesburger: nein [00:08] ion-: aaronblohowiak: im going to emit, not throw. i feel like i should follow what ive seen in node core and use a real Error object [00:08] aaronblohowiak: ion-: okie dokie [00:10] syskk: it just feels weird to camelCase local variables :p [00:11] Twisol: syskk: that's my convention too. [00:16] ion-: ECMA specification is only available in PDF? [00:16] ion-: ha [00:16] syskk: how do you list installed npm packages ? [00:16] ion-: npm list works for me [00:17] syskk: thought it listed all available packages [00:17] ion-: it might have pre 1.0 [00:17] syskk: npm list | grep installed I guess [00:17] ion-: npm -v [00:17] eee_c has joined the channel [00:17] syskk: yea I'm using an old version [00:18] syskk: how do I update it? [00:18] ion-: beware 1.0 is way different [00:18] ion-: https://github.com/isaacs/npm#readme [00:18] syskk: thanks [00:18] ion-: np [00:20] xsyn has joined the channel [00:20] galaxywatcher_ has joined the channel [00:20] a|i has joined the channel [00:21] a|i: anyone using nohm? http://ohm.keyvalue.org/ [00:21] syskk: is anyone working on a better npm web directory? [00:21] a|i: does it make sense to wrap redis in orm? [00:21] a|i: why do people do that? [00:21] syskk: maybe to switch from redis to a rdbms but that would be weird [00:23] a|i: seriously, am I missing something here [00:23] quackslike: a|i - do you have an example i can see? [00:24] a|i: quackslike: http://ohm.keyvalue.org/ [00:24] quackslike: cheers [00:24] ion-: i think the proper way to make customized Error objects is to create a new class that inherits from Error [00:24] a|i: quackslike: or http://maritz.github.com/nohm/, if you prefer it in js. [00:25] Gelegrodan: Hm, ive made a simple tcp socket client, problem it it will linebreak the data it recieves, if i connect with putty it seems fine [00:25] Gelegrodan: buffersize is the key? [00:25] quackslike: a|i - thanks, i dont know ruby. [00:27] quackslike: all the orm code i see for node looks the same.. [00:27] kriszyp has joined the channel [00:28] aaronblohowiak: i dont understand ORMs [00:28] quackslike: a|i - it seems reasonable, but i thought redis stored data structures anyway, seems just like a convenience to use an orm like that [00:28] aaronblohowiak: quackslike++ [00:28] v8bot: aaronblohowiak has given a beer to quackslike. quackslike now has 1 beers. [00:29] quackslike: aaronblohowiak: what do you mean, that you dont understand them? You mean why someone would use one? [00:29] luigi_fanatiker: node.js 0.6 [00:29] a|i: quackslike: I think people who are against it claim that wrapping nosql with orm loses its atomicity. [00:29] syskk: ORMs make more sense with RDBMS. [00:29] aaronblohowiak: quackslike: so, the abstract relational algebra is complex and makes sense to have a set of convienences, but nosql already throws normalization out the window so what is the ORM going to do for you? [00:30] aaronblohowiak: :-) [00:30] syskk: a|i: doesn't have to though... [00:30] syskk: not much... [00:30] wafflesburger: if you use ORM you won't have to use sql anyways its like a better NOSQL! :D [00:30] aaronblohowiak: quackslike: sorry i missed your message last night. i tried working on an alternate set of documentation: http://transitive.io/design/compare.html is that easier than the socratic method one? [00:31] a|i: quackslike: redis has some data structure, but doesn't do queries, or does it? how do you do queries like find by blabla value in redis? [00:31] syskk: I always thought Redis and company were simply ORMs on top of RDBMS -_- [00:31] aaronblohowiak: a|i: redis has no query by value (though you can get a subset of the values stored at a given key for some key types) [00:31] quackslike: aaronblohowiak: Ok. i see your point. A good orm will give you the ability to use any datastore without changing code, as well as the convenience of persisting Objects - it provides the programmer with a more natural (to them) view of the data. [00:32] quackslike: most orms that i see are tied to a specific store, mongo, redis whatever. [00:32] syskk: right [00:32] aaronblohowiak: quackslike: plugging in any data store means that you don't fully leverage what makes your data store unique. [00:32] quackslike: aaronblohowiak: well, it can if the ORM is clever. [00:33] aaronblohowiak: quackslike: i prefer simple to clever. [00:33] quackslike: aaronblohowiak: fair enough. i'm not cheerleading for orms, i think they are handy, but have downsides too. [00:33] syskk: not using assembly language doesn't fully leverage what makes your CPU unique :) [00:33] quackslike: syskk: lol [00:34] syskk: and if you're going to say that good compilers optimize for a given cpu than the same can be said about good ORMs [00:34] baudehlo1 has joined the channel [00:34] aaronblohowiak: syskk: actually, it frequently does. we just prefer portability and sameness in CPU architecture [00:34] quackslike: a|i - not sure about redis, never used it. i only looked at it the otehr night for the first time. [00:34] wafflesburger: i implement my data in hardware [00:34] tronathan has joined the channel [00:34] wafflesburger: all my data is hard wired [00:34] syskk: rofl [00:34] aaronblohowiak: a|i: redis is *NOT* a wrapper for a relational model. [00:34] wafflesburger: seperate components for each query [00:34] quackslike: wafflesburger: :) [00:34] a|i: aaronblohowiak: I was referring to ohm, not redis. [00:34] aaronblohowiak: a|i: ah, nvm [00:35] KirinDave has joined the channel [00:35] a|i: if you cannot do querying by value, then what's the point of a datastore that doesn't let you retrieve the data? [00:35] quackslike: aaronblohowiak: oh hell yeah, that style gels with me a lot better. nice one. [00:35] patzak has joined the channel [00:36] aaronblohowiak: quackslike: cool, thanks. [00:36] tronathan: Hello folks - Anyone run into host-unknown using xmpp library? I'm at my wits end [00:37] quackslike: aaronblohowiak: did you catch my question, i asked, commented that your system can be described simply as "data binding for html" is that a fair description? [00:37] tronathan: Is there a trick to getting node to do DNS lookups properly? something related to tcp vs. net ? [00:37] EvilPacket has joined the channel [00:38] quackslike: tronathan: unknown. sorry man, no help at all. :) [00:39] peerless has joined the channel [00:40] a|i: great. skype will be based on ms .net soon. [00:40] tronathan: Thanks quacks. I'm having the same problem as this fellow https://github.com/mwild1/xmppjs/issues/1 [00:40] patzak has joined the channel [00:40] patzak has joined the channel [00:40] quackslike: a|i - you serious? [00:40] Gelegrodan: a|i: http://webalia.com/uploads/contenidos_usrs/originales/391576_skynet_20110511104409.png [00:41] quackslike: Gelegrodan: hahah [00:41] Gelegrodan: quackslike: it will be called skynet ;) [00:41] quackslike: Gelegrodan: very good :D [00:41] Twisol has left the channel [00:41] a|i: quackslike: does ms have anything which is not ported / born on .net? [00:41] quackslike: a|i - no idea man, i have paid attention to anything they've done since windows 2000 [00:41] Gelegrodan: strange google didnt bid over [00:42] quackslike: s/have/havnt [00:42] a|i: Gelegrodan: google did. [00:42] Gelegrodan: a|i: why didnt they win then? ^^ [00:42] a|i: Gelegrodan: this is why: http://edition.cnn.com/2011/TECH/web/05/11/google.skype.wired/ [00:43] quackslike: today shall be a sunday of coffee and watching pretty woman do shopping.. gotta love a lazy Sunday [00:43] a|i: Chan then described the climatic moment. "[Sergey] looks at me and says, 'Why would I want this risk? We have a team capable of building the carrier, we have the users, we have hundreds of millions of Gmail users, why do we need to have Skype?' And at that point, Sergey gets up and says, 'This is the dumbest shit I've ever seen.' [00:43] boogyman has joined the channel [00:43] ryanfitz has joined the channel [00:43] Gelegrodan: tldr [00:44] a|i: tldr -> Sergey gets up and says, 'This is the dumbest shit I've ever seen.' [00:44] a|i: that's why. [00:44] Gelegrodan: haha [00:44] Gelegrodan: i told a girl who sent me a poem "tldr" once [00:44] Gelegrodan: didnt do that again.. [00:44] a|i: you never tell a girl tlnr. [00:44] Gelegrodan: haha [00:45] wafflesburger: a girl once saw my dick and said tldr; [00:45] Gelegrodan: i realized that after :D [00:45] ericnakagawa_ has joined the channel [00:46] KirinDave: wafflesburger: Too limp; don't rub. [00:46] wafflesburger: yeah :( [00:46] KirinDave: wafflesburger: It happens to every guy from tim eto time [00:46] tronathan: blah, im about to jump ship from node and start learning eventmachine and ruby… im working on an xmpp-centric chat app and would like to use modern tech [00:46] peerless has joined the channel [00:46] quackslike: aaronblohowiak: when can we see the code mate? [00:47] ericnakagawa_: tronathan: kbye [00:47] wafflesburger: ruby is so modern [00:47] tronathan: i want to beleive [00:47] wafflesburger: its like post modern [00:47] __tosh has joined the channel [00:48] Gelegrodan: hm, my socket client breaks the data into muliple lines.. if i connect wih putty it all comes on one line.. whats the fix? [00:48] wafflesburger: use a more modern technology like ruby [00:48] wafflesburger: you should probably post your code Gelegrodan; [00:48] Gelegrodan: wafflesburger: well its not much to see.. but sure.. [00:48] k1ttty has joined the channel [00:49] wafflesburger: well rather than troubleshooting based on what we imagine your code to be e_@ [00:49] Gelegrodan: http://jsbin.com/ucifu5/edit [00:50] xsyn has joined the channel [00:50] wafflesburger: on data read by line right [00:50] wafflesburger: you want on 'end' [00:50] wafflesburger: i believe [00:50] syskk: which nosql db should I use assuming I deal with lots of location (GPS) data? [00:50] wafflesburger: you build up the data by chunks [00:50] wafflesburger: with on 'data' [00:50] wafflesburger: and then on 'end' do w/e [00:50] wafflesburger: with the final blcok [00:50] Gelegrodan: oh [00:50] Gelegrodan: damn [00:50] wafflesburger: block* [00:50] Gelegrodan: yes ofc ^^ [00:51] wafflesburger: :D [00:51] Gelegrodan: haha [00:51] Gelegrodan: fuck.. [00:51] wafflesburger: syskk; MongoDB supports two-dimensional geospatial indexes [00:51] syskk: ok thanks [00:52] wafflesburger: that's not an endorsement just a fact :D [00:52] Gelegrodan: wafflesburger: is variable += data a good soultion for storing? ^^ [00:52] rfay_ has joined the channel [00:52] wafflesburger: yeah [00:52] Gelegrodan: feels like it could turn out pretty odd [00:52] Gelegrodan: if newer data comes [00:52] Gelegrodan: hm [00:53] Gelegrodan: or am i tired now [00:53] wafflesburger: idk [00:53] wafflesburger: just watch scope i suppose [00:53] aaronblohowiak: quackslike: next week i think [00:54] Gelegrodan: beer and coding isnt a great combo.. [00:54] Gelegrodan: 1. you get drunk === bad code [00:54] Gelegrodan: 2. the beer gets warm... [00:54] wafflesburger: :P [00:54] tronathan: beer & IT == :), beer & coding == :( [00:55] mscdex: i think you mean && [00:55] Gelegrodan: sometimes i dont understand why im using windows as client OS [00:55] mscdex: unless beer is a bit field [00:55] mscdex: :p [00:55] Gelegrodan: when im kinda only uses "linux stuff" [00:55] mscdex: windows is only good for gaming [00:55] aaronblohowiak: Gelegrodan: i dont understand why developers use windows [00:55] mscdex: everything else: linux [00:55] wafflesburger: windows is fine [00:55] mscdex: ;) [00:55] wafflesburger: but not for node imo [00:55] Gelegrodan: i have.. euhm [00:56] Gelegrodan: 5 ssh windows [00:56] wafflesburger: lol [00:56] aaronblohowiak: lol [00:56] mscdex: well sshit [00:56] Gelegrodan: for developing [00:56] mscdex: :-D [00:56] wafflesburger: you can dual boot ubuntu/kubuntu very easily [00:56] Gelegrodan: yesi know [00:56] mscdex: or use a vm [00:56] mscdex: ! [00:56] Gelegrodan: well i have some servers [00:56] wafflesburger: vm is not so great on a pentium D [00:56] mscdex: the D stands for dodgy [00:56] aaronblohowiak: I recently saw or heard about an infinite list / stream processing bit of code that implemented .take().select() and so on [00:56] Gelegrodan: i7 720 @ 4.2GHz here ^^ [00:57] Gelegrodan: 920* [00:57] mscdex: yeah i have an i7 on my linux server [00:57] mscdex: 860 [00:57] mscdex: compiles node quickly :D [00:57] Gelegrodan: haha.. [00:57] Gelegrodan: yeah i runned gentoo on a laptop before [00:57] Gelegrodan: with kde [00:57] Gelegrodan: wasnt a pretty history [00:57] mscdex: are you kde'ing? [00:58] Gelegrodan: w7'ing :) [00:58] wafflesburger: i switch to kubuntu a few days ago so i could mess with node [00:58] wafflesburger: i think it's a full switch now [00:58] Gelegrodan: kde > gnome imo.. [00:58] wafflesburger: cept for visual studio photoshop and starcraft [00:58] mscdex: i use xubuntu even though this machine has the resources for gnome or kde [00:58] Gelegrodan: well i use irssi, node, nginx, mysql... on linux [00:58] mscdex: xfce ftw! [00:59] Gelegrodan: so as soon a yuo wanna develop something [00:59] Gelegrodan: you need 50 ssh windows [00:59] halfhalo: only 50 eh? [00:59] Gelegrodan: yepp [00:59] Gelegrodan: well 5 now [01:00] syskk: mmm npm now creates a npm_module directory [01:00] mscdex: "640 ssh windows is enough for anybody" -- b.g. [01:00] wafflesburger: or you can install your modules globally [01:00] aaronblohowiak: pkrumins: can you explain .join() in lazy? [01:01] mscdex: syskk: npm_modules or node_modules ? [01:01] wafflesburger: or just concatenates strings [01:01] wafflesburger: it* [01:01] syskk: mscdex: yes I meant node_modules [01:01] syskk: modules aren't all stored in a central directory now right ? [01:02] wafflesburger: no but you can add -g flag [01:03] balaa has joined the channel [01:04] dmojoryder has joined the channel [01:05] TheLifelessOne has joined the channel [01:05] logik-bomb: guys I'm using fs.watchFile to spot file changes, but how can I output those changes? Say, something like tailing a log file. Thanks [01:06] syskk: weird [01:06] tronathan has left the channel [01:06] Gelegrodan: wafflesburger: heeey.. printing on "end" isnt right.. mean no output until the socket closes.. [01:06] syskk: npm ls -g; lists oauth as being installed as a dependency [01:06] syskk: but I get an error module not found [01:06] syskk: "Error: Cannot find module 'oauth'" [01:06] dyer has joined the channel [01:08] ryanfitz has joined the channel [01:08] markstory has joined the channel [01:08] q_no has joined the channel [01:10] andy_dawson has joined the channel [01:11] syskk: http://pastebin.com/Uq4j2h9h [01:11] sh1mmer has joined the channel [01:11] sh1mmer: is repl mangling regex a known issue? [01:12] sh1mmer: I've seen an issue a couple of times where type checking regexes fail [01:12] ryah: it wouldn't surprise me if it was a bug [01:12] ryah: but i don't know of any actual issues [01:12] chapel: ryah: whats up with the topic? just making fun? [01:13] Aria has joined the channel [01:13] syskk: weird, can't require globally installed modules [01:13] sh1mmer: chapel: check ry's twitter stream [01:14] sh1mmer: ryah: yeah I suspected it might be but I haven't had chance to dig into it [01:14] ryah: chapel: no - i want a bitcoin client [01:14] chapel: interesting [01:14] sh1mmer: ryah: I noticed it both on testing assert in repl and on express/router [01:15] ryah: sh1mmer: test case please - add to here https://github.com/joyent/node/blob/337c48db5fe06ddaf626b03b7db6c6f48c5d3b62/test/simple/test-repl.js [01:15] sh1mmer: yeah I will next week when I'm not busy :) [01:16] ryah: sh1mmer: https://github.com/joyent/node/blob/337c48db5fe06ddaf626b03b7db6c6f48c5d3b62/test/simple/test-repl.js#L166-174 [01:17] towski has joined the channel [01:17] syskk: so installing global modules isn't recommended anymore right? [01:17] ryah: syskk: correct [01:17] syskk: what if I'm developing my own module which has dependencies. should i simply .gitignore the node_modules directory? [01:17] tsesame has joined the channel [01:17] ryah: yep [01:17] ryah: or you can just put them in your git-repo [01:18] ryah: i prefer the later [01:18] syskk: and I guess "npm publish" won't publish the dependencies? [01:18] syskk: or will it [01:18] ryah: it won't, i think [01:20] xsyn has joined the channel [01:20] AntelopeSalad: is putting socket.io code inside of an express route the correct way to do it, if your goal is to use a few goodies that express captures (ex. the IP of the request)? [01:21] Gelegrodan: my socket client breaks the data into muliple lines.. if i connect wih putty it all comes on one line (as it should)... whats the fix? [01:23] gazumps has joined the channel [01:23] syskk: so you recommend versionning my dependencies? [01:26] rznt has joined the channel [01:27] rznt: Hi! [01:27] gavin_huang has joined the channel [01:28] quackslike: aaronblohowiak: sweet, i'll keep an eye out. [01:28] aaronblohowiak: quackslike: pm me with your email if ou want me to drop you a line [01:28] rznt: Quick question about the socket.io module: when I try to access a simple chat app through different IPs, messages sent do not broadcast, but when I access through the same IP on different tabs/windows it works fine. [01:30] rznt: Can anyway help? [01:30] rznt: anyone* [01:32] Gelegrodan: rznt: sure your connected to the server? [01:32] stepheneb has joined the channel [01:35] hassox has joined the channel [01:36] tilgovi has joined the channel [01:36] tilgovi has joined the channel [01:36] ralphholzmann has joined the channel [01:36] fizx has joined the channel [01:38] ryanfitz has joined the channel [01:38] Postmodernist has joined the channel [01:38] Postmodernist: yo [01:38] Postmodernist: What are node.jessers using for sqlite? [01:39] Postmodernist: Can anyone recommend a node.js module for sqlite that worked well for them? [01:42] AAA_awright has joined the channel [01:43] Gelegrodan: Postmodernist: https://github.com/joyent/node/wiki/modules#db-sqllite [01:44] Postmodernist: Thanks. Have you used it personally? [01:44] smtlaissezfaire has joined the channel [01:45] Postmodernist: Hmm, I wonder which of the three is most mature. [01:47] Postmodernist: https://github.com/orlandov/node-sqlite/tree/master/tests looks good [01:47] Remoun has joined the channel [01:49] hybsch has joined the channel [01:49] __tosh has joined the channel [01:50] xsyn has joined the channel [01:50] Gelegrodan: Postmodernist: try all :) [01:52] AddZero has joined the channel [01:54] stride has joined the channel [01:54] [[zz]] has joined the channel [01:55] sh1mmer has joined the channel [01:56] abraham has joined the channel [01:58] deedubs has joined the channel [01:59] SweetGril has joined the channel [01:59] matyr_ has joined the channel [02:01] hosh_work has joined the channel [02:01] KirinDave has joined the channel [02:02] xtianw has joined the channel [02:02] ryah has joined the channel [02:02] matyr has joined the channel [02:04] ryanfitz has joined the channel [02:05] Sami_ZzZ has joined the channel [02:07] matyr_ has joined the channel [02:07] wafflesburger has left the channel [02:07] brownies has joined the channel [02:11] ericnakagawa has joined the channel [02:12] justinTNT has joined the channel [02:12] justinTNT: high [02:13] zivester has joined the channel [02:15] Aria: /me whistles at Zed. Man, someone pissed in his cornflakes again. [02:15] Aria: He should stop rooming with that guy. [02:16] Jamool has joined the channel [02:18] NuckingFuts has joined the channel [02:18] astropirate has joined the channel [02:19] pyrotechnick1 has joined the channel [02:19] stkim1 has joined the channel [02:19] pyrotechnick1: SubStack: ping [02:20] xsyn has joined the channel [02:21] NuckingFuts: Hey, I need something to manage sessions [02:21] EvilPacket has joined the channel [02:21] aconbere has joined the channel [02:21] NuckingFuts: Specifically, something that will allow me to give a key to identify logged-in users for API requests [02:24] brownies: express has it built in, fwiw [02:25] samsonjs has joined the channel [02:25] justinTNT: http://nodetuts.com/tutorials/13-authentication-in-express-sessions-and-route-middleware.html [02:26] astropirate: Anyone know of benchmarks done with coffee-script? [02:26] themiddleman has joined the channel [02:26] patzak has joined the channel [02:26] patzak has joined the channel [02:27] NuckingFuts: justinTNT, brownies: Do either of you know if it'd be possible to lodge an oAuth pathway in Express's anus there, for external API use? [02:28] brownies: ...always interesting to see the metaphors that people use to think about their code [02:28] NuckingFuts: lol [02:30] justinTNT: um, ... there's a plugin or two for oauth in express, but I haven't got round to that yet. [02:30] aaronpearce has joined the channel [02:30] gazumps has joined the channel [02:30] NuckingFuts: aaronpearce: ohaider [02:31] aaronpearce: and my normal nick is registered.. [02:31] NuckingFuts: aaronpearce: Join the club :P [02:32] NuckingFuts: aaronpearce: Though I still need to ask that Nuck be deregistered for inactivity... [02:32] NuckingFuts: oh yay found an oauth2 server as connect middleware [02:33] NuckingFuts: aaronpearce: Is OAuth2 fine? [02:33] aaronpearce: NuckingFuts: thats the newest one iirc? [02:34] NuckingFuts: aaronpearce: Aye, I believe so [02:34] aaronpearce: yup [02:34] NuckingFuts: aaronpearce: Damn you, and damn the two people who also have two a's at the start of their name! [02:34] NuckingFuts: ACTION shakes his cane [02:35] Pkley: There? [02:35] NuckingFuts: Pkley: PKLZ :P [02:35] Pkley: lol [02:35] NuckingFuts: lo [02:36] mike5w3c has joined the channel [02:37] NuckingFuts: Pkley: You should get pickl.ly [02:37] Pkley: NuckingFuts: Doubt it's free [02:37] chapel: hmm [02:37] justinTNT: NF: let us know how it goes. [02:38] NuckingFuts: PkleyIt is, I checked [02:38] Pkley: How much is it NuckingFuts [02:38] chapel: hey NuckingFuts what are you trying to do? [02:38] draginx has joined the channel [02:38] NuckingFuts: chapel: Create an API for a site, with two logon pathways: one via oAuth and one via actual login [02:40] NuckingFuts: Pkley: "As the annual fee for .ly domains remains high ($75 a year)" [02:41] Pkley: NuckingFuts: Yeah, not that rich :P [02:41] ikaros_daedalos has joined the channel [02:42] galaxywatcher has joined the channel [02:44] Pkley: NuckingFuts: Wish I was earning enough to buy it but I'm not [02:45] NuckingFuts: Pkley: Save up :P [02:45] Pkley: NuckingFuts: Still need to reregister all my current ones [02:46] Gelegrodan: my socket client breaks the data into muliple chunks.. if i connect wih putty it all comes on one line (as it should)... whats the fix? [02:46] jacter has joined the channel [02:46] Guest4528 has joined the channel [02:48] marknel has joined the channel [02:49] galaxywatcher has joined the channel [02:49] galaxywatcher has joined the channel [02:49] ikaros_daedalos: Hey - quick question, perhaps not node-related: I've setup express to bind to port 80 and I'm running it with `sudo` - it launches ok but I can only access the site by adding :80 to the url - if I enter the url w/o :80 I get a CONNECTION_REFUSED - any ideas why this would be the case? [02:50] secoif has joined the channel [02:51] cjoudrey0 has joined the channel [02:52] omni5cience_ has joined the channel [02:53] jinleileiking has joined the channel [02:53] Guest4528: what OS are you on [02:54] Guest4528: browser that is [02:54] bluekite2000_ has joined the channel [02:54] ikaros_daedalos: @Guest4528: Chrome / Ubuntu [02:55] Guest4528: I could only think /etc/services file under http [02:55] cjoudrey0: Hey guys, if I have a connected TCP socket and I unplug my ethernet cable, is it normal that the socket still fires 'drain' events? Shoudln't 'drain' only be fired when a packet was successfully sent? [02:55] ikaros_daedalos: @Guest4528: thanks, I'll look into that [02:57] jinleileiking has joined the channel [02:58] gaiusp has left the channel [03:00] xsyn has joined the channel [03:01] jemes has joined the channel [03:01] ExsysTech has joined the channel [03:01] ikaros_daedalos has left the channel [03:01] marknel has joined the channel [03:03] dyer has joined the channel [03:03] jemeshsu has joined the channel [03:05] tosh has joined the channel [03:07] matyr has joined the channel [03:13] kimyangwon has joined the channel [03:14] niftylettuce has joined the channel [03:14] kmiyashiro has joined the channel [03:16] boehm has joined the channel [03:16] pyrotechnick1 has left the channel [03:19] bingomanatee has joined the channel [03:20] bluekite2000_ has joined the channel [03:22] patzak: if i wanted a clean url structure like django with node, where do i look?? [03:23] ngs has joined the channel [03:23] gazumps has joined the channel [03:23] ngs has joined the channel [03:25] patzak has left the channel [03:25] patzak has joined the channel [03:29] context: patzak: express, crossroads, any routing lib [03:30] patzak: cool thanks [03:30] Siph0n has joined the channel [03:30] kmiyashiro has joined the channel [03:31] ArtistConk1 has joined the channel [03:31] postwait has joined the channel [03:31] Guest4528 has left the channel [03:32] ryah has joined the channel [03:33] gdusbabek has joined the channel [03:33] ryanfitz has joined the channel [13:33] nodelog has joined the channel [13:38] boogyman_ has joined the channel [13:39] seivan has joined the channel [13:39] matyr has joined the channel [13:40] tdegrunt has joined the channel [13:40] tmedema: With express, how should 5xx errors be handled? And should 404s be handled by setting a * route at the end of the routing chain or somewhere else? [13:41] unomi has joined the channel [13:42] matyr__ has joined the channel [13:45] floby: hello I have a question [13:46] liquidproof: tmedema: http://expressjs.com/guide.html#error-handling [13:46] floby: I'm manipulating the filesystem using the fs module. I need to remove a directory, there is only rmdir available which requires the directory to be empty. How do I go about removing a directory and all its files? [13:47] copongcopong has joined the channel [13:47] gonsfx has joined the channel [13:47] chjj: floby: you have to recursively walk the directory and delete everything [13:48] matyr has joined the channel [13:48] liquidproof: floby: fs.readdir -> fs.unlink -> fs.rmdir [13:48] floby: well that's a pain. thanks [13:49] floby: is there any module doing this or easing this? [13:49] chjj: a directory walk is actually a rather small function [13:49] chjj: ill gist a directory walk function for you [13:49] floby: it's actually shorter to spawn a rm -rf [13:49] floby: chjj: thanks [13:50] ion-: is Array.forEach synchronous? [13:50] chjj: yes [13:50] floby: ion-: yes, it belongs to V8, not node, so it's synchronous [13:50] tmedema: liquidproof: that example does not actually say how to catch a 404.. they just do app.get('/404', function(req, res){ as an example [13:51] ion-: thanks [13:51] chjj: actually floby, i answered a question like this on SO a little while ago.. [13:51] ralphholzmann has joined the channel [13:51] chjj: http://stackoverflow.com/questions/5827612/node-js-fs-readdir-recursive-directory-search/5827895#5827895 [13:52] chjj: that function needs a little cleaning up because i wrote it in 2 seconds, but it works [13:52] floby: chjj: reading it. thanks =) [13:52] Gelegrodan: my socket client breaks the data into muliple chunks.. if i connect wih putty it all comes on one line (as it should)... whats the fix? [13:53] swick: what does assertion failed "handle->InternalFieldCount() > 0" mean? [13:54] floby: swick: v8 C++ stuff. Javascript objects can embed C++ fields (usually pointer) in an array. The size of the array has to be specified before construction. [13:56] swick: floby: and how do i know how many fields i need :s [13:57] floby: swick: if you need more than one or two, you're probably doing it wrong. internalfield are used to link a javascript object to its C++ counterpart. so you should need only one where you store the pointer to your C++ object. [13:58] swick: floby: i believe i have set it to 1 (InstanceTemplate()->SetInternalFieldCount(1)) [13:58] SeanBannister has joined the channel [13:58] floby: swick: probably. I'm a bit rusty on the actual name of the v8 classes but I'm familiar with most of the concepts. if I recall correctly that's it [13:59] swick: floby: https://github.com/swick/node-gstreamer/blob/master/src/pad.cc#L15 [14:00] swick: floby: https://github.com/swick/node-gstreamer/blob/master/src/base.h#L22 [14:02] gonsfx: when organizing controllers for an express-based app into single files, is there a best practise for making mongodb connections with node-mongodb-native? [14:03] postwait has joined the channel [14:03] rick____: getting a "permission denied" when using geddy on my OSX Snow Leopard, anyone got an idea on this fix? [14:03] floby: swick: unfortunately I'm not familiar with node specific macros and ObjectWrap :/ so I might not be of good help here. [14:03] floby: swick: and I also have to go :s [14:04] swick: floby: no problem and thanks for ur help :) [14:04] floby: swick: anytime [14:04] tmzt has joined the channel [14:07] matyr has joined the channel [14:07] SeanBannister: I'm trying to install Node.js from the custom PPA (as per the instructions) for Ubuntu 11.04 (Natty) but for some reason it isn't downloading node.js from the PPA it seems to grab it from the Ubuntu repo which gives me v0.2.6, not to sure where to go from here. [14:09] ashb: SeanBannister: google for apt pinning [14:09] SeanBannister: thanks ashb [14:10] azeroth_ has joined the channel [14:13] moshe has joined the channel [14:13] Renegade001 has joined the channel [14:13] eguest309 has joined the channel [14:13] eguest309: hello guys.got a question that i needed some help with [14:14] Renegade001: Does anyone know how to check what version of Node you're running? [14:14] mraleph has joined the channel [14:14] chjj: $ node --version [14:14] rick____: node -v [14:14] chjj: eguest309: what do you need help with? [14:14] eguest309: i wanted to know if socket.io can try reconnecting if it tries connecting to a server and it cant get a connection.i tried it with the reconnct option but that doesnt seem to do the trick [14:15] Renegade001: chjj: Thanks [14:15] `3rdEden: eguest309 the current npm build doesn't include the reconnection support yet [14:15] `3rdEden: we forgot to update the client in the npm release [14:16] `3rdEden: we will be creating another socket.io maintance release this weekend [14:16] `3rdEden: which will included reconnection support [14:16] chjj: i wish npm publishes could just point to github repos :( [14:17] `3rdEden: chjj it can :) [14:17] chjj: oh? [14:17] chjj: enlighten me sir [14:17] chjj: ! [14:17] `3rdEden: you can specify the tarball location of the repo if i'm not mistaken [14:17] mynyml has joined the channel [14:17] eguest309: okay.so if i were to want to check for lost connections, i may have to do a javascript timer of sorts which runs and always checks whether a socekt has been disconnected [14:17] chjj: just in the package.json? [14:18] `3rdEden: chjj if i remember correctly yup, but it might just have been for depencencies .. ._. [14:18] chjj: ah [14:18] `3rdEden: eguest309 yes about that [14:19] Renegade001: I know this isn't really the place, but is there a way to clone previous version of a repository like for instance clone 0.4.7 of Node? [14:19] `3rdEden: Renegade001 most repo's are tagged [14:19] `3rdEden: so in git you can just do `git checkout` with the branch name or tag [14:20] chjj: git checkout v0.4..5 [14:20] chjj: minus the . [14:20] Renegade001: 3rdEden, chjj, Ah thanks :D [14:29] Renegade001: chjj: Sorry, I'm not the best with git yet but how do I actually specify the node repository to checkout that tag [14:29] chjj: it will go by your cwd's .git repo [14:30] Gelegrodan: `3rdEden: you should change the readme of socket.io-node on github.. it says "npm install socket.io-node" [14:30] Gelegrodan: but that just gives a 404 error [14:31] Renegade001: chjj: so clone node first, then checkout a previous version? [14:31] chjj: so cd node or wherever you originally cloned node to, and type git checkout x.x.x [14:31] Renegade001: I see, thanks [14:31] chjj: yes, that works [14:32] dyer has joined the channel [14:34] tmzt has joined the channel [14:34] Spookz has joined the channel [14:34] xsyn has joined the channel [14:34] SeanBannister: So it turns out the problem I'm experiencing with not been able to download Node.js 0.4 from the custom PPA is there were build failures, do these need to be reported or should I presume someones working on them. And if so where should I report them? You can see the failures at https://launchpad.net/~jerome-etienne/+archive/neoip/+packages [14:35] coreb has joined the channel [14:36] simplesoon has joined the channel [14:37] `3rdEden: Gelegrodan thats the 0.7 release of socket.io it's not done yet [14:37] `3rdEden: Gelegrodan npm install socket.io for the current release [14:37] Gelegrodan: `3rdEden: yes i know [14:37] `3rdEden: I think rauchg changed the name because it's not backwards compatible [14:37] `3rdEden: in any way [14:38] `3rdEden: I have yet to found a method or a function that stayed the same ;$ [14:38] Gelegrodan: `3rdEden: how comes you connect to "http://localhost"..isnt ws using its own protcol? [14:38] `3rdEden: Gelegrodan but you are right, it's causing for allot confusion [14:38] eyesUnclouded has joined the channel [14:39] `3rdEden: Gelegrodan i have clue it should just produce something like ws:://localhost:portnumber [14:39] `3rdEden: for websockets to connect on [14:39] Gelegrodan: yes but the example says "http://localhost" .. the 0.6 example just said "localhost" [14:40] `3rdEden: oh yea [14:40] `3rdEden: thats the constructor signature we support [14:40] `3rdEden: see https://github.com/LearnBoost/Socket.IO/issues/94 [14:41] `3rdEden: it all gets parsed down to the correct values [14:42] jtsnow has joined the channel [14:42] simplesoon: I'm trying to run the example at https://github.com/maccman/spine.app but am having no luck. I can't tell if the problem is with the way I set up node.js, npm, nvm or the project itself. First, when I install spine using npm an executable is not available as the documentation suggests there should be. After creating the symbolic link to the executable I try to run 'node index.js' but I get 'Error: Cannot find module 'stitch'' whic [14:42] simplesoon: the first module required in index.js. Does anyone have recommendation for debugging my specific scenerio? I've tried uninstalling and reinstalling npm multiple times. Could it be something with nvm? [14:44] Gelegrodan: `3rdEden: I see, but feels kinda odd to write http when its a WS, but it makes sense for xhr-polling and such tho.. [14:45] sivy has joined the channel [14:47] secoif: simplesoon: try install spine 'globally' [14:47] secoif: npm install -g spine [14:47] secoif: assuming you're using latest npm [14:48] sechrist has joined the channel [14:48] tmzt has joined the channel [14:48] febits has joined the channel [14:49] simplesoon: npm version 1.0.06 [14:49] simplesoon: 1.0.6 [14:50] simplesoon: still can't find stitch but 'npm list -g' shows it as a nested node_module [14:51] secoif: simplesoon: where did you find the executable (trying it myself) [14:51] simplesoon: ~/.nvm/v0.4.7/lib/node_modules/spine/node_modules/spine.app/bin/spine [14:52] secoif: oh of course, i was looking in the spine (no.app dir) [14:54] bshumate has joined the channel [14:54] bshumate has joined the channel [14:54] secoif: ah k mine worked [14:54] secoif: again [14:54] secoif: try this [14:54] secoif: npm install -g spine.app [14:55] secoif: you have to install it globablly for it to set up the executable symlinks [14:55] secoif: as far as I'm aware anyway [14:56] ako has joined the channel [14:57] tmzt has joined the channel [14:58] secoif: simplesoon: did that work? [14:59] simplesoon: yes: it created the links to the executable but I'm still having problems with it not recognizing the stitch module [14:59] secoif: hang on [15:00] simplesoon: thanks for your help [15:00] robhawkes has joined the channel [15:00] secoif: simplesoon: hrm, mine worked [15:00] secoif: how are you invoking it? [15:00] secoif: the index [15:00] simplesoon: node index.js [15:00] secoif: ahh [15:00] simplesoon: what about you? [15:01] tedsuo has joined the channel [15:01] secoif: same [15:01] simplesoon: do you have nvm installed? [15:01] secoif: nvm? [15:01] secoif: npm? [15:01] simplesoon: node version manager [15:01] secoif: ahh [15:01] simplesoon: allows you to jump between node versions quickly [15:01] secoif: nope [15:02] simplesoon: ok - I'll try it without that [15:02] simplesoon: thanks again [15:02] secoif: sp [15:02] secoif: np* [15:02] secoif: the problem is probably something like [15:03] mhausenblas_ has joined the channel [15:03] secoif: nvm's node expects modules to go into a particular location and npm is installing them somewhere else [15:03] secoif: jsut a guess [15:03] lmorchard has joined the channel [15:04] Mrfloyd has joined the channel [15:06] saschagehlich has joined the channel [15:06] Kami_ has joined the channel [15:07] mike5w3c has joined the channel [15:14] dnolen has joined the channel [15:15] Corren has joined the channel [15:17] lemon-tree has joined the channel [15:19] sirdancealot has joined the channel [15:19] vuliev: q [15:20] vuliev: oops [15:21] synkro has joined the channel [15:22] Postmodernist: Hola. [15:22] rubydiamond has left the channel [15:23] Postmodernist: Gelegrodan: If I try all of them rather than just knowing which one isn't a fuck up, my boss will flip his lid. [15:23] secoif: what's best way to stop these ../../../ in my requires? is there somewhere I can set a global application root or something [15:23] rfay has joined the channel [15:25] simplesoon: secoif: did you have to npm install all the modules (stitch, express)? when I install spine.app it shows a bunch of nest modules but for some reason my app doesn't recognize them. If I install them individually they work [15:25] secoif: yep [15:25] secoif: oh [15:25] secoif: hang on [15:25] secoif: no [15:25] secoif: it just did it for me [15:26] simplesoon: dang [15:26] secoif: can you run [15:26] secoif: echo $NODE_PATH [15:26] secoif: please [15:26] simplesoon: nothing [15:27] secoif: ok i think we have your problem [15:27] simplesoon: none of the install instructions say anything about a node path [15:27] simplesoon: or atleast the installing instructions I read [15:27] simplesoon: I'll google for it [15:27] draginx has joined the channel [15:27] draginx has joined the channel [15:28] secoif: simplesoon: https://gist.github.com/973240 [15:28] secoif: whack that in your ~/.bash_profile [15:28] secoif: and see how it goes [15:29] tedsuo has joined the channel [15:30] bbttxu has joined the channel [15:30] secoif: oh and remember to restart your shell or run source ~/.bash_profile [15:31] nivoc has joined the channel [15:31] boogyman has joined the channel [15:31] xsyn has joined the channel [15:31] jtsnow has joined the channel [15:32] Gelegrodan: Postmodernist: then google is your friend :) [15:32] Postmodernist: secoif: I have the same problem. [15:32] secoif: Postmodernist: which problem [15:32] Postmodernist: secoif: Wanting to have global modules. [15:32] secoif: I see [15:33] Postmodernist: Gelegrodan: That sentiment is dangerous to such a great community. [15:33] indutny has joined the channel [15:33] gonsfx: can anyone help out with a mongoose problem? [15:33] Postmodernist: But I'm assuming it's just that no one here has used sqlite with node.js enough to give me a good answer, which is fine. [15:34] Postmodernist: secoif: What I have to do now is run `export NODE_PATH=/usr/local/lib/node_modules' before I start my node. [15:35] towns has joined the channel [15:35] secoif: Postmodernist: why can't you put it in a shell startup script? [15:35] simplesoon: secoif: no go. I used 'export NODE_PATH=$HOME/local/lib/node' [15:35] mike5w3c has joined the channel [15:35] Postmodernist: secoif: I will end up doing that :( [15:35] Postmodernist: simplesoon: export NODE_PATH=/usr/local/lib/node_modules [15:35] Shrink has joined the channel [15:36] secoif: node_modules? [15:36] Postmodernist: Make sure you know where you installed it. [15:36] secoif: just node [15:36] secoif: in my case [15:36] Maximosis has joined the channel [15:36] Postmodernist: secoif: I use node_modules, but I'm on Debian. [15:36] secoif: I have a node_modules folder too but I'm not pointing at it [15:36] Postmodernist: What changed in npm/node.js? All modules used to be just global. [15:37] Postmodernist: See if the module you want is in it. [15:37] secoif: simplesoon: you want to get rid of that $HOME thing probably [15:37] secoif: "/usr/local/lib/nod" [15:37] secoif: *node [15:38] simplesoon: yeah - I think that is where homebrew installs node but I used the first install script at https://gist.github.com/579814 [15:38] simplesoon: https://gist.github.com/579814#file_node_and_npm_in_30_seconds.sh [15:38] secoif: ahh alright [15:38] secoif: my whoel setup is totally auto generated [15:39] Postmodernist: secoif: Same. [15:39] simplesoon: how did you download node? [15:39] secoif: brew install node [15:39] Postmodernist: I have a perl script that sets up a base Ubuntu or Debian box with everything needed, including configuring/installing Postgresql and nginx. [15:39] simplesoon: but isn't that node 2.6 or something [15:39] dyer has joined the channel [15:40] secoif: not if you update your brew [15:40] secoif: brew update [15:40] simplesoon: lol [15:40] secoif: brew install node [15:40] simplesoon: dangit [15:40] Postmodernist: simplesoon: wget http://nodejs.org/dist/node-v0.4.7.tar.gz [15:40] Postmodernist: (or whatever the current version is) [15:40] secoif: or use brew [15:40] secoif: brew good. [15:41] secoif: you can then do a brew install npm to get the npm install instructions [15:41] secoif: if you're having troubles with your setup [15:41] Postmodernist: ACTION is using node.js in production for a wall st. business, which I think is going to make me bald by 23 [15:41] secoif: I'd just let the automated installers do it for you [15:41] vilfredo has joined the channel [15:41] simplesoon: yeah, thats what im going to do [15:41] simplesoon: I'll keep you posted [15:42] Postmodernist: Every time something changes I pull my hair out and have to listen to PHP guys [15:42] Postmodernist: Fortunately, the boss loves me enough to let me tell them to get fucked. [15:42] Postmodernist: And he loves the low latency :) [15:43] Postmodernist: Quants that know PHP are the cancer of Wall st. [15:43] Postmodernist: And I will crush them! :) [15:44] vilfredo: hi all [15:44] vilfredo: I'm trying to build node.js, but I'm having issues due to python3 being the default python on my path [15:45] Postmodernist: vilfredo: Ciao amico! [15:45] vilfredo: hi! [15:45] Postmodernist: vilfredo: Did you try exporting a different path? [15:46] jtsnow has joined the channel [15:47] scnfilho has joined the channel [15:48] indutny has joined the channel [15:49] rgabo has joined the channel [15:50] vilfredo: ah, that's got it. It was running the script in a different shell program that wasn't respecting my settings [15:51] qbert has joined the channel [15:51] jetienne has joined the channel [15:52] frewsxcv: is there a vector version of the node logo available? [15:53] yumike has joined the channel [15:55] yumike has joined the channel [15:56] strmpnk has joined the channel [15:58] MattJ has joined the channel [15:59] cloudhead has joined the channel [15:59] indutny has joined the channel [16:00] abraham has joined the channel [16:01] aconbere has joined the channel [16:01] uclinux has joined the channel [16:03] uclinux: anyone an RSA expert? [16:04] Maximosis has joined the channel [16:07] matyr has joined the channel [16:09] Squeese has joined the channel [16:09] eb4890 has joined the channel [16:11] beawesomeinstead has joined the channel [16:11] beawesomeinstead has joined the channel [16:11] simplesoon: secoif: you still around? I've installed node using brew and installed npm but am still having the same problems. Would like to compare environments if possible. [16:12] secoif: it's quite possible those all installations are still lingering around and causing issues [16:12] secoif: ? [16:14] simplesoon: which node -> /usr/local/bin/node [16:14] simplesoon: which npm -> /usr/local/bin/npm [16:14] simplesoon: echo $NODE_PATH -> /usr/local/lib/node [16:15] simplesoon: were you able to run 'npm install spine' and get the executable? [16:15] yumatov has joined the channel [16:15] simplesoon: or did you have to run 'npm install -g spine.app' [16:15] secoif: you want: npm install -g spine.app [16:15] secoif: yep [16:15] secoif: spine is a different lib [16:15] secoif: to spine.app [16:15] simplesoon: and then when you ran node index.js everything worked? [16:16] secoif: spot on. [16:16] simplesoon: npm list [16:16] simplesoon: do you have express as a nested module included with another module or as a top level module [16:17] sreuter has joined the channel [16:17] gonsfx: can someone with experience using mongoose/mongodb please take a look at https://gist.github.com/973268 ? [16:17] secoif: top level I guess [16:18] tmzt has joined the channel [16:18] mike5w3c has joined the channel [16:18] secoif: simplesoon: https://gist.github.com/973274 [16:19] harth has joined the channel [16:19] simplesoon: awesome thanks. turns out you already had the modules I was struggling with. When I install them as top level modules it works [16:19] zeade has joined the channel [16:19] secoif: sweet [16:20] simplesoon: kinda confused what the purpose of the nested modules is for [16:20] secoif: my understanding is that is' so a library can depend on specific versions [16:20] simplesoon: notice how you have stitch as a part of spine and as a top level module [16:20] secoif: yep [16:21] simplesoon: well coolio. You've been a ton of help. much appreciated. [16:22] dyer has joined the channel [16:22] dyer has joined the channel [16:22] towski has joined the channel [16:23] altamic has joined the channel [16:23] altamic has joined the channel [16:23] bingomanatee has joined the channel [16:29] brolin has joined the channel [16:32] gazumps has joined the channel [16:33] eguest309 has joined the channel [16:37] Corren has joined the channel [16:37] Maximosis has joined the channel [16:40] KrooniX has left the channel [16:42] gadny has joined the channel [16:43] mbarnes679 has joined the channel [16:44] lemon-tree has joined the channel [16:45] mbarnes679 has joined the channel [16:46] febits has joined the channel [16:46] herbySk has joined the channel [16:47] stanni has joined the channel [16:47] sreeix has joined the channel [16:49] isaacs has joined the channel [16:50] jarek has joined the channel [16:50] jarek has joined the channel [16:52] Renegade001 has joined the channel [16:53] dyer has joined the channel [16:53] dyer has joined the channel [16:56] KrooniX has joined the channel [16:58] fmeyer has joined the channel [16:58] simplesoon has left the channel [17:01] xeodox has joined the channel [17:02] hij1nx has joined the channel [17:03] gonsfx has left the channel [17:08] Adman65 has joined the channel [17:08] stagas has joined the channel [17:12] edude03 has joined the channel [17:13] ai0n has joined the channel [17:14] swick: when i do "char *name = *String::AsciiValue(args[1]->ToString());" and args[1]->IsString() == true char is random string? [17:16] secoif: swick: I think you're in the wrong room [17:16] xeodox has joined the channel [17:16] swick: secoif: its v8 for a node.js addon [17:17] zomgbie has joined the channel [17:17] secoif: swick: np. [17:17] swick: well... is there a v8 room? [17:17] Mrfloyd has joined the channel [17:19] ralphholzmann has joined the channel [17:19] rmustacc: swick: ::AsciiValue return a char *? [17:20] tilgovi has joined the channel [17:20] tilgovi has joined the channel [17:20] swick: rmustacc: http://bespin.cz/~ondras/html/classv8_1_1String_1_1AsciiValue.html [17:21] swick: rmustacc: the compiler says nothing... [17:22] rmustacc: Well just by visual inspection you're doing an extra dereference. [17:22] swick: rmustacc: what? Sry, new to cpp... [17:23] kmiyashiro has joined the channel [17:24] Renegade001 has joined the channel [17:24] swick: rmustacc: operator* returns char* [17:24] rmustacc: The interface says that it's returning a char *. The * operator at the bebinning of *String::... says derefernce the value. [17:24] rmustacc: So you're dereferencing a pointer to the character and returning the value that it points to. [17:25] rmustacc: Albeit, that's what would make complete sense in C. C++ could be doing something crazy here. [17:26] xandy has left the channel [17:27] swick: if i just write "char *name = String::AsciiValue(args[1]->ToString())" the compiler says " cannot convert ‘v8::String::AsciiValue’ to ‘char*’ in initialization" [17:27] nivoc has joined the channel [17:27] xeodox has joined the channel [17:27] openbala has joined the channel [17:28] rmustacc: Sorry, not really sure what's going on then. From the thing you linked me it appears that it should return a char *. But I guess something else is going on there. [17:28] NuckingFuts has joined the channel [17:29] rmustacc: Good luck. [17:29] rmustacc has left the channel [17:29] aaronblohowiak has joined the channel [17:29] justinw312 has joined the channel [17:31] swick: i got it... but i dont understand it :s [17:31] aaronblohowiak: making the change to npm 1.0 [17:31] aaronblohowiak: this could git dirty [17:32] swick: String::AsciiValue name(args[1]); [17:32] swick: and then in i pass it to a function func(char *x); with func(*name) [17:32] justinw312: Would someone mind taking a took at a code snippet (with some explanation) and tell me if I'm 'thinking async' or 'doing it wrong'? It works and all, I just don't know if I"m thinking about the problem the right way: http://pastebin.com/PCMx69Nr [17:33] justinw312: The basic question, I guess, is: is that a good way to wait for an object to be initialized before letting it do stuff. [17:34] JJMalina has joined the channel [17:34] Ned_ has joined the channel [17:34] mAritz has joined the channel [17:35] dyer has joined the channel [17:36] secoif: justinw312: a way some libs handle it is to buffer all the commands they receive then once it's initialized, then it will execute anything in the command buffer [17:36] Daeken has joined the channel [17:36] matyr has joined the channel [17:37] secoif: doing some kind of polling check to determine if the object is ready = bad [17:38] x_or has joined the channel [17:39] justinw312: secoif: Thanks, thats something for me to think about. So just have the object start running stuff off its buffer once its done initializing? [17:39] FredFred has joined the channel [17:39] FredFred has left the channel [17:39] justinw312: secoif: It's such a different way of thinking, it's taking me a while to wrap my head around it and do things the right way. [17:39] secoif: probably the easiest way to do it is to initialize everything in a create() that takes a function callback and execute the callback once it's done initialising [17:40] secoif: eg [17:40] secoif: DB.initialize(function() { // do this stuff once the DB is initialized}); [17:41] FredFred has joined the channel [17:41] secoif: doing a command buffer is probably a bit extreme, just use a callback [17:42] aaronblohowiak: can you no longer have a "*" version in npm package.json ? [17:42] secoif: going for sleep. nearly 4am. seeyas [17:46] tedsuo has joined the channel [17:47] wink_ has joined the channel [17:47] harth has joined the channel [17:47] Wizek: Why can't I catch EPERM errors in Node? [17:50] isaacs has joined the channel [17:50] Xano has joined the channel [17:50] Wizek: And what are those anyways? [17:51] Spookz_ has joined the channel [17:55] ryanfitz has joined the channel [17:56] brian183 has joined the channel [17:57] marknel has joined the channel [17:58] brianloveswords has joined the channel [18:00] matyr has joined the channel [18:01] Gelegrodan: my socket client breaks the data into muliple chunks.. if i connect wih putty it all comes on one line (as it should)... whats the fix? [18:01] boghog: hmm deja vu :D [18:04] rznt has joined the channel [18:04] rznt: Hey everyone [18:04] balaa has joined the channel [18:04] rznt: Just a very basic question: I seem to have screwed up my node installation as i haev to manully set the export path to $HOME/local/node/bin:$PATH (which only saves to the current session) [18:05] matyr_ has joined the channel [18:05] balaa has joined the channel [18:05] Opaque has joined the channel [18:06] edude03 has joined the channel [18:07] towns has joined the channel [18:08] TheLifelessOne has joined the channel [18:09] vovin has joined the channel [18:10] rznt: Anyone? [18:11] bbttxu has joined the channel [18:11] eguest309 has left the channel [18:12] q_no: how can I get the current unix timestamp? [18:14] fr0stbyte has joined the channel [18:17] tedsuo has joined the channel [18:18] linnk has joined the channel [18:19] nail_: q_no: Math.round((new Date()).getTime()/1000) that's in seconds [18:21] tim_smart has joined the channel [18:22] `3rdEden: Math.round(Date.now()/1000) <-- seconds or just Date.now() [18:24] robhawkes has joined the channel [18:25] devrim has joined the channel [18:25] alexandere has joined the channel [18:25] jesusabdullah: ohoho [18:25] jesusabdullah: Date.NAOW = Date.now [18:25] F1LT3R has joined the channel [18:25] jesusabdullah: Monkey patched like a boss [18:25] jesusabdullah: <3 js [18:26] caolanm has joined the channel [18:26] bbttxu_ has joined the channel [18:27] brettgoulder has joined the channel [18:29] jeff_horton has joined the channel [18:30] stonebranch has joined the channel [18:30] Xano has joined the channel [18:32] pcardune has joined the channel [18:34] mscdex: Date.lol = function() { return Math.floor(Math.random()*Date.now()); }; [18:34] `3rdEden: Fuck yea! the `vm` module is awesome for unit testing [18:35] edude03 has joined the channel [18:38] yibter has joined the channel [18:38] xsyn has joined the channel [18:39] Rob- has joined the channel [18:45] Corren has joined the channel [18:46] piscisaureus has joined the channel [18:46] Maximosis has joined the channel [18:47] Maximosis_ has joined the channel [18:48] mc_greeny has joined the channel [18:48] brettgoulder has joined the channel [18:50] SamuraiJack has joined the channel [18:50] TheLifelessOne has joined the channel [18:50] sechrist has joined the channel [18:51] TheLifelessOne has joined the channel [18:52] Kami_ has joined the channel [18:55] ewdafa has joined the channel [18:55] TheLifelessOne has joined the channel [18:56] pifantastic has joined the channel [18:58] Phaaze has left the channel [18:58] codemanki has joined the channel [18:58] tilgovi has joined the channel [18:59] heavysixer has joined the channel [18:59] Wizek: Why can't I catch EPERM errors in Node? [19:00] MikeW: Hey anyone know if the sashimi jsconf talk was recorded? [19:00] piscisaureus_ has joined the channel [19:00] ryanfitz has joined the channel [19:00] abraham has joined the channel [19:00] MikeW: I'd LOVE to catch a recording of that jsconf talk if anyone knows if there's one [19:02] openbala has left the channel [19:02] stisti: Wizek: Why do you say you can't ? [19:03] aliemmo has joined the channel [19:04] perlmonkey2 has joined the channel [19:04] walkah: kkaefer: ping [19:04] TheLifelessOne has joined the channel [19:05] kkaefer: walkah: hi [19:05] kkaefer: walkah: how're you doing? :) [19:05] walkah: kkaefer: I'm good! playing with node-sqlite3 :) [19:05] kkaefer: cool [19:05] walkah: kkaefer: it's giving me a hard time - inserts are failing but my callback isn't getting called :-/ [19:06] walkah: any thoughts? [19:06] kkaefer: oh, really... [19:06] kkaefer: what kinds of queries are you running? [19:06] kkaefer: do you have any error messages? [19:06] kkaefer: (it's been working very reliably and stable for us so far) [19:06] walkah: it's an insert [19:06] kkaefer: any code you can share? [19:07] walkah: kkaefer: http://pastie.org/1905586 [19:08] kkaefer: do you get any error messages at all? [19:09] walkah: nothing [19:09] walkah: actually, here - i will give you the whole script [19:09] ralphholzmann has joined the channel [19:09] walkah: kkaefer: http://pastie.org/1905594 [19:09] walkah: so, the db is not in the current directory, but the create statement is running fine [19:09] aho has joined the channel [19:09] kkaefer: seems pretty straightforward [19:09] kkaefer: yeah, the location of the db doesn't matter [19:09] walkah: yeah [19:09] walkah: that's what I thought :P [19:10] kkaefer: can you try removing the [] around the parameters? [19:10] walkah: sure... one sec [19:11] walkah: kkaefer: still nothing [19:11] langworthy has joined the channel [19:11] kkaefer: mysterious [19:11] kkaefer: what version of sqlite are you using? [19:12] walkah: 3.7.4 [19:12] walkah: (ubuntu natty) [19:13] kkaefer: ok, let me get the script to run on my machine [19:13] V1 has joined the channel [19:13] towns has joined the channel [19:14] walkah: kkaefer: aha [19:14] walkah: i think i found it [19:14] walkah: the process.exit() was happening too soon [19:14] kkaefer: oh, heh [19:14] walkah: :P [19:14] walkah: much better [19:15] kkaefer: walkah: btw, when you only have one statement, there's no reason to call .serialize() [19:15] malkomalko has joined the channel [19:15] kkaefer: the use case for serialize is when you want to run multiple statements that depend on the previous statement being completed [19:15] walkah: ahh [19:15] walkah: word [19:15] kkaefer: I've also found it handy to have a schema.sql file [19:16] kkaefer: and execute that via db.exec(fs.readFileSync() [19:16] walkah: ah [19:16] walkah: cool [19:16] kkaefer: (the current approach works too of course) [19:16] walkah: well, this is just for a silly irc bot that eaton and i are playing with :P [19:16] walkah: it's not that serious [19:16] matyr has joined the channel [19:18] reza` has joined the channel [19:18] rznt: Hi there, i'm having a problem with node...my node installation seems to have screwed up and I have to set the export path to the local node installation everytime i started up the session... [19:18] rznt: start* [19:19] V1: rznt add the path to bashrc or .profile [19:19] Mrfloyd has joined the channel [19:19] rznt: where is that located? [19:20] Wizek: stisti, Even though I wrap a try ... catch around a function that is strongly suspected to be the cause for the error, the catch catches nothing, and Node exists with stack trace and all... [19:20] `3rdEden: vim ~/.bashrch [19:20] `3rdEden: vim ~/.profile <-- for mac [19:20] `3rdEden: vim ~/.bashrc * [19:21] rznt: it claims its a new file.. [19:21] stisti: Wizek: hmmm... [19:22] stisti: I have some code that opens and reads files and it doesn't get exceptions for files that it cannot read [19:22] jonasen has joined the channel [19:22] rznt: never mind [19:22] `3rdEden: If you haven't created it, it doesn't exist. [19:22] stisti: I open them with fs.createReadStream() [19:22] stisti: and if the file cannot be opened, the stream receives an 'error' event [19:23] rznt: ok, and just add export PATH=$HOME/local/node/bin:$PATH? [19:24] `3rdEden: export PATH=/opt/local/bin:/opt/local/sbin:$PATH [19:24] `3rdEden: something like that [19:24] `3rdEden: + your node stuff [19:26] xsyn has joined the channel [19:26] msucan has joined the channel [19:27] JJMalina: rznt: profile and bashrc should be in /private/etc/ if you're on a mac [19:27] rznt: i'm on ubuntu [19:27] JJMalina: nvm [19:28] rznt_ has joined the channel [19:29] rznt_: erm, so i included sometihng like export PATH =/root/local/node/bin:$PATH [19:29] stisti: why /root? [19:30] stisti: you aren't logged in as root, are you? [19:30] context: yeah thats rather scary. [19:30] rznt_: i'm logged into a srv via putty and everything is installed in root, not home [19:31] context: red blinky lights what [19:31] context: even then... why /root [19:32] stisti: yes, if you have the permissions and need to make a "global" installation, you could just as well ./configure --prefix=/usr and be done with it [19:32] rznt__ has joined the channel [19:34] context: or.. install node from the distro package manager [19:35] stisti: and I would almost say it is even more important to not run processes as root on a server... [19:35] stisti: the idea is that if someone hacks into the process or otherwise takes control of it, if the process was running as non-root, the amount of damage is limited [19:36] stisti: if the process was running as root, you need to re-install the whole system from read-only media [19:36] edude03 has joined the channel [19:37] steffan has joined the channel [19:38] rzntt has joined the channel [19:38] rzntt: Well, that still didn't help. [19:38] rzntt: bash still returns 'command not found' [19:39] rzntt: even though i added the export path [19:40] xsyn has joined the channel [19:40] stisti: And you stated a new bash? [19:40] stisti: Or sourced the file? [19:41] towns has joined the channel [19:41] stisti: Or otherwise caused bash to reread it? [19:42] rzntt: never mind! i started a new session, everything is fine now [19:42] rzntt: thank you ! [19:43] patcito has joined the channel [19:43] aaronblohowiak has joined the channel [19:44] aaronblohowiak: SubStack: how do ou do error handling with chainsaw? [19:45] chjj: error handling with a chainsaw? that does sound effective [19:46] aaronblohowiak: chjj: hehe [19:46] aaronblohowiak: chjj: https://github.com/substack/node-chainsaw [19:46] chjj: ah [19:47] eldar: hi! I'm using fs.readFile function, which returns a buffer. As far as I understand it's a binary buffer, so how can I convert it to text, if I'm reading a text file? [19:48] gmanika has left the channel [19:48] chjj: fs.readFile(file, 'utf-8', function(err, data) { ... }); [19:49] steffan has joined the channel [19:49] SubStack: aaronblohowiak: chainsaw doesn't handle errors at all, that's up to the lib [19:49] eldar: chjj, that's exactly what I'm doing, but data returned isn't a string, but rather a [19:49] chjj: or you could do data.toString('utf-8'), that works too, but not necessarily a good habit though because if the data is streaming you need a stringdecoder [19:49] chjj: eldar: that should work [19:50] aaronblohowiak: SubStack: so your lib would have a .err() function that would accept an error handler ? [19:50] chjj: its a buffer by default, when you dont set an encoding [19:51] eldar: chjj, yeah just tried data.toString("utf8") and it worked [19:51] eldar: thanks [19:51] eldar: I should have looked in the buffer api [19:51] chjj: the other way should work, and i recommend that more [19:52] chjj: just remember if data is streaming in, you cant simply do str += data.toString('utf-8'); [19:52] MikhX has joined the channel [19:53] SubStack: aaronblohowiak: seq uses chainsaw and it has a .catch() [19:53] aaronblohowiak: SubStack: oh yeaaaaa... i forgot about seq v.v sorry [19:56] roar has joined the channel [19:56] chjj: bah, why does symmetric key cryptography require so much esoteric knowledge [19:57] Yuffster has joined the channel [19:59] Gelegrodan: my socket client breaks the data into muliple chunks.. if i connect wih putty it all comes on one line (as it should)... whats the solution? [19:59] Kingdutch has joined the channel [20:00] emattias has joined the channel [20:01] mischievious has joined the channel [20:01] emattias has joined the channel [20:02] qFox has joined the channel [20:02] msucan has joined the channel [20:02] doctorm has joined the channel [20:02] pyrony has joined the channel [20:04] kjeldahl has joined the channel [20:04] ryah has joined the channel [20:06] Maximosis_ has joined the channel [20:07] matyr has joined the channel [20:07] avalanche123 has joined the channel [20:07] m64253 has joined the channel [20:08] Corren has joined the channel [20:11] pcardune has joined the channel [20:13] ryanfitz has joined the channel [20:14] Ecce_ has joined the channel [20:14] ExsysTech has joined the channel [20:15] ako has joined the channel [20:15] ryan0x2 has joined the channel [20:16] kriszyp has joined the channel [20:17] sikker has joined the channel [20:18] rfay has joined the channel [20:19] Wizek: stisti, are you still there? This is what I get: http://prntscr.com/1vrg0 [20:19] sikker: are there any "standardized" plug and play node.js web servers out there? I mean, with all the mime types, redirection etc.handled that I can just write .js and .html files for as I would write .php and .html files for Apache or Lighttpd? [20:20] chjj: i think there are, yeah [20:21] chjj: thats trivial to set up yourself with a framework though [20:21] Maximosis has joined the channel [20:21] chjj: framework + templating engine [20:22] Maximosis_ has joined the channel [20:22] stisti: Wizek: Yes, but I don't know what your problem is [20:22] Wizek: Anyone knows what EPERM error (http://prntscr.com/1vrg0) means and why I cannot catch it? [20:23] sikker: chjj, what I'm thinking is, as an excersise, porting my favourite PHP framework to Node. For purely educational purposes. So I'd like a ready-made webserver I can just code against [20:23] stisti: You are trying to open a socket? [20:23] stisti: A unix domain socket? [20:25] stisti: Wizek: Did you try to add an 'error' event handler? [20:27] Wizek: stisti, it's the internals of node-mysql, whereas the client.connect() triggers this error. If I take a look inside, maybe I find that errors aren't handled, but I tought it would bouble out. Why doesn't it? [20:28] andrewfff has joined the channel [20:29] stisti: I'm guessing you are trying to open a unix domain socket to mysql server but you do not have permission to connect to the socket the mysqld is listening [20:29] jmoyers: sikker: as far as i know there isn't a popular equivalent to apache + php -- most web frameworks with node are integrally tied to the http server provided with node. see http://expressjs.com/ [20:30] xsyn has joined the channel [20:30] tdegrunt has joined the channel [20:30] wink_ has joined the channel [20:33] bwinton has joined the channel [20:33] smlefo has joined the channel [20:34] azeroth__ has joined the channel [20:35] hassox has joined the channel [20:37] sikker: jmoyers, thanks :) [20:37] smlefo has joined the channel [20:37] superjudge has joined the channel [20:37] smlefo: what is node-waf? [20:39] m00p has joined the channel [20:39] Maximosis_ has joined the channel [20:41] NuckingFuts: How severely does NodeJS suck as a fileserver? [20:41] sikker: I wasn't aware that it sucked at all. [20:42] NuckingFuts: Binary isn't the strongsuit of JS [20:42] aconbere has joined the channel [20:43] NuckingFuts: And I'm debating if I ought to use a separate file server [20:43] robhawkes has joined the channel [20:43] smlefo: file server in what capacity? use samba..? [20:43] NuckingFuts: lolwat? [20:43] NuckingFuts: I mean a website file server [20:44] NuckingFuts: A simple static webserver with one purpose: spitting out binary files [20:44] smlefo: oh [20:44] smlefo: beats me... use lighttp for that stuff... is node really ready for production stuff anyways? [20:44] NuckingFuts: smlefo: I would personally say yes. [20:45] NuckingFuts: Because Node *is* stable, though it's still changing a lot [20:45] NuckingFuts: It is highly reliable [20:45] smlefo: not sure that sentence makes sense [20:45] chjj: i would also say yes for the most part, unless your life depends on your server [20:46] NuckingFuts: smlefo: things are changing still, but node is reliable enough to work in production. [20:46] smlefo: *shrug* so then use it for a file server if it's ready for production? [20:47] Maximosis has joined the channel [20:47] sikker: I wouldn't use Node for emergency call center software or running the equipment of a submarine, but for a server that serves static images of kittens with semi-funny captions? sure thing [20:47] NuckingFuts: smlefo: Like I said, NodeJS's binary sorta sucks [20:47] chjj: any crypto experts here? aes or blowfish? [20:47] tim_smart: I wouldn't use node as a file server when nginx etc is already build for that stuff [20:47] tim_smart: built* [20:48] tim_smart: It is about using the right tool for the job, and Node is not the right tool for several things [20:48] Prism has joined the channel [20:48] NuckingFuts: ExpressJS's file server seems pretty stable, but how is it as far efficiency goes? [20:48] chjj: well if you guys actually took the time to read that amazing article on the ibm site, you would know that node is pretty much built for serving files and nothing else [20:49] NuckingFuts: chjj: lol [20:49] chjj: i still cant get over that article [20:49] chjj: :( [20:49] tim_smart: NuckingFuts: If you are using the sendfile stuff with node, it is not too bad. But still doesn't compare with nginx unless you cache all the buffers in memory [20:49] NuckingFuts: chjj: I tried to read it, but I was about to go shoot up IBM's HQ after the first paragraph, and the "spawning a process" thing [20:50] chjj: i think that mightve been the worst part of the article [20:51] NuckingFuts: I'm seriously wondering what made the guy think that. [20:51] chjj: the worst part was when i read that guy is a programmer [20:51] NuckingFuts: There is NO WAY you can mix up "managing a threadpool for async I/O" with "spawns a process for each connection" [20:51] chjj: yeah [20:51] robhawkes has joined the channel [20:52] NuckingFuts: Seriously, did Zed write that article to attack NodeJS? :P [20:53] chjj: i was surprised to see it get taken down [20:53] chjj: i honestly didnt think theyd do anything about it [20:53] chjj: maybe they do care! [20:53] draginx: NuckingFuts: linky? [20:54] NuckingFuts: draginx: To? [20:54] NuckingFuts: (note: Zed did not write the aticle, that was a joke about the anti-node position) [20:54] draginx: zed [20:54] draginx: oh [20:54] sikker: Zed's dead baby, Zed's dead... [20:54] chjj: haha [20:55] chjj: i was just thinking that quote for some reason [20:55] sikker: I do that every time someone says Zed. Or I see the letter Z (we don't say "zee" where I come from). Mind virus much :P [20:56] chjj: zee > zed [20:56] NuckingFuts: lol Zed [20:56] sjbreen has joined the channel [20:56] NuckingFuts: I imagine Zed probably does like buttraping people. [20:57] pr2012 has joined the channel [20:58] chjj: any crypto experts here? [20:58] boaz has joined the channel [20:58] NuckingFuts: cryptozoology? [20:58] vikstrous has joined the channel [20:58] NuckingFuts: or perhaps cryptozoophilia? [20:58] chjj: or people who are moderately learned in the area? [20:59] NuckingFuts: chjj: I know crypto: It makes shit encryptotastic! [20:59] NuckingFuts: :P [21:00] captain_morgan has joined the channel [21:02] frodenius: NuckingFuts=+ [21:02] brian183 has left the channel [21:03] frodenius: fail [21:03] frodenius: ACTION facepalms [21:03] MattJ: chjj: What's youre question? [21:03] MattJ: *-e [21:04] jacobolus has joined the channel [21:06] chjj: MattJ: was wondering whats better for a cookie based session system, aes or blowfish? [21:06] sivy has joined the channel [21:06] chjj: ive been using bf-cbc specifically [21:07] bwinton has joined the channel [21:07] smlefo: what is node-waf? [21:07] pr2012: any monogo ports of resque out there? didn't see anything in npm but mojo. [21:07] draginx: smlefo: didnt u ask this already?? [21:08] smlefo: yeah but i don't remember getting a response... am i not allowed to ask things twice? [21:08] draginx: http://waf.googlecode.com/svn/docs/apidocs/index.html this? [21:08] draginx: no but a quick google might have been easier/faster :P [21:08] smlefo: that looked like python stuf [21:08] smlefo: (already saw that page) [21:08] draginx: http://waf.googlecode.com/svn/docs/apidocs/Node.html google google [21:09] smlefo: don't think that page is node.js [21:09] smlefo: again... looks like python stuff [21:09] febits[0] has joined the channel [21:10] draginx: perhaps we can put two and two together? [21:10] draginx: what is waf? :) [21:10] Corren has joined the channel [21:11] draginx: https://www.cloudkick.com/blog/2010/aug/23/writing-nodejs-native-extensions/ heres a better linky [21:11] deedubs has joined the channel [21:12] smlefo: i figured since node-waf came with node.js clean install, there would be a page on the node.js wiki or something about it [21:12] draginx: eh the wiki is very barbaric imo and the api docs :P but i cannot complain ;) [21:13] malkomal_ has joined the channel [21:16] mscdex: smlefo: node-waf is node's build system, it is written in python [21:16] saschagehlich has joined the channel [21:17] mscdex: that's why you need python to build node [21:17] Corren has joined the channel [21:17] smlefo: so what would one use node-waf for? [21:19] mraleph has joined the channel [21:19] mscdex: to build node c++ addons [21:19] mscdex: and bindings [21:20] Maximosis has joined the channel [21:20] Postmodernist has joined the channel [21:21] smlefo: ah ha, thanks mscdex [21:21] Postmodernist: brianloveswords / brianc: Check line 75: https://gist.github.com/973550 [21:21] Postmodernist: I added that kludge to parseStringArray to prevent it from throwing an error on empty arrays. [21:22] Maximosis_ has joined the channel [21:22] Postmodernist: The problem is that parseStringArray doesn't like Postgresql arrays that are "{}" [21:23] tmedema has joined the channel [21:25] Marak has joined the channel [21:25] abraham has joined the channel [21:25] Marak: fucking san Francisco people will use any excuse to dress up in costumes. who the fuck wakes up at 730am sunday to start drinking?!?!? [21:26] Postmodernist: Most of my friends Marak [21:26] sikker: most of my friends go to bed 730am after drinking. [21:28] Maximosis has joined the channel [21:29] Maximosis_ has joined the channel [21:30] brianloveswords: Postmodernist: You definitely want brianc, I don't know what that is you're talking about. [21:30] mikey_p: Marak: what portland wasn't weird enough for you? [21:30] Maximosis__ has joined the channel [21:31] Marak: mikey_p: apparently not [21:31] mikey_p has left the channel [21:31] mikey_p has joined the channel [21:32] Maximosis has joined the channel [21:33] tedsuo has joined the channel [21:35] zackattack has joined the channel [21:36] brownies has joined the channel [21:37] johnnywengluu: are the node libraries for manipulating file content .. eg. replacing a text .. adding text etc [21:37] Maximosis_ has joined the channel [21:38] sikker: johnnywengluu, I'd load the content of the file into a string, use .replace() on the string, or += on the string, and save the new string to the file. [21:38] johnnywengluu: good solution .. ill try that [21:39] balaa has joined the channel [21:40] aaronblohowiak has joined the channel [21:41] scoates: is this the "best" way to find out of my current process has a console, or is (e.g.) being redirected to a file? [21:42] scoates: var hasConsole = process.stdout.constructor.name ? true : false; [21:42] Maximosis_ has joined the channel [21:42] scoates: or maybe: var hasConsole = process.stdout.constructor.name === 'WriteStream'; [21:42] brettgoulder has joined the channel [21:42] prettyrobots has joined the channel [21:43] wafflesburger has joined the channel [21:45] gmonnerat has joined the channel [21:45] Maximosis__ has joined the channel [21:45] mscdex: scoates: tty.isatty(process.stdout.fd) [21:45] Maximosis___ has joined the channel [21:46] gmonnerat has left the channel [21:48] Postmodernist: brianloveswords: Okay, I'll wait for brianc [21:48] w_wilkins has joined the channel [21:49] F1nnur has joined the channel [21:50] aaronblohowiak: how do i handle SIGINT in node? [21:51] ExsysTech has joined the channel [21:51] mscdex: process.on('SIGINT', function(){}) ? [21:51] aaronblohowiak: nevermind! [21:51] mscdex: :) [21:51] aaronblohowiak: mscdex: too fast! [21:51] aaronblohowiak: lol [21:51] mscdex: hehe [21:53] Muon has joined the channel [21:53] Muon has left the channel [21:53] fmeyer has joined the channel [21:54] devrim has joined the channel [21:57] jmalina has joined the channel [21:57] vikstrous has joined the channel [21:59] blueadept has joined the channel [21:59] aaronblohowiak: hmmm. is there some way to run a command right before node is going to quit because there are no outstanding timers? [22:00] aaronblohowiak: process.exit! [22:00] aaronblohowiak: woot [22:00] wafflesburger has left the channel [22:00] darkkrai has joined the channel [22:00] darkkrai: could I write a multiplayer web based roguelike with node.js? [22:01] darkkrai: I'm a little confused on the abilities of node.js [22:01] aaronblohowiak: darkkrai: yes! you could. [22:02] stagas: darkkrai: sure [22:02] darkkrai: hm [22:02] stagas: darkkrai: mp games is one of the things node is good for [22:03] mynyml has joined the channel [22:03] chjj: im writing a UO server in node right now [22:03] chjj: its pretty nerdy [22:04] sechrist has joined the channel [22:04] nexxy: s/its/im/ [22:04] darkkrai: I see [22:04] chjj: i wanna see if node will be able to handle it [22:05] chjj: it might get rough because all data and state need to be held in memory [22:06] Maximosis has joined the channel [22:08] jbergstroem has joined the channel [22:10] aaronblohowiak: how do i send sighup with terminal.app [22:10] aaronblohowiak: without actually closing the terminal [22:11] aaronblohowiak: (like ^c will sigint) [22:11] philtor has joined the channel [22:13] zackattack has joined the channel [22:14] darkkrai: is there a psudeo terminal project? [22:14] mikegerwitz: aaronblohowiak: kill -s HUP ? [22:14] darkkrai: ala http://thrind.xamai.ca/ [22:15] aaronblohowiak: mikegerwitz: thanks [22:16] piscisaureus_ has joined the channel [22:17] scoates: mscdex: thanks [22:17] sechrist has joined the channel [22:18] brownies has joined the channel [22:19] secoif has joined the channel [22:20] Maximosis has joined the channel [22:21] darkkrai: anyone? [22:22] edude03 has joined the channel [22:22] Jamie has joined the channel [22:22] Maximosis: Do you mean like this http://linux.die.net/man/7/pty ? [22:23] johnnywengluu: how do i use the new link? [22:23] johnnywengluu: npm link [22:23] a|i has joined the channel [22:23] a|i has left the channel [22:24] a|i has joined the channel [22:24] a|i: wtf happened to npm bundle? [22:25] a|i: it's gone in 1.0.6 [22:26] darkkrai: Maximosis: I want it to look like a terminal, not issuing commands to the server at all. It would be used to naviagte through a "fake" filesystem using unix like commands [22:26] mscdex: a|i: i think npm bundles by default now? [22:26] sivy has joined the channel [22:26] mscdex: puts the modules in node_modules [22:26] a|i: bundles what? [22:27] mscdex: that's from what i gather [22:27] AvianFlu has joined the channel [22:27] a|i: mscdex: but what's the command for that? [22:27] a|i: just npm? [22:27] Marak: darkkrai: fuse bindings is best for fake file systems? [22:27] mscdex: a|i: i think so [22:27] Marak: darkkrai: that way you can use real commands [22:28] a|i: mscdex: doesn't work, I have package.json, and I used to call npm bundle to fetch the modules [22:28] a|i: now it's gone. [22:28] mscdex: Marak: sounds like he wants it all client-side in the browser? [22:28] mscdex: a|i: sorry, dunno then [22:29] dyer has joined the channel [22:29] dyer has joined the channel [22:29] Marak: mscdex: ahh, there is a jquery plugin for that [22:29] Yuffster has joined the channel [22:29] mscdex: jquery-fuse! [22:30] mscdex: do it [22:30] Marak: darkkrai: http://terminal.jcubic.pl/#demo [22:30] Marak: darkkrai: like that? [22:30] sstephenson: a|i: it's `npm install` now [22:30] sstephenson: a|i: `npm install --global` is the old `npm install` [22:31] a|i: sstephenson: thanks, seriously it need to be dopcumented before bumping version from 0.3 to 1.0 [22:31] darkkrai: ooh [22:31] darkkrai: i like! [22:31] Marak: ;-0 [22:31] sstephenson: yeah, it was: http://blog.nodejs.org/2011/05/01/npm-1-0-released/ [22:32] jet18: would anyone be so kind to review my code. Its only a tiny app <100 lines. It's my first time using node, my app works but I'm looking for improvements or reccomendations: http://pastebin.com/Sv9Qj5md Cheers :-) [22:32] sechrist_ has joined the channel [22:32] a|i: sstephenson: npm install gives me nothing. [22:33] sstephenson: try blowing away your node_modules [22:33] avalanche123 has joined the channel [22:33] darkkrai: Marak: and I can write my own functions? [22:33] Marak: darkkrai: sure, why not! [22:33] aaronblohowiak: jet18: make that a gist =) [22:33] darkkrai: wow [22:34] darkkrai: :D [22:34] Marak: darkkrai: i watch all sorts of neat projects, you should follow me on github http://github.com/marak [22:34] markwubben has joined the channel [22:35] darkkrai: you wrote that? [22:35] darkkrai: oh [22:35] _64k has joined the channel [22:35] darkkrai: I thought you said write [22:35] jet18: @aaronblohowiak: I always forget about gist... oops https://gist.github.com/973620 [22:35] darkkrai: cool none the less [22:36] a|i: aw man, npm 1.0 gives me a lot of: Not compatible with your version of node/npm: Required: {"node":"0.4.x"} Actual: {"npm":"1.0.6","node":"v0.5.0-pre"} [22:36] a|i: but these modules actually work with node 0.5 [22:36] a|i: the authors have not bumped the versions [22:36] a|i: how to ask npm nopt to care about that? [22:37] prettyrobots has joined the channel [22:37] darkkrai: followed [22:37] sechrist has joined the channel [22:37] aaronblohowiak: jet18: why do you specify var a if you dont use it? [22:37] mscdex: jet18: semi-related question, do you happen to know what tropo's usage limits are? [22:38] mscdex: oh wow... there's a java implementation of php? [22:38] mscdex: whyyyyy [22:39] aaronblohowiak: mscdex: "the lols" would be the only correct answer [22:39] jet18: @aaron didnt realise I had. It's based heavily on examples. Which one are you talking about... I can see now I'd be better replacing SESSIONID with just cs in my path. [22:40] jet18: @mscdex: there are none, you pay for what you use and thats it :) However if your in the US I'd reccomend twillio. [22:40] mscdex: hrmm [22:40] ezmobius has joined the channel [22:40] aaronblohowiak: jet18: you set var a = ... in a few places, but you never use it [22:40] jet18: @mscdex: are you on about rate limiting for the api or actually call/sms limits [22:40] mscdex: both really [22:41] hassox has joined the channel [22:42] aaronblohowiak: jet18: https://gist.github.com/973624 [22:43] sorens3n has joined the channel [22:43] sorens3n: mornin' [22:43] aaronblohowiak: sorens3n: afternoon [22:43] jet18: @aaronblohowiak: Oh yea, didnt see that one. Thanks, so have I done it the correct way, creating a named function for tropoKill rather than including it withint my setInterval or would it make no difference. I've tried reading up but no wheres got a great deal on application logic. I watched Ryans video on the home page, that was pretty good. [22:43] Maximosis has joined the channel [22:43] mbrevoort has joined the channel [22:45] jet18: @mscdex: Its really easy to use, dont get me wrong. But twilio is cheaper by a few cents and thats where it counts. If I had a us billing id deffinitley use them. [22:46] mscdex: i'll look into it, thanks [22:46] Casperin has joined the channel [22:47] jet18: no bother, ever worked with any phone services before? Tropo has 24/7-ish support. If your hight scale you can go directly to voxeo who are the parent of tropo but your looking at $500+ monthly costs. [22:47] jet18: @aaronblohowiak: Thanks a bunch for the help! [22:47] jet18: Anyone got any really good resources for node apart from the api docs? [22:48] mscdex: jet18: http://nodeguide.com/ http://nodebeginner.org/ http://nodetuts.com/ http://howtonode.org/ [22:49] jet18: Yeah, seen em before. Guessing thats all thats out there really? [22:50] mscdex: those are the more up-to-date ones that i know of [22:50] darkkrai: Marak: what am I doing wrong? view-source:http://etropro.info/ [22:50] mscdex: otherwise, there's always the mailing list and here [22:50] mscdex: :) [22:51] Marak: darkkrai: uncaught exception: Sorry, but terminal said that "#term_demo" is not valid selector [22:51] Marak: darkkrai: i cant really dive into that , im kinda busy here :-\ [22:51] sirdancealot has joined the channel [22:51] darkkrai: okay [22:52] darkkrai: how did you find that error? [22:52] Marak: darkkrai: web console, firebug, developer tools in chrome [22:52] Marak: darkkrai: whatever you call it. i like firebug, chrome dev console is good too [22:53] darkkrai: ok [22:53] Casperin has joined the channel [22:53] Squeese has joined the channel [22:57] jet18: @darkkrai you need a div with an id of term_demo. [22:58] Lorentz has joined the channel [22:58] jet18: I think. [22:59] Country has joined the channel [23:00] tim_smart has joined the channel [23:01] darshanshankar has joined the channel [23:02] tim_smart: ryah: Hey. Votizen is going to be dropping node (struggled to find hirable talent), so we will have to call off the no.de stuff [23:03] Charuru has joined the channel [23:05] jacter has joined the channel [23:06] jacter has joined the channel [23:06] hassox has joined the channel [23:08] ryah: tim_smart: oh no [23:10] dekz: morning gents [23:10] mscdex: yo [23:10] dekz: mscdex: saw your nntp, beat me to it :) [23:10] mscdex: heh :) [23:11] darkkrai: jet18: thanks I figured it out :) [23:11] dekz: moving house and won't have the internet for a while, might write the start of libpurple bindings to pass the time [23:11] dekz: not sure how many connections libpurple can handle though [23:12] sherod has joined the channel [23:12] jet18: Should a node application throw an error for whatever reason whats the best way to restart it. Or should I be looking to catch any errors? [23:13] bbttxu_ has joined the channel [23:14] mikegerwitz: jet18: Uncaught exceptions are never a good thing. [23:14] linnk: ryah: hey :) I was wondering if you ever thought about labelling issues on GitHub that "beginners" can help out with? like, code that has to be moved around or modified slightly, copy/paste stuff, renaming, small fixes and such.. I really want to contribute more, but my C++ is weak (I'm learning quickly though), and I think others might be in the same situation [23:14] kmwallio has joined the channel [23:14] tilgovi has joined the channel [23:15] ryah: linnk: yeah - maybe in the future. at the moment we're in the middle of a large rewrite [23:15] NuckingFuts: okay, I'm building an API, and I want to be able to use something like JSON for my request payloads, but still use things like GET, POST, etc. [23:15] ryah: small bits moving around isn't helpful [23:15] mercer has joined the channel [23:15] sherod: Quick question. If i need to generate a unique ID from within a node application, is there a particular method to call? [23:15] NuckingFuts: And I'm wondering if anyone here would recommend certain modules for this [23:16] mscdex: dekz: you saw node-oscar right? [23:16] NuckingFuts: Or if anyone could suggest ideas of how to do JSON without constant %-encoding in the URL's JSON payload [23:16] deedubs: sherod: what about uuid? [23:17] linnk: ryah: that sounds very sensible. Is it the libuv rewrite? [23:17] deedubs: sherod: http://bitbucket.org/nikhilm/uuidjs [23:17] ryah: linnk: yes [23:18] linnk: ryah: ok :) thank you for your time [23:18] matyr_ has joined the channel [23:19] jet18: is there any more talks on node floating about on the interwebs? I like ones with real world examples :) [23:19] sherod: deedubs: yes, that looks like something useful. the C++ has me a little worried, but I suppose now is a time to learn how to build these things. [23:19] mscdex: ryah: any chance of landing the read/write float/double patch for Buffer? [23:20] Maximosis has joined the channel [23:20] deedubs: sherod: npm i uuid [23:20] deedubs: tada [23:20] jet18: *other than yui theater [23:20] NuckingFuts: I assume there's no way to merge JSON-RPC with REST, huh? [23:20] ryah: mscdex: did you fix the -0 issue? [23:20] balaa_ has joined the channel [23:20] mscdex: yeah [23:20] NuckingFuts: ACTION shakes his fist at HTTP [23:20] a|i: latest node doesn't work with socket? I get this: node: ../src/node.cc:1212: ssize_t node::DecodeWrite(char*, size_t, v8::Handle, node::encoding): Assertion `b[1] == 0' failed. [23:21] peerless has joined the channel [23:21] mscdex: a|i: 0.5 or 0.4.7? [23:21] a|i: 0.5 [23:21] NuckingFuts: ooh! I just had an idea! yay [23:21] Postmodernist: Anyone have any suggestions on my fix for a bug in brianc's pg module? https://gist.github.com/973550 [23:21] mscdex: a|i: libuv was just merged, so it probably has to do with that [23:21] a|i: mscdex: any quick fix? [23:21] Postmodernist: Look at line 75 [23:21] sherod: deedbus: ah. well that was simple... or would be if it could find a c++ compiler on my mac. I shall google. [23:21] mscdex: a|i: no idea, i haven't even looked at libuv yet [23:22] matyr has joined the channel [23:22] a|i: mscdex: how do I install 0.4 from source? [23:22] wormphlegm has joined the channel [23:22] Postmodernist: '{}' is an empty array in Postgresql, but the pg module is throwing "Not postgre array" [23:23] Postmodernist: a|i: Download the tarball and compile it. [23:23] mscdex: a|i: grab the tarball and ./configure && make && make install [23:23] mscdex: heh [23:23] Postmodernist: a|i: You'll need build-essential. [23:23] a|i: thanks. [23:24] Postmodernist: I wish I could push a fix on github for brianc's pg :( [23:24] Postmodernist: Damn corporate firewall [23:24] Postmodernist: Sonicwall blocks it under 'games and downloads' [23:25] mscdex: Postmodernist: isn't there a "fork and push" function on github? [23:25] mscdex: er pull request [23:25] Postmodernist: mscdex: I can't get to it because of sonicwall [23:25] mscdex: :S [23:25] mscdex: isn't that all browser-based though? [23:25] Postmodernist: No, it's a network firewall [23:26] mscdex: eh [23:26] mscdex: silly firewalls [23:26] Postmodernist: What do you think about my hack I added at line 75? https://gist.github.com/973550 [23:26] NuckingFuts: At school, I just fire up PuTTY and tunnel through my home computer :P [23:26] Postmodernist: The IT department hates us [23:26] mscdex: Postmodernist: no idea, don't know much about postgres [23:26] Postmodernist: Their job is to make developers scream. [23:26] gazumps has joined the channel [23:26] Postmodernist: alright [23:27] mscdex: my db usage has been pretty much limited to mysql [23:27] NuckingFuts: I was so glad to switch to Mongo [23:27] tonymilne has joined the channel [23:28] NuckingFuts: The subdocuments are what make it so wonderful in my opinion [23:28] NuckingFuts: No more extra "comments" table [23:29] mscdex: no more cowbell! [23:30] ChrisPartridge has joined the channel [23:30] NuckingFuts: SubStack: I'm looking at dnode and all I can say is... WTF is with that turtle? [23:31] Overv has joined the channel [23:32] dgathright has joined the channel [23:32] sechrist has joined the channel [23:32] linnk has left the channel [23:36] jzacsh_ has joined the channel [23:37] Maximosis has joined the channel [23:38] SubStack: NuckingFuts: it's callbacks all the way down [23:38] mscdex: NuckingFuts: it's michelangelo as a young turtle [23:38] ChrisPartridge: NuckingFuts: It's an RPC turtle [23:38] mscdex: :p [23:38] Marak: TURTLES ALL THE WAY DOWN [23:38] mscdex: we'll do it live! [23:38] chjj: so does anyone know the status of the crypto module? [23:39] NuckingFuts: TURTLE TURTLE TURTLE [23:39] ChrisPartridge: chjj: status? [23:39] NuckingFuts: chjj: It's Cryptastic. [23:39] SubStack: like this: http://substack.net/images/all_the_way_down.png [23:39] chjj: been seeing a lot of talk of it being removed [23:39] skyloid has joined the channel [23:39] chjj: or at the very least pruned a bit [23:39] mscdex: crypto is single and looking :p [23:39] ChrisPartridge: SubStack: lol [23:40] SubStack: http://substack.net/doc/dnode_slides_nodeconf.pdf for more [23:41] NuckingFuts: God, I so need to move to the silicon valley [23:42] AvianFlu has joined the channel [23:42] Wa has joined the channel [23:42] NuckingFuts: ACTION wants to spend his 20's in the silicon valley, then move to Portland, OR to settle down as a freelancer or something [23:42] mscdex: you're under 20? [23:42] NuckingFuts: mscdex Quite. I'm only 17 [23:42] mscdex: :o [23:43] chjj: so thats why youre named "NuckingFuts" [23:43] NuckingFuts: lolwat? [23:43] NuckingFuts: chjj: I am 12, wat is this? [23:43] SubStack: NuckingFuts: protip: the south bay sucks [23:43] liquidproof has joined the channel [23:43] NuckingFuts: I've been programming for 10 years now, wow [23:44] NuckingFuts: It jsut dawned on me that I learned BASIC 10 years ago [23:44] NuckingFuts: wow [23:44] chjj: damn, i hope crypto doesnt get removed [23:44] jet18: what the fcuk. 10 years ago I was playing with geocities. [23:44] chjj: but at the same time i can see the argument for it [23:44] a|i: what was the trick to run node as a daemon again? [23:45] NuckingFuts: Better not remove the crypto, I need it for my authentication systems [23:45] chjj: i know! [23:45] chjj: but i was looking at the crypto code, its pretty messy [23:45] NuckingFuts: a|i: On Linux, it's node thing.js & [23:45] chjj: and its huge [23:45] NuckingFuts: chjj: It interfaces with OpenSSL, iirc? [23:46] a|i: NuckingFuts: but there was a command for it too.. [23:46] chjj: yeah, its just a wrapper around openssl [23:46] chjj: thats where all the ciphers and hashes come from [23:46] sherod: ali: nohup node thing.js & [23:46] NuckingFuts: a|i: On no.de, it's automatic, and on regular Linux (via SSH), it's nhup with an * and somefancy piping [23:47] NuckingFuts: sherod: I also pipe STDOUT to /dev/null [23:47] a|i: NuckingFuts: nhup is the one! [23:47] NuckingFuts: I run all my deviantART chat bots with nohup and & [23:48] NuckingFuts: Problem is, I can't get them to quit XD [23:48] NuckingFuts: it seems to restart whenever it tries to quit [23:48] ngs has joined the channel [23:51] bruce has joined the channel [23:51] quackslike: i wish more people on the nodejs mail list new how to use a mail list.. chopping out previous relevent content is bullshit. [23:52] NuckingFuts: quackslike: Most people probably use it through Google Groups :/ [23:52] quackslike: NuckingFuts: yeah [23:52] chjj: nothing wrong with not wanting to get spammed [23:52] Postmodernist: Google Groups is for suicide support groups run by funeral directors. [23:53] josephboyle has joined the channel [23:55] jacter has joined the channel [23:55] jet18: how do you throw a error with a custom message in node? [23:55] quackslike: the _really smart ones_ chopout all the previous relevant stuff, then top post anyway. *headdesk* [23:56] uclinux has joined the channel [23:56] chjj: jet18: throw new Error('hello world'); [23:56] Postmodernist: quackslike: And those of us who need instant results use IRC instead. :) [23:56] jet18: thanks! [23:56] sherod: A better UUID generator... uses only javascript: https://github.com/broofa/node-uuid [23:57] Postmodernist: How can I download this as a tar.gz? https://github.com/brianc/node-postgres [23:57] chjj: man this is rough, im really worried about crypto [23:57] matyr_ has joined the channel [23:57] ChrisPartridge: SubStack: hm, running those slides in Adobe Reader on windows crashes the plugin ... probably too many turtles [23:57] mscdex: Postmodernist: click the Downloads button [23:57] chjj: i dont wanna lose ciphers either, even though theyre buggy [23:57] quackslike: Postmodernist: heh.. i wonder if they think they're using twitter.. [23:58] SubStack: ChrisPartridge: turtles *ALL* the way down [23:58] chjj: PDF is the absolute ESSENCE of evil [23:58] Postmodernist: quackslike: lol [23:58] SubStack: crashes metaphysical plugins without infinite regress support [23:58] Postmodernist: mscdex: thnx [23:58] chjj: i dont think hitler wouldve existed at all if PDF didnt exist right now [23:58] chjj: it is the source of all evil, ever [23:58] Postmodernist: Hitler is evil. [23:59] chjj: yes, thats what im saying [23:59] chjj: but the underlying source of all evil throughout the universe is PDF, PDF enables these things [23:59] Postmodernist: But Franklin D. Roosevelt is evil too. [23:59] chjj: PDF and flash actually